math-main-components 0.0.196 → 0.0.197

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 (257) hide show
  1. package/dist/components/Accordeon/Accordeon.d.ts +4 -1
  2. package/dist/components/Accordeon/Accordeon.stories.d.ts +13 -0
  3. package/dist/components/Button/Button.d.ts +3 -3
  4. package/dist/components/Button/Button.stories.d.ts +13 -0
  5. package/dist/components/{AuthButton/AuthButton.d.ts → Button2/Button2.d.ts} +2 -2
  6. package/dist/components/Button2/Button2.stories.d.ts +13 -0
  7. package/dist/components/Button2/index.d.ts +1 -0
  8. package/dist/components/CardButton/CardButton.d.ts +3 -3
  9. package/dist/components/CardButton/CardButton.stories.d.ts +13 -0
  10. package/dist/components/Checkbox/Checkbox.stories.d.ts +13 -0
  11. package/dist/components/ChooseRole/ChooseRole.d.ts +3 -4
  12. package/dist/components/ChooseRole/ChooseRole.stories.d.ts +13 -0
  13. package/dist/components/ChooseRole/index.d.ts +1 -1
  14. package/dist/components/CopyCode/CopyCode.d.ts +3 -4
  15. package/dist/components/CopyCode/CopyCode.stories.d.ts +13 -0
  16. package/dist/components/EmptyCard/EmptyCard.stories.d.ts +13 -0
  17. package/dist/components/FormButton/FormButton.d.ts +4 -4
  18. package/dist/components/FormButton/FormButton.stories.d.ts +13 -0
  19. package/dist/components/FormText/FormText.stories.d.ts +13 -0
  20. package/dist/components/ForwardButton/ForwardButton.stories.d.ts +13 -0
  21. package/dist/index.cjs.js +39 -48
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.esm.js +39 -47
  24. package/dist/styles/font.scss +5 -0
  25. package/dist/styles/material-symbols.scss +24 -0
  26. package/dist/styles/theme-colors.scss +164 -0
  27. package/dist/styles/theme-styles.scss +8 -0
  28. package/package.json +18 -3
  29. package/dist/_virtual/_interop_require_default.cjs.js +0 -3
  30. package/dist/_virtual/_interop_require_wildcard.cjs.js +0 -3
  31. package/dist/_virtual/add-base-path.js +0 -3
  32. package/dist/_virtual/add-locale.js +0 -3
  33. package/dist/_virtual/add-locale2.js +0 -3
  34. package/dist/_virtual/add-path-prefix.js +0 -3
  35. package/dist/_virtual/add-path-suffix.js +0 -3
  36. package/dist/_virtual/app-paths.js +0 -3
  37. package/dist/_virtual/app-router-context.shared-runtime.js +0 -3
  38. package/dist/_virtual/app-router-headers.js +0 -3
  39. package/dist/_virtual/bloom-filter.js +0 -3
  40. package/dist/_virtual/compare-states.js +0 -3
  41. package/dist/_virtual/denormalize-page-path.js +0 -3
  42. package/dist/_virtual/detect-domain-locale.js +0 -3
  43. package/dist/_virtual/detect-domain-locale2.js +0 -3
  44. package/dist/_virtual/ensure-leading-slash.js +0 -3
  45. package/dist/_virtual/escape-regexp.js +0 -3
  46. package/dist/_virtual/format-next-pathname-info.js +0 -3
  47. package/dist/_virtual/format-url.js +0 -3
  48. package/dist/_virtual/get-asset-path-from-route.js +0 -3
  49. package/dist/_virtual/get-cookie-parser.js +0 -3
  50. package/dist/_virtual/get-domain-locale.js +0 -3
  51. package/dist/_virtual/get-next-pathname-info.js +0 -3
  52. package/dist/_virtual/handle-smooth-scroll.js +0 -3
  53. package/dist/_virtual/has-base-path.js +0 -3
  54. package/dist/_virtual/head-manager-context.shared-runtime.js +0 -3
  55. package/dist/_virtual/head-manager.js +0 -3
  56. package/dist/_virtual/index.js +0 -3
  57. package/dist/_virtual/index2.js +0 -3
  58. package/dist/_virtual/index3.js +0 -3
  59. package/dist/_virtual/index4.js +0 -3
  60. package/dist/_virtual/index5.js +0 -3
  61. package/dist/_virtual/interception-routes.js +0 -3
  62. package/dist/_virtual/interpolate-as.js +0 -3
  63. package/dist/_virtual/is-api-route.js +0 -3
  64. package/dist/_virtual/is-bot.js +0 -3
  65. package/dist/_virtual/is-dynamic.js +0 -3
  66. package/dist/_virtual/is-error.js +0 -3
  67. package/dist/_virtual/is-local-url.js +0 -3
  68. package/dist/_virtual/is-plain-object.js +0 -3
  69. package/dist/_virtual/link.js +0 -3
  70. package/dist/_virtual/link2.js +0 -3
  71. package/dist/_virtual/mitt.js +0 -3
  72. package/dist/_virtual/normalize-locale-path.js +0 -3
  73. package/dist/_virtual/normalize-locale-path2.js +0 -3
  74. package/dist/_virtual/normalize-path-sep.js +0 -3
  75. package/dist/_virtual/normalize-trailing-slash.js +0 -3
  76. package/dist/_virtual/omit.js +0 -3
  77. package/dist/_virtual/parse-path.js +0 -3
  78. package/dist/_virtual/parse-relative-url.js +0 -3
  79. package/dist/_virtual/parse-url.js +0 -3
  80. package/dist/_virtual/path-has-prefix.js +0 -3
  81. package/dist/_virtual/path-match.js +0 -3
  82. package/dist/_virtual/prepare-destination.js +0 -3
  83. package/dist/_virtual/querystring.js +0 -3
  84. package/dist/_virtual/react-is.development.js +0 -3
  85. package/dist/_virtual/react-is.production.min.js +0 -3
  86. package/dist/_virtual/remove-base-path.js +0 -3
  87. package/dist/_virtual/remove-locale.js +0 -3
  88. package/dist/_virtual/remove-path-prefix.js +0 -3
  89. package/dist/_virtual/remove-trailing-slash.js +0 -3
  90. package/dist/_virtual/request-idle-callback.js +0 -3
  91. package/dist/_virtual/resolve-href.js +0 -3
  92. package/dist/_virtual/resolve-rewrites.js +0 -3
  93. package/dist/_virtual/route-loader.js +0 -3
  94. package/dist/_virtual/route-matcher.js +0 -3
  95. package/dist/_virtual/route-regex.js +0 -3
  96. package/dist/_virtual/router-context.shared-runtime.js +0 -3
  97. package/dist/_virtual/router-reducer-types.js +0 -3
  98. package/dist/_virtual/router.js +0 -3
  99. package/dist/_virtual/router2.js +0 -3
  100. package/dist/_virtual/router3.js +0 -3
  101. package/dist/_virtual/script.js +0 -3
  102. package/dist/_virtual/segment.js +0 -3
  103. package/dist/_virtual/sorted-routes.js +0 -3
  104. package/dist/_virtual/trusted-types.js +0 -3
  105. package/dist/_virtual/use-intersection.js +0 -3
  106. package/dist/_virtual/utils.js +0 -3
  107. package/dist/_virtual/with-router.js +0 -3
  108. package/dist/components/Accordeon/Accordeon.types.d.ts +0 -4
  109. package/dist/components/AuthButton/index.d.ts +0 -1
  110. package/dist/components/Dialog/Dialog.types.d.ts +0 -7
  111. package/dist/components/PrimaryButton/PrimaryButton.d.ts +0 -8
  112. package/dist/components/PrimaryButton/index.d.ts +0 -1
  113. package/dist/components/SvgIcon/SvgIcon.types.d.ts +0 -8
  114. package/dist/components/index.d.ts +0 -31
  115. package/dist/components/useDimensions.d.ts +0 -4
  116. package/dist/components/useOrientation.d.ts +0 -3
  117. package/dist/components/useScroll.d.ts +0 -4
  118. package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.cjs.js +0 -7
  119. package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs.js +0 -48
  120. package/dist/node_modules/clsx/dist/clsx.m.js +0 -3
  121. package/dist/node_modules/external-svg-loader/dist/svg-loader.min.js +0 -1
  122. package/dist/node_modules/next/dist/client/add-base-path.js +0 -38
  123. package/dist/node_modules/next/dist/client/add-locale.js +0 -42
  124. package/dist/node_modules/next/dist/client/components/app-router-headers.js +0 -78
  125. package/dist/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +0 -69
  126. package/dist/node_modules/next/dist/client/detect-domain-locale.js +0 -39
  127. package/dist/node_modules/next/dist/client/get-domain-locale.js +0 -51
  128. package/dist/node_modules/next/dist/client/has-base-path.js +0 -36
  129. package/dist/node_modules/next/dist/client/head-manager.js +0 -212
  130. package/dist/node_modules/next/dist/client/link.js +0 -431
  131. package/dist/node_modules/next/dist/client/normalize-locale-path.js +0 -40
  132. package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +0 -50
  133. package/dist/node_modules/next/dist/client/remove-base-path.js +0 -45
  134. package/dist/node_modules/next/dist/client/remove-locale.js +0 -41
  135. package/dist/node_modules/next/dist/client/request-idle-callback.js +0 -52
  136. package/dist/node_modules/next/dist/client/resolve-href.js +0 -99
  137. package/dist/node_modules/next/dist/client/route-loader.js +0 -327
  138. package/dist/node_modules/next/dist/client/router.js +0 -202
  139. package/dist/node_modules/next/dist/client/script.js +0 -353
  140. package/dist/node_modules/next/dist/client/trusted-types.js +0 -54
  141. package/dist/node_modules/next/dist/client/use-intersection.js +0 -129
  142. package/dist/node_modules/next/dist/client/with-router.js +0 -52
  143. package/dist/node_modules/next/dist/compiled/cookie/index.js +0 -18
  144. package/dist/node_modules/next/dist/compiled/gzip-size/index.js +0 -15
  145. package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +0 -416
  146. package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +0 -230
  147. package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.production.min.js +0 -26
  148. package/dist/node_modules/next/dist/compiled/react-is/index.js +0 -21
  149. package/dist/node_modules/next/dist/lib/is-api-route.js +0 -27
  150. package/dist/node_modules/next/dist/lib/is-error.js +0 -53
  151. package/dist/node_modules/next/dist/server/api-utils/get-cookie-parser.js +0 -35
  152. package/dist/node_modules/next/dist/server/future/helpers/interception-routes.js +0 -97
  153. package/dist/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +0 -63
  154. package/dist/node_modules/next/dist/shared/lib/bloom-filter.js +0 -96
  155. package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +0 -33
  156. package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +0 -33
  157. package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -38
  158. package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -42
  159. package/dist/node_modules/next/dist/shared/lib/is-plain-object.js +0 -50
  160. package/dist/node_modules/next/dist/shared/lib/mitt.js +0 -57
  161. package/dist/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js +0 -32
  162. package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +0 -32
  163. package/dist/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js +0 -33
  164. package/dist/node_modules/next/dist/shared/lib/router/router.js +0 -1771
  165. package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +0 -42
  166. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +0 -33
  167. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +0 -33
  168. package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +0 -61
  169. package/dist/node_modules/next/dist/shared/lib/router/utils/compare-states.js +0 -46
  170. package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +0 -43
  171. package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +0 -99
  172. package/dist/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js +0 -29
  173. package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +0 -69
  174. package/dist/node_modules/next/dist/shared/lib/router/utils/handle-smooth-scroll.js +0 -49
  175. package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -36
  176. package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +0 -67
  177. package/dist/node_modules/next/dist/shared/lib/router/utils/is-bot.js +0 -27
  178. package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -28
  179. package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +0 -40
  180. package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +0 -33
  181. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +0 -47
  182. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +0 -43
  183. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-url.js +0 -44
  184. package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +0 -33
  185. package/dist/node_modules/next/dist/shared/lib/router/utils/path-match.js +0 -62
  186. package/dist/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +0 -245
  187. package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +0 -80
  188. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +0 -52
  189. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -35
  190. package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-rewrites.js +0 -136
  191. package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +0 -53
  192. package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +0 -200
  193. package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -182
  194. package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +0 -33
  195. package/dist/node_modules/next/dist/shared/lib/segment.js +0 -28
  196. package/dist/node_modules/next/dist/shared/lib/utils.js +0 -196
  197. package/dist/node_modules/next/link.js +0 -7
  198. package/dist/node_modules/next/router.js +0 -6
  199. package/dist/node_modules/react-toastify/dist/react-toastify.esm.mjs.js +0 -7
  200. package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -28
  201. package/dist/services/prisma.service.d.ts +0 -2
  202. package/dist/src/components/Accordeon/Accordeon.js +0 -14
  203. package/dist/src/components/Accordeon/styles.module.scss.js +0 -7
  204. package/dist/src/components/AuthButton/styles.module.scss.js +0 -4
  205. package/dist/src/components/CardButton/styles.module.scss.js +0 -4
  206. package/dist/src/components/Checkbox/styles.module.scss.js +0 -4
  207. package/dist/src/components/ChooseRole/styles.module.scss.js +0 -4
  208. package/dist/src/components/CopyCode/styles.module.scss.js +0 -4
  209. package/dist/src/components/Dialog/Dialog.js +0 -14
  210. package/dist/src/components/Dialog/styles.module.scss.js +0 -7
  211. package/dist/src/components/FormButton/styles.module.scss.js +0 -4
  212. package/dist/src/components/FormText/styles.module.scss.js +0 -4
  213. package/dist/src/components/ForwardButton/styles.module.scss.js +0 -4
  214. package/dist/src/components/Gap/Gap.js +0 -7
  215. package/dist/src/components/InputMail/styles.module.scss.js +0 -4
  216. package/dist/src/components/InputNames/styles.module.scss.js +0 -4
  217. package/dist/src/components/InputNumber/styles.module.scss.js +0 -4
  218. package/dist/src/components/InputPassword/styles.module.scss.js +0 -4
  219. package/dist/src/components/InputPin/styles.module.scss.js +0 -4
  220. package/dist/src/components/InputText/styles.module.scss.js +0 -4
  221. package/dist/src/components/OptionField/styles.module.scss.js +0 -4
  222. package/dist/src/components/OptionFieldHorizontal/styles.module.scss.js +0 -4
  223. package/dist/src/components/PrimaryButton/styles.module.scss.js +0 -4
  224. package/dist/src/components/ProgressBar/styles.module.scss.js +0 -4
  225. package/dist/src/components/RadioButtons/styles.module.scss.js +0 -4
  226. package/dist/src/components/RedirectButton/styles.module.scss.js +0 -4
  227. package/dist/src/components/SearchChips/styles.module.scss.js +0 -4
  228. package/dist/src/components/Searchbar/styles.module.scss.js +0 -4
  229. package/dist/src/components/Slider/styles.module.scss.js +0 -4
  230. package/dist/src/components/StepBack/styles.module.scss.js +0 -4
  231. package/dist/src/components/SvgIcon/SvgIcon.js +0 -9
  232. package/dist/src/components/Table/Table.js +0 -12
  233. package/dist/src/components/Table/styles.module.scss.js +0 -4
  234. package/dist/src/components/TextWithIcon/styles.module.scss.js +0 -4
  235. package/dist/src/components/UsageCard/styles.module.scss.js +0 -4
  236. package/dist/src/index.js +0 -36
  237. package/dist/types/Concept.d.ts +0 -7
  238. package/dist/types/Content.d.ts +0 -15
  239. package/dist/types/CourseAnnouncement.d.ts +0 -13
  240. package/dist/types/CourseAnnouncementAsset.d.ts +0 -22
  241. package/dist/types/CourseAnnouncementAssset.d.ts +0 -21
  242. package/dist/types/CourseMessage.d.ts +0 -13
  243. package/dist/types/CourseParticipant.d.ts +0 -9
  244. package/dist/types/CoursePin.d.ts +0 -8
  245. package/dist/types/File.d.ts +0 -13
  246. package/dist/types/HelpData.d.ts +0 -8
  247. package/dist/types/News.d.ts +0 -13
  248. package/dist/types/OrganizationMember.d.ts +0 -12
  249. package/dist/types/Page.d.ts +0 -8
  250. package/dist/types/ProductFeature.d.ts +0 -8
  251. package/dist/types/ProductLimit.d.ts +0 -8
  252. package/dist/types/PublicUser.d.ts +0 -7
  253. package/dist/types/index.d.ts +0 -2
  254. package/dist/types/marketing/BenefitForIndividuals.d.ts +0 -9
  255. package/dist/types/marketing/BenefitForSchools.d.ts +0 -9
  256. package/dist/types/marketing/Page.d.ts +0 -8
  257. package/dist/types/marketing/WebsiteData.d.ts +0 -23
