@prezly/theme-kit-nextjs 2.0.1-1 → 2.1.0

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 (259) hide show
  1. package/README.md +15 -15
  2. package/build/adapter-nextjs/api-handlers/fetchGalleries.js +21 -31
  3. package/build/adapter-nextjs/api-handlers/fetchGalleries.js.map +1 -1
  4. package/build/adapter-nextjs/api-handlers/fetchStories.js +23 -41
  5. package/build/adapter-nextjs/api-handlers/fetchStories.js.map +1 -1
  6. package/build/adapter-nextjs/api-handlers/index.js +7 -18
  7. package/build/adapter-nextjs/api-handlers/index.js.map +1 -1
  8. package/build/adapter-nextjs/getNewsroomServerSideProps.js +13 -20
  9. package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -1
  10. package/build/adapter-nextjs/getNewsroomStaticProps.js +13 -19
  11. package/build/adapter-nextjs/getNewsroomStaticProps.js.map +1 -1
  12. package/build/adapter-nextjs/index.js +21 -69
  13. package/build/adapter-nextjs/index.js.map +1 -1
  14. package/build/adapter-nextjs/page-props/category.js +96 -122
  15. package/build/adapter-nextjs/page-props/category.js.map +1 -1
  16. package/build/adapter-nextjs/page-props/gallery.js +65 -91
  17. package/build/adapter-nextjs/page-props/gallery.js.map +1 -1
  18. package/build/adapter-nextjs/page-props/galleryAlbum.js +49 -68
  19. package/build/adapter-nextjs/page-props/galleryAlbum.js.map +1 -1
  20. package/build/adapter-nextjs/page-props/home.js +66 -87
  21. package/build/adapter-nextjs/page-props/home.js.map +1 -1
  22. package/build/adapter-nextjs/page-props/index.js +40 -136
  23. package/build/adapter-nextjs/page-props/index.js.map +1 -1
  24. package/build/adapter-nextjs/page-props/lib/types.js +3 -1
  25. package/build/adapter-nextjs/page-props/search.js +28 -29
  26. package/build/adapter-nextjs/page-props/search.js.map +1 -1
  27. package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js +46 -32
  28. package/build/adapter-nextjs/page-props/sitemap/SitemapBuilder.js.map +1 -1
  29. package/build/adapter-nextjs/page-props/sitemap/createPaths.js +17 -17
  30. package/build/adapter-nextjs/page-props/sitemap/createPaths.js.map +1 -1
  31. package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js +33 -37
  32. package/build/adapter-nextjs/page-props/sitemap/getServerSideProps.js.map +1 -1
  33. package/build/adapter-nextjs/page-props/sitemap/index.js +23 -41
  34. package/build/adapter-nextjs/page-props/sitemap/index.js.map +1 -1
  35. package/build/adapter-nextjs/page-props/sitemap/types.js +3 -1
  36. package/build/adapter-nextjs/page-props/story.js +60 -81
  37. package/build/adapter-nextjs/page-props/story.js.map +1 -1
  38. package/build/adapter-nextjs/page-props/storyPreview.js +24 -31
  39. package/build/adapter-nextjs/page-props/storyPreview.js.map +1 -1
  40. package/build/adapter-nextjs/processRequest.js +23 -38
  41. package/build/adapter-nextjs/processRequest.js.map +1 -1
  42. package/build/adapter-nextjs/processStaticRequest.js +14 -23
  43. package/build/adapter-nextjs/processStaticRequest.js.map +1 -1
  44. package/build/components-nextjs/PageSeo/PageSeo.js +77 -89
  45. package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -1
  46. package/build/components-nextjs/PageSeo/index.js +19 -25
  47. package/build/components-nextjs/PageSeo/index.js.map +1 -1
  48. package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +8 -9
  49. package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -1
  50. package/build/components-nextjs/PageSeo/lib/types.js +3 -1
  51. package/build/components-nextjs/StorySeo/StorySeo.js +46 -74
  52. package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -1
  53. package/build/components-nextjs/StorySeo/index.js +5 -11
  54. package/build/components-nextjs/StorySeo/index.js.map +1 -1
  55. package/build/components-nextjs/document.js +44 -36
  56. package/build/components-nextjs/document.js.map +1 -1
  57. package/build/components-nextjs/index.js +9 -25
  58. package/build/components-nextjs/index.js.map +1 -1
  59. package/build/data-fetching/api/PrezlyApi.js +187 -210
  60. package/build/data-fetching/api/PrezlyApi.js.map +1 -1
  61. package/build/data-fetching/api/getPrezlyApi.js +19 -25
  62. package/build/data-fetching/api/getPrezlyApi.js.map +1 -1
  63. package/build/data-fetching/api/index.js +16 -14
  64. package/build/data-fetching/api/index.js.map +1 -1
  65. package/build/data-fetching/api/queries.js +41 -80
  66. package/build/data-fetching/api/queries.js.map +1 -1
  67. package/build/data-fetching/index.js +18 -36
  68. package/build/data-fetching/index.js.map +1 -1
  69. package/build/data-fetching/lib/getAlgoliaSettings.js +20 -26
  70. package/build/data-fetching/lib/getAlgoliaSettings.js.map +1 -1
  71. package/build/data-fetching/lib/getEnvVariables.js +36 -40
  72. package/build/data-fetching/lib/getEnvVariables.js.map +1 -1
  73. package/build/data-fetching/lib/index.js +11 -32
  74. package/build/data-fetching/lib/index.js.map +1 -1
  75. package/build/data-fetching/lib/isSdkError.js +6 -7
  76. package/build/data-fetching/lib/isSdkError.js.map +1 -1
  77. package/build/data-fetching/lib/isUuid.js +6 -7
  78. package/build/data-fetching/lib/isUuid.js.map +1 -1
  79. package/build/data-fetching/types.js +3 -1
  80. package/build/index.js +25 -103
  81. package/build/index.js.map +1 -1
  82. package/build/infinite-loading/index.js +23 -41
  83. package/build/infinite-loading/index.js.map +1 -1
  84. package/build/infinite-loading/types.js +3 -1
  85. package/build/infinite-loading/useInfiniteGalleriesLoading.js +35 -46
  86. package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
  87. package/build/infinite-loading/useInfiniteLoading.js +41 -54
  88. package/build/infinite-loading/useInfiniteLoading.js.map +1 -1
  89. package/build/infinite-loading/useInfiniteStoriesLoading.js +48 -60
  90. package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
  91. package/build/intl/index.d.ts +1 -1
  92. package/build/intl/index.js +24 -47
  93. package/build/intl/index.js.map +1 -1
  94. package/build/intl/languages.js +110 -150
  95. package/build/intl/languages.js.map +1 -1
  96. package/build/intl/locale.d.ts +1 -0
  97. package/build/intl/locale.js +104 -58
  98. package/build/intl/locale.js.map +1 -1
  99. package/build/intl/localeConfig.d.ts +2 -3
  100. package/build/intl/localeConfig.js +13 -28
  101. package/build/intl/localeConfig.js.map +1 -1
  102. package/build/intl/localeList.d.ts +2 -4
  103. package/build/intl/localeList.js +108 -7
  104. package/build/intl/localeList.js.map +1 -1
  105. package/build/intl/localeObject.js +78 -83
  106. package/build/intl/localeObject.js.map +1 -1
  107. package/build/newsroom-context/context.js +24 -42
  108. package/build/newsroom-context/context.js.map +1 -1
  109. package/build/newsroom-context/hooks/index.js +27 -125
  110. package/build/newsroom-context/hooks/index.js.map +1 -1
  111. package/build/newsroom-context/hooks/useAlgoliaSettings.js +8 -9
  112. package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
  113. package/build/newsroom-context/hooks/useCategories.js +8 -9
  114. package/build/newsroom-context/hooks/useCategories.js.map +1 -1
  115. package/build/newsroom-context/hooks/useCompanyInformation.js +8 -9
  116. package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
  117. package/build/newsroom-context/hooks/useCurrentCategory.js +8 -9
  118. package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
  119. package/build/newsroom-context/hooks/useCurrentLocale.js +8 -9
  120. package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
  121. package/build/newsroom-context/hooks/useCurrentStory.js +8 -9
  122. package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -1
  123. package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js +19 -21
  124. package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
  125. package/build/newsroom-context/hooks/useGetTranslationUrl.js +54 -56
  126. package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
  127. package/build/newsroom-context/hooks/useLanguages.js +8 -9
  128. package/build/newsroom-context/hooks/useLanguages.js.map +1 -1
  129. package/build/newsroom-context/hooks/useNewsroom.js +8 -9
  130. package/build/newsroom-context/hooks/useNewsroom.js.map +1 -1
  131. package/build/newsroom-context/hooks/useNewsroomContext.js +14 -15
  132. package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
  133. package/build/newsroom-context/index.d.ts +1 -2
  134. package/build/newsroom-context/index.js +20 -32
  135. package/build/newsroom-context/index.js.map +1 -1
  136. package/build/sentry/client.js +7 -8
  137. package/build/sentry/client.js.map +1 -1
  138. package/build/sentry/common.js +27 -30
  139. package/build/sentry/common.js.map +1 -1
  140. package/build/sentry/index.js +7 -18
  141. package/build/sentry/index.js.map +1 -1
  142. package/build/sentry/server.js +7 -8
  143. package/build/sentry/server.js.map +1 -1
  144. package/build/tsconfig.tsbuildinfo +1 -0
  145. package/build/types.js +3 -1
  146. package/build/utils/boilerplate.js +18 -11
  147. package/build/utils/boilerplate.js.map +1 -1
  148. package/build/utils/constants.js +6 -11
  149. package/build/utils/constants.js.map +1 -1
  150. package/build/utils/getAssetsUrl.js +7 -8
  151. package/build/utils/getAssetsUrl.js.map +1 -1
  152. package/build/utils/getDataRequestLink.js +10 -10
  153. package/build/utils/getDataRequestLink.js.map +1 -1
  154. package/build/utils/getLocalizedCategoryData.js +29 -37
  155. package/build/utils/getLocalizedCategoryData.js.map +1 -1
  156. package/build/utils/getNewsroomLogoUrl.js +18 -19
  157. package/build/utils/getNewsroomLogoUrl.js.map +1 -1
  158. package/build/utils/getPrivacyPortalUrl.js +11 -15
  159. package/build/utils/getPrivacyPortalUrl.js.map +1 -1
  160. package/build/utils/getStoryPublicationDate.js +12 -13
  161. package/build/utils/getStoryPublicationDate.js.map +1 -1
  162. package/build/utils/getUploadcareGroupUrl.js +8 -9
  163. package/build/utils/getUploadcareGroupUrl.js.map +1 -1
  164. package/build/utils/index.js +26 -114
  165. package/build/utils/index.js.map +1 -1
  166. package/build/utils/isEmbargoStory.js +6 -7
  167. package/build/utils/isEmbargoStory.js.map +1 -1
  168. package/package.json +12 -26
  169. package/src/@types/global.d.ts +7 -0
  170. package/src/__mocks__/languages.ts +416 -0
  171. package/src/__mocks__/story.ts +359 -0
  172. package/src/adapter-nextjs/api-handlers/fetchGalleries.ts +24 -0
  173. package/src/adapter-nextjs/api-handlers/fetchStories.ts +26 -0
  174. package/src/adapter-nextjs/api-handlers/index.ts +2 -0
  175. package/src/adapter-nextjs/getNewsroomServerSideProps.ts +29 -0
  176. package/src/adapter-nextjs/getNewsroomStaticProps.ts +29 -0
  177. package/src/adapter-nextjs/index.ts +6 -0
  178. package/src/adapter-nextjs/page-props/category.ts +157 -0
  179. package/src/adapter-nextjs/page-props/gallery.ts +114 -0
  180. package/src/adapter-nextjs/page-props/galleryAlbum.ts +89 -0
  181. package/src/adapter-nextjs/page-props/home.ts +113 -0
  182. package/src/adapter-nextjs/page-props/index.ts +26 -0
  183. package/src/adapter-nextjs/page-props/lib/types.ts +8 -0
  184. package/src/adapter-nextjs/page-props/search.ts +53 -0
  185. package/src/adapter-nextjs/page-props/sitemap/SitemapBuilder.ts +56 -0
  186. package/src/adapter-nextjs/page-props/sitemap/createPaths.ts +21 -0
  187. package/src/adapter-nextjs/page-props/sitemap/getServerSideProps.ts +43 -0
  188. package/src/adapter-nextjs/page-props/sitemap/index.ts +5 -0
  189. package/src/adapter-nextjs/page-props/sitemap/types.ts +5 -0
  190. package/src/adapter-nextjs/page-props/story.ts +94 -0
  191. package/src/adapter-nextjs/page-props/storyPreview.ts +33 -0
  192. package/src/adapter-nextjs/processRequest.ts +49 -0
  193. package/src/adapter-nextjs/processStaticRequest.ts +32 -0
  194. package/src/components-nextjs/PageSeo/PageSeo.tsx +131 -0
  195. package/src/components-nextjs/PageSeo/index.ts +2 -0
  196. package/src/components-nextjs/PageSeo/lib/getAbsoluteUrl.ts +7 -0
  197. package/src/components-nextjs/PageSeo/lib/types.ts +4 -0
  198. package/src/components-nextjs/StorySeo/StorySeo.tsx +80 -0
  199. package/src/components-nextjs/StorySeo/index.ts +1 -0
  200. package/src/components-nextjs/document.tsx +38 -0
  201. package/src/components-nextjs/index.ts +3 -0
  202. package/src/data-fetching/api/PrezlyApi.ts +304 -0
  203. package/src/data-fetching/api/getPrezlyApi.ts +24 -0
  204. package/src/data-fetching/api/index.ts +1 -0
  205. package/src/data-fetching/api/queries.ts +51 -0
  206. package/src/data-fetching/index.ts +3 -0
  207. package/src/data-fetching/lib/getAlgoliaSettings.ts +29 -0
  208. package/src/data-fetching/lib/getEnvVariables.ts +46 -0
  209. package/src/data-fetching/lib/index.ts +4 -0
  210. package/src/data-fetching/lib/isSdkError.ts +5 -0
  211. package/src/data-fetching/lib/isUuid.ts +5 -0
  212. package/src/data-fetching/types.ts +14 -0
  213. package/src/index.ts +9 -0
  214. package/src/infinite-loading/index.ts +4 -0
  215. package/src/infinite-loading/types.ts +5 -0
  216. package/src/infinite-loading/useInfiniteGalleriesLoading.ts +53 -0
  217. package/src/infinite-loading/useInfiniteLoading.ts +66 -0
  218. package/src/infinite-loading/useInfiniteStoriesLoading.ts +81 -0
  219. package/src/intl/index.ts +4 -0
  220. package/src/intl/languages.test.ts +232 -0
  221. package/src/intl/languages.ts +233 -0
  222. package/src/intl/locale.test.ts +95 -0
  223. package/src/intl/locale.ts +140 -0
  224. package/src/intl/localeConfig.js +23 -0
  225. package/src/intl/localeList.js +110 -0
  226. package/src/intl/localeObject.test.ts +81 -0
  227. package/src/intl/localeObject.ts +99 -0
  228. package/src/newsroom-context/context.tsx +115 -0
  229. package/src/newsroom-context/hooks/index.ts +11 -0
  230. package/src/newsroom-context/hooks/useAlgoliaSettings.ts +7 -0
  231. package/src/newsroom-context/hooks/useCategories.ts +7 -0
  232. package/src/newsroom-context/hooks/useCompanyInformation.ts +7 -0
  233. package/src/newsroom-context/hooks/useCurrentCategory.ts +7 -0
  234. package/src/newsroom-context/hooks/useCurrentLocale.ts +7 -0
  235. package/src/newsroom-context/hooks/useCurrentStory.ts +7 -0
  236. package/src/newsroom-context/hooks/useGetLinkLocaleSlug.ts +37 -0
  237. package/src/newsroom-context/hooks/useGetTranslationUrl.ts +97 -0
  238. package/src/newsroom-context/hooks/useLanguages.ts +7 -0
  239. package/src/newsroom-context/hooks/useNewsroom.ts +7 -0
  240. package/src/newsroom-context/hooks/useNewsroomContext.ts +15 -0
  241. package/src/newsroom-context/index.ts +2 -0
  242. package/src/sentry/client.ts +7 -0
  243. package/src/sentry/common.ts +27 -0
  244. package/src/sentry/index.ts +2 -0
  245. package/src/sentry/server.ts +7 -0
  246. package/src/types.ts +51 -0
  247. package/src/utils/boilerplate.ts +27 -0
  248. package/src/utils/constants.ts +3 -0
  249. package/src/utils/getAssetsUrl.test.ts +9 -0
  250. package/src/utils/getAssetsUrl.ts +9 -0
  251. package/src/utils/getDataRequestLink.ts +14 -0
  252. package/src/utils/getLocalizedCategoryData.ts +47 -0
  253. package/src/utils/getNewsroomLogoUrl.ts +22 -0
  254. package/src/utils/getPrivacyPortalUrl.ts +25 -0
  255. package/src/utils/getStoryPublicationDate.tsx +15 -0
  256. package/src/utils/getUploadcareGroupUrl.ts +13 -0
  257. package/src/utils/index.ts +10 -0
  258. package/src/utils/isEmbargoStory.ts +10 -0
  259. package/build/@types/global.d.js +0 -1
