@quintype/arrow 3.15.1-perf.3 → 3.15.1-perf.7

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 (611) hide show
  1. package/cjs/index.js +14589 -0
  2. package/esm/components/Atoms/AdPlaceholder/ads.m.css +13 -0
  3. package/esm/components/Atoms/AdPlaceholder/index.js +28 -0
  4. package/esm/components/Atoms/Author/README.md +19 -0
  5. package/esm/components/Atoms/Author/author.m.css +65 -0
  6. package/esm/components/Atoms/Author/index.js +109 -0
  7. package/esm/components/Atoms/Author/stories.js +28 -0
  8. package/esm/components/Atoms/AuthorCard/README.md +47 -0
  9. package/esm/components/Atoms/AuthorCard/author-card.m.css +174 -0
  10. package/esm/components/Atoms/AuthorCard/author-card.test.js +93 -0
  11. package/esm/components/Atoms/AuthorCard/index.js +133 -0
  12. package/esm/components/Atoms/AuthorCard/stories.js +68 -0
  13. package/esm/components/Atoms/AuthorImage/README.md +31 -0
  14. package/esm/components/Atoms/AuthorImage/author-image.m.css +53 -0
  15. package/esm/components/Atoms/AuthorImage/index.js +69 -0
  16. package/esm/components/Atoms/AuthorImage/stories.js +26 -0
  17. package/esm/components/Atoms/AuthorWithTimestamp/README.md +12 -0
  18. package/esm/components/Atoms/AuthorWithTimestamp/author-with-timestamp.m.css +42 -0
  19. package/esm/components/Atoms/AuthorWithTimestamp/index.js +95 -0
  20. package/esm/components/Atoms/AuthorWithTimestamp/stories.js +22 -0
  21. package/esm/components/Atoms/BulletPoint/README.md +9 -0
  22. package/esm/components/Atoms/BulletPoint/bullet-point.m.css +14 -0
  23. package/esm/components/Atoms/BulletPoint/index.js +27 -0
  24. package/esm/components/Atoms/BulletPoint/stories.js +9 -0
  25. package/esm/components/Atoms/CaptionAttribution/README.md +15 -0
  26. package/esm/components/Atoms/CaptionAttribution/caption-attribution.m.css +40 -0
  27. package/esm/components/Atoms/CaptionAttribution/caption-attribution.test.js +50 -0
  28. package/esm/components/Atoms/CaptionAttribution/index.js +66 -0
  29. package/esm/components/Atoms/CaptionAttribution/stories.js +47 -0
  30. package/esm/components/Atoms/CollectionName/README.md +11 -0
  31. package/esm/components/Atoms/CollectionName/collection-name.m.css +94 -0
  32. package/esm/components/Atoms/CollectionName/index.js +152 -0
  33. package/esm/components/Atoms/CollectionName/stories.js +41 -0
  34. package/esm/components/Atoms/Divider/__snapshots__/divider.test.js.snap +18 -0
  35. package/esm/components/Atoms/Divider/divider.m.css +6 -0
  36. package/esm/components/Atoms/Divider/divider.test.js +9 -0
  37. package/esm/components/Atoms/Divider/index.js +34 -0
  38. package/esm/components/Atoms/Dot/dot.js +39 -0
  39. package/esm/components/Atoms/Dot/dot.m.css +6 -0
  40. package/esm/components/Atoms/ExtendedLoadMore/README.md +9 -0
  41. package/esm/components/Atoms/ExtendedLoadMore/__snapshots__/extended-load-more.test.js.snap +11 -0
  42. package/esm/components/Atoms/ExtendedLoadMore/extended-load-more.test.js +14 -0
  43. package/esm/components/Atoms/ExtendedLoadMore/index.js +183 -0
  44. package/esm/components/Atoms/FallbackImage/fallback.m.css +33 -0
  45. package/esm/components/Atoms/FallbackImage/index.js +29 -0
  46. package/esm/components/Atoms/Headline/README.md +7 -0
  47. package/esm/components/Atoms/Headline/headline.m.css +26 -0
  48. package/esm/components/Atoms/Headline/index.js +97 -0
  49. package/esm/components/Atoms/Headline/stories.js +39 -0
  50. package/esm/components/Atoms/HeroImage/README.md +13 -0
  51. package/esm/components/Atoms/HeroImage/hero-image.m.css +72 -0
  52. package/esm/components/Atoms/HeroImage/index.js +175 -0
  53. package/esm/components/Atoms/HeroImage/stories.js +23 -0
  54. package/esm/components/Atoms/Hyperlink/hyperlink.m.css +10 -0
  55. package/esm/components/Atoms/Hyperlink/index.js +20 -0
  56. package/esm/components/Atoms/LoadMoreTarget/index.js +24 -0
  57. package/esm/components/Atoms/Loadmore/README.md +0 -0
  58. package/esm/components/Atoms/Loadmore/__snapshots__/load-more.test.js.snap +25 -0
  59. package/esm/components/Atoms/Loadmore/index.js +61 -0
  60. package/esm/components/Atoms/Loadmore/load-more.m.css +23 -0
  61. package/esm/components/Atoms/Loadmore/load-more.test.js +26 -0
  62. package/esm/components/Atoms/Loadmore/stories.js +17 -0
  63. package/esm/components/Atoms/MagazineCoverImage/README.md +21 -0
  64. package/esm/components/Atoms/MagazineCoverImage/index.js +58 -0
  65. package/esm/components/Atoms/MagazineCoverImage/magazine-cover-image.m.css +24 -0
  66. package/esm/components/Atoms/MagazineCoverImage/stories.js +22 -0
  67. package/esm/components/Atoms/PremiumStoryIcon/index.js +54 -0
  68. package/esm/components/Atoms/PublishDetail/README.md +15 -0
  69. package/esm/components/Atoms/PublishDetail/index.js +104 -0
  70. package/esm/components/Atoms/PublishDetail/publish-details.m.css +47 -0
  71. package/esm/components/Atoms/PublishDetail/publish-details.test.js +38 -0
  72. package/esm/components/Atoms/PublishDetail/stories.js +20 -0
  73. package/esm/components/Atoms/ReadTime/README.md +13 -0
  74. package/esm/components/Atoms/ReadTime/index.js +46 -0
  75. package/esm/components/Atoms/ReadTime/read-time.m.css +25 -0
  76. package/esm/components/Atoms/ReadTime/read-time.test.js +29 -0
  77. package/esm/components/Atoms/ReadTime/stories.js +15 -0
  78. package/esm/components/Atoms/ScrollSnap/SliderArrow/index.js +64 -0
  79. package/esm/components/Atoms/ScrollSnap/SliderArrow/slider-arrow.m.css +45 -0
  80. package/esm/components/Atoms/ScrollSnap/SliderIndicator/index.js +53 -0
  81. package/esm/components/Atoms/ScrollSnap/SliderIndicator/slider-indicator.m.css +71 -0
  82. package/esm/components/Atoms/ScrollSnap/index.js +165 -0
  83. package/esm/components/Atoms/ScrollSnap/scroll-snap.m.css +27 -0
  84. package/esm/components/Atoms/SectionTag/README.md +11 -0
  85. package/esm/components/Atoms/SectionTag/index.js +79 -0
  86. package/esm/components/Atoms/SectionTag/section.m.css +53 -0
  87. package/esm/components/Atoms/SectionTag/stories.js +22 -0
  88. package/esm/components/Atoms/SocialSharePopup/README.md +25 -0
  89. package/esm/components/Atoms/SocialSharePopup/__snapshots__/social-share-popup.test.js.snap +653 -0
  90. package/esm/components/Atoms/SocialSharePopup/index.js +100 -0
  91. package/esm/components/Atoms/SocialSharePopup/social-share-popup.m.css +109 -0
  92. package/esm/components/Atoms/SocialSharePopup/social-share-popup.test.js +87 -0
  93. package/esm/components/Atoms/SocialSharePopup/stories.js +18 -0
  94. package/esm/components/Atoms/StoryElements/AlsoRead/README.md +49 -0
  95. package/esm/components/Atoms/StoryElements/AlsoRead/also-read.m.css +135 -0
  96. package/esm/components/Atoms/StoryElements/AlsoRead/also-read.test.js +97 -0
  97. package/esm/components/Atoms/StoryElements/AlsoRead/index.js +156 -0
  98. package/esm/components/Atoms/StoryElements/AlsoRead/stories.js +47 -0
  99. package/esm/components/Atoms/StoryElements/Attachment/README.md +21 -0
  100. package/esm/components/Atoms/StoryElements/Attachment/__snapshots__/attachment.test.js.snap +47 -0
  101. package/esm/components/Atoms/StoryElements/Attachment/attachment.m.css +125 -0
  102. package/esm/components/Atoms/StoryElements/Attachment/attachment.test.js +66 -0
  103. package/esm/components/Atoms/StoryElements/Attachment/index.js +86 -0
  104. package/esm/components/Atoms/StoryElements/Attachment/stories.js +62 -0
  105. package/esm/components/Atoms/StoryElements/BigFact/README.md +9 -0
  106. package/esm/components/Atoms/StoryElements/BigFact/big-fact.m.css +41 -0
  107. package/esm/components/Atoms/StoryElements/BigFact/big-fact.test.js +28 -0
  108. package/esm/components/Atoms/StoryElements/BigFact/index.js +56 -0
  109. package/esm/components/Atoms/StoryElements/BigFact/stories.js +11 -0
  110. package/esm/components/Atoms/StoryElements/BlockQuote/README.md +49 -0
  111. package/esm/components/Atoms/StoryElements/BlockQuote/Svg/curve.js +32 -0
  112. package/esm/components/Atoms/StoryElements/BlockQuote/Svg/edge.js +32 -0
  113. package/esm/components/Atoms/StoryElements/BlockQuote/Svg/icon.m.css +4 -0
  114. package/esm/components/Atoms/StoryElements/BlockQuote/block-quote.m.css +161 -0
  115. package/esm/components/Atoms/StoryElements/BlockQuote/block-quote.test.js +71 -0
  116. package/esm/components/Atoms/StoryElements/BlockQuote/index.js +154 -0
  117. package/esm/components/Atoms/StoryElements/BlockQuote/stories.js +42 -0
  118. package/esm/components/Atoms/StoryElements/Blurb/README.md +43 -0
  119. package/esm/components/Atoms/StoryElements/Blurb/blurb.m.css +55 -0
  120. package/esm/components/Atoms/StoryElements/Blurb/blurb.test.js +76 -0
  121. package/esm/components/Atoms/StoryElements/Blurb/index.js +96 -0
  122. package/esm/components/Atoms/StoryElements/Blurb/stories.js +38 -0
  123. package/esm/components/Atoms/StoryElements/Image/README.md +13 -0
  124. package/esm/components/Atoms/StoryElements/Image/image.m.css +21 -0
  125. package/esm/components/Atoms/StoryElements/Image/image.test.js +19 -0
  126. package/esm/components/Atoms/StoryElements/Image/index.js +87 -0
  127. package/esm/components/Atoms/StoryElements/Image/stories.js +28 -0
  128. package/esm/components/Atoms/StoryElements/ImageSlideshow/README.md +13 -0
  129. package/esm/components/Atoms/StoryElements/ImageSlideshow/image-slideshow.m.css +49 -0
  130. package/esm/components/Atoms/StoryElements/ImageSlideshow/index.js +82 -0
  131. package/esm/components/Atoms/StoryElements/ImageSlideshow/stories.js +31 -0
  132. package/esm/components/Atoms/StoryElements/QuestionAnswer/README.md +56 -0
  133. package/esm/components/Atoms/StoryElements/QuestionAnswer/index.js +176 -0
  134. package/esm/components/Atoms/StoryElements/QuestionAnswer/question-answer.m.css +106 -0
  135. package/esm/components/Atoms/StoryElements/QuestionAnswer/question-answer.test.js +130 -0
  136. package/esm/components/Atoms/StoryElements/QuestionAnswer/stories.js +102 -0
  137. package/esm/components/Atoms/StoryElements/Quote/README.md +41 -0
  138. package/esm/components/Atoms/StoryElements/Quote/index.js +87 -0
  139. package/esm/components/Atoms/StoryElements/Quote/quote.m.css +111 -0
  140. package/esm/components/Atoms/StoryElements/Quote/quote.test.js +61 -0
  141. package/esm/components/Atoms/StoryElements/Quote/stories.js +39 -0
  142. package/esm/components/Atoms/StoryElements/Reference/README.md +9 -0
  143. package/esm/components/Atoms/StoryElements/Reference/index.js +80 -0
  144. package/esm/components/Atoms/StoryElements/Reference/reference.m.css +42 -0
  145. package/esm/components/Atoms/StoryElements/Reference/reference.test.js +38 -0
  146. package/esm/components/Atoms/StoryElements/Reference/stories.js +16 -0
  147. package/esm/components/Atoms/StoryElements/StoryElement/README.md +10 -0
  148. package/esm/components/Atoms/StoryElements/StoryElement/index.js +30 -0
  149. package/esm/components/Atoms/StoryElements/StoryElement/stories.js +17 -0
  150. package/esm/components/Atoms/StoryElements/StoryElement/storyelement.test.js +14 -0
  151. package/esm/components/Atoms/StoryElements/Summary/README.md +56 -0
  152. package/esm/components/Atoms/StoryElements/Summary/index.js +98 -0
  153. package/esm/components/Atoms/StoryElements/Summary/stories.js +41 -0
  154. package/esm/components/Atoms/StoryElements/Summary/summary.m.css +121 -0
  155. package/esm/components/Atoms/StoryElements/Summary/summary.test.js +83 -0
  156. package/esm/components/Atoms/StoryElements/Text/README.md +32 -0
  157. package/esm/components/Atoms/StoryElements/Text/index.js +74 -0
  158. package/esm/components/Atoms/StoryElements/Text/stories.js +56 -0
  159. package/esm/components/Atoms/StoryElements/Text/text.m.css +78 -0
  160. package/esm/components/Atoms/StoryElements/Text/text.test.js +70 -0
  161. package/esm/components/Atoms/StoryElements/Video/README.md +9 -0
  162. package/esm/components/Atoms/StoryElements/Video/index.js +37 -0
  163. package/esm/components/Atoms/StoryElements/Video/stories.js +29 -0
  164. package/esm/components/Atoms/StoryElements/Video/video.m.css +89 -0
  165. package/esm/components/Atoms/StoryElements/Video/video.test.js +14 -0
  166. package/esm/components/Atoms/StoryElements/imageGallery/README.md +18 -0
  167. package/esm/components/Atoms/StoryElements/imageGallery/image-gallery.m.css +52 -0
  168. package/esm/components/Atoms/StoryElements/imageGallery/image-gallery.test.js +17 -0
  169. package/esm/components/Atoms/StoryElements/imageGallery/index.js +112 -0
  170. package/esm/components/Atoms/StoryElements/imageGallery/stories.js +22 -0
  171. package/esm/components/Atoms/StoryElements/withElementWrapper.js +21 -0
  172. package/esm/components/Atoms/StoryElements/withElementWrapper.test.js +49 -0
  173. package/esm/components/Atoms/StoryHeadline/index.js +57 -0
  174. package/esm/components/Atoms/StoryHeadline/story-headline.m.css +36 -0
  175. package/esm/components/Atoms/StoryTags/README.md +9 -0
  176. package/esm/components/Atoms/StoryTags/index.js +47 -0
  177. package/esm/components/Atoms/StoryTags/stories.js +23 -0
  178. package/esm/components/Atoms/StoryTags/story-tags.test.js +16 -0
  179. package/esm/components/Atoms/StoryTags/tags.m.css +34 -0
  180. package/esm/components/Atoms/Subheadline/README.md +17 -0
  181. package/esm/components/Atoms/Subheadline/index.js +52 -0
  182. package/esm/components/Atoms/Subheadline/stories.js +21 -0
  183. package/esm/components/Atoms/Subheadline/subheadline.m.css +17 -0
  184. package/esm/components/Atoms/TimeStamp/README.md +9 -0
  185. package/esm/components/Atoms/TimeStamp/index.js +39 -0
  186. package/esm/components/Atoms/TimeStamp/stories.js +11 -0
  187. package/esm/components/Atoms/TimeStamp/timestamp.m.css +22 -0
  188. package/esm/components/Fixture/config.json +2703 -0
  189. package/esm/components/Fixture/dummy-collection.js +2547 -0
  190. package/esm/components/Fixture/dummyStory.js +2089 -0
  191. package/esm/components/Fixture/index.js +433 -0
  192. package/esm/components/Fixture/slot-config.js +26 -0
  193. package/esm/components/Molecules/FullScreenImages/fullscreenimages.scss +56 -0
  194. package/esm/components/Molecules/FullScreenImages/index.js +119 -0
  195. package/esm/components/Molecules/KeyEvents/README.md +21 -0
  196. package/esm/components/Molecules/KeyEvents/index.js +152 -0
  197. package/esm/components/Molecules/KeyEvents/key-events.m.css +89 -0
  198. package/esm/components/Molecules/KeyEvents/stories.js +25 -0
  199. package/esm/components/Molecules/PageIntroductionCard/README.md +25 -0
  200. package/esm/components/Molecules/PageIntroductionCard/index.js +77 -0
  201. package/esm/components/Molecules/PageIntroductionCard/page-intro-card.m.css +61 -0
  202. package/esm/components/Molecules/PageIntroductionCard/stories.js +17 -0
  203. package/esm/components/Molecules/PortraitStoryCard/README.md +10 -0
  204. package/esm/components/Molecules/PortraitStoryCard/index.js +52 -0
  205. package/esm/components/Molecules/PortraitStoryCard/portrait-story-card.m.css +38 -0
  206. package/esm/components/Molecules/PortraitStoryCard/stories.js +24 -0
  207. package/esm/components/Molecules/SliderHorizontalCard/README.md +14 -0
  208. package/esm/components/Molecules/SliderHorizontalCard/index.js +69 -0
  209. package/esm/components/Molecules/SliderHorizontalCard/slider-horizontal-card.m.css +42 -0
  210. package/esm/components/Molecules/SliderHorizontalCard/stories.js +27 -0
  211. package/esm/components/Molecules/SocialShareTemplate/README.md +118 -0
  212. package/esm/components/Molecules/SocialShareTemplate/__snapshots__/social-share-template.test.js.snap +738 -0
  213. package/esm/components/Molecules/SocialShareTemplate/index.js +164 -0
  214. package/esm/components/Molecules/SocialShareTemplate/social-share-data.js +90 -0
  215. package/esm/components/Molecules/SocialShareTemplate/social-share-template.m.css +174 -0
  216. package/esm/components/Molecules/SocialShareTemplate/social-share-template.test.js +108 -0
  217. package/esm/components/Molecules/SocialShareTemplate/stories.js +38 -0
  218. package/esm/components/Molecules/StoryCard/README.md +75 -0
  219. package/esm/components/Molecules/StoryCard/READMEBGIMAGE.md +25 -0
  220. package/esm/components/Molecules/StoryCard/READMEBORDER.md +61 -0
  221. package/esm/components/Molecules/StoryCard/index.js +200 -0
  222. package/esm/components/Molecules/StoryCard/stories.js +274 -0
  223. package/esm/components/Molecules/StoryCard/storycard.m.css +158 -0
  224. package/esm/components/Molecules/StoryCardWithBulletPoint/README.md +9 -0
  225. package/esm/components/Molecules/StoryCardWithBulletPoint/index.js +43 -0
  226. package/esm/components/Molecules/StoryCardWithBulletPoint/stories.js +28 -0
  227. package/esm/components/Molecules/StoryCardWithBulletPoint/story-card-with-bullet-point.m.css +7 -0
  228. package/esm/components/Molecules/StoryElementCard/README.md +9 -0
  229. package/esm/components/Molecules/StoryElementCard/index.js +494 -0
  230. package/esm/components/Molecules/StoryElementCard/stories.js +25 -0
  231. package/esm/components/Molecules/StoryElementCard/story-element-card.m.css +78 -0
  232. package/esm/components/Molecules/StorycardContent/README.md +34 -0
  233. package/esm/components/Molecules/StorycardContent/index.js +86 -0
  234. package/esm/components/Molecules/StorycardContent/stories.js +45 -0
  235. package/esm/components/Molecules/StorycardContent/storycardContent.m.css +21 -0
  236. package/esm/components/Rows/AlternateCollectionFilter/README.md +38 -0
  237. package/esm/components/Rows/AlternateCollectionFilter/alternate-collection-filter.m.css +254 -0
  238. package/esm/components/Rows/AlternateCollectionFilter/index.js +288 -0
  239. package/esm/components/Rows/AlternateCollectionFilter/stories.js +68 -0
  240. package/esm/components/Rows/AsideCollection/README.md +27 -0
  241. package/esm/components/Rows/AsideCollection/aside-collection.m.css +103 -0
  242. package/esm/components/Rows/AsideCollection/aside-collection.test.js +32 -0
  243. package/esm/components/Rows/AsideCollection/index.js +253 -0
  244. package/esm/components/Rows/AsideCollection/stories.js +48 -0
  245. package/esm/components/Rows/AstrologyCollection/README.md +40 -0
  246. package/esm/components/Rows/AstrologyCollection/astrology-collection.m.css +165 -0
  247. package/esm/components/Rows/AstrologyCollection/index.js +272 -0
  248. package/esm/components/Rows/AstrologyCollection/stories.js +61 -0
  249. package/esm/components/Rows/AuthorIntroductionCard/README.md +43 -0
  250. package/esm/components/Rows/AuthorIntroductionCard/author-intro.m.css +278 -0
  251. package/esm/components/Rows/AuthorIntroductionCard/author-intro.test.js +148 -0
  252. package/esm/components/Rows/AuthorIntroductionCard/index.js +157 -0
  253. package/esm/components/Rows/AuthorIntroductionCard/stories.js +46 -0
  254. package/esm/components/Rows/AuthorsList/README.md +24 -0
  255. package/esm/components/Rows/AuthorsList/author-list.test.js +66 -0
  256. package/esm/components/Rows/AuthorsList/authors-list.m.css +22 -0
  257. package/esm/components/Rows/AuthorsList/index.js +64 -0
  258. package/esm/components/Rows/AuthorsList/stories.js +62 -0
  259. package/esm/components/Rows/CollectionFilter/README.md +39 -0
  260. package/esm/components/Rows/CollectionFilter/collection-filter.m.css +213 -0
  261. package/esm/components/Rows/CollectionFilter/index.js +366 -0
  262. package/esm/components/Rows/CollectionFilter/stories.js +78 -0
  263. package/esm/components/Rows/ElevenStories/11-stories.m.css +85 -0
  264. package/esm/components/Rows/ElevenStories/README.md +39 -0
  265. package/esm/components/Rows/ElevenStories/index.js +418 -0
  266. package/esm/components/Rows/ElevenStories/stories.js +71 -0
  267. package/esm/components/Rows/FourColFiveStories/README.md +37 -0
  268. package/esm/components/Rows/FourColFiveStories/four-col-five-stories.m.css +112 -0
  269. package/{atoms/ExtendedLoadMore/index-3976fac4.js → esm/components/Rows/FourColFiveStories/index.js} +54 -64
  270. package/esm/components/Rows/FourColFiveStories/stories.js +67 -0
  271. package/esm/components/Rows/FourColGrid/README.md +39 -0
  272. package/esm/components/Rows/FourColGrid/four-col.m.css +50 -0
  273. package/{atoms/ExtendedLoadMore/index-bc129cb8.js → esm/components/Rows/FourColGrid/index.js} +52 -59
  274. package/esm/components/Rows/FourColGrid/stories.js +68 -0
  275. package/esm/components/Rows/FourColPortraitStories/README.md +38 -0
  276. package/esm/components/Rows/FourColPortraitStories/four-col-portrait-stories.m.css +45 -0
  277. package/esm/components/Rows/FourColPortraitStories/index.js +153 -0
  278. package/esm/components/Rows/FourColPortraitStories/stories.js +68 -0
  279. package/esm/components/Rows/FourColSixteenStories/README.md +35 -0
  280. package/esm/components/Rows/FourColSixteenStories/four-col-sixteen-stories.m.css +141 -0
  281. package/esm/components/Rows/FourColSixteenStories/index.js +157 -0
  282. package/esm/components/Rows/FourColSixteenStories/stories.js +43 -0
  283. package/esm/components/Rows/FourColTwelveStory/README.md +39 -0
  284. package/esm/components/Rows/FourColTwelveStory/four-col-twelve-story.m.css +71 -0
  285. package/esm/components/Rows/FourColTwelveStory/index.js +219 -0
  286. package/esm/components/Rows/FourColTwelveStory/stories.js +107 -0
  287. package/esm/components/Rows/FourStorySlider/README.md +45 -0
  288. package/esm/components/Rows/FourStorySlider/four-story-slider.m.css +78 -0
  289. package/esm/components/Rows/FourStorySlider/index.js +145 -0
  290. package/esm/components/Rows/FourStorySlider/stories.js +125 -0
  291. package/esm/components/Rows/FourStorySliderPortrait/README.md +45 -0
  292. package/esm/components/Rows/FourStorySliderPortrait/four-story-slider-portrait.m.css +221 -0
  293. package/esm/components/Rows/FourStorySliderPortrait/index.js +148 -0
  294. package/esm/components/Rows/FourStorySliderPortrait/stories.js +125 -0
  295. package/esm/components/Rows/FourTabbedBigStorySlider/README.md +39 -0
  296. package/esm/components/Rows/FourTabbedBigStorySlider/four-tabbed-big-story-slider.m.css +265 -0
  297. package/esm/components/Rows/FourTabbedBigStorySlider/index.js +221 -0
  298. package/esm/components/Rows/FourTabbedBigStorySlider/stories.js +59 -0
  299. package/esm/components/Rows/FullScreenSlider/README.md +46 -0
  300. package/esm/components/Rows/FullScreenSlider/full-screen-slider.m.css +155 -0
  301. package/esm/components/Rows/FullScreenSlider/index.js +140 -0
  302. package/esm/components/Rows/FullScreenSlider/stories.js +113 -0
  303. package/esm/components/Rows/HalfScreenSlider/README.md +43 -0
  304. package/esm/components/Rows/HalfScreenSlider/half-screen-slider.m.css +80 -0
  305. package/esm/components/Rows/HalfScreenSlider/index.js +124 -0
  306. package/esm/components/Rows/HalfScreenSlider/stories.js +118 -0
  307. package/esm/components/Rows/ListComponent/README.md +48 -0
  308. package/esm/components/Rows/ListComponent/index.js +176 -0
  309. package/esm/components/Rows/ListComponent/list-component.m.css +65 -0
  310. package/esm/components/Rows/ListComponent/stories.js +65 -0
  311. package/esm/components/Rows/Listicles/README.md +32 -0
  312. package/esm/components/Rows/Listicles/index.js +240 -0
  313. package/esm/components/Rows/Listicles/listicles.m.css +149 -0
  314. package/esm/components/Rows/Listicles/stories.js +53 -0
  315. package/esm/components/Rows/MagazineEditions/README.md +21 -0
  316. package/esm/components/Rows/MagazineEditions/index.js +123 -0
  317. package/esm/components/Rows/MagazineEditions/magazine-editions.m.css +50 -0
  318. package/esm/components/Rows/MagazineEditions/magazine-editions.test.js +30 -0
  319. package/esm/components/Rows/MagazineEditions/stories.js +41 -0
  320. package/esm/components/Rows/MagazineHeaderCard/README.md +21 -0
  321. package/esm/components/Rows/MagazineHeaderCard/index.js +117 -0
  322. package/esm/components/Rows/MagazineHeaderCard/magazine-cards.m.css +106 -0
  323. package/esm/components/Rows/MagazineHeaderCard/stories.js +34 -0
  324. package/esm/components/Rows/MagazineWidget/README.md +21 -0
  325. package/esm/components/Rows/MagazineWidget/index.js +177 -0
  326. package/esm/components/Rows/MagazineWidget/stories.js +40 -0
  327. package/esm/components/Rows/OneColStoryList/README.md +48 -0
  328. package/{atoms/ExtendedLoadMore/index-a5c95f84.js → esm/components/Rows/OneColStoryList/index.js} +69 -72
  329. package/esm/components/Rows/OneColStoryList/one-col-story-list.m.css +81 -0
  330. package/esm/components/Rows/OneColStoryList/stories.js +78 -0
  331. package/esm/components/Rows/OpinionCollection/README.md +36 -0
  332. package/esm/components/Rows/OpinionCollection/index.js +205 -0
  333. package/esm/components/Rows/OpinionCollection/opinion-collection.m.css +226 -0
  334. package/esm/components/Rows/OpinionCollection/stories.js +92 -0
  335. package/esm/components/Rows/SixColSixStories/README.md +37 -0
  336. package/{atoms/ExtendedLoadMore/index-6ecceae4.js → esm/components/Rows/SixColSixStories/index.js} +57 -61
  337. package/esm/components/Rows/SixColSixStories/six-col-six-stories.m.css +75 -0
  338. package/esm/components/Rows/SixColSixStories/stories.js +74 -0
  339. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/README.md +19 -0
  340. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/__snapshots__/listicle-story.test.js.snap +841 -0
  341. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/index.js +330 -0
  342. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/listicle-story.m.css +249 -0
  343. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/listicle-story.test.js +46 -0
  344. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/stories.js +119 -0
  345. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/README.md +25 -0
  346. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/index.js +97 -0
  347. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/live-blog.m.css +326 -0
  348. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/stories.js +118 -0
  349. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/templates.js +418 -0
  350. package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/index.js +294 -0
  351. package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/photo-story.test.js +163 -0
  352. package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/photo.m.css +175 -0
  353. package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/stories.js +124 -0
  354. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/README.md +49 -0
  355. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/index.js +100 -0
  356. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/stories.js +124 -0
  357. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/templates.js +285 -0
  358. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/text-story.m.css +449 -0
  359. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/text-story.test.js +242 -0
  360. package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/README.md +31 -0
  361. package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/index.js +239 -0
  362. package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/stories.js +214 -0
  363. package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/video-story.m.css +195 -0
  364. package/esm/components/Rows/TagIntroductionCard/README.md +11 -0
  365. package/esm/components/Rows/TagIntroductionCard/index.js +45 -0
  366. package/esm/components/Rows/TagIntroductionCard/stories.js +20 -0
  367. package/esm/components/Rows/TagIntroductionCard/tag-intro-card.module.css +25 -0
  368. package/esm/components/Rows/ThreeColFlexStories/README.md +38 -0
  369. package/{atoms/ExtendedLoadMore/index-b5936059.js → esm/components/Rows/ThreeColFlexStories/index.js} +70 -74
  370. package/esm/components/Rows/ThreeColFlexStories/stories.js +74 -0
  371. package/esm/components/Rows/ThreeColFlexStories/three-col-flex-stories.m.css +60 -0
  372. package/esm/components/Rows/ThreeColFourteenStory/README.md +28 -0
  373. package/esm/components/Rows/ThreeColFourteenStory/index.js +154 -0
  374. package/esm/components/Rows/ThreeColFourteenStory/stories.js +65 -0
  375. package/esm/components/Rows/ThreeColFourteenStory/three-col-fourteen-story.m.css +51 -0
  376. package/esm/components/Rows/ThreeColGrid/README.md +36 -0
  377. package/{atoms/ExtendedLoadMore/index-6e083738.js → esm/components/Rows/ThreeColGrid/index.js} +55 -62
  378. package/esm/components/Rows/ThreeColGrid/stories.js +78 -0
  379. package/esm/components/Rows/ThreeColGrid/three-col.m.css +43 -0
  380. package/esm/components/Rows/ThreeColSevenStory/README.md +36 -0
  381. package/esm/components/Rows/ThreeColSevenStory/index.js +201 -0
  382. package/esm/components/Rows/ThreeColSevenStory/stories.js +74 -0
  383. package/esm/components/Rows/ThreeColSevenStory/three-col-seven-story.m.css +44 -0
  384. package/esm/components/Rows/ThreeColSixStories/README.md +40 -0
  385. package/esm/components/Rows/ThreeColSixStories/index.js +183 -0
  386. package/esm/components/Rows/ThreeColSixStories/stories.js +74 -0
  387. package/esm/components/Rows/ThreeColSixStories/three-col-six-stories.m.css +32 -0
  388. package/esm/components/Rows/ThreeColTwelveStories/README.md +41 -0
  389. package/esm/components/Rows/ThreeColTwelveStories/index.js +165 -0
  390. package/esm/components/Rows/ThreeColTwelveStories/stories.js +53 -0
  391. package/esm/components/Rows/ThreeColTwelveStories/three-col-twelve-stories.m.css +83 -0
  392. package/esm/components/Rows/TwoColFourStory/README.md +33 -0
  393. package/esm/components/Rows/TwoColFourStory/index.js +174 -0
  394. package/esm/components/Rows/TwoColFourStory/stories.js +63 -0
  395. package/esm/components/Rows/TwoColFourStory/two-col-four-story.m.css +64 -0
  396. package/esm/components/Rows/TwoColFourStoryHighlight/README.md +35 -0
  397. package/esm/components/Rows/TwoColFourStoryHighlight/index.js +164 -0
  398. package/esm/components/Rows/TwoColFourStoryHighlight/stories.js +50 -0
  399. package/esm/components/Rows/TwoColFourStoryHighlight/two-col-four-story-highlight.m.css +116 -0
  400. package/esm/components/Rows/TwoColSevenStories/README.md +37 -0
  401. package/esm/components/Rows/TwoColSevenStories/index.js +193 -0
  402. package/esm/components/Rows/TwoColSevenStories/stories.js +102 -0
  403. package/esm/components/Rows/TwoColSevenStories/two-col-seven-stories.m.css +175 -0
  404. package/esm/components/Rows/TwoColSixStories/README.md +36 -0
  405. package/esm/components/Rows/TwoColSixStories/index.js +185 -0
  406. package/esm/components/Rows/TwoColSixStories/stories.js +67 -0
  407. package/esm/components/Rows/TwoColSixStories/two-col-six-stories.m.css +135 -0
  408. package/esm/components/Rows/TwoColTenStoriesSidebar/README.md +34 -0
  409. package/esm/components/Rows/TwoColTenStoriesSidebar/index.js +191 -0
  410. package/esm/components/Rows/TwoColTenStoriesSidebar/stories.js +53 -0
  411. package/esm/components/Rows/TwoColTenStoriesSidebar/two-col-ten-stories-sidebar.m.css +52 -0
  412. package/esm/components/Rows/TwoColThreeStory/README.md +40 -0
  413. package/esm/components/Rows/TwoColThreeStory/index.js +146 -0
  414. package/esm/components/Rows/TwoColThreeStory/stories.js +63 -0
  415. package/esm/components/Rows/TwoColThreeStory/two-col-three-story.m.css +36 -0
  416. package/esm/components/SharedContext.js +17 -0
  417. package/esm/components/Svgs/Loading/loading.js +140 -0
  418. package/esm/components/Svgs/Loading/loading.m.css +5 -0
  419. package/esm/components/Svgs/SocialIcons/facebook.js +18 -0
  420. package/esm/components/Svgs/SocialIcons/instagram.js +33 -0
  421. package/esm/components/Svgs/SocialIcons/linkedin.js +18 -0
  422. package/esm/components/Svgs/SocialIcons/pinterest.js +12 -0
  423. package/esm/components/Svgs/SocialIcons/twitter.js +18 -0
  424. package/esm/components/Svgs/SocialIcons/whatsapp.js +19 -0
  425. package/esm/components/Svgs/SocialIcons/youtube.js +19 -0
  426. package/esm/components/Svgs/caret-right.svg +3 -0
  427. package/esm/components/Svgs/clock-icon.js +19 -0
  428. package/esm/components/Svgs/close-icon.js +22 -0
  429. package/esm/components/Svgs/crown.js +40 -0
  430. package/esm/components/Svgs/fallbackImage.js +45 -0
  431. package/esm/components/Svgs/hyperlink.js +22 -0
  432. package/esm/components/Svgs/key.js +39 -0
  433. package/esm/components/Svgs/left-arrow.js +24 -0
  434. package/esm/components/Svgs/liveicon.js +16 -0
  435. package/esm/components/Svgs/lock.js +40 -0
  436. package/esm/components/Svgs/right-arrow.js +24 -0
  437. package/esm/components/Svgs/share-icon.js +19 -0
  438. package/esm/components/Svgs/star.js +34 -0
  439. package/esm/components/Svgs/user-fallback-icon.js +22 -0
  440. package/esm/components/Typography/README.md +7 -0
  441. package/esm/components/Typography/index.js +33 -0
  442. package/esm/components/Typography/stories.js +15 -0
  443. package/esm/components/Typography/style.m.css +11 -0
  444. package/esm/entry-points.js +291 -0
  445. package/esm/guide/stories.js +22 -0
  446. package/esm/hydration-component/index.js +41 -0
  447. package/esm/hydration-component/useNearScreen.js +71 -0
  448. package/esm/index.js +88 -0
  449. package/esm/rows.js +40 -0
  450. package/esm/utils/testing-utils.js +8 -0
  451. package/esm/utils/utils.js +363 -0
  452. package/esm/utils/utils.test.js +46 -0
  453. package/package.json +1 -1
  454. package/atoms/Author/index.js +0 -2259
  455. package/atoms/Author/styles.arrow.css +0 -1
  456. package/atoms/AuthorWithTime/index.js +0 -2964
  457. package/atoms/AuthorWithTime/styles.arrow.css +0 -1
  458. package/atoms/CollectionName/index.js +0 -2344
  459. package/atoms/CollectionName/styles.arrow.css +0 -1
  460. package/atoms/ExtendedLoadMore/index-3c4ac692.js +0 -1025
  461. package/atoms/ExtendedLoadMore/index-4ddfe28d.js +0 -93
  462. package/atoms/ExtendedLoadMore/index-5c8eda4a.js +0 -358
  463. package/atoms/ExtendedLoadMore/index-9e0d32b7.js +0 -290
  464. package/atoms/ExtendedLoadMore/index-b22f1843.js +0 -251
  465. package/atoms/ExtendedLoadMore/index-e7cde739.js +0 -3051
  466. package/atoms/ExtendedLoadMore/index-fee73a14.js +0 -207
  467. package/atoms/ExtendedLoadMore/index.js +0 -13
  468. package/atoms/ExtendedLoadMore/styles.arrow.css +0 -1
  469. package/atoms/Headline/index.js +0 -2468
  470. package/atoms/Headline/styles.arrow.css +0 -1
  471. package/atoms/HeroImage/index.js +0 -2484
  472. package/atoms/HeroImage/styles.arrow.css +0 -1
  473. package/atoms/LoadmoreButton/index.js +0 -2277
  474. package/atoms/LoadmoreButton/styles.arrow.css +0 -1
  475. package/atoms/ScrollSnap/index.js +0 -2540
  476. package/atoms/ScrollSnap/styles.arrow.css +0 -1
  477. package/atoms/SectionTag/index.js +0 -2229
  478. package/atoms/SectionTag/styles.arrow.css +0 -1
  479. package/atoms/Subheadline/index.js +0 -2209
  480. package/atoms/Subheadline/styles.arrow.css +0 -1
  481. package/atoms/TimeStamp/index.js +0 -2671
  482. package/atoms/TimeStamp/styles.arrow.css +0 -1
  483. package/molecules/KeyEvents/index.js +0 -2979
  484. package/molecules/KeyEvents/styles.arrow.css +0 -1
  485. package/molecules/PageIntroductionCard/index.js +0 -2685
  486. package/molecules/PageIntroductionCard/styles.arrow.css +0 -1
  487. package/molecules/SocialShareTemplate/index.js +0 -3102
  488. package/molecules/SocialShareTemplate/styles.arrow.css +0 -1
  489. package/molecules/StoryCard/index.js +0 -3948
  490. package/molecules/StoryCard/styles.arrow.css +0 -1
  491. package/molecules/StoryElementCard/index.js +0 -5861
  492. package/molecules/StoryElementCard/styles.arrow.css +0 -1
  493. package/molecules/StorycardContent/index.js +0 -3426
  494. package/molecules/StorycardContent/styles.arrow.css +0 -1
  495. package/rows/AlternateCollectionFilter/index.js +0 -4756
  496. package/rows/AlternateCollectionFilter/styles.arrow.css +0 -1
  497. package/rows/AsideCollection/index.js +0 -4702
  498. package/rows/AsideCollection/styles.arrow.css +0 -1
  499. package/rows/AstrologyCollection/index.js +0 -4673
  500. package/rows/AstrologyCollection/styles.arrow.css +0 -1
  501. package/rows/AuthorIntroductionCard/index.js +0 -3529
  502. package/rows/AuthorIntroductionCard/styles.arrow.css +0 -1
  503. package/rows/AuthorsList/index.js +0 -3725
  504. package/rows/AuthorsList/styles.arrow.css +0 -1
  505. package/rows/CollectionFilter/index.js +0 -4846
  506. package/rows/CollectionFilter/styles.arrow.css +0 -1
  507. package/rows/ElevenStories/index.js +0 -4649
  508. package/rows/ElevenStories/styles.arrow.css +0 -1
  509. package/rows/FourColFiveStories/index.js +0 -4389
  510. package/rows/FourColFiveStories/styles.arrow.css +0 -1
  511. package/rows/FourColGrid/index.js +0 -4614
  512. package/rows/FourColGrid/styles.arrow.css +0 -1
  513. package/rows/FourColPortraitStories/index.js +0 -4647
  514. package/rows/FourColPortraitStories/styles.arrow.css +0 -1
  515. package/rows/FourColSixteenStories/index.js +0 -4386
  516. package/rows/FourColSixteenStories/styles.arrow.css +0 -1
  517. package/rows/FourColTwelveStories/index.js +0 -4346
  518. package/rows/FourColTwelveStories/styles.arrow.css +0 -1
  519. package/rows/FourStorySlider/index.js +0 -4754
  520. package/rows/FourStorySlider/styles.arrow.css +0 -1
  521. package/rows/FourStorySliderPortrait/index.js +0 -4757
  522. package/rows/FourStorySliderPortrait/styles.arrow.css +0 -1
  523. package/rows/FourTabbedBigStorySlider/index.js +0 -4516
  524. package/rows/FourTabbedBigStorySlider/styles.arrow.css +0 -1
  525. package/rows/FullScreenSlider/index.js +0 -4672
  526. package/rows/FullScreenSlider/styles.arrow.css +0 -1
  527. package/rows/HalfScreenSlider/index.js +0 -4525
  528. package/rows/HalfScreenSlider/styles.arrow.css +0 -1
  529. package/rows/ListComponent/index.js +0 -4473
  530. package/rows/ListComponent/styles.arrow.css +0 -1
  531. package/rows/Listicles/index.js +0 -3142
  532. package/rows/Listicles/styles.arrow.css +0 -1
  533. package/rows/MagazineEditions/index.js +0 -3153
  534. package/rows/MagazineEditions/styles.arrow.css +0 -1
  535. package/rows/MagazineHeaderCard/index.js +0 -3147
  536. package/rows/MagazineHeaderCard/styles.arrow.css +0 -1
  537. package/rows/MagazineWidget/index.js +0 -4525
  538. package/rows/MagazineWidget/styles.arrow.css +0 -1
  539. package/rows/OneColStoryList/index.js +0 -4700
  540. package/rows/OneColStoryList/styles.arrow.css +0 -1
  541. package/rows/OpinionCollection/index.js +0 -4067
  542. package/rows/OpinionCollection/styles.arrow.css +0 -1
  543. package/rows/SixColSixStories/index.js +0 -4545
  544. package/rows/SixColSixStories/styles.arrow.css +0 -1
  545. package/rows/StoryCollection/index.js +0 -4702
  546. package/rows/StoryCollection/styles.arrow.css +0 -1
  547. package/rows/TagIntroductionCard/index.js +0 -1910
  548. package/rows/TagIntroductionCard/styles.arrow.css +0 -1
  549. package/rows/ThreeColFlexStories/index.js +0 -4605
  550. package/rows/ThreeColFlexStories/styles.arrow.css +0 -1
  551. package/rows/ThreeColFourteenStories/index.js +0 -4294
  552. package/rows/ThreeColFourteenStories/styles.arrow.css +0 -1
  553. package/rows/ThreeColGrid/index.js +0 -4635
  554. package/rows/ThreeColGrid/styles.arrow.css +0 -1
  555. package/rows/ThreeColSevenStory/index.js +0 -4513
  556. package/rows/ThreeColSevenStory/styles.arrow.css +0 -1
  557. package/rows/ThreeColSixStories/index.js +0 -4496
  558. package/rows/ThreeColSixStories/styles.arrow.css +0 -1
  559. package/rows/ThreeColTwelveStories/index.js +0 -4391
  560. package/rows/ThreeColTwelveStories/styles.arrow.css +0 -1
  561. package/rows/TwoColFourStories/index.js +0 -4474
  562. package/rows/TwoColFourStories/styles.arrow.css +0 -1
  563. package/rows/TwoColFourStoryHighlight/index.js +0 -4467
  564. package/rows/TwoColFourStoryHighlight/styles.arrow.css +0 -1
  565. package/rows/TwoColSevenStories/index.js +0 -4501
  566. package/rows/TwoColSevenStories/styles.arrow.css +0 -1
  567. package/rows/TwoColSixStories/index.js +0 -4500
  568. package/rows/TwoColSixStories/styles.arrow.css +0 -1
  569. package/rows/TwoColTenStoriesSidebar/index.js +0 -4560
  570. package/rows/TwoColTenStoriesSidebar/styles.arrow.css +0 -1
  571. package/rows/TwoColThreeStories/index.js +0 -4447
  572. package/rows/TwoColThreeStories/styles.arrow.css +0 -1
  573. package/story-elements/AlsoRead/index.js +0 -2466
  574. package/story-elements/AlsoRead/styles.arrow.css +0 -1
  575. package/story-elements/Attachment/index.js +0 -2022
  576. package/story-elements/Attachment/styles.arrow.css +0 -1
  577. package/story-elements/BigFact/index.js +0 -1992
  578. package/story-elements/BigFact/styles.arrow.css +0 -1
  579. package/story-elements/BlockQuote/index.js +0 -2441
  580. package/story-elements/BlockQuote/styles.arrow.css +0 -1
  581. package/story-elements/Blurb/index.js +0 -2103
  582. package/story-elements/Blurb/styles.arrow.css +0 -1
  583. package/story-elements/Image/index.js +0 -2738
  584. package/story-elements/Image/styles.arrow.css +0 -1
  585. package/story-elements/ImageGallery/index.js +0 -2671
  586. package/story-elements/ImageGallery/styles.arrow.css +0 -1
  587. package/story-elements/ImageSlideshow/index.js +0 -2982
  588. package/story-elements/ImageSlideshow/styles.arrow.css +0 -1
  589. package/story-elements/QuestionAnswer/index.js +0 -2404
  590. package/story-elements/QuestionAnswer/styles.arrow.css +0 -1
  591. package/story-elements/Quote/index.js +0 -2021
  592. package/story-elements/Quote/styles.arrow.css +0 -1
  593. package/story-elements/Reference/index.js +0 -2015
  594. package/story-elements/Reference/styles.arrow.css +0 -1
  595. package/story-elements/StoryElement/index.js +0 -1788
  596. package/story-elements/Summary/index.js +0 -2045
  597. package/story-elements/Summary/styles.arrow.css +0 -1
  598. package/story-elements/Text/index.js +0 -2302
  599. package/story-elements/Text/styles.arrow.css +0 -1
  600. package/story-elements/Video/index.js +0 -1794
  601. package/story-elements/Video/styles.arrow.css +0 -1
  602. package/story-templates/ListicleStoryTemplate/index.js +0 -8471
  603. package/story-templates/ListicleStoryTemplate/styles.arrow.css +0 -1
  604. package/story-templates/LiveBlogStoryTemplate/index.js +0 -8647
  605. package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +0 -1
  606. package/story-templates/PhotoStoryTemplate/index.js +0 -8449
  607. package/story-templates/PhotoStoryTemplate/styles.arrow.css +0 -1
  608. package/story-templates/TextStoryTemplate/index.js +0 -8522
  609. package/story-templates/TextStoryTemplate/styles.arrow.css +0 -1
  610. package/story-templates/VideoStoryTemplate/index.js +0 -8381
  611. package/story-templates/VideoStoryTemplate/styles.arrow.css +0 -1