@@ -1,40 +0,0 @@
1
- import { __exports as isLocalUrl } from '../../../../../../../_virtual/is-local-url.js';
2
- import { __require as requireUtils } from '../../utils.js';
3
- import { __require as requireHasBasePath } from '../../../../client/has-base-path.js';
4
-
5
- var hasRequiredIsLocalUrl;
6
-
7
- function requireIsLocalUrl () {
8
- if (hasRequiredIsLocalUrl) return isLocalUrl;
9
- hasRequiredIsLocalUrl = 1;
10
- (function (exports) {
11
- Object.defineProperty(exports, "__esModule", {
12
- value: true
13
- });
14
- Object.defineProperty(exports, "isLocalURL", {
15
- enumerable: true,
16
- get: function() {
17
- return isLocalURL;
18
- }
19
- });
20
- const _utils = requireUtils();
21
- const _hasbasepath = requireHasBasePath();
22
- function isLocalURL(url) {
23
- // prevent a hydration mismatch on href for url with anchor refs
24
- if (!(0, _utils.isAbsoluteUrl)(url)) return true;
25
- try {
26
- // absolute urls can be local if they are on the same origin
27
- const locationOrigin = (0, _utils.getLocationOrigin)();
28
- const resolved = new URL(url, locationOrigin);
29
- return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
30
- } catch (_) {
31
- return false;
32
- }
33
- }
34
-
35
-
36
- } (isLocalUrl));
37
- return isLocalUrl;
38
- }
39
-
40
- export { requireIsLocalUrl as __require };
@@ -1,33 +0,0 @@
1
- import { __exports as omit } from '../../../../../../../_virtual/omit.js';
2
-
3
- var hasRequiredOmit;
4
-
5
- function requireOmit () {
6
- if (hasRequiredOmit) return omit;
7
- hasRequiredOmit = 1;
8
- (function (exports) {
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
- Object.defineProperty(exports, "omit", {
13
- enumerable: true,
14
- get: function() {
15
- return omit;
16
- }
17
- });
18
- function omit(object, keys) {
19
- const omitted = {};
20
- Object.keys(object).forEach((key)=>{
21
- if (!keys.includes(key)) {
22
- omitted[key] = object[key];
23
- }
24
- });
25
- return omitted;
26
- }
27
-
28
-
29
- } (omit));
30
- return omit;
31
- }
32
-
33
- export { requireOmit as __require };
@@ -1,47 +0,0 @@
1
- import { __exports as parsePath } from '../../../../../../../_virtual/parse-path.js';
2
-
3
- /**
4
- * Given a path this function will find the pathname, query and hash and return
5
- * them. This is useful to parse full paths on the client side.
6
- * @param path A path to parse e.g. /foo/bar?id=1#hash
7
- */
8
-
9
- var hasRequiredParsePath;
10
-
11
- function requireParsePath () {
12
- if (hasRequiredParsePath) return parsePath;
13
- hasRequiredParsePath = 1;
14
- (function (exports) {
15
- Object.defineProperty(exports, "__esModule", {
16
- value: true
17
- });
18
- Object.defineProperty(exports, "parsePath", {
19
- enumerable: true,
20
- get: function() {
21
- return parsePath;
22
- }
23
- });
24
- function parsePath(path) {
25
- const hashIndex = path.indexOf("#");
26
- const queryIndex = path.indexOf("?");
27
- const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
28
- if (hasQuery || hashIndex > -1) {
29
- return {
30
- pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
31
- query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : "",
32
- hash: hashIndex > -1 ? path.slice(hashIndex) : ""
33
- };
34
- }
35
- return {
36
- pathname: path,
37
- query: "",
38
- hash: ""
39
- };
40
- }
41
-
42
-
43
- } (parsePath));
44
- return parsePath;
45
- }
46
-
47
- export { requireParsePath as __require };
@@ -1,43 +0,0 @@
1
- import { __exports as parseRelativeUrl } from '../../../../../../../_virtual/parse-relative-url.js';
2
- import { __require as requireUtils } from '../../utils.js';
3
- import { __require as requireQuerystring } from './querystring.js';
4
-
5
- var hasRequiredParseRelativeUrl;
6
-
7
- function requireParseRelativeUrl () {
8
- if (hasRequiredParseRelativeUrl) return parseRelativeUrl;
9
- hasRequiredParseRelativeUrl = 1;
10
- (function (exports) {
11
- Object.defineProperty(exports, "__esModule", {
12
- value: true
13
- });
14
- Object.defineProperty(exports, "parseRelativeUrl", {
15
- enumerable: true,
16
- get: function() {
17
- return parseRelativeUrl;
18
- }
19
- });
20
- const _utils = requireUtils();
21
- const _querystring = requireQuerystring();
22
- function parseRelativeUrl(url, base) {
23
- const globalBase = new URL(typeof window === "undefined" ? "http://n" : (0, _utils.getLocationOrigin)());
24
- const resolvedBase = base ? new URL(base, globalBase) : url.startsWith(".") ? new URL(typeof window === "undefined" ? "http://n" : window.location.href) : globalBase;
25
- const { pathname, searchParams, search, hash, href, origin } = new URL(url, resolvedBase);
26
- if (origin !== globalBase.origin) {
27
- throw new Error("invariant: invalid relative URL, router received " + url);
28
- }
29
- return {
30
- pathname,
31
- query: (0, _querystring.searchParamsToUrlQuery)(searchParams),
32
- search,
33
- hash,
34
- href: href.slice(globalBase.origin.length)
35
- };
36
- }
37
-
38
-
39
- } (parseRelativeUrl));
40
- return parseRelativeUrl;
41
- }
42
-
43
- export { requireParseRelativeUrl as __require };
@@ -1,44 +0,0 @@
1
- import { __exports as parseUrl } from '../../../../../../../_virtual/parse-url.js';
2
- import { __require as requireQuerystring } from './querystring.js';
3
- import { __require as requireParseRelativeUrl } from './parse-relative-url.js';
4
-
5
- var hasRequiredParseUrl;
6
-
7
- function requireParseUrl () {
8
- if (hasRequiredParseUrl) return parseUrl;
9
- hasRequiredParseUrl = 1;
10
- (function (exports) {
11
- Object.defineProperty(exports, "__esModule", {
12
- value: true
13
- });
14
- Object.defineProperty(exports, "parseUrl", {
15
- enumerable: true,
16
- get: function() {
17
- return parseUrl;
18
- }
19
- });
20
- const _querystring = requireQuerystring();
21
- const _parserelativeurl = requireParseRelativeUrl();
22
- function parseUrl(url) {
23
- if (url.startsWith("/")) {
24
- return (0, _parserelativeurl.parseRelativeUrl)(url);
25
- }
26
- const parsedURL = new URL(url);
27
- return {
28
- hash: parsedURL.hash,
29
- hostname: parsedURL.hostname,
30
- href: parsedURL.href,
31
- pathname: parsedURL.pathname,
32
- port: parsedURL.port,
33
- protocol: parsedURL.protocol,
34
- query: (0, _querystring.searchParamsToUrlQuery)(parsedURL.searchParams),
35
- search: parsedURL.search
36
- };
37
- }
38
-
39
-
40
- } (parseUrl));
41
- return parseUrl;
42
- }
43
-
44
- export { requireParseUrl as __require };
@@ -1,33 +0,0 @@
1
- import { __exports as pathHasPrefix } from '../../../../../../../_virtual/path-has-prefix.js';
2
- import { __require as requireParsePath } from './parse-path.js';
3
-
4
- var hasRequiredPathHasPrefix;
5
-
6
- function requirePathHasPrefix () {
7
- if (hasRequiredPathHasPrefix) return pathHasPrefix;
8
- hasRequiredPathHasPrefix = 1;
9
- (function (exports) {
10
- Object.defineProperty(exports, "__esModule", {
11
- value: true
12
- });
13
- Object.defineProperty(exports, "pathHasPrefix", {
14
- enumerable: true,
15
- get: function() {
16
- return pathHasPrefix;
17
- }
18
- });
19
- const _parsepath = requireParsePath();
20
- function pathHasPrefix(path, prefix) {
21
- if (typeof path !== "string") {
22
- return false;
23
- }
24
- const { pathname } = (0, _parsepath.parsePath)(path);
25
- return pathname === prefix || pathname.startsWith(prefix + "/");
26
- }
27
-
28
-
29
- } (pathHasPrefix));
30
- return pathHasPrefix;
31
- }
32
-
33
- export { requirePathHasPrefix as __require };
@@ -1,62 +0,0 @@
1
- import { __exports as pathMatch } from '../../../../../../../_virtual/path-match.js';
2
- import { __require as requirePathToRegexp } from '../../../../compiled/path-to-regexp/index.js';
3
-
4
- var hasRequiredPathMatch;
5
-
6
- function requirePathMatch () {
7
- if (hasRequiredPathMatch) return pathMatch;
8
- hasRequiredPathMatch = 1;
9
- (function (exports) {
10
- Object.defineProperty(exports, "__esModule", {
11
- value: true
12
- });
13
- Object.defineProperty(exports, "getPathMatch", {
14
- enumerable: true,
15
- get: function() {
16
- return getPathMatch;
17
- }
18
- });
19
- const _pathtoregexp = requirePathToRegexp();
20
- function getPathMatch(path, options) {
21
- const keys = [];
22
- const regexp = (0, _pathtoregexp.pathToRegexp)(path, keys, {
23
- delimiter: "/",
24
- sensitive: typeof (options == null ? void 0 : options.sensitive) === "boolean" ? options.sensitive : false,
25
- strict: options == null ? void 0 : options.strict
26
- });
27
- const matcher = (0, _pathtoregexp.regexpToFunction)((options == null ? void 0 : options.regexModifier) ? new RegExp(options.regexModifier(regexp.source), regexp.flags) : regexp, keys);
28
- /**
29
- * A matcher function that will check if a given pathname matches the path
30
- * given in the builder function. When the path does not match it will return
31
- * `false` but if it does it will return an object with the matched params
32
- * merged with the params provided in the second argument.
33
- */ return (pathname, params)=>{
34
- // If no pathname is provided it's not a match.
35
- if (typeof pathname !== "string") return false;
36
- const match = matcher(pathname);
37
- // If the path did not match `false` will be returned.
38
- if (!match) return false;
39
- /**
40
- * If unnamed params are not allowed they must be removed from
41
- * the matched parameters. path-to-regexp uses "string" for named and
42
- * "number" for unnamed parameters.
43
- */ if (options == null ? void 0 : options.removeUnnamedParams) {
44
- for (const key of keys){
45
- if (typeof key.name === "number") {
46
- delete match.params[key.name];
47
- }
48
- }
49
- }
50
- return {
51
- ...params,
52
- ...match.params
53
- };
54
- };
55
- }
56
-
57
-
58
- } (pathMatch));
59
- return pathMatch;
60
- }
61
-
62
- export { requirePathMatch as __require };
@@ -1,245 +0,0 @@
1
- import { __exports as prepareDestination } from '../../../../../../../_virtual/prepare-destination.js';
2
- import { __require as requirePathToRegexp } from '../../../../compiled/path-to-regexp/index.js';
3
- import { __require as requireEscapeRegexp } from '../../escape-regexp.js';
4
- import { __require as requireParseUrl } from './parse-url.js';
5
- import { __require as requireInterceptionRoutes } from '../../../../server/future/helpers/interception-routes.js';
6
- import { __require as requireAppRouterHeaders } from '../../../../client/components/app-router-headers.js';
7
- import { __require as requireGetCookieParser } from '../../../../server/api-utils/get-cookie-parser.js';
8
-
9
- var hasRequiredPrepareDestination;
10
-
11
- function requirePrepareDestination () {
12
- if (hasRequiredPrepareDestination) return prepareDestination;
13
- hasRequiredPrepareDestination = 1;
14
- (function (exports) {
15
- Object.defineProperty(exports, "__esModule", {
16
- value: true
17
- });
18
- function _export(target, all) {
19
- for(var name in all)Object.defineProperty(target, name, {
20
- enumerable: true,
21
- get: all[name]
22
- });
23
- }
24
- _export(exports, {
25
- matchHas: function() {
26
- return matchHas;
27
- },
28
- compileNonPath: function() {
29
- return compileNonPath;
30
- },
31
- prepareDestination: function() {
32
- return prepareDestination;
33
- }
34
- });
35
- const _pathtoregexp = requirePathToRegexp();
36
- const _escaperegexp = requireEscapeRegexp();
37
- const _parseurl = requireParseUrl();
38
- const _interceptionroutes = requireInterceptionRoutes();
39
- const _approuterheaders = requireAppRouterHeaders();
40
- const _getcookieparser = requireGetCookieParser();
41
- /**
42
- * Ensure only a-zA-Z are used for param names for proper interpolating
43
- * with path-to-regexp
44
- */ function getSafeParamName(paramName) {
45
- let newParamName = "";
46
- for(let i = 0; i < paramName.length; i++){
47
- const charCode = paramName.charCodeAt(i);
48
- if (charCode > 64 && charCode < 91 || // A-Z
49
- charCode > 96 && charCode < 123 // a-z
50
- ) {
51
- newParamName += paramName[i];
52
- }
53
- }
54
- return newParamName;
55
- }
56
- function escapeSegment(str, segmentName) {
57
- return str.replace(new RegExp(":" + (0, _escaperegexp.escapeStringRegexp)(segmentName), "g"), "__ESC_COLON_" + segmentName);
58
- }
59
- function unescapeSegments(str) {
60
- return str.replace(/__ESC_COLON_/gi, ":");
61
- }
62
- function matchHas(req, query, has, missing) {
63
- if (has === void 0) has = [];
64
- if (missing === void 0) missing = [];
65
- const params = {};
66
- const hasMatch = (hasItem)=>{
67
- let value;
68
- let key = hasItem.key;
69
- switch(hasItem.type){
70
- case "header":
71
- {
72
- key = key.toLowerCase();
73
- value = req.headers[key];
74
- break;
75
- }
76
- case "cookie":
77
- {
78
- if ("cookies" in req) {
79
- value = req.cookies[hasItem.key];
80
- } else {
81
- const cookies = (0, _getcookieparser.getCookieParser)(req.headers)();
82
- value = cookies[hasItem.key];
83
- }
84
- break;
85
- }
86
- case "query":
87
- {
88
- value = query[key];
89
- break;
90
- }
91
- case "host":
92
- {
93
- const { host } = (req == null ? void 0 : req.headers) || {};
94
- // remove port from host if present
95
- const hostname = host == null ? void 0 : host.split(":")[0].toLowerCase();
96
- value = hostname;
97
- break;
98
- }
99
- }
100
- if (!hasItem.value && value) {
101
- params[getSafeParamName(key)] = value;
102
- return true;
103
- } else if (value) {
104
- const matcher = new RegExp("^" + hasItem.value + "$");
105
- const matches = Array.isArray(value) ? value.slice(-1)[0].match(matcher) : value.match(matcher);
106
- if (matches) {
107
- if (Array.isArray(matches)) {
108
- if (matches.groups) {
109
- Object.keys(matches.groups).forEach((groupKey)=>{
110
- params[groupKey] = matches.groups[groupKey];
111
- });
112
- } else if (hasItem.type === "host" && matches[0]) {
113
- params.host = matches[0];
114
- }
115
- }
116
- return true;
117
- }
118
- }
119
- return false;
120
- };
121
- const allMatch = has.every((item)=>hasMatch(item)) && !missing.some((item)=>hasMatch(item));
122
- if (allMatch) {
123
- return params;
124
- }
125
- return false;
126
- }
127
- function compileNonPath(value, params) {
128
- if (!value.includes(":")) {
129
- return value;
130
- }
131
- for (const key of Object.keys(params)){
132
- if (value.includes(":" + key)) {
133
- value = value.replace(new RegExp(":" + key + "\\*", "g"), ":" + key + "--ESCAPED_PARAM_ASTERISKS").replace(new RegExp(":" + key + "\\?", "g"), ":" + key + "--ESCAPED_PARAM_QUESTION").replace(new RegExp(":" + key + "\\+", "g"), ":" + key + "--ESCAPED_PARAM_PLUS").replace(new RegExp(":" + key + "(?!\\w)", "g"), "--ESCAPED_PARAM_COLON" + key);
134
- }
135
- }
136
- value = value.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g, "\\$1").replace(/--ESCAPED_PARAM_PLUS/g, "+").replace(/--ESCAPED_PARAM_COLON/g, ":").replace(/--ESCAPED_PARAM_QUESTION/g, "?").replace(/--ESCAPED_PARAM_ASTERISKS/g, "*");
137
- // the value needs to start with a forward-slash to be compiled
138
- // correctly
139
- return (0, _pathtoregexp.compile)("/" + value, {
140
- validate: false
141
- })(params).slice(1);
142
- }
143
- function prepareDestination(args) {
144
- const query = Object.assign({}, args.query);
145
- delete query.__nextLocale;
146
- delete query.__nextDefaultLocale;
147
- delete query.__nextDataReq;
148
- delete query.__nextInferredLocaleFromDefault;
149
- delete query[_approuterheaders.NEXT_RSC_UNION_QUERY];
150
- let escapedDestination = args.destination;
151
- for (const param of Object.keys({
152
- ...args.params,
153
- ...query
154
- })){
155
- escapedDestination = escapeSegment(escapedDestination, param);
156
- }
157
- const parsedDestination = (0, _parseurl.parseUrl)(escapedDestination);
158
- const destQuery = parsedDestination.query;
159
- const destPath = unescapeSegments("" + parsedDestination.pathname + (parsedDestination.hash || ""));
160
- const destHostname = unescapeSegments(parsedDestination.hostname || "");
161
- const destPathParamKeys = [];
162
- const destHostnameParamKeys = [];
163
- (0, _pathtoregexp.pathToRegexp)(destPath, destPathParamKeys);
164
- (0, _pathtoregexp.pathToRegexp)(destHostname, destHostnameParamKeys);
165
- const destParams = [];
166
- destPathParamKeys.forEach((key)=>destParams.push(key.name));
167
- destHostnameParamKeys.forEach((key)=>destParams.push(key.name));
168
- const destPathCompiler = (0, _pathtoregexp.compile)(destPath, // we don't validate while compiling the destination since we should
169
- // have already validated before we got to this point and validating
170
- // breaks compiling destinations with named pattern params from the source
171
- // e.g. /something:hello(.*) -> /another/:hello is broken with validation
172
- // since compile validation is meant for reversing and not for inserting
173
- // params from a separate path-regex into another
174
- {
175
- validate: false
176
- });
177
- const destHostnameCompiler = (0, _pathtoregexp.compile)(destHostname, {
178
- validate: false
179
- });
180
- // update any params in query values
181
- for (const [key, strOrArray] of Object.entries(destQuery)){
182
- // the value needs to start with a forward-slash to be compiled
183
- // correctly
184
- if (Array.isArray(strOrArray)) {
185
- destQuery[key] = strOrArray.map((value)=>compileNonPath(unescapeSegments(value), args.params));
186
- } else if (typeof strOrArray === "string") {
187
- destQuery[key] = compileNonPath(unescapeSegments(strOrArray), args.params);
188
- }
189
- }
190
- // add path params to query if it's not a redirect and not
191
- // already defined in destination query or path
192
- let paramKeys = Object.keys(args.params).filter((name)=>name !== "nextInternalLocale");
193
- if (args.appendParamsToQuery && !paramKeys.some((key)=>destParams.includes(key))) {
194
- for (const key of paramKeys){
195
- if (!(key in destQuery)) {
196
- destQuery[key] = args.params[key];
197
- }
198
- }
199
- }
200
- let newUrl;
201
- // The compiler also that the interception route marker is an unnamed param, hence '0',
202
- // so we need to add it to the params object.
203
- if ((0, _interceptionroutes.isInterceptionRouteAppPath)(destPath)) {
204
- for (const segment of destPath.split("/")){
205
- const marker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));
206
- if (marker) {
207
- args.params["0"] = marker;
208
- break;
209
- }
210
- }
211
- }
212
- try {
213
- newUrl = destPathCompiler(args.params);
214
- const [pathname, hash] = newUrl.split("#");
215
- parsedDestination.hostname = destHostnameCompiler(args.params);
216
- parsedDestination.pathname = pathname;
217
- parsedDestination.hash = "" + (hash ? "#" : "") + (hash || "");
218
- delete parsedDestination.search;
219
- } catch (err) {
220
- if (err.message.match(/Expected .*? to not repeat, but got an array/)) {
221
- throw new Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");
222
- }
223
- throw err;
224
- }
225
- // Query merge order lowest priority to highest
226
- // 1. initial URL query values
227
- // 2. path segment values
228
- // 3. destination specified query values
229
- parsedDestination.query = {
230
- ...query,
231
- ...parsedDestination.query
232
- };
233
- return {
234
- newUrl,
235
- destQuery,
236
- parsedDestination
237
- };
238
- }
239
-
240
-
241
- } (prepareDestination));
242
- return prepareDestination;
243
- }
244
-
245
- export { requirePrepareDestination as __require };
@@ -1,80 +0,0 @@
1
- import { __exports as querystring } from '../../../../../../../_virtual/querystring.js';
2
-
3
- var hasRequiredQuerystring;
4
-
5
- function requireQuerystring () {
6
- if (hasRequiredQuerystring) return querystring;
7
- hasRequiredQuerystring = 1;
8
- (function (exports) {
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
- function _export(target, all) {
13
- for(var name in all)Object.defineProperty(target, name, {
14
- enumerable: true,
15
- get: all[name]
16
- });
17
- }
18
- _export(exports, {
19
- searchParamsToUrlQuery: function() {
20
- return searchParamsToUrlQuery;
21
- },
22
- urlQueryToSearchParams: function() {
23
- return urlQueryToSearchParams;
24
- },
25
- assign: function() {
26
- return assign;
27
- }
28
- });
29
- function searchParamsToUrlQuery(searchParams) {
30
- const query = {};
31
- searchParams.forEach((value, key)=>{
32
- if (typeof query[key] === "undefined") {
33
- query[key] = value;
34
- } else if (Array.isArray(query[key])) {
35
- query[key].push(value);
36
- } else {
37
- query[key] = [
38
- query[key],
39
- value
40
- ];
41
- }
42
- });
43
- return query;
44
- }
45
- function stringifyUrlQueryParam(param) {
46
- if (typeof param === "string" || typeof param === "number" && !isNaN(param) || typeof param === "boolean") {
47
- return String(param);
48
- } else {
49
- return "";
50
- }
51
- }
52
- function urlQueryToSearchParams(urlQuery) {
53
- const result = new URLSearchParams();
54
- Object.entries(urlQuery).forEach((param)=>{
55
- let [key, value] = param;
56
- if (Array.isArray(value)) {
57
- value.forEach((item)=>result.append(key, stringifyUrlQueryParam(item)));
58
- } else {
59
- result.set(key, stringifyUrlQueryParam(value));
60
- }
61
- });
62
- return result;
63
- }
64
- function assign(target) {
65
- for(var _len = arguments.length, searchParamsList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
66
- searchParamsList[_key - 1] = arguments[_key];
67
- }
68
- searchParamsList.forEach((searchParams)=>{
69
- Array.from(searchParams.keys()).forEach((key)=>target.delete(key));
70
- searchParams.forEach((value, key)=>target.append(key, value));
71
- });
72
- return target;
73
- }
74
-
75
-
76
- } (querystring));
77
- return querystring;
78
- }
79
-
80
- export { requireQuerystring as __require };
@@ -1,52 +0,0 @@
1
- import { __exports as removePathPrefix } from '../../../../../../../_virtual/remove-path-prefix.js';
2
- import { __require as requirePathHasPrefix } from './path-has-prefix.js';
3
-
4
- var hasRequiredRemovePathPrefix;
5
-
6
- function requireRemovePathPrefix () {
7
- if (hasRequiredRemovePathPrefix) return removePathPrefix;
8
- hasRequiredRemovePathPrefix = 1;
9
- (function (exports) {
10
- Object.defineProperty(exports, "__esModule", {
11
- value: true
12
- });
13
- Object.defineProperty(exports, "removePathPrefix", {
14
- enumerable: true,
15
- get: function() {
16
- return removePathPrefix;
17
- }
18
- });
19
- const _pathhasprefix = requirePathHasPrefix();
20
- function removePathPrefix(path, prefix) {
21
- // If the path doesn't start with the prefix we can return it as is. This
22
- // protects us from situations where the prefix is a substring of the path
23
- // prefix such as:
24
- //
25
- // For prefix: /blog
26
- //
27
- // /blog -> true
28
- // /blog/ -> true
29
- // /blog/1 -> true
30
- // /blogging -> false
31
- // /blogging/ -> false
32
- // /blogging/1 -> false
33
- if (!(0, _pathhasprefix.pathHasPrefix)(path, prefix)) {
34
- return path;
35
- }
36
- // Remove the prefix from the path via slicing.
37
- const withoutPrefix = path.slice(prefix.length);
38
- // If the path without the prefix starts with a `/` we can return it as is.
39
- if (withoutPrefix.startsWith("/")) {
40
- return withoutPrefix;
41
- }
42
- // If the path without the prefix doesn't start with a `/` we need to add it
43
- // back to the path to make sure it's a valid path.
44
- return "/" + withoutPrefix;
45
- }
46
-
47
-
48
- } (removePathPrefix));
49
- return removePathPrefix;
50
- }
51
-
52
- export { requireRemovePathPrefix as __require };