@@ -1,90 +1,51 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getContactsQuery = getContactsQuery;
7
- exports.getGalleriesQuery = getGalleriesQuery;
8
- exports.getSlugQuery = getSlugQuery;
9
- exports.getSortByPublishedDate = getSortByPublishedDate;
10
- exports.getStoriesQuery = getStoriesQuery;
11
- const publishedAndAccessible = [{
12
- lifecycle_status: {
13
- $in: ['published', 'embargo']
14
- }
15
- }, {
16
- visibility: {
17
- $in: ['public', 'private', 'embargo']
18
- }
19
- }];
20
- const publishedAndPublic = [{
21
- lifecycle_status: {
22
- $in: ['published']
23
- }
24
- }, {
25
- visibility: {
26
- $in: ['public']
27
- }
28
- }];
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getContactsQuery = exports.getGalleriesQuery = exports.getSortByPublishedDate = exports.getStoriesQuery = exports.getSlugQuery = void 0;
4
+ const publishedAndAccessible = [
5
+ { lifecycle_status: { $in: ['published', 'embargo'] } },
6
+ { visibility: { $in: ['public', 'private', 'embargo'] } },
7
+ ];
8
+ const publishedAndPublic = [
9
+ { lifecycle_status: { $in: ['published'] } },
10
+ { visibility: { $in: ['public'] } },
11
+ ];
29
12
  function getSlugQuery(newsroomUuid, slug) {
30
- return {
31
- $and: [{
32
- 'newsroom.uuid': {
33
- $in: [newsroomUuid]
34
- }
35
- }, {
36
- slug: {
37
- $eq: slug
38
- }
39
- }, ...publishedAndAccessible]
40
- };
13
+ return {
14
+ $and: [
15
+ { 'newsroom.uuid': { $in: [newsroomUuid] } },
16
+ { slug: { $eq: slug } },
17
+ ...publishedAndAccessible,
18
+ ],
19
+ };
41
20
  }
