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