@helpwave/hightide 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/dist/components/date/DatePicker.js +1 -1
  2. package/dist/components/date/DatePicker.js.map +1 -1
  3. package/dist/components/date/DatePicker.mjs +1 -1
  4. package/dist/components/date/DatePicker.mjs.map +1 -1
  5. package/dist/components/date/YearMonthPicker.js +1 -1
  6. package/dist/components/date/YearMonthPicker.js.map +1 -1
  7. package/dist/components/date/YearMonthPicker.mjs +1 -1
  8. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  9. package/dist/components/dialog/ConfirmDialog.d.mts +1 -1
  10. package/dist/components/dialog/ConfirmDialog.d.ts +1 -1
  11. package/dist/components/dialog/ConfirmDialog.js +2 -2
  12. package/dist/components/dialog/ConfirmDialog.js.map +1 -1
  13. package/dist/components/dialog/ConfirmDialog.mjs +2 -2
  14. package/dist/components/dialog/ConfirmDialog.mjs.map +1 -1
  15. package/dist/components/dialog/Dialog.d.mts +1 -1
  16. package/dist/components/dialog/Dialog.d.ts +1 -1
  17. package/dist/components/dialog/Dialog.js +2 -2
  18. package/dist/components/dialog/Dialog.js.map +1 -1
  19. package/dist/components/dialog/Dialog.mjs +2 -2
  20. package/dist/components/dialog/Dialog.mjs.map +1 -1
  21. package/dist/components/dialog/DiscardChangesDialog.d.mts +1 -1
  22. package/dist/components/dialog/DiscardChangesDialog.d.ts +1 -1
  23. package/dist/components/dialog/DiscardChangesDialog.js +2 -2
  24. package/dist/components/dialog/DiscardChangesDialog.js.map +1 -1
  25. package/dist/components/dialog/DiscardChangesDialog.mjs +2 -2
  26. package/dist/components/dialog/DiscardChangesDialog.mjs.map +1 -1
  27. package/dist/components/dialog/InputDialog.d.mts +1 -1
  28. package/dist/components/dialog/InputDialog.d.ts +1 -1
  29. package/dist/components/dialog/InputDialog.js +2 -2
  30. package/dist/components/dialog/InputDialog.js.map +1 -1
  31. package/dist/components/dialog/InputDialog.mjs +2 -2
  32. package/dist/components/dialog/InputDialog.mjs.map +1 -1
  33. package/dist/components/dialog/LanguageDialog.d.mts +1 -1
  34. package/dist/components/dialog/LanguageDialog.d.ts +1 -1
  35. package/dist/components/dialog/LanguageDialog.js +28 -15
  36. package/dist/components/dialog/LanguageDialog.js.map +1 -1
  37. package/dist/components/dialog/LanguageDialog.mjs +28 -15
  38. package/dist/components/dialog/LanguageDialog.mjs.map +1 -1
  39. package/dist/components/dialog/ThemeDialog.d.mts +1 -1
  40. package/dist/components/dialog/ThemeDialog.d.ts +1 -1
  41. package/dist/components/dialog/ThemeDialog.js +69 -33
  42. package/dist/components/dialog/ThemeDialog.js.map +1 -1
  43. package/dist/components/dialog/ThemeDialog.mjs +60 -24
  44. package/dist/components/dialog/ThemeDialog.mjs.map +1 -1
  45. package/dist/components/dialog/index.d.mts +1 -1
  46. package/dist/components/dialog/index.d.ts +1 -1
  47. package/dist/components/dialog/index.js +61 -25
  48. package/dist/components/dialog/index.js.map +1 -1
  49. package/dist/components/dialog/index.mjs +61 -25
  50. package/dist/components/dialog/index.mjs.map +1 -1
  51. package/dist/components/layout/Carousel.d.mts +33 -0
  52. package/dist/components/layout/Carousel.d.ts +33 -0
  53. package/dist/components/layout/Carousel.js +684 -0
  54. package/dist/components/layout/Carousel.js.map +1 -0
  55. package/dist/components/layout/Carousel.mjs +659 -0
  56. package/dist/components/layout/Carousel.mjs.map +1 -0
  57. package/dist/components/{layout-and-navigation → layout}/Chip.js +1 -1
  58. package/dist/components/layout/Chip.js.map +1 -0
  59. package/dist/components/{layout-and-navigation → layout}/Chip.mjs +1 -1
  60. package/dist/components/layout/Chip.mjs.map +1 -0
  61. package/dist/components/{layout-and-navigation → layout}/DividerInserter.js +1 -1
  62. package/dist/components/layout/DividerInserter.js.map +1 -0
  63. package/dist/components/{layout-and-navigation → layout}/DividerInserter.mjs +1 -1
  64. package/dist/components/layout/DividerInserter.mjs.map +1 -0
  65. package/dist/components/{layout-and-navigation → layout}/Expandable.js +2 -2
  66. package/dist/components/layout/Expandable.js.map +1 -0
  67. package/dist/components/{layout-and-navigation → layout}/Expandable.mjs +2 -2
  68. package/dist/components/layout/Expandable.mjs.map +1 -0
  69. package/dist/components/{layout-and-navigation → layout}/FAQSection.js +5 -5
  70. package/dist/components/layout/FAQSection.js.map +1 -0
  71. package/dist/components/{layout-and-navigation → layout}/FAQSection.mjs +5 -5
  72. package/dist/components/layout/FAQSection.mjs.map +1 -0
  73. package/dist/components/{layout-and-navigation → layout}/FloatingContainer.js +2 -2
  74. package/dist/components/layout/FloatingContainer.js.map +1 -0
  75. package/dist/components/{layout-and-navigation → layout}/FloatingContainer.mjs +2 -2
  76. package/dist/components/layout/FloatingContainer.mjs.map +1 -0
  77. package/dist/components/{layout-and-navigation → layout}/ListBox.js +2 -2
  78. package/dist/components/layout/ListBox.js.map +1 -0
  79. package/dist/components/{layout-and-navigation → layout}/ListBox.mjs +2 -2
  80. package/dist/components/layout/ListBox.mjs.map +1 -0
  81. package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.js +1 -1
  82. package/dist/components/layout/MarkdownInterpreter.js.map +1 -0
  83. package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.mjs +1 -1
  84. package/dist/components/layout/MarkdownInterpreter.mjs.map +1 -0
  85. package/dist/components/{layout-and-navigation → layout}/ScrollArea.js +2 -2
  86. package/dist/components/layout/ScrollArea.js.map +1 -0
  87. package/dist/components/{layout-and-navigation → layout}/ScrollArea.mjs +1 -1
  88. package/dist/components/layout/ScrollArea.mjs.map +1 -0
  89. package/dist/components/{layout-and-navigation → layout}/TextImage.js +3 -3
  90. package/dist/components/layout/TextImage.js.map +1 -0
  91. package/dist/components/{layout-and-navigation → layout}/TextImage.mjs +2 -2
  92. package/dist/components/layout/TextImage.mjs.map +1 -0
  93. package/dist/components/{layout-and-navigation → layout}/VerticalDivider.js +1 -1
  94. package/dist/components/layout/VerticalDivider.js.map +1 -0
  95. package/dist/components/{layout-and-navigation → layout}/VerticalDivider.mjs +1 -1
  96. package/dist/components/layout/VerticalDivider.mjs.map +1 -0
  97. package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.js +1 -1
  98. package/dist/components/navigation/BreadCrumb.js.map +1 -0
  99. package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.mjs +1 -1
  100. package/dist/components/navigation/BreadCrumb.mjs.map +1 -0
  101. package/dist/components/navigation/Navigation.d.mts +21 -0
  102. package/dist/components/navigation/Navigation.d.ts +21 -0
  103. package/dist/components/navigation/Navigation.js +4018 -0
  104. package/dist/components/navigation/Navigation.js.map +1 -0
  105. package/dist/components/navigation/Navigation.mjs +4012 -0
  106. package/dist/components/navigation/Navigation.mjs.map +1 -0
  107. package/dist/components/{layout-and-navigation → navigation}/Pagination.js +3 -3
  108. package/dist/components/navigation/Pagination.js.map +1 -0
  109. package/dist/components/{layout-and-navigation → navigation}/Pagination.mjs +3 -3
  110. package/dist/components/navigation/Pagination.mjs.map +1 -0
  111. package/dist/components/{layout-and-navigation → navigation}/StepperBar.js +3 -3
  112. package/dist/components/navigation/StepperBar.js.map +1 -0
  113. package/dist/components/{layout-and-navigation → navigation}/StepperBar.mjs +3 -3
  114. package/dist/components/navigation/StepperBar.mjs.map +1 -0
  115. package/dist/components/properties/MultiSelectProperty.js +27 -14
  116. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  117. package/dist/components/properties/MultiSelectProperty.mjs +27 -14
  118. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  119. package/dist/components/properties/SelectProperty.js +27 -14
  120. package/dist/components/properties/SelectProperty.js.map +1 -1
  121. package/dist/components/properties/SelectProperty.mjs +27 -14
  122. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  123. package/dist/components/table/Table.js +1 -1
  124. package/dist/components/table/Table.js.map +1 -1
  125. package/dist/components/table/Table.mjs +1 -1
  126. package/dist/components/table/Table.mjs.map +1 -1
  127. package/dist/components/user-action/DateAndTimePicker.js +1 -1
  128. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  129. package/dist/components/user-action/DateAndTimePicker.mjs +1 -1
  130. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  131. package/dist/components/user-action/select/Select.d.mts +5 -1
  132. package/dist/components/user-action/select/Select.d.ts +5 -1
  133. package/dist/components/user-action/select/Select.js +27 -14
  134. package/dist/components/user-action/select/Select.js.map +1 -1
  135. package/dist/components/user-action/select/Select.mjs +27 -14
  136. package/dist/components/user-action/select/Select.mjs.map +1 -1
  137. package/dist/style/globals.css +63 -10
  138. package/dist/style/uncompiled/globals.css +5 -4
  139. package/dist/style/uncompiled/utitlity/shadow.css +4 -0
  140. package/dist/theming/useTheme.d.mts +3 -1
  141. package/dist/theming/useTheme.d.ts +3 -1
  142. package/dist/theming/useTheme.js +40 -17
  143. package/dist/theming/useTheme.js.map +1 -1
  144. package/dist/theming/useTheme.mjs +38 -15
  145. package/dist/theming/useTheme.mjs.map +1 -1
  146. package/package.json +1 -1
  147. package/dist/components/layout-and-navigation/BreadCrumb.js.map +0 -1
  148. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +0 -1
  149. package/dist/components/layout-and-navigation/Carousel.d.mts +0 -25
  150. package/dist/components/layout-and-navigation/Carousel.d.ts +0 -25
  151. package/dist/components/layout-and-navigation/Carousel.js +0 -643
  152. package/dist/components/layout-and-navigation/Carousel.js.map +0 -1
  153. package/dist/components/layout-and-navigation/Carousel.mjs +0 -609
  154. package/dist/components/layout-and-navigation/Carousel.mjs.map +0 -1
  155. package/dist/components/layout-and-navigation/Chip.js.map +0 -1
  156. package/dist/components/layout-and-navigation/Chip.mjs.map +0 -1
  157. package/dist/components/layout-and-navigation/DividerInserter.js.map +0 -1
  158. package/dist/components/layout-and-navigation/DividerInserter.mjs.map +0 -1
  159. package/dist/components/layout-and-navigation/Expandable.js.map +0 -1
  160. package/dist/components/layout-and-navigation/Expandable.mjs.map +0 -1
  161. package/dist/components/layout-and-navigation/FAQSection.js.map +0 -1
  162. package/dist/components/layout-and-navigation/FAQSection.mjs.map +0 -1
  163. package/dist/components/layout-and-navigation/FloatingContainer.js.map +0 -1
  164. package/dist/components/layout-and-navigation/FloatingContainer.mjs.map +0 -1
  165. package/dist/components/layout-and-navigation/ListBox.js.map +0 -1
  166. package/dist/components/layout-and-navigation/ListBox.mjs.map +0 -1
  167. package/dist/components/layout-and-navigation/MarkdownInterpreter.js.map +0 -1
  168. package/dist/components/layout-and-navigation/MarkdownInterpreter.mjs.map +0 -1
  169. package/dist/components/layout-and-navigation/Pagination.js.map +0 -1
  170. package/dist/components/layout-and-navigation/Pagination.mjs.map +0 -1
  171. package/dist/components/layout-and-navigation/ScrollArea.js.map +0 -1
  172. package/dist/components/layout-and-navigation/ScrollArea.mjs.map +0 -1
  173. package/dist/components/layout-and-navigation/StepperBar.js.map +0 -1
  174. package/dist/components/layout-and-navigation/StepperBar.mjs.map +0 -1
  175. package/dist/components/layout-and-navigation/TextImage.js.map +0 -1
  176. package/dist/components/layout-and-navigation/TextImage.mjs.map +0 -1
  177. package/dist/components/layout-and-navigation/VerticalDivider.js.map +0 -1
  178. package/dist/components/layout-and-navigation/VerticalDivider.mjs.map +0 -1
  179. /package/dist/components/{layout-and-navigation → layout}/Chip.d.mts +0 -0
  180. /package/dist/components/{layout-and-navigation → layout}/Chip.d.ts +0 -0
  181. /package/dist/components/{layout-and-navigation → layout}/DividerInserter.d.mts +0 -0
  182. /package/dist/components/{layout-and-navigation → layout}/DividerInserter.d.ts +0 -0
  183. /package/dist/components/{layout-and-navigation → layout}/Expandable.d.mts +0 -0
  184. /package/dist/components/{layout-and-navigation → layout}/Expandable.d.ts +0 -0
  185. /package/dist/components/{layout-and-navigation → layout}/FAQSection.d.mts +0 -0
  186. /package/dist/components/{layout-and-navigation → layout}/FAQSection.d.ts +0 -0
  187. /package/dist/components/{layout-and-navigation → layout}/FloatingContainer.d.mts +0 -0
  188. /package/dist/components/{layout-and-navigation → layout}/FloatingContainer.d.ts +0 -0
  189. /package/dist/components/{layout-and-navigation → layout}/ListBox.d.mts +0 -0
  190. /package/dist/components/{layout-and-navigation → layout}/ListBox.d.ts +0 -0
  191. /package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.d.mts +0 -0
  192. /package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.d.ts +0 -0
  193. /package/dist/components/{layout-and-navigation → layout}/ScrollArea.d.mts +0 -0
  194. /package/dist/components/{layout-and-navigation → layout}/ScrollArea.d.ts +0 -0
  195. /package/dist/components/{layout-and-navigation → layout}/TextImage.d.mts +0 -0
  196. /package/dist/components/{layout-and-navigation → layout}/TextImage.d.ts +0 -0
  197. /package/dist/components/{layout-and-navigation → layout}/VerticalDivider.d.mts +0 -0
  198. /package/dist/components/{layout-and-navigation → layout}/VerticalDivider.d.ts +0 -0
  199. /package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.d.mts +0 -0
  200. /package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.d.ts +0 -0
  201. /package/dist/components/{layout-and-navigation → navigation}/Pagination.d.mts +0 -0
  202. /package/dist/components/{layout-and-navigation → navigation}/Pagination.d.ts +0 -0
  203. /package/dist/components/{layout-and-navigation → navigation}/StepperBar.d.mts +0 -0
  204. /package/dist/components/{layout-and-navigation → navigation}/StepperBar.d.ts +0 -0