21
+ exports.getSlugQuery = getSlugQuery;
42
22
  function getStoriesQuery(newsroomUuid, categoryId, localeCode) {
43
- const query = {
44
- $and: [...publishedAndPublic, {
45
- 'newsroom.uuid': {
46
- $in: [newsroomUuid]
47
- }
48
- }]
49
- };
50
- if (categoryId) {
51
- query.$and.push({
52
- 'category.id': {
53
- $any: [categoryId]
54
- }
55
- });
56
- }
57
- if (localeCode) {
58
- query.$and.push({
59
- locale: {
60
- $in: [localeCode]
61
- }
62
- });
63
- }
64
- return query;
23
+ const query = {
24
+ $and: [...publishedAndPublic, { 'newsroom.uuid': { $in: [newsroomUuid] } }],
25
+ };
26
+ if (categoryId) {
27
+ query.$and.push({ 'category.id': { $any: [categoryId] } });
28
+ }
29
+ if (localeCode) {
30
+ query.$and.push({ locale: { $in: [localeCode] } });
31
+ }
32
+ return query;
65
33
  }
34
+ exports.getStoriesQuery = getStoriesQuery;
66
35
  function getSortByPublishedDate(order) {
67
- return order === 'desc' ? '-published_at' : 'published_at';
36
+ return order === 'desc' ? '-published_at' : 'published_at';
68
37
  }
