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