@@ -0,0 +1,4018 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __commonJS = (cb, mod) => function __require() {
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ };
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
+
32
+ // node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
33
+ var require_interop_require_wildcard = __commonJS({
34
+ "node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports2) {
35
+ "use strict";
36
+ function _getRequireWildcardCache(nodeInterop) {
37
+ if (typeof WeakMap !== "function") return null;
38
+ var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
39
+ var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
40
+ return (_getRequireWildcardCache = function(nodeInterop2) {
41
+ return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
42
+ })(nodeInterop);
43
+ }
44
+ function _interop_require_wildcard(obj, nodeInterop) {
45
+ if (!nodeInterop && obj && obj.__esModule) return obj;
46
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
47
+ var cache = _getRequireWildcardCache(nodeInterop);
48
+ if (cache && cache.has(obj)) return cache.get(obj);
49
+ var newObj = { __proto__: null };
50
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
51
+ for (var key in obj) {
52
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
53
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
54
+ if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
55
+ else newObj[key] = obj[key];
56
+ }
57
+ }
58
+ newObj.default = obj;
59
+ if (cache) cache.set(obj, newObj);
60
+ return newObj;
61
+ }
62
+ exports2._ = _interop_require_wildcard;
63
+ }
64
+ });
65
+
66
+ // node_modules/next/dist/shared/lib/router/utils/querystring.js
67
+ var require_querystring = __commonJS({
68
+ "node_modules/next/dist/shared/lib/router/utils/querystring.js"(exports2) {
69
+ "use strict";
70
+ Object.defineProperty(exports2, "__esModule", {
71
+ value: true
72
+ });
73
+ function _export(target, all) {
74
+ for (var name in all) Object.defineProperty(target, name, {
75
+ enumerable: true,
76
+ get: all[name]
77
+ });
78
+ }
79
+ _export(exports2, {
80
+ assign: function() {
81
+ return assign;
82
+ },
83
+ searchParamsToUrlQuery: function() {
84
+ return searchParamsToUrlQuery;
85
+ },
86
+ urlQueryToSearchParams: function() {
87
+ return urlQueryToSearchParams;
88
+ }
89
+ });
90
+ function searchParamsToUrlQuery(searchParams) {
91
+ const query = {};
92
+ for (const [key, value] of searchParams.entries()) {
93
+ const existing = query[key];
94
+ if (typeof existing === "undefined") {
95
+ query[key] = value;
96
+ } else if (Array.isArray(existing)) {
97
+ existing.push(value);
98
+ } else {
99
+ query[key] = [
100
+ existing,
101
+ value
102
+ ];
103
+ }
104
+ }
105
+ return query;
106
+ }
107
+ function stringifyUrlQueryParam(param) {
108
+ if (typeof param === "string") {
109
+ return param;
110
+ }
111
+ if (typeof param === "number" && !isNaN(param) || typeof param === "boolean") {
112
+ return String(param);
113
+ } else {
114
+ return "";
115
+ }
116
+ }
117
+ function urlQueryToSearchParams(query) {
118
+ const searchParams = new URLSearchParams();
119
+ for (const [key, value] of Object.entries(query)) {
120
+ if (Array.isArray(value)) {
121
+ for (const item of value) {
122
+ searchParams.append(key, stringifyUrlQueryParam(item));
123
+ }
124
+ } else {
125
+ searchParams.set(key, stringifyUrlQueryParam(value));
126
+ }
127
+ }
128
+ return searchParams;
129
+ }
130
+ function assign(target) {
131
+ for (var _len = arguments.length, searchParamsList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
132
+ searchParamsList[_key - 1] = arguments[_key];
133
+ }
134
+ for (const searchParams of searchParamsList) {
135
+ for (const key of searchParams.keys()) {
136
+ target.delete(key);
137
+ }
138
+ for (const [key, value] of searchParams.entries()) {
139
+ target.append(key, value);
140
+ }
141
+ }
142
+ return target;
143
+ }
144
+ }
145
+ });
146
+
147
+ // node_modules/next/dist/shared/lib/router/utils/format-url.js
148
+ var require_format_url = __commonJS({
149
+ "node_modules/next/dist/shared/lib/router/utils/format-url.js"(exports2) {
150
+ "use strict";
151
+ Object.defineProperty(exports2, "__esModule", {
152
+ value: true
153
+ });
154
+ function _export(target, all) {
155
+ for (var name in all) Object.defineProperty(target, name, {
156
+ enumerable: true,
157
+ get: all[name]
158
+ });
159
+ }
160
+ _export(exports2, {
161
+ formatUrl: function() {
162
+ return formatUrl;
163
+ },
164
+ formatWithValidation: function() {
165
+ return formatWithValidation;
166
+ },
167
+ urlObjectKeys: function() {
168
+ return urlObjectKeys;
169
+ }
170
+ });
171
+ var _interop_require_wildcard = require_interop_require_wildcard();
172
+ var _querystring = /* @__PURE__ */ _interop_require_wildcard._(require_querystring());
173
+ var slashedProtocols = /https?|ftp|gopher|file/;
174
+ function formatUrl(urlObj) {
175
+ let { auth, hostname } = urlObj;
176
+ let protocol = urlObj.protocol || "";
177
+ let pathname = urlObj.pathname || "";
178
+ let hash = urlObj.hash || "";
179
+ let query = urlObj.query || "";
180
+ let host = false;
181
+ auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ":") + "@" : "";
182
+ if (urlObj.host) {
183
+ host = auth + urlObj.host;
184
+ } else if (hostname) {
185
+ host = auth + (~hostname.indexOf(":") ? "[" + hostname + "]" : hostname);
186
+ if (urlObj.port) {
187
+ host += ":" + urlObj.port;
188
+ }
189
+ }
190
+ if (query && typeof query === "object") {
191
+ query = String(_querystring.urlQueryToSearchParams(query));
192
+ }
193
+ let search = urlObj.search || query && "?" + query || "";
194
+ if (protocol && !protocol.endsWith(":")) protocol += ":";
195
+ if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
196
+ host = "//" + (host || "");
197
+ if (pathname && pathname[0] !== "/") pathname = "/" + pathname;
198
+ } else if (!host) {
199
+ host = "";
200
+ }
201
+ if (hash && hash[0] !== "#") hash = "#" + hash;
202
+ if (search && search[0] !== "?") search = "?" + search;
203
+ pathname = pathname.replace(/[?#]/g, encodeURIComponent);
204
+ search = search.replace("#", "%23");
205
+ return "" + protocol + host + pathname + search + hash;
206
+ }
207
+ var urlObjectKeys = [
208
+ "auth",
209
+ "hash",
210
+ "host",
211
+ "hostname",
212
+ "href",
213
+ "path",
214
+ "pathname",
215
+ "port",
216
+ "protocol",
217
+ "query",
218
+ "search",
219
+ "slashes"
220
+ ];
221
+ function formatWithValidation(url) {
222
+ if (process.env.NODE_ENV === "development") {
223
+ if (url !== null && typeof url === "object") {
224
+ Object.keys(url).forEach((key) => {
225
+ if (!urlObjectKeys.includes(key)) {
226
+ console.warn("Unknown key passed via urlObject into url.format: " + key);
227
+ }
228
+ });
229
+ }
230
+ }
231
+ return formatUrl(url);
232
+ }
233
+ }
234
+ });
235
+
236
+ // node_modules/next/dist/shared/lib/router/utils/omit.js
237
+ var require_omit = __commonJS({
238
+ "node_modules/next/dist/shared/lib/router/utils/omit.js"(exports2) {
239
+ "use strict";
240
+ Object.defineProperty(exports2, "__esModule", {
241
+ value: true
242
+ });
243
+ Object.defineProperty(exports2, "omit", {
244
+ enumerable: true,
245
+ get: function() {
246
+ return omit;
247
+ }
248
+ });
249
+ function omit(object, keys) {
250
+ const omitted = {};
251
+ Object.keys(object).forEach((key) => {
252
+ if (!keys.includes(key)) {
253
+ omitted[key] = object[key];
254
+ }
255
+ });
256
+ return omitted;
257
+ }
258
+ }
259
+ });
260
+
261
+ // node_modules/next/dist/shared/lib/utils.js
262
+ var require_utils = __commonJS({
263
+ "node_modules/next/dist/shared/lib/utils.js"(exports2) {
264
+ "use strict";
265
+ Object.defineProperty(exports2, "__esModule", {
266
+ value: true
267
+ });
268
+ function _export(target, all) {
269
+ for (var name in all) Object.defineProperty(target, name, {
270
+ enumerable: true,
271
+ get: all[name]
272
+ });
273
+ }
274
+ _export(exports2, {
275
+ DecodeError: function() {
276
+ return DecodeError;
277
+ },
278
+ MiddlewareNotFoundError: function() {
279
+ return MiddlewareNotFoundError;
280
+ },
281
+ MissingStaticPage: function() {
282
+ return MissingStaticPage;
283
+ },
284
+ NormalizeError: function() {
285
+ return NormalizeError;
286
+ },
287
+ PageNotFoundError: function() {
288
+ return PageNotFoundError;
289
+ },
290
+ SP: function() {
291
+ return SP;
292
+ },
293
+ ST: function() {
294
+ return ST;
295
+ },
296
+ WEB_VITALS: function() {
297
+ return WEB_VITALS;
298
+ },
299
+ execOnce: function() {
300
+ return execOnce;
301
+ },
302
+ getDisplayName: function() {
303
+ return getDisplayName;
304
+ },
305
+ getLocationOrigin: function() {
306
+ return getLocationOrigin;
307
+ },
308
+ getURL: function() {
309
+ return getURL;
310
+ },
311
+ isAbsoluteUrl: function() {
312
+ return isAbsoluteUrl;
313
+ },
314
+ isResSent: function() {
315
+ return isResSent;
316
+ },
317
+ loadGetInitialProps: function() {
318
+ return loadGetInitialProps;
319
+ },
320
+ normalizeRepeatedSlashes: function() {
321
+ return normalizeRepeatedSlashes;
322
+ },
323
+ stringifyError: function() {
324
+ return stringifyError;
325
+ }
326
+ });
327
+ var WEB_VITALS = [
328
+ "CLS",
329
+ "FCP",
330
+ "FID",
331
+ "INP",
332
+ "LCP",
333
+ "TTFB"
334
+ ];
335
+ function execOnce(fn) {
336
+ let used = false;
337
+ let result;
338
+ return function() {
339
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
340
+ args[_key] = arguments[_key];
341
+ }
342
+ if (!used) {
343
+ used = true;
344
+ result = fn(...args);
345
+ }
346
+ return result;
347
+ };
348
+ }
349
+ var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
350
+ var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
351
+ function getLocationOrigin() {
352
+ const { protocol, hostname, port } = window.location;
353
+ return protocol + "//" + hostname + (port ? ":" + port : "");
354
+ }
355
+ function getURL() {
356
+ const { href } = window.location;
357
+ const origin = getLocationOrigin();
358
+ return href.substring(origin.length);
359
+ }
360
+ function getDisplayName(Component) {
361
+ return typeof Component === "string" ? Component : Component.displayName || Component.name || "Unknown";
362
+ }
363
+ function isResSent(res) {
364
+ return res.finished || res.headersSent;
365
+ }
366
+ function normalizeRepeatedSlashes(url) {
367
+ const urlParts = url.split("?");
368
+ const urlNoQuery = urlParts[0];
369
+ return urlNoQuery.replace(/\\/g, "/").replace(/\/\/+/g, "/") + (urlParts[1] ? "?" + urlParts.slice(1).join("?") : "");
370
+ }
371
+ async function loadGetInitialProps(App, ctx) {
372
+ if (process.env.NODE_ENV !== "production") {
373
+ var _App_prototype;
374
+ if ((_App_prototype = App.prototype) == null ? void 0 : _App_prototype.getInitialProps) {
375
+ const message = '"' + getDisplayName(App) + '.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';
376
+ throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
377
+ value: "E394",
378
+ enumerable: false,
379
+ configurable: true
380
+ });
381
+ }
382
+ }
383
+ const res = ctx.res || ctx.ctx && ctx.ctx.res;
384
+ if (!App.getInitialProps) {
385
+ if (ctx.ctx && ctx.Component) {
386
+ return {
387
+ pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
388
+ };
389
+ }
390
+ return {};
391
+ }
392
+ const props = await App.getInitialProps(ctx);
393
+ if (res && isResSent(res)) {
394
+ return props;
395
+ }
396
+ if (!props) {
397
+ const message = '"' + getDisplayName(App) + '.getInitialProps()" should resolve to an object. But found "' + props + '" instead.';
398
+ throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
399
+ value: "E394",
400
+ enumerable: false,
401
+ configurable: true
402
+ });
403
+ }
404
+ if (process.env.NODE_ENV !== "production") {
405
+ if (Object.keys(props).length === 0 && !ctx.ctx) {
406
+ console.warn("" + getDisplayName(App) + " returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps");
407
+ }
408
+ }
409
+ return props;
410
+ }
411
+ var SP = typeof performance !== "undefined";
412
+ var ST = SP && [
413
+ "mark",
414
+ "measure",
415
+ "getEntriesByName"
416
+ ].every((method) => typeof performance[method] === "function");
417
+ var DecodeError = class extends Error {
418
+ };
419
+ var NormalizeError = class extends Error {
420
+ };
421
+ var PageNotFoundError = class extends Error {
422
+ constructor(page) {
423
+ super();
424
+ this.code = "ENOENT";
425
+ this.name = "PageNotFoundError";
426
+ this.message = "Cannot find module for page: " + page;
427
+ }
428
+ };
429
+ var MissingStaticPage = class extends Error {
430
+ constructor(page, message) {
431
+ super();
432
+ this.message = "Failed to load static file for page: " + page + " " + message;
433
+ }
434
+ };
435
+ var MiddlewareNotFoundError = class extends Error {
436
+ constructor() {
437
+ super();
438
+ this.code = "ENOENT";
439
+ this.message = "Cannot find the middleware module";
440
+ }
441
+ };
442
+ function stringifyError(error) {
443
+ return JSON.stringify({
444
+ message: error.message,
445
+ stack: error.stack
446
+ });
447
+ }
448
+ }
449
+ });
450
+
451
+ // node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
452
+ var require_remove_trailing_slash = __commonJS({
453
+ "node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports2) {
454
+ "use strict";
455
+ Object.defineProperty(exports2, "__esModule", {
456
+ value: true
457
+ });
458
+ Object.defineProperty(exports2, "removeTrailingSlash", {
459
+ enumerable: true,
460
+ get: function() {
461
+ return removeTrailingSlash;
462
+ }
463
+ });
464
+ function removeTrailingSlash(route) {
465
+ return route.replace(/\/$/, "") || "/";
466
+ }
467
+ }
468
+ });
469
+
470
+ // node_modules/next/dist/shared/lib/router/utils/parse-path.js
471
+ var require_parse_path = __commonJS({
472
+ "node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports2) {
473
+ "use strict";
474
+ Object.defineProperty(exports2, "__esModule", {
475
+ value: true
476
+ });
477
+ Object.defineProperty(exports2, "parsePath", {
478
+ enumerable: true,
479
+ get: function() {
480
+ return parsePath;
481
+ }
482
+ });
483
+ function parsePath(path) {
484
+ const hashIndex = path.indexOf("#");
485
+ const queryIndex = path.indexOf("?");
486
+ const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
487
+ if (hasQuery || hashIndex > -1) {
488
+ return {
489
+ pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
490
+ query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
491
+ hash: hashIndex > -1 ? path.slice(hashIndex) : ""
492
+ };
493
+ }
494
+ return {
495
+ pathname: path,
496
+ query: "",
497
+ hash: ""
498
+ };
499
+ }
500
+ }
501
+ });
502
+
503
+ // node_modules/next/dist/client/normalize-trailing-slash.js
504
+ var require_normalize_trailing_slash = __commonJS({
505
+ "node_modules/next/dist/client/normalize-trailing-slash.js"(exports2, module2) {
506
+ "use strict";
507
+ Object.defineProperty(exports2, "__esModule", {
508
+ value: true
509
+ });
510
+ Object.defineProperty(exports2, "normalizePathTrailingSlash", {
511
+ enumerable: true,
512
+ get: function() {
513
+ return normalizePathTrailingSlash;
514
+ }
515
+ });
516
+ var _removetrailingslash = require_remove_trailing_slash();
517
+ var _parsepath = require_parse_path();
518
+ var normalizePathTrailingSlash = (path) => {
519
+ if (!path.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH) {
520
+ return path;
521
+ }
522
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
523
+ if (process.env.__NEXT_TRAILING_SLASH) {
524
+ if (/\.[^/]+\/?$/.test(pathname)) {
525
+ return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;
526
+ } else if (pathname.endsWith("/")) {
527
+ return "" + pathname + query + hash;
528
+ } else {
529
+ return pathname + "/" + query + hash;
530
+ }
531
+ }
532
+ return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;
533
+ };
534
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
535
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
536
+ Object.assign(exports2.default, exports2);
537
+ module2.exports = exports2.default;
538
+ }
539
+ }
540
+ });
541
+
542
+ // node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
543
+ var require_path_has_prefix = __commonJS({
544
+ "node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports2) {
545
+ "use strict";
546
+ Object.defineProperty(exports2, "__esModule", {
547
+ value: true
548
+ });
549
+ Object.defineProperty(exports2, "pathHasPrefix", {
550
+ enumerable: true,
551
+ get: function() {
552
+ return pathHasPrefix;
553
+ }
554
+ });
555
+ var _parsepath = require_parse_path();
556
+ function pathHasPrefix(path, prefix) {
557
+ if (typeof path !== "string") {
558
+ return false;
559
+ }
560
+ const { pathname } = (0, _parsepath.parsePath)(path);
561
+ return pathname === prefix || pathname.startsWith(prefix + "/");
562
+ }
563
+ }
564
+ });
565
+
566
+ // node_modules/next/dist/client/has-base-path.js
567
+ var require_has_base_path = __commonJS({
568
+ "node_modules/next/dist/client/has-base-path.js"(exports2, module2) {
569
+ "use strict";
570
+ Object.defineProperty(exports2, "__esModule", {
571
+ value: true
572
+ });
573
+ Object.defineProperty(exports2, "hasBasePath", {
574
+ enumerable: true,
575
+ get: function() {
576
+ return hasBasePath;
577
+ }
578
+ });
579
+ var _pathhasprefix = require_path_has_prefix();
580
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
581
+ function hasBasePath(path) {
582
+ return (0, _pathhasprefix.pathHasPrefix)(path, basePath);
583
+ }
584
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
585
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
586
+ Object.assign(exports2.default, exports2);
587
+ module2.exports = exports2.default;
588
+ }
589
+ }
590
+ });
591
+
592
+ // node_modules/next/dist/shared/lib/router/utils/is-local-url.js
593
+ var require_is_local_url = __commonJS({
594
+ "node_modules/next/dist/shared/lib/router/utils/is-local-url.js"(exports2) {
595
+ "use strict";
596
+ Object.defineProperty(exports2, "__esModule", {
597
+ value: true
598
+ });
599
+ Object.defineProperty(exports2, "isLocalURL", {
600
+ enumerable: true,
601
+ get: function() {
602
+ return isLocalURL;
603
+ }
604
+ });
605
+ var _utils = require_utils();
606
+ var _hasbasepath = require_has_base_path();
607
+ function isLocalURL(url) {
608
+ if (!(0, _utils.isAbsoluteUrl)(url)) return true;
609
+ try {
610
+ const locationOrigin = (0, _utils.getLocationOrigin)();
611
+ const resolved = new URL(url, locationOrigin);
612
+ return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
613
+ } catch (_) {
614
+ return false;
615
+ }
616
+ }
617
+ }
618
+ });
619
+
620
+ // node_modules/next/dist/shared/lib/router/utils/sorted-routes.js
621
+ var require_sorted_routes = __commonJS({
622
+ "node_modules/next/dist/shared/lib/router/utils/sorted-routes.js"(exports2) {
623
+ "use strict";
624
+ Object.defineProperty(exports2, "__esModule", {
625
+ value: true
626
+ });
627
+ function _export(target, all) {
628
+ for (var name in all) Object.defineProperty(target, name, {
629
+ enumerable: true,
630
+ get: all[name]
631
+ });
632
+ }
633
+ _export(exports2, {
634
+ getSortedRouteObjects: function() {
635
+ return getSortedRouteObjects;
636
+ },
637
+ getSortedRoutes: function() {
638
+ return getSortedRoutes;
639
+ }
640
+ });
641
+ var UrlNode = class _UrlNode {
642
+ insert(urlPath) {
643
+ this._insert(urlPath.split("/").filter(Boolean), [], false);
644
+ }
645
+ smoosh() {
646
+ return this._smoosh();
647
+ }
648
+ _smoosh(prefix) {
649
+ if (prefix === void 0) prefix = "/";
650
+ const childrenPaths = [
651
+ ...this.children.keys()
652
+ ].sort();
653
+ if (this.slugName !== null) {
654
+ childrenPaths.splice(childrenPaths.indexOf("[]"), 1);
655
+ }
656
+ if (this.restSlugName !== null) {
657
+ childrenPaths.splice(childrenPaths.indexOf("[...]"), 1);
658
+ }
659
+ if (this.optionalRestSlugName !== null) {
660
+ childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1);
661
+ }
662
+ const routes = childrenPaths.map((c) => this.children.get(c)._smoosh("" + prefix + c + "/")).reduce((prev, curr) => [
663
+ ...prev,
664
+ ...curr
665
+ ], []);
666
+ if (this.slugName !== null) {
667
+ routes.push(...this.children.get("[]")._smoosh(prefix + "[" + this.slugName + "]/"));
668
+ }
669
+ if (!this.placeholder) {
670
+ const r = prefix === "/" ? "/" : prefix.slice(0, -1);
671
+ if (this.optionalRestSlugName != null) {
672
+ throw Object.defineProperty(new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + r + '" and "' + r + "[[..." + this.optionalRestSlugName + ']]").'), "__NEXT_ERROR_CODE", {
673
+ value: "E458",
674
+ enumerable: false,
675
+ configurable: true
676
+ });
677
+ }
678
+ routes.unshift(r);
679
+ }
680
+ if (this.restSlugName !== null) {
681
+ routes.push(...this.children.get("[...]")._smoosh(prefix + "[..." + this.restSlugName + "]/"));
682
+ }
683
+ if (this.optionalRestSlugName !== null) {
684
+ routes.push(...this.children.get("[[...]]")._smoosh(prefix + "[[..." + this.optionalRestSlugName + "]]/"));
685
+ }
686
+ return routes;
687
+ }
688
+ _insert(urlPaths, slugNames, isCatchAll) {
689
+ if (urlPaths.length === 0) {
690
+ this.placeholder = false;
691
+ return;
692
+ }
693
+ if (isCatchAll) {
694
+ throw Object.defineProperty(new Error("Catch-all must be the last part of the URL."), "__NEXT_ERROR_CODE", {
695
+ value: "E392",
696
+ enumerable: false,
697
+ configurable: true
698
+ });
699
+ }
700
+ let nextSegment = urlPaths[0];
701
+ if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) {
702
+ let handleSlug = function(previousSlug, nextSlug) {
703
+ if (previousSlug !== null) {
704
+ if (previousSlug !== nextSlug) {
705
+ throw Object.defineProperty(new Error("You cannot use different slug names for the same dynamic path ('" + previousSlug + "' !== '" + nextSlug + "')."), "__NEXT_ERROR_CODE", {
706
+ value: "E337",
707
+ enumerable: false,
708
+ configurable: true
709
+ });
710
+ }
711
+ }
712
+ slugNames.forEach((slug) => {
713
+ if (slug === nextSlug) {
714
+ throw Object.defineProperty(new Error('You cannot have the same slug name "' + nextSlug + '" repeat within a single dynamic path'), "__NEXT_ERROR_CODE", {
715
+ value: "E247",
716
+ enumerable: false,
717
+ configurable: true
718
+ });
719
+ }
720
+ if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) {
721
+ throw Object.defineProperty(new Error('You cannot have the slug names "' + slug + '" and "' + nextSlug + '" differ only by non-word symbols within a single dynamic path'), "__NEXT_ERROR_CODE", {
722
+ value: "E499",
723
+ enumerable: false,
724
+ configurable: true
725
+ });
726
+ }
727
+ });
728
+ slugNames.push(nextSlug);
729
+ };
730
+ let segmentName = nextSegment.slice(1, -1);
731
+ let isOptional = false;
732
+ if (segmentName.startsWith("[") && segmentName.endsWith("]")) {
733
+ segmentName = segmentName.slice(1, -1);
734
+ isOptional = true;
735
+ }
736
+ if (segmentName.startsWith("\u2026")) {
737
+ throw Object.defineProperty(new Error("Detected a three-dot character ('\u2026') at ('" + segmentName + "'). Did you mean ('...')?"), "__NEXT_ERROR_CODE", {
738
+ value: "E147",
739
+ enumerable: false,
740
+ configurable: true
741
+ });
742
+ }
743
+ if (segmentName.startsWith("...")) {
744
+ segmentName = segmentName.substring(3);
745
+ isCatchAll = true;
746
+ }
747
+ if (segmentName.startsWith("[") || segmentName.endsWith("]")) {
748
+ throw Object.defineProperty(new Error("Segment names may not start or end with extra brackets ('" + segmentName + "')."), "__NEXT_ERROR_CODE", {
749
+ value: "E421",
750
+ enumerable: false,
751
+ configurable: true
752
+ });
753
+ }
754
+ if (segmentName.startsWith(".")) {
755
+ throw Object.defineProperty(new Error("Segment names may not start with erroneous periods ('" + segmentName + "')."), "__NEXT_ERROR_CODE", {
756
+ value: "E288",
757
+ enumerable: false,
758
+ configurable: true
759
+ });
760
+ }
761
+ if (isCatchAll) {
762
+ if (isOptional) {
763
+ if (this.restSlugName != null) {
764
+ throw Object.defineProperty(new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + urlPaths[0] + '" ).'), "__NEXT_ERROR_CODE", {
765
+ value: "E299",
766
+ enumerable: false,
767
+ configurable: true
768
+ });
769
+ }
770
+ handleSlug(this.optionalRestSlugName, segmentName);
771
+ this.optionalRestSlugName = segmentName;
772
+ nextSegment = "[[...]]";
773
+ } else {
774
+ if (this.optionalRestSlugName != null) {
775
+ throw Object.defineProperty(new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + urlPaths[0] + '").'), "__NEXT_ERROR_CODE", {
776
+ value: "E300",
777
+ enumerable: false,
778
+ configurable: true
779
+ });
780
+ }
781
+ handleSlug(this.restSlugName, segmentName);
782
+ this.restSlugName = segmentName;
783
+ nextSegment = "[...]";
784
+ }
785
+ } else {
786
+ if (isOptional) {
787
+ throw Object.defineProperty(new Error('Optional route parameters are not yet supported ("' + urlPaths[0] + '").'), "__NEXT_ERROR_CODE", {
788
+ value: "E435",
789
+ enumerable: false,
790
+ configurable: true
791
+ });
792
+ }
793
+ handleSlug(this.slugName, segmentName);
794
+ this.slugName = segmentName;
795
+ nextSegment = "[]";
796
+ }
797
+ }
798
+ if (!this.children.has(nextSegment)) {
799
+ this.children.set(nextSegment, new _UrlNode());
800
+ }
801
+ this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
802
+ }
803
+ constructor() {
804
+ this.placeholder = true;
805
+ this.children = /* @__PURE__ */ new Map();
806
+ this.slugName = null;
807
+ this.restSlugName = null;
808
+ this.optionalRestSlugName = null;
809
+ }
810
+ };
811
+ function getSortedRoutes(normalizedPages) {
812
+ const root = new UrlNode();
813
+ normalizedPages.forEach((pagePath) => root.insert(pagePath));
814
+ return root.smoosh();
815
+ }
816
+ function getSortedRouteObjects(objects, getter) {
817
+ const indexes = {};
818
+ const pathnames = [];
819
+ for (let i = 0; i < objects.length; i++) {
820
+ const pathname = getter(objects[i]);
821
+ indexes[pathname] = i;
822
+ pathnames[i] = pathname;
823
+ }
824
+ const sorted = getSortedRoutes(pathnames);
825
+ return sorted.map((pathname) => objects[indexes[pathname]]);
826
+ }
827
+ }
828
+ });
829
+
830
+ // node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js
831
+ var require_ensure_leading_slash = __commonJS({
832
+ "node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js"(exports2) {
833
+ "use strict";
834
+ Object.defineProperty(exports2, "__esModule", {
835
+ value: true
836
+ });
837
+ Object.defineProperty(exports2, "ensureLeadingSlash", {
838
+ enumerable: true,
839
+ get: function() {
840
+ return ensureLeadingSlash;
841
+ }
842
+ });
843
+ function ensureLeadingSlash(path) {
844
+ return path.startsWith("/") ? path : "/" + path;
845
+ }
846
+ }
847
+ });
848
+
849
+ // node_modules/next/dist/shared/lib/segment.js
850
+ var require_segment = __commonJS({
851
+ "node_modules/next/dist/shared/lib/segment.js"(exports2) {
852
+ "use strict";
853
+ Object.defineProperty(exports2, "__esModule", {
854
+ value: true
855
+ });
856
+ function _export(target, all) {
857
+ for (var name in all) Object.defineProperty(target, name, {
858
+ enumerable: true,
859
+ get: all[name]
860
+ });
861
+ }
862
+ _export(exports2, {
863
+ DEFAULT_SEGMENT_KEY: function() {
864
+ return DEFAULT_SEGMENT_KEY;
865
+ },
866
+ PAGE_SEGMENT_KEY: function() {
867
+ return PAGE_SEGMENT_KEY;
868
+ },
869
+ addSearchParamsIfPageSegment: function() {
870
+ return addSearchParamsIfPageSegment;
871
+ },
872
+ isGroupSegment: function() {
873
+ return isGroupSegment;
874
+ },
875
+ isParallelRouteSegment: function() {
876
+ return isParallelRouteSegment;
877
+ }
878
+ });
879
+ function isGroupSegment(segment) {
880
+ return segment[0] === "(" && segment.endsWith(")");
881
+ }
882
+ function isParallelRouteSegment(segment) {
883
+ return segment.startsWith("@") && segment !== "@children";
884
+ }
885
+ function addSearchParamsIfPageSegment(segment, searchParams) {
886
+ const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
887
+ if (isPageSegment) {
888
+ const stringifiedQuery = JSON.stringify(searchParams);
889
+ return stringifiedQuery !== "{}" ? PAGE_SEGMENT_KEY + "?" + stringifiedQuery : PAGE_SEGMENT_KEY;
890
+ }
891
+ return segment;
892
+ }
893
+ var PAGE_SEGMENT_KEY = "__PAGE__";
894
+ var DEFAULT_SEGMENT_KEY = "__DEFAULT__";
895
+ }
896
+ });
897
+
898
+ // node_modules/next/dist/shared/lib/router/utils/app-paths.js
899
+ var require_app_paths = __commonJS({
900
+ "node_modules/next/dist/shared/lib/router/utils/app-paths.js"(exports2) {
901
+ "use strict";
902
+ Object.defineProperty(exports2, "__esModule", {
903
+ value: true
904
+ });
905
+ function _export(target, all) {
906
+ for (var name in all) Object.defineProperty(target, name, {
907
+ enumerable: true,
908
+ get: all[name]
909
+ });
910
+ }
911
+ _export(exports2, {
912
+ normalizeAppPath: function() {
913
+ return normalizeAppPath;
914
+ },
915
+ normalizeRscURL: function() {
916
+ return normalizeRscURL;
917
+ }
918
+ });
919
+ var _ensureleadingslash = require_ensure_leading_slash();
920
+ var _segment = require_segment();
921
+ function normalizeAppPath(route) {
922
+ return (0, _ensureleadingslash.ensureLeadingSlash)(route.split("/").reduce((pathname, segment, index, segments) => {
923
+ if (!segment) {
924
+ return pathname;
925
+ }
926
+ if ((0, _segment.isGroupSegment)(segment)) {
927
+ return pathname;
928
+ }
929
+ if (segment[0] === "@") {
930
+ return pathname;
931
+ }
932
+ if ((segment === "page" || segment === "route") && index === segments.length - 1) {
933
+ return pathname;
934
+ }
935
+ return pathname + "/" + segment;
936
+ }, ""));
937
+ }
938
+ function normalizeRscURL(url) {
939
+ return url.replace(
940
+ /\.rsc($|\?)/,
941
+ // $1 ensures `?` is preserved
942
+ "$1"
943
+ );
944
+ }
945
+ }
946
+ });
947
+
948
+ // node_modules/next/dist/shared/lib/router/utils/interception-routes.js
949
+ var require_interception_routes = __commonJS({
950
+ "node_modules/next/dist/shared/lib/router/utils/interception-routes.js"(exports2) {
951
+ "use strict";
952
+ Object.defineProperty(exports2, "__esModule", {
953
+ value: true
954
+ });
955
+ function _export(target, all) {
956
+ for (var name in all) Object.defineProperty(target, name, {
957
+ enumerable: true,
958
+ get: all[name]
959
+ });
960
+ }
961
+ _export(exports2, {
962
+ INTERCEPTION_ROUTE_MARKERS: function() {
963
+ return INTERCEPTION_ROUTE_MARKERS;
964
+ },
965
+ extractInterceptionRouteInformation: function() {
966
+ return extractInterceptionRouteInformation;
967
+ },
968
+ isInterceptionRouteAppPath: function() {
969
+ return isInterceptionRouteAppPath;
970
+ }
971
+ });
972
+ var _apppaths = require_app_paths();
973
+ var INTERCEPTION_ROUTE_MARKERS = [
974
+ "(..)(..)",
975
+ "(.)",
976
+ "(..)",
977
+ "(...)"
978
+ ];
979
+ function isInterceptionRouteAppPath(path) {
980
+ return path.split("/").find((segment) => INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))) !== void 0;
981
+ }
982
+ function extractInterceptionRouteInformation(path) {
983
+ let interceptingRoute, marker, interceptedRoute;
984
+ for (const segment of path.split("/")) {
985
+ marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
986
+ if (marker) {
987
+ ;
988
+ [interceptingRoute, interceptedRoute] = path.split(marker, 2);
989
+ break;
990
+ }
991
+ }
992
+ if (!interceptingRoute || !marker || !interceptedRoute) {
993
+ throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>"), "__NEXT_ERROR_CODE", {
994
+ value: "E269",
995
+ enumerable: false,
996
+ configurable: true
997
+ });
998
+ }
999
+ interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute);
1000
+ switch (marker) {
1001
+ case "(.)":
1002
+ if (interceptingRoute === "/") {
1003
+ interceptedRoute = "/" + interceptedRoute;
1004
+ } else {
1005
+ interceptedRoute = interceptingRoute + "/" + interceptedRoute;
1006
+ }
1007
+ break;
1008
+ case "(..)":
1009
+ if (interceptingRoute === "/") {
1010
+ throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..) marker at the root level, use (.) instead."), "__NEXT_ERROR_CODE", {
1011
+ value: "E207",
1012
+ enumerable: false,
1013
+ configurable: true
1014
+ });
1015
+ }
1016
+ interceptedRoute = interceptingRoute.split("/").slice(0, -1).concat(interceptedRoute).join("/");
1017
+ break;
1018
+ case "(...)":
1019
+ interceptedRoute = "/" + interceptedRoute;
1020
+ break;
1021
+ case "(..)(..)":
1022
+ const splitInterceptingRoute = interceptingRoute.split("/");
1023
+ if (splitInterceptingRoute.length <= 2) {
1024
+ throw Object.defineProperty(new Error("Invalid interception route: " + path + ". Cannot use (..)(..) marker at the root level or one level up."), "__NEXT_ERROR_CODE", {
1025
+ value: "E486",
1026
+ enumerable: false,
1027
+ configurable: true
1028
+ });
1029
+ }
1030
+ interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join("/");
1031
+ break;
1032
+ default:
1033
+ throw Object.defineProperty(new Error("Invariant: unexpected marker"), "__NEXT_ERROR_CODE", {
1034
+ value: "E112",
1035
+ enumerable: false,
1036
+ configurable: true
1037
+ });
1038
+ }
1039
+ return {
1040
+ interceptingRoute,
1041
+ interceptedRoute
1042
+ };
1043
+ }
1044
+ }
1045
+ });
1046
+
1047
+ // node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
1048
+ var require_is_dynamic = __commonJS({
1049
+ "node_modules/next/dist/shared/lib/router/utils/is-dynamic.js"(exports2) {
1050
+ "use strict";
1051
+ Object.defineProperty(exports2, "__esModule", {
1052
+ value: true
1053
+ });
1054
+ Object.defineProperty(exports2, "isDynamicRoute", {
1055
+ enumerable: true,
1056
+ get: function() {
1057
+ return isDynamicRoute;
1058
+ }
1059
+ });
1060
+ var _interceptionroutes = require_interception_routes();
1061
+ var TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
1062
+ var TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
1063
+ function isDynamicRoute(route, strict) {
1064
+ if (strict === void 0) strict = true;
1065
+ if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) {
1066
+ route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
1067
+ }
1068
+ if (strict) {
1069
+ return TEST_STRICT_ROUTE.test(route);
1070
+ }
1071
+ return TEST_ROUTE.test(route);
1072
+ }
1073
+ }
1074
+ });
1075
+
1076
+ // node_modules/next/dist/shared/lib/router/utils/index.js
1077
+ var require_utils2 = __commonJS({
1078
+ "node_modules/next/dist/shared/lib/router/utils/index.js"(exports2) {
1079
+ "use strict";
1080
+ Object.defineProperty(exports2, "__esModule", {
1081
+ value: true
1082
+ });
1083
+ function _export(target, all) {
1084
+ for (var name in all) Object.defineProperty(target, name, {
1085
+ enumerable: true,
1086
+ get: all[name]
1087
+ });
1088
+ }
1089
+ _export(exports2, {
1090
+ getSortedRouteObjects: function() {
1091
+ return _sortedroutes.getSortedRouteObjects;
1092
+ },
1093
+ getSortedRoutes: function() {
1094
+ return _sortedroutes.getSortedRoutes;
1095
+ },
1096
+ isDynamicRoute: function() {
1097
+ return _isdynamic.isDynamicRoute;
1098
+ }
1099
+ });
1100
+ var _sortedroutes = require_sorted_routes();
1101
+ var _isdynamic = require_is_dynamic();
1102
+ }
1103
+ });
1104
+
1105
+ // node_modules/next/dist/compiled/path-to-regexp/index.js
1106
+ var require_path_to_regexp = __commonJS({
1107
+ "node_modules/next/dist/compiled/path-to-regexp/index.js"(exports2, module2) {
1108
+ (() => {
1109
+ "use strict";
1110
+ if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
1111
+ var e = {};
1112
+ (() => {
1113
+ var n = e;
1114
+ Object.defineProperty(n, "__esModule", { value: true });
1115
+ n.pathToRegexp = n.tokensToRegexp = n.regexpToFunction = n.match = n.tokensToFunction = n.compile = n.parse = void 0;
1116
+ function lexer(e2) {
1117
+ var n2 = [];
1118
+ var r = 0;
1119
+ while (r < e2.length) {
1120
+ var t = e2[r];
1121
+ if (t === "*" || t === "+" || t === "?") {
1122
+ n2.push({ type: "MODIFIER", index: r, value: e2[r++] });
1123
+ continue;
1124
+ }
1125
+ if (t === "\\") {
1126
+ n2.push({ type: "ESCAPED_CHAR", index: r++, value: e2[r++] });
1127
+ continue;
1128
+ }
1129
+ if (t === "{") {
1130
+ n2.push({ type: "OPEN", index: r, value: e2[r++] });
1131
+ continue;
1132
+ }
1133
+ if (t === "}") {
1134
+ n2.push({ type: "CLOSE", index: r, value: e2[r++] });
1135
+ continue;
1136
+ }
1137
+ if (t === ":") {
1138
+ var a = "";
1139
+ var i = r + 1;
1140
+ while (i < e2.length) {
1141
+ var o = e2.charCodeAt(i);
1142
+ if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
1143
+ a += e2[i++];
1144
+ continue;
1145
+ }
1146
+ break;
1147
+ }
1148
+ if (!a) throw new TypeError("Missing parameter name at ".concat(r));
1149
+ n2.push({ type: "NAME", index: r, value: a });
1150
+ r = i;
1151
+ continue;
1152
+ }
1153
+ if (t === "(") {
1154
+ var c = 1;
1155
+ var f = "";
1156
+ var i = r + 1;
1157
+ if (e2[i] === "?") {
1158
+ throw new TypeError('Pattern cannot start with "?" at '.concat(i));
1159
+ }
1160
+ while (i < e2.length) {
1161
+ if (e2[i] === "\\") {
1162
+ f += e2[i++] + e2[i++];
1163
+ continue;
1164
+ }
1165
+ if (e2[i] === ")") {
1166
+ c--;
1167
+ if (c === 0) {
1168
+ i++;
1169
+ break;
1170
+ }
1171
+ } else if (e2[i] === "(") {
1172
+ c++;
1173
+ if (e2[i + 1] !== "?") {
1174
+ throw new TypeError("Capturing groups are not allowed at ".concat(i));
1175
+ }
1176
+ }
1177
+ f += e2[i++];
1178
+ }
1179
+ if (c) throw new TypeError("Unbalanced pattern at ".concat(r));
1180
+ if (!f) throw new TypeError("Missing pattern at ".concat(r));
1181
+ n2.push({ type: "PATTERN", index: r, value: f });
1182
+ r = i;
1183
+ continue;
1184
+ }
1185
+ n2.push({ type: "CHAR", index: r, value: e2[r++] });
1186
+ }
1187
+ n2.push({ type: "END", index: r, value: "" });
1188
+ return n2;
1189
+ }
1190
+ function parse(e2, n2) {
1191
+ if (n2 === void 0) {
1192
+ n2 = {};
1193
+ }
1194
+ var r = lexer(e2);
1195
+ var t = n2.prefixes, a = t === void 0 ? "./" : t, i = n2.delimiter, o = i === void 0 ? "/#?" : i;
1196
+ var c = [];
1197
+ var f = 0;
1198
+ var u = 0;
1199
+ var p = "";
1200
+ var tryConsume = function(e3) {
1201
+ if (u < r.length && r[u].type === e3) return r[u++].value;
1202
+ };
1203
+ var mustConsume = function(e3) {
1204
+ var n3 = tryConsume(e3);
1205
+ if (n3 !== void 0) return n3;
1206
+ var t2 = r[u], a2 = t2.type, i2 = t2.index;
1207
+ throw new TypeError("Unexpected ".concat(a2, " at ").concat(i2, ", expected ").concat(e3));
1208
+ };
1209
+ var consumeText = function() {
1210
+ var e3 = "";
1211
+ var n3;
1212
+ while (n3 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
1213
+ e3 += n3;
1214
+ }
1215
+ return e3;
1216
+ };
1217
+ var isSafe = function(e3) {
1218
+ for (var n3 = 0, r2 = o; n3 < r2.length; n3++) {
1219
+ var t2 = r2[n3];
1220
+ if (e3.indexOf(t2) > -1) return true;
1221
+ }
1222
+ return false;
1223
+ };
1224
+ var safePattern = function(e3) {
1225
+ var n3 = c[c.length - 1];
1226
+ var r2 = e3 || (n3 && typeof n3 === "string" ? n3 : "");
1227
+ if (n3 && !r2) {
1228
+ throw new TypeError('Must have text between two parameters, missing text after "'.concat(n3.name, '"'));
1229
+ }
1230
+ if (!r2 || isSafe(r2)) return "[^".concat(escapeString(o), "]+?");
1231
+ return "(?:(?!".concat(escapeString(r2), ")[^").concat(escapeString(o), "])+?");
1232
+ };
1233
+ while (u < r.length) {
1234
+ var v = tryConsume("CHAR");
1235
+ var s = tryConsume("NAME");
1236
+ var d = tryConsume("PATTERN");
1237
+ if (s || d) {
1238
+ var g = v || "";
1239
+ if (a.indexOf(g) === -1) {
1240
+ p += g;
1241
+ g = "";
1242
+ }
1243
+ if (p) {
1244
+ c.push(p);
1245
+ p = "";
1246
+ }
1247
+ c.push({ name: s || f++, prefix: g, suffix: "", pattern: d || safePattern(g), modifier: tryConsume("MODIFIER") || "" });
1248
+ continue;
1249
+ }
1250
+ var x = v || tryConsume("ESCAPED_CHAR");
1251
+ if (x) {
1252
+ p += x;
1253
+ continue;
1254
+ }
1255
+ if (p) {
1256
+ c.push(p);
1257
+ p = "";
1258
+ }
1259
+ var h = tryConsume("OPEN");
1260
+ if (h) {
1261
+ var g = consumeText();
1262
+ var l = tryConsume("NAME") || "";
1263
+ var m = tryConsume("PATTERN") || "";
1264
+ var T = consumeText();
1265
+ mustConsume("CLOSE");
1266
+ c.push({ name: l || (m ? f++ : ""), pattern: l && !m ? safePattern(g) : m, prefix: g, suffix: T, modifier: tryConsume("MODIFIER") || "" });
1267
+ continue;
1268
+ }
1269
+ mustConsume("END");
1270
+ }
1271
+ return c;
1272
+ }
1273
+ n.parse = parse;
1274
+ function compile(e2, n2) {
1275
+ return tokensToFunction(parse(e2, n2), n2);
1276
+ }
1277
+ n.compile = compile;
1278
+ function tokensToFunction(e2, n2) {
1279
+ if (n2 === void 0) {
1280
+ n2 = {};
1281
+ }
1282
+ var r = flags(n2);
1283
+ var t = n2.encode, a = t === void 0 ? function(e3) {
1284
+ return e3;
1285
+ } : t, i = n2.validate, o = i === void 0 ? true : i;
1286
+ var c = e2.map(function(e3) {
1287
+ if (typeof e3 === "object") {
1288
+ return new RegExp("^(?:".concat(e3.pattern, ")$"), r);
1289
+ }
1290
+ });
1291
+ return function(n3) {
1292
+ var r2 = "";
1293
+ for (var t2 = 0; t2 < e2.length; t2++) {
1294
+ var i2 = e2[t2];
1295
+ if (typeof i2 === "string") {
1296
+ r2 += i2;
1297
+ continue;
1298
+ }
1299
+ var f = n3 ? n3[i2.name] : void 0;
1300
+ var u = i2.modifier === "?" || i2.modifier === "*";
1301
+ var p = i2.modifier === "*" || i2.modifier === "+";
1302
+ if (Array.isArray(f)) {
1303
+ if (!p) {
1304
+ throw new TypeError('Expected "'.concat(i2.name, '" to not repeat, but got an array'));
1305
+ }
1306
+ if (f.length === 0) {
1307
+ if (u) continue;
1308
+ throw new TypeError('Expected "'.concat(i2.name, '" to not be empty'));
1309
+ }
1310
+ for (var v = 0; v < f.length; v++) {
1311
+ var s = a(f[v], i2);
1312
+ if (o && !c[t2].test(s)) {
1313
+ throw new TypeError('Expected all "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1314
+ }
1315
+ r2 += i2.prefix + s + i2.suffix;
1316
+ }
1317
+ continue;
1318
+ }
1319
+ if (typeof f === "string" || typeof f === "number") {
1320
+ var s = a(String(f), i2);
1321
+ if (o && !c[t2].test(s)) {
1322
+ throw new TypeError('Expected "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1323
+ }
1324
+ r2 += i2.prefix + s + i2.suffix;
1325
+ continue;
1326
+ }
1327
+ if (u) continue;
1328
+ var d = p ? "an array" : "a string";
1329
+ throw new TypeError('Expected "'.concat(i2.name, '" to be ').concat(d));
1330
+ }
1331
+ return r2;
1332
+ };
1333
+ }
1334
+ n.tokensToFunction = tokensToFunction;
1335
+ function match(e2, n2) {
1336
+ var r = [];
1337
+ var t = pathToRegexp(e2, r, n2);
1338
+ return regexpToFunction(t, r, n2);
1339
+ }
1340
+ n.match = match;
1341
+ function regexpToFunction(e2, n2, r) {
1342
+ if (r === void 0) {
1343
+ r = {};
1344
+ }
1345
+ var t = r.decode, a = t === void 0 ? function(e3) {
1346
+ return e3;
1347
+ } : t;
1348
+ return function(r2) {
1349
+ var t2 = e2.exec(r2);
1350
+ if (!t2) return false;
1351
+ var i = t2[0], o = t2.index;
1352
+ var c = /* @__PURE__ */ Object.create(null);
1353
+ var _loop_1 = function(e3) {
1354
+ if (t2[e3] === void 0) return "continue";
1355
+ var r3 = n2[e3 - 1];
1356
+ if (r3.modifier === "*" || r3.modifier === "+") {
1357
+ c[r3.name] = t2[e3].split(r3.prefix + r3.suffix).map(function(e4) {
1358
+ return a(e4, r3);
1359
+ });
1360
+ } else {
1361
+ c[r3.name] = a(t2[e3], r3);
1362
+ }
1363
+ };
1364
+ for (var f = 1; f < t2.length; f++) {
1365
+ _loop_1(f);
1366
+ }
1367
+ return { path: i, index: o, params: c };
1368
+ };
1369
+ }
1370
+ n.regexpToFunction = regexpToFunction;
1371
+ function escapeString(e2) {
1372
+ return e2.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
1373
+ }
1374
+ function flags(e2) {
1375
+ return e2 && e2.sensitive ? "" : "i";
1376
+ }
1377
+ function regexpToRegexp(e2, n2) {
1378
+ if (!n2) return e2;
1379
+ var r = /\((?:\?<(.*?)>)?(?!\?)/g;
1380
+ var t = 0;
1381
+ var a = r.exec(e2.source);
1382
+ while (a) {
1383
+ n2.push({ name: a[1] || t++, prefix: "", suffix: "", modifier: "", pattern: "" });
1384
+ a = r.exec(e2.source);
1385
+ }
1386
+ return e2;
1387
+ }
1388
+ function arrayToRegexp(e2, n2, r) {
1389
+ var t = e2.map(function(e3) {
1390
+ return pathToRegexp(e3, n2, r).source;
1391
+ });
1392
+ return new RegExp("(?:".concat(t.join("|"), ")"), flags(r));
1393
+ }
1394
+ function stringToRegexp(e2, n2, r) {
1395
+ return tokensToRegexp(parse(e2, r), n2, r);
1396
+ }
1397
+ function tokensToRegexp(e2, n2, r) {
1398
+ if (r === void 0) {
1399
+ r = {};
1400
+ }
1401
+ var t = r.strict, a = t === void 0 ? false : t, i = r.start, o = i === void 0 ? true : i, c = r.end, f = c === void 0 ? true : c, u = r.encode, p = u === void 0 ? function(e3) {
1402
+ return e3;
1403
+ } : u, v = r.delimiter, s = v === void 0 ? "/#?" : v, d = r.endsWith, g = d === void 0 ? "" : d;
1404
+ var x = "[".concat(escapeString(g), "]|$");
1405
+ var h = "[".concat(escapeString(s), "]");
1406
+ var l = o ? "^" : "";
1407
+ for (var m = 0, T = e2; m < T.length; m++) {
1408
+ var E = T[m];
1409
+ if (typeof E === "string") {
1410
+ l += escapeString(p(E));
1411
+ } else {
1412
+ var w = escapeString(p(E.prefix));
1413
+ var y = escapeString(p(E.suffix));
1414
+ if (E.pattern) {
1415
+ if (n2) n2.push(E);
1416
+ if (w || y) {
1417
+ if (E.modifier === "+" || E.modifier === "*") {
1418
+ var R = E.modifier === "*" ? "?" : "";
1419
+ l += "(?:".concat(w, "((?:").concat(E.pattern, ")(?:").concat(y).concat(w, "(?:").concat(E.pattern, "))*)").concat(y, ")").concat(R);
1420
+ } else {
1421
+ l += "(?:".concat(w, "(").concat(E.pattern, ")").concat(y, ")").concat(E.modifier);
1422
+ }
1423
+ } else {
1424
+ if (E.modifier === "+" || E.modifier === "*") {
1425
+ throw new TypeError('Can not repeat "'.concat(E.name, '" without a prefix and suffix'));
1426
+ }
1427
+ l += "(".concat(E.pattern, ")").concat(E.modifier);
1428
+ }
1429
+ } else {
1430
+ l += "(?:".concat(w).concat(y, ")").concat(E.modifier);
1431
+ }
1432
+ }
1433
+ }
1434
+ if (f) {
1435
+ if (!a) l += "".concat(h, "?");
1436
+ l += !r.endsWith ? "$" : "(?=".concat(x, ")");
1437
+ } else {
1438
+ var A = e2[e2.length - 1];
1439
+ var _ = typeof A === "string" ? h.indexOf(A[A.length - 1]) > -1 : A === void 0;
1440
+ if (!a) {
1441
+ l += "(?:".concat(h, "(?=").concat(x, "))?");
1442
+ }
1443
+ if (!_) {
1444
+ l += "(?=".concat(h, "|").concat(x, ")");
1445
+ }
1446
+ }
1447
+ return new RegExp(l, flags(r));
1448
+ }
1449
+ n.tokensToRegexp = tokensToRegexp;
1450
+ function pathToRegexp(e2, n2, r) {
1451
+ if (e2 instanceof RegExp) return regexpToRegexp(e2, n2);
1452
+ if (Array.isArray(e2)) return arrayToRegexp(e2, n2, r);
1453
+ return stringToRegexp(e2, n2, r);
1454
+ }
1455
+ n.pathToRegexp = pathToRegexp;
1456
+ })();
1457
+ module2.exports = e;
1458
+ })();
1459
+ }
1460
+ });
1461
+
1462
+ // node_modules/next/dist/lib/route-pattern-normalizer.js
1463
+ var require_route_pattern_normalizer = __commonJS({
1464
+ "node_modules/next/dist/lib/route-pattern-normalizer.js"(exports2) {
1465
+ "use strict";
1466
+ Object.defineProperty(exports2, "__esModule", {
1467
+ value: true
1468
+ });
1469
+ function _export(target, all) {
1470
+ for (var name in all) Object.defineProperty(target, name, {
1471
+ enumerable: true,
1472
+ get: all[name]
1473
+ });
1474
+ }
1475
+ _export(exports2, {
1476
+ hasAdjacentParameterIssues: function() {
1477
+ return hasAdjacentParameterIssues;
1478
+ },
1479
+ normalizeAdjacentParameters: function() {
1480
+ return normalizeAdjacentParameters;
1481
+ },
1482
+ normalizeTokensForRegexp: function() {
1483
+ return normalizeTokensForRegexp;
1484
+ },
1485
+ stripParameterSeparators: function() {
1486
+ return stripParameterSeparators;
1487
+ }
1488
+ });
1489
+ var PARAM_SEPARATOR = "_NEXTSEP_";
1490
+ function hasAdjacentParameterIssues(route) {
1491
+ if (typeof route !== "string") return false;
1492
+ if (/\/\(\.{1,3}\):[^/\s]+/.test(route)) {
1493
+ return true;
1494
+ }
1495
+ if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {
1496
+ return true;
1497
+ }
1498
+ return false;
1499
+ }
1500
+ function normalizeAdjacentParameters(route) {
1501
+ let normalized = route;
1502
+ normalized = normalized.replace(/(\([^)]*\)):([^/\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);
1503
+ normalized = normalized.replace(/:([^:/\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);
1504
+ return normalized;
1505
+ }
1506
+ function normalizeTokensForRegexp(tokens) {
1507
+ return tokens.map((token) => {
1508
+ if (typeof token === "object" && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)
1509
+ "modifier" in token && // Only repeating modifiers (* or +) cause the validation error
1510
+ // Other modifiers like '?' (optional) are fine
1511
+ (token.modifier === "*" || token.modifier === "+") && // Token objects can have different shapes depending on route pattern
1512
+ "prefix" in token && "suffix" in token && // Both prefix and suffix must be empty strings
1513
+ // This is what causes the validation error in path-to-regexp
1514
+ token.prefix === "" && token.suffix === "") {
1515
+ return {
1516
+ ...token,
1517
+ prefix: "/"
1518
+ };
1519
+ }
1520
+ return token;
1521
+ });
1522
+ }
1523
+ function stripParameterSeparators(params) {
1524
+ const cleaned = {};
1525
+ for (const [key, value] of Object.entries(params)) {
1526
+ if (typeof value === "string") {
1527
+ cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), "");
1528
+ } else if (Array.isArray(value)) {
1529
+ cleaned[key] = value.map((item) => typeof item === "string" ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), "") : item);
1530
+ } else {
1531
+ cleaned[key] = value;
1532
+ }
1533
+ }
1534
+ return cleaned;
1535
+ }
1536
+ }
1537
+ });
1538
+
1539
+ // node_modules/next/dist/shared/lib/router/utils/route-match-utils.js
1540
+ var require_route_match_utils = __commonJS({
1541
+ "node_modules/next/dist/shared/lib/router/utils/route-match-utils.js"(exports2) {
1542
+ "use strict";
1543
+ Object.defineProperty(exports2, "__esModule", {
1544
+ value: true
1545
+ });
1546
+ function _export(target, all) {
1547
+ for (var name in all) Object.defineProperty(target, name, {
1548
+ enumerable: true,
1549
+ get: all[name]
1550
+ });
1551
+ }
1552
+ _export(exports2, {
1553
+ safeCompile: function() {
1554
+ return safeCompile;
1555
+ },
1556
+ safePathToRegexp: function() {
1557
+ return safePathToRegexp;
1558
+ },
1559
+ safeRegexpToFunction: function() {
1560
+ return safeRegexpToFunction;
1561
+ },
1562
+ safeRouteMatcher: function() {
1563
+ return safeRouteMatcher;
1564
+ }
1565
+ });
1566
+ var _pathtoregexp = require_path_to_regexp();
1567
+ var _routepatternnormalizer = require_route_pattern_normalizer();
1568
+ function safePathToRegexp(route, keys, options) {
1569
+ if (typeof route !== "string") {
1570
+ return (0, _pathtoregexp.pathToRegexp)(route, keys, options);
1571
+ }
1572
+ const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
1573
+ const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
1574
+ try {
1575
+ return (0, _pathtoregexp.pathToRegexp)(routeToUse, keys, options);
1576
+ } catch (error) {
1577
+ if (!needsNormalization) {
1578
+ try {
1579
+ const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
1580
+ return (0, _pathtoregexp.pathToRegexp)(normalizedRoute, keys, options);
1581
+ } catch (retryError) {
1582
+ throw error;
1583
+ }
1584
+ }
1585
+ throw error;
1586
+ }
1587
+ }
1588
+ function safeCompile(route, options) {
1589
+ const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
1590
+ const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
1591
+ try {
1592
+ return (0, _pathtoregexp.compile)(routeToUse, options);
1593
+ } catch (error) {
1594
+ if (!needsNormalization) {
1595
+ try {
1596
+ const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
1597
+ return (0, _pathtoregexp.compile)(normalizedRoute, options);
1598
+ } catch (retryError) {
1599
+ throw error;
1600
+ }
1601
+ }
1602
+ throw error;
1603
+ }
1604
+ }
1605
+ function safeRegexpToFunction(regexp, keys) {
1606
+ const originalMatcher = (0, _pathtoregexp.regexpToFunction)(regexp, keys || []);
1607
+ return (pathname) => {
1608
+ const result = originalMatcher(pathname);
1609
+ if (!result) return false;
1610
+ return {
1611
+ ...result,
1612
+ params: (0, _routepatternnormalizer.stripParameterSeparators)(result.params)
1613
+ };
1614
+ };
1615
+ }
1616
+ function safeRouteMatcher(matcherFn) {
1617
+ return (pathname) => {
1618
+ const result = matcherFn(pathname);
1619
+ if (!result) return false;
1620
+ return (0, _routepatternnormalizer.stripParameterSeparators)(result);
1621
+ };
1622
+ }
1623
+ }
1624
+ });
1625
+
1626
+ // node_modules/next/dist/shared/lib/router/utils/route-matcher.js
1627
+ var require_route_matcher = __commonJS({
1628
+ "node_modules/next/dist/shared/lib/router/utils/route-matcher.js"(exports2) {
1629
+ "use strict";
1630
+ Object.defineProperty(exports2, "__esModule", {
1631
+ value: true
1632
+ });
1633
+ Object.defineProperty(exports2, "getRouteMatcher", {
1634
+ enumerable: true,
1635
+ get: function() {
1636
+ return getRouteMatcher;
1637
+ }
1638
+ });
1639
+ var _utils = require_utils();
1640
+ var _routematchutils = require_route_match_utils();
1641
+ function getRouteMatcher(param) {
1642
+ let { re, groups } = param;
1643
+ const rawMatcher = (pathname) => {
1644
+ const routeMatch = re.exec(pathname);
1645
+ if (!routeMatch) return false;
1646
+ const decode = (param2) => {
1647
+ try {
1648
+ return decodeURIComponent(param2);
1649
+ } catch (e) {
1650
+ throw Object.defineProperty(new _utils.DecodeError("failed to decode param"), "__NEXT_ERROR_CODE", {
1651
+ value: "E528",
1652
+ enumerable: false,
1653
+ configurable: true
1654
+ });
1655
+ }
1656
+ };
1657
+ const params = {};
1658
+ for (const [key, group] of Object.entries(groups)) {
1659
+ const match = routeMatch[group.pos];
1660
+ if (match !== void 0) {
1661
+ if (group.repeat) {
1662
+ params[key] = match.split("/").map((entry) => decode(entry));
1663
+ } else {
1664
+ params[key] = decode(match);
1665
+ }
1666
+ }
1667
+ }
1668
+ return params;
1669
+ };
1670
+ return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
1671
+ }
1672
+ }
1673
+ });
1674
+
1675
+ // node_modules/next/dist/lib/constants.js
1676
+ var require_constants = __commonJS({
1677
+ "node_modules/next/dist/lib/constants.js"(exports2) {
1678
+ "use strict";
1679
+ Object.defineProperty(exports2, "__esModule", {
1680
+ value: true
1681
+ });
1682
+ function _export(target, all) {
1683
+ for (var name in all) Object.defineProperty(target, name, {
1684
+ enumerable: true,
1685
+ get: all[name]
1686
+ });
1687
+ }
1688
+ _export(exports2, {
1689
+ ACTION_SUFFIX: function() {
1690
+ return ACTION_SUFFIX;
1691
+ },
1692
+ APP_DIR_ALIAS: function() {
1693
+ return APP_DIR_ALIAS;
1694
+ },
1695
+ CACHE_ONE_YEAR: function() {
1696
+ return CACHE_ONE_YEAR;
1697
+ },
1698
+ DOT_NEXT_ALIAS: function() {
1699
+ return DOT_NEXT_ALIAS;
1700
+ },
1701
+ ESLINT_DEFAULT_DIRS: function() {
1702
+ return ESLINT_DEFAULT_DIRS;
1703
+ },
1704
+ GSP_NO_RETURNED_VALUE: function() {
1705
+ return GSP_NO_RETURNED_VALUE;
1706
+ },
1707
+ GSSP_COMPONENT_MEMBER_ERROR: function() {
1708
+ return GSSP_COMPONENT_MEMBER_ERROR;
1709
+ },
1710
+ GSSP_NO_RETURNED_VALUE: function() {
1711
+ return GSSP_NO_RETURNED_VALUE;
1712
+ },
1713
+ HTML_CONTENT_TYPE_HEADER: function() {
1714
+ return HTML_CONTENT_TYPE_HEADER;
1715
+ },
1716
+ INFINITE_CACHE: function() {
1717
+ return INFINITE_CACHE;
1718
+ },
1719
+ INSTRUMENTATION_HOOK_FILENAME: function() {
1720
+ return INSTRUMENTATION_HOOK_FILENAME;
1721
+ },
1722
+ JSON_CONTENT_TYPE_HEADER: function() {
1723
+ return JSON_CONTENT_TYPE_HEADER;
1724
+ },
1725
+ MATCHED_PATH_HEADER: function() {
1726
+ return MATCHED_PATH_HEADER;
1727
+ },
1728
+ MIDDLEWARE_FILENAME: function() {
1729
+ return MIDDLEWARE_FILENAME;
1730
+ },
1731
+ MIDDLEWARE_LOCATION_REGEXP: function() {
1732
+ return MIDDLEWARE_LOCATION_REGEXP;
1733
+ },
1734
+ NEXT_BODY_SUFFIX: function() {
1735
+ return NEXT_BODY_SUFFIX;
1736
+ },
1737
+ NEXT_CACHE_IMPLICIT_TAG_ID: function() {
1738
+ return NEXT_CACHE_IMPLICIT_TAG_ID;
1739
+ },
1740
+ NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
1741
+ return NEXT_CACHE_REVALIDATED_TAGS_HEADER;
1742
+ },
1743
+ NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
1744
+ return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
1745
+ },
1746
+ NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
1747
+ return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
1748
+ },
1749
+ NEXT_CACHE_TAGS_HEADER: function() {
1750
+ return NEXT_CACHE_TAGS_HEADER;
1751
+ },
1752
+ NEXT_CACHE_TAG_MAX_ITEMS: function() {
1753
+ return NEXT_CACHE_TAG_MAX_ITEMS;
1754
+ },
1755
+ NEXT_CACHE_TAG_MAX_LENGTH: function() {
1756
+ return NEXT_CACHE_TAG_MAX_LENGTH;
1757
+ },
1758
+ NEXT_DATA_SUFFIX: function() {
1759
+ return NEXT_DATA_SUFFIX;
1760
+ },
1761
+ NEXT_INTERCEPTION_MARKER_PREFIX: function() {
1762
+ return NEXT_INTERCEPTION_MARKER_PREFIX;
1763
+ },
1764
+ NEXT_META_SUFFIX: function() {
1765
+ return NEXT_META_SUFFIX;
1766
+ },
1767
+ NEXT_QUERY_PARAM_PREFIX: function() {
1768
+ return NEXT_QUERY_PARAM_PREFIX;
1769
+ },
1770
+ NEXT_RESUME_HEADER: function() {
1771
+ return NEXT_RESUME_HEADER;
1772
+ },
1773
+ NON_STANDARD_NODE_ENV: function() {
1774
+ return NON_STANDARD_NODE_ENV;
1775
+ },
1776
+ PAGES_DIR_ALIAS: function() {
1777
+ return PAGES_DIR_ALIAS;
1778
+ },
1779
+ PRERENDER_REVALIDATE_HEADER: function() {
1780
+ return PRERENDER_REVALIDATE_HEADER;
1781
+ },
1782
+ PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
1783
+ return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;
1784
+ },
1785
+ PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
1786
+ return PUBLIC_DIR_MIDDLEWARE_CONFLICT;
1787
+ },
1788
+ ROOT_DIR_ALIAS: function() {
1789
+ return ROOT_DIR_ALIAS;
1790
+ },
1791
+ RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
1792
+ return RSC_ACTION_CLIENT_WRAPPER_ALIAS;
1793
+ },
1794
+ RSC_ACTION_ENCRYPTION_ALIAS: function() {
1795
+ return RSC_ACTION_ENCRYPTION_ALIAS;
1796
+ },
1797
+ RSC_ACTION_PROXY_ALIAS: function() {
1798
+ return RSC_ACTION_PROXY_ALIAS;
1799
+ },
1800
+ RSC_ACTION_VALIDATE_ALIAS: function() {
1801
+ return RSC_ACTION_VALIDATE_ALIAS;
1802
+ },
1803
+ RSC_CACHE_WRAPPER_ALIAS: function() {
1804
+ return RSC_CACHE_WRAPPER_ALIAS;
1805
+ },
1806
+ RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() {
1807
+ return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS;
1808
+ },
1809
+ RSC_MOD_REF_PROXY_ALIAS: function() {
1810
+ return RSC_MOD_REF_PROXY_ALIAS;
1811
+ },
1812
+ RSC_PREFETCH_SUFFIX: function() {
1813
+ return RSC_PREFETCH_SUFFIX;
1814
+ },
1815
+ RSC_SEGMENTS_DIR_SUFFIX: function() {
1816
+ return RSC_SEGMENTS_DIR_SUFFIX;
1817
+ },
1818
+ RSC_SEGMENT_SUFFIX: function() {
1819
+ return RSC_SEGMENT_SUFFIX;
1820
+ },
1821
+ RSC_SUFFIX: function() {
1822
+ return RSC_SUFFIX;
1823
+ },
1824
+ SERVER_PROPS_EXPORT_ERROR: function() {
1825
+ return SERVER_PROPS_EXPORT_ERROR;
1826
+ },
1827
+ SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
1828
+ return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
1829
+ },
1830
+ SERVER_PROPS_SSG_CONFLICT: function() {
1831
+ return SERVER_PROPS_SSG_CONFLICT;
1832
+ },
1833
+ SERVER_RUNTIME: function() {
1834
+ return SERVER_RUNTIME;
1835
+ },
1836
+ SSG_FALLBACK_EXPORT_ERROR: function() {
1837
+ return SSG_FALLBACK_EXPORT_ERROR;
1838
+ },
1839
+ SSG_GET_INITIAL_PROPS_CONFLICT: function() {
1840
+ return SSG_GET_INITIAL_PROPS_CONFLICT;
1841
+ },
1842
+ STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
1843
+ return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
1844
+ },
1845
+ TEXT_PLAIN_CONTENT_TYPE_HEADER: function() {
1846
+ return TEXT_PLAIN_CONTENT_TYPE_HEADER;
1847
+ },
1848
+ UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
1849
+ return UNSTABLE_REVALIDATE_RENAME_ERROR;
1850
+ },
1851
+ WEBPACK_LAYERS: function() {
1852
+ return WEBPACK_LAYERS;
1853
+ },
1854
+ WEBPACK_RESOURCE_QUERIES: function() {
1855
+ return WEBPACK_RESOURCE_QUERIES;
1856
+ }
1857
+ });
1858
+ var TEXT_PLAIN_CONTENT_TYPE_HEADER = "text/plain";
1859
+ var HTML_CONTENT_TYPE_HEADER = "text/html; charset=utf-8";
1860
+ var JSON_CONTENT_TYPE_HEADER = "application/json; charset=utf-8";
1861
+ var NEXT_QUERY_PARAM_PREFIX = "nxtP";
1862
+ var NEXT_INTERCEPTION_MARKER_PREFIX = "nxtI";
1863
+ var MATCHED_PATH_HEADER = "x-matched-path";
1864
+ var PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
1865
+ var PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
1866
+ var RSC_PREFETCH_SUFFIX = ".prefetch.rsc";
1867
+ var RSC_SEGMENTS_DIR_SUFFIX = ".segments";
1868
+ var RSC_SEGMENT_SUFFIX = ".segment.rsc";
1869
+ var RSC_SUFFIX = ".rsc";
1870
+ var ACTION_SUFFIX = ".action";
1871
+ var NEXT_DATA_SUFFIX = ".json";
1872
+ var NEXT_META_SUFFIX = ".meta";
1873
+ var NEXT_BODY_SUFFIX = ".body";
1874
+ var NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
1875
+ var NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
1876
+ var NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
1877
+ var NEXT_RESUME_HEADER = "next-resume";
1878
+ var NEXT_CACHE_TAG_MAX_ITEMS = 128;
1879
+ var NEXT_CACHE_TAG_MAX_LENGTH = 256;
1880
+ var NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
1881
+ var NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
1882
+ var CACHE_ONE_YEAR = 31536e3;
1883
+ var INFINITE_CACHE = 4294967294;
1884
+ var MIDDLEWARE_FILENAME = "middleware";
1885
+ var MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
1886
+ var INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
1887
+ var PAGES_DIR_ALIAS = "private-next-pages";
1888
+ var DOT_NEXT_ALIAS = "private-dot-next";
1889
+ var ROOT_DIR_ALIAS = "private-next-root-dir";
1890
+ var APP_DIR_ALIAS = "private-next-app-dir";
1891
+ var RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
1892
+ var RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
1893
+ var RSC_ACTION_PROXY_ALIAS = "private-next-rsc-server-reference";
1894
+ var RSC_CACHE_WRAPPER_ALIAS = "private-next-rsc-cache-wrapper";
1895
+ var RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = "private-next-rsc-track-dynamic-import";
1896
+ var RSC_ACTION_ENCRYPTION_ALIAS = "private-next-rsc-action-encryption";
1897
+ var RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
1898
+ var PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;
1899
+ var SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
1900
+ var SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
1901
+ var SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
1902
+ var STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
1903
+ var SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
1904
+ var GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
1905
+ var GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
1906
+ var UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.";
1907
+ var GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;
1908
+ var NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;
1909
+ var SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;
1910
+ var ESLINT_DEFAULT_DIRS = [
1911
+ "app",
1912
+ "pages",
1913
+ "components",
1914
+ "lib",
1915
+ "src"
1916
+ ];
1917
+ var SERVER_RUNTIME = {
1918
+ edge: "edge",
1919
+ experimentalEdge: "experimental-edge",
1920
+ nodejs: "nodejs"
1921
+ };
1922
+ var WEBPACK_LAYERS_NAMES = {
1923
+ /**
1924
+ * The layer for the shared code between the client and server bundles.
1925
+ */
1926
+ shared: "shared",
1927
+ /**
1928
+ * The layer for server-only runtime and picking up `react-server` export conditions.
1929
+ * Including app router RSC pages and app router custom routes and metadata routes.
1930
+ */
1931
+ reactServerComponents: "rsc",
1932
+ /**
1933
+ * Server Side Rendering layer for app (ssr).
1934
+ */
1935
+ serverSideRendering: "ssr",
1936
+ /**
1937
+ * The browser client bundle layer for actions.
1938
+ */
1939
+ actionBrowser: "action-browser",
1940
+ /**
1941
+ * The Node.js bundle layer for the API routes.
1942
+ */
1943
+ apiNode: "api-node",
1944
+ /**
1945
+ * The Edge Lite bundle layer for the API routes.
1946
+ */
1947
+ apiEdge: "api-edge",
1948
+ /**
1949
+ * The layer for the middleware code.
1950
+ */
1951
+ middleware: "middleware",
1952
+ /**
1953
+ * The layer for the instrumentation hooks.
1954
+ */
1955
+ instrument: "instrument",
1956
+ /**
1957
+ * The layer for assets on the edge.
1958
+ */
1959
+ edgeAsset: "edge-asset",
1960
+ /**
1961
+ * The browser client bundle layer for App directory.
1962
+ */
1963
+ appPagesBrowser: "app-pages-browser",
1964
+ /**
1965
+ * The browser client bundle layer for Pages directory.
1966
+ */
1967
+ pagesDirBrowser: "pages-dir-browser",
1968
+ /**
1969
+ * The Edge Lite bundle layer for Pages directory.
1970
+ */
1971
+ pagesDirEdge: "pages-dir-edge",
1972
+ /**
1973
+ * The Node.js bundle layer for Pages directory.
1974
+ */
1975
+ pagesDirNode: "pages-dir-node"
1976
+ };
1977
+ var WEBPACK_LAYERS = {
1978
+ ...WEBPACK_LAYERS_NAMES,
1979
+ GROUP: {
1980
+ builtinReact: [
1981
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
1982
+ WEBPACK_LAYERS_NAMES.actionBrowser
1983
+ ],
1984
+ serverOnly: [
1985
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
1986
+ WEBPACK_LAYERS_NAMES.actionBrowser,
1987
+ WEBPACK_LAYERS_NAMES.instrument,
1988
+ WEBPACK_LAYERS_NAMES.middleware
1989
+ ],
1990
+ neutralTarget: [
1991
+ // pages api
1992
+ WEBPACK_LAYERS_NAMES.apiNode,
1993
+ WEBPACK_LAYERS_NAMES.apiEdge
1994
+ ],
1995
+ clientOnly: [
1996
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
1997
+ WEBPACK_LAYERS_NAMES.appPagesBrowser
1998
+ ],
1999
+ bundled: [
2000
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
2001
+ WEBPACK_LAYERS_NAMES.actionBrowser,
2002
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
2003
+ WEBPACK_LAYERS_NAMES.appPagesBrowser,
2004
+ WEBPACK_LAYERS_NAMES.shared,
2005
+ WEBPACK_LAYERS_NAMES.instrument,
2006
+ WEBPACK_LAYERS_NAMES.middleware
2007
+ ],
2008
+ appPages: [
2009
+ // app router pages and layouts
2010
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
2011
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
2012
+ WEBPACK_LAYERS_NAMES.appPagesBrowser,
2013
+ WEBPACK_LAYERS_NAMES.actionBrowser
2014
+ ]
2015
+ }
2016
+ };
2017
+ var WEBPACK_RESOURCE_QUERIES = {
2018
+ edgeSSREntry: "__next_edge_ssr_entry__",
2019
+ metadata: "__next_metadata__",
2020
+ metadataRoute: "__next_metadata_route__",
2021
+ metadataImageMeta: "__next_metadata_image_meta__"
2022
+ };
2023
+ }
2024
+ });
2025
+
2026
+ // node_modules/next/dist/shared/lib/escape-regexp.js
2027
+ var require_escape_regexp = __commonJS({
2028
+ "node_modules/next/dist/shared/lib/escape-regexp.js"(exports2) {
2029
+ "use strict";
2030
+ Object.defineProperty(exports2, "__esModule", {
2031
+ value: true
2032
+ });
2033
+ Object.defineProperty(exports2, "escapeStringRegexp", {
2034
+ enumerable: true,
2035
+ get: function() {
2036
+ return escapeStringRegexp;
2037
+ }
2038
+ });
2039
+ var reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
2040
+ var reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
2041
+ function escapeStringRegexp(str) {
2042
+ if (reHasRegExp.test(str)) {
2043
+ return str.replace(reReplaceRegExp, "\\$&");
2044
+ }
2045
+ return str;
2046
+ }
2047
+ }
2048
+ });
2049
+
2050
+ // node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js
2051
+ var require_get_dynamic_param = __commonJS({
2052
+ "node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js"(exports2) {
2053
+ "use strict";
2054
+ Object.defineProperty(exports2, "__esModule", {
2055
+ value: true
2056
+ });
2057
+ function _export(target, all) {
2058
+ for (var name in all) Object.defineProperty(target, name, {
2059
+ enumerable: true,
2060
+ get: all[name]
2061
+ });
2062
+ }
2063
+ _export(exports2, {
2064
+ PARAMETER_PATTERN: function() {
2065
+ return PARAMETER_PATTERN;
2066
+ },
2067
+ getDynamicParam: function() {
2068
+ return getDynamicParam;
2069
+ },
2070
+ parseMatchedParameter: function() {
2071
+ return parseMatchedParameter;
2072
+ },
2073
+ parseParameter: function() {
2074
+ return parseParameter;
2075
+ }
2076
+ });
2077
+ function getDynamicParam(params, segmentKey, dynamicParamType, pagePath, fallbackRouteParams) {
2078
+ let value = params[segmentKey];
2079
+ if (fallbackRouteParams && fallbackRouteParams.has(segmentKey)) {
2080
+ value = fallbackRouteParams.get(segmentKey);
2081
+ } else if (Array.isArray(value)) {
2082
+ value = value.map((i) => encodeURIComponent(i));
2083
+ } else if (typeof value === "string") {
2084
+ value = encodeURIComponent(value);
2085
+ }
2086
+ if (!value) {
2087
+ const isCatchall = dynamicParamType === "c";
2088
+ const isOptionalCatchall = dynamicParamType === "oc";
2089
+ if (isCatchall || isOptionalCatchall) {
2090
+ if (isOptionalCatchall) {
2091
+ return {
2092
+ param: segmentKey,
2093
+ value: null,
2094
+ type: dynamicParamType,
2095
+ treeSegment: [
2096
+ segmentKey,
2097
+ "",
2098
+ dynamicParamType
2099
+ ]
2100
+ };
2101
+ }
2102
+ value = pagePath.split("/").slice(1).flatMap((pathSegment) => {
2103
+ const param = parseParameter(pathSegment);
2104
+ var _params_param_key;
2105
+ return (_params_param_key = params[param.key]) != null ? _params_param_key : param.key;
2106
+ });
2107
+ return {
2108
+ param: segmentKey,
2109
+ value,
2110
+ type: dynamicParamType,
2111
+ // This value always has to be a string.
2112
+ treeSegment: [
2113
+ segmentKey,
2114
+ value.join("/"),
2115
+ dynamicParamType
2116
+ ]
2117
+ };
2118
+ }
2119
+ }
2120
+ return {
2121
+ param: segmentKey,
2122
+ // The value that is passed to user code.
2123
+ value,
2124
+ // The value that is rendered in the router tree.
2125
+ treeSegment: [
2126
+ segmentKey,
2127
+ Array.isArray(value) ? value.join("/") : value,
2128
+ dynamicParamType
2129
+ ],
2130
+ type: dynamicParamType
2131
+ };
2132
+ }
2133
+ var PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
2134
+ function parseParameter(param) {
2135
+ const match = param.match(PARAMETER_PATTERN);
2136
+ if (!match) {
2137
+ return parseMatchedParameter(param);
2138
+ }
2139
+ return parseMatchedParameter(match[2]);
2140
+ }
2141
+ function parseMatchedParameter(param) {
2142
+ const optional = param.startsWith("[") && param.endsWith("]");
2143
+ if (optional) {
2144
+ param = param.slice(1, -1);
2145
+ }
2146
+ const repeat = param.startsWith("...");
2147
+ if (repeat) {
2148
+ param = param.slice(3);
2149
+ }
2150
+ return {
2151
+ key: param,
2152
+ repeat,
2153
+ optional
2154
+ };
2155
+ }
2156
+ }
2157
+ });
2158
+
2159
+ // node_modules/next/dist/shared/lib/router/utils/route-regex.js
2160
+ var require_route_regex = __commonJS({
2161
+ "node_modules/next/dist/shared/lib/router/utils/route-regex.js"(exports2) {
2162
+ "use strict";
2163
+ Object.defineProperty(exports2, "__esModule", {
2164
+ value: true
2165
+ });
2166
+ function _export(target, all) {
2167
+ for (var name in all) Object.defineProperty(target, name, {
2168
+ enumerable: true,
2169
+ get: all[name]
2170
+ });
2171
+ }
2172
+ _export(exports2, {
2173
+ getNamedMiddlewareRegex: function() {
2174
+ return getNamedMiddlewareRegex;
2175
+ },
2176
+ getNamedRouteRegex: function() {
2177
+ return getNamedRouteRegex;
2178
+ },
2179
+ getRouteRegex: function() {
2180
+ return getRouteRegex;
2181
+ }
2182
+ });
2183
+ var _constants = require_constants();
2184
+ var _interceptionroutes = require_interception_routes();
2185
+ var _escaperegexp = require_escape_regexp();
2186
+ var _removetrailingslash = require_remove_trailing_slash();
2187
+ var _getdynamicparam = require_get_dynamic_param();
2188
+ function getParametrizedRoute(route, includeSuffix, includePrefix) {
2189
+ const groups = {};
2190
+ let groupIndex = 1;
2191
+ const segments = [];
2192
+ for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
2193
+ const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
2194
+ const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
2195
+ if (markerMatch && paramMatches && paramMatches[2]) {
2196
+ const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
2197
+ groups[key] = {
2198
+ pos: groupIndex++,
2199
+ repeat,
2200
+ optional
2201
+ };
2202
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(markerMatch) + "([^/]+?)");
2203
+ } else if (paramMatches && paramMatches[2]) {
2204
+ const { key, repeat, optional } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
2205
+ groups[key] = {
2206
+ pos: groupIndex++,
2207
+ repeat,
2208
+ optional
2209
+ };
2210
+ if (includePrefix && paramMatches[1]) {
2211
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(paramMatches[1]));
2212
+ }
2213
+ let s = repeat ? optional ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
2214
+ if (includePrefix && paramMatches[1]) {
2215
+ s = s.substring(1);
2216
+ }
2217
+ segments.push(s);
2218
+ } else {
2219
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(segment));
2220
+ }
2221
+ if (includeSuffix && paramMatches && paramMatches[3]) {
2222
+ segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
2223
+ }
2224
+ }
2225
+ return {
2226
+ parameterizedRoute: segments.join(""),
2227
+ groups
2228
+ };
2229
+ }
2230
+ function getRouteRegex(normalizedRoute, param) {
2231
+ let { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = param === void 0 ? {} : param;
2232
+ const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
2233
+ let re = parameterizedRoute;
2234
+ if (!excludeOptionalTrailingSlash) {
2235
+ re += "(?:/)?";
2236
+ }
2237
+ return {
2238
+ re: new RegExp("^" + re + "$"),
2239
+ groups
2240
+ };
2241
+ }
2242
+ function buildGetSafeRouteKey() {
2243
+ let i = 0;
2244
+ return () => {
2245
+ let routeKey = "";
2246
+ let j = ++i;
2247
+ while (j > 0) {
2248
+ routeKey += String.fromCharCode(97 + (j - 1) % 26);
2249
+ j = Math.floor((j - 1) / 26);
2250
+ }
2251
+ return routeKey;
2252
+ };
2253
+ }
2254
+ function getSafeKeyFromSegment(param) {
2255
+ let { interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys } = param;
2256
+ const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(segment);
2257
+ let cleanedKey = key.replace(/\W/g, "");
2258
+ if (keyPrefix) {
2259
+ cleanedKey = "" + keyPrefix + cleanedKey;
2260
+ }
2261
+ let invalidKey = false;
2262
+ if (cleanedKey.length === 0 || cleanedKey.length > 30) {
2263
+ invalidKey = true;
2264
+ }
2265
+ if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
2266
+ invalidKey = true;
2267
+ }
2268
+ if (invalidKey) {
2269
+ cleanedKey = getSafeRouteKey();
2270
+ }
2271
+ const duplicateKey = cleanedKey in routeKeys;
2272
+ if (keyPrefix) {
2273
+ routeKeys[cleanedKey] = "" + keyPrefix + key;
2274
+ } else {
2275
+ routeKeys[cleanedKey] = key;
2276
+ }
2277
+ const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : "";
2278
+ let pattern;
2279
+ if (duplicateKey && backreferenceDuplicateKeys) {
2280
+ pattern = "\\k<" + cleanedKey + ">";
2281
+ } else if (repeat) {
2282
+ pattern = "(?<" + cleanedKey + ">.+?)";
2283
+ } else {
2284
+ pattern = "(?<" + cleanedKey + ">[^/]+?)";
2285
+ }
2286
+ return optional ? "(?:/" + interceptionPrefix + pattern + ")?" : "/" + interceptionPrefix + pattern;
2287
+ }
2288
+ function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys) {
2289
+ const getSafeRouteKey = buildGetSafeRouteKey();
2290
+ const routeKeys = {};
2291
+ const segments = [];
2292
+ for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
2293
+ const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m));
2294
+ const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
2295
+ if (hasInterceptionMarker && paramMatches && paramMatches[2]) {
2296
+ segments.push(getSafeKeyFromSegment({
2297
+ getSafeRouteKey,
2298
+ interceptionMarker: paramMatches[1],
2299
+ segment: paramMatches[2],
2300
+ routeKeys,
2301
+ keyPrefix: prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0,
2302
+ backreferenceDuplicateKeys
2303
+ }));
2304
+ } else if (paramMatches && paramMatches[2]) {
2305
+ if (includePrefix && paramMatches[1]) {
2306
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(paramMatches[1]));
2307
+ }
2308
+ let s = getSafeKeyFromSegment({
2309
+ getSafeRouteKey,
2310
+ segment: paramMatches[2],
2311
+ routeKeys,
2312
+ keyPrefix: prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : void 0,
2313
+ backreferenceDuplicateKeys
2314
+ });
2315
+ if (includePrefix && paramMatches[1]) {
2316
+ s = s.substring(1);
2317
+ }
2318
+ segments.push(s);
2319
+ } else {
2320
+ segments.push("/" + (0, _escaperegexp.escapeStringRegexp)(segment));
2321
+ }
2322
+ if (includeSuffix && paramMatches && paramMatches[3]) {
2323
+ segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
2324
+ }
2325
+ }
2326
+ return {
2327
+ namedParameterizedRoute: segments.join(""),
2328
+ routeKeys
2329
+ };
2330
+ }
2331
+ function getNamedRouteRegex(normalizedRoute, options) {
2332
+ var _options_includeSuffix, _options_includePrefix, _options_backreferenceDuplicateKeys;
2333
+ const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, (_options_includeSuffix = options.includeSuffix) != null ? _options_includeSuffix : false, (_options_includePrefix = options.includePrefix) != null ? _options_includePrefix : false, (_options_backreferenceDuplicateKeys = options.backreferenceDuplicateKeys) != null ? _options_backreferenceDuplicateKeys : false);
2334
+ let namedRegex = result.namedParameterizedRoute;
2335
+ if (!options.excludeOptionalTrailingSlash) {
2336
+ namedRegex += "(?:/)?";
2337
+ }
2338
+ return {
2339
+ ...getRouteRegex(normalizedRoute, options),
2340
+ namedRegex: "^" + namedRegex + "$",
2341
+ routeKeys: result.routeKeys
2342
+ };
2343
+ }
2344
+ function getNamedMiddlewareRegex(normalizedRoute, options) {
2345
+ const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
2346
+ const { catchAll = true } = options;
2347
+ if (parameterizedRoute === "/") {
2348
+ let catchAllRegex = catchAll ? ".*" : "";
2349
+ return {
2350
+ namedRegex: "^/" + catchAllRegex + "$"
2351
+ };
2352
+ }
2353
+ const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false);
2354
+ let catchAllGroupedRegex = catchAll ? "(?:(/.*)?)" : "";
2355
+ return {
2356
+ namedRegex: "^" + namedParameterizedRoute + catchAllGroupedRegex + "$"
2357
+ };
2358
+ }
2359
+ }
2360
+ });
2361
+
2362
+ // node_modules/next/dist/shared/lib/router/utils/interpolate-as.js
2363
+ var require_interpolate_as = __commonJS({
2364
+ "node_modules/next/dist/shared/lib/router/utils/interpolate-as.js"(exports2) {
2365
+ "use strict";
2366
+ Object.defineProperty(exports2, "__esModule", {
2367
+ value: true
2368
+ });
2369
+ Object.defineProperty(exports2, "interpolateAs", {
2370
+ enumerable: true,
2371
+ get: function() {
2372
+ return interpolateAs;
2373
+ }
2374
+ });
2375
+ var _routematcher = require_route_matcher();
2376
+ var _routeregex = require_route_regex();
2377
+ function interpolateAs(route, asPathname, query) {
2378
+ let interpolatedRoute = "";
2379
+ const dynamicRegex = (0, _routeregex.getRouteRegex)(route);
2380
+ const dynamicGroups = dynamicRegex.groups;
2381
+ const dynamicMatches = (
2382
+ // Try to match the dynamic route against the asPath
2383
+ (asPathname !== route ? (0, _routematcher.getRouteMatcher)(dynamicRegex)(asPathname) : "") || // Fall back to reading the values from the href
2384
+ // TODO: should this take priority; also need to change in the router.
2385
+ query
2386
+ );
2387
+ interpolatedRoute = route;
2388
+ const params = Object.keys(dynamicGroups);
2389
+ if (!params.every((param) => {
2390
+ let value = dynamicMatches[param] || "";
2391
+ const { repeat, optional } = dynamicGroups[param];
2392
+ let replaced = "[" + (repeat ? "..." : "") + param + "]";
2393
+ if (optional) {
2394
+ replaced = (!value ? "/" : "") + "[" + replaced + "]";
2395
+ }
2396
+ if (repeat && !Array.isArray(value)) value = [
2397
+ value
2398
+ ];
2399
+ return (optional || param in dynamicMatches) && // Interpolate group into data URL if present
2400
+ (interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map(
2401
+ // these values should be fully encoded instead of just
2402
+ // path delimiter escaped since they are being inserted
2403
+ // into the URL and we expect URL encoded segments
2404
+ // when parsing dynamic route params
2405
+ (segment) => encodeURIComponent(segment)
2406
+ ).join("/") : encodeURIComponent(value)) || "/");
2407
+ })) {
2408
+ interpolatedRoute = "";
2409
+ }
2410
+ return {
2411
+ params,
2412
+ result: interpolatedRoute
2413
+ };
2414
+ }
2415
+ }
2416
+ });
2417
+
2418
+ // node_modules/next/dist/client/resolve-href.js
2419
+ var require_resolve_href = __commonJS({
2420
+ "node_modules/next/dist/client/resolve-href.js"(exports2, module2) {
2421
+ "use strict";
2422
+ Object.defineProperty(exports2, "__esModule", {
2423
+ value: true
2424
+ });
2425
+ Object.defineProperty(exports2, "resolveHref", {
2426
+ enumerable: true,
2427
+ get: function() {
2428
+ return resolveHref;
2429
+ }
2430
+ });
2431
+ var _querystring = require_querystring();
2432
+ var _formaturl = require_format_url();
2433
+ var _omit = require_omit();
2434
+ var _utils = require_utils();
2435
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2436
+ var _islocalurl = require_is_local_url();
2437
+ var _utils1 = require_utils2();
2438
+ var _interpolateas = require_interpolate_as();
2439
+ var _routeregex = require_route_regex();
2440
+ var _routematcher = require_route_matcher();
2441
+ function resolveHref(router, href, resolveAs) {
2442
+ let base;
2443
+ let urlAsString = typeof href === "string" ? href : (0, _formaturl.formatWithValidation)(href);
2444
+ const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\/\//i);
2445
+ const urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;
2446
+ const urlParts = urlAsStringNoProto.split("?", 1);
2447
+ if ((urlParts[0] || "").match(/(\/\/|\\)/)) {
2448
+ console.error("Invalid href '" + urlAsString + "' passed to next/router in page: '" + router.pathname + "'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");
2449
+ const normalizedUrl = (0, _utils.normalizeRepeatedSlashes)(urlAsStringNoProto);
2450
+ urlAsString = (urlProtoMatch ? urlProtoMatch[0] : "") + normalizedUrl;
2451
+ }
2452
+ if (!(0, _islocalurl.isLocalURL)(urlAsString)) {
2453
+ return resolveAs ? [
2454
+ urlAsString
2455
+ ] : urlAsString;
2456
+ }
2457
+ try {
2458
+ let baseBase = urlAsString.startsWith("#") ? router.asPath : router.pathname;
2459
+ if (urlAsString.startsWith("?")) {
2460
+ baseBase = router.asPath;
2461
+ if ((0, _utils1.isDynamicRoute)(router.pathname)) {
2462
+ baseBase = router.pathname;
2463
+ const routeRegex = (0, _routeregex.getRouteRegex)(router.pathname);
2464
+ const match = (0, _routematcher.getRouteMatcher)(routeRegex)(router.asPath);
2465
+ if (!match) {
2466
+ baseBase = router.asPath;
2467
+ }
2468
+ }
2469
+ }
2470
+ base = new URL(baseBase, "http://n");
2471
+ } catch (_) {
2472
+ base = new URL("/", "http://n");
2473
+ }
2474
+ try {
2475
+ const finalUrl = new URL(urlAsString, base);
2476
+ finalUrl.pathname = (0, _normalizetrailingslash.normalizePathTrailingSlash)(finalUrl.pathname);
2477
+ let interpolatedAs = "";
2478
+ if ((0, _utils1.isDynamicRoute)(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {
2479
+ const query = (0, _querystring.searchParamsToUrlQuery)(finalUrl.searchParams);
2480
+ const { result, params } = (0, _interpolateas.interpolateAs)(finalUrl.pathname, finalUrl.pathname, query);
2481
+ if (result) {
2482
+ interpolatedAs = (0, _formaturl.formatWithValidation)({
2483
+ pathname: result,
2484
+ hash: finalUrl.hash,
2485
+ query: (0, _omit.omit)(query, params)
2486
+ });
2487
+ }
2488
+ }
2489
+ const resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;
2490
+ return resolveAs ? [
2491
+ resolvedHref,
2492
+ interpolatedAs || resolvedHref
2493
+ ] : resolvedHref;
2494
+ } catch (_) {
2495
+ return resolveAs ? [
2496
+ urlAsString
2497
+ ] : urlAsString;
2498
+ }
2499
+ }
2500
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2501
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2502
+ Object.assign(exports2.default, exports2);
2503
+ module2.exports = exports2.default;
2504
+ }
2505
+ }
2506
+ });
2507
+
2508
+ // node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
2509
+ var require_add_path_prefix = __commonJS({
2510
+ "node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports2) {
2511
+ "use strict";
2512
+ Object.defineProperty(exports2, "__esModule", {
2513
+ value: true
2514
+ });
2515
+ Object.defineProperty(exports2, "addPathPrefix", {
2516
+ enumerable: true,
2517
+ get: function() {
2518
+ return addPathPrefix;
2519
+ }
2520
+ });
2521
+ var _parsepath = require_parse_path();
2522
+ function addPathPrefix(path, prefix) {
2523
+ if (!path.startsWith("/") || !prefix) {
2524
+ return path;
2525
+ }
2526
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
2527
+ return "" + prefix + pathname + query + hash;
2528
+ }
2529
+ }
2530
+ });
2531
+
2532
+ // node_modules/next/dist/shared/lib/router/utils/add-locale.js
2533
+ var require_add_locale = __commonJS({
2534
+ "node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports2) {
2535
+ "use strict";
2536
+ Object.defineProperty(exports2, "__esModule", {
2537
+ value: true
2538
+ });
2539
+ Object.defineProperty(exports2, "addLocale", {
2540
+ enumerable: true,
2541
+ get: function() {
2542
+ return addLocale;
2543
+ }
2544
+ });
2545
+ var _addpathprefix = require_add_path_prefix();
2546
+ var _pathhasprefix = require_path_has_prefix();
2547
+ function addLocale(path, locale, defaultLocale, ignorePrefix) {
2548
+ if (!locale || locale === defaultLocale) return path;
2549
+ const lower = path.toLowerCase();
2550
+ if (!ignorePrefix) {
2551
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path;
2552
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, "/" + locale.toLowerCase())) return path;
2553
+ }
2554
+ return (0, _addpathprefix.addPathPrefix)(path, "/" + locale);
2555
+ }
2556
+ }
2557
+ });
2558
+
2559
+ // node_modules/next/dist/client/add-locale.js
2560
+ var require_add_locale2 = __commonJS({
2561
+ "node_modules/next/dist/client/add-locale.js"(exports2, module2) {
2562
+ "use strict";
2563
+ Object.defineProperty(exports2, "__esModule", {
2564
+ value: true
2565
+ });
2566
+ Object.defineProperty(exports2, "addLocale", {
2567
+ enumerable: true,
2568
+ get: function() {
2569
+ return addLocale;
2570
+ }
2571
+ });
2572
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2573
+ var addLocale = function(path) {
2574
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2575
+ args[_key - 1] = arguments[_key];
2576
+ }
2577
+ if (process.env.__NEXT_I18N_SUPPORT) {
2578
+ return (0, _normalizetrailingslash.normalizePathTrailingSlash)(require_add_locale().addLocale(path, ...args));
2579
+ }
2580
+ return path;
2581
+ };
2582
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2583
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2584
+ Object.assign(exports2.default, exports2);
2585
+ module2.exports = exports2.default;
2586
+ }
2587
+ }
2588
+ });
2589
+
2590
+ // node_modules/@swc/helpers/cjs/_interop_require_default.cjs
2591
+ var require_interop_require_default = __commonJS({
2592
+ "node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports2) {
2593
+ "use strict";
2594
+ function _interop_require_default(obj) {
2595
+ return obj && obj.__esModule ? obj : { default: obj };
2596
+ }
2597
+ exports2._ = _interop_require_default;
2598
+ }
2599
+ });
2600
+
2601
+ // node_modules/next/dist/shared/lib/router-context.shared-runtime.js
2602
+ var require_router_context_shared_runtime = __commonJS({
2603
+ "node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports2) {
2604
+ "use strict";
2605
+ Object.defineProperty(exports2, "__esModule", {
2606
+ value: true
2607
+ });
2608
+ Object.defineProperty(exports2, "RouterContext", {
2609
+ enumerable: true,
2610
+ get: function() {
2611
+ return RouterContext;
2612
+ }
2613
+ });
2614
+ var _interop_require_default = require_interop_require_default();
2615
+ var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
2616
+ var RouterContext = _react.default.createContext(null);
2617
+ if (process.env.NODE_ENV !== "production") {
2618
+ RouterContext.displayName = "RouterContext";
2619
+ }
2620
+ }
2621
+ });
2622
+
2623
+ // node_modules/next/dist/client/request-idle-callback.js
2624
+ var require_request_idle_callback = __commonJS({
2625
+ "node_modules/next/dist/client/request-idle-callback.js"(exports2, module2) {
2626
+ "use strict";
2627
+ Object.defineProperty(exports2, "__esModule", {
2628
+ value: true
2629
+ });
2630
+ function _export(target, all) {
2631
+ for (var name in all) Object.defineProperty(target, name, {
2632
+ enumerable: true,
2633
+ get: all[name]
2634
+ });
2635
+ }
2636
+ _export(exports2, {
2637
+ cancelIdleCallback: function() {
2638
+ return cancelIdleCallback;
2639
+ },
2640
+ requestIdleCallback: function() {
2641
+ return requestIdleCallback;
2642
+ }
2643
+ });
2644
+ var requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
2645
+ let start = Date.now();
2646
+ return self.setTimeout(function() {
2647
+ cb({
2648
+ didTimeout: false,
2649
+ timeRemaining: function() {
2650
+ return Math.max(0, 50 - (Date.now() - start));
2651
+ }
2652
+ });
2653
+ }, 1);
2654
+ };
2655
+ var cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
2656
+ return clearTimeout(id);
2657
+ };
2658
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2659
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2660
+ Object.assign(exports2.default, exports2);
2661
+ module2.exports = exports2.default;
2662
+ }
2663
+ }
2664
+ });
2665
+
2666
+ // node_modules/next/dist/client/use-intersection.js
2667
+ var require_use_intersection = __commonJS({
2668
+ "node_modules/next/dist/client/use-intersection.js"(exports2, module2) {
2669
+ "use strict";
2670
+ Object.defineProperty(exports2, "__esModule", {
2671
+ value: true
2672
+ });
2673
+ Object.defineProperty(exports2, "useIntersection", {
2674
+ enumerable: true,
2675
+ get: function() {
2676
+ return useIntersection;
2677
+ }
2678
+ });
2679
+ var _react = require("react");
2680
+ var _requestidlecallback = require_request_idle_callback();
2681
+ var hasIntersectionObserver = typeof IntersectionObserver === "function";
2682
+ var observers = /* @__PURE__ */ new Map();
2683
+ var idList = [];
2684
+ function createObserver(options) {
2685
+ const id = {
2686
+ root: options.root || null,
2687
+ margin: options.rootMargin || ""
2688
+ };
2689
+ const existing = idList.find((obj) => obj.root === id.root && obj.margin === id.margin);
2690
+ let instance;
2691
+ if (existing) {
2692
+ instance = observers.get(existing);
2693
+ if (instance) {
2694
+ return instance;
2695
+ }
2696
+ }
2697
+ const elements = /* @__PURE__ */ new Map();
2698
+ const observer = new IntersectionObserver((entries) => {
2699
+ entries.forEach((entry) => {
2700
+ const callback = elements.get(entry.target);
2701
+ const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
2702
+ if (callback && isVisible) {
2703
+ callback(isVisible);
2704
+ }
2705
+ });
2706
+ }, options);
2707
+ instance = {
2708
+ id,
2709
+ observer,
2710
+ elements
2711
+ };
2712
+ idList.push(id);
2713
+ observers.set(id, instance);
2714
+ return instance;
2715
+ }
2716
+ function observe(element, callback, options) {
2717
+ const { id, observer, elements } = createObserver(options);
2718
+ elements.set(element, callback);
2719
+ observer.observe(element);
2720
+ return function unobserve() {
2721
+ elements.delete(element);
2722
+ observer.unobserve(element);
2723
+ if (elements.size === 0) {
2724
+ observer.disconnect();
2725
+ observers.delete(id);
2726
+ const index = idList.findIndex((obj) => obj.root === id.root && obj.margin === id.margin);
2727
+ if (index > -1) {
2728
+ idList.splice(index, 1);
2729
+ }
2730
+ }
2731
+ };
2732
+ }
2733
+ function useIntersection(param) {
2734
+ let { rootRef, rootMargin, disabled } = param;
2735
+ const isDisabled = disabled || !hasIntersectionObserver;
2736
+ const [visible, setVisible] = (0, _react.useState)(false);
2737
+ const elementRef = (0, _react.useRef)(null);
2738
+ const setElement = (0, _react.useCallback)((element) => {
2739
+ elementRef.current = element;
2740
+ }, []);
2741
+ (0, _react.useEffect)(() => {
2742
+ if (hasIntersectionObserver) {
2743
+ if (isDisabled || visible) return;
2744
+ const element = elementRef.current;
2745
+ if (element && element.tagName) {
2746
+ const unobserve = observe(element, (isVisible) => isVisible && setVisible(isVisible), {
2747
+ root: rootRef == null ? void 0 : rootRef.current,
2748
+ rootMargin
2749
+ });
2750
+ return unobserve;
2751
+ }
2752
+ } else {
2753
+ if (!visible) {
2754
+ const idleCallback = (0, _requestidlecallback.requestIdleCallback)(() => setVisible(true));
2755
+ return () => (0, _requestidlecallback.cancelIdleCallback)(idleCallback);
2756
+ }
2757
+ }
2758
+ }, [
2759
+ isDisabled,
2760
+ rootMargin,
2761
+ rootRef,
2762
+ visible,
2763
+ elementRef.current
2764
+ ]);
2765
+ const resetVisible = (0, _react.useCallback)(() => {
2766
+ setVisible(false);
2767
+ }, []);
2768
+ return [
2769
+ setElement,
2770
+ visible,
2771
+ resetVisible
2772
+ ];
2773
+ }
2774
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2775
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2776
+ Object.assign(exports2.default, exports2);
2777
+ module2.exports = exports2.default;
2778
+ }
2779
+ }
2780
+ });
2781
+
2782
+ // node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
2783
+ var require_normalize_locale_path = __commonJS({
2784
+ "node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports2) {
2785
+ "use strict";
2786
+ Object.defineProperty(exports2, "__esModule", {
2787
+ value: true
2788
+ });
2789
+ Object.defineProperty(exports2, "normalizeLocalePath", {
2790
+ enumerable: true,
2791
+ get: function() {
2792
+ return normalizeLocalePath;
2793
+ }
2794
+ });
2795
+ var cache = /* @__PURE__ */ new WeakMap();
2796
+ function normalizeLocalePath(pathname, locales) {
2797
+ if (!locales) return {
2798
+ pathname
2799
+ };
2800
+ let lowercasedLocales = cache.get(locales);
2801
+ if (!lowercasedLocales) {
2802
+ lowercasedLocales = locales.map((locale) => locale.toLowerCase());
2803
+ cache.set(locales, lowercasedLocales);
2804
+ }
2805
+ let detectedLocale;
2806
+ const segments = pathname.split("/", 2);
2807
+ if (!segments[1]) return {
2808
+ pathname
2809
+ };
2810
+ const segment = segments[1].toLowerCase();
2811
+ const index = lowercasedLocales.indexOf(segment);
2812
+ if (index < 0) return {
2813
+ pathname
2814
+ };
2815
+ detectedLocale = locales[index];
2816
+ pathname = pathname.slice(detectedLocale.length + 1) || "/";
2817
+ return {
2818
+ pathname,
2819
+ detectedLocale
2820
+ };
2821
+ }
2822
+ }
2823
+ });
2824
+
2825
+ // node_modules/next/dist/client/normalize-locale-path.js
2826
+ var require_normalize_locale_path2 = __commonJS({
2827
+ "node_modules/next/dist/client/normalize-locale-path.js"(exports2, module2) {
2828
+ "use strict";
2829
+ Object.defineProperty(exports2, "__esModule", {
2830
+ value: true
2831
+ });
2832
+ Object.defineProperty(exports2, "normalizeLocalePath", {
2833
+ enumerable: true,
2834
+ get: function() {
2835
+ return normalizeLocalePath;
2836
+ }
2837
+ });
2838
+ var normalizeLocalePath = (pathname, locales) => {
2839
+ if (process.env.__NEXT_I18N_SUPPORT) {
2840
+ return require_normalize_locale_path().normalizeLocalePath(pathname, locales);
2841
+ }
2842
+ return {
2843
+ pathname,
2844
+ detectedLocale: void 0
2845
+ };
2846
+ };
2847
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2848
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2849
+ Object.assign(exports2.default, exports2);
2850
+ module2.exports = exports2.default;
2851
+ }
2852
+ }
2853
+ });
2854
+
2855
+ // node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
2856
+ var require_detect_domain_locale = __commonJS({
2857
+ "node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports2) {
2858
+ "use strict";
2859
+ Object.defineProperty(exports2, "__esModule", {
2860
+ value: true
2861
+ });
2862
+ Object.defineProperty(exports2, "detectDomainLocale", {
2863
+ enumerable: true,
2864
+ get: function() {
2865
+ return detectDomainLocale;
2866
+ }
2867
+ });
2868
+ function detectDomainLocale(domainItems, hostname, detectedLocale) {
2869
+ if (!domainItems) return;
2870
+ if (detectedLocale) {
2871
+ detectedLocale = detectedLocale.toLowerCase();
2872
+ }
2873
+ for (const item of domainItems) {
2874
+ var _item_domain, _item_locales;
2875
+ const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(":", 1)[0].toLowerCase();
2876
+ if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale) => locale.toLowerCase() === detectedLocale))) {
2877
+ return item;
2878
+ }
2879
+ }
2880
+ }
2881
+ }
2882
+ });
2883
+
2884
+ // node_modules/next/dist/client/detect-domain-locale.js
2885
+ var require_detect_domain_locale2 = __commonJS({
2886
+ "node_modules/next/dist/client/detect-domain-locale.js"(exports2, module2) {
2887
+ "use strict";
2888
+ Object.defineProperty(exports2, "__esModule", {
2889
+ value: true
2890
+ });
2891
+ Object.defineProperty(exports2, "detectDomainLocale", {
2892
+ enumerable: true,
2893
+ get: function() {
2894
+ return detectDomainLocale;
2895
+ }
2896
+ });
2897
+ var detectDomainLocale = function() {
2898
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2899
+ args[_key] = arguments[_key];
2900
+ }
2901
+ if (process.env.__NEXT_I18N_SUPPORT) {
2902
+ return require_detect_domain_locale().detectDomainLocale(...args);
2903
+ }
2904
+ };
2905
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2906
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2907
+ Object.assign(exports2.default, exports2);
2908
+ module2.exports = exports2.default;
2909
+ }
2910
+ }
2911
+ });
2912
+
2913
+ // node_modules/next/dist/client/get-domain-locale.js
2914
+ var require_get_domain_locale = __commonJS({
2915
+ "node_modules/next/dist/client/get-domain-locale.js"(exports2, module2) {
2916
+ "use strict";
2917
+ Object.defineProperty(exports2, "__esModule", {
2918
+ value: true
2919
+ });
2920
+ Object.defineProperty(exports2, "getDomainLocale", {
2921
+ enumerable: true,
2922
+ get: function() {
2923
+ return getDomainLocale;
2924
+ }
2925
+ });
2926
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2927
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
2928
+ function getDomainLocale(path, locale, locales, domainLocales) {
2929
+ if (process.env.__NEXT_I18N_SUPPORT) {
2930
+ const normalizeLocalePath = require_normalize_locale_path2().normalizeLocalePath;
2931
+ const detectDomainLocale = require_detect_domain_locale2().detectDomainLocale;
2932
+ const target = locale || normalizeLocalePath(path, locales).detectedLocale;
2933
+ const domain = detectDomainLocale(domainLocales, void 0, target);
2934
+ if (domain) {
2935
+ const proto = "http" + (domain.http ? "" : "s") + "://";
2936
+ const finalLocale = target === domain.defaultLocale ? "" : "/" + target;
2937
+ return "" + proto + domain.domain + (0, _normalizetrailingslash.normalizePathTrailingSlash)("" + basePath + finalLocale + path);
2938
+ }
2939
+ return false;
2940
+ } else {
2941
+ return false;
2942
+ }
2943
+ }
2944
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2945
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2946
+ Object.assign(exports2.default, exports2);
2947
+ module2.exports = exports2.default;
2948
+ }
2949
+ }
2950
+ });
2951
+
2952
+ // node_modules/next/dist/client/add-base-path.js
2953
+ var require_add_base_path = __commonJS({
2954
+ "node_modules/next/dist/client/add-base-path.js"(exports2, module2) {
2955
+ "use strict";
2956
+ Object.defineProperty(exports2, "__esModule", {
2957
+ value: true
2958
+ });
2959
+ Object.defineProperty(exports2, "addBasePath", {
2960
+ enumerable: true,
2961
+ get: function() {
2962
+ return addBasePath;
2963
+ }
2964
+ });
2965
+ var _addpathprefix = require_add_path_prefix();
2966
+ var _normalizetrailingslash = require_normalize_trailing_slash();
2967
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
2968
+ function addBasePath(path, required) {
2969
+ return (0, _normalizetrailingslash.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required ? path : (0, _addpathprefix.addPathPrefix)(path, basePath));
2970
+ }
2971
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
2972
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
2973
+ Object.assign(exports2.default, exports2);
2974
+ module2.exports = exports2.default;
2975
+ }
2976
+ }
2977
+ });
2978
+
2979
+ // node_modules/next/dist/client/use-merged-ref.js
2980
+ var require_use_merged_ref = __commonJS({
2981
+ "node_modules/next/dist/client/use-merged-ref.js"(exports2, module2) {
2982
+ "use strict";
2983
+ Object.defineProperty(exports2, "__esModule", {
2984
+ value: true
2985
+ });
2986
+ Object.defineProperty(exports2, "useMergedRef", {
2987
+ enumerable: true,
2988
+ get: function() {
2989
+ return useMergedRef;
2990
+ }
2991
+ });
2992
+ var _react = require("react");
2993
+ function useMergedRef(refA, refB) {
2994
+ const cleanupA = (0, _react.useRef)(null);
2995
+ const cleanupB = (0, _react.useRef)(null);
2996
+ return (0, _react.useCallback)((current) => {
2997
+ if (current === null) {
2998
+ const cleanupFnA = cleanupA.current;
2999
+ if (cleanupFnA) {
3000
+ cleanupA.current = null;
3001
+ cleanupFnA();
3002
+ }
3003
+ const cleanupFnB = cleanupB.current;
3004
+ if (cleanupFnB) {
3005
+ cleanupB.current = null;
3006
+ cleanupFnB();
3007
+ }
3008
+ } else {
3009
+ if (refA) {
3010
+ cleanupA.current = applyRef(refA, current);
3011
+ }
3012
+ if (refB) {
3013
+ cleanupB.current = applyRef(refB, current);
3014
+ }
3015
+ }
3016
+ }, [
3017
+ refA,
3018
+ refB
3019
+ ]);
3020
+ }
3021
+ function applyRef(refA, current) {
3022
+ if (typeof refA === "function") {
3023
+ const cleanup = refA(current);
3024
+ if (typeof cleanup === "function") {
3025
+ return cleanup;
3026
+ } else {
3027
+ return () => refA(null);
3028
+ }
3029
+ } else {
3030
+ refA.current = current;
3031
+ return () => {
3032
+ refA.current = null;
3033
+ };
3034
+ }
3035
+ }
3036
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
3037
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
3038
+ Object.assign(exports2.default, exports2);
3039
+ module2.exports = exports2.default;
3040
+ }
3041
+ }
3042
+ });
3043
+
3044
+ // node_modules/next/dist/shared/lib/utils/error-once.js
3045
+ var require_error_once = __commonJS({
3046
+ "node_modules/next/dist/shared/lib/utils/error-once.js"(exports2) {
3047
+ "use strict";
3048
+ Object.defineProperty(exports2, "__esModule", {
3049
+ value: true
3050
+ });
3051
+ Object.defineProperty(exports2, "errorOnce", {
3052
+ enumerable: true,
3053
+ get: function() {
3054
+ return errorOnce;
3055
+ }
3056
+ });
3057
+ var errorOnce = (_) => {
3058
+ };
3059
+ if (process.env.NODE_ENV !== "production") {
3060
+ const errors = /* @__PURE__ */ new Set();
3061
+ errorOnce = (msg) => {
3062
+ if (!errors.has(msg)) {
3063
+ console.error(msg);
3064
+ }
3065
+ errors.add(msg);
3066
+ };
3067
+ }
3068
+ }
3069
+ });
3070
+
3071
+ // node_modules/next/dist/client/link.js
3072
+ var require_link = __commonJS({
3073
+ "node_modules/next/dist/client/link.js"(exports2, module2) {
3074
+ "use client";
3075
+ "use strict";
3076
+ Object.defineProperty(exports2, "__esModule", {
3077
+ value: true
3078
+ });
3079
+ function _export(target, all) {
3080
+ for (var name in all) Object.defineProperty(target, name, {
3081
+ enumerable: true,
3082
+ get: all[name]
3083
+ });
3084
+ }
3085
+ _export(exports2, {
3086
+ default: function() {
3087
+ return _default;
3088
+ },
3089
+ useLinkStatus: function() {
3090
+ return useLinkStatus;
3091
+ }
3092
+ });
3093
+ var _interop_require_wildcard = require_interop_require_wildcard();
3094
+ var _jsxruntime = require("react/jsx-runtime");
3095
+ var _react = /* @__PURE__ */ _interop_require_wildcard._(require("react"));
3096
+ var _resolvehref = require_resolve_href();
3097
+ var _islocalurl = require_is_local_url();
3098
+ var _formaturl = require_format_url();
3099
+ var _utils = require_utils();
3100
+ var _addlocale = require_add_locale2();
3101
+ var _routercontextsharedruntime = require_router_context_shared_runtime();
3102
+ var _useintersection = require_use_intersection();
3103
+ var _getdomainlocale = require_get_domain_locale();
3104
+ var _addbasepath = require_add_base_path();
3105
+ var _usemergedref = require_use_merged_ref();
3106
+ var _erroronce = require_error_once();
3107
+ var prefetched = /* @__PURE__ */ new Set();
3108
+ function prefetch(router, href, as, options) {
3109
+ if (typeof window === "undefined") {
3110
+ return;
3111
+ }
3112
+ if (!(0, _islocalurl.isLocalURL)(href)) {
3113
+ return;
3114
+ }
3115
+ if (!options.bypassPrefetchedCheck) {
3116
+ const locale = (
3117
+ // Let the link's locale prop override the default router locale.
3118
+ typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : void 0
3119
+ );
3120
+ const prefetchedKey = href + "%" + as + "%" + locale;
3121
+ if (prefetched.has(prefetchedKey)) {
3122
+ return;
3123
+ }
3124
+ prefetched.add(prefetchedKey);
3125
+ }
3126
+ router.prefetch(href, as, options).catch((err) => {
3127
+ if (process.env.NODE_ENV !== "production") {
3128
+ throw err;
3129
+ }
3130
+ });
3131
+ }
3132
+ function isModifiedEvent(event) {
3133
+ const eventTarget = event.currentTarget;
3134
+ const target = eventTarget.getAttribute("target");
3135
+ return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download
3136
+ event.nativeEvent && event.nativeEvent.which === 2;
3137
+ }
3138
+ function linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate) {
3139
+ const { nodeName } = e.currentTarget;
3140
+ const isAnchorNodeName = nodeName.toUpperCase() === "A";
3141
+ if (isAnchorNodeName && isModifiedEvent(e) || e.currentTarget.hasAttribute("download")) {
3142
+ return;
3143
+ }
3144
+ if (!(0, _islocalurl.isLocalURL)(href)) {
3145
+ if (replace) {
3146
+ e.preventDefault();
3147
+ location.replace(href);
3148
+ }
3149
+ return;
3150
+ }
3151
+ e.preventDefault();
3152
+ const navigate = () => {
3153
+ if (onNavigate) {
3154
+ let isDefaultPrevented = false;
3155
+ onNavigate({
3156
+ preventDefault: () => {
3157
+ isDefaultPrevented = true;
3158
+ }
3159
+ });
3160
+ if (isDefaultPrevented) {
3161
+ return;
3162
+ }
3163
+ }
3164
+ const routerScroll = scroll != null ? scroll : true;
3165
+ if ("beforePopState" in router) {
3166
+ router[replace ? "replace" : "push"](href, as, {
3167
+ shallow,
3168
+ locale,
3169
+ scroll: routerScroll
3170
+ });
3171
+ } else {
3172
+ router[replace ? "replace" : "push"](as || href, {
3173
+ scroll: routerScroll
3174
+ });
3175
+ }
3176
+ };
3177
+ navigate();
3178
+ }
3179
+ function formatStringOrUrl(urlObjOrString) {
3180
+ if (typeof urlObjOrString === "string") {
3181
+ return urlObjOrString;
3182
+ }
3183
+ return (0, _formaturl.formatUrl)(urlObjOrString);
3184
+ }
3185
+ var Link2 = /* @__PURE__ */ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
3186
+ let children;
3187
+ const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, locale, onClick, onNavigate, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, ...restProps } = props;
3188
+ children = childrenProp;
3189
+ if (legacyBehavior && (typeof children === "string" || typeof children === "number")) {
3190
+ children = /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
3191
+ children
3192
+ });
3193
+ }
3194
+ const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
3195
+ const prefetchEnabled = prefetchProp !== false;
3196
+ if (process.env.NODE_ENV !== "production") {
3197
+ let createPropError = function(args) {
3198
+ return Object.defineProperty(new Error("Failed prop type: The prop `" + args.key + "` expects a " + args.expected + " in `<Link>`, but got `" + args.actual + "` instead." + (typeof window !== "undefined" ? "\nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
3199
+ value: "E319",
3200
+ enumerable: false,
3201
+ configurable: true
3202
+ });
3203
+ };
3204
+ const requiredPropsGuard = {
3205
+ href: true
3206
+ };
3207
+ const requiredProps = Object.keys(requiredPropsGuard);
3208
+ requiredProps.forEach((key) => {
3209
+ if (key === "href") {
3210
+ if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
3211
+ throw createPropError({
3212
+ key,
3213
+ expected: "`string` or `object`",
3214
+ actual: props[key] === null ? "null" : typeof props[key]
3215
+ });
3216
+ }
3217
+ } else {
3218
+ const _ = key;
3219
+ }
3220
+ });
3221
+ const optionalPropsGuard = {
3222
+ as: true,
3223
+ replace: true,
3224
+ scroll: true,
3225
+ shallow: true,
3226
+ passHref: true,
3227
+ prefetch: true,
3228
+ locale: true,
3229
+ onClick: true,
3230
+ onMouseEnter: true,
3231
+ onTouchStart: true,
3232
+ legacyBehavior: true,
3233
+ onNavigate: true
3234
+ };
3235
+ const optionalProps = Object.keys(optionalPropsGuard);
3236
+ optionalProps.forEach((key) => {
3237
+ const valType = typeof props[key];
3238
+ if (key === "as") {
3239
+ if (props[key] && valType !== "string" && valType !== "object") {
3240
+ throw createPropError({
3241
+ key,
3242
+ expected: "`string` or `object`",
3243
+ actual: valType
3244
+ });
3245
+ }
3246
+ } else if (key === "locale") {
3247
+ if (props[key] && valType !== "string") {
3248
+ throw createPropError({
3249
+ key,
3250
+ expected: "`string`",
3251
+ actual: valType
3252
+ });
3253
+ }
3254
+ } else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
3255
+ if (props[key] && valType !== "function") {
3256
+ throw createPropError({
3257
+ key,
3258
+ expected: "`function`",
3259
+ actual: valType
3260
+ });
3261
+ }
3262
+ } else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "legacyBehavior") {
3263
+ if (props[key] != null && valType !== "boolean") {
3264
+ throw createPropError({
3265
+ key,
3266
+ expected: "`boolean`",
3267
+ actual: valType
3268
+ });
3269
+ }
3270
+ } else if (key === "prefetch") {
3271
+ if (props[key] != null && valType !== "boolean" && props[key] !== "auto") {
3272
+ throw createPropError({
3273
+ key,
3274
+ expected: '`boolean | "auto"`',
3275
+ actual: valType
3276
+ });
3277
+ }
3278
+ } else {
3279
+ const _ = key;
3280
+ }
3281
+ });
3282
+ }
3283
+ const { href, as } = _react.default.useMemo(() => {
3284
+ if (!router) {
3285
+ const resolvedHref2 = formatStringOrUrl(hrefProp);
3286
+ return {
3287
+ href: resolvedHref2,
3288
+ as: asProp ? formatStringOrUrl(asProp) : resolvedHref2
3289
+ };
3290
+ }
3291
+ const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
3292
+ return {
3293
+ href: resolvedHref,
3294
+ as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
3295
+ };
3296
+ }, [
3297
+ router,
3298
+ hrefProp,
3299
+ asProp
3300
+ ]);
3301
+ const previousHref = _react.default.useRef(href);
3302
+ const previousAs = _react.default.useRef(as);
3303
+ let child;
3304
+ if (legacyBehavior) {
3305
+ if (process.env.NODE_ENV === "development") {
3306
+ if (onClick) {
3307
+ console.warn('"onClick" was passed to <Link> with `href` of `' + hrefProp + '` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link');
3308
+ }
3309
+ if (onMouseEnterProp) {
3310
+ console.warn('"onMouseEnter" was passed to <Link> with `href` of `' + hrefProp + '` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');
3311
+ }
3312
+ try {
3313
+ child = _react.default.Children.only(children);
3314
+ } catch (err) {
3315
+ if (!children) {
3316
+ throw Object.defineProperty(new Error("No children were passed to <Link> with `href` of `" + hrefProp + "` but one child is required https://nextjs.org/docs/messages/link-no-children"), "__NEXT_ERROR_CODE", {
3317
+ value: "E320",
3318
+ enumerable: false,
3319
+ configurable: true
3320
+ });
3321
+ }
3322
+ throw Object.defineProperty(new Error("Multiple children were passed to <Link> with `href` of `" + hrefProp + "` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children" + (typeof window !== "undefined" ? " \nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
3323
+ value: "E266",
3324
+ enumerable: false,
3325
+ configurable: true
3326
+ });
3327
+ }
3328
+ } else {
3329
+ child = _react.default.Children.only(children);
3330
+ }
3331
+ } else {
3332
+ if (process.env.NODE_ENV === "development") {
3333
+ if ((children == null ? void 0 : children.type) === "a") {
3334
+ throw Object.defineProperty(new Error("Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor"), "__NEXT_ERROR_CODE", {
3335
+ value: "E209",
3336
+ enumerable: false,
3337
+ configurable: true
3338
+ });
3339
+ }
3340
+ }
3341
+ }
3342
+ const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
3343
+ const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
3344
+ rootMargin: "200px"
3345
+ });
3346
+ const setIntersectionWithResetRef = _react.default.useCallback((el) => {
3347
+ if (previousAs.current !== as || previousHref.current !== href) {
3348
+ resetVisible();
3349
+ previousAs.current = as;
3350
+ previousHref.current = href;
3351
+ }
3352
+ setIntersectionRef(el);
3353
+ }, [
3354
+ as,
3355
+ href,
3356
+ resetVisible,
3357
+ setIntersectionRef
3358
+ ]);
3359
+ const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
3360
+ _react.default.useEffect(() => {
3361
+ if (process.env.NODE_ENV !== "production") {
3362
+ return;
3363
+ }
3364
+ if (!router) {
3365
+ return;
3366
+ }
3367
+ if (!isVisible || !prefetchEnabled) {
3368
+ return;
3369
+ }
3370
+ prefetch(router, href, as, {
3371
+ locale
3372
+ });
3373
+ }, [
3374
+ as,
3375
+ href,
3376
+ isVisible,
3377
+ locale,
3378
+ prefetchEnabled,
3379
+ router == null ? void 0 : router.locale,
3380
+ router
3381
+ ]);
3382
+ const childProps = {
3383
+ ref: setRef,
3384
+ onClick(e) {
3385
+ if (process.env.NODE_ENV !== "production") {
3386
+ if (!e) {
3387
+ throw Object.defineProperty(new Error('Component rendered inside next/link has to pass click event to "onClick" prop.'), "__NEXT_ERROR_CODE", {
3388
+ value: "E312",
3389
+ enumerable: false,
3390
+ configurable: true
3391
+ });
3392
+ }
3393
+ }
3394
+ if (!legacyBehavior && typeof onClick === "function") {
3395
+ onClick(e);
3396
+ }
3397
+ if (legacyBehavior && child.props && typeof child.props.onClick === "function") {
3398
+ child.props.onClick(e);
3399
+ }
3400
+ if (!router) {
3401
+ return;
3402
+ }
3403
+ if (e.defaultPrevented) {
3404
+ return;
3405
+ }
3406
+ linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate);
3407
+ },
3408
+ onMouseEnter(e) {
3409
+ if (!legacyBehavior && typeof onMouseEnterProp === "function") {
3410
+ onMouseEnterProp(e);
3411
+ }
3412
+ if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") {
3413
+ child.props.onMouseEnter(e);
3414
+ }
3415
+ if (!router) {
3416
+ return;
3417
+ }
3418
+ prefetch(router, href, as, {
3419
+ locale,
3420
+ priority: true,
3421
+ // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
3422
+ bypassPrefetchedCheck: true
3423
+ });
3424
+ },
3425
+ onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? void 0 : function onTouchStart(e) {
3426
+ if (!legacyBehavior && typeof onTouchStartProp === "function") {
3427
+ onTouchStartProp(e);
3428
+ }
3429
+ if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") {
3430
+ child.props.onTouchStart(e);
3431
+ }
3432
+ if (!router) {
3433
+ return;
3434
+ }
3435
+ prefetch(router, href, as, {
3436
+ locale,
3437
+ priority: true,
3438
+ // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
3439
+ bypassPrefetchedCheck: true
3440
+ });
3441
+ }
3442
+ };
3443
+ if ((0, _utils.isAbsoluteUrl)(as)) {
3444
+ childProps.href = as;
3445
+ } else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
3446
+ const curLocale = typeof locale !== "undefined" ? locale : router == null ? void 0 : router.locale;
3447
+ const localeDomain = (router == null ? void 0 : router.isLocaleDomain) && (0, _getdomainlocale.getDomainLocale)(as, curLocale, router == null ? void 0 : router.locales, router == null ? void 0 : router.domainLocales);
3448
+ childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router == null ? void 0 : router.defaultLocale));
3449
+ }
3450
+ if (legacyBehavior) {
3451
+ if (process.env.NODE_ENV === "development") {
3452
+ (0, _erroronce.errorOnce)("`legacyBehavior` is deprecated and will be removed in a future release. A codemod is available to upgrade your components:\n\nnpx @next/codemod@latest new-link .\n\nLearn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components");
3453
+ }
3454
+ return /* @__PURE__ */ _react.default.cloneElement(child, childProps);
3455
+ }
3456
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
3457
+ ...restProps,
3458
+ ...childProps,
3459
+ children
3460
+ });
3461
+ });
3462
+ var LinkStatusContext = /* @__PURE__ */ (0, _react.createContext)({
3463
+ // We do not support link status in the Pages Router, so we always return false
3464
+ pending: false
3465
+ });
3466
+ var useLinkStatus = () => {
3467
+ return (0, _react.useContext)(LinkStatusContext);
3468
+ };
3469
+ var _default = Link2;
3470
+ if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
3471
+ Object.defineProperty(exports2.default, "__esModule", { value: true });
3472
+ Object.assign(exports2.default, exports2);
3473
+ module2.exports = exports2.default;
3474
+ }
3475
+ }
3476
+ });
3477
+
3478
+ // node_modules/next/link.js
3479
+ var require_link2 = __commonJS({
3480
+ "node_modules/next/link.js"(exports2, module2) {
3481
+ module2.exports = require_link();
3482
+ }
3483
+ });
3484
+
3485
+ // src/components/navigation/Navigation.tsx
3486
+ var Navigation_exports = {};
3487
+ __export(Navigation_exports, {
3488
+ Navigation: () => Navigation,
3489
+ NavigationItemList: () => NavigationItemList
3490
+ });
3491
+ module.exports = __toCommonJS(Navigation_exports);
3492
+ var import_lucide_react2 = require("lucide-react");
3493
+ var import_react5 = require("react");
3494
+ var import_react6 = require("react");
3495
+ var import_link = __toESM(require_link2());
3496
+ var import_clsx3 = __toESM(require("clsx"));
3497
+
3498
+ // src/hooks/useFloatingElement.ts
3499
+ var import_react2 = require("react");
3500
+
3501
+ // src/utils/math.ts
3502
+ var clamp = (value, range = [0, 1]) => {
3503
+ const [min, max] = range;
3504
+ return Math.min(Math.max(value, min), max);
3505
+ };
3506
+
3507
+ // src/hooks/focus/useIsMounted.ts
3508
+ var import_react = require("react");
3509
+ var isClient = typeof window !== "undefined" && typeof document !== "undefined";
3510
+ var useIsomorphicEffect = isClient ? import_react.useLayoutEffect : import_react.useEffect;
3511
+ var useIsMounted = () => {
3512
+ const [isMounted, setIsMounted] = (0, import_react.useState)(false);
3513
+ useIsomorphicEffect(() => {
3514
+ setIsMounted(true);
3515
+ return () => {
3516
+ setIsMounted(false);
3517
+ };
3518
+ }, []);
3519
+ return isMounted;
3520
+ };
3521
+
3522
+ // src/hooks/useFloatingElement.ts
3523
+ function calculatePosition({
3524
+ windowRect,
3525
+ containerRect,
3526
+ anchorRect,
3527
+ options
3528
+ }) {
3529
+ const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options;
3530
+ const windowWidth = windowRect.width;
3531
+ const windowHeight = windowRect.height;
3532
+ const maxWidth = windowWidth - 2 * screenPadding;
3533
+ const maxHeight = windowHeight - 2 * screenPadding;
3534
+ const width = Math.min(containerRect.width, maxWidth);
3535
+ const height = Math.min(containerRect.height, maxHeight);
3536
+ const leftSuggestion = {
3537
+ beforeStart: anchorRect.left - width - gap,
3538
+ afterStart: anchorRect.left,
3539
+ center: anchorRect.left + anchorRect.width / 2 - width / 2,
3540
+ beforeEnd: anchorRect.right - width,
3541
+ afterEnd: anchorRect.right + gap
3542
+ }[horizontalAlignment];
3543
+ const topSuggestion = {
3544
+ beforeStart: anchorRect.top - height - gap,
3545
+ afterStart: anchorRect.top,
3546
+ center: anchorRect.top + anchorRect.height / 2 - height / 2,
3547
+ beforeEnd: anchorRect.bottom - height,
3548
+ afterEnd: anchorRect.bottom + gap
3549
+ }[verticalAlignment];
3550
+ const left = clamp(leftSuggestion, [
3551
+ screenPadding,
3552
+ windowWidth - screenPadding - width
3553
+ ]);
3554
+ const top = clamp(topSuggestion, [
3555
+ screenPadding,
3556
+ windowHeight - screenPadding - height
3557
+ ]);
3558
+ return {
3559
+ left,
3560
+ top,
3561
+ maxWidth,
3562
+ maxHeight
3563
+ };
3564
+ }
3565
+ function useFloatingElement({
3566
+ active = true,
3567
+ windowRef,
3568
+ anchorRef,
3569
+ containerRef,
3570
+ isPolling = false,
3571
+ pollingInterval = 100,
3572
+ verticalAlignment = "afterEnd",
3573
+ horizontalAlignment = "afterStart",
3574
+ screenPadding = 16,
3575
+ gap = 4
3576
+ }) {
3577
+ const [style, setStyle] = (0, import_react2.useState)();
3578
+ const isMounted = useIsMounted();
3579
+ const calculate = (0, import_react2.useCallback)(() => {
3580
+ const containerRect = containerRef.current.getBoundingClientRect();
3581
+ const windowRect = windowRef?.current.getBoundingClientRect() ?? {
3582
+ top: 0,
3583
+ bottom: window.innerHeight,
3584
+ left: 0,
3585
+ right: window.innerWidth,
3586
+ width: window.innerWidth,
3587
+ height: window.innerHeight
3588
+ };
3589
+ const anchorElement = anchorRef?.current;
3590
+ if (anchorRef && !anchorElement) {
3591
+ console.warn("FloatingContainer anchor provided, but its value is undefined");
3592
+ }
3593
+ const anchorRect = anchorElement?.getBoundingClientRect() ?? windowRect;
3594
+ const calculateProps = {
3595
+ windowRect,
3596
+ anchorRect,
3597
+ containerRect,
3598
+ options: {
3599
+ horizontalAlignment,
3600
+ verticalAlignment,
3601
+ screenPadding,
3602
+ gap
3603
+ }
3604
+ };
3605
+ setStyle(calculatePosition(calculateProps));
3606
+ }, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
3607
+ const height = containerRef.current?.getBoundingClientRect().height;
3608
+ const width = containerRef.current?.getBoundingClientRect().width;
3609
+ (0, import_react2.useEffect)(() => {
3610
+ if (active && isMounted) {
3611
+ calculate();
3612
+ } else {
3613
+ setStyle(void 0);
3614
+ }
3615
+ }, [calculate, active, isMounted, height, width]);
3616
+ (0, import_react2.useEffect)(() => {
3617
+ window.addEventListener("resize", calculate);
3618
+ let timeout;
3619
+ if (isPolling) {
3620
+ timeout = setInterval(calculate, pollingInterval);
3621
+ }
3622
+ return () => {
3623
+ window.removeEventListener("resize", calculate);
3624
+ if (timeout) {
3625
+ clearInterval(timeout);
3626
+ }
3627
+ };
3628
+ }, [calculate, isPolling, pollingInterval]);
3629
+ return style;
3630
+ }
3631
+
3632
+ // src/components/user-action/Button.tsx
3633
+ var import_react3 = require("react");
3634
+ var import_clsx = __toESM(require("clsx"));
3635
+ var import_jsx_runtime = require("react/jsx-runtime");
3636
+ var ButtonColorUtil = {
3637
+ solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
3638
+ text: ["primary", "negative", "neutral"],
3639
+ outline: ["primary"]
3640
+ };
3641
+ var IconButtonUtil = {
3642
+ icon: [...ButtonColorUtil.solid, "transparent"]
3643
+ };
3644
+ var paddingMapping = {
3645
+ small: "btn-sm",
3646
+ medium: "btn-md",
3647
+ large: "btn-lg"
3648
+ };
3649
+ var iconPaddingMapping = {
3650
+ tiny: "icon-btn-xs",
3651
+ small: "icon-btn-sm",
3652
+ medium: "icon-btn-md",
3653
+ large: "icon-btn-lg"
3654
+ };
3655
+ var ButtonUtil = {
3656
+ paddingMapping,
3657
+ iconPaddingMapping
3658
+ };
3659
+ var SolidButton = (0, import_react3.forwardRef)(function SolidButton2({
3660
+ children,
3661
+ color = "primary",
3662
+ size = "medium",
3663
+ startIcon,
3664
+ endIcon,
3665
+ onClick,
3666
+ className,
3667
+ ...restProps
3668
+ }, ref) {
3669
+ const colorClasses = {
3670
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
3671
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
3672
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
3673
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
3674
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
3675
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
3676
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
3677
+ }[color];
3678
+ const iconColorClasses = {
3679
+ primary: "not-group-disabled:text-button-solid-primary-icon",
3680
+ secondary: "not-group-disabled:text-button-solid-secondary-icon",
3681
+ tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
3682
+ positive: "not-group-disabled:text-button-solid-positive-icon",
3683
+ warning: "not-group-disabled:text-button-solid-warning-icon",
3684
+ negative: "not-group-disabled:text-button-solid-negative-icon",
3685
+ neutral: "not-group-disabled:text-button-solid-neutral-icon"
3686
+ }[color];
3687
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
3688
+ "button",
3689
+ {
3690
+ ref,
3691
+ onClick,
3692
+ className: (0, import_clsx.default)(
3693
+ "group font-semibold",
3694
+ colorClasses,
3695
+ "not-disabled:hover:brightness-90",
3696
+ "disabled:text-disabled-text disabled:bg-disabled-background",
3697
+ ButtonUtil.paddingMapping[size],
3698
+ className
3699
+ ),
3700
+ ...restProps,
3701
+ children: [
3702
+ startIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
3703
+ "span",
3704
+ {
3705
+ className: (0, import_clsx.default)(
3706
+ iconColorClasses,
3707
+ "group-disabled:text-disabled-icon"
3708
+ ),
3709
+ children: startIcon
3710
+ }
3711
+ ),
3712
+ children,
3713
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
3714
+ "span",
3715
+ {
3716
+ className: (0, import_clsx.default)(
3717
+ iconColorClasses,
3718
+ "group-disabled:text-disabled-icon"
3719
+ ),
3720
+ children: endIcon
3721
+ }
3722
+ )
3723
+ ]
3724
+ }
3725
+ );
3726
+ });
3727
+ var IconButton = (0, import_react3.forwardRef)(function IconButton2({
3728
+ children,
3729
+ color = "primary",
3730
+ size = "medium",
3731
+ className,
3732
+ ...restProps
3733
+ }, ref) {
3734
+ const colorClasses = {
3735
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
3736
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
3737
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
3738
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
3739
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
3740
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
3741
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
3742
+ transparent: "not-disabled:bg-transparent"
3743
+ }[color];
3744
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
3745
+ "button",
3746
+ {
3747
+ ref,
3748
+ className: (0, import_clsx.default)(
3749
+ colorClasses,
3750
+ "not-disabled:hover:brightness-90",
3751
+ "disabled:text-disabled-text",
3752
+ {
3753
+ "disabled:bg-disabled-background": color !== "transparent",
3754
+ "disabled:opacity-70": color === "transparent",
3755
+ "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
3756
+ },
3757
+ ButtonUtil.iconPaddingMapping[size],
3758
+ className
3759
+ ),
3760
+ ...restProps,
3761
+ children
3762
+ }
3763
+ );
3764
+ });
3765
+
3766
+ // src/components/layout/Expandable.tsx
3767
+ var import_react4 = require("react");
3768
+ var import_lucide_react = require("lucide-react");
3769
+ var import_clsx2 = __toESM(require("clsx"));
3770
+
3771
+ // src/utils/noop.ts
3772
+ var noop = () => void 0;
3773
+
3774
+ // src/components/layout/Expandable.tsx
3775
+ var import_jsx_runtime2 = require("react/jsx-runtime");
3776
+ var ExpansionIcon = ({ isExpanded, className }) => {
3777
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3778
+ import_lucide_react.ChevronDown,
3779
+ {
3780
+ "aria-hidden": true,
3781
+ className: (0, import_clsx2.default)(
3782
+ "min-w-6 w-6 min-h-6 h-6 transition-transform motion-safe:duration-200 motion-reduce:duration-0 ease-in-out",
3783
+ { "rotate-180": isExpanded },
3784
+ className
3785
+ )
3786
+ }
3787
+ );
3788
+ };
3789
+ var Expandable = (0, import_react4.forwardRef)(function Expandable2({
3790
+ children,
3791
+ id: providedId,
3792
+ label,
3793
+ icon,
3794
+ isExpanded = false,
3795
+ onChange = noop,
3796
+ clickOnlyOnHeader = true,
3797
+ disabled = false,
3798
+ className,
3799
+ headerClassName,
3800
+ contentClassName,
3801
+ contentExpandedClassName
3802
+ }, ref) {
3803
+ const defaultIcon = (0, import_react4.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
3804
+ icon ??= defaultIcon;
3805
+ const generatedId = (0, import_react4.useId)();
3806
+ const id = providedId ?? generatedId;
3807
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
3808
+ "div",
3809
+ {
3810
+ ref,
3811
+ onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
3812
+ className: (0, import_clsx2.default)(
3813
+ "flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm",
3814
+ { "cursor-pointer": !clickOnlyOnHeader && !disabled },
3815
+ className
3816
+ ),
3817
+ children: [
3818
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
3819
+ "button",
3820
+ {
3821
+ onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
3822
+ className: (0, import_clsx2.default)(
3823
+ "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
3824
+ {
3825
+ "group-hover:brightness-97": !isExpanded,
3826
+ "hover:brightness-97": isExpanded && !disabled,
3827
+ "cursor-pointer": clickOnlyOnHeader && !disabled
3828
+ },
3829
+ headerClassName
3830
+ ),
3831
+ "aria-expanded": isExpanded,
3832
+ "aria-controls": `${id}-content`,
3833
+ "aria-disabled": disabled ?? void 0,
3834
+ children: [
3835
+ label,
3836
+ icon(isExpanded)
3837
+ ]
3838
+ }
3839
+ ),
3840
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3841
+ "div",
3842
+ {
3843
+ id: `${id}-content`,
3844
+ className: (0, import_clsx2.default)(
3845
+ "flex-col-2 px-4 transition-all duration-300 ease-in-out",
3846
+ {
3847
+ [(0, import_clsx2.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
3848
+ "max-h-0 opacity-0 overflow-hidden": !isExpanded
3849
+ },
3850
+ contentClassName
3851
+ ),
3852
+ role: "region",
3853
+ children
3854
+ }
3855
+ )
3856
+ ]
3857
+ }
3858
+ );
3859
+ });
3860
+ var ExpandableUncontrolled = (0, import_react4.forwardRef)(function ExpandableUncontrolled2({
3861
+ isExpanded,
3862
+ onChange = noop,
3863
+ ...props
3864
+ }, ref) {
3865
+ const [usedIsExpanded, setUsedIsExpanded] = (0, import_react4.useState)(isExpanded);
3866
+ (0, import_react4.useEffect)(() => {
3867
+ setUsedIsExpanded(isExpanded);
3868
+ }, [isExpanded]);
3869
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3870
+ Expandable,
3871
+ {
3872
+ ...props,
3873
+ ref,
3874
+ isExpanded: usedIsExpanded,
3875
+ onChange: (value) => {
3876
+ onChange(value);
3877
+ setUsedIsExpanded(value);
3878
+ }
3879
+ }
3880
+ );
3881
+ });
3882
+
3883
+ // src/components/navigation/Navigation.tsx
3884
+ var import_jsx_runtime3 = require("react/jsx-runtime");
3885
+ function isSubItem(item) {
3886
+ return "items" in item && Array.isArray(item.items);
3887
+ }
3888
+ var NavigationItemWithSubItem = ({
3889
+ items,
3890
+ label,
3891
+ horizontalAlignment = "center",
3892
+ ...options
3893
+ }) => {
3894
+ const [isOpen, setOpen] = (0, import_react6.useState)(false);
3895
+ const containerRef = (0, import_react6.useRef)();
3896
+ const triggerRef = (0, import_react6.useRef)(null);
3897
+ const id = (0, import_react6.useId)();
3898
+ const style = useFloatingElement({
3899
+ active: isOpen,
3900
+ containerRef,
3901
+ anchorRef: triggerRef,
3902
+ horizontalAlignment,
3903
+ ...options
3904
+ });
3905
+ const onBlur = (0, import_react6.useCallback)((event) => {
3906
+ const nextFocus = event.relatedTarget;
3907
+ if (!containerRef.current?.contains(nextFocus) && !triggerRef.current?.contains(nextFocus)) {
3908
+ setOpen(false);
3909
+ }
3910
+ }, []);
3911
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3912
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3913
+ "button",
3914
+ {
3915
+ id: "navigation-" + id,
3916
+ ref: triggerRef,
3917
+ onClick: () => {
3918
+ setOpen(!isOpen);
3919
+ },
3920
+ onBlur,
3921
+ className: "link flex-row-1",
3922
+ "aria-haspopup": "true",
3923
+ "aria-expanded": isOpen,
3924
+ "aria-controls": "navigation-items-" + id,
3925
+ children: [
3926
+ label,
3927
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ExpansionIcon, { isExpanded: isOpen })
3928
+ ]
3929
+ }
3930
+ ),
3931
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3932
+ "ul",
3933
+ {
3934
+ id: "navigation-items-" + id,
3935
+ ref: containerRef,
3936
+ onKeyDown: (event) => {
3937
+ if (event.key === "Escape") {
3938
+ setOpen(false);
3939
+ event.preventDefault();
3940
+ event.stopPropagation();
3941
+ }
3942
+ },
3943
+ onBlur,
3944
+ hidden: !isOpen,
3945
+ className: (0, import_clsx3.default)(
3946
+ "fixed flex-col-4 p-4 bg-surface text-on-surface shadow-side shadow-hw-bottom rounded-md z-2001",
3947
+ { "opacity-0": !style }
3948
+ ),
3949
+ style,
3950
+ children: items.map(({ link, label: label2, external }, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_link.default, { href: link, target: external ? "_blank" : void 0, className: "link", children: label2 }) }, index))
3951
+ }
3952
+ )
3953
+ ] });
3954
+ };
3955
+ var NavigationItemList = ({ items, ...restProps }) => {
3956
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("nav", { ...restProps, className: (0, import_clsx3.default)("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: isSubItem(item) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_link.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
3957
+ };
3958
+ var Navigation = ({ ...props }) => {
3959
+ const [isMobileOpen, setIsMobileOpen] = (0, import_react6.useState)(false);
3960
+ const id = (0, import_react6.useId)();
3961
+ const menuRef = (0, import_react6.useRef)(null);
3962
+ (0, import_react5.useEffect)(() => {
3963
+ menuRef.current?.focus();
3964
+ }, [isMobileOpen]);
3965
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3966
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3967
+ NavigationItemList,
3968
+ {
3969
+ ...props,
3970
+ className: (0, import_clsx3.default)("hidden", { "desktop:flex": !isMobileOpen }, props.className)
3971
+ }
3972
+ ),
3973
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3974
+ IconButton,
3975
+ {
3976
+ color: "transparent",
3977
+ onClick: () => setIsMobileOpen(true),
3978
+ className: "desktop:hidden",
3979
+ "aria-haspopup": "true",
3980
+ "aria-expanded": isMobileOpen,
3981
+ "aria-controls": "navigation-menu-" + id,
3982
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.Menu, { className: "w-6 h-6" })
3983
+ }
3984
+ ),
3985
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3986
+ "div",
3987
+ {
3988
+ id: "navigation-menu-" + id,
3989
+ ref: menuRef,
3990
+ hidden: !isMobileOpen,
3991
+ onKeyDown: (event) => {
3992
+ if (event.key === "Escape") {
3993
+ setIsMobileOpen(false);
3994
+ event.preventDefault();
3995
+ event.stopPropagation();
3996
+ }
3997
+ },
3998
+ className: (0, import_clsx3.default)(
3999
+ "flex-col-8 items-center justify-center fixed inset-0 p-8 w-screen h-screen z-2000 bg-surface text-on-surface",
4000
+ {
4001
+ "desktop:hidden": isMobileOpen
4002
+ },
4003
+ props.className
4004
+ ),
4005
+ children: [
4006
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconButton, { color: "transparent", onClick: () => setIsMobileOpen(false), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.XIcon, {}) }),
4007
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NavigationItemList, { ...props, className: (0, import_clsx3.default)("flex-col-8", props.className) })
4008
+ ]
4009
+ }
4010
+ )
4011
+ ] });
4012
+ };
4013
+ // Annotate the CommonJS export names for ESM import in node:
4014
+ 0 && (module.exports = {
4015
+ Navigation,
4016
+ NavigationItemList
4017
+ });
4018
+ //# sourceMappingURL=Navigation.js.map