38
+ exports.getSortByPublishedDate = getSortByPublishedDate;
69
39
  function getGalleriesQuery() {
70
- return {
71
- $and: [{
72
- status: {
73
- $eq: 'public'
74
- }
75
- }, {
76
- images_number: {
77
- $gt: 0
78
- }
79
- }]
80
- };
40
+ return {
41
+ $and: [{ status: { $eq: 'public' } }, { images_number: { $gt: 0 } }],
42
+ };
81
43
  }
44
+ exports.getGalleriesQuery = getGalleriesQuery;
82
45
  function getContactsQuery() {
83
- return {
84
- $and: [{
85
- is_featured: {
86
- $eq: true
87
- }
88
- }]
89
- };
90
- }
46
+ return {
47
+ $and: [{ is_featured: { $eq: true } }],
48
+ };
49
+ }
50
+ exports.getContactsQuery = getContactsQuery;
51
+ //# sourceMappingURL=queries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/data-fetching/api/queries.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG;IAC3B,EAAE,gBAAgB,EAAE,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE;IACvD,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,EAAE;CAC5D,CAAC;AAEF,MAAM,kBAAkB,GAAG;IACvB,EAAE,gBAAgB,EAAE,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE;IAC5C,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;CACtC,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,YAAoB,EAAE,IAAY;IAC3D,OAAO;QACH,IAAI,EAAE;YACF,EAAE,eAAe,EAAE,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE;YAC5C,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACvB,GAAG,sBAAsB;SAC5B;KACJ,CAAC;AACN,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,YAAoB,EAAE,UAAmB,EAAE,UAAmB;IAC1F,MAAM,KAAK,GAAQ;QACf,IAAI,EAAE,CAAC,GAAG,kBAAkB,EAAE,EA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E,QAAQ,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;KACvE,CAAC;AACN,CAAC;AAJD,8CAIC;AAED,SAAgB,gBAAgB;IAC5B,OAAO;QACH,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC;KACzC,CAAC;AACN,CAAC;AAJD,4CAIC"}
@@ -1,38 +1,20 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _index = require("./api/index.js");
7
- Object.keys(_index).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _index[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _index[key];
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
7
  }
