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