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