@@ -1,4700 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var components = require('@quintype/components');
6
- var PropTypes = require('prop-types');
7
- var React = require('react');
8
- var reactRedux = require('react-redux');
9
- var ReactDOM = require('react-dom');
10
- var Timeago = require('react-timeago');
11
- var dateFnsTz = require('date-fns-tz');
12
-
13
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
-
15
- function _interopNamespace(e) {
16
- if (e && e.__esModule) return e;
17
- var n = Object.create(null);
18
- if (e) {
19
- Object.keys(e).forEach(function (k) {
20
- if (k !== 'default') {
21
- var d = Object.getOwnPropertyDescriptor(e, k);
22
- Object.defineProperty(n, k, d.get ? d : {
23
- enumerable: true,
24
- get: function () { return e[k]; }
25
- });
26
- }
27
- });
28
- }
29
- n["default"] = e;
30
- return Object.freeze(n);
31
- }
32
-
33
- var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
34
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
35
- var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
36
- var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
37
-
38
- /**
39
- * Checks if `value` is classified as an `Array` object.
40
- *
41
- * @static
42
- * @memberOf _
43
- * @since 0.1.0
44
- * @category Lang
45
- * @param {*} value The value to check.
46
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
47
- * @example
48
- *
49
- * _.isArray([1, 2, 3]);
50
- * // => true
51
- *
52
- * _.isArray(document.body.children);
53
- * // => false
54
- *
55
- * _.isArray('abc');
56
- * // => false
57
- *
58
- * _.isArray(_.noop);
59
- * // => false
60
- */
61
- var isArray = Array.isArray;
62
-
63
- var isArray_1 = isArray;
64
-
65
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
66
-
67
- function getDefaultExportFromCjs (x) {
68
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
69
- }
70
-
71
- function createCommonjsModule(fn) {
72
- var module = { exports: {} };
73
- return fn(module, module.exports), module.exports;
74
- }
75
-
76
- /** Detect free variable `global` from Node.js. */
77
-
78
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
79
-
80
- var _freeGlobal = freeGlobal;
81
-
82
- /** Detect free variable `self`. */
83
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
84
-
85
- /** Used as a reference to the global object. */
86
- var root = _freeGlobal || freeSelf || Function('return this')();
87
-
88
- var _root = root;
89
-
90
- /** Built-in value references. */
91
- var Symbol$1 = _root.Symbol;
92
-
93
- var _Symbol = Symbol$1;
94
-
95
- /** Used for built-in method references. */
96
- var objectProto$4 = Object.prototype;
97
-
98
- /** Used to check objects for own properties. */
99
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
100
-
101
- /**
102
- * Used to resolve the
103
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
104
- * of values.
105
- */
106
- var nativeObjectToString$1 = objectProto$4.toString;
107
-
108
- /** Built-in value references. */
109
- var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
110
-
111
- /**
112
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
113
- *
114
- * @private
115
- * @param {*} value The value to query.
116
- * @returns {string} Returns the raw `toStringTag`.
117
- */
118
- function getRawTag(value) {
119
- var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
120
- tag = value[symToStringTag$1];
121
-
122
- try {
123
- value[symToStringTag$1] = undefined;
124
- var unmasked = true;
125
- } catch (e) {}
126
-
127
- var result = nativeObjectToString$1.call(value);
128
- if (unmasked) {
129
- if (isOwn) {
130
- value[symToStringTag$1] = tag;
131
- } else {
132
- delete value[symToStringTag$1];
133
- }
134
- }
135
- return result;
136
- }
137
-
138
- var _getRawTag = getRawTag;
139
-
140
- /** Used for built-in method references. */
141
- var objectProto$3 = Object.prototype;
142
-
143
- /**
144
- * Used to resolve the
145
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
146
- * of values.
147
- */
148
- var nativeObjectToString = objectProto$3.toString;
149
-
150
- /**
151
- * Converts `value` to a string using `Object.prototype.toString`.
152
- *
153
- * @private
154
- * @param {*} value The value to convert.
155
- * @returns {string} Returns the converted string.
156
- */
157
- function objectToString(value) {
158
- return nativeObjectToString.call(value);
159
- }
160
-
161
- var _objectToString = objectToString;
162
-
163
- /** `Object#toString` result references. */
164
- var nullTag = '[object Null]',
165
- undefinedTag = '[object Undefined]';
166
-
167
- /** Built-in value references. */
168
- var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
169
-
170
- /**
171
- * The base implementation of `getTag` without fallbacks for buggy environments.
172
- *
173
- * @private
174
- * @param {*} value The value to query.
175
- * @returns {string} Returns the `toStringTag`.
176
- */
177
- function baseGetTag(value) {
178
- if (value == null) {
179
- return value === undefined ? undefinedTag : nullTag;
180
- }
181
- return (symToStringTag && symToStringTag in Object(value))
182
- ? _getRawTag(value)
183
- : _objectToString(value);
184
- }
185
-
186
- var _baseGetTag = baseGetTag;
187
-
188
- /**
189
- * Checks if `value` is object-like. A value is object-like if it's not `null`
190
- * and has a `typeof` result of "object".
191
- *
192
- * @static
193
- * @memberOf _
194
- * @since 4.0.0
195
- * @category Lang
196
- * @param {*} value The value to check.
197
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
198
- * @example
199
- *
200
- * _.isObjectLike({});
201
- * // => true
202
- *
203
- * _.isObjectLike([1, 2, 3]);
204
- * // => true
205
- *
206
- * _.isObjectLike(_.noop);
207
- * // => false
208
- *
209
- * _.isObjectLike(null);
210
- * // => false
211
- */
212
- function isObjectLike(value) {
213
- return value != null && typeof value == 'object';
214
- }
215
-
216
- var isObjectLike_1 = isObjectLike;
217
-
218
- /** `Object#toString` result references. */
219
- var symbolTag = '[object Symbol]';
220
-
221
- /**
222
- * Checks if `value` is classified as a `Symbol` primitive or object.
223
- *
224
- * @static
225
- * @memberOf _
226
- * @since 4.0.0
227
- * @category Lang
228
- * @param {*} value The value to check.
229
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
230
- * @example
231
- *
232
- * _.isSymbol(Symbol.iterator);
233
- * // => true
234
- *
235
- * _.isSymbol('abc');
236
- * // => false
237
- */
238
- function isSymbol(value) {
239
- return typeof value == 'symbol' ||
240
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
241
- }
242
-
243
- var isSymbol_1 = isSymbol;
244
-
245
- /** Used to match property names within property paths. */
246
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
247
- reIsPlainProp = /^\w*$/;
248
-
249
- /**
250
- * Checks if `value` is a property name and not a property path.
251
- *
252
- * @private
253
- * @param {*} value The value to check.
254
- * @param {Object} [object] The object to query keys on.
255
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
256
- */
257
- function isKey(value, object) {
258
- if (isArray_1(value)) {
259
- return false;
260
- }
261
- var type = typeof value;
262
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
263
- value == null || isSymbol_1(value)) {
264
- return true;
265
- }
266
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
267
- (object != null && value in Object(object));
268
- }
269
-
270
- var _isKey = isKey;
271
-
272
- /**
273
- * Checks if `value` is the
274
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
275
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
276
- *
277
- * @static
278
- * @memberOf _
279
- * @since 0.1.0
280
- * @category Lang
281
- * @param {*} value The value to check.
282
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
283
- * @example
284
- *
285
- * _.isObject({});
286
- * // => true
287
- *
288
- * _.isObject([1, 2, 3]);
289
- * // => true
290
- *
291
- * _.isObject(_.noop);
292
- * // => true
293
- *
294
- * _.isObject(null);
295
- * // => false
296
- */
297
- function isObject(value) {
298
- var type = typeof value;
299
- return value != null && (type == 'object' || type == 'function');
300
- }
301
-
302
- var isObject_1 = isObject;
303
-
304
- /** `Object#toString` result references. */
305
- var asyncTag = '[object AsyncFunction]',
306
- funcTag = '[object Function]',
307
- genTag = '[object GeneratorFunction]',
308
- proxyTag = '[object Proxy]';
309
-
310
- /**
311
- * Checks if `value` is classified as a `Function` object.
312
- *
313
- * @static
314
- * @memberOf _
315
- * @since 0.1.0
316
- * @category Lang
317
- * @param {*} value The value to check.
318
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
319
- * @example
320
- *
321
- * _.isFunction(_);
322
- * // => true
323
- *
324
- * _.isFunction(/abc/);
325
- * // => false
326
- */
327
- function isFunction(value) {
328
- if (!isObject_1(value)) {
329
- return false;
330
- }
331
- // The use of `Object#toString` avoids issues with the `typeof` operator
332
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
333
- var tag = _baseGetTag(value);
334
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
335
- }
336
-
337
- var isFunction_1 = isFunction;
338
-
339
- /** Used to detect overreaching core-js shims. */
340
- var coreJsData = _root['__core-js_shared__'];
341
-
342
- var _coreJsData = coreJsData;
343
-
344
- /** Used to detect methods masquerading as native. */
345
- var maskSrcKey = (function() {
346
- var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
347
- return uid ? ('Symbol(src)_1.' + uid) : '';
348
- }());
349
-
350
- /**
351
- * Checks if `func` has its source masked.
352
- *
353
- * @private
354
- * @param {Function} func The function to check.
355
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
356
- */
357
- function isMasked(func) {
358
- return !!maskSrcKey && (maskSrcKey in func);
359
- }
360
-
361
- var _isMasked = isMasked;
362
-
363
- /** Used for built-in method references. */
364
- var funcProto$1 = Function.prototype;
365
-
366
- /** Used to resolve the decompiled source of functions. */
367
- var funcToString$1 = funcProto$1.toString;
368
-
369
- /**
370
- * Converts `func` to its source code.
371
- *
372
- * @private
373
- * @param {Function} func The function to convert.
374
- * @returns {string} Returns the source code.
375
- */
376
- function toSource(func) {
377
- if (func != null) {
378
- try {
379
- return funcToString$1.call(func);
380
- } catch (e) {}
381
- try {
382
- return (func + '');
383
- } catch (e) {}
384
- }
385
- return '';
386
- }
387
-
388
- var _toSource = toSource;
389
-
390
- /**
391
- * Used to match `RegExp`
392
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
393
- */
394
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
395
-
396
- /** Used to detect host constructors (Safari). */
397
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
398
-
399
- /** Used for built-in method references. */
400
- var funcProto = Function.prototype,
401
- objectProto$2 = Object.prototype;
402
-
403
- /** Used to resolve the decompiled source of functions. */
404
- var funcToString = funcProto.toString;
405
-
406
- /** Used to check objects for own properties. */
407
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
408
-
409
- /** Used to detect if a method is native. */
410
- var reIsNative = RegExp('^' +
411
- funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
412
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
413
- );
414
-
415
- /**
416
- * The base implementation of `_.isNative` without bad shim checks.
417
- *
418
- * @private
419
- * @param {*} value The value to check.
420
- * @returns {boolean} Returns `true` if `value` is a native function,
421
- * else `false`.
422
- */
423
- function baseIsNative(value) {
424
- if (!isObject_1(value) || _isMasked(value)) {
425
- return false;
426
- }
427
- var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
428
- return pattern.test(_toSource(value));
429
- }
430
-
431
- var _baseIsNative = baseIsNative;
432
-
433
- /**
434
- * Gets the value at `key` of `object`.
435
- *
436
- * @private
437
- * @param {Object} [object] The object to query.
438
- * @param {string} key The key of the property to get.
439
- * @returns {*} Returns the property value.
440
- */
441
- function getValue(object, key) {
442
- return object == null ? undefined : object[key];
443
- }
444
-
445
- var _getValue = getValue;
446
-
447
- /**
448
- * Gets the native function at `key` of `object`.
449
- *
450
- * @private
451
- * @param {Object} object The object to query.
452
- * @param {string} key The key of the method to get.
453
- * @returns {*} Returns the function if it's native, else `undefined`.
454
- */
455
- function getNative(object, key) {
456
- var value = _getValue(object, key);
457
- return _baseIsNative(value) ? value : undefined;
458
- }
459
-
460
- var _getNative = getNative;
461
-
462
- /* Built-in method references that are verified to be native. */
463
- var nativeCreate = _getNative(Object, 'create');
464
-
465
- var _nativeCreate = nativeCreate;
466
-
467
- /**
468
- * Removes all key-value entries from the hash.
469
- *
470
- * @private
471
- * @name clear
472
- * @memberOf Hash
473
- */
474
- function hashClear() {
475
- this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
476
- this.size = 0;
477
- }
478
-
479
- var _hashClear = hashClear;
480
-
481
- /**
482
- * Removes `key` and its value from the hash.
483
- *
484
- * @private
485
- * @name delete
486
- * @memberOf Hash
487
- * @param {Object} hash The hash to modify.
488
- * @param {string} key The key of the value to remove.
489
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
490
- */
491
- function hashDelete(key) {
492
- var result = this.has(key) && delete this.__data__[key];
493
- this.size -= result ? 1 : 0;
494
- return result;
495
- }
496
-
497
- var _hashDelete = hashDelete;
498
-
499
- /** Used to stand-in for `undefined` hash values. */
500
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
501
-
502
- /** Used for built-in method references. */
503
- var objectProto$1 = Object.prototype;
504
-
505
- /** Used to check objects for own properties. */
506
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
507
-
508
- /**
509
- * Gets the hash value for `key`.
510
- *
511
- * @private
512
- * @name get
513
- * @memberOf Hash
514
- * @param {string} key The key of the value to get.
515
- * @returns {*} Returns the entry value.
516
- */
517
- function hashGet(key) {
518
- var data = this.__data__;
519
- if (_nativeCreate) {
520
- var result = data[key];
521
- return result === HASH_UNDEFINED$1 ? undefined : result;
522
- }
523
- return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
524
- }
525
-
526
- var _hashGet = hashGet;
527
-
528
- /** Used for built-in method references. */
529
- var objectProto = Object.prototype;
530
-
531
- /** Used to check objects for own properties. */
532
- var hasOwnProperty = objectProto.hasOwnProperty;
533
-
534
- /**
535
- * Checks if a hash value for `key` exists.
536
- *
537
- * @private
538
- * @name has
539
- * @memberOf Hash
540
- * @param {string} key The key of the entry to check.
541
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
542
- */
543
- function hashHas(key) {
544
- var data = this.__data__;
545
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
546
- }
547
-
548
- var _hashHas = hashHas;
549
-
550
- /** Used to stand-in for `undefined` hash values. */
551
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
552
-
553
- /**
554
- * Sets the hash `key` to `value`.
555
- *
556
- * @private
557
- * @name set
558
- * @memberOf Hash
559
- * @param {string} key The key of the value to set.
560
- * @param {*} value The value to set.
561
- * @returns {Object} Returns the hash instance.
562
- */
563
- function hashSet(key, value) {
564
- var data = this.__data__;
565
- this.size += this.has(key) ? 0 : 1;
566
- data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
567
- return this;
568
- }
569
-
570
- var _hashSet = hashSet;
571
-
572
- /**
573
- * Creates a hash object.
574
- *
575
- * @private
576
- * @constructor
577
- * @param {Array} [entries] The key-value pairs to cache.
578
- */
579
- function Hash(entries) {
580
- var index = -1,
581
- length = entries == null ? 0 : entries.length;
582
-
583
- this.clear();
584
- while (++index < length) {
585
- var entry = entries[index];
586
- this.set(entry[0], entry[1]);
587
- }
588
- }
589
-
590
- // Add methods to `Hash`.
591
- Hash.prototype.clear = _hashClear;
592
- Hash.prototype['delete'] = _hashDelete;
593
- Hash.prototype.get = _hashGet;
594
- Hash.prototype.has = _hashHas;
595
- Hash.prototype.set = _hashSet;
596
-
597
- var _Hash = Hash;
598
-
599
- /**
600
- * Removes all key-value entries from the list cache.
601
- *
602
- * @private
603
- * @name clear
604
- * @memberOf ListCache
605
- */
606
- function listCacheClear() {
607
- this.__data__ = [];
608
- this.size = 0;
609
- }
610
-
611
- var _listCacheClear = listCacheClear;
612
-
613
- /**
614
- * Performs a
615
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
616
- * comparison between two values to determine if they are equivalent.
617
- *
618
- * @static
619
- * @memberOf _
620
- * @since 4.0.0
621
- * @category Lang
622
- * @param {*} value The value to compare.
623
- * @param {*} other The other value to compare.
624
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
625
- * @example
626
- *
627
- * var object = { 'a': 1 };
628
- * var other = { 'a': 1 };
629
- *
630
- * _.eq(object, object);
631
- * // => true
632
- *
633
- * _.eq(object, other);
634
- * // => false
635
- *
636
- * _.eq('a', 'a');
637
- * // => true
638
- *
639
- * _.eq('a', Object('a'));
640
- * // => false
641
- *
642
- * _.eq(NaN, NaN);
643
- * // => true
644
- */
645
- function eq(value, other) {
646
- return value === other || (value !== value && other !== other);
647
- }
648
-
649
- var eq_1 = eq;
650
-
651
- /**
652
- * Gets the index at which the `key` is found in `array` of key-value pairs.
653
- *
654
- * @private
655
- * @param {Array} array The array to inspect.
656
- * @param {*} key The key to search for.
657
- * @returns {number} Returns the index of the matched value, else `-1`.
658
- */
659
- function assocIndexOf(array, key) {
660
- var length = array.length;
661
- while (length--) {
662
- if (eq_1(array[length][0], key)) {
663
- return length;
664
- }
665
- }
666
- return -1;
667
- }
668
-
669
- var _assocIndexOf = assocIndexOf;
670
-
671
- /** Used for built-in method references. */
672
- var arrayProto = Array.prototype;
673
-
674
- /** Built-in value references. */
675
- var splice = arrayProto.splice;
676
-
677
- /**
678
- * Removes `key` and its value from the list cache.
679
- *
680
- * @private
681
- * @name delete
682
- * @memberOf ListCache
683
- * @param {string} key The key of the value to remove.
684
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
685
- */
686
- function listCacheDelete(key) {
687
- var data = this.__data__,
688
- index = _assocIndexOf(data, key);
689
-
690
- if (index < 0) {
691
- return false;
692
- }
693
- var lastIndex = data.length - 1;
694
- if (index == lastIndex) {
695
- data.pop();
696
- } else {
697
- splice.call(data, index, 1);
698
- }
699
- --this.size;
700
- return true;
701
- }
702
-
703
- var _listCacheDelete = listCacheDelete;
704
-
705
- /**
706
- * Gets the list cache value for `key`.
707
- *
708
- * @private
709
- * @name get
710
- * @memberOf ListCache
711
- * @param {string} key The key of the value to get.
712
- * @returns {*} Returns the entry value.
713
- */
714
- function listCacheGet(key) {
715
- var data = this.__data__,
716
- index = _assocIndexOf(data, key);
717
-
718
- return index < 0 ? undefined : data[index][1];
719
- }
720
-
721
- var _listCacheGet = listCacheGet;
722
-
723
- /**
724
- * Checks if a list cache value for `key` exists.
725
- *
726
- * @private
727
- * @name has
728
- * @memberOf ListCache
729
- * @param {string} key The key of the entry to check.
730
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
731
- */
732
- function listCacheHas(key) {
733
- return _assocIndexOf(this.__data__, key) > -1;
734
- }
735
-
736
- var _listCacheHas = listCacheHas;
737
-
738
- /**
739
- * Sets the list cache `key` to `value`.
740
- *
741
- * @private
742
- * @name set
743
- * @memberOf ListCache
744
- * @param {string} key The key of the value to set.
745
- * @param {*} value The value to set.
746
- * @returns {Object} Returns the list cache instance.
747
- */
748
- function listCacheSet(key, value) {
749
- var data = this.__data__,
750
- index = _assocIndexOf(data, key);
751
-
752
- if (index < 0) {
753
- ++this.size;
754
- data.push([key, value]);
755
- } else {
756
- data[index][1] = value;
757
- }
758
- return this;
759
- }
760
-
761
- var _listCacheSet = listCacheSet;
762
-
763
- /**
764
- * Creates an list cache object.
765
- *
766
- * @private
767
- * @constructor
768
- * @param {Array} [entries] The key-value pairs to cache.
769
- */
770
- function ListCache(entries) {
771
- var index = -1,
772
- length = entries == null ? 0 : entries.length;
773
-
774
- this.clear();
775
- while (++index < length) {
776
- var entry = entries[index];
777
- this.set(entry[0], entry[1]);
778
- }
779
- }
780
-
781
- // Add methods to `ListCache`.
782
- ListCache.prototype.clear = _listCacheClear;
783
- ListCache.prototype['delete'] = _listCacheDelete;
784
- ListCache.prototype.get = _listCacheGet;
785
- ListCache.prototype.has = _listCacheHas;
786
- ListCache.prototype.set = _listCacheSet;
787
-
788
- var _ListCache = ListCache;
789
-
790
- /* Built-in method references that are verified to be native. */
791
- var Map = _getNative(_root, 'Map');
792
-
793
- var _Map = Map;
794
-
795
- /**
796
- * Removes all key-value entries from the map.
797
- *
798
- * @private
799
- * @name clear
800
- * @memberOf MapCache
801
- */
802
- function mapCacheClear() {
803
- this.size = 0;
804
- this.__data__ = {
805
- 'hash': new _Hash,
806
- 'map': new (_Map || _ListCache),
807
- 'string': new _Hash
808
- };
809
- }
810
-
811
- var _mapCacheClear = mapCacheClear;
812
-
813
- /**
814
- * Checks if `value` is suitable for use as unique object key.
815
- *
816
- * @private
817
- * @param {*} value The value to check.
818
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
819
- */
820
- function isKeyable(value) {
821
- var type = typeof value;
822
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
823
- ? (value !== '__proto__')
824
- : (value === null);
825
- }
826
-
827
- var _isKeyable = isKeyable;
828
-
829
- /**
830
- * Gets the data for `map`.
831
- *
832
- * @private
833
- * @param {Object} map The map to query.
834
- * @param {string} key The reference key.
835
- * @returns {*} Returns the map data.
836
- */
837
- function getMapData(map, key) {
838
- var data = map.__data__;
839
- return _isKeyable(key)
840
- ? data[typeof key == 'string' ? 'string' : 'hash']
841
- : data.map;
842
- }
843
-
844
- var _getMapData = getMapData;
845
-
846
- /**
847
- * Removes `key` and its value from the map.
848
- *
849
- * @private
850
- * @name delete
851
- * @memberOf MapCache
852
- * @param {string} key The key of the value to remove.
853
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
854
- */
855
- function mapCacheDelete(key) {
856
- var result = _getMapData(this, key)['delete'](key);
857
- this.size -= result ? 1 : 0;
858
- return result;
859
- }
860
-
861
- var _mapCacheDelete = mapCacheDelete;
862
-
863
- /**
864
- * Gets the map value for `key`.
865
- *
866
- * @private
867
- * @name get
868
- * @memberOf MapCache
869
- * @param {string} key The key of the value to get.
870
- * @returns {*} Returns the entry value.
871
- */
872
- function mapCacheGet(key) {
873
- return _getMapData(this, key).get(key);
874
- }
875
-
876
- var _mapCacheGet = mapCacheGet;
877
-
878
- /**
879
- * Checks if a map value for `key` exists.
880
- *
881
- * @private
882
- * @name has
883
- * @memberOf MapCache
884
- * @param {string} key The key of the entry to check.
885
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
886
- */
887
- function mapCacheHas(key) {
888
- return _getMapData(this, key).has(key);
889
- }
890
-
891
- var _mapCacheHas = mapCacheHas;
892
-
893
- /**
894
- * Sets the map `key` to `value`.
895
- *
896
- * @private
897
- * @name set
898
- * @memberOf MapCache
899
- * @param {string} key The key of the value to set.
900
- * @param {*} value The value to set.
901
- * @returns {Object} Returns the map cache instance.
902
- */
903
- function mapCacheSet(key, value) {
904
- var data = _getMapData(this, key),
905
- size = data.size;
906
-
907
- data.set(key, value);
908
- this.size += data.size == size ? 0 : 1;
909
- return this;
910
- }
911
-
912
- var _mapCacheSet = mapCacheSet;
913
-
914
- /**
915
- * Creates a map cache object to store key-value pairs.
916
- *
917
- * @private
918
- * @constructor
919
- * @param {Array} [entries] The key-value pairs to cache.
920
- */
921
- function MapCache(entries) {
922
- var index = -1,
923
- length = entries == null ? 0 : entries.length;
924
-
925
- this.clear();
926
- while (++index < length) {
927
- var entry = entries[index];
928
- this.set(entry[0], entry[1]);
929
- }
930
- }
931
-
932
- // Add methods to `MapCache`.
933
- MapCache.prototype.clear = _mapCacheClear;
934
- MapCache.prototype['delete'] = _mapCacheDelete;
935
- MapCache.prototype.get = _mapCacheGet;
936
- MapCache.prototype.has = _mapCacheHas;
937
- MapCache.prototype.set = _mapCacheSet;
938
-
939
- var _MapCache = MapCache;
940
-
941
- /** Error message constants. */
942
- var FUNC_ERROR_TEXT = 'Expected a function';
943
-
944
- /**
945
- * Creates a function that memoizes the result of `func`. If `resolver` is
946
- * provided, it determines the cache key for storing the result based on the
947
- * arguments provided to the memoized function. By default, the first argument
948
- * provided to the memoized function is used as the map cache key. The `func`
949
- * is invoked with the `this` binding of the memoized function.
950
- *
951
- * **Note:** The cache is exposed as the `cache` property on the memoized
952
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
953
- * constructor with one whose instances implement the
954
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
955
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
956
- *
957
- * @static
958
- * @memberOf _
959
- * @since 0.1.0
960
- * @category Function
961
- * @param {Function} func The function to have its output memoized.
962
- * @param {Function} [resolver] The function to resolve the cache key.
963
- * @returns {Function} Returns the new memoized function.
964
- * @example
965
- *
966
- * var object = { 'a': 1, 'b': 2 };
967
- * var other = { 'c': 3, 'd': 4 };
968
- *
969
- * var values = _.memoize(_.values);
970
- * values(object);
971
- * // => [1, 2]
972
- *
973
- * values(other);
974
- * // => [3, 4]
975
- *
976
- * object.a = 2;
977
- * values(object);
978
- * // => [1, 2]
979
- *
980
- * // Modify the result cache.
981
- * values.cache.set(object, ['a', 'b']);
982
- * values(object);
983
- * // => ['a', 'b']
984
- *
985
- * // Replace `_.memoize.Cache`.
986
- * _.memoize.Cache = WeakMap;
987
- */
988
- function memoize(func, resolver) {
989
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
990
- throw new TypeError(FUNC_ERROR_TEXT);
991
- }
992
- var memoized = function() {
993
- var args = arguments,
994
- key = resolver ? resolver.apply(this, args) : args[0],
995
- cache = memoized.cache;
996
-
997
- if (cache.has(key)) {
998
- return cache.get(key);
999
- }
1000
- var result = func.apply(this, args);
1001
- memoized.cache = cache.set(key, result) || cache;
1002
- return result;
1003
- };
1004
- memoized.cache = new (memoize.Cache || _MapCache);
1005
- return memoized;
1006
- }
1007
-
1008
- // Expose `MapCache`.
1009
- memoize.Cache = _MapCache;
1010
-
1011
- var memoize_1 = memoize;
1012
-
1013
- /** Used as the maximum memoize cache size. */
1014
- var MAX_MEMOIZE_SIZE = 500;
1015
-
1016
- /**
1017
- * A specialized version of `_.memoize` which clears the memoized function's
1018
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1019
- *
1020
- * @private
1021
- * @param {Function} func The function to have its output memoized.
1022
- * @returns {Function} Returns the new memoized function.
1023
- */
1024
- function memoizeCapped(func) {
1025
- var result = memoize_1(func, function(key) {
1026
- if (cache.size === MAX_MEMOIZE_SIZE) {
1027
- cache.clear();
1028
- }
1029
- return key;
1030
- });
1031
-
1032
- var cache = result.cache;
1033
- return result;
1034
- }
1035
-
1036
- var _memoizeCapped = memoizeCapped;
1037
-
1038
- /** Used to match property names within property paths. */
1039
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1040
-
1041
- /** Used to match backslashes in property paths. */
1042
- var reEscapeChar = /\\(\\)?/g;
1043
-
1044
- /**
1045
- * Converts `string` to a property path array.
1046
- *
1047
- * @private
1048
- * @param {string} string The string to convert.
1049
- * @returns {Array} Returns the property path array.
1050
- */
1051
- var stringToPath = _memoizeCapped(function(string) {
1052
- var result = [];
1053
- if (string.charCodeAt(0) === 46 /* . */) {
1054
- result.push('');
1055
- }
1056
- string.replace(rePropName, function(match, number, quote, subString) {
1057
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1058
- });
1059
- return result;
1060
- });
1061
-
1062
- var _stringToPath = stringToPath;
1063
-
1064
- /**
1065
- * A specialized version of `_.map` for arrays without support for iteratee
1066
- * shorthands.
1067
- *
1068
- * @private
1069
- * @param {Array} [array] The array to iterate over.
1070
- * @param {Function} iteratee The function invoked per iteration.
1071
- * @returns {Array} Returns the new mapped array.
1072
- */
1073
- function arrayMap(array, iteratee) {
1074
- var index = -1,
1075
- length = array == null ? 0 : array.length,
1076
- result = Array(length);
1077
-
1078
- while (++index < length) {
1079
- result[index] = iteratee(array[index], index, array);
1080
- }
1081
- return result;
1082
- }
1083
-
1084
- var _arrayMap = arrayMap;
1085
-
1086
- /** Used as references for various `Number` constants. */
1087
- var INFINITY$1 = 1 / 0;
1088
-
1089
- /** Used to convert symbols to primitives and strings. */
1090
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
1091
- symbolToString = symbolProto ? symbolProto.toString : undefined;
1092
-
1093
- /**
1094
- * The base implementation of `_.toString` which doesn't convert nullish
1095
- * values to empty strings.
1096
- *
1097
- * @private
1098
- * @param {*} value The value to process.
1099
- * @returns {string} Returns the string.
1100
- */
1101
- function baseToString(value) {
1102
- // Exit early for strings to avoid a performance hit in some environments.
1103
- if (typeof value == 'string') {
1104
- return value;
1105
- }
1106
- if (isArray_1(value)) {
1107
- // Recursively convert values (susceptible to call stack limits).
1108
- return _arrayMap(value, baseToString) + '';
1109
- }
1110
- if (isSymbol_1(value)) {
1111
- return symbolToString ? symbolToString.call(value) : '';
1112
- }
1113
- var result = (value + '');
1114
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
1115
- }
1116
-
1117
- var _baseToString = baseToString;
1118
-
1119
- /**
1120
- * Converts `value` to a string. An empty string is returned for `null`
1121
- * and `undefined` values. The sign of `-0` is preserved.
1122
- *
1123
- * @static
1124
- * @memberOf _
1125
- * @since 4.0.0
1126
- * @category Lang
1127
- * @param {*} value The value to convert.
1128
- * @returns {string} Returns the converted string.
1129
- * @example
1130
- *
1131
- * _.toString(null);
1132
- * // => ''
1133
- *
1134
- * _.toString(-0);
1135
- * // => '-0'
1136
- *
1137
- * _.toString([1, 2, 3]);
1138
- * // => '1,2,3'
1139
- */
1140
- function toString(value) {
1141
- return value == null ? '' : _baseToString(value);
1142
- }
1143
-
1144
- var toString_1 = toString;
1145
-
1146
- /**
1147
- * Casts `value` to a path array if it's not one.
1148
- *
1149
- * @private
1150
- * @param {*} value The value to inspect.
1151
- * @param {Object} [object] The object to query keys on.
1152
- * @returns {Array} Returns the cast property path array.
1153
- */
1154
- function castPath(value, object) {
1155
- if (isArray_1(value)) {
1156
- return value;
1157
- }
1158
- return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
1159
- }
1160
-
1161
- var _castPath = castPath;
1162
-
1163
- /** Used as references for various `Number` constants. */
1164
- var INFINITY = 1 / 0;
1165
-
1166
- /**
1167
- * Converts `value` to a string key if it's not a string or symbol.
1168
- *
1169
- * @private
1170
- * @param {*} value The value to inspect.
1171
- * @returns {string|symbol} Returns the key.
1172
- */
1173
- function toKey(value) {
1174
- if (typeof value == 'string' || isSymbol_1(value)) {
1175
- return value;
1176
- }
1177
- var result = (value + '');
1178
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1179
- }
1180
-
1181
- var _toKey = toKey;
1182
-
1183
- /**
1184
- * The base implementation of `_.get` without support for default values.
1185
- *
1186
- * @private
1187
- * @param {Object} object The object to query.
1188
- * @param {Array|string} path The path of the property to get.
1189
- * @returns {*} Returns the resolved value.
1190
- */
1191
- function baseGet(object, path) {
1192
- path = _castPath(path, object);
1193
-
1194
- var index = 0,
1195
- length = path.length;
1196
-
1197
- while (object != null && index < length) {
1198
- object = object[_toKey(path[index++])];
1199
- }
1200
- return (index && index == length) ? object : undefined;
1201
- }
1202
-
1203
- var _baseGet = baseGet;
1204
-
1205
- /**
1206
- * Gets the value at `path` of `object`. If the resolved value is
1207
- * `undefined`, the `defaultValue` is returned in its place.
1208
- *
1209
- * @static
1210
- * @memberOf _
1211
- * @since 3.7.0
1212
- * @category Object
1213
- * @param {Object} object The object to query.
1214
- * @param {Array|string} path The path of the property to get.
1215
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1216
- * @returns {*} Returns the resolved value.
1217
- * @example
1218
- *
1219
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1220
- *
1221
- * _.get(object, 'a[0].b.c');
1222
- * // => 3
1223
- *
1224
- * _.get(object, ['a', '0', 'b', 'c']);
1225
- * // => 3
1226
- *
1227
- * _.get(object, 'a.b.c', 'default');
1228
- * // => 'default'
1229
- */
1230
- function get(object, path, defaultValue) {
1231
- var result = object == null ? undefined : _baseGet(object, path);
1232
- return result === undefined ? defaultValue : result;
1233
- }
1234
-
1235
- var get_1 = get;
1236
-
1237
- function _arrayWithHoles(arr) {
1238
- if (Array.isArray(arr)) return arr;
1239
- }
1240
-
1241
- function _iterableToArrayLimit(arr, i) {
1242
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1243
-
1244
- if (_i == null) return;
1245
- var _arr = [];
1246
- var _n = true;
1247
- var _d = false;
1248
-
1249
- var _s, _e;
1250
-
1251
- try {
1252
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
1253
- _arr.push(_s.value);
1254
-
1255
- if (i && _arr.length === i) break;
1256
- }
1257
- } catch (err) {
1258
- _d = true;
1259
- _e = err;
1260
- } finally {
1261
- try {
1262
- if (!_n && _i["return"] != null) _i["return"]();
1263
- } finally {
1264
- if (_d) throw _e;
1265
- }
1266
- }
1267
-
1268
- return _arr;
1269
- }
1270
-
1271
- function _arrayLikeToArray(arr, len) {
1272
- if (len == null || len > arr.length) len = arr.length;
1273
-
1274
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
1275
- arr2[i] = arr[i];
1276
- }
1277
-
1278
- return arr2;
1279
- }
1280
-
1281
- function _unsupportedIterableToArray(o, minLen) {
1282
- if (!o) return;
1283
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1284
- var n = Object.prototype.toString.call(o).slice(8, -1);
1285
- if (n === "Object" && o.constructor) n = o.constructor.name;
1286
- if (n === "Map" || n === "Set") return Array.from(o);
1287
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1288
- }
1289
-
1290
- function _nonIterableRest() {
1291
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1292
- }
1293
-
1294
- function _slicedToArray(arr, i) {
1295
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1296
- }
1297
-
1298
- var isClient = typeof window !== "undefined";
1299
-
1300
- var hasIntersectionObserverSupport = function hasIntersectionObserverSupport() {
1301
- return typeof window.IntersectionObserver !== "undefined";
1302
- }; // import intersection observer polyfill only if on client
1303
- // and if not supported by browser
1304
-
1305
-
1306
- var getIntersectionObserver = function getIntersectionObserver() {
1307
- return Promise.resolve(isClient && !hasIntersectionObserverSupport() && Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('intersection-observer')); }));
1308
- }; // options for intersection observer in order to improve the effect
1309
-
1310
-
1311
- var intersectionObserverOptions = {
1312
- root: null,
1313
- // windows viewport will be used
1314
- rootMargin: "200px 0px 0px 0px"
1315
- };
1316
-
1317
- var handleIntersect = function handleIntersect(entries, observer) {
1318
- entries.filter(function (entry) {
1319
- return entry.isIntersecting;
1320
- }).forEach(function (entry) {
1321
- var target = entry.target;
1322
-
1323
- target._onIntersect(observer);
1324
- });
1325
- }; // get observer from the cache or create a new one
1326
-
1327
-
1328
- var getObserver = function getObserver() {
1329
- return getIntersectionObserver().then(function (_) {
1330
-
1331
- if (isClient) {
1332
- return new window.IntersectionObserver(handleIntersect, intersectionObserverOptions);
1333
- }
1334
- });
1335
- };
1336
-
1337
- var useNearScreen = (function (_ref) {
1338
- var ref = _ref.ref;
1339
-
1340
- var _useState = React.useState(false),
1341
- _useState2 = _slicedToArray(_useState, 2),
1342
- show = _useState2[0],
1343
- setShow = _useState2[1];
1344
-
1345
- React.useEffect(function () {
1346
- var current = ref.current;
1347
- if (!current) return; // get observer async and only when needed
1348
-
1349
- getObserver().then(function (observer) {
1350
- return observer.observe(current);
1351
- }); // mutate the current target to add a method to be executed when intersecting
1352
-
1353
- current._onIntersect = function (observer) {
1354
- setShow(true);
1355
- observer.unobserve(current);
1356
- }; // clean observed element when unmounted
1357
-
1358
-
1359
- return function () {
1360
- return current._isSubscribed = false;
1361
- };
1362
- }, [ref]);
1363
- return show;
1364
- });
1365
-
1366
- var EMPTY_HTML = {
1367
- __html: ""
1368
- };
1369
- var isServer = typeof window === "undefined";
1370
- var ProgressiveHydration = function ProgressiveHydration(props) {
1371
- var children = props.children;
1372
- var ref = React.useRef(null);
1373
- var isNearScreen = useNearScreen({
1374
- ref: ref
1375
- });
1376
- React.useEffect(function () {
1377
- var el = ref.current; // CLIENT:
1378
- // If we want to force the hydration OR the element is near screen
1379
- // then we hydrate the content to get the functionality ready
1380
-
1381
- if (isNearScreen) {
1382
- var action = el.hasChildNodes() ? "hydrate" : "render";
1383
- ReactDOM__default["default"][action](children, el);
1384
- }
1385
- }, [children, isNearScreen]); // SERVER: Just render the content as usual
1386
-
1387
- if (isServer) {
1388
- return /*#__PURE__*/React__default["default"].createElement("div", {
1389
- ref: ref
1390
- }, children);
1391
- } // CLIENT: Avoid hydration until we say so
1392
-
1393
-
1394
- return /*#__PURE__*/React__default["default"].createElement("div", {
1395
- ref: ref,
1396
- suppressHydrationWarning: true,
1397
- dangerouslySetInnerHTML: EMPTY_HTML
1398
- });
1399
- };
1400
- ProgressiveHydration.propTypes = {
1401
- children: PropTypes__default["default"].element
1402
- };
1403
-
1404
- function _typeof(obj) {
1405
- "@babel/helpers - typeof";
1406
-
1407
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1408
- return typeof obj;
1409
- } : function (obj) {
1410
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1411
- }, _typeof(obj);
1412
- }
1413
-
1414
- /**
1415
- * Copyright (c) 2014-present, Facebook, Inc.
1416
- *
1417
- * This source code is licensed under the MIT license found in the
1418
- * LICENSE file in the root directory of this source tree.
1419
- */
1420
-
1421
- createCommonjsModule(function (module) {
1422
- var runtime = (function (exports) {
1423
-
1424
- var Op = Object.prototype;
1425
- var hasOwn = Op.hasOwnProperty;
1426
- var undefined$1; // More compressible than void 0.
1427
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
1428
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
1429
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
1430
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
1431
-
1432
- function define(obj, key, value) {
1433
- Object.defineProperty(obj, key, {
1434
- value: value,
1435
- enumerable: true,
1436
- configurable: true,
1437
- writable: true
1438
- });
1439
- return obj[key];
1440
- }
1441
- try {
1442
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
1443
- define({}, "");
1444
- } catch (err) {
1445
- define = function(obj, key, value) {
1446
- return obj[key] = value;
1447
- };
1448
- }
1449
-
1450
- function wrap(innerFn, outerFn, self, tryLocsList) {
1451
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
1452
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
1453
- var generator = Object.create(protoGenerator.prototype);
1454
- var context = new Context(tryLocsList || []);
1455
-
1456
- // The ._invoke method unifies the implementations of the .next,
1457
- // .throw, and .return methods.
1458
- generator._invoke = makeInvokeMethod(innerFn, self, context);
1459
-
1460
- return generator;
1461
- }
1462
- exports.wrap = wrap;
1463
-
1464
- // Try/catch helper to minimize deoptimizations. Returns a completion
1465
- // record like context.tryEntries[i].completion. This interface could
1466
- // have been (and was previously) designed to take a closure to be
1467
- // invoked without arguments, but in all the cases we care about we
1468
- // already have an existing method we want to call, so there's no need
1469
- // to create a new function object. We can even get away with assuming
1470
- // the method takes exactly one argument, since that happens to be true
1471
- // in every case, so we don't have to touch the arguments object. The
1472
- // only additional allocation required is the completion record, which
1473
- // has a stable shape and so hopefully should be cheap to allocate.
1474
- function tryCatch(fn, obj, arg) {
1475
- try {
1476
- return { type: "normal", arg: fn.call(obj, arg) };
1477
- } catch (err) {
1478
- return { type: "throw", arg: err };
1479
- }
1480
- }
1481
-
1482
- var GenStateSuspendedStart = "suspendedStart";
1483
- var GenStateSuspendedYield = "suspendedYield";
1484
- var GenStateExecuting = "executing";
1485
- var GenStateCompleted = "completed";
1486
-
1487
- // Returning this object from the innerFn has the same effect as
1488
- // breaking out of the dispatch switch statement.
1489
- var ContinueSentinel = {};
1490
-
1491
- // Dummy constructor functions that we use as the .constructor and
1492
- // .constructor.prototype properties for functions that return Generator
1493
- // objects. For full spec compliance, you may wish to configure your
1494
- // minifier not to mangle the names of these two functions.
1495
- function Generator() {}
1496
- function GeneratorFunction() {}
1497
- function GeneratorFunctionPrototype() {}
1498
-
1499
- // This is a polyfill for %IteratorPrototype% for environments that
1500
- // don't natively support it.
1501
- var IteratorPrototype = {};
1502
- define(IteratorPrototype, iteratorSymbol, function () {
1503
- return this;
1504
- });
1505
-
1506
- var getProto = Object.getPrototypeOf;
1507
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
1508
- if (NativeIteratorPrototype &&
1509
- NativeIteratorPrototype !== Op &&
1510
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
1511
- // This environment has a native %IteratorPrototype%; use it instead
1512
- // of the polyfill.
1513
- IteratorPrototype = NativeIteratorPrototype;
1514
- }
1515
-
1516
- var Gp = GeneratorFunctionPrototype.prototype =
1517
- Generator.prototype = Object.create(IteratorPrototype);
1518
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
1519
- define(Gp, "constructor", GeneratorFunctionPrototype);
1520
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
1521
- GeneratorFunction.displayName = define(
1522
- GeneratorFunctionPrototype,
1523
- toStringTagSymbol,
1524
- "GeneratorFunction"
1525
- );
1526
-
1527
- // Helper for defining the .next, .throw, and .return methods of the
1528
- // Iterator interface in terms of a single ._invoke method.
1529
- function defineIteratorMethods(prototype) {
1530
- ["next", "throw", "return"].forEach(function(method) {
1531
- define(prototype, method, function(arg) {
1532
- return this._invoke(method, arg);
1533
- });
1534
- });
1535
- }
1536
-
1537
- exports.isGeneratorFunction = function(genFun) {
1538
- var ctor = typeof genFun === "function" && genFun.constructor;
1539
- return ctor
1540
- ? ctor === GeneratorFunction ||
1541
- // For the native GeneratorFunction constructor, the best we can
1542
- // do is to check its .name property.
1543
- (ctor.displayName || ctor.name) === "GeneratorFunction"
1544
- : false;
1545
- };
1546
-
1547
- exports.mark = function(genFun) {
1548
- if (Object.setPrototypeOf) {
1549
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
1550
- } else {
1551
- genFun.__proto__ = GeneratorFunctionPrototype;
1552
- define(genFun, toStringTagSymbol, "GeneratorFunction");
1553
- }
1554
- genFun.prototype = Object.create(Gp);
1555
- return genFun;
1556
- };
1557
-
1558
- // Within the body of any async function, `await x` is transformed to
1559
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
1560
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
1561
- // meant to be awaited.
1562
- exports.awrap = function(arg) {
1563
- return { __await: arg };
1564
- };
1565
-
1566
- function AsyncIterator(generator, PromiseImpl) {
1567
- function invoke(method, arg, resolve, reject) {
1568
- var record = tryCatch(generator[method], generator, arg);
1569
- if (record.type === "throw") {
1570
- reject(record.arg);
1571
- } else {
1572
- var result = record.arg;
1573
- var value = result.value;
1574
- if (value &&
1575
- typeof value === "object" &&
1576
- hasOwn.call(value, "__await")) {
1577
- return PromiseImpl.resolve(value.__await).then(function(value) {
1578
- invoke("next", value, resolve, reject);
1579
- }, function(err) {
1580
- invoke("throw", err, resolve, reject);
1581
- });
1582
- }
1583
-
1584
- return PromiseImpl.resolve(value).then(function(unwrapped) {
1585
- // When a yielded Promise is resolved, its final value becomes
1586
- // the .value of the Promise<{value,done}> result for the
1587
- // current iteration.
1588
- result.value = unwrapped;
1589
- resolve(result);
1590
- }, function(error) {
1591
- // If a rejected Promise was yielded, throw the rejection back
1592
- // into the async generator function so it can be handled there.
1593
- return invoke("throw", error, resolve, reject);
1594
- });
1595
- }
1596
- }
1597
-
1598
- var previousPromise;
1599
-
1600
- function enqueue(method, arg) {
1601
- function callInvokeWithMethodAndArg() {
1602
- return new PromiseImpl(function(resolve, reject) {
1603
- invoke(method, arg, resolve, reject);
1604
- });
1605
- }
1606
-
1607
- return previousPromise =
1608
- // If enqueue has been called before, then we want to wait until
1609
- // all previous Promises have been resolved before calling invoke,
1610
- // so that results are always delivered in the correct order. If
1611
- // enqueue has not been called before, then it is important to
1612
- // call invoke immediately, without waiting on a callback to fire,
1613
- // so that the async generator function has the opportunity to do
1614
- // any necessary setup in a predictable way. This predictability
1615
- // is why the Promise constructor synchronously invokes its
1616
- // executor callback, and why async functions synchronously
1617
- // execute code before the first await. Since we implement simple
1618
- // async functions in terms of async generators, it is especially
1619
- // important to get this right, even though it requires care.
1620
- previousPromise ? previousPromise.then(
1621
- callInvokeWithMethodAndArg,
1622
- // Avoid propagating failures to Promises returned by later
1623
- // invocations of the iterator.
1624
- callInvokeWithMethodAndArg
1625
- ) : callInvokeWithMethodAndArg();
1626
- }
1627
-
1628
- // Define the unified helper method that is used to implement .next,
1629
- // .throw, and .return (see defineIteratorMethods).
1630
- this._invoke = enqueue;
1631
- }
1632
-
1633
- defineIteratorMethods(AsyncIterator.prototype);
1634
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
1635
- return this;
1636
- });
1637
- exports.AsyncIterator = AsyncIterator;
1638
-
1639
- // Note that simple async functions are implemented on top of
1640
- // AsyncIterator objects; they just return a Promise for the value of
1641
- // the final result produced by the iterator.
1642
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
1643
- if (PromiseImpl === void 0) PromiseImpl = Promise;
1644
-
1645
- var iter = new AsyncIterator(
1646
- wrap(innerFn, outerFn, self, tryLocsList),
1647
- PromiseImpl
1648
- );
1649
-
1650
- return exports.isGeneratorFunction(outerFn)
1651
- ? iter // If outerFn is a generator, return the full iterator.
1652
- : iter.next().then(function(result) {
1653
- return result.done ? result.value : iter.next();
1654
- });
1655
- };
1656
-
1657
- function makeInvokeMethod(innerFn, self, context) {
1658
- var state = GenStateSuspendedStart;
1659
-
1660
- return function invoke(method, arg) {
1661
- if (state === GenStateExecuting) {
1662
- throw new Error("Generator is already running");
1663
- }
1664
-
1665
- if (state === GenStateCompleted) {
1666
- if (method === "throw") {
1667
- throw arg;
1668
- }
1669
-
1670
- // Be forgiving, per 25.3.3.3.3 of the spec:
1671
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
1672
- return doneResult();
1673
- }
1674
-
1675
- context.method = method;
1676
- context.arg = arg;
1677
-
1678
- while (true) {
1679
- var delegate = context.delegate;
1680
- if (delegate) {
1681
- var delegateResult = maybeInvokeDelegate(delegate, context);
1682
- if (delegateResult) {
1683
- if (delegateResult === ContinueSentinel) continue;
1684
- return delegateResult;
1685
- }
1686
- }
1687
-
1688
- if (context.method === "next") {
1689
- // Setting context._sent for legacy support of Babel's
1690
- // function.sent implementation.
1691
- context.sent = context._sent = context.arg;
1692
-
1693
- } else if (context.method === "throw") {
1694
- if (state === GenStateSuspendedStart) {
1695
- state = GenStateCompleted;
1696
- throw context.arg;
1697
- }
1698
-
1699
- context.dispatchException(context.arg);
1700
-
1701
- } else if (context.method === "return") {
1702
- context.abrupt("return", context.arg);
1703
- }
1704
-
1705
- state = GenStateExecuting;
1706
-
1707
- var record = tryCatch(innerFn, self, context);
1708
- if (record.type === "normal") {
1709
- // If an exception is thrown from innerFn, we leave state ===
1710
- // GenStateExecuting and loop back for another invocation.
1711
- state = context.done
1712
- ? GenStateCompleted
1713
- : GenStateSuspendedYield;
1714
-
1715
- if (record.arg === ContinueSentinel) {
1716
- continue;
1717
- }
1718
-
1719
- return {
1720
- value: record.arg,
1721
- done: context.done
1722
- };
1723
-
1724
- } else if (record.type === "throw") {
1725
- state = GenStateCompleted;
1726
- // Dispatch the exception by looping back around to the
1727
- // context.dispatchException(context.arg) call above.
1728
- context.method = "throw";
1729
- context.arg = record.arg;
1730
- }
1731
- }
1732
- };
1733
- }
1734
-
1735
- // Call delegate.iterator[context.method](context.arg) and handle the
1736
- // result, either by returning a { value, done } result from the
1737
- // delegate iterator, or by modifying context.method and context.arg,
1738
- // setting context.delegate to null, and returning the ContinueSentinel.
1739
- function maybeInvokeDelegate(delegate, context) {
1740
- var method = delegate.iterator[context.method];
1741
- if (method === undefined$1) {
1742
- // A .throw or .return when the delegate iterator has no .throw
1743
- // method always terminates the yield* loop.
1744
- context.delegate = null;
1745
-
1746
- if (context.method === "throw") {
1747
- // Note: ["return"] must be used for ES3 parsing compatibility.
1748
- if (delegate.iterator["return"]) {
1749
- // If the delegate iterator has a return method, give it a
1750
- // chance to clean up.
1751
- context.method = "return";
1752
- context.arg = undefined$1;
1753
- maybeInvokeDelegate(delegate, context);
1754
-
1755
- if (context.method === "throw") {
1756
- // If maybeInvokeDelegate(context) changed context.method from
1757
- // "return" to "throw", let that override the TypeError below.
1758
- return ContinueSentinel;
1759
- }
1760
- }
1761
-
1762
- context.method = "throw";
1763
- context.arg = new TypeError(
1764
- "The iterator does not provide a 'throw' method");
1765
- }
1766
-
1767
- return ContinueSentinel;
1768
- }
1769
-
1770
- var record = tryCatch(method, delegate.iterator, context.arg);
1771
-
1772
- if (record.type === "throw") {
1773
- context.method = "throw";
1774
- context.arg = record.arg;
1775
- context.delegate = null;
1776
- return ContinueSentinel;
1777
- }
1778
-
1779
- var info = record.arg;
1780
-
1781
- if (! info) {
1782
- context.method = "throw";
1783
- context.arg = new TypeError("iterator result is not an object");
1784
- context.delegate = null;
1785
- return ContinueSentinel;
1786
- }
1787
-
1788
- if (info.done) {
1789
- // Assign the result of the finished delegate to the temporary
1790
- // variable specified by delegate.resultName (see delegateYield).
1791
- context[delegate.resultName] = info.value;
1792
-
1793
- // Resume execution at the desired location (see delegateYield).
1794
- context.next = delegate.nextLoc;
1795
-
1796
- // If context.method was "throw" but the delegate handled the
1797
- // exception, let the outer generator proceed normally. If
1798
- // context.method was "next", forget context.arg since it has been
1799
- // "consumed" by the delegate iterator. If context.method was
1800
- // "return", allow the original .return call to continue in the
1801
- // outer generator.
1802
- if (context.method !== "return") {
1803
- context.method = "next";
1804
- context.arg = undefined$1;
1805
- }
1806
-
1807
- } else {
1808
- // Re-yield the result returned by the delegate method.
1809
- return info;
1810
- }
1811
-
1812
- // The delegate iterator is finished, so forget it and continue with
1813
- // the outer generator.
1814
- context.delegate = null;
1815
- return ContinueSentinel;
1816
- }
1817
-
1818
- // Define Generator.prototype.{next,throw,return} in terms of the
1819
- // unified ._invoke helper method.
1820
- defineIteratorMethods(Gp);
1821
-
1822
- define(Gp, toStringTagSymbol, "Generator");
1823
-
1824
- // A Generator should always return itself as the iterator object when the
1825
- // @@iterator function is called on it. Some browsers' implementations of the
1826
- // iterator prototype chain incorrectly implement this, causing the Generator
1827
- // object to not be returned from this call. This ensures that doesn't happen.
1828
- // See https://github.com/facebook/regenerator/issues/274 for more details.
1829
- define(Gp, iteratorSymbol, function() {
1830
- return this;
1831
- });
1832
-
1833
- define(Gp, "toString", function() {
1834
- return "[object Generator]";
1835
- });
1836
-
1837
- function pushTryEntry(locs) {
1838
- var entry = { tryLoc: locs[0] };
1839
-
1840
- if (1 in locs) {
1841
- entry.catchLoc = locs[1];
1842
- }
1843
-
1844
- if (2 in locs) {
1845
- entry.finallyLoc = locs[2];
1846
- entry.afterLoc = locs[3];
1847
- }
1848
-
1849
- this.tryEntries.push(entry);
1850
- }
1851
-
1852
- function resetTryEntry(entry) {
1853
- var record = entry.completion || {};
1854
- record.type = "normal";
1855
- delete record.arg;
1856
- entry.completion = record;
1857
- }
1858
-
1859
- function Context(tryLocsList) {
1860
- // The root entry object (effectively a try statement without a catch
1861
- // or a finally block) gives us a place to store values thrown from
1862
- // locations where there is no enclosing try statement.
1863
- this.tryEntries = [{ tryLoc: "root" }];
1864
- tryLocsList.forEach(pushTryEntry, this);
1865
- this.reset(true);
1866
- }
1867
-
1868
- exports.keys = function(object) {
1869
- var keys = [];
1870
- for (var key in object) {
1871
- keys.push(key);
1872
- }
1873
- keys.reverse();
1874
-
1875
- // Rather than returning an object with a next method, we keep
1876
- // things simple and return the next function itself.
1877
- return function next() {
1878
- while (keys.length) {
1879
- var key = keys.pop();
1880
- if (key in object) {
1881
- next.value = key;
1882
- next.done = false;
1883
- return next;
1884
- }
1885
- }
1886
-
1887
- // To avoid creating an additional object, we just hang the .value
1888
- // and .done properties off the next function object itself. This
1889
- // also ensures that the minifier will not anonymize the function.
1890
- next.done = true;
1891
- return next;
1892
- };
1893
- };
1894
-
1895
- function values(iterable) {
1896
- if (iterable) {
1897
- var iteratorMethod = iterable[iteratorSymbol];
1898
- if (iteratorMethod) {
1899
- return iteratorMethod.call(iterable);
1900
- }
1901
-
1902
- if (typeof iterable.next === "function") {
1903
- return iterable;
1904
- }
1905
-
1906
- if (!isNaN(iterable.length)) {
1907
- var i = -1, next = function next() {
1908
- while (++i < iterable.length) {
1909
- if (hasOwn.call(iterable, i)) {
1910
- next.value = iterable[i];
1911
- next.done = false;
1912
- return next;
1913
- }
1914
- }
1915
-
1916
- next.value = undefined$1;
1917
- next.done = true;
1918
-
1919
- return next;
1920
- };
1921
-
1922
- return next.next = next;
1923
- }
1924
- }
1925
-
1926
- // Return an iterator with no values.
1927
- return { next: doneResult };
1928
- }
1929
- exports.values = values;
1930
-
1931
- function doneResult() {
1932
- return { value: undefined$1, done: true };
1933
- }
1934
-
1935
- Context.prototype = {
1936
- constructor: Context,
1937
-
1938
- reset: function(skipTempReset) {
1939
- this.prev = 0;
1940
- this.next = 0;
1941
- // Resetting context._sent for legacy support of Babel's
1942
- // function.sent implementation.
1943
- this.sent = this._sent = undefined$1;
1944
- this.done = false;
1945
- this.delegate = null;
1946
-
1947
- this.method = "next";
1948
- this.arg = undefined$1;
1949
-
1950
- this.tryEntries.forEach(resetTryEntry);
1951
-
1952
- if (!skipTempReset) {
1953
- for (var name in this) {
1954
- // Not sure about the optimal order of these conditions:
1955
- if (name.charAt(0) === "t" &&
1956
- hasOwn.call(this, name) &&
1957
- !isNaN(+name.slice(1))) {
1958
- this[name] = undefined$1;
1959
- }
1960
- }
1961
- }
1962
- },
1963
-
1964
- stop: function() {
1965
- this.done = true;
1966
-
1967
- var rootEntry = this.tryEntries[0];
1968
- var rootRecord = rootEntry.completion;
1969
- if (rootRecord.type === "throw") {
1970
- throw rootRecord.arg;
1971
- }
1972
-
1973
- return this.rval;
1974
- },
1975
-
1976
- dispatchException: function(exception) {
1977
- if (this.done) {
1978
- throw exception;
1979
- }
1980
-
1981
- var context = this;
1982
- function handle(loc, caught) {
1983
- record.type = "throw";
1984
- record.arg = exception;
1985
- context.next = loc;
1986
-
1987
- if (caught) {
1988
- // If the dispatched exception was caught by a catch block,
1989
- // then let that catch block handle the exception normally.
1990
- context.method = "next";
1991
- context.arg = undefined$1;
1992
- }
1993
-
1994
- return !! caught;
1995
- }
1996
-
1997
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1998
- var entry = this.tryEntries[i];
1999
- var record = entry.completion;
2000
-
2001
- if (entry.tryLoc === "root") {
2002
- // Exception thrown outside of any try block that could handle
2003
- // it, so set the completion value of the entire function to
2004
- // throw the exception.
2005
- return handle("end");
2006
- }
2007
-
2008
- if (entry.tryLoc <= this.prev) {
2009
- var hasCatch = hasOwn.call(entry, "catchLoc");
2010
- var hasFinally = hasOwn.call(entry, "finallyLoc");
2011
-
2012
- if (hasCatch && hasFinally) {
2013
- if (this.prev < entry.catchLoc) {
2014
- return handle(entry.catchLoc, true);
2015
- } else if (this.prev < entry.finallyLoc) {
2016
- return handle(entry.finallyLoc);
2017
- }
2018
-
2019
- } else if (hasCatch) {
2020
- if (this.prev < entry.catchLoc) {
2021
- return handle(entry.catchLoc, true);
2022
- }
2023
-
2024
- } else if (hasFinally) {
2025
- if (this.prev < entry.finallyLoc) {
2026
- return handle(entry.finallyLoc);
2027
- }
2028
-
2029
- } else {
2030
- throw new Error("try statement without catch or finally");
2031
- }
2032
- }
2033
- }
2034
- },
2035
-
2036
- abrupt: function(type, arg) {
2037
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2038
- var entry = this.tryEntries[i];
2039
- if (entry.tryLoc <= this.prev &&
2040
- hasOwn.call(entry, "finallyLoc") &&
2041
- this.prev < entry.finallyLoc) {
2042
- var finallyEntry = entry;
2043
- break;
2044
- }
2045
- }
2046
-
2047
- if (finallyEntry &&
2048
- (type === "break" ||
2049
- type === "continue") &&
2050
- finallyEntry.tryLoc <= arg &&
2051
- arg <= finallyEntry.finallyLoc) {
2052
- // Ignore the finally entry if control is not jumping to a
2053
- // location outside the try/catch block.
2054
- finallyEntry = null;
2055
- }
2056
-
2057
- var record = finallyEntry ? finallyEntry.completion : {};
2058
- record.type = type;
2059
- record.arg = arg;
2060
-
2061
- if (finallyEntry) {
2062
- this.method = "next";
2063
- this.next = finallyEntry.finallyLoc;
2064
- return ContinueSentinel;
2065
- }
2066
-
2067
- return this.complete(record);
2068
- },
2069
-
2070
- complete: function(record, afterLoc) {
2071
- if (record.type === "throw") {
2072
- throw record.arg;
2073
- }
2074
-
2075
- if (record.type === "break" ||
2076
- record.type === "continue") {
2077
- this.next = record.arg;
2078
- } else if (record.type === "return") {
2079
- this.rval = this.arg = record.arg;
2080
- this.method = "return";
2081
- this.next = "end";
2082
- } else if (record.type === "normal" && afterLoc) {
2083
- this.next = afterLoc;
2084
- }
2085
-
2086
- return ContinueSentinel;
2087
- },
2088
-
2089
- finish: function(finallyLoc) {
2090
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2091
- var entry = this.tryEntries[i];
2092
- if (entry.finallyLoc === finallyLoc) {
2093
- this.complete(entry.completion, entry.afterLoc);
2094
- resetTryEntry(entry);
2095
- return ContinueSentinel;
2096
- }
2097
- }
2098
- },
2099
-
2100
- "catch": function(tryLoc) {
2101
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2102
- var entry = this.tryEntries[i];
2103
- if (entry.tryLoc === tryLoc) {
2104
- var record = entry.completion;
2105
- if (record.type === "throw") {
2106
- var thrown = record.arg;
2107
- resetTryEntry(entry);
2108
- }
2109
- return thrown;
2110
- }
2111
- }
2112
-
2113
- // The context.catch method must only be called with a location
2114
- // argument that corresponds to a known catch block.
2115
- throw new Error("illegal catch attempt");
2116
- },
2117
-
2118
- delegateYield: function(iterable, resultName, nextLoc) {
2119
- this.delegate = {
2120
- iterator: values(iterable),
2121
- resultName: resultName,
2122
- nextLoc: nextLoc
2123
- };
2124
-
2125
- if (this.method === "next") {
2126
- // Deliberately forget the last sent value so that we don't
2127
- // accidentally pass it on to the delegate.
2128
- this.arg = undefined$1;
2129
- }
2130
-
2131
- return ContinueSentinel;
2132
- }
2133
- };
2134
-
2135
- // Regardless of whether this script is executing as a CommonJS module
2136
- // or not, return the runtime object so that we can declare the variable
2137
- // regeneratorRuntime in the outer scope, which allows this module to be
2138
- // injected easily by `bin/regenerator --include-runtime script.js`.
2139
- return exports;
2140
-
2141
- }(
2142
- // If this script is executing as a CommonJS module, use module.exports
2143
- // as the regeneratorRuntime namespace. Otherwise create a new empty
2144
- // object. Either way, the resulting object will be used to initialize
2145
- // the regeneratorRuntime variable at the top of this file.
2146
- module.exports
2147
- ));
2148
-
2149
- try {
2150
- regeneratorRuntime = runtime;
2151
- } catch (accidentalStrictMode) {
2152
- // This module should not be running in strict mode, so the above
2153
- // assignment should always work unless something is misconfigured. Just
2154
- // in case runtime.js accidentally runs in strict mode, in modern engines
2155
- // we can explicitly access globalThis. In older engines we can escape
2156
- // strict mode using a global Function call. This could conceivably fail
2157
- // if a Content Security Policy forbids using Function, but in that case
2158
- // the proper solution is to fix the accidental strict mode problem. If
2159
- // you've misconfigured your bundler to force strict mode and applied a
2160
- // CSP to forbid Function, and you're not willing to fix either of those
2161
- // problems, please detail your unique predicament in a GitHub issue.
2162
- if (typeof globalThis === "object") {
2163
- globalThis.regeneratorRuntime = runtime;
2164
- } else {
2165
- Function("r", "regeneratorRuntime = r")(runtime);
2166
- }
2167
- }
2168
- });
2169
-
2170
- /**
2171
- * A specialized version of `_.reduce` for arrays without support for
2172
- * iteratee shorthands.
2173
- *
2174
- * @private
2175
- * @param {Array} [array] The array to iterate over.
2176
- * @param {Function} iteratee The function invoked per iteration.
2177
- * @param {*} [accumulator] The initial value.
2178
- * @param {boolean} [initAccum] Specify using the first element of `array` as
2179
- * the initial value.
2180
- * @returns {*} Returns the accumulated value.
2181
- */
2182
- function arrayReduce(array, iteratee, accumulator, initAccum) {
2183
- var index = -1,
2184
- length = array == null ? 0 : array.length;
2185
-
2186
- if (initAccum && length) {
2187
- accumulator = array[++index];
2188
- }
2189
- while (++index < length) {
2190
- accumulator = iteratee(accumulator, array[index], index, array);
2191
- }
2192
- return accumulator;
2193
- }
2194
-
2195
- var _arrayReduce = arrayReduce;
2196
-
2197
- /**
2198
- * The base implementation of `_.propertyOf` without support for deep paths.
2199
- *
2200
- * @private
2201
- * @param {Object} object The object to query.
2202
- * @returns {Function} Returns the new accessor function.
2203
- */
2204
- function basePropertyOf(object) {
2205
- return function(key) {
2206
- return object == null ? undefined : object[key];
2207
- };
2208
- }
2209
-
2210
- var _basePropertyOf = basePropertyOf;
2211
-
2212
- /** Used to map Latin Unicode letters to basic Latin letters. */
2213
- var deburredLetters = {
2214
- // Latin-1 Supplement block.
2215
- '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
2216
- '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
2217
- '\xc7': 'C', '\xe7': 'c',
2218
- '\xd0': 'D', '\xf0': 'd',
2219
- '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
2220
- '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
2221
- '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
2222
- '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
2223
- '\xd1': 'N', '\xf1': 'n',
2224
- '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
2225
- '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
2226
- '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
2227
- '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
2228
- '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
2229
- '\xc6': 'Ae', '\xe6': 'ae',
2230
- '\xde': 'Th', '\xfe': 'th',
2231
- '\xdf': 'ss',
2232
- // Latin Extended-A block.
2233
- '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
2234
- '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
2235
- '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
2236
- '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
2237
- '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
2238
- '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
2239
- '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
2240
- '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
2241
- '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
2242
- '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
2243
- '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
2244
- '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
2245
- '\u0134': 'J', '\u0135': 'j',
2246
- '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
2247
- '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
2248
- '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
2249
- '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
2250
- '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
2251
- '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
2252
- '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
2253
- '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
2254
- '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
2255
- '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
2256
- '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
2257
- '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
2258
- '\u0163': 't', '\u0165': 't', '\u0167': 't',
2259
- '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
2260
- '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
2261
- '\u0174': 'W', '\u0175': 'w',
2262
- '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
2263
- '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
2264
- '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
2265
- '\u0132': 'IJ', '\u0133': 'ij',
2266
- '\u0152': 'Oe', '\u0153': 'oe',
2267
- '\u0149': "'n", '\u017f': 's'
2268
- };
2269
-
2270
- /**
2271
- * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
2272
- * letters to basic Latin letters.
2273
- *
2274
- * @private
2275
- * @param {string} letter The matched letter to deburr.
2276
- * @returns {string} Returns the deburred letter.
2277
- */
2278
- var deburrLetter = _basePropertyOf(deburredLetters);
2279
-
2280
- var _deburrLetter = deburrLetter;
2281
-
2282
- /** Used to match Latin Unicode letters (excluding mathematical operators). */
2283
- var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
2284
-
2285
- /** Used to compose unicode character classes. */
2286
- var rsComboMarksRange$1 = '\\u0300-\\u036f',
2287
- reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
2288
- rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
2289
- rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
2290
-
2291
- /** Used to compose unicode capture groups. */
2292
- var rsCombo$1 = '[' + rsComboRange$1 + ']';
2293
-
2294
- /**
2295
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
2296
- * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
2297
- */
2298
- var reComboMark = RegExp(rsCombo$1, 'g');
2299
-
2300
- /**
2301
- * Deburrs `string` by converting
2302
- * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
2303
- * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
2304
- * letters to basic Latin letters and removing
2305
- * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
2306
- *
2307
- * @static
2308
- * @memberOf _
2309
- * @since 3.0.0
2310
- * @category String
2311
- * @param {string} [string=''] The string to deburr.
2312
- * @returns {string} Returns the deburred string.
2313
- * @example
2314
- *
2315
- * _.deburr('déjà vu');
2316
- * // => 'deja vu'
2317
- */
2318
- function deburr(string) {
2319
- string = toString_1(string);
2320
- return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
2321
- }
2322
-
2323
- var deburr_1 = deburr;
2324
-
2325
- /** Used to match words composed of alphanumeric characters. */
2326
- var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
2327
-
2328
- /**
2329
- * Splits an ASCII `string` into an array of its words.
2330
- *
2331
- * @private
2332
- * @param {string} The string to inspect.
2333
- * @returns {Array} Returns the words of `string`.
2334
- */
2335
- function asciiWords(string) {
2336
- return string.match(reAsciiWord) || [];
2337
- }
2338
-
2339
- var _asciiWords = asciiWords;
2340
-
2341
- /** Used to detect strings that need a more robust regexp to match words. */
2342
- var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
2343
-
2344
- /**
2345
- * Checks if `string` contains a word composed of Unicode symbols.
2346
- *
2347
- * @private
2348
- * @param {string} string The string to inspect.
2349
- * @returns {boolean} Returns `true` if a word is found, else `false`.
2350
- */
2351
- function hasUnicodeWord(string) {
2352
- return reHasUnicodeWord.test(string);
2353
- }
2354
-
2355
- var _hasUnicodeWord = hasUnicodeWord;
2356
-
2357
- /** Used to compose unicode character classes. */
2358
- var rsAstralRange = '\\ud800-\\udfff',
2359
- rsComboMarksRange = '\\u0300-\\u036f',
2360
- reComboHalfMarksRange = '\\ufe20-\\ufe2f',
2361
- rsComboSymbolsRange = '\\u20d0-\\u20ff',
2362
- rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
2363
- rsDingbatRange = '\\u2700-\\u27bf',
2364
- rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
2365
- rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
2366
- rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
2367
- rsPunctuationRange = '\\u2000-\\u206f',
2368
- rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
2369
- rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
2370
- rsVarRange = '\\ufe0e\\ufe0f',
2371
- rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
2372
-
2373
- /** Used to compose unicode capture groups. */
2374
- var rsApos$1 = "['\u2019]",
2375
- rsBreak = '[' + rsBreakRange + ']',
2376
- rsCombo = '[' + rsComboRange + ']',
2377
- rsDigits = '\\d+',
2378
- rsDingbat = '[' + rsDingbatRange + ']',
2379
- rsLower = '[' + rsLowerRange + ']',
2380
- rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
2381
- rsFitz = '\\ud83c[\\udffb-\\udfff]',
2382
- rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
2383
- rsNonAstral = '[^' + rsAstralRange + ']',
2384
- rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
2385
- rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
2386
- rsUpper = '[' + rsUpperRange + ']',
2387
- rsZWJ = '\\u200d';
2388
-
2389
- /** Used to compose unicode regexes. */
2390
- var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
2391
- rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
2392
- rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
2393
- rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
2394
- reOptMod = rsModifier + '?',
2395
- rsOptVar = '[' + rsVarRange + ']?',
2396
- rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
2397
- rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
2398
- rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
2399
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
2400
- rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
2401
-
2402
- /** Used to match complex or compound words. */
2403
- var reUnicodeWord = RegExp([
2404
- rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
2405
- rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
2406
- rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
2407
- rsUpper + '+' + rsOptContrUpper,
2408
- rsOrdUpper,
2409
- rsOrdLower,
2410
- rsDigits,
2411
- rsEmoji
2412
- ].join('|'), 'g');
2413
-
2414
- /**
2415
- * Splits a Unicode `string` into an array of its words.
2416
- *
2417
- * @private
2418
- * @param {string} The string to inspect.
2419
- * @returns {Array} Returns the words of `string`.
2420
- */
2421
- function unicodeWords(string) {
2422
- return string.match(reUnicodeWord) || [];
2423
- }
2424
-
2425
- var _unicodeWords = unicodeWords;
2426
-
2427
- /**
2428
- * Splits `string` into an array of its words.
2429
- *
2430
- * @static
2431
- * @memberOf _
2432
- * @since 3.0.0
2433
- * @category String
2434
- * @param {string} [string=''] The string to inspect.
2435
- * @param {RegExp|string} [pattern] The pattern to match words.
2436
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
2437
- * @returns {Array} Returns the words of `string`.
2438
- * @example
2439
- *
2440
- * _.words('fred, barney, & pebbles');
2441
- * // => ['fred', 'barney', 'pebbles']
2442
- *
2443
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
2444
- * // => ['fred', 'barney', '&', 'pebbles']
2445
- */
2446
- function words(string, pattern, guard) {
2447
- string = toString_1(string);
2448
- pattern = guard ? undefined : pattern;
2449
-
2450
- if (pattern === undefined) {
2451
- return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
2452
- }
2453
- return string.match(pattern) || [];
2454
- }
2455
-
2456
- var words_1 = words;
2457
-
2458
- /** Used to compose unicode capture groups. */
2459
- var rsApos = "['\u2019]";
2460
-
2461
- /** Used to match apostrophes. */
2462
- var reApos = RegExp(rsApos, 'g');
2463
-
2464
- /**
2465
- * Creates a function like `_.camelCase`.
2466
- *
2467
- * @private
2468
- * @param {Function} callback The function to combine each word.
2469
- * @returns {Function} Returns the new compounder function.
2470
- */
2471
- function createCompounder(callback) {
2472
- return function(string) {
2473
- return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
2474
- };
2475
- }
2476
-
2477
- var _createCompounder = createCompounder;
2478
-
2479
- /**
2480
- * Converts `string`, as space separated words, to upper case.
2481
- *
2482
- * @static
2483
- * @memberOf _
2484
- * @since 4.0.0
2485
- * @category String
2486
- * @param {string} [string=''] The string to convert.
2487
- * @returns {string} Returns the upper cased string.
2488
- * @example
2489
- *
2490
- * _.upperCase('--foo-bar');
2491
- * // => 'FOO BAR'
2492
- *
2493
- * _.upperCase('fooBar');
2494
- * // => 'FOO BAR'
2495
- *
2496
- * _.upperCase('__foo_bar__');
2497
- * // => 'FOO BAR'
2498
- */
2499
- var upperCase = _createCompounder(function(result, word, index) {
2500
- return result + (index ? ' ' : '') + word.toUpperCase();
2501
- });
2502
-
2503
- var upperCase_1 = upperCase;
2504
-
2505
- /**
2506
- * Converts `string`, as space separated words, to lower case.
2507
- *
2508
- * @static
2509
- * @memberOf _
2510
- * @since 4.0.0
2511
- * @category String
2512
- * @param {string} [string=''] The string to convert.
2513
- * @returns {string} Returns the lower cased string.
2514
- * @example
2515
- *
2516
- * _.lowerCase('--Foo-Bar--');
2517
- * // => 'foo bar'
2518
- *
2519
- * _.lowerCase('fooBar');
2520
- * // => 'foo bar'
2521
- *
2522
- * _.lowerCase('__FOO_BAR__');
2523
- * // => 'foo bar'
2524
- */
2525
- var lowerCase = _createCompounder(function(result, word, index) {
2526
- return result + (index ? ' ' : '') + word.toLowerCase();
2527
- });
2528
-
2529
- var lowerCase_1 = lowerCase;
2530
-
2531
- function truncate() {
2532
- var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
2533
- var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
2534
- var ellipsis = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2535
- var putEllipsis = ellipsis ? " ..." : "";
2536
- return typeof string === "string" && string.length > limit ? string.substring(0, limit) + putEllipsis : string;
2537
- }
2538
- var timestampToFormat = function timestampToFormat(value, unit, suffix, timestamp) {
2539
- var config = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
2540
- var _config$showTime = config.showTime,
2541
- showTime = _config$showTime === void 0 ? false : _config$showTime,
2542
- _config$isTimeFirst = config.isTimeFirst,
2543
- isTimeFirst = _config$isTimeFirst === void 0 ? false : _config$isTimeFirst,
2544
- _config$isUpperCase = config.isUpperCase,
2545
- isUpperCase = _config$isUpperCase === void 0 ? false : _config$isUpperCase,
2546
- _config$disableMeridi = config.disableMeridiem,
2547
- disableMeridiem = _config$disableMeridi === void 0 ? false : _config$disableMeridi,
2548
- _config$timeFormat = config.timeFormat,
2549
- timeFormat = _config$timeFormat === void 0 ? "12hours" : _config$timeFormat;
2550
- var monthList = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2551
- var dateTime = new Date(timestamp);
2552
- var date = dateTime.getDate().toString().padStart(2, 0);
2553
- var month = monthList[dateTime.getMonth()];
2554
- var localizedMonth = month;
2555
-
2556
- if (isUpperCase) {
2557
- localizedMonth = upperCase_1(month);
2558
- }
2559
-
2560
- var year = dateTime.getFullYear();
2561
- var localizedMeridiem = config.localizedMeridiem,
2562
- localizedMonths = config.localizedMonths,
2563
- _config$direction = config.direction,
2564
- direction = _config$direction === void 0 ? "ltr" : _config$direction;
2565
- var time = formatAMPM(timestamp, timeFormat);
2566
- var timeWithLocalizedMeridiem = time;
2567
- var timetoShow;
2568
-
2569
- if (localizedMonths) {
2570
- localizedMonth = get_1(localizedMonths, [lowerCase_1(month)]) || month;
2571
- }
2572
-
2573
- if (localizedMeridiem) {
2574
- var isAm = time.includes("am");
2575
- var _localizedMeridiem$am = localizedMeridiem.am,
2576
- am = _localizedMeridiem$am === void 0 ? "am" : _localizedMeridiem$am,
2577
- _localizedMeridiem$pm = localizedMeridiem.pm,
2578
- pm = _localizedMeridiem$pm === void 0 ? "pm" : _localizedMeridiem$pm;
2579
- timeWithLocalizedMeridiem = (isAm ? time.replace("am", am) : time.replace("pm", pm)) || time;
2580
- }
2581
-
2582
- if (direction === "rtl") {
2583
- timetoShow = showTime ? "".concat(timeWithLocalizedMeridiem) : "";
2584
- return "".concat(date, " ").concat(localizedMonth, ", ").concat(year, " ").concat(timetoShow, " ");
2585
- } else {
2586
- if (disableMeridiem) {
2587
- return "".concat(localizedMonth, " ").concat(date, ", ").concat(year);
2588
- } else if (isTimeFirst) {
2589
- return "".concat(timeWithLocalizedMeridiem, ", ").concat(date, " ").concat(localizedMonth, " ").concat(year);
2590
- } else {
2591
- timetoShow = showTime ? ", ".concat(timeWithLocalizedMeridiem) : "";
2592
- return "".concat(date, " ").concat(localizedMonth, ", ").concat(year).concat(timetoShow);
2593
- }
2594
- }
2595
- };
2596
- function formatter(value, unit, suffix, date, config) {
2597
- var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
2598
- // unit here refers to seconds, minute, minutes,...
2599
-
2600
- var localizedSuffix = get_1(config, ["localizedPublishTime", suffix]) || suffix;
2601
- var localizedUnitOfTime;
2602
-
2603
- if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
2604
- return timestampToFormat(value, unit, suffix, date, config);
2605
- } else if (value > 1) {
2606
- localizedUnitOfTime = get_1(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
2607
- return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
2608
- }
2609
-
2610
- localizedUnitOfTime = get_1(config, ["localizedPublishTime", unit]) || unit;
2611
- return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
2612
- }
2613
-
2614
- function formatAMPM(timestamp) {
2615
- var timeFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "12hours";
2616
- var dateTime = new Date(timestamp);
2617
- var hours = dateTime.getHours();
2618
- var minutes = dateTime.getMinutes();
2619
- var ampm = hours >= 12 ? "pm" : "am";
2620
- hours = hours % 12;
2621
- hours = hours || 12;
2622
- minutes = minutes < 10 ? "0" + minutes : minutes;
2623
- var strTime = hours + ":" + minutes + " " + ampm;
2624
-
2625
- if (timeFormat === "24hours") {
2626
- return dateTime.toLocaleTimeString([], {
2627
- hour: "2-digit",
2628
- minute: "2-digit"
2629
- });
2630
- }
2631
-
2632
- return strTime;
2633
- }
2634
-
2635
- var hexToRGB = function hexToRGB(hex) {
2636
- var r = parseInt(hex.slice(1, 3), 16);
2637
- var g = parseInt(hex.slice(3, 5), 16);
2638
- var b = parseInt(hex.slice(5, 7), 16);
2639
- return {
2640
- r: r,
2641
- g: g,
2642
- b: b
2643
- };
2644
- };
2645
- var getLuminanceOfColor = function getLuminanceOfColor(hex) {
2646
- var _hexToRGB = hexToRGB(hex),
2647
- r = _hexToRGB.r,
2648
- g = _hexToRGB.g,
2649
- b = _hexToRGB.b;
2650
-
2651
- return r * 0.299 + g * 0.587 + b * 0.114;
2652
- };
2653
- var rgbToHex = function rgbToHex() {
2654
- var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgba(255, 255, 255, 0)";
2655
- var rgba = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
2656
- return rgba && rgba.length === 4 ? "#" + ("0" + parseInt(rgba[1], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[2], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[3], 10).toString(16)).slice(-2) : color;
2657
- };
2658
- var clientWidths = {
2659
- mobile: 767,
2660
- tablet: 1024
2661
- };
2662
- var clientWidth = function clientWidth(device) {
2663
- var foundDeviceWidth = get_1(clientWidths, device);
2664
-
2665
- if (foundDeviceWidth) {
2666
- return get_1(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
2667
- }
2668
-
2669
- return false;
2670
- };
2671
- var getTextColor = function getTextColor() {
2672
- var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(255,255,255)";
2673
- var isRegexCheck = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(theme);
2674
- var getHexValue = !isRegexCheck ? rgbToHex(theme) : theme;
2675
- var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
2676
- return textColor;
2677
- };
2678
- var getSlot = function getSlot(type, component, storyCallback, collectionCallback) {
2679
- switch (type) {
2680
- case "story":
2681
- return storyCallback();
2682
-
2683
- case "collection":
2684
- return collectionCallback();
2685
-
2686
- default:
2687
- return component ? component() : null;
2688
- }
2689
- };
2690
- var getSlug = function getSlug(collection) {
2691
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2692
- var _config$magazineSlug = config.magazineSlug,
2693
- magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug,
2694
- _config$isArchivePage = config.isArchivePage,
2695
- isArchivePage = _config$isArchivePage === void 0 ? false : _config$isArchivePage;
2696
-
2697
- if (isArchivePage) {
2698
- return "/magazine/archive/".concat(magazineSlug);
2699
- }
2700
-
2701
- if (magazineSlug) {
2702
- return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2703
- }
2704
-
2705
- var isSection = collection.template === "section";
2706
-
2707
- if (isSection) {
2708
- var sectionId = get_1(collection, ["metadata", "section", "0", "id"], "");
2709
- var sections = config.sections;
2710
- var section = sections && sections.find(function (section) {
2711
- return section.id === sectionId;
2712
- });
2713
- return section ? section["section-url"] : "/";
2714
- }
2715
-
2716
- return "/collection/".concat(collection.slug);
2717
- };
2718
- function isExternalStory() {
2719
- var story = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2720
- var _story$storyTemplate = story["story-template"],
2721
- storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
2722
- _story$metadata = story.metadata,
2723
- metadata = _story$metadata === void 0 ? {} : _story$metadata;
2724
- return storyTemplate === "news-elsewhere" ? get_1(metadata, ["reference-url"], "") : "";
2725
- } // Adds target='_blank' attribute to anchor tags if not present
2726
- var isEmpty = function isEmpty(value) {
2727
- return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
2728
- _typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
2729
- };
2730
- PropTypes__default["default"].shape({
2731
- "sketches-host": PropTypes__default["default"].string,
2732
- "cdn-name": PropTypes__default["default"].string,
2733
- "cdn-image": PropTypes__default["default"].string
2734
- });
2735
- PropTypes__default["default"].shape({
2736
- headline: PropTypes__default["default"].string,
2737
- "last-published-at": PropTypes__default["default"].number,
2738
- subheadline: PropTypes__default["default"].string
2739
- });
2740
- var getStoryUrl = function getStoryUrl(story) {
2741
- var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
2742
- return get_1(story, ["story-template"]) === "news-elsewhere" ? get_1(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
2743
- };
2744
- var navigateTo = function navigateTo(dispatch) {
2745
- var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
2746
- global.app.navigateToPage(dispatch, url);
2747
- };
2748
- var generateNavigateSlug = function generateNavigateSlug() {
2749
- var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2750
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2751
- var customUrlPath = arguments.length > 2 ? arguments[2] : undefined;
2752
-
2753
- if (customUrlPath) {
2754
- return customUrlPath;
2755
- }
2756
-
2757
- var _config$magazineSlug2 = config.magazineSlug,
2758
- magazineSlug = _config$magazineSlug2 === void 0 ? "" : _config$magazineSlug2,
2759
- _config$isArchivePage2 = config.isArchivePage,
2760
- isArchivePage = _config$isArchivePage2 === void 0 ? false : _config$isArchivePage2;
2761
-
2762
- if (isArchivePage) {
2763
- return "/magazine/archive/".concat(magazineSlug);
2764
- }
2765
-
2766
- if (magazineSlug) {
2767
- return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
2768
- }
2769
-
2770
- if (collection) {
2771
- return getSlug(collection, config);
2772
- }
2773
-
2774
- return "/";
2775
- };
2776
- var getTimeStamp = function getTimeStamp(date, _formatter) {
2777
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
2778
- var template = arguments.length > 3 ? arguments[3] : undefined;
2779
- var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
2780
-
2781
- if (timezone && template === "story") {
2782
- var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
2783
- var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
2784
- timeZone: timezone
2785
- });
2786
- var timeStamp = timestampToFormat("", "", "", date, config);
2787
- return /*#__PURE__*/React__default["default"].createElement("time", {
2788
- dateTime: formatZonedTime
2789
- }, timeStamp);
2790
- }
2791
-
2792
- return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
2793
- date: date,
2794
- formatter: function formatter(value, unit, suffix, date) {
2795
- return _formatter(value, unit, suffix, date, config);
2796
- }
2797
- });
2798
- };
2799
-
2800
- var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
2801
-
2802
- Object.defineProperty(exports, "__esModule", {
2803
- value: true
2804
- });
2805
- exports["default"] = void 0;
2806
- var optionsDefaults = {
2807
- attributeNames: {
2808
- styleName: 'className'
2809
- },
2810
- generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
2811
- handleMissingStyleName: 'throw'
2812
- };
2813
- var _default = optionsDefaults;
2814
- exports["default"] = _default;
2815
-
2816
-
2817
- });
2818
-
2819
- var getClassName = createCommonjsModule(function (module, exports) {
2820
-
2821
- Object.defineProperty(exports, "__esModule", {
2822
- value: true
2823
- });
2824
- exports["default"] = void 0;
2825
-
2826
- var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
2827
-
2828
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
2829
-
2830
- var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
2831
- return styleName.indexOf('.') !== -1;
2832
- };
2833
-
2834
- var handleError = function handleError(message, handleMissingStyleName) {
2835
- if (handleMissingStyleName === 'throw') {
2836
- throw new Error(message);
2837
- } else if (handleMissingStyleName === 'warn') {
2838
- // eslint-disable-next-line no-console
2839
- console.warn(message);
2840
- }
2841
-
2842
- return null;
2843
- };
2844
-
2845
- var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
2846
- // Note:
2847
- // Do not use the desctructing syntax with Babel.
2848
- // Desctructing adds _slicedToArray helper.
2849
- var styleNameParts = styleName.split('.');
2850
- var importName = styleNameParts[0];
2851
- var moduleName = styleNameParts[1];
2852
- var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
2853
-
2854
- if (!moduleName) {
2855
- return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
2856
- }
2857
-
2858
- if (!styleModuleImportMap[importName]) {
2859
- return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
2860
- }
2861
-
2862
- if (!styleModuleImportMap[importName][moduleName]) {
2863
- return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
2864
- }
2865
-
2866
- return styleModuleImportMap[importName][moduleName];
2867
- };
2868
-
2869
- var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
2870
- var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
2871
- var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
2872
- return styleModuleImportMap[importKey][styleName] && importKey;
2873
- }).filter(function (importKey) {
2874
- return importKey;
2875
- });
2876
-
2877
- if (importKeysWithMatches.length > 1) {
2878
- throw new Error('Cannot resolve styleName "' + styleName + '" because it is present in multiple imports:' + '\n\n\t' + importKeysWithMatches.join('\n\t') + '\n\nYou can resolve this by using a named import, e.g:' + '\n\n\timport foo from "' + importKeysWithMatches[0] + '";' + '\n\t<div styleName="foo.' + styleName + '" />' + '\n\n');
2879
- }
2880
-
2881
- if (importKeysWithMatches.length === 0) {
2882
- return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
2883
- }
2884
-
2885
- return styleModuleImportMap[importKeysWithMatches[0]][styleName];
2886
- };
2887
-
2888
- var _default = function _default(styleNameValue, styleModuleImportMap, options) {
2889
- var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
2890
-
2891
- var _ref = options || {},
2892
- _ref$handleMissingSty = _ref.handleMissingStyleName,
2893
- handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
2894
- _ref$autoResolveMulti = _ref.autoResolveMultipleImports,
2895
- autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
2896
-
2897
- if (!styleNameValue) {
2898
- return '';
2899
- }
2900
-
2901
- return styleNameValue.split(' ').filter(function (styleName) {
2902
- return styleName;
2903
- }).map(function (styleName) {
2904
- if (isNamespacedStyleName(styleName)) {
2905
- return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
2906
- }
2907
-
2908
- if (styleModuleImportMapKeys.length === 0) {
2909
- throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
2910
- }
2911
-
2912
- if (styleModuleImportMapKeys.length > 1) {
2913
- if (!autoResolveMultipleImports) {
2914
- throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
2915
- }
2916
-
2917
- return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
2918
- }
2919
-
2920
- var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
2921
-
2922
- if (!styleModuleMap[styleName]) {
2923
- return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
2924
- }
2925
-
2926
- return styleModuleMap[styleName];
2927
- }).filter(function (className) {
2928
- // Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
2929
- return className;
2930
- }).join(' ');
2931
- };
2932
-
2933
- exports["default"] = _default;
2934
-
2935
-
2936
- });
2937
-
2938
- var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
2939
-
2940
- var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
2941
-
2942
- var StateProvider = function StateProvider(RowComponent) {
2943
- return function (props) {
2944
- return (
2945
- /*#__PURE__*/
2946
- // eslint-disable-next-line react/prop-types
2947
- React__default["default"].createElement(StateContext.Provider, {
2948
- value: props.config
2949
- }, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
2950
- );
2951
- };
2952
- };
2953
- var useStateValue = function useStateValue() {
2954
- return React.useContext(StateContext);
2955
- };
2956
-
2957
- var _styleModuleImportMap$d = {
2958
- "./timestamp.m.css": {
2959
- "time": "timestamp-m_time__2v46i",
2960
- "time-wrapper": "timestamp-m_time-wrapper__3O2lM",
2961
- "bottom-fix": "timestamp-m_bottom-fix__1Zh8r",
2962
- "dark": "timestamp-m_dark__2lk9E",
2963
- "light": "timestamp-m_light__2QlrI"
2964
- }
2965
- };
2966
- var TimeStamp = function TimeStamp(_ref) {
2967
- var story = _ref.story,
2968
- isBottom = _ref.isBottom,
2969
- _ref$config = _ref.config,
2970
- config = _ref$config === void 0 ? {} : _ref$config;
2971
- var configState = useStateValue() || {};
2972
- var isTime = get_1(config, ["showTime"], get_1(configState, ["showTime"], true));
2973
- var time = story["last-published-at"] || story["first-published-at"];
2974
- var isBottomClasses = isBottom ? "bottom-fix" : "";
2975
- var textColor = getTextColor(configState.theme);
2976
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
2977
- "data-test-id": "publish-time",
2978
- className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$d)
2979
- }, /*#__PURE__*/React__default["default"].createElement("div", {
2980
- className: "timestamp-m_time-wrapper__3O2lM"
2981
- }, getTimeStamp(time, formatter, config))));
2982
- };
2983
- TimeStamp.propTypes = {
2984
- /** The Story Object from the API response */
2985
- story: PropTypes__default["default"].object,
2986
- isBottom: PropTypes__default["default"].bool,
2987
- config: PropTypes__default["default"].object
2988
- };
2989
-
2990
- var _styleModuleImportMap$c = {
2991
- "./author.m.css": {
2992
- "author": "author-m_author__WRuLm",
2993
- "author-image": "author-m_author-image__3q2oc",
2994
- "author-name": "author-m_author-name__3WP-O",
2995
- "bottom-fix": "author-m_bottom-fix__223TT",
2996
- "prefix": "author-m_prefix__YSInK",
2997
- "rtl-image": "author-m_rtl-image__2nglD",
2998
- "ltr-image": "author-m_ltr-image__3bc0L",
2999
- "dark": "author-m_dark__2TTlp",
3000
- "light": "author-m_light__3y8_x"
3001
- }
3002
- };
3003
-
3004
- var AuthorBase = function AuthorBase(_ref) {
3005
- var story = _ref.story,
3006
- hideAuthorImage = _ref.hideAuthorImage,
3007
- isBottom = _ref.isBottom,
3008
- _ref$prefix = _ref.prefix,
3009
- prefix = _ref$prefix === void 0 ? "" : _ref$prefix,
3010
- _ref$config = _ref.config,
3011
- config = _ref$config === void 0 ? {} : _ref$config;
3012
- var configData = useStateValue() || {};
3013
- var isAuthor = get_1(configData, ["showAuthor"], true);
3014
-
3015
- var _get = get_1(story, ["authors", "0"], ""),
3016
- avatarUrl = _get["avatar-url"],
3017
- avatarS3Key = _get["avatar-s3-key"],
3018
- authorName = _get.name,
3019
- slug = _get.slug;
3020
-
3021
- var isBottomClasses = isBottom ? "bottom-fix" : "";
3022
- var textColor = getTextColor(configData.theme);
3023
- var mountAt = get_1(config, ["mountAt"], "");
3024
-
3025
- var authorImage = function authorImage(dir) {
3026
- if (!avatarUrl && !avatarS3Key) {
3027
- return null;
3028
- }
3029
-
3030
- return /*#__PURE__*/React__default["default"].createElement("div", {
3031
- "data-test-id": "author-image",
3032
- className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$c)
3033
- }, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
3034
- slug: avatarS3Key,
3035
- "aspect-ratio": [1, 1],
3036
- defaultWidth: 400,
3037
- imgParams: {
3038
- auto: ["format", "compress"]
3039
- },
3040
- alt: authorName
3041
- }) : /*#__PURE__*/React__default["default"].createElement("img", {
3042
- src: avatarUrl
3043
- })));
3044
- };
3045
-
3046
- var isPrefix = function isPrefix(dir) {
3047
- if (prefix) {
3048
- return /*#__PURE__*/React__default["default"].createElement("div", {
3049
- className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$c)
3050
- }, prefix);
3051
- }
3052
-
3053
- return !hideAuthorImage && authorImage(dir);
3054
- };
3055
-
3056
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
3057
- href: "".concat(mountAt, "/author/") + slug,
3058
- "aria-label": "author-name",
3059
- className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$c)
3060
- }, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
3061
- "data-test-id": "author-name",
3062
- className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$c)
3063
- }, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
3064
- };
3065
-
3066
- function mapStateToProps$1(state) {
3067
- return {
3068
- config: get_1(state, ["qt", "config"], {})
3069
- };
3070
- }
3071
-
3072
- var Author = reactRedux.connect(mapStateToProps$1)(AuthorBase);
3073
- AuthorBase.propTypes = {
3074
- /** The Story Object from the API response */
3075
- story: PropTypes__default["default"].object.isRequired,
3076
-
3077
- /** Hide Author Avatar Image */
3078
- hideAuthorImage: PropTypes__default["default"].bool,
3079
- // fix Author bottom of the storyCard
3080
- isBottom: PropTypes__default["default"].bool,
3081
- // fix prefix before the author name
3082
- prefix: PropTypes__default["default"].string,
3083
- config: PropTypes__default["default"].object
3084
- };
3085
- AuthorBase.defaultProps = {
3086
- hideAuthorImage: false,
3087
- isBottom: false,
3088
- prefix: ""
3089
- };
3090
-
3091
- var _styleModuleImportMap$b = {
3092
- "./dot.m.css": {
3093
- "dark": "dot-m_dark__1Njxl",
3094
- "light": "dot-m_light__27IA3"
3095
- }
3096
- };
3097
- var Dot = function Dot(_ref) {
3098
- var _ref$width = _ref.width,
3099
- width = _ref$width === void 0 ? "3px" : _ref$width,
3100
- _ref$height = _ref.height,
3101
- height = _ref$height === void 0 ? "3px" : _ref$height,
3102
- _ref$color = _ref.color,
3103
- color = _ref$color === void 0 ? "light" : _ref$color;
3104
- return /*#__PURE__*/React__default["default"].createElement("div", {
3105
- className: _getClassName(color, _styleModuleImportMap$b)
3106
- }, /*#__PURE__*/React__default["default"].createElement("svg", {
3107
- xmlns: "http://www.w3.org/2000/svg",
3108
- width: width,
3109
- height: height,
3110
- viewBox: "0 0 3 3"
3111
- }, /*#__PURE__*/React__default["default"].createElement("circle", {
3112
- cx: "87",
3113
- cy: "9",
3114
- r: "1",
3115
- fill: "inherit",
3116
- fillRule: "nonzero",
3117
- transform: "translate(-86 -8)"
3118
- })));
3119
- };
3120
- Dot.propTypes = {
3121
- /** height , width and color of the dot icon */
3122
- color: PropTypes__default["default"].string,
3123
- width: PropTypes__default["default"].string,
3124
- height: PropTypes__default["default"].string
3125
- };
3126
-
3127
- var _styleModuleImportMap$a = {
3128
- "./divider.m.css": {
3129
- "dark": "divider-m_dark__26FRi",
3130
- "light": "divider-m_light__w-7sy"
3131
- }
3132
- };
3133
- var Divider = function Divider(_ref) {
3134
- var _ref$width = _ref.width,
3135
- width = _ref$width === void 0 ? "1" : _ref$width,
3136
- _ref$height = _ref.height,
3137
- height = _ref$height === void 0 ? "10" : _ref$height,
3138
- _ref$color = _ref.color,
3139
- color = _ref$color === void 0 ? "light" : _ref$color;
3140
- return /*#__PURE__*/React__default["default"].createElement("div", {
3141
- className: _getClassName(color, _styleModuleImportMap$a)
3142
- }, /*#__PURE__*/React__default["default"].createElement("svg", {
3143
- xmlns: "http://www.w3.org/2000/svg",
3144
- width: width,
3145
- height: height
3146
- }, /*#__PURE__*/React__default["default"].createElement("path", {
3147
- fill: "inherit",
3148
- d: "M0 0h1v10H0z"
3149
- })));
3150
- };
3151
- Divider.propTypes = {
3152
- /** height , width and color of the dot icon */
3153
- color: PropTypes__default["default"].string,
3154
- width: PropTypes__default["default"].string,
3155
- height: PropTypes__default["default"].string
3156
- };
3157
-
3158
- var _styleModuleImportMap$9 = {
3159
- "./read-time.m.css": {
3160
- "read-time-wrapper": "read-time-m_read-time-wrapper__3GyC_",
3161
- "dot-indicator": "read-time-m_dot-indicator__3Sqh2",
3162
- "dark": "read-time-m_dark__3yRaK",
3163
- "light": "read-time-m_light__1GAZu"
3164
- }
3165
- };
3166
- var ReadTime = function ReadTime(_ref) {
3167
- var story = _ref.story,
3168
- _ref$opts = _ref.opts,
3169
- opts = _ref$opts === void 0 ? {} : _ref$opts,
3170
- _ref$isLightTheme = _ref.isLightTheme,
3171
- isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
3172
- var config = useStateValue() || {};
3173
- var showReadTime = get_1(config, ["showReadTime"]) || get_1(opts, ["showReadTime"], true);
3174
- var readTime = get_1(story, ["read-time"], 0);
3175
- var textColor = isLightTheme ? "light" : getTextColor(config.theme);
3176
- if (!showReadTime || !readTime) return null;
3177
- var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
3178
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
3179
- "data-test-id": "read-time",
3180
- className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$9)
3181
- }, /*#__PURE__*/React__default["default"].createElement("span", {
3182
- className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
3183
- }, /*#__PURE__*/React__default["default"].createElement(Dot, {
3184
- color: textColor
3185
- })), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
3186
- };
3187
- ReadTime.propTypes = {
3188
- story: PropTypes__default["default"].shape({
3189
- "read-time": PropTypes__default["default"].number
3190
- }),
3191
- opts: PropTypes__default["default"].shape({
3192
- showReadTime: PropTypes__default["default"].bool
3193
- }),
3194
- isLightTheme: PropTypes__default["default"].bool
3195
- };
3196
-
3197
- var _styleModuleImportMap$8 = {
3198
- "./author-with-timestamp.m.css": {
3199
- "author-time-wrapper": "author-with-timestamp-m_author-time-wrapper__G7_eI",
3200
- "author-image": "author-with-timestamp-m_author-image__24xrD",
3201
- "dot": "author-with-timestamp-m_dot__1LHXD",
3202
- "bottom-fix": "author-with-timestamp-m_bottom-fix__1rWGv",
3203
- "dash": "author-with-timestamp-m_dash__2L5XC"
3204
- }
3205
- };
3206
- var AuthorWithTime = function AuthorWithTime(_ref) {
3207
- var story = _ref.story,
3208
- separator = _ref.separator,
3209
- isBottom = _ref.isBottom,
3210
- hideAuthorImage = _ref.hideAuthorImage,
3211
- prefix = _ref.prefix,
3212
- _ref$config = _ref.config,
3213
- config = _ref$config === void 0 ? {} : _ref$config,
3214
- isLightTheme = _ref.isLightTheme;
3215
- var configState = useStateValue() || {};
3216
- var isAuthor = get_1(config, ["showAuthor"], get_1(configState, ["showAuthor"], true));
3217
- var isTime = get_1(config, ["showTime"], get_1(configState, ["showTime"], true));
3218
- var isReadTime = get_1(configState, ["showReadTime"], true);
3219
- var isBottomClasses = isBottom ? "bottom-fix" : "";
3220
- var seperatorStyle = separator === "dot" ? "dot" : "dash";
3221
- var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
3222
-
3223
- var getSeparator = function getSeparator() {
3224
- if (separator === "divider") {
3225
- return /*#__PURE__*/React__default["default"].createElement(Divider, {
3226
- color: textColor
3227
- });
3228
- }
3229
-
3230
- return /*#__PURE__*/React__default["default"].createElement(Dot, {
3231
- color: textColor
3232
- });
3233
- };
3234
-
3235
- var getTimeStamp = function getTimeStamp() {
3236
- if (!isTime) return null;
3237
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
3238
- className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$8)
3239
- }, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
3240
- story: story,
3241
- config: config
3242
- }), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
3243
- story: story,
3244
- opts: config,
3245
- isLightTheme: isLightTheme
3246
- }));
3247
- };
3248
-
3249
- return /*#__PURE__*/React__default["default"].createElement("div", {
3250
- className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$8)
3251
- }, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
3252
- story: story,
3253
- isBottom: true,
3254
- hideAuthorImage: hideAuthorImage,
3255
- prefix: prefix
3256
- }), getTimeStamp()) : getTimeStamp());
3257
- };
3258
- AuthorWithTime.propTypes = {
3259
- story: PropTypes__default["default"].object,
3260
-
3261
- /** Style of separator between the Author & Timestamp */
3262
- separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
3263
-
3264
- /** hide the author image */
3265
- hideAuthorImage: PropTypes__default["default"].bool,
3266
- // fix author and time at the end
3267
- isBottom: PropTypes__default["default"].bool,
3268
- // fix prefix before the author name
3269
- prefix: PropTypes__default["default"].string,
3270
- config: PropTypes__default["default"].object,
3271
- isLightTheme: PropTypes__default["default"].bool
3272
- };
3273
- AuthorWithTime.defaultProps = {
3274
- separator: "dot",
3275
- isBottom: false,
3276
- hideAuthorImage: true,
3277
- prefix: "",
3278
- isLightTheme: false
3279
- };
3280
-
3281
- var _styleModuleImportMap$7 = {
3282
- "./collection-name.m.css": {
3283
- "collection": "collection-name-m_collection__JD6sx",
3284
- "collection-borderLeft": "collection-name-m_collection-borderLeft__3Dznk",
3285
- "border-left": "collection-name-m_border-left__3_pYw",
3286
- "collection-borderBottomFull": "collection-name-m_collection-borderBottomFull__Dkq3K",
3287
- "collection-borderBottom": "collection-name-m_collection-borderBottom__2rdQM",
3288
- "collection-crossLine": "collection-name-m_collection-crossLine__1sIpN",
3289
- "border-bottom": "collection-name-m_border-bottom__1MnlV",
3290
- "dark": "collection-name-m_dark__nMe5H",
3291
- "light": "collection-name-m_light__1vFDN"
3292
- }
3293
- };
3294
- var CollectionNameBase = function CollectionNameBase(_ref) {
3295
- var _ref$collectionNameBo = _ref.collectionNameBorderColor,
3296
- collectionNameBorderColor = _ref$collectionNameBo === void 0 ? "" : _ref$collectionNameBo,
3297
- collection = _ref.collection,
3298
- config = _ref.config,
3299
- collectionNameTemplate = _ref.collectionNameTemplate,
3300
- headerLevel = _ref.headerLevel,
3301
- _ref$customCollection = _ref.customCollectionName,
3302
- customCollectionName = _ref$customCollection === void 0 ? "" : _ref$customCollection,
3303
- _ref$navigate = _ref.navigate,
3304
- navigate = _ref$navigate === void 0 ? true : _ref$navigate;
3305
- var collectionTitle = useStateValue() || {};
3306
- var showRowTitle = get_1(collectionTitle, ["showRowTitle"], true);
3307
- var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
3308
- var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
3309
- var slug = navigate && collection && getSlug(collection, config) || "";
3310
- var collectionName = customCollectionName || collection.name || "";
3311
- var textColor = getTextColor(collectionTitle.theme);
3312
- var HeaderTag = "h" + headerLevel;
3313
- var CollectionNameBorderColor = rgbToHex(collectionNameBorderColor);
3314
- var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
3315
-
3316
- var borderBottomStyle = function borderBottomStyle() {
3317
- return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
3318
- className: "collection-name-m_border-bottom__1MnlV",
3319
- style: {
3320
- borderBottom: "4px solid ".concat(CollectionNameBorderColor)
3321
- }
3322
- }) : "";
3323
- };
3324
-
3325
- var isMobile = clientWidth("mobile");
3326
-
3327
- var getBorderHeight = function getBorderHeight() {
3328
- if (isMobile) {
3329
- switch (headerLevel) {
3330
- case "1":
3331
- return "32px";
3332
-
3333
- case "2":
3334
- return "24px";
3335
-
3336
- case "3":
3337
- return "20px";
3338
-
3339
- case "4":
3340
- return "18px";
3341
-
3342
- case "5":
3343
- return "16px";
3344
-
3345
- case "6":
3346
- return "16px";
3347
-
3348
- default:
3349
- return "20px";
3350
- }
3351
- }
3352
-
3353
- switch (headerLevel) {
3354
- case "1":
3355
- return "40px";
3356
-
3357
- case "2":
3358
- return "32px";
3359
-
3360
- case "3":
3361
- return "24px";
3362
-
3363
- case "4":
3364
- return "20px";
3365
-
3366
- case "5":
3367
- return "18px";
3368
-
3369
- case "6":
3370
- return "16px";
3371
-
3372
- default:
3373
- return "24px";
3374
- }
3375
- };
3376
-
3377
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
3378
- style: {
3379
- borderBottom: borderBottomFullStyle
3380
- },
3381
- "data-test-id": "collection-name",
3382
- className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$7)
3383
- }, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
3384
- className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
3385
- style: {
3386
- color: CollectionNameBorderColor,
3387
- fontSize: getBorderHeight()
3388
- }
3389
- }), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
3390
- href: slug,
3391
- "aria-label": "collection-name"
3392
- }, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
3393
- };
3394
- CollectionNameBase.propTypes = {
3395
- /** Collection name border color */
3396
- collectionNameBorderColor: PropTypes.PropTypes.string,
3397
-
3398
- /** The Collection Object from the API response */
3399
- collection: PropTypes.PropTypes.object,
3400
-
3401
- /** The publisher config from the API response */
3402
- config: PropTypes.PropTypes.object,
3403
-
3404
- /** The style template for the component */
3405
- collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
3406
-
3407
- /** Header tags ranging h1-h6, where h[headerLevel] */
3408
- headerLevel: PropTypes.PropTypes.string,
3409
- customCollectionName: PropTypes.PropTypes.string,
3410
- navigate: PropTypes.PropTypes.bool
3411
- };
3412
- CollectionNameBase.defaultProps = {
3413
- collectionNameTemplate: "",
3414
- headerLevel: "3"
3415
- };
3416
-
3417
- function mapStateToProps(state) {
3418
- return {
3419
- config: get_1(state, ["qt", "config"], {})
3420
- };
3421
- }
3422
-
3423
- var CollectionName = reactRedux.connect(mapStateToProps)(CollectionNameBase);
3424
-
3425
- var CrownIcon = function CrownIcon(_ref) {
3426
- var height = _ref.height,
3427
- width = _ref.width,
3428
- _ref$color = _ref.color,
3429
- color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
3430
- positionTop = _ref.positionTop;
3431
- return /*#__PURE__*/React__default["default"].createElement("svg", {
3432
- xmlns: "http://www.w3.org/2000/svg",
3433
- width: width,
3434
- height: height,
3435
- viewBox: "0 0 40 40",
3436
- style: {
3437
- position: "relative",
3438
- top: positionTop
3439
- }
3440
- }, /*#__PURE__*/React__default["default"].createElement("g", {
3441
- fill: "none",
3442
- fillRule: "evenodd",
3443
- stroke: "none",
3444
- strokeWidth: "1"
3445
- }, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
3446
- transform: "translate(8 8)"
3447
- }, /*#__PURE__*/React__default["default"].createElement("path", {
3448
- d: "M0 0H24V24H0z"
3449
- }), /*#__PURE__*/React__default["default"].createElement("g", {
3450
- fill: color,
3451
- fillRule: "nonzero",
3452
- transform: "translate(0 2)"
3453
- }, /*#__PURE__*/React__default["default"].createElement("path", {
3454
- d: "M21.043 19.553c0-.743-.601-1.344-1.344-1.344h-15.4a1.343 1.343 0 100 2.688h15.4c.743 0 1.344-.603 1.344-1.344zM1.598 8.673c.022 0 .042 0 .064-.003l2.131 7.713h16.411l2.132-7.713c.022 0 .041.003.063.003a1.599 1.599 0 10-1.52-1.108L17.025 9.82 12.882 2.95a1.599 1.599 0 10-1.765 0L6.976 9.82 3.121 7.565a1.599 1.599 0 10-1.523 1.107z"
3455
- }))))));
3456
- };
3457
- CrownIcon.propTypes = {
3458
- height: PropTypes__default["default"].string,
3459
- width: PropTypes__default["default"].string,
3460
- color: PropTypes__default["default"].string,
3461
- positionTop: PropTypes__default["default"].string
3462
- };
3463
-
3464
- var KeyIcon = function KeyIcon(_ref) {
3465
- var height = _ref.height,
3466
- width = _ref.width,
3467
- _ref$color = _ref.color,
3468
- color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
3469
- positionTop = _ref.positionTop;
3470
- return /*#__PURE__*/React__default["default"].createElement("svg", {
3471
- xmlns: "http://www.w3.org/2000/svg",
3472
- width: width,
3473
- height: height,
3474
- viewBox: "0 0 40 40",
3475
- style: {
3476
- position: "relative",
3477
- top: positionTop
3478
- }
3479
- }, /*#__PURE__*/React__default["default"].createElement("g", {
3480
- fill: "none",
3481
- fillRule: "evenodd",
3482
- stroke: "none",
3483
- strokeWidth: "1"
3484
- }, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
3485
- transform: "translate(8 8)"
3486
- }, /*#__PURE__*/React__default["default"].createElement("path", {
3487
- d: "M0 0H24V24H0z"
3488
- }), /*#__PURE__*/React__default["default"].createElement("path", {
3489
- fill: color,
3490
- fillRule: "nonzero",
3491
- d: "M12.71 4.364A6.54 6.54 0 000 6.545a6.54 6.54 0 0012.71 2.182h4.745v4.364h4.363V8.727H24V4.364H12.71zM6.544 8.727a2.181 2.181 0 110-4.362 2.181 2.181 0 010 4.362z",
3492
- transform: "translate(0 5)"
3493
- })))));
3494
- };
3495
- KeyIcon.propTypes = {
3496
- height: PropTypes__default["default"].string,
3497
- width: PropTypes__default["default"].string,
3498
- color: PropTypes__default["default"].string,
3499
- positionTop: PropTypes__default["default"].string
3500
- };
3501
-
3502
- var LockIcon = function LockIcon(_ref) {
3503
- var height = _ref.height,
3504
- width = _ref.width,
3505
- _ref$color = _ref.color,
3506
- color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
3507
- positionTop = _ref.positionTop;
3508
- return /*#__PURE__*/React__default["default"].createElement("svg", {
3509
- xmlns: "http://www.w3.org/2000/svg",
3510
- width: width,
3511
- height: height,
3512
- viewBox: "0 0 40 40",
3513
- style: {
3514
- position: "relative",
3515
- top: positionTop
3516
- }
3517
- }, /*#__PURE__*/React__default["default"].createElement("g", {
3518
- fill: "none",
3519
- fillRule: "evenodd",
3520
- stroke: "none",
3521
- strokeWidth: "1"
3522
- }, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
3523
- transform: "translate(8 8)"
3524
- }, /*#__PURE__*/React__default["default"].createElement("path", {
3525
- d: "M0 0H24V24H0z"
3526
- }), /*#__PURE__*/React__default["default"].createElement("g", {
3527
- fill: color,
3528
- fillRule: "nonzero",
3529
- transform: "translate(3)"
3530
- }, /*#__PURE__*/React__default["default"].createElement("path", {
3531
- d: "M15.692 9h-.747V6c0-3.31-2.681-6-5.978-6C5.67 0 2.989 2.69 2.989 6v3h-.747A2.249 2.249 0 000 11.25v10.5A2.249 2.249 0 002.242 24h13.45a2.249 2.249 0 002.242-2.25v-10.5A2.249 2.249 0 0015.692 9zM4.982 6c0-2.206 1.787-4 3.985-4s3.985 1.794 3.985 4v3h-7.97V6z"
3532
- }))))));
3533
- };
3534
- LockIcon.propTypes = {
3535
- height: PropTypes__default["default"].string,
3536
- width: PropTypes__default["default"].string,
3537
- color: PropTypes__default["default"].string,
3538
- positionTop: PropTypes__default["default"].string
3539
- };
3540
-
3541
- var StarIcon = function StarIcon(_ref) {
3542
- var width = _ref.width,
3543
- height = _ref.height,
3544
- _ref$color = _ref.color,
3545
- color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
3546
- _ref$positionTop = _ref.positionTop,
3547
- positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
3548
- return /*#__PURE__*/React__default["default"].createElement("svg", {
3549
- xmlns: "http://www.w3.org/2000/svg",
3550
- width: width,
3551
- height: height,
3552
- viewBox: "0 0 40 40",
3553
- style: {
3554
- position: "relative",
3555
- top: positionTop
3556
- }
3557
- }, /*#__PURE__*/React__default["default"].createElement("g", {
3558
- fill: "none",
3559
- fillRule: "evenodd",
3560
- stroke: "none",
3561
- strokeWidth: "1"
3562
- }, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
3563
- fill: color,
3564
- d: "M20 26L12.946577 29.7082039 14.2936609 21.854102 8.5873218 16.2917961 16.4732885 15.145898 20 8 23.5267115 15.145898 31.4126782 16.2917961 25.7063391 21.854102 27.053423 29.7082039z"
3565
- }))));
3566
- };
3567
- StarIcon.propTypes = {
3568
- height: PropTypes__default["default"].string,
3569
- width: PropTypes__default["default"].string,
3570
- color: PropTypes__default["default"].string,
3571
- positionTop: PropTypes__default["default"].string
3572
- };
3573
-
3574
- var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
3575
- var width = _ref.width,
3576
- height = _ref.height,
3577
- color = _ref.color,
3578
- iconType = _ref.iconType,
3579
- positionTop = _ref.positionTop;
3580
-
3581
- switch (iconType) {
3582
- case "crown":
3583
- return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
3584
- width: width,
3585
- height: height,
3586
- color: color,
3587
- positionTop: positionTop
3588
- });
3589
-
3590
- case "lock":
3591
- return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
3592
- width: width,
3593
- height: height,
3594
- color: color,
3595
- positionTop: positionTop
3596
- });
3597
-
3598
- case "key":
3599
- return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
3600
- width: width,
3601
- height: height,
3602
- color: color,
3603
- positionTop: positionTop
3604
- });
3605
-
3606
- default:
3607
- return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
3608
- width: width,
3609
- height: height,
3610
- color: color,
3611
- positionTop: positionTop
3612
- });
3613
- }
3614
- };
3615
- PremiumStoryIcon.propTypes = {
3616
- width: PropTypes__default["default"].string,
3617
- height: PropTypes__default["default"].string,
3618
- color: PropTypes__default["default"].string,
3619
- iconType: PropTypes__default["default"].string,
3620
- positionTop: PropTypes__default["default"].string
3621
- };
3622
-
3623
- function LiveIcon() {
3624
- return /*#__PURE__*/React__default["default"].createElement("svg", {
3625
- className: "live-icon",
3626
- xmlns: "http://www.w3.org/2000/svg",
3627
- width: "25",
3628
- height: "24",
3629
- viewBox: "0 0 25 24"
3630
- }, /*#__PURE__*/React__default["default"].createElement("path", {
3631
- fill: "#ff5858",
3632
- d: "M12 18a6 6 0 110-12 6 6 0 010 12zm0 2.5a8.5 8.5 0 110-17 8.5 8.5 0 010 17zm0-1a7.5 7.5 0 100-15 7.5 7.5 0 000 15z"
3633
- }));
3634
- }
3635
-
3636
- var _styleModuleImportMap$6 = {
3637
- "./headline.m.css": {
3638
- "wrapper": "headline-m_wrapper__3nUmh",
3639
- "headline": "headline-m_headline__3_NhV",
3640
- "dark": "headline-m_dark__en3hW",
3641
- "light": "headline-m_light__3lKJB"
3642
- }
3643
- };
3644
- var Headline = function Headline(_ref) {
3645
- var story = _ref.story,
3646
- headerLevel = _ref.headerLevel,
3647
- _ref$premiumStoryIcon = _ref.premiumStoryIconConfig,
3648
- premiumStoryIconConfig = _ref$premiumStoryIcon === void 0 ? {} : _ref$premiumStoryIcon,
3649
- isLink = _ref.isLink;
3650
- var configData = useStateValue() || {};
3651
- var _premiumStoryIconConf = premiumStoryIconConfig.iconColor,
3652
- iconColor = _premiumStoryIconConf === void 0 ? "#F7B500" : _premiumStoryIconConf,
3653
- _premiumStoryIconConf2 = premiumStoryIconConfig.iconStyle,
3654
- iconStyle = _premiumStoryIconConf2 === void 0 ? "star" : _premiumStoryIconConf2,
3655
- _premiumStoryIconConf3 = premiumStoryIconConfig.enablePremiumStoryIcon,
3656
- enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
3657
- _premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
3658
- showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
3659
- var alternateHeadline = get_1(story, ["alternative", "home", "default", "headline"]);
3660
- var premiumStory = enablePremiumStoryIcon && get_1(story, ["access"]) === "subscription";
3661
- var headline = alternateHeadline || story.headline;
3662
- var HeaderTag = "h" + headerLevel;
3663
-
3664
- var positionHeadline = function positionHeadline() {
3665
- switch (parseInt(headerLevel)) {
3666
- case 1:
3667
- return "-2px";
3668
-
3669
- case 2:
3670
- return "2px";
3671
-
3672
- case 3:
3673
- return "4px";
3674
-
3675
- case 4:
3676
- return "5px";
3677
-
3678
- default:
3679
- return "6px";
3680
- }
3681
- };
3682
-
3683
- var textColor = getTextColor(configData.theme);
3684
- var wrapperClass = premiumStory ? "wrapper" : "";
3685
- var iconSize = "24px";
3686
- var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
3687
- return /*#__PURE__*/React__default["default"].createElement("div", {
3688
- "data-test-id": "headline",
3689
- className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$6)
3690
- }, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
3691
- width: iconSize,
3692
- height: iconSize,
3693
- color: iconColor,
3694
- iconType: iconStyle,
3695
- positionTop: positionHeadline()
3696
- }), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
3697
- href: getStoryUrl(story, "/".concat(story.slug)),
3698
- externalLink: isExternalStory(story),
3699
- "aria-label": "headline"
3700
- }, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
3701
- className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$6)
3702
- }, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
3703
- className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$6)
3704
- }, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
3705
- };
3706
- Headline.propTypes = {
3707
- /** The Story Object from the API response */
3708
- story: PropTypes__default["default"].object.isRequired,
3709
-
3710
- /** Header tags ranging h1-h6, where h[headerLevel] */
3711
- headerLevel: PropTypes__default["default"].string,
3712
- premiumStoryIconConfig: PropTypes__default["default"].shape({
3713
- iconColor: PropTypes__default["default"].string,
3714
- iconType: PropTypes__default["default"].string,
3715
- enablePremiumStoryIcon: PropTypes__default["default"].bool
3716
- }),
3717
- isLink: PropTypes__default["default"].bool
3718
- };
3719
- Headline.defaultProps = {
3720
- headerLevel: "6",
3721
- isLink: true
3722
- };
3723
-
3724
- var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
3725
- var _ref$width = _ref.width,
3726
- width = _ref$width === void 0 ? 40 : _ref$width,
3727
- _ref$height = _ref.height,
3728
- height = _ref$height === void 0 ? 30 : _ref$height,
3729
- _ref$iconColor = _ref.iconColor,
3730
- iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
3731
- return /*#__PURE__*/React__default["default"].createElement("svg", {
3732
- width: width,
3733
- height: height,
3734
- viewBox: "0 0 102 76",
3735
- version: "1.1"
3736
- }, /*#__PURE__*/React__default["default"].createElement("g", {
3737
- id: "demo-home-copy",
3738
- stroke: "none",
3739
- strokeWidth: "1",
3740
- fill: "none",
3741
- fillRule: "evenodd",
3742
- transform: "translate(-377.000000, -314.000000)"
3743
- }, /*#__PURE__*/React__default["default"].createElement("g", {
3744
- id: "Group-13",
3745
- transform: "translate(377.000000, 314.000000)"
3746
- }, /*#__PURE__*/React__default["default"].createElement("path", {
3747
- d: "M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",
3748
- id: "Combined-Shape",
3749
- fill: iconColor,
3750
- fillRule: "nonzero"
3751
- }), /*#__PURE__*/React__default["default"].createElement("rect", {
3752
- id: "Rectangle-19",
3753
- stroke: iconColor,
3754
- strokeWidth: "3",
3755
- x: "1.5",
3756
- y: "1.5",
3757
- width: "99",
3758
- height: "73",
3759
- rx: "3"
3760
- }))));
3761
- };
3762
- ImageFallbackIcon.propTypes = {
3763
- width: PropTypes__default["default"].object,
3764
- height: PropTypes__default["default"].object,
3765
- iconColor: PropTypes__default["default"].object
3766
- };
3767
-
3768
- var imageFallback = function imageFallback() {
3769
- return /*#__PURE__*/React__default["default"].createElement("div", {
3770
- className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
3771
- }, /*#__PURE__*/React__default["default"].createElement("figure", {
3772
- className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
3773
- }, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
3774
- };
3775
-
3776
- var FallbackImage = function FallbackImage(_ref) {
3777
- var slug = _ref.slug;
3778
-
3779
- if (slug) {
3780
- return /*#__PURE__*/React__default["default"].createElement(components.Link, {
3781
- href: slug,
3782
- "aria-label": "image-fallback"
3783
- }, imageFallback());
3784
- } else {
3785
- return imageFallback();
3786
- }
3787
- };
3788
- FallbackImage.propTypes = {
3789
- slug: PropTypes__default["default"].string
3790
- };
3791
-
3792
- var HyperLinkIcon = function HyperLinkIcon() {
3793
- return /*#__PURE__*/React__default["default"].createElement("svg", {
3794
- xmlns: "http://www.w3.org/2000/svg",
3795
- width: "36",
3796
- height: "28"
3797
- }, /*#__PURE__*/React__default["default"].createElement("g", {
3798
- fill: "none",
3799
- fillRule: "evenodd"
3800
- }, /*#__PURE__*/React__default["default"].createElement("rect", {
3801
- width: "36",
3802
- height: "28",
3803
- fill: "#3D6FCF",
3804
- rx: "4"
3805
- }), /*#__PURE__*/React__default["default"].createElement("path", {
3806
- stroke: "#FFF",
3807
- strokeLinecap: "round",
3808
- strokeLinejoin: "round",
3809
- strokeWidth: "2",
3810
- d: "M22 14.667v4c0 .736-.597 1.333-1.333 1.333h-7.334A1.333 1.333 0 0112 18.667v-7.334c0-.736.597-1.333 1.333-1.333h4M20 8h4v4m-7.333 3.333L24 8"
3811
- })));
3812
- };
3813
-
3814
- var HyperLink = function HyperLink(_ref) {
3815
- var _ref$hyperLink = _ref.hyperLink,
3816
- hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
3817
- if (!hyperLink) return null;
3818
- return /*#__PURE__*/React__default["default"].createElement(components.Link, {
3819
- href: hyperLink,
3820
- "aria-label": "hyperlink-button",
3821
- className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
3822
- target: "_blank",
3823
- rel: "noopener noreferrer"
3824
- }, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
3825
- };
3826
- HyperLink.propTypes = {
3827
- hyperLink: PropTypes__default["default"].string
3828
- };
3829
-
3830
- var _styleModuleImportMap$5 = {
3831
- "./hero-image.m.css": {
3832
- "hero-image": "hero-image-m_hero-image__3lraV",
3833
- "right-padding": "hero-image-m_right-padding__1LkCe",
3834
- "left-padding": "hero-image-m_left-padding__pYRAj",
3835
- "right-padding-mob": "hero-image-m_right-padding-mob__3-uOU",
3836
- "placeholder": "hero-image-m_placeholder__1omCm",
3837
- "hero-image-mob": "hero-image-m_hero-image-mob__13JJp",
3838
- "with-padding": "hero-image-m_with-padding__324G_",
3839
- "image": "hero-image-m_image__1mz0U"
3840
- }
3841
- };
3842
- var HeroImage = function HeroImage(_ref) {
3843
- var story = _ref.story,
3844
- FullBleed = _ref.FullBleed,
3845
- aspectRatio = _ref.aspectRatio,
3846
- defaultWidth = _ref.defaultWidth,
3847
- widths = _ref.widths,
3848
- isHorizontal = _ref.isHorizontal,
3849
- isHorizontalMobile = _ref.isHorizontalMobile,
3850
- isHorizontalWithImageLast = _ref.isHorizontalWithImageLast,
3851
- defaultFallback = _ref.defaultFallback,
3852
- isStoryPageImage = _ref.isStoryPageImage,
3853
- config = _ref.config;
3854
-
3855
- var _ref2 = useStateValue() || {},
3856
- _ref2$fallbackImageUr = _ref2.fallbackImageUrl,
3857
- fallbackImageUrl = _ref2$fallbackImageUr === void 0 ? "" : _ref2$fallbackImageUr;
3858
-
3859
- var _config$StoryTemplate = config.StoryTemplateIcon,
3860
- StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
3861
- return null;
3862
- } : _config$StoryTemplate;
3863
- var showImagePlaceholder = reactRedux.useSelector(function (state) {
3864
- return get_1(state, ["qt", "config", "showPlaceholder"]);
3865
- });
3866
- var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
3867
- var fullBleed = FullBleed ? "" : "with-padding";
3868
- var heroImageClass = "hero-image";
3869
- if (isHorizontal) heroImageClass = "right-padding";else if (isHorizontalWithImageLast) heroImageClass = "left-padding";
3870
- var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
3871
-
3872
- var getPadding = function getPadding(aspectRatio) {
3873
- var _aspectRatio = _slicedToArray(aspectRatio, 2),
3874
- height = _aspectRatio[0],
3875
- width = _aspectRatio[1];
3876
-
3877
- if (height > 0 && width > 0) {
3878
- var padding = width / height * 100;
3879
- return padding;
3880
- }
3881
-
3882
- return 0;
3883
- };
3884
-
3885
- var _aspectRatio2 = _slicedToArray(aspectRatio, 2),
3886
- mobileAspectRatio = _aspectRatio2[0],
3887
- _aspectRatio2$ = _aspectRatio2[1],
3888
- desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
3889
-
3890
- var isMobile = clientWidth("mobile");
3891
- var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
3892
- var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
3893
- var slug = get_1(story, ["hero-image-s3-key"]) || get_1(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
3894
- var hyperLink = get_1(story, ["hero-image-hyperlink"], "");
3895
-
3896
- var fallbackImage = function fallbackImage() {
3897
- if (!slug) {
3898
- if (fallbackImageUrl && !isStoryPageImage) {
3899
- return /*#__PURE__*/React__default["default"].createElement("figure", {
3900
- style: {
3901
- paddingTop: imagePadding + "%"
3902
- },
3903
- className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
3904
- }, /*#__PURE__*/React__default["default"].createElement("img", {
3905
- className: "qt-image",
3906
- "data-src": "".concat(fallbackImageUrl),
3907
- alt: "image-fallback"
3908
- }));
3909
- }
3910
-
3911
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
3912
- "data-test-id": "arr--fallback-hero-image",
3913
- style: {
3914
- paddingTop: imagePadding + "%"
3915
- },
3916
- className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
3917
- }, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
3918
- storyTemplate: story["story-template"]
3919
- }), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
3920
- }
3921
-
3922
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
3923
- style: {
3924
- paddingTop: imagePadding + "%"
3925
- },
3926
- className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
3927
- }, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
3928
- storyTemplate: story["story-template"]
3929
- }), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
3930
- story: story,
3931
- aspectRatio: imageAspectRatio,
3932
- defaultWidth: defaultWidth,
3933
- widths: widths,
3934
- imgParams: {
3935
- auto: ["format", "compress"],
3936
- fit: "max"
3937
- }
3938
- })), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
3939
- hyperLink: hyperLink
3940
- }));
3941
- };
3942
-
3943
- return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
3944
- "data-test-id": "arr--hero-image",
3945
- className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$5)
3946
- }, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
3947
- "data-test-id": "arr--hero-image",
3948
- href: getStoryUrl(story, "/".concat(story.slug)),
3949
- externalLink: isExternalStory(story),
3950
- "aria-label": "fallback-hero-image",
3951
- className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$5)
3952
- }, fallbackImage()));
3953
- };
3954
- HeroImage.propTypes = {
3955
- /** The Story Object from the API response */
3956
- story: PropTypes__default["default"].object.isRequired,
3957
-
3958
- /** Removes the Hero Image padding for the image to bleed over the margin */
3959
- FullBleed: PropTypes__default["default"].bool,
3960
-
3961
- /** The default width for the image, in case the browser does not support srcset */
3962
- defaultWidth: PropTypes__default["default"].number,
3963
-
3964
- /** The list of available widths */
3965
- widths: PropTypes__default["default"].array,
3966
- // fatch the correct hero image
3967
- aspectRatio: PropTypes__default["default"].array,
3968
- // Hints for the browser to choose the best size
3969
-
3970
- /** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
3971
- isHorizontal: PropTypes__default["default"].bool,
3972
-
3973
- /** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
3974
- isHorizontalMobile: PropTypes__default["default"].bool,
3975
- // this prop is responsive for rendering fallback image on story page
3976
- defaultFallback: PropTypes__default["default"].bool,
3977
- isHorizontalWithImageLast: PropTypes__default["default"].bool,
3978
- isStoryPageImage: PropTypes__default["default"].bool,
3979
- config: PropTypes__default["default"].object
3980
- };
3981
- HeroImage.defaultProps = {
3982
- FullBleed: true,
3983
- aspectRatio: [[1, 1], [16, 9]],
3984
- defaultWidth: 480,
3985
- widths: [250, 480, 640],
3986
- isHorizontal: false,
3987
- isHorizontalMobile: false,
3988
- defaultFallback: true,
3989
- isStoryPageImage: false,
3990
- isHorizontalWithImageLast: false,
3991
- config: {}
3992
- };
3993
-
3994
- function _defineProperty(obj, key, value) {
3995
- if (key in obj) {
3996
- Object.defineProperty(obj, key, {
3997
- value: value,
3998
- enumerable: true,
3999
- configurable: true,
4000
- writable: true
4001
- });
4002
- } else {
4003
- obj[key] = value;
4004
- }
4005
-
4006
- return obj;
4007
- }
4008
-
4009
- var _styleModuleImportMap$4 = {
4010
- "./load-more.m.css": {
4011
- "button": "load-more-m_button__1mmf1",
4012
- "default": "load-more-m_default__2_k4V",
4013
- "dark": "load-more-m_dark__3dfzb",
4014
- "light": "load-more-m_light__ePZQI"
4015
- }
4016
- };
4017
-
4018
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4019
-
4020
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4021
- var LoadmoreButton = function LoadmoreButton(_ref) {
4022
- var _ref$config = _ref.config,
4023
- config = _ref$config === void 0 ? {} : _ref$config,
4024
- collection = _ref.collection,
4025
- _ref$template = _ref.template,
4026
- template = _ref$template === void 0 ? "SubsequentLoadCount" : _ref$template,
4027
- onClick = _ref.onClick,
4028
- navigate = _ref.navigate,
4029
- qtConfig = _ref.qtConfig;
4030
- var _config$showButton = config.showButton,
4031
- showButton = _config$showButton === void 0 ? true : _config$showButton,
4032
- _config$buttonText = config.buttonText,
4033
- buttonText = _config$buttonText === void 0 ? "Read More" : _config$buttonText,
4034
- _config$theme = config.theme,
4035
- theme = _config$theme === void 0 ? "" : _config$theme,
4036
- _config$customUrlPath = config.customUrlPath,
4037
- customUrlPath = _config$customUrlPath === void 0 ? "" : _config$customUrlPath;
4038
- if (!showButton) return null;
4039
- var textColor = getTextColor(theme);
4040
- var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
4041
- return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
4042
- onClick: onClick,
4043
- "data-test-id": "load-more",
4044
- className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$4)
4045
- }, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
4046
- href: slug,
4047
- navigateTo: navigate,
4048
- "data-test-id": "load-more",
4049
- "aria-label": "load-more"
4050
- }, /*#__PURE__*/React__default["default"].createElement("div", {
4051
- className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$4)
4052
- }, buttonText));
4053
- };
4054
- LoadmoreButton.propTypes = {
4055
- collection: PropTypes__default["default"].object,
4056
- template: PropTypes__default["default"].string,
4057
- config: PropTypes__default["default"].object,
4058
- onClick: PropTypes__default["default"].func,
4059
- navigate: PropTypes__default["default"].func,
4060
- qtConfig: PropTypes__default["default"].object
4061
- };
4062
-
4063
- var _styleModuleImportMap$3 = {
4064
- "./section.m.css": {
4065
- "section": "section-m_section__2N4S3",
4066
- "section-borderBottomSml": "section-m_section-borderBottomSml__2GNbo",
4067
- "border-bottom": "section-m_border-bottom__3cRoD",
4068
- "section-borderLeft": "section-m_section-borderLeft__3hKVj",
4069
- "border-left": "section-m_border-left__2oUyp",
4070
- "section-solid": "section-m_section-solid__1vB1Q",
4071
- "dark": "section-m_dark__1r3C4",
4072
- "light": "section-m_light__306hW"
4073
- }
4074
- };
4075
- var SectionTag = function SectionTag(_ref) {
4076
- var story = _ref.story,
4077
- _ref$template = _ref.template,
4078
- template = _ref$template === void 0 ? "" : _ref$template,
4079
- _ref$borderColor = _ref.borderColor,
4080
- borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
4081
- isLightTheme = _ref.isLightTheme;
4082
- var config = useStateValue() || {};
4083
- var isSection = get_1(config, ["showSection"], true);
4084
- var templateFromRowContext = get_1(config, ["sectionTagTemplate"]);
4085
- var section = get_1(story, ["sections", 0], "");
4086
- var supportedTemplates = ["borderBottomSml", "borderLeft", "solid"];
4087
- var getUrl = section ? section["section-url"] : "/";
4088
- var colorToApplyContrast = template === "solid" || templateFromRowContext === "solid" ? borderColor : config.theme;
4089
- var textColor = isLightTheme ? "light" : getTextColor(colorToApplyContrast);
4090
- var sectionTagBorderColor = rgbToHex(borderColor);
4091
- var templateStyle = supportedTemplates.includes(template) ? "section section-".concat(template) : "section";
4092
-
4093
- if (templateFromRowContext) {
4094
- templateStyle = supportedTemplates.includes(templateFromRowContext) ? "section section-".concat(templateFromRowContext) : "section";
4095
- }
4096
-
4097
- if (!isSection) return null;
4098
- return /*#__PURE__*/React__default["default"].createElement(components.Link, {
4099
- href: getUrl,
4100
- className: "arrow-component arr--section-name",
4101
- "aria-label": "section-name"
4102
- }, /*#__PURE__*/React__default["default"].createElement("div", {
4103
- "data-test-id": "sectionTag",
4104
- style: {
4105
- backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
4106
- },
4107
- className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$3)
4108
- }, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
4109
- className: "section-m_border-left__2oUyp",
4110
- style: {
4111
- color: sectionTagBorderColor
4112
- }
4113
- }), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
4114
- className: "section-m_border-bottom__3cRoD",
4115
- style: {
4116
- backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
4117
- }
4118
- })));
4119
- };
4120
- SectionTag.propTypes = {
4121
- /** The Story Object from the API response */
4122
- story: PropTypes__default["default"].object.isRequired,
4123
-
4124
- /** The style template for section tag */
4125
- template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
4126
- borderColor: PropTypes__default["default"].string,
4127
- solidBorderColor: PropTypes__default["default"].string,
4128
- isLightTheme: PropTypes__default["default"].bool
4129
- };
4130
- SectionTag.defaultProps = {
4131
- template: "",
4132
- isLightTheme: false
4133
- };
4134
-
4135
- var _styleModuleImportMap$2 = {
4136
- "./subheadline.m.css": {
4137
- "subheadline": "subheadline-m_subheadline__3fd7z",
4138
- "dark": "subheadline-m_dark__28u00",
4139
- "light": "subheadline-m_light__2YUOe"
4140
- }
4141
- };
4142
- var Subheadline = function Subheadline(_ref) {
4143
- var story = _ref.story,
4144
- _ref$truncateChars = _ref.truncateChars,
4145
- truncateChars = _ref$truncateChars === void 0 ? 200 : _ref$truncateChars,
4146
- lineClamp = _ref.lineClamp,
4147
- _ref$clazzName = _ref.clazzName,
4148
- clazzName = _ref$clazzName === void 0 ? "" : _ref$clazzName,
4149
- forceShowAtom = _ref.forceShowAtom,
4150
- showFullContent = _ref.showFullContent;
4151
- var config = useStateValue() || {};
4152
- var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
4153
- if (!subheadline) return null;
4154
- var textColor = getTextColor(config.theme);
4155
- return /*#__PURE__*/React__default["default"].createElement("div", {
4156
- style: {
4157
- WebkitLineClamp: lineClamp
4158
- },
4159
- "data-test-id": "subheadline",
4160
- className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName("subheadline ".concat(textColor), _styleModuleImportMap$2)
4161
- }, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
4162
- };
4163
- Subheadline.propTypes = {
4164
- /** The Story Object from the API response */
4165
- story: PropTypes__default["default"].object.isRequired,
4166
- // Restricts the number of lines for subheadline.
4167
- lineClamp: PropTypes__default["default"].number,
4168
-
4169
- /** Number of characters to truncate the subheadline */
4170
- truncateChars: PropTypes__default["default"].number,
4171
- clazzName: PropTypes__default["default"].string,
4172
- forceShowAtom: PropTypes__default["default"].bool,
4173
- showFullContent: PropTypes__default["default"].bool
4174
- };
4175
- Subheadline.defaultProps = {
4176
- forceShowAtom: false,
4177
- showFullContent: false
4178
- };
4179
-
4180
- var _styleModuleImportMap$1 = {
4181
- "./storycard.m.css": {
4182
- "author-timestamp-wrapper": "storycard-m_author-timestamp-wrapper__20yjp",
4183
- "default-card": "storycard-m_default-card__1-POn",
4184
- "horizontal-card": "storycard-m_horizontal-card___7afz",
4185
- "backgroung-img": "storycard-m_backgroung-img__1FMJT",
4186
- "content-overlap": "storycard-m_content-overlap__1yNHR",
4187
- "border-full": "storycard-m_border-full__1nhy7",
4188
- "light": "storycard-m_light__3EhXN",
4189
- "dark": "storycard-m_dark__2wCTq",
4190
- "border-bottom": "storycard-m_border-bottom__2_E-I",
4191
- "border-boxShadow": "storycard-m_border-boxShadow__2-k3Z",
4192
- "center-align": "storycard-m_center-align__1Sn8-",
4193
- "content-bottom": "storycard-m_content-bottom__1QHeC",
4194
- "content-full": "storycard-m_content-full__2zJmU",
4195
- "content-boxShadow": "storycard-m_content-boxShadow__2IAWZ",
4196
- "hero-image": "storycard-m_hero-image__1H3MB",
4197
- "right-padding": "storycard-m_right-padding__12-lQ",
4198
- "horizontal-mob": "storycard-m_horizontal-mob__17JG2",
4199
- "content": "storycard-m_content__1Q9vq",
4200
- "border-default": "storycard-m_border-default__PEZ1x",
4201
- "card": "storycard-m_card__KJwRa",
4202
- "horizontal-image-last": "storycard-m_horizontal-image-last__3o6LY"
4203
- }
4204
- };
4205
- var StoryCard = function StoryCard(_ref) {
4206
- var story = _ref.story,
4207
- children = _ref.children,
4208
- isHorizontal = _ref.isHorizontal,
4209
- aspectRatio = _ref.aspectRatio,
4210
- border = _ref.border,
4211
- useImageAsBackground = _ref.useImageAsBackground,
4212
- bgImgContentOverlap = _ref.bgImgContentOverlap,
4213
- theme = _ref.theme,
4214
- borderColor = _ref.borderColor,
4215
- isHorizontalMobile = _ref.isHorizontalMobile,
4216
- centerAlign = _ref.centerAlign,
4217
- headerLevel = _ref.headerLevel,
4218
- hideAuthorImage = _ref.hideAuthorImage,
4219
- prefix = _ref.prefix,
4220
- config = _ref.config,
4221
- isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
4222
- if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
4223
- var borderOptions = ["default", "full", "bottom", "boxShadow"];
4224
- var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
4225
-
4226
- var horizontalCardStyle = "default-card";
4227
- if (isHorizontal) horizontalCardStyle = "horizontal-card";else if (isHorizontalWithImageLast) horizontalCardStyle = "horizontal-image-last";
4228
- var bgImageClasses = useImageAsBackground ? "backgroung-img" : "";
4229
- var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
4230
- var textColor = getTextColor(theme);
4231
- var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
4232
- var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
4233
- story: story,
4234
- aspectRatio: aspectRatio,
4235
- border: border,
4236
- isHorizontalMobile: isHorizontalMobile,
4237
- isHorizontal: isHorizontal,
4238
- centerAlign: centerAlign,
4239
- headerLevel: headerLevel,
4240
- borderColor: borderColor,
4241
- hideAuthorImage: hideAuthorImage,
4242
- prefix: prefix,
4243
- config: config,
4244
- isHorizontalWithImageLast: isHorizontalWithImageLast
4245
- });
4246
- return /*#__PURE__*/React__default["default"].createElement("div", {
4247
- "data-test-id": "story-card",
4248
- style: {
4249
- backgroundColor: theme,
4250
- color: textColor
4251
- },
4252
- className: "arr--story-card " + _getClassName("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap$1)
4253
- }, children || defaultStorycard);
4254
- };
4255
-
4256
- var DefaultStoryCard = function DefaultStoryCard(_ref2) {
4257
- var story = _ref2.story;
4258
- _ref2.border;
4259
- var isHorizontal = _ref2.isHorizontal,
4260
- aspectRatio = _ref2.aspectRatio,
4261
- headerLevel = _ref2.headerLevel,
4262
- _ref2$isHorizontalMob = _ref2.isHorizontalMobile,
4263
- isHorizontalMobile = _ref2$isHorizontalMob === void 0 ? false : _ref2$isHorizontalMob,
4264
- _ref2$centerAlign = _ref2.centerAlign,
4265
- centerAlign = _ref2$centerAlign === void 0 ? false : _ref2$centerAlign,
4266
- borderColor = _ref2.borderColor,
4267
- hideAuthorImage = _ref2.hideAuthorImage,
4268
- prefix = _ref2.prefix,
4269
- isHorizontalWithImageLast = _ref2.isHorizontalWithImageLast,
4270
- config = _ref2.config;
4271
- var alignment = centerAlign ? "center-align" : "";
4272
- var SectionTagborderColor = rgbToHex(borderColor);
4273
- var _config$localizationC = config.localizationConfig,
4274
- localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
4275
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
4276
- config: config,
4277
- story: story,
4278
- isHorizontal: true,
4279
- isHorizontalMobile: isHorizontalMobile,
4280
- aspectRatio: aspectRatio
4281
- }) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
4282
- config: config,
4283
- story: story,
4284
- isHorizontalWithImageLast: true,
4285
- isHorizontalMobile: isHorizontalMobile,
4286
- aspectRatio: aspectRatio
4287
- }) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
4288
- story: story,
4289
- config: config,
4290
- isHorizontalMobile: isHorizontalMobile,
4291
- aspectRatio: aspectRatio
4292
- }), /*#__PURE__*/React__default["default"].createElement("div", {
4293
- className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap$1)
4294
- }, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
4295
- story: story,
4296
- borderColor: SectionTagborderColor
4297
- }), /*#__PURE__*/React__default["default"].createElement(Headline, {
4298
- story: story,
4299
- headerLevel: headerLevel,
4300
- premiumStoryIconConfig: config
4301
- }), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
4302
- config: localizationConfig,
4303
- story: story,
4304
- isBottom: true,
4305
- prefix: prefix,
4306
- hideAuthorImage: hideAuthorImage
4307
- }), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
4308
- story: story
4309
- })));
4310
- };
4311
-
4312
- DefaultStoryCard.propTypes = {
4313
- story: PropTypes__default["default"].object.isRequired,
4314
- border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
4315
- isBottom: PropTypes__default["default"].bool,
4316
- isHorizontal: PropTypes__default["default"].bool,
4317
- aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
4318
- isHorizontalMobile: PropTypes__default["default"].bool,
4319
- centerAlign: PropTypes__default["default"].bool,
4320
- headerLevel: PropTypes__default["default"].string,
4321
- borderColor: PropTypes__default["default"].string,
4322
- hideAuthorImage: PropTypes__default["default"].bool,
4323
- prefix: PropTypes__default["default"].string,
4324
- config: PropTypes__default["default"].object,
4325
- isHorizontalWithImageLast: PropTypes__default["default"].bool
4326
- };
4327
- StoryCard.propTypes = {
4328
- /** The Story Object from the API response */
4329
- story: PropTypes__default["default"].object.isRequired,
4330
- children: PropTypes__default["default"].node,
4331
-
4332
- /** Flip the Story Card to Horizonal mode */
4333
- isHorizontal: PropTypes__default["default"].bool,
4334
-
4335
- /** Add border to the Story Card */
4336
- border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
4337
- // story card with background image
4338
- useImageAsBackground: PropTypes__default["default"].bool,
4339
- // story card content overlap with image
4340
- bgImgContentOverlap: PropTypes__default["default"].bool,
4341
-
4342
- /** add aspect ratio for hero image */
4343
- aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
4344
-
4345
- /** add theme(dark /light/custom color) for storycard */
4346
- theme: PropTypes__default["default"].string,
4347
-
4348
- /** flip the story card mobile design horizontal */
4349
- isHorizontalMobile: PropTypes__default["default"].bool,
4350
- // make content center align in desktop and left align in mobile
4351
- centerAlign: PropTypes__default["default"].bool,
4352
- headerLevel: PropTypes__default["default"].string,
4353
- borderColor: PropTypes__default["default"].string,
4354
- // handle author image through storycard
4355
- hideAuthorImage: PropTypes__default["default"].bool,
4356
- // handle author prefix through storycard
4357
- prefix: PropTypes__default["default"].string,
4358
- config: PropTypes__default["default"].object,
4359
- isHorizontalWithImageLast: PropTypes__default["default"].bool
4360
- };
4361
- StoryCard.defaultProps = {
4362
- isHorizontal: false,
4363
- isHorizontalMobile: false,
4364
- border: "default",
4365
- theme: "",
4366
- centerAlign: false,
4367
- borderColor: "",
4368
- isHorizontalWithImageLast: false
4369
- };
4370
-
4371
- var _styleModuleImportMap = {
4372
- "./storycardContent.m.css": {
4373
- "wrapper": "storycardContent-m_wrapper__TEmfA",
4374
- "horizontal-content-wrapper": "storycardContent-m_horizontal-content-wrapper__NgpuC",
4375
- "border-full": "storycardContent-m_border-full__2km37"
4376
- }
4377
- };
4378
- var StorycardContent = function StorycardContent(_ref) {
4379
- var story = _ref.story,
4380
- children = _ref.children,
4381
- theme = _ref.theme,
4382
- border = _ref.border,
4383
- isHorizontalMobile = _ref.isHorizontalMobile,
4384
- headerLevel = _ref.headerLevel,
4385
- borderColor = _ref.borderColor,
4386
- config = _ref.config;
4387
- var textColor = getTextColor(theme);
4388
- var borderOptions = ["full"];
4389
- var SectionTagborderColor = rgbToHex(borderColor);
4390
- var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
4391
- var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
4392
- return /*#__PURE__*/React__default["default"].createElement("div", {
4393
- "data-test-id": "story-card-content",
4394
- style: {
4395
- backgroundColor: theme,
4396
- color: textColor
4397
- },
4398
- className: "arr--content-wrapper " + _getClassName("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap)
4399
- }, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
4400
- story: story,
4401
- headerLevel: headerLevel,
4402
- isHorizontalMobile: isHorizontalMobile,
4403
- borderColor: SectionTagborderColor,
4404
- config: config
4405
- }));
4406
- };
4407
-
4408
- var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
4409
- var story = _ref2.story,
4410
- headerLevel = _ref2.headerLevel,
4411
- borderColor = _ref2.borderColor,
4412
- _ref2$config = _ref2.config,
4413
- config = _ref2$config === void 0 ? {} : _ref2$config;
4414
- var SectionTagborderColor = rgbToHex(borderColor);
4415
- var _config$localizationC = config.localizationConfig,
4416
- localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
4417
- return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
4418
- story: story,
4419
- borderColor: SectionTagborderColor
4420
- }), /*#__PURE__*/React__default["default"].createElement(Headline, {
4421
- story: story,
4422
- headerLevel: headerLevel,
4423
- premiumStoryIconConfig: config
4424
- }), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
4425
- config: localizationConfig,
4426
- story: story
4427
- }));
4428
- };
4429
-
4430
- DefaultStoryCardContent.propTypes = {
4431
- story: PropTypes__default["default"].object.isRequired,
4432
- border: PropTypes__default["default"].string,
4433
- theme: PropTypes__default["default"].string,
4434
- isHorizontalMobile: PropTypes__default["default"].bool,
4435
- headerLevel: PropTypes__default["default"].string,
4436
- borderColor: PropTypes__default["default"].string,
4437
- config: PropTypes__default["default"].object
4438
- };
4439
- StorycardContent.propTypes = {
4440
- story: PropTypes__default["default"].object.isRequired,
4441
- children: PropTypes__default["default"].node,
4442
- theme: PropTypes__default["default"].string,
4443
- border: PropTypes__default["default"].string,
4444
- isHorizontalMobile: PropTypes__default["default"].bool,
4445
- headerLevel: PropTypes__default["default"].string,
4446
- borderColor: PropTypes__default["default"].string,
4447
- config: PropTypes__default["default"].object
4448
- };
4449
-
4450
- var LoadMoreTarget = function LoadMoreTarget(_ref) {
4451
- var collection = _ref.collection,
4452
- componentName = _ref.componentName,
4453
- offset = _ref.offset,
4454
- limit = _ref.limit;
4455
- return /*#__PURE__*/React__default["default"].createElement("div", {
4456
- id: "ELM-".concat(collection.id),
4457
- "data-collection-slug": collection["slug"],
4458
- "data-component-name": componentName,
4459
- "data-collection-offset": offset,
4460
- "data-collection-limit": limit
4461
- });
4462
- };
4463
- LoadMoreTarget.propTypes = {
4464
- collection: PropTypes__default["default"].shape({
4465
- id: PropTypes__default["default"].string,
4466
- slug: PropTypes__default["default"].string
4467
- }),
4468
- componentName: PropTypes__default["default"].string,
4469
- offset: PropTypes__default["default"].number,
4470
- limit: PropTypes__default["default"].number
4471
- };
4472
-
4473
- var loadMore = function loadMore(_ref) {
4474
- var isLoading = _ref.isLoading,
4475
- storyItems = _ref.storyItems,
4476
- getMoreStories = _ref.getMoreStories,
4477
- _ref$subsequentLoadCo = _ref.subsequentLoadCount,
4478
- subsequentLoadCount = _ref$subsequentLoadCo === void 0 ? 8 : _ref$subsequentLoadCo;
4479
- if (isLoading) return;
4480
- var limit = subsequentLoadCount;
4481
- var offset = storyItems.length;
4482
- getMoreStories(offset, limit);
4483
- };
4484
-
4485
- var OneColStoryListBase = function OneColStoryListBase(_ref2) {
4486
- var collection = _ref2.collection,
4487
- _ref2$config = _ref2.config,
4488
- config = _ref2$config === void 0 ? {} : _ref2$config,
4489
- getMoreStories = _ref2.getMoreStories,
4490
- isLoadMoreVisible = _ref2.isLoadMoreVisible,
4491
- isLoading = _ref2.isLoading,
4492
- isolatedLoadMore = _ref2.isolatedLoadMore;
4493
- var storyItems = components.collectionToStories(collection);
4494
- if (!storyItems.length) return null;
4495
- var _config$collectionNam = config.collectionNameBorderColor,
4496
- collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
4497
- _config$borderColor = config.borderColor,
4498
- borderColor = _config$borderColor === void 0 ? "" : _config$borderColor,
4499
- _config$theme = config.theme,
4500
- theme = _config$theme === void 0 ? "" : _config$theme,
4501
- _config$border = config.border,
4502
- border = _config$border === void 0 ? "" : _config$border,
4503
- _config$slotConfig = config.slotConfig,
4504
- slotConfig = _config$slotConfig === void 0 ? [] : _config$slotConfig,
4505
- _config$collectionNam2 = config.collectionNameTemplate,
4506
- collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2,
4507
- _config$footerSlotCon = config.footerSlotConfig,
4508
- footerSlotConfig = _config$footerSlotCon === void 0 ? {} : _config$footerSlotCon,
4509
- _config$footerButton = config.footerButton,
4510
- footerButton = _config$footerButton === void 0 ? "" : _config$footerButton,
4511
- _config$localizationC = config.localizationConfig,
4512
- localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC,
4513
- _config$subsequentLoa = config.subsequentLoadCount,
4514
- subsequentLoadCount = _config$subsequentLoa === void 0 ? 8 : _config$subsequentLoa;
4515
- var footerSlot = footerSlotConfig.footerSlot;
4516
-
4517
- var _get = get_1(slotConfig, [0], {}),
4518
- type = _get.type,
4519
- component = _get.component;
4520
-
4521
- var dispatch = reactRedux.useDispatch();
4522
- var qtConfig = reactRedux.useSelector(function (state) {
4523
- return get_1(state, ["qt", "config"], {});
4524
- });
4525
-
4526
- var getLoadMore = function getLoadMore(opts) {
4527
- if (!isLoadMoreVisible) return null;
4528
-
4529
- if (isolatedLoadMore) {
4530
- return /*#__PURE__*/React__default["default"].createElement(LoadMoreTarget, {
4531
- collection: collection,
4532
- componentName: "OneColStoryList",
4533
- offset: storyItems.length,
4534
- limit: subsequentLoadCount
4535
- });
4536
- }
4537
-
4538
- var url = generateNavigateSlug(collection, qtConfig);
4539
- return /*#__PURE__*/React__default["default"].createElement(ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
4540
- config: config,
4541
- collection: collection,
4542
- template: footerButton,
4543
- onClick: function onClick() {
4544
- return loadMore(opts);
4545
- },
4546
- navigate: function navigate() {
4547
- return navigateTo(dispatch, url);
4548
- },
4549
- qtConfig: qtConfig
4550
- }));
4551
- };
4552
-
4553
- var footerSlotComp = footerSlot ? footerSlot() : null;
4554
-
4555
- var borderHandler = function borderHandler(story) {
4556
- switch (border) {
4557
- case "bottom":
4558
- return /*#__PURE__*/React__default["default"].createElement("div", {
4559
- className: "one-col-story-list-m_one-col-border-bottom__13nPb"
4560
- }, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
4561
- story: story,
4562
- theme: theme,
4563
- headerLevel: "4",
4564
- isHorizontal: true,
4565
- border: border,
4566
- aspectRatio: [[1, 1], [4, 3]],
4567
- borderColor: borderColor,
4568
- prefix: "By",
4569
- config: config
4570
- }));
4571
-
4572
- case "full":
4573
- return /*#__PURE__*/React__default["default"].createElement("div", {
4574
- className: "one-col-story-list-m_one-col-border-full__3PSl0"
4575
- }, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
4576
- story: story,
4577
- border: border,
4578
- theme: theme,
4579
- isHorizontal: true,
4580
- borderColor: borderColor
4581
- }, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
4582
- story: story,
4583
- isHorizontal: true,
4584
- aspectRatio: [[1, 1], [4, 3]]
4585
- }), /*#__PURE__*/React__default["default"].createElement("div", {
4586
- className: "one-col-story-list-m_story-card-content-wrapper__1baqS"
4587
- }, /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
4588
- story: story,
4589
- borderColor: borderColor,
4590
- config: config
4591
- }, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
4592
- story: story
4593
- }), /*#__PURE__*/React__default["default"].createElement(Headline, {
4594
- story: story,
4595
- headerLevel: "4",
4596
- premiumStoryIconConfig: config
4597
- }), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
4598
- story: story
4599
- }), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
4600
- config: localizationConfig,
4601
- story: story,
4602
- prefix: "By"
4603
- })))));
4604
-
4605
- default:
4606
- return /*#__PURE__*/React__default["default"].createElement("div", {
4607
- className: "one-col-story-list-m_one-col-border-default__2BDg7"
4608
- }, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
4609
- story: story,
4610
- theme: theme,
4611
- headerLevel: "4",
4612
- isHorizontal: true,
4613
- border: border,
4614
- aspectRatio: [[1, 1], [4, 3]],
4615
- borderColor: borderColor,
4616
- prefix: "By",
4617
- config: config
4618
- }));
4619
- }
4620
- };
4621
-
4622
- var textColor = getTextColor(theme);
4623
- return /*#__PURE__*/React__default["default"].createElement("div", {
4624
- className: "full-width-with-padding arrow-component",
4625
- "data-test-id": "one-col-story-list",
4626
- style: {
4627
- backgroundColor: theme,
4628
- color: textColor
4629
- }
4630
- }, /*#__PURE__*/React__default["default"].createElement("div", {
4631
- className: "one-col-story-list-m_one-col-story-list-wrapper__ICvTq"
4632
- }, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
4633
- collection: collection,
4634
- collectionNameTemplate: collectionNameTemplate,
4635
- collectionNameBorderColor: collectionNameBorderColor
4636
- }), /*#__PURE__*/React__default["default"].createElement("div", {
4637
- className: "one-col-story-list-m_wrapper__38qTp",
4638
- style: {
4639
- backgroundColor: theme,
4640
- color: textColor
4641
- }
4642
- }, /*#__PURE__*/React__default["default"].createElement("div", {
4643
- className: "one-col-story-list-m_one-col-first-story__1aC6i"
4644
- }, storyItems.slice(0, 1).map(function (story, index) {
4645
- return /*#__PURE__*/React__default["default"].createElement("div", {
4646
- key: "default-".concat(index)
4647
- }, borderHandler(story));
4648
- })), /*#__PURE__*/React__default["default"].createElement("div", {
4649
- className: "one-col-story-list-m_one-col-story-list__3d6Bp"
4650
- }, storyItems.slice(1).map(function (story, index) {
4651
- return /*#__PURE__*/React__default["default"].createElement("div", {
4652
- key: "default-".concat(index)
4653
- }, borderHandler(story));
4654
- })), /*#__PURE__*/React__default["default"].createElement("div", {
4655
- className: "one-col-story-list-m_one-col-ads__UN_hF"
4656
- }, getSlot(type, component, function () {
4657
- return null;
4658
- }, function () {
4659
- return null;
4660
- }))), /*#__PURE__*/React__default["default"].createElement("div", {
4661
- className: "one-col-story-list-m_footer-ad-wrapper__NGgvp"
4662
- }, getLoadMore({
4663
- isLoading: isLoading,
4664
- storyItems: storyItems,
4665
- getMoreStories: getMoreStories,
4666
- subsequentLoadCount: subsequentLoadCount
4667
- }), /*#__PURE__*/React__default["default"].createElement("div", {
4668
- className: "one-col-story-list-m_ad-wrapper__3_cNc"
4669
- }, footerSlotComp))));
4670
- };
4671
- OneColStoryListBase.propTypes = {
4672
- /** collection is the array of objects which is returning by API */
4673
- collection: PropTypes__default["default"].object.isRequired,
4674
-
4675
- /** The config for the Row */
4676
- config: PropTypes__default["default"].shape({
4677
- borderColor: PropTypes__default["default"].string,
4678
- theme: PropTypes__default["default"].string,
4679
- border: PropTypes__default["default"].string,
4680
- footerButton: PropTypes__default["default"].string,
4681
- // row title style
4682
- collectionNameTemplate: PropTypes__default["default"].string,
4683
- // row title style colour
4684
- collectionNameBorderColor: PropTypes__default["default"].string,
4685
- subsequentLoadCount: PropTypes__default["default"].number
4686
- }),
4687
- getMoreStories: PropTypes__default["default"].func,
4688
- isLoadMoreVisible: PropTypes__default["default"].bool,
4689
- isLoading: PropTypes__default["default"].bool,
4690
- isolatedLoadMore: PropTypes__default["default"].bool
4691
- };
4692
- OneColStoryListBase.defaultProps = {
4693
- getMoreStories: function getMoreStories() {},
4694
- isLoadMoreVisible: true,
4695
- isLoading: false
4696
- };
4697
- var OneColStoryList = StateProvider(OneColStoryListBase);
4698
-
4699
- exports.OneColStoryList = OneColStoryList;
4700
- exports.OneColStoryListBase = OneColStoryListBase;