15
- });
16
- });
17
- var _index2 = require("./lib/index.js");
18
- Object.keys(_index2).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _index2[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _index2[key];
25
- }
26
- });
27
- });
28
- var _types = require("./types.js");
29
- Object.keys(_types).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _types[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _types[key];
36
- }
37
- });
38
- });
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./api"), exports);
18
+ __exportStar(require("./lib"), exports);
19
+ __exportStar(require("./types"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data-fetching/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data-fetching/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,wCAAsB;AACtB,0CAAwB"}
@@ -1,28 +1,22 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getAlgoliaSettings = getAlgoliaSettings;
7
- var _getEnvVariables = require("./getEnvVariables.js");
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAlgoliaSettings = void 0;
4
+ const getEnvVariables_1 = require("./getEnvVariables");
8
5
  function getAlgoliaSettings(req) {
9
- if (typeof window !== 'undefined') {
10
- throw new Error('"getAlgoliaSettings" should only be used on back-end side.');
11
- }
12
-
13
- // `getEnvVariables` handles both cases for envs parsing - .env and request headers
14
- const {
15
- ALGOLIA_API_KEY = '',
16
- ALGOLIA_APP_ID = 'UI4CNRAHQB',
17
- ALGOLIA_INDEX = 'public_stories_prod'
18
- } = (0, _getEnvVariables.getEnvVariables)(req);
19
- if (!ALGOLIA_API_KEY) {
20
- // eslint-disable-next-line no-console
21
- console.error('"ALGOLIA_API_KEY" is not set in env variables. Search will not be enabled');
22
- }
23
- return {
24
- ALGOLIA_API_KEY,
25
- ALGOLIA_APP_ID,
26
- ALGOLIA_INDEX
27
- };
28
- }
6
+ if (typeof window !== 'undefined') {
7
+ throw new Error('"getAlgoliaSettings" should only be used on back-end side.');
8
+ }
9
+ // `getEnvVariables` handles both cases for envs parsing - .env and request headers
10
+ const { ALGOLIA_API_KEY = '', ALGOLIA_APP_ID = 'UI4CNRAHQB', ALGOLIA_INDEX = 'public_stories_prod', } = (0, getEnvVariables_1.getEnvVariables)(req);
11
+ if (!ALGOLIA_API_KEY) {
12
+ // eslint-disable-next-line no-console
13
+ console.error('"ALGOLIA_API_KEY" is not set in env variables. Search will not be enabled');
14
+ }
15
+ return {
16
+ ALGOLIA_API_KEY,
17
+ ALGOLIA_APP_ID,
18
+ ALGOLIA_INDEX,
19
+ };
20
+ }
21
+ exports.getAlgoliaSettings = getAlgoliaSettings;
22
+ //# sourceMappingURL=getAlgoliaSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAlgoliaSettings.js","sourceRoot":"","sources":["../../../src/data-fetching/lib/getAlgoliaSettings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,kBAAkB,CAAC,GAAqB;IACpD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KACjF;IAED,mFAAmF;IACnF,MAAM,EACF,eAAe,GAAG,EAAE,EACpB,cAAc,GAAG,YAAY,EAC7B,aAAa,GAAG,qBAAqB,GACxC,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IAEzB,IAAI,CAAC,eAAe,EAAE;QAClB,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,2EAA2E,CAAC,CAAC;KAC9F;IAED,OAAO;QACH,eAAe;QACf,cAAc;QACd,aAAa;KAChB,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"getAlgoliaSettings.js","sourceRoot":"","sources":["../../../src/data-fetching/lib/getAlgoliaSettings.ts"],"names":[],"mappings":";;;AAIA,uDAAoD;AAEpD,SAAgB,kBAAkB,CAAC,GAAqB;IACpD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KACjF;IAED,mFAAmF;IACnF,MAAM,EACF,eAAe,GAAG,EAAE,EACpB,cAAc,GAAG,YAAY,EAC7B,aAAa,GAAG,qBAAqB,GACxC,GAAG,IAAA,iCAAe,EAAC,GAAG,CAAC,CAAC;IAEzB,IAAI,CAAC,eAAe,EAAE;QAClB,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,2EAA2E,CAAC,CAAC;KAC9F;IAED,OAAO;QACH,eAAe;QACf,cAAc;QACd,aAAa;KAChB,CAAC;AACN,CAAC;AAtBD,gDAsBC"}
@@ -1,48 +1,44 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getEnvVariables = getEnvVariables;
7
- var _parseDataUrl = _interopRequireDefault(require("parse-data-url"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getEnvVariables = void 0;
7
+ const parse_data_url_1 = __importDefault(require("parse-data-url"));
9
8
  function decodeJson(json) {
10
- try {
11
- const decoded = JSON.parse(json);
12
- if (decoded && typeof decoded === 'object') {
13
- return decoded;
9
+ try {
10
+ const decoded = JSON.parse(json);
11
+ if (decoded && typeof decoded === 'object') {
12
+ return decoded;
13
+ }
14
+ }
15
+ catch {
16
+ // passthru
14
17
  }
15
- } catch {
16
- // passthru
17
- }
18
- return {};
18
+ return {};
19
19
  }
20
20
  function decodeHttpEnv(header) {
21
- if (header.startsWith('data:')) {
22
- const parsed = (0, _parseDataUrl.default)(header);
23
- if (parsed && parsed.contentType === 'application/json') {
24
- const data = parsed.toBuffer().toString('utf-8');
25
- return decodeJson(data);
21
+ if (header.startsWith('data:')) {
22
+ const parsed = (0, parse_data_url_1.default)(header);
23
+ if (parsed && parsed.contentType === 'application/json') {
24
+ const data = parsed.toBuffer().toString('utf-8');
25
+ return decodeJson(data);
26
+ }
27
+ return {}; // unsupported data-uri
26
28
  }
27
- return {}; // unsupported data-uri
28
- }
29
-
30
- return decodeJson(header);
29
+ return decodeJson(header);
31
30
  }
32
31
  function getEnvVariables(req) {
33
- if (typeof window !== 'undefined') {
34
- throw new Error('"getEnvVariables" should only be used on back-end side.');
35
- }
36
- const headerName = (process.env.HTTP_ENV_HEADER || '').toLowerCase();
37
- if (headerName && req) {
38
- const header = req.headers[headerName];
39
- const httpEnv = decodeHttpEnv(header || '');
40
- return {
41
- ...process.env,
42
- ...httpEnv
43
- };
44
- }
45
- return {
46
- ...process.env
47
- };
48
- }
32
+ if (typeof window !== 'undefined') {
33
+ throw new Error('"getEnvVariables" should only be used on back-end side.');
34
+ }
35
+ const headerName = (process.env.HTTP_ENV_HEADER || '').toLowerCase();
36
+ if (headerName && req) {
37
+ const header = req.headers[headerName];
38
+ const httpEnv = decodeHttpEnv(header || '');
39
+ return { ...process.env, ...httpEnv };
40
+ }
41
+ return { ...process.env };
42
+ }
43
+ exports.getEnvVariables = getEnvVariables;
44
+ //# sourceMappingURL=getEnvVariables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getEnvVariables.js","sourceRoot":"","sources":["../../../src/data-fetching/lib/getEnvVariables.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAI1C,SAAS,UAAU,CAAC,IAAY;IAC5B,IAAI;QACA,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YACxC,OAAO,OAAO,CAAC;SAClB;KACJ;IAAC,MAAM;QACJ,WAAW;KACd;IACD,OAAO,EAAE,CAAC;AACd,CAAC;AAED,SAAS,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ports, "getAlgoliaSettings", {
7
- enumerable: true,
8
- get: function () {
9
- return _getAlgoliaSettings.getAlgoliaSettings;
10
- }
11
- });
12
- Object.defineProperty(exports, "getEnvVariables", {
13
- enumerable: true,
14
- get: function () {
15
- return _getEnvVariables.getEnvVariables;
16
- }
17
- });
18
- Object.defineProperty(exports, "isSdkError", {
19
- enumerable: true,
20
- get: function () {
21
- return _isSdkError.isSdkError;
22
- }
23
- });
24
- Object.defineProperty(exports, "isUuid", {
25
- enumerable: true,
26
- get: function () {
27
- return _isUuid.isUuid;
28
- }
29
- });
30
- var _getAlgoliaSettings = require("./getAlgoliaSettings.js");
31
- var _getEnvVariables = require("./getEnvVariables.js");
32
- var _isSdkError = require("./isSdkError.js");
33
- var _isUuid = require("./isUuid.js");
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUuid = exports.isSdkError = exports.getEnvVariables = exports.getAlgoliaSettings = void 0;
4
+ var getAlgoliaSettings_1 = require("./getAlgoliaSettings");
5
+ Object.defineProperty(exports, "getAlgoliaSettings", { enumerable: true, get: function () { return getAlgoliaSettings_1.getAlgoliaSettings; } });
6
+ var getEnvVariables_1 = require("./getEnvVariables");
7
+ Object.defineProperty(exports, "getEnvVariables", { enumerable: true, get: function () { return getEnvVariables_1.getEnvVariables; } });
8
+ var isSdkError_1 = require("./isSdkError");
9
+ Object.defineProperty(exports, "isSdkError", { enumerable: true, get: function () { return isSdkError_1.isSdkError; } });
10
+ var isUuid_1 = require("./isUuid");
11
+ Object.defineProperty(exports, "isUuid", { enumerable: true, get: function () { return isUuid_1.isUuid; } });
12
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-fetching/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-fetching/lib/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isSdkError = isSdkError;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isSdkError = void 0;
7
4
  function isSdkError(error) {
8
- return 'payload' in error;
9
- }
5
+ return 'payload' in error;
6
+ }
7
+ exports.isSdkError = isSdkError;
8
+ //# sourceMappingURL=isSdkError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isSdkError.js","sourceRoot":"","sources":["../../../src/data-fetching/lib/isSdkError.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,UAAU,CAAC,KAAU;IACjC,OAAO,SAAS,IAAI,KAAK,CAAC;AAC9B,CAAC"}
1
+ {"version":3,"file":"isSdkError.js","sourceRoot":"","sources":["../../../src/data-fetching/lib/isSdkError.ts"],"names":[],"mappings":";;;AAEA,SAAgB,UAAU,CAAC,KAAU;IACjC,OAAO,SAAS,IAAI,KAAK,CAAC;AAC9B,CAAC;AAFD,gCAEC"}
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isUuid = isUuid;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUuid = void 0;
7
4
  const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
8
5
  function isUuid(input) {
9
- return UUID_REGEX.test(input);
10
- }
6
+ return UUID_REGEX.test(input);
7
+ }
8
+ exports.isUuid = isUuid;
9
+ //# sourceMappingURL=isUuid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isUuid.js","sourceRoot":"","sources":["../../../src/data-fetching/lib/isUuid.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,gEAAgE,CAAC;AAEpF,MAAM,UAAU,MAAM,CAAC,KAAa;IAChC,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC"}
1
+ {"version":3,"file":"isUuid.js","sourceRoot":"","sources":["../../../src/data-fetching/lib/isUuid.ts"],"names":[],"mappings":";;;AAAA,MAAM,UAAU,GAAG,gEAAgE,CAAC;AAEpF,SAAgB,MAAM,CAAC,KAAa;IAChC,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAFD,wBAEC"}
@@ -1 +1,3 @@
1
- "use strict";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
package/build/index.js CHANGED
@@ -1,104 +1,26 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _index = require("./adapter-nextjs/index.js");
7
- Object.keys(_index).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _index[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _index[key];
14
- }
15
- });
16
- });
17
- var _index2 = require("./components-nextjs/index.js");
18
- Object.keys(_index2).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _index2[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _index2[key];
25
- }
26
- });
27
- });
28
- var _index3 = require("./data-fetching/index.js");
29
- Object.keys(_index3).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _index3[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _index3[key];
36
- }
37
- });
38
- });
39
- var _index4 = require("./infinite-loading/index.js");
40
- Object.keys(_index4).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _index4[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function () {
46
- return _index4[key];
47
- }
48
- });
49
- });
50
- var _index5 = require("./intl/index.js");
51
- Object.keys(_index5).forEach(function (key) {
52
- if (key === "default" || key === "__esModule") return;
53
- if (key in exports && exports[key] === _index5[key]) return;
54
- Object.defineProperty(exports, key, {
55
- enumerable: true,
56
- get: function () {
57
- return _index5[key];
58
- }
59
- });
60
- });
61
- var _index6 = require("./newsroom-context/index.js");
62
- Object.keys(_index6).forEach(function (key) {
63
- if (key === "default" || key === "__esModule") return;
64
- if (key in exports && exports[key] === _index6[key]) return;
65
- Object.defineProperty(exports, key, {
66
- enumerable: true,
67
- get: function () {
68
- return _index6[key];
69
- }
70
- });
71
- });
72
- var _index7 = require("./sentry/index.js");
73
- Object.keys(_index7).forEach(function (key) {
74
- if (key === "default" || key === "__esModule") return;
75
- if (key in exports && exports[key] === _index7[key]) return;
76
- Object.defineProperty(exports, key, {
77
- enumerable: true,
78
- get: function () {
79
- return _index7[key];
80
- }
81
- });
82
- });
83
- var _types = require("./types.js");
84
- Object.keys(_types).forEach(function (key) {
85
- if (key === "default" || key === "__esModule") return;
86
- if (key in exports && exports[key] === _types[key]) return;
87
- Object.defineProperty(exports, key, {
88
- enumerable: true,
89
- get: function () {
90
- return _types[key];
91
- }
92
- });
93
- });
94
- var _index8 = require("./utils/index.js");
95
- Object.keys(_index8).forEach(function (key) {
96
- if (key === "default" || key === "__esModule") return;
97
- if (key in exports && exports[key] === _index8[key]) return;
98
- Object.defineProperty(exports, key, {
99
- enumerable: true,
100
- get: function () {
101
- return _index8[key];
102
- }
103
- });
104
- });
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./adapter-nextjs"), exports);
18
+ __exportStar(require("./components-nextjs"), exports);
19
+ __exportStar(require("./data-fetching"), exports);
20
+ __exportStar(require("./infinite-loading"), exports);
21
+ __exportStar(require("./intl"), exports);
22
+ __exportStar(require("./newsroom-context"), exports);
23
+ __exportStar(require("./sentry"), exports);
24
+ __exportStar(require("./types"), exports);
25
+ __exportStar(require("./utils"), exports);
26
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,qDAAmC;AACnC,yCAAuB;AACvB,qDAAmC;AACnC,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB"}