@mjhls/mjh-framework 1.0.866-youtube-group-v1 → 1.0.867

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 (293) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +22 -24
  4. package/dist/cjs/AD300x250x600.js +22 -24
  5. package/dist/cjs/AD728x90.js +25 -27
  6. package/dist/cjs/ADFloatingFooter.js +21 -23
  7. package/dist/cjs/ADFooter.js +4 -6
  8. package/dist/cjs/ADGutter.js +21 -23
  9. package/dist/cjs/{ADInfeed-25d48cc2.js → ADInfeed-7d13830e.js} +4 -4
  10. package/dist/cjs/ADSkyscraper.js +21 -23
  11. package/dist/cjs/ADSponsoredResources.js +21 -23
  12. package/dist/cjs/ADWebcast.js +21 -23
  13. package/dist/cjs/ADWelcome.js +18 -20
  14. package/dist/cjs/{ADlgInfeed-a535a768.js → ADlgInfeed-d9dbfadc.js} +4 -4
  15. package/dist/cjs/AccordionPanel.js +6 -8
  16. package/dist/cjs/AdSlot.js +22 -24
  17. package/dist/cjs/AdSlotsProvider.js +11 -13
  18. package/dist/cjs/AlgoliaSearch.js +508 -500
  19. package/dist/cjs/AlphabeticList.js +8 -10
  20. package/dist/cjs/ArticleCarousel.js +13 -15
  21. package/dist/cjs/ArticleProgramLandingPage.js +48 -50
  22. package/dist/cjs/ArticleSeriesLandingPage.js +29 -31
  23. package/dist/cjs/ArticleSeriesListing.js +31 -33
  24. package/dist/cjs/Auth.js +482 -348
  25. package/dist/cjs/AuthWrapper.js +199 -240
  26. package/dist/cjs/{AuthorComponent-ac8972ce.js → AuthorComponent-39b37d84.js} +1 -1
  27. package/dist/cjs/Beam.js +6 -8
  28. package/dist/cjs/{BlockContent-8b494587.js → BlockContent-36e54d77.js} +34 -34
  29. package/dist/cjs/Breadcrumbs.js +6 -8
  30. package/dist/cjs/CMEDeck.js +22 -24
  31. package/dist/cjs/Column2.js +14 -16
  32. package/dist/cjs/Column3.js +31 -33
  33. package/dist/cjs/ConferenceArticleCard.js +25 -22
  34. package/dist/cjs/DeckContent.js +40 -42
  35. package/dist/cjs/DeckQueue.js +30 -31
  36. package/dist/cjs/{Dfp-391fd124.js → Dfp-9be904d5.js} +13 -15
  37. package/dist/cjs/EventsDeck.js +44 -46
  38. package/dist/cjs/ExternalResources.js +45 -47
  39. package/dist/cjs/Feature.js +7 -4
  40. package/dist/cjs/ForbesHero.js +10 -12
  41. package/dist/cjs/GridContent.js +45 -47
  42. package/dist/cjs/GridHero.js +11 -13
  43. package/dist/cjs/GroupDeck.js +12 -14
  44. package/dist/cjs/HamMagazine.js +34 -36
  45. package/dist/cjs/Hero.js +7 -4
  46. package/dist/cjs/HighlightenVideo.js +2 -2
  47. package/dist/cjs/HorizontalArticleListing.js +46 -48
  48. package/dist/cjs/HorizontalHero.js +7 -4
  49. package/dist/cjs/IssueContentDeck.js +11 -13
  50. package/dist/cjs/IssueDeck.js +14 -16
  51. package/dist/cjs/IssueLanding.js +82 -84
  52. package/dist/cjs/KMTracker.js +15 -15
  53. package/dist/cjs/LeftNav.js +20 -22
  54. package/dist/cjs/MasterDeck.js +39 -41
  55. package/dist/cjs/MediaSeriesLanding.js +507 -465
  56. package/dist/cjs/NavDvm.js +11 -13
  57. package/dist/cjs/NavMagazine.js +38 -40
  58. package/dist/cjs/NavNative.js +39 -41
  59. package/dist/cjs/OncliveHero.js +7 -4
  60. package/dist/cjs/OncliveLargeHero.js +11 -13
  61. package/dist/cjs/PageFilter.js +4 -6
  62. package/dist/cjs/PartnerDetailListing.js +64 -2770
  63. package/dist/cjs/PdfDownload.js +1 -1
  64. package/dist/cjs/PopUpModal.js +4 -6
  65. package/dist/cjs/PubSection.js +32 -34
  66. package/dist/cjs/PubToc.js +6 -8
  67. package/dist/cjs/PublicationDeck.js +11 -8
  68. package/dist/cjs/PublicationLanding.js +76 -78
  69. package/dist/cjs/QueueDeckExpanded.js +36 -38
  70. package/dist/cjs/RecentNews.js +3 -3
  71. package/dist/cjs/RelatedContent.js +38 -35
  72. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  73. package/dist/cjs/Search.js +6 -8
  74. package/dist/cjs/Segment.js +4 -6
  75. package/dist/cjs/SeriesListingDeck.js +18 -20
  76. package/dist/cjs/{SeriesSlider-0d3bf265.js → SeriesSlider-ce3261cb.js} +14 -14
  77. package/dist/cjs/SetCookie.js +1 -1
  78. package/dist/cjs/SideFooter.js +15 -17
  79. package/dist/cjs/{SocialSearchComponent-19548e2a.js → SocialSearchComponent-a4ae7b88.js} +10 -10
  80. package/dist/cjs/TaxonomyCard.js +12 -10
  81. package/dist/cjs/TaxonomyDescription.js +44 -46
  82. package/dist/cjs/TemplateNormal.js +45 -47
  83. package/dist/cjs/ThumbnailCard.js +10 -7
  84. package/dist/cjs/Ustream.js +11 -13
  85. package/dist/cjs/VerticalHero.js +6 -3
  86. package/dist/cjs/VideoProgramLandingPage.js +50 -52
  87. package/dist/cjs/VideoSeriesCard.js +14 -14
  88. package/dist/cjs/VideoSeriesFilter.js +7 -9
  89. package/dist/cjs/VideoSeriesLandingPage.js +35 -37
  90. package/dist/cjs/VideoSeriesListing.js +31 -33
  91. package/dist/cjs/View.js +89 -92
  92. package/dist/cjs/YahooHero.js +13 -15
  93. package/dist/cjs/YoutubeGroup.js +25 -46
  94. package/dist/cjs/{_is-array-754e012d.js → _is-array-54228b29.js} +14 -14
  95. package/dist/cjs/{_iter-detect-60b2f026.js → _iter-detect-b1df62f0.js} +9 -10
  96. package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
  97. package/dist/cjs/_object-sap-d1978572.js +16 -0
  98. package/dist/cjs/{_object-to-array-5762f850.js → _object-to-array-ce86cae7.js} +5 -5
  99. package/dist/cjs/{asyncToGenerator-140e5f89.js → asyncToGenerator-77821af0.js} +82 -84
  100. package/dist/cjs/{_to-object-329a650b.js → core.get-iterator-method-5643aa10.js} +256 -20
  101. package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
  102. package/dist/cjs/define-property-e8404b64.js +20 -0
  103. package/dist/cjs/{defineProperty-55548b25.js → defineProperty-9673846a.js} +1 -1
  104. package/dist/cjs/{entities-310b46ee.js → entities-3f9d0f2f.js} +1 -1
  105. package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
  106. package/dist/cjs/{extends-0a918631.js → extends-7c86182f.js} +13 -13
  107. package/dist/cjs/faundadb.js +5 -7
  108. package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
  109. package/dist/cjs/getQuery.js +2 -2
  110. package/dist/cjs/getRelatedArticle.js +133 -71
  111. package/dist/cjs/getRootDocGroup.js +4 -6
  112. package/dist/cjs/getSerializers.js +43 -45
  113. package/dist/cjs/{getTargeting-a9a871f0.js → getTargeting-9d509319.js} +11 -11
  114. package/dist/cjs/getTargeting.js +6 -8
  115. package/dist/cjs/{index-e2e62963.js → index-8041a4eb.js} +11 -1
  116. package/dist/cjs/{index-f83a102a.js → index-ad4e6a69.js} +202 -181
  117. package/dist/cjs/{index-9d365128.js → index-eadd5035.js} +7 -7
  118. package/dist/cjs/{index-b5eb3ff8.js → index-efca863c.js} +16 -11
  119. package/dist/cjs/{index-6367b7bf.js → index-f86bb269.js} +35 -35
  120. package/dist/cjs/{index-2cf30c83.js → index-fc2f1ca2.js} +4 -4
  121. package/dist/cjs/{index.esm-3ffa049c.js → index.esm-8123cf40.js} +1 -1
  122. package/dist/cjs/index.js +139 -140
  123. package/dist/cjs/{inherits-0c7830c5.js → inherits-de66ea16.js} +25 -26
  124. package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
  125. package/dist/cjs/keys-e982b3fa.js +25 -0
  126. package/dist/cjs/{lodash-7fd85bcf.js → lodash-f0783643.js} +58 -10
  127. package/dist/cjs/{main-7b5e57b0.js → main-025fdc78.js} +234 -159
  128. package/dist/cjs/{moment-ca3bd9fb.js → moment-aca40de1.js} +1 -1
  129. package/dist/cjs/{react-social-icons-07939b41.js → react-social-icons-af932527.js} +17 -17
  130. package/dist/cjs/{slicedToArray-8f385299.js → slicedToArray-067dd3bc.js} +17 -19
  131. package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
  132. package/dist/cjs/stringify-f7a37a8d.js +17 -0
  133. package/dist/cjs/timeDifferenceCalc.js +1 -1
  134. package/dist/cjs/{toConsumableArray-9a3476fe.js → toConsumableArray-d7797c2b.js} +12 -14
  135. package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
  136. package/dist/cjs/{typeof-9d7f610f.js → typeof-567e31ff.js} +97 -98
  137. package/dist/cjs/urlFor.js +19 -2
  138. package/dist/cjs/{ustream-api-d092dc31.js → ustream-api-3819e4aa.js} +4 -4
  139. package/dist/cjs/{util-f2c1b65b.js → util-6f784d85.js} +1 -1
  140. package/dist/cjs/{web.dom.iterable-a0e279c1.js → web.dom.iterable-d98303e0.js} +8 -9
  141. package/dist/esm/AD.js +1 -1
  142. package/dist/esm/AD300x250.js +22 -24
  143. package/dist/esm/AD300x250x600.js +22 -24
  144. package/dist/esm/AD728x90.js +25 -27
  145. package/dist/esm/ADFloatingFooter.js +21 -23
  146. package/dist/esm/ADFooter.js +4 -6
  147. package/dist/esm/ADGutter.js +21 -23
  148. package/dist/esm/{ADInfeed-56a3db8b.js → ADInfeed-0cbd7bed.js} +4 -4
  149. package/dist/esm/ADSkyscraper.js +21 -23
  150. package/dist/esm/ADSponsoredResources.js +21 -23
  151. package/dist/esm/ADWebcast.js +21 -23
  152. package/dist/esm/ADWelcome.js +18 -20
  153. package/dist/esm/{ADlgInfeed-53edb995.js → ADlgInfeed-2d1a52d9.js} +4 -4
  154. package/dist/esm/AccordionPanel.js +6 -8
  155. package/dist/esm/AdSlot.js +22 -24
  156. package/dist/esm/AdSlotsProvider.js +11 -13
  157. package/dist/esm/AlgoliaSearch.js +507 -499
  158. package/dist/esm/AlphabeticList.js +8 -10
  159. package/dist/esm/ArticleCarousel.js +13 -15
  160. package/dist/esm/ArticleProgramLandingPage.js +48 -50
  161. package/dist/esm/ArticleSeriesLandingPage.js +29 -31
  162. package/dist/esm/ArticleSeriesListing.js +31 -33
  163. package/dist/esm/Auth.js +482 -348
  164. package/dist/esm/AuthWrapper.js +199 -240
  165. package/dist/esm/{AuthorComponent-8ffd4679.js → AuthorComponent-46a745ba.js} +1 -1
  166. package/dist/esm/Beam.js +6 -8
  167. package/dist/esm/{BlockContent-d05b5b23.js → BlockContent-52cf21c5.js} +34 -34
  168. package/dist/esm/Breadcrumbs.js +5 -7
  169. package/dist/esm/CMEDeck.js +22 -24
  170. package/dist/esm/Column2.js +14 -16
  171. package/dist/esm/Column3.js +31 -33
  172. package/dist/esm/ConferenceArticleCard.js +25 -22
  173. package/dist/esm/DeckContent.js +40 -42
  174. package/dist/esm/DeckQueue.js +30 -31
  175. package/dist/esm/{Dfp-2f9796e1.js → Dfp-4ca12f2e.js} +13 -15
  176. package/dist/esm/EventsDeck.js +41 -43
  177. package/dist/esm/ExternalResources.js +45 -47
  178. package/dist/esm/Feature.js +7 -4
  179. package/dist/esm/ForbesHero.js +10 -12
  180. package/dist/esm/GridContent.js +45 -47
  181. package/dist/esm/GridHero.js +11 -13
  182. package/dist/esm/GroupDeck.js +12 -14
  183. package/dist/esm/HamMagazine.js +34 -36
  184. package/dist/esm/Hero.js +7 -4
  185. package/dist/esm/HighlightenVideo.js +2 -2
  186. package/dist/esm/HorizontalArticleListing.js +46 -48
  187. package/dist/esm/HorizontalHero.js +7 -4
  188. package/dist/esm/IssueContentDeck.js +11 -13
  189. package/dist/esm/IssueDeck.js +13 -15
  190. package/dist/esm/IssueLanding.js +82 -84
  191. package/dist/esm/KMTracker.js +15 -15
  192. package/dist/esm/LeftNav.js +20 -22
  193. package/dist/esm/MasterDeck.js +39 -41
  194. package/dist/esm/MediaSeriesLanding.js +507 -465
  195. package/dist/esm/NavDvm.js +11 -13
  196. package/dist/esm/NavMagazine.js +38 -40
  197. package/dist/esm/NavNative.js +37 -39
  198. package/dist/esm/OncliveHero.js +7 -4
  199. package/dist/esm/OncliveLargeHero.js +11 -13
  200. package/dist/esm/PageFilter.js +4 -6
  201. package/dist/esm/PartnerDetailListing.js +62 -2767
  202. package/dist/esm/PdfDownload.js +1 -1
  203. package/dist/esm/PopUpModal.js +4 -6
  204. package/dist/esm/PubSection.js +32 -34
  205. package/dist/esm/PubToc.js +6 -8
  206. package/dist/esm/PublicationDeck.js +10 -7
  207. package/dist/esm/PublicationLanding.js +52 -54
  208. package/dist/esm/QueueDeckExpanded.js +36 -38
  209. package/dist/esm/RecentNews.js +3 -3
  210. package/dist/esm/RelatedContent.js +38 -35
  211. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  212. package/dist/esm/Search.js +5 -7
  213. package/dist/esm/Segment.js +4 -6
  214. package/dist/esm/SeriesListingDeck.js +18 -20
  215. package/dist/esm/{SeriesSlider-7d89f4d9.js → SeriesSlider-485f514e.js} +14 -14
  216. package/dist/esm/SetCookie.js +1 -1
  217. package/dist/esm/SideFooter.js +15 -17
  218. package/dist/esm/{SocialSearchComponent-47815365.js → SocialSearchComponent-41b6b480.js} +9 -9
  219. package/dist/esm/TaxonomyCard.js +12 -10
  220. package/dist/esm/TaxonomyDescription.js +44 -46
  221. package/dist/esm/TemplateNormal.js +45 -47
  222. package/dist/esm/ThumbnailCard.js +10 -7
  223. package/dist/esm/Ustream.js +11 -13
  224. package/dist/esm/VerticalHero.js +6 -3
  225. package/dist/esm/VideoProgramLandingPage.js +49 -51
  226. package/dist/esm/VideoSeriesCard.js +14 -14
  227. package/dist/esm/VideoSeriesFilter.js +7 -9
  228. package/dist/esm/VideoSeriesLandingPage.js +35 -37
  229. package/dist/esm/VideoSeriesListing.js +31 -33
  230. package/dist/esm/View.js +88 -91
  231. package/dist/esm/YahooHero.js +13 -15
  232. package/dist/esm/YoutubeGroup.js +25 -46
  233. package/dist/esm/{_is-array-58e95429.js → _is-array-893ab020.js} +6 -6
  234. package/dist/esm/{_iter-detect-5d49a330.js → _iter-detect-f089461c.js} +7 -8
  235. package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
  236. package/dist/esm/{_object-sap-964b6feb.js → _object-sap-169d6272.js} +1 -1
  237. package/dist/esm/{_object-to-array-7e804fce.js → _object-to-array-50a6b9a3.js} +2 -2
  238. package/dist/esm/{asyncToGenerator-fc1c2e29.js → asyncToGenerator-b4dfe691.js} +30 -32
  239. package/dist/esm/{_to-object-a4107da3.js → core.get-iterator-method-e903ff31.js} +247 -18
  240. package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
  241. package/dist/esm/define-property-99e66838.js +18 -0
  242. package/dist/esm/{defineProperty-94fd8bfc.js → defineProperty-8fa0bc8d.js} +1 -1
  243. package/dist/esm/{entities-7cc3bf45.js → entities-932b50cf.js} +1 -1
  244. package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
  245. package/dist/esm/{extends-6f2fcc99.js → extends-dc6a71fd.js} +7 -7
  246. package/dist/esm/faundadb.js +5 -7
  247. package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
  248. package/dist/esm/getQuery.js +2 -2
  249. package/dist/esm/getRelatedArticle.js +133 -71
  250. package/dist/esm/getRootDocGroup.js +4 -6
  251. package/dist/esm/getSerializers.js +43 -45
  252. package/dist/esm/{getTargeting-bd800589.js → getTargeting-ff2c9409.js} +11 -11
  253. package/dist/esm/getTargeting.js +6 -8
  254. package/dist/esm/{index-51a80699.js → index-0dbff1d1.js} +16 -11
  255. package/dist/esm/{index-f7fb1e25.js → index-2446af28.js} +4 -4
  256. package/dist/esm/{index-6c12bdd5.js → index-35bdcc81.js} +6 -6
  257. package/dist/esm/{index-82fea143.js → index-61397130.js} +198 -177
  258. package/dist/esm/{index-aaa2dae0.js → index-67e1773f.js} +11 -2
  259. package/dist/esm/{index-c00b0bbb.js → index-79cfd25c.js} +35 -35
  260. package/dist/esm/{index.esm-8ee5ff72.js → index.esm-8016b507.js} +1 -1
  261. package/dist/esm/index.js +120 -121
  262. package/dist/esm/{inherits-75d45541.js → inherits-8a801a18.js} +18 -19
  263. package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
  264. package/dist/esm/keys-425c8ab0.js +23 -0
  265. package/dist/esm/{lodash-ec8c6b48.js → lodash-f97fd99a.js} +58 -10
  266. package/dist/esm/{main-747e7d25.js → main-b5c5aac1.js} +228 -153
  267. package/dist/esm/{moment-b6f49411.js → moment-bc12cb97.js} +1 -1
  268. package/dist/esm/{react-social-icons-3822f1ce.js → react-social-icons-91f9716f.js} +16 -16
  269. package/dist/esm/{slicedToArray-641f241f.js → slicedToArray-ca2c8b8d.js} +12 -14
  270. package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
  271. package/dist/esm/stringify-c21932b3.js +15 -0
  272. package/dist/esm/timeDifferenceCalc.js +1 -1
  273. package/dist/esm/{toConsumableArray-43aa614d.js → toConsumableArray-7b1c0e23.js} +7 -9
  274. package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
  275. package/dist/esm/{typeof-af9c50d8.js → typeof-83d9eb10.js} +34 -35
  276. package/dist/esm/urlFor.js +19 -2
  277. package/dist/esm/{ustream-api-9a50644d.js → ustream-api-41166338.js} +4 -4
  278. package/dist/esm/{util-7700fc59.js → util-3ab476bf.js} +1 -1
  279. package/dist/esm/{web.dom.iterable-4439f05a.js → web.dom.iterable-fdf034f5.js} +2 -3
  280. package/package.json +111 -111
  281. package/dist/cjs/_object-sap-5e74ba08.js +0 -16
  282. package/dist/cjs/core.get-iterator-method-f62321d4.js +0 -39
  283. package/dist/cjs/define-property-f4d12f4e.js +0 -20
  284. package/dist/cjs/es6.string.iterator-cc0bbaa4.js +0 -210
  285. package/dist/cjs/keys-a586b7a0.js +0 -25
  286. package/dist/cjs/stringify-7c5aff47.js +0 -17
  287. package/dist/esm/core.get-iterator-method-e1de7503.js +0 -36
  288. package/dist/esm/define-property-8af5f002.js +0 -18
  289. package/dist/esm/es6.string.iterator-c990c18c.js +0 -201
  290. package/dist/esm/keys-8eda7a5c.js +0 -23
  291. package/dist/esm/stringify-4330ccdc.js +0 -15
  292. package/dist/cjs/{brightcove-react-player-loader.es-5c98aec7.js → brightcove-react-player-loader.es-a195642e.js} +1 -1
  293. package/dist/esm/{brightcove-react-player-loader.es-4abff0b1.js → brightcove-react-player-loader.es-b43c695a.js} +1 -1
@@ -1,2781 +1,76 @@
1
- import { c as createCommonjsModule, a as commonjsGlobal, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
2
- import './_to-object-a4107da3.js';
3
- import './es6.string.iterator-c990c18c.js';
1
+ import { a as _asyncToGenerator, r as regenerator, _ as _Promise } from './asyncToGenerator-b4dfe691.js';
2
+ import { _ as _slicedToArray } from './slicedToArray-ca2c8b8d.js';
3
+ import { _ as _extends } from './extends-dc6a71fd.js';
4
+ import React, { useRef, useState, useEffect } from 'react';
5
+ import { TwitterTimelineEmbed } from 'react-twitter-embed';
6
+ import { FacebookProvider, Page } from 'react-facebook';
7
+ import { r as reactSocialIcons_1 } from './react-social-icons-91f9716f.js';
8
+ import { s as smoothscroll } from './smoothscroll-fa4e3f8c.js';
9
+ import urlFor from './urlFor.js';
10
+ import { m as moment } from './moment-bc12cb97.js';
11
+ import QueueDeckExpanded from './QueueDeckExpanded.js';
12
+ import Breadcrumbs from './Breadcrumbs.js';
13
+ import Feature from './Feature.js';
14
+ import { g as getSerializers } from './index-61397130.js';
15
+ import { B as BlockContent } from './BlockContent-52cf21c5.js';
16
+ import './_commonjsHelpers-0c4b6f40.js';
17
+ import './core.get-iterator-method-e903ff31.js';
18
+ import './web.dom.iterable-fdf034f5.js';
4
19
  import './_library-528f1934.js';
5
- import './_iter-detect-5d49a330.js';
6
- import './toConsumableArray-43aa614d.js';
7
- import './core.get-iterator-method-e1de7503.js';
8
- import './_object-pie-33c40e79.js';
9
- import { _ as _extends } from './extends-6f2fcc99.js';
10
- import './_object-sap-964b6feb.js';
11
- import './inherits-75d45541.js';
12
- import './define-property-8af5f002.js';
13
- import './web.dom.iterable-4439f05a.js';
14
- import './typeof-af9c50d8.js';
15
- import './_is-array-58e95429.js';
16
- import React, { createContext, Component, forwardRef, PureComponent, useRef, useState, useEffect } from 'react';
17
- import './events-6c3a7a63.js';
18
- import './index-f7fb1e25.js';
19
- import PropTypes from 'prop-types';
20
- import 'react-bootstrap/Row';
21
- import 'react-bootstrap/Col';
22
- import 'react-bootstrap/Card';
23
- import { m as moment } from './moment-b6f49411.js';
24
- import 'next/router';
25
- import './isSymbol-1981418f.js';
26
- import './debounce-9207d8ee.js';
27
- import './toNumber-2f7a84cd.js';
20
+ import './_iter-detect-f089461c.js';
21
+ import './_object-pie-133f504a.js';
22
+ import 'prop-types';
23
+ import './index-0dbff1d1.js';
24
+ import './toConsumableArray-7b1c0e23.js';
25
+ import 'react-bootstrap';
28
26
  import './index.es-c6222053.js';
29
- import 'react-dom';
30
27
  import './visibility-sensor-f40c2564.js';
31
- import './index-51a80699.js';
32
- import urlFor from './urlFor.js';
33
- import './index-6c12bdd5.js';
34
- import './main-747e7d25.js';
35
- import './entities-7cc3bf45.js';
36
- import { _ as _slicedToArray } from './slicedToArray-641f241f.js';
37
- import './stringify-4330ccdc.js';
38
- import { a as _asyncToGenerator$1, r as regenerator, _ as _Promise } from './asyncToGenerator-fc1c2e29.js';
39
- import './Segment.js';
40
- import './Beam.js';
28
+ import 'react-dom';
29
+ import './index-2446af28.js';
30
+ import './events-6c3a7a63.js';
31
+ import 'next/router';
32
+ import './index-35bdcc81.js';
33
+ import './main-b5c5aac1.js';
34
+ import './entities-932b50cf.js';
35
+ import './ADInfeed-0cbd7bed.js';
36
+ import 'react-bootstrap/Card';
41
37
  import './AdSlot.js';
42
- import './ADInfeed-56a3db8b.js';
43
- import './lodash-ec8c6b48.js';
44
- import './ADlgInfeed-53edb995.js';
38
+ import './debounce-533d9748.js';
39
+ import './isSymbol-a7e9aafe.js';
40
+ import './toNumber-5aeba6e7.js';
41
+ import './Beam.js';
42
+ import './stringify-c21932b3.js';
43
+ import './Segment.js';
44
+ import './AuthorComponent-46a745ba.js';
45
+ import './lodash-f97fd99a.js';
46
+ import './ADlgInfeed-2d1a52d9.js';
45
47
  import './getContentCategory-15dcc413.js';
46
- import './AuthorComponent-8ffd4679.js';
47
- import 'react-bootstrap/Button';
48
- import { B as BlockContent } from './BlockContent-d05b5b23.js';
49
- import { r as reactSocialIcons_1 } from './react-social-icons-3822f1ce.js';
48
+ import './timeDifferenceCalc.js';
49
+ import 'react-bootstrap/Breadcrumb';
50
+ import 'react-bootstrap/Carousel';
50
51
  import './index-c7e2ac95.js';
51
- import { s as smoothscroll } from './smoothscroll-0cd4c7a6.js';
52
+ import './util-3ab476bf.js';
53
+ import './typeof-83d9eb10.js';
54
+ import './_is-array-893ab020.js';
55
+ import './brightcove-react-player-loader.es-b43c695a.js';
52
56
  import './GroupDeck.js';
53
- import 'react-bootstrap';
54
- import './timeDifferenceCalc.js';
55
- import QueueDeckExpanded from './QueueDeckExpanded.js';
56
- import './iconBase-602d52fe.js';
57
- import './index.esm-3fdda599.js';
58
- import { g as getSerializers } from './index-82fea143.js';
59
- import './util-7700fc59.js';
60
- import './brightcove-react-player-loader.es-4abff0b1.js';
57
+ import './SocialShare.js';
61
58
  import 'next/head';
62
59
  import 'react-share';
63
- import './SocialShare.js';
64
- import './_object-to-array-7e804fce.js';
60
+ import './_object-to-array-50a6b9a3.js';
65
61
  import 'react-bootstrap/Pagination';
62
+ import 'react-bootstrap/Button';
63
+ import 'react-bootstrap/Row';
64
+ import 'react-bootstrap/Col';
65
+ import './inherits-8a801a18.js';
66
+ import './_object-sap-169d6272.js';
67
+ import './define-property-99e66838.js';
68
+ import './index.esm-3fdda599.js';
69
+ import './iconBase-602d52fe.js';
66
70
  import 'react-bootstrap/Figure';
67
71
  import 'react-bootstrap/OverlayTrigger';
68
72
  import 'react-bootstrap/Tooltip';
69
73
  import 'react-bootstrap/Popover';
70
- import 'react-bootstrap/Carousel';
71
- import Feature from './Feature.js';
72
- import 'react-bootstrap/Breadcrumb';
73
- import Breadcrumbs from './Breadcrumbs.js';
74
- import { TwitterTimelineEmbed } from 'react-twitter-embed';
75
-
76
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
77
- try {
78
- var info = gen[key](arg);
79
- var value = info.value;
80
- } catch (error) {
81
- reject(error);
82
- return;
83
- }
84
-
85
- if (info.done) {
86
- resolve(value);
87
- } else {
88
- Promise.resolve(value).then(_next, _throw);
89
- }
90
- }
91
-
92
- function _asyncToGenerator(fn) {
93
- return function () {
94
- var self = this,
95
- args = arguments;
96
- return new Promise(function (resolve, reject) {
97
- var gen = fn.apply(self, args);
98
-
99
- function _next(value) {
100
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
101
- }
102
-
103
- function _throw(err) {
104
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
105
- }
106
-
107
- _next(undefined);
108
- });
109
- };
110
- }
111
-
112
- var asyncToGenerator = _asyncToGenerator;
113
-
114
- function _defineProperty(obj, key, value) {
115
- if (key in obj) {
116
- Object.defineProperty(obj, key, {
117
- value: value,
118
- enumerable: true,
119
- configurable: true,
120
- writable: true
121
- });
122
- } else {
123
- obj[key] = value;
124
- }
125
-
126
- return obj;
127
- }
128
-
129
- var defineProperty = _defineProperty;
130
-
131
- var canUseDOM = !!(
132
- typeof window !== 'undefined' &&
133
- window.document &&
134
- window.document.createElement
135
- );
136
-
137
- var canUseDom = canUseDOM;
138
-
139
- function _objectWithoutPropertiesLoose(source, excluded) {
140
- if (source == null) return {};
141
- var target = {};
142
- var sourceKeys = Object.keys(source);
143
- var key, i;
144
-
145
- for (i = 0; i < sourceKeys.length; i++) {
146
- key = sourceKeys[i];
147
- if (excluded.indexOf(key) >= 0) continue;
148
- target[key] = source[key];
149
- }
150
-
151
- return target;
152
- }
153
-
154
- var objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose;
155
-
156
- function _objectWithoutProperties(source, excluded) {
157
- if (source == null) return {};
158
- var target = objectWithoutPropertiesLoose(source, excluded);
159
- var key, i;
160
-
161
- if (Object.getOwnPropertySymbols) {
162
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
163
-
164
- for (i = 0; i < sourceSymbolKeys.length; i++) {
165
- key = sourceSymbolKeys[i];
166
- if (excluded.indexOf(key) >= 0) continue;
167
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
168
- target[key] = source[key];
169
- }
170
- }
171
-
172
- return target;
173
- }
174
-
175
- var objectWithoutProperties = _objectWithoutProperties;
176
-
177
- var LoginStatus = {
178
- CONNECTED: 'connected',
179
- AUTHORIZATION_EXPIRED: 'authorization_expired',
180
- NOT_AUTHORIZED: 'not_authorized',
181
- UNKNOWN: 'unknown'
182
- };
183
-
184
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
185
-
186
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
187
- const Method = {
188
- GET: 'get',
189
- POST: 'post',
190
- DELETE: 'delete'
191
- };
192
- class Facebook {
193
- constructor(options = {}) {
194
- this.options = _objectSpread({
195
- domain: 'connect.facebook.net',
196
- version: 'v3.2',
197
- cookie: false,
198
- status: false,
199
- xfbml: false,
200
- language: 'en_US',
201
- frictionlessRequests: false,
202
- debug: false,
203
- chatSupport: false
204
- }, options);
205
-
206
- if (!this.options.appId) {
207
- throw new Error('You need to set appId');
208
- }
209
-
210
- if (!this.options.wait) {
211
- this.init();
212
- }
213
- }
214
-
215
- getAppId() {
216
- return this.options.appId;
217
- }
218
-
219
- init() {
220
- var _this = this;
221
-
222
- return asyncToGenerator(function* () {
223
- if (_this.loadingPromise) {
224
- return _this.loadingPromise;
225
- }
226
-
227
- _this.loadingPromise = new Promise(resolve => {
228
- const _this$options = _this.options,
229
- {
230
- domain,
231
- language,
232
- debug,
233
- chatSupport
234
- } = _this$options,
235
- restOptions = objectWithoutProperties(_this$options, ["domain", "language", "debug", "chatSupport"]);
236
-
237
- window.fbAsyncInit = () => {
238
- window.FB.init({
239
- appId: restOptions.appId,
240
- version: restOptions.version,
241
- cookie: restOptions.cookie,
242
- status: restOptions.status,
243
- xfbml: restOptions.xfbml,
244
- frictionlessRequests: _this.frictionlessRequests
245
- });
246
- resolve(window.FB);
247
- };
248
-
249
- if (window.document.getElementById('facebook-jssdk')) {
250
- return resolve(window.FB);
251
- }
252
-
253
- const js = window.document.createElement('script');
254
- js.id = 'facebook-jssdk';
255
- js.async = true;
256
- js.defer = true;
257
- js.src = `https://${domain}/${language}/sdk${chatSupport ? '/xfbml.customerchat' : ''}${debug ? '/debug' : ''}.js`;
258
- window.document.body.appendChild(js);
259
- });
260
- return _this.loadingPromise;
261
- })();
262
- }
263
-
264
- process(method, before = [], after = []) {
265
- var _this2 = this;
266
-
267
- return asyncToGenerator(function* () {
268
- const fb = yield _this2.init();
269
- return new Promise((resolve, reject) => {
270
- fb[method](...before, response => {
271
- if (!response) {
272
- if (method === 'ui') return;
273
- reject(new Error('Response is undefined'));
274
- } else if (response.error) {
275
- const {
276
- code,
277
- type,
278
- message
279
- } = response.error;
280
- const error = new Error(message);
281
- error.code = code;
282
- error.type = type;
283
- reject(error);
284
- } else {
285
- resolve(response);
286
- }
287
- }, ...after);
288
- });
289
- })();
290
- }
291
-
292
- ui(options) {
293
- var _this3 = this;
294
-
295
- return asyncToGenerator(function* () {
296
- return _this3.process('ui', [options]);
297
- })();
298
- }
299
-
300
- api(path, method = Method.GET, params = {}) {
301
- var _this4 = this;
302
-
303
- return asyncToGenerator(function* () {
304
- return _this4.process('api', [path, method, params]);
305
- })();
306
- }
307
-
308
- login(opts = null) {
309
- var _this5 = this;
310
-
311
- return asyncToGenerator(function* () {
312
- return _this5.process('login', [], [opts]);
313
- })();
314
- }
315
-
316
- logout() {
317
- var _this6 = this;
318
-
319
- return asyncToGenerator(function* () {
320
- return _this6.process('logout');
321
- })();
322
- }
323
-
324
- getLoginStatus() {
325
- var _this7 = this;
326
-
327
- return asyncToGenerator(function* () {
328
- return _this7.process('getLoginStatus');
329
- })();
330
- }
331
-
332
- getAuthResponse() {
333
- var _this8 = this;
334
-
335
- return asyncToGenerator(function* () {
336
- return _this8.process('getAuthResponse');
337
- })();
338
- }
339
-
340
- getTokenDetail(loginResponse) {
341
- var _this9 = this;
342
-
343
- return asyncToGenerator(function* () {
344
- if (loginResponse.status === LoginStatus.CONNECTED && loginResponse.authResponse) {
345
- return loginResponse.authResponse;
346
- }
347
-
348
- const response = yield _this9.getLoginStatus();
349
-
350
- if (response.status === LoginStatus.CONNECTED && response.authResponse) {
351
- return response.authResponse;
352
- }
353
-
354
- throw new Error('Token is undefined');
355
- })();
356
- }
357
-
358
- getProfile(params) {
359
- var _this10 = this;
360
-
361
- return asyncToGenerator(function* () {
362
- return _this10.api('/me', Method.GET, params);
363
- })();
364
- }
365
-
366
- getTokenDetailWithProfile(params, response) {
367
- var _this11 = this;
368
-
369
- return asyncToGenerator(function* () {
370
- const tokenDetail = yield _this11.getTokenDetail(response);
371
- const profile = yield _this11.getProfile(params);
372
- return {
373
- profile,
374
- tokenDetail
375
- };
376
- })();
377
- }
378
-
379
- getToken() {
380
- var _this12 = this;
381
-
382
- return asyncToGenerator(function* () {
383
- const authResponse = yield _this12.getTokenDetail();
384
- return authResponse.accessToken;
385
- })();
386
- }
387
-
388
- getUserId() {
389
- var _this13 = this;
390
-
391
- return asyncToGenerator(function* () {
392
- const authResponse = yield _this13.getTokenDetail();
393
- return authResponse.userID;
394
- })();
395
- }
396
-
397
- sendInvite(to, options) {
398
- var _this14 = this;
399
-
400
- return asyncToGenerator(function* () {
401
- return _this14.ui(_objectSpread({
402
- to,
403
- method: 'apprequests'
404
- }, options));
405
- })();
406
- }
407
-
408
- postAction(ogNamespace, ogAction, ogObject, ogObjectUrl, noFeedStory) {
409
- var _this15 = this;
410
-
411
- return asyncToGenerator(function* () {
412
- let url = `/me/${ogNamespace}:${ogAction}?${ogObject}=${encodeURIComponent(ogObjectUrl)}`;
413
-
414
- if (noFeedStory === true) {
415
- url += '&no_feed_story=true';
416
- }
417
-
418
- return _this15.api(url, Method.POST);
419
- })();
420
- }
421
-
422
- getPermissions() {
423
- var _this16 = this;
424
-
425
- return asyncToGenerator(function* () {
426
- const response = yield _this16.api('/me/permissions');
427
- return response.data;
428
- })();
429
- }
430
-
431
- hasPermissions(permissions) {
432
- var _this17 = this;
433
-
434
- return asyncToGenerator(function* () {
435
- const usersPermissions = yield _this17.getPermissions();
436
- const findedPermissions = permissions.filter(p => {
437
- const currentPermission = usersPermissions.find(row => {
438
- const {
439
- permission,
440
- status
441
- } = row;
442
- return status === 'granted' && permission === p;
443
- });
444
- return !!currentPermission;
445
- });
446
- return findedPermissions.length === permissions.length;
447
- })();
448
- }
449
-
450
- subscribe(eventName, callback) {
451
- var _this18 = this;
452
-
453
- return asyncToGenerator(function* () {
454
- const fb = yield _this18.init();
455
- fb.Event.subscribe(eventName, callback);
456
- })();
457
- }
458
-
459
- unsubscribe(eventName, callback) {
460
- var _this19 = this;
461
-
462
- return asyncToGenerator(function* () {
463
- const fb = yield _this19.init();
464
- fb.Event.unsubscribe(eventName, callback);
465
- })();
466
- }
467
-
468
- parse(parentNode) {
469
- var _this20 = this;
470
-
471
- return asyncToGenerator(function* () {
472
- const fb = yield _this20.init();
473
-
474
- if (typeof parentNode === 'undefined') {
475
- fb.XFBML.parse();
476
- } else {
477
- fb.XFBML.parse(parentNode);
478
- }
479
- })();
480
- }
481
-
482
- getRequests() {
483
- var _this21 = this;
484
-
485
- return asyncToGenerator(function* () {
486
- return _this21.api('/me/apprequests');
487
- })();
488
- }
489
-
490
- removeRequest(requestID) {
491
- var _this22 = this;
492
-
493
- return asyncToGenerator(function* () {
494
- return _this22.api(requestID, Method.DELETE);
495
- })();
496
- }
497
-
498
- setAutoGrow() {
499
- var _this23 = this;
500
-
501
- return asyncToGenerator(function* () {
502
- const fb = yield _this23.init();
503
- fb.Canvas.setAutoGrow();
504
- })();
505
- }
506
-
507
- paySimple(product, quantity = 1) {
508
- var _this24 = this;
509
-
510
- return asyncToGenerator(function* () {
511
- return _this24.ui({
512
- method: 'pay',
513
- action: 'purchaseitem',
514
- product,
515
- quantity
516
- });
517
- })();
518
- }
519
-
520
- pay(product, options) {
521
- var _this25 = this;
522
-
523
- return asyncToGenerator(function* () {
524
- return _this25.ui(_objectSpread({
525
- method: 'pay',
526
- action: 'purchaseitem',
527
- product
528
- }, options));
529
- })();
530
- }
531
-
532
- }
533
- /*
534
- sendToFriends: function(options, callback) {
535
- if(!options) {
536
- options = {};
537
- }
538
-
539
- options.method = 'send';
540
-
541
- this.afterLoad(function(err, fbApi) {
542
- if(err) {
543
- return callback(err);
544
- }
545
-
546
- FB.ui(options, function(response) {
547
- fbApi._callCallbackByResponse(callback, response);
548
- });
549
- });
550
- },
551
-
552
- sendMessage: function(message, name, caption, description, url, imgUrl, callback) {
553
- this.afterLoad(function(err, fbApi) {
554
- if(err) {
555
- return callback(err);
556
- }
557
-
558
- FB.ui({
559
- method: 'stream.publish',
560
- message: message,
561
- attachment: {
562
- name: name,
563
- caption: caption,
564
- description: description,
565
- href: url,
566
- media:[{
567
- type: 'image',
568
- src: imgUrl,
569
- href: url
570
- }]
571
- },
572
- action_links: [{
573
- text: 'Code',
574
- href: url
575
- }],
576
- user_prompt_message: message
577
- },
578
- function(response) {
579
- fbApi._callCallbackByResponse(callback, response);
580
- });
581
- });
582
- },
583
-
584
- sendInviteForm: function(options, callback) {
585
- if(typeof options === 'function') {
586
- callback = options;
587
- options = {};
588
- }
589
-
590
- this.afterLoad(function(err, fbApi) {
591
- if(err) {
592
- return callback(err);
593
- }
594
-
595
- options.method = options.method || 'apprequests';
596
-
597
-
598
- FB.ui(options, function(response) {
599
- fbApi._callCallbackByResponse(callback, response);
600
- });
601
- });
602
- },
603
-
604
- checkPageLike: function(pageID, callback) {
605
- this.afterLoad(function(err, fbApi) {
606
- if(err) {
607
- return callback(err);
608
- }
609
-
610
- fbApi.getUserID(function(err, userID) {
611
- if(err) {
612
- return callback(err);
613
- }
614
-
615
- var fqlQuery = `SELECT uid FROM page_fan WHERE page_id = ${pageID} and uid = ${userID}`;
616
- var query = FB.Data.query(fqlQuery);
617
-
618
- query.wait(function(rows) {
619
- if (rows.length === 1 && rows[0].uid === userID) {
620
- callback(null, true, query);
621
- }
622
- else {
623
- callback(null, false, query);
624
- }
625
- });
626
- });
627
- });
628
- },
629
-
630
- sendMessageToFriend: function (friendID, link, callback) {
631
- this.afterLoad(function(err, fbApi) {
632
- if(err) {
633
- return callback(err);
634
- }
635
-
636
- FB.ui({
637
- to: friendID,
638
- method: 'send',
639
- link: link
640
- }, function(response) {
641
- fbApi._callCallbackByResponse(callback, response);
642
- });
643
- });
644
- },
645
-
646
- _prepareUsers: function(data) {
647
- var users=[];
648
-
649
- for(var index in data) {
650
- var userData=data[index];
651
-
652
- var user = {
653
- provider_uid: 'facebook'+'_'+userData.uid,
654
- provider: 'facebook',
655
- id: userData.uid,
656
- name: userData.name,
657
- first_name: userData.first_name,
658
- last_name: userData.last_name,
659
- status: (userData.status!==null) ? userData.status : null,
660
- image: '//graph.facebook.com/'+userData.uid+'/picture?'
661
- };
662
-
663
- users.push(user);
664
- }
665
-
666
- return users;
667
- },
668
-
669
- getUserList: function(callback) {
670
- this.afterLoad(function(err, fbApi) {
671
- if(err) {
672
- return callback(err);
673
- }
674
-
675
- FB.api('fql', {
676
- q: `
677
- SELECT uid, name, first_name, last_name, online_presence, status
678
- FROM user
679
- WHERE uid IN
680
- ( SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY name
681
- `,
682
- }, function (response)
683
- {
684
- var users = fbApi._prepareUsers(response.data);
685
- callback(null, users, response);
686
- });
687
- });
688
- },
689
-
690
- postFeed: function(options, callback) {
691
- this.afterLoad(function(err, fbApi) {
692
- if(err) {
693
- return callback(err);
694
- }
695
-
696
- options.method='feed';
697
-
698
- FB.ui(options, function(response) {
699
- fbApi._callCallbackByResponse(callback, response);
700
- });
701
- });
702
- },
703
-
704
- //need publish_stream
705
- createAlbum: function(name, description, callback) {
706
- this.afterLoad(function(err, fbApi) {
707
- if(err) {
708
- return callback(err);
709
- }
710
-
711
- FB.api('/me/albums', 'post', {
712
- name: name,
713
- description: description
714
- },function(response) {
715
- fbApi._callCallbackByResponse(callback, response);
716
- });
717
- });
718
- },
719
-
720
- //need publish_stream
721
- addImageToAlbum: function(albumID, imageURL, message, callback) {
722
- this.afterLoad(function(err, fbApi) {
723
- if(err) {
724
- return callback(err);
725
- }
726
-
727
- FB.api('/'+albumID+'/photos', 'post', {
728
- message: message,
729
- url: imageURL
730
- }, function(response) {
731
- fbApi._callCallbackByResponse(callback, response);
732
- });
733
- });
734
- },
735
-
736
- //'user_photos'
737
- getAlbums: function(callback) {
738
- this.afterLoad(function(err, fbApi) {
739
- if(err) {
740
- return callback(err);
741
- }
742
-
743
- FB.api('/me/albums', function(response) {
744
- fbApi._callCallbackByResponse(callback, response);
745
- });
746
- });
747
- },
748
-
749
- //'user_photos'
750
- getAlbumPhotos: function(albumID, callback) {
751
- this.afterLoad(function(err, fbApi) {
752
- if(err) {
753
- return callback(err);
754
- }
755
-
756
- FB.api('/'+albumID+'/photos', function(response) {
757
- fbApi._callCallbackByResponse(callback, response);
758
- });
759
- });
760
- },
761
-
762
- //'user_photos'
763
- getAlbumCoverPicture: function(albumID, callback) {
764
- this.afterLoad(function(err, fbApi) {
765
- if(err) {
766
- return callback(err);
767
- }
768
-
769
- FB.api('/'+albumID+'/picture', function(response) {
770
- fbApi._callCallbackByResponse(callback, response);
771
- });
772
- });
773
- },
774
-
775
- //'publish_stream'
776
- postPhoto: function(photoUrl, message, callback) {
777
- this.afterLoad(function(err, fbApi) {
778
- if(err) {
779
- return callback(err);
780
- }
781
-
782
- FB.api('/me/photos', 'post', {
783
- message: message,
784
- url: photoUrl
785
- },function(response) {
786
- fbApi._callCallbackByResponse(callback, response);
787
- });
788
- });
789
- },
790
-
791
- getPageInfo: function(callback) {
792
- this.afterLoad(function(err, fbApi) {
793
- if(err) {
794
- return callback(err);
795
- }
796
-
797
- FB.Canvas.getPageInfo(function(response) {
798
- fbApi._callCallbackByResponse(callback, response);
799
- });
800
- });
801
- }
802
- */
803
-
804
- var FacebookContext = createContext();
805
-
806
- let api = null;
807
- class Facebook$1 extends Component {
808
- constructor(...args) {
809
- var _this;
810
-
811
- super(...args);
812
- _this = this;
813
-
814
- defineProperty(this, "state", {
815
- isReady: false
816
- });
817
-
818
- defineProperty(this, "handleInit",
819
- /*#__PURE__*/
820
- asyncToGenerator(function* () {
821
- // do not run if SSR
822
- if (!canUseDom) {
823
- throw new Error('You can not use Facebook without DOM');
824
- }
825
-
826
- const {
827
- isReady
828
- } = _this.state;
829
-
830
- if (isReady) {
831
- return api;
832
- }
833
-
834
- if (!api) {
835
- const {
836
- domain,
837
- version,
838
- appId,
839
- cookie,
840
- status,
841
- xfbml,
842
- language,
843
- frictionlessRequests,
844
- wait,
845
- debug,
846
- chatSupport
847
- } = _this.props;
848
- api = new Facebook({
849
- domain,
850
- appId,
851
- version,
852
- cookie,
853
- status,
854
- xfbml,
855
- language,
856
- frictionlessRequests,
857
- wait,
858
- debug,
859
- chatSupport
860
- });
861
- }
862
-
863
- yield api.init();
864
-
865
- if (!_this.state.isReady) {
866
- _this.setState({
867
- isReady: true
868
- });
869
- }
870
-
871
- return api;
872
- }));
873
- }
874
-
875
- componentDidMount() {
876
- const {
877
- wait
878
- } = this.props;
879
-
880
- if (!wait) {
881
- this.handleInit();
882
- }
883
- }
884
-
885
- render() {
886
- const {
887
- children
888
- } = this.props;
889
- const {
890
- isReady,
891
- error
892
- } = this.state;
893
- const {
894
- handleInit
895
- } = this;
896
- const value = {
897
- isReady,
898
- error,
899
- handleInit,
900
- api
901
- };
902
- return React.createElement(FacebookContext.Provider, {
903
- value: value
904
- }, children);
905
- }
906
-
907
- }
908
-
909
- defineProperty(Facebook$1, "defaultProps", {
910
- version: 'v3.1',
911
- cookie: false,
912
- status: false,
913
- xfbml: false,
914
- language: 'en_US',
915
- frictionlessRequests: false,
916
- domain: 'connect.facebook.net',
917
- children: undefined,
918
- wait: false,
919
- debug: false,
920
- chatSupport: false
921
- });
922
-
923
- var _extends_1 = createCommonjsModule(function (module) {
924
- function _extends() {
925
- module.exports = _extends = Object.assign || function (target) {
926
- for (var i = 1; i < arguments.length; i++) {
927
- var source = arguments[i];
928
-
929
- for (var key in source) {
930
- if (Object.prototype.hasOwnProperty.call(source, key)) {
931
- target[key] = source[key];
932
- }
933
- }
934
- }
935
-
936
- return target;
937
- };
938
-
939
- return _extends.apply(this, arguments);
940
- }
941
-
942
- module.exports = _extends;
943
- });
944
-
945
- class Initialize extends Component {
946
- componentDidMount() {
947
- this.$isMounted = true;
948
- this.prepare();
949
- }
950
-
951
- componentWillUnmount() {
952
- this.$isMounted = false;
953
- }
954
-
955
- prepare() {
956
- var _this = this;
957
-
958
- return asyncToGenerator(function* () {
959
- const {
960
- onReady,
961
- handleInit
962
- } = _this.props;
963
- const api = yield handleInit();
964
-
965
- if (onReady && _this.$isMounted) {
966
- onReady(api);
967
- }
968
- })();
969
- }
970
-
971
- render() {
972
- const {
973
- children,
974
- isReady,
975
- api
976
- } = this.props;
977
- const childrenProps = {
978
- isReady,
979
- api
980
- };
981
-
982
- if (typeof children === 'function') {
983
- return children(childrenProps);
984
- }
985
-
986
- return children;
987
- }
988
-
989
- }
990
-
991
- defineProperty(Initialize, "defaultProps", {
992
- onReady: undefined,
993
- api: undefined
994
- });
995
-
996
- var Initialize$1 = forwardRef((props, ref) => React.createElement(FacebookContext.Consumer, null, ({
997
- handleInit,
998
- isReady,
999
- api
1000
- }) => React.createElement(Initialize, _extends_1({}, props, {
1001
- handleInit: handleInit,
1002
- isReady: isReady,
1003
- api: api,
1004
- ref: ref
1005
- }))));
1006
-
1007
- class Parser extends Component {
1008
- constructor(...args) {
1009
- super(...args);
1010
-
1011
- defineProperty(this, "state", {});
1012
-
1013
- defineProperty(this, "handleReady", api => {
1014
- this.setState({
1015
- api
1016
- }, this.handleParse);
1017
- });
1018
-
1019
- defineProperty(this, "handleContainer", container => {
1020
- this.setState({
1021
- container
1022
- }, this.handleParse);
1023
- });
1024
-
1025
- defineProperty(this, "handleParse", () => {
1026
- const {
1027
- api,
1028
- container
1029
- } = this.state;
1030
-
1031
- if (!api || !container) {
1032
- return;
1033
- }
1034
-
1035
- api.parse(container);
1036
- });
1037
- }
1038
-
1039
- render() {
1040
- const {
1041
- className,
1042
- children
1043
- } = this.props;
1044
- return React.createElement("div", {
1045
- className: className,
1046
- ref: this.handleContainer
1047
- }, React.createElement(Initialize$1, {
1048
- onReady: this.handleReady
1049
- }, children({
1050
- handleParse: this.handleParse
1051
- })));
1052
- }
1053
-
1054
- }
1055
-
1056
- defineProperty(Parser, "defaultProps", {
1057
- className: undefined
1058
- });
1059
-
1060
- function getCurrentHref() {
1061
- if (!canUseDom) {
1062
- return 'https://www.facebook.com';
1063
- }
1064
-
1065
- return window.location.href;
1066
- }
1067
-
1068
- class Like extends PureComponent {
1069
- componentDidUpdate() {
1070
- const {
1071
- handleParse
1072
- } = this.props;
1073
- handleParse();
1074
- }
1075
-
1076
- render() {
1077
- const {
1078
- href = getCurrentHref(),
1079
- layout,
1080
- colorScheme,
1081
- action,
1082
- showFaces,
1083
- share,
1084
- children,
1085
- width,
1086
- size,
1087
- kidDirectedSite,
1088
- referral
1089
- } = this.props;
1090
- return React.createElement("div", {
1091
- className: "fb-like",
1092
- "data-ref": referral,
1093
- "data-href": href,
1094
- "data-layout": layout,
1095
- "data-colorscheme": colorScheme,
1096
- "data-action": action,
1097
- "data-show-faces": showFaces,
1098
- "data-share": share,
1099
- "data-width": width,
1100
- "data-size": size,
1101
- "data-kid-directed-site": kidDirectedSite
1102
- }, children);
1103
- }
1104
-
1105
- }
1106
-
1107
- defineProperty(Like, "defaultProps", {
1108
- layout: undefined,
1109
- showFaces: undefined,
1110
- colorScheme: undefined,
1111
- action: undefined,
1112
- share: undefined,
1113
- size: undefined,
1114
- kidDirectedSite: undefined,
1115
- children: undefined,
1116
- href: undefined,
1117
- referral: undefined,
1118
- width: undefined
1119
- });
1120
-
1121
- forwardRef((props, ref) => React.createElement(Parser, null, ({
1122
- handleParse
1123
- }) => React.createElement(Like, _extends_1({}, props, {
1124
- handleParse: handleParse,
1125
- ref: ref
1126
- }))));
1127
-
1128
- function clearUndefinedProperties(obj) {
1129
- if (!obj) {
1130
- return obj;
1131
- }
1132
-
1133
- const newObj = {};
1134
- Object.keys(obj).forEach(propertyName => {
1135
- const value = obj[propertyName];
1136
-
1137
- if (value !== undefined) {
1138
- newObj[propertyName] = value;
1139
- }
1140
- });
1141
- return newObj;
1142
- }
1143
-
1144
- class Process extends Component {
1145
- constructor(...args) {
1146
- var _this;
1147
-
1148
- super(...args);
1149
- _this = this;
1150
-
1151
- defineProperty(this, "state", {
1152
- api: undefined
1153
- });
1154
-
1155
- defineProperty(this, "handleProcess",
1156
- /*#__PURE__*/
1157
- function () {
1158
- var _ref = asyncToGenerator(function* (fn, handleSuccess = () => {}) {
1159
- _this.setState({
1160
- data: undefined,
1161
- error: undefined,
1162
- loading: true
1163
- });
1164
-
1165
- try {
1166
- const {
1167
- api
1168
- } = _this.state;
1169
-
1170
- if (!api) {
1171
- throw new Error('Facebook is not initialized. Wait for isReady');
1172
- }
1173
-
1174
- const data = yield fn(api);
1175
-
1176
- _this.setState({
1177
- data,
1178
- loading: false
1179
- }, handleSuccess);
1180
-
1181
- return data;
1182
- } catch (error) {
1183
- _this.setState({
1184
- error,
1185
- loading: false
1186
- });
1187
-
1188
- throw error;
1189
- }
1190
- });
1191
-
1192
- return function (_x) {
1193
- return _ref.apply(this, arguments);
1194
- };
1195
- }());
1196
-
1197
- defineProperty(this, "handleReady", api => {
1198
- this.setState({
1199
- api
1200
- });
1201
- });
1202
- }
1203
-
1204
- render() {
1205
- const {
1206
- children
1207
- } = this.props;
1208
- const {
1209
- api,
1210
- loading,
1211
- data,
1212
- error
1213
- } = this.state;
1214
- return React.createElement(Initialize$1, {
1215
- onReady: this.handleReady
1216
- }, children({
1217
- loading: !api || loading,
1218
- handleProcess: this.handleProcess,
1219
- data,
1220
- error
1221
- }));
1222
- }
1223
-
1224
- }
1225
-
1226
- class Send extends Component {
1227
- constructor(...args) {
1228
- var _this;
1229
-
1230
- super(...args);
1231
- _this = this;
1232
-
1233
- defineProperty(this, "handleClick",
1234
- /*#__PURE__*/
1235
- function () {
1236
- var _ref = asyncToGenerator(function* (evn) {
1237
- evn.preventDefault();
1238
- const {
1239
- handleProcess
1240
- } = _this.props;
1241
- return handleProcess(
1242
- /*#__PURE__*/
1243
- function () {
1244
- var _ref2 = asyncToGenerator(function* (api) {
1245
- const {
1246
- link = getCurrentHref(),
1247
- display,
1248
- appId = api.getAppId(),
1249
- to,
1250
- redirectURI
1251
- } = _this.props;
1252
- return api.ui(clearUndefinedProperties({
1253
- method: 'send',
1254
- link,
1255
- display,
1256
- app_id: appId,
1257
- to,
1258
- redirect_uri: redirectURI
1259
- }));
1260
- });
1261
-
1262
- return function (_x2) {
1263
- return _ref2.apply(this, arguments);
1264
- };
1265
- }());
1266
- });
1267
-
1268
- return function (_x) {
1269
- return _ref.apply(this, arguments);
1270
- };
1271
- }());
1272
- }
1273
-
1274
- render() {
1275
- const {
1276
- children,
1277
- loading
1278
- } = this.props;
1279
- return children({
1280
- loading,
1281
- handleClick: this.handleClick
1282
- });
1283
- }
1284
-
1285
- }
1286
-
1287
- defineProperty(Send, "defaultProps", {
1288
- to: undefined,
1289
- display: undefined,
1290
- appId: undefined,
1291
- redirectURI: undefined
1292
- });
1293
-
1294
- forwardRef((props, ref) => React.createElement(Process, null, ({
1295
- loading,
1296
- handleProcess
1297
- }) => React.createElement(Send, _extends_1({}, props, {
1298
- loading: loading,
1299
- handleProcess: handleProcess,
1300
- ref: ref
1301
- }))));
1302
-
1303
- class Share extends Component {
1304
- constructor(...args) {
1305
- var _this;
1306
-
1307
- super(...args);
1308
- _this = this;
1309
-
1310
- defineProperty(this, "handleClick",
1311
- /*#__PURE__*/
1312
- function () {
1313
- var _ref = asyncToGenerator(function* (evn) {
1314
- evn.preventDefault();
1315
- const {
1316
- handleProcess
1317
- } = _this.props;
1318
- return handleProcess(
1319
- /*#__PURE__*/
1320
- function () {
1321
- var _ref2 = asyncToGenerator(function* (api) {
1322
- const {
1323
- href = getCurrentHref(),
1324
- display,
1325
- appId = api.getAppId(),
1326
- hashtag,
1327
- redirectURI,
1328
- quote,
1329
- mobileIframe
1330
- } = _this.props;
1331
- return api.ui(clearUndefinedProperties({
1332
- method: 'share',
1333
- href,
1334
- display,
1335
- app_id: appId,
1336
- hashtag,
1337
- redirect_uri: redirectURI,
1338
- quote,
1339
- mobile_iframe: mobileIframe
1340
- }));
1341
- });
1342
-
1343
- return function (_x2) {
1344
- return _ref2.apply(this, arguments);
1345
- };
1346
- }());
1347
- });
1348
-
1349
- return function (_x) {
1350
- return _ref.apply(this, arguments);
1351
- };
1352
- }());
1353
- }
1354
-
1355
- render() {
1356
- const {
1357
- children,
1358
- loading,
1359
- error,
1360
- data
1361
- } = this.props;
1362
- return children({
1363
- loading,
1364
- handleClick: this.handleClick,
1365
- error,
1366
- data
1367
- });
1368
- }
1369
-
1370
- }
1371
-
1372
- defineProperty(Share, "defaultProps", {
1373
- href: undefined,
1374
- hashtag: undefined,
1375
- quote: undefined,
1376
- mobileIframe: undefined,
1377
- display: undefined,
1378
- appId: undefined,
1379
- redirectURI: undefined
1380
- });
1381
-
1382
- var Share$1 = forwardRef((props, ref) => React.createElement(Process, null, ({
1383
- loading,
1384
- handleProcess,
1385
- data,
1386
- error
1387
- }) => React.createElement(Share, _extends_1({}, props, {
1388
- loading: loading,
1389
- handleProcess: handleProcess,
1390
- data: data,
1391
- error: error,
1392
- ref: ref
1393
- }))));
1394
-
1395
- function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1396
-
1397
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1398
- function ShareButton(props) {
1399
- const {
1400
- className,
1401
- children
1402
- } = props,
1403
- rest = objectWithoutProperties(props, ["className", "children"]);
1404
-
1405
- return React.createElement(Share$1, rest, ({
1406
- loading,
1407
- handleClick
1408
- }) => React.createElement("button", {
1409
- type: "button",
1410
- disabled: loading,
1411
- className: className,
1412
- onClick: handleClick
1413
- }, children));
1414
- }
1415
- ShareButton.defaultProps = _objectSpread$1({}, Share$1.defaultProps, {
1416
- className: undefined
1417
- });
1418
-
1419
- class Page extends PureComponent {
1420
- componentDidUpdate() {
1421
- const {
1422
- handleParse
1423
- } = this.props;
1424
- handleParse();
1425
- }
1426
-
1427
- render() {
1428
- const {
1429
- style,
1430
- href = getCurrentHref(),
1431
- tabs,
1432
- hideCover,
1433
- width,
1434
- height,
1435
- showFacepile,
1436
- hideCTA,
1437
- smallHeader,
1438
- adaptContainerWidth,
1439
- children
1440
- } = this.props;
1441
- return React.createElement("div", {
1442
- className: "fb-page",
1443
- style: style,
1444
- "data-tabs": tabs,
1445
- "data-hide-cover": hideCover,
1446
- "data-show-facepile": showFacepile,
1447
- "data-hide-cta": hideCTA,
1448
- "data-href": href,
1449
- "data-small-header": smallHeader,
1450
- "data-adapt-container-width": adaptContainerWidth,
1451
- "data-height": height,
1452
- "data-width": width
1453
- }, children);
1454
- }
1455
-
1456
- }
1457
-
1458
- defineProperty(Page, "defaultProps", {
1459
- width: undefined,
1460
- height: undefined,
1461
- tabs: undefined,
1462
- hideCover: undefined,
1463
- showFacepile: undefined,
1464
- hideCTA: undefined,
1465
- smallHeader: undefined,
1466
- adaptContainerWidth: undefined,
1467
- children: undefined,
1468
- style: undefined,
1469
- href: undefined
1470
- });
1471
-
1472
- var Page$1 = forwardRef((props, ref) => React.createElement(Parser, null, ({
1473
- handleParse
1474
- }) => React.createElement(Page, _extends_1({}, props, {
1475
- handleParse: handleParse,
1476
- ref: ref
1477
- }))));
1478
-
1479
- // 3.0 fields without app review https://developers.facebook.com/docs/facebook-login/permissions/?locale=en_US#reference-default
1480
- var Fields = ['id', 'first_name', 'last_name', 'middle_name', 'name', 'name_format', 'picture', 'short_name', 'email'];
1481
-
1482
- function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1483
-
1484
- function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1485
-
1486
- class Login extends Component {
1487
- constructor(...args) {
1488
- var _this;
1489
-
1490
- super(...args);
1491
- _this = this;
1492
-
1493
- defineProperty(this, "handleClick",
1494
- /*#__PURE__*/
1495
- function () {
1496
- var _ref = asyncToGenerator(function* (evn) {
1497
- evn.preventDefault();
1498
- const {
1499
- handleProcess,
1500
- onCompleted,
1501
- onError,
1502
- onSuccess
1503
- } = _this.props;
1504
-
1505
- try {
1506
- yield handleProcess(
1507
- /*#__PURE__*/
1508
- function () {
1509
- var _ref2 = asyncToGenerator(function* (api) {
1510
- const {
1511
- scope,
1512
- fields,
1513
- returnScopes,
1514
- rerequest,
1515
- reauthorize,
1516
- eventKey
1517
- } = _this.props;
1518
- const loginQpts = {
1519
- scope
1520
- };
1521
- const authType = [];
1522
-
1523
- if (returnScopes) {
1524
- loginQpts.return_scopes = true;
1525
- }
1526
-
1527
- if (rerequest) {
1528
- authType.push('rerequest');
1529
- }
1530
-
1531
- if (reauthorize) {
1532
- authType.push('reauthenticate');
1533
- }
1534
-
1535
- if (authType.length) {
1536
- loginQpts.auth_type = authType.join(',');
1537
- }
1538
-
1539
- const loginResponse = yield api.login(loginQpts);
1540
-
1541
- if (loginResponse.status !== 'connected') {
1542
- throw new Error('Unauthorized user');
1543
- }
1544
-
1545
- const data = yield api.getTokenDetailWithProfile({
1546
- fields
1547
- }, loginResponse);
1548
-
1549
- if (onCompleted) {
1550
- yield onCompleted(_objectSpread$2({}, data, {
1551
- eventKey
1552
- }));
1553
- }
1554
-
1555
- return data;
1556
- });
1557
-
1558
- return function (_x2) {
1559
- return _ref2.apply(this, arguments);
1560
- };
1561
- }(), onSuccess);
1562
- } catch (error) {
1563
- if (onError) {
1564
- onError(error);
1565
- }
1566
- }
1567
- });
1568
-
1569
- return function (_x) {
1570
- return _ref.apply(this, arguments);
1571
- };
1572
- }());
1573
- }
1574
-
1575
- render() {
1576
- const {
1577
- children,
1578
- loading,
1579
- error,
1580
- data
1581
- } = this.props;
1582
- return children({
1583
- loading,
1584
- handleClick: this.handleClick,
1585
- error,
1586
- data
1587
- });
1588
- }
1589
-
1590
- }
1591
-
1592
- defineProperty(Login, "defaultProps", {
1593
- scope: '',
1594
- fields: Fields,
1595
- returnScopes: false,
1596
- rerequest: false,
1597
- reauthorize: false,
1598
- onCompleted: undefined,
1599
- onError: undefined,
1600
- eventKey: undefined
1601
- });
1602
-
1603
- var Login$1 = forwardRef((props, ref) => React.createElement(Process, null, ({
1604
- loading,
1605
- handleProcess,
1606
- data,
1607
- error
1608
- }) => React.createElement(Login, _extends_1({}, props, {
1609
- loading: loading,
1610
- handleProcess: handleProcess,
1611
- data: data,
1612
- error: error,
1613
- ref: ref
1614
- }))));
1615
-
1616
- var spin = createCommonjsModule(function (module) {
1617
- (function (root, factory) {
1618
-
1619
- /* CommonJS */
1620
- if ( module.exports) module.exports = factory();
1621
-
1622
- /* AMD module */
1623
- else root.Spinner = factory();
1624
- }(commonjsGlobal, function () {
1625
-
1626
- var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */
1627
- , animations = {} /* Animation rules keyed by their name */
1628
- , useCssAnimations /* Whether to use CSS animations or setTimeout */
1629
- , sheet; /* A stylesheet to hold the @keyframe or VML rules. */
1630
-
1631
- /**
1632
- * Utility function to create elements. If no tag name is given,
1633
- * a DIV is created. Optionally properties can be passed.
1634
- */
1635
- function createEl (tag, prop) {
1636
- var el = document.createElement(tag || 'div')
1637
- , n;
1638
-
1639
- for (n in prop) el[n] = prop[n];
1640
- return el
1641
- }
1642
-
1643
- /**
1644
- * Appends children and returns the parent.
1645
- */
1646
- function ins (parent /* child1, child2, ...*/) {
1647
- for (var i = 1, n = arguments.length; i < n; i++) {
1648
- parent.appendChild(arguments[i]);
1649
- }
1650
-
1651
- return parent
1652
- }
1653
-
1654
- /**
1655
- * Creates an opacity keyframe animation rule and returns its name.
1656
- * Since most mobile Webkits have timing issues with animation-delay,
1657
- * we create separate rules for each line/segment.
1658
- */
1659
- function addAnimation (alpha, trail, i, lines) {
1660
- var name = ['opacity', trail, ~~(alpha * 100), i, lines].join('-')
1661
- , start = 0.01 + i/lines * 100
1662
- , z = Math.max(1 - (1-alpha) / trail * (100-start), alpha)
1663
- , prefix = useCssAnimations.substring(0, useCssAnimations.indexOf('Animation')).toLowerCase()
1664
- , pre = prefix && '-' + prefix + '-' || '';
1665
-
1666
- if (!animations[name]) {
1667
- sheet.insertRule(
1668
- '@' + pre + 'keyframes ' + name + '{' +
1669
- '0%{opacity:' + z + '}' +
1670
- start + '%{opacity:' + alpha + '}' +
1671
- (start+0.01) + '%{opacity:1}' +
1672
- (start+trail) % 100 + '%{opacity:' + alpha + '}' +
1673
- '100%{opacity:' + z + '}' +
1674
- '}', sheet.cssRules.length);
1675
-
1676
- animations[name] = 1;
1677
- }
1678
-
1679
- return name
1680
- }
1681
-
1682
- /**
1683
- * Tries various vendor prefixes and returns the first supported property.
1684
- */
1685
- function vendor (el, prop) {
1686
- var s = el.style
1687
- , pp
1688
- , i;
1689
-
1690
- prop = prop.charAt(0).toUpperCase() + prop.slice(1);
1691
- if (s[prop] !== undefined) return prop
1692
- for (i = 0; i < prefixes.length; i++) {
1693
- pp = prefixes[i]+prop;
1694
- if (s[pp] !== undefined) return pp
1695
- }
1696
- }
1697
-
1698
- /**
1699
- * Sets multiple style properties at once.
1700
- */
1701
- function css (el, prop) {
1702
- for (var n in prop) {
1703
- el.style[vendor(el, n) || n] = prop[n];
1704
- }
1705
-
1706
- return el
1707
- }
1708
-
1709
- /**
1710
- * Fills in default values.
1711
- */
1712
- function merge (obj) {
1713
- for (var i = 1; i < arguments.length; i++) {
1714
- var def = arguments[i];
1715
- for (var n in def) {
1716
- if (obj[n] === undefined) obj[n] = def[n];
1717
- }
1718
- }
1719
- return obj
1720
- }
1721
-
1722
- /**
1723
- * Returns the line color from the given string or array.
1724
- */
1725
- function getColor (color, idx) {
1726
- return typeof color == 'string' ? color : color[idx % color.length]
1727
- }
1728
-
1729
- // Built-in defaults
1730
-
1731
- var defaults = {
1732
- lines: 12 // The number of lines to draw
1733
- , length: 7 // The length of each line
1734
- , width: 5 // The line thickness
1735
- , radius: 10 // The radius of the inner circle
1736
- , scale: 1.0 // Scales overall size of the spinner
1737
- , corners: 1 // Roundness (0..1)
1738
- , color: '#000' // #rgb or #rrggbb
1739
- , opacity: 1/4 // Opacity of the lines
1740
- , rotate: 0 // Rotation offset
1741
- , direction: 1 // 1: clockwise, -1: counterclockwise
1742
- , speed: 1 // Rounds per second
1743
- , trail: 100 // Afterglow percentage
1744
- , fps: 20 // Frames per second when using setTimeout()
1745
- , zIndex: 2e9 // Use a high z-index by default
1746
- , className: 'spinner' // CSS class to assign to the element
1747
- , top: '50%' // center vertically
1748
- , left: '50%' // center horizontally
1749
- , shadow: false // Whether to render a shadow
1750
- , hwaccel: false // Whether to use hardware acceleration (might be buggy)
1751
- , position: 'absolute' // Element positioning
1752
- };
1753
-
1754
- /** The constructor */
1755
- function Spinner (o) {
1756
- this.opts = merge(o || {}, Spinner.defaults, defaults);
1757
- }
1758
-
1759
- // Global defaults that override the built-ins:
1760
- Spinner.defaults = {};
1761
-
1762
- merge(Spinner.prototype, {
1763
- /**
1764
- * Adds the spinner to the given target element. If this instance is already
1765
- * spinning, it is automatically removed from its previous target b calling
1766
- * stop() internally.
1767
- */
1768
- spin: function (target) {
1769
- this.stop();
1770
-
1771
- var self = this
1772
- , o = self.opts
1773
- , el = self.el = createEl(null, {className: o.className});
1774
-
1775
- css(el, {
1776
- position: o.position
1777
- , width: 0
1778
- , zIndex: o.zIndex
1779
- , left: o.left
1780
- , top: o.top
1781
- });
1782
-
1783
- if (target) {
1784
- target.insertBefore(el, target.firstChild || null);
1785
- }
1786
-
1787
- el.setAttribute('role', 'progressbar');
1788
- self.lines(el, self.opts);
1789
-
1790
- if (!useCssAnimations) {
1791
- // No CSS animation support, use setTimeout() instead
1792
- var i = 0
1793
- , start = (o.lines - 1) * (1 - o.direction) / 2
1794
- , alpha
1795
- , fps = o.fps
1796
- , f = fps / o.speed
1797
- , ostep = (1 - o.opacity) / (f * o.trail / 100)
1798
- , astep = f / o.lines
1799
-
1800
- ;(function anim () {
1801
- i++;
1802
- for (var j = 0; j < o.lines; j++) {
1803
- alpha = Math.max(1 - (i + (o.lines - j) * astep) % f * ostep, o.opacity);
1804
-
1805
- self.opacity(el, j * o.direction + start, alpha, o);
1806
- }
1807
- self.timeout = self.el && setTimeout(anim, ~~(1000 / fps));
1808
- })();
1809
- }
1810
- return self
1811
- }
1812
-
1813
- /**
1814
- * Stops and removes the Spinner.
1815
- */
1816
- , stop: function () {
1817
- var el = this.el;
1818
- if (el) {
1819
- clearTimeout(this.timeout);
1820
- if (el.parentNode) el.parentNode.removeChild(el);
1821
- this.el = undefined;
1822
- }
1823
- return this
1824
- }
1825
-
1826
- /**
1827
- * Internal method that draws the individual lines. Will be overwritten
1828
- * in VML fallback mode below.
1829
- */
1830
- , lines: function (el, o) {
1831
- var i = 0
1832
- , start = (o.lines - 1) * (1 - o.direction) / 2
1833
- , seg;
1834
-
1835
- function fill (color, shadow) {
1836
- return css(createEl(), {
1837
- position: 'absolute'
1838
- , width: o.scale * (o.length + o.width) + 'px'
1839
- , height: o.scale * o.width + 'px'
1840
- , background: color
1841
- , boxShadow: shadow
1842
- , transformOrigin: 'left'
1843
- , transform: 'rotate(' + ~~(360/o.lines*i + o.rotate) + 'deg) translate(' + o.scale*o.radius + 'px' + ',0)'
1844
- , borderRadius: (o.corners * o.scale * o.width >> 1) + 'px'
1845
- })
1846
- }
1847
-
1848
- for (; i < o.lines; i++) {
1849
- seg = css(createEl(), {
1850
- position: 'absolute'
1851
- , top: 1 + ~(o.scale * o.width / 2) + 'px'
1852
- , transform: o.hwaccel ? 'translate3d(0,0,0)' : ''
1853
- , opacity: o.opacity
1854
- , animation: useCssAnimations && addAnimation(o.opacity, o.trail, start + i * o.direction, o.lines) + ' ' + 1 / o.speed + 's linear infinite'
1855
- });
1856
-
1857
- if (o.shadow) ins(seg, css(fill('#000', '0 0 4px #000'), {top: '2px'}));
1858
- ins(el, ins(seg, fill(getColor(o.color, i), '0 0 1px rgba(0,0,0,.1)')));
1859
- }
1860
- return el
1861
- }
1862
-
1863
- /**
1864
- * Internal method that adjusts the opacity of a single line.
1865
- * Will be overwritten in VML fallback mode below.
1866
- */
1867
- , opacity: function (el, i, val) {
1868
- if (i < el.childNodes.length) el.childNodes[i].style.opacity = val;
1869
- }
1870
-
1871
- });
1872
-
1873
-
1874
- function initVML () {
1875
-
1876
- /* Utility function to create a VML tag */
1877
- function vml (tag, attr) {
1878
- return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr)
1879
- }
1880
-
1881
- // No CSS transforms but VML support, add a CSS rule for VML elements:
1882
- sheet.addRule('.spin-vml', 'behavior:url(#default#VML)');
1883
-
1884
- Spinner.prototype.lines = function (el, o) {
1885
- var r = o.scale * (o.length + o.width)
1886
- , s = o.scale * 2 * r;
1887
-
1888
- function grp () {
1889
- return css(
1890
- vml('group', {
1891
- coordsize: s + ' ' + s
1892
- , coordorigin: -r + ' ' + -r
1893
- })
1894
- , { width: s, height: s }
1895
- )
1896
- }
1897
-
1898
- var margin = -(o.width + o.length) * o.scale * 2 + 'px'
1899
- , g = css(grp(), {position: 'absolute', top: margin, left: margin})
1900
- , i;
1901
-
1902
- function seg (i, dx, filter) {
1903
- ins(
1904
- g
1905
- , ins(
1906
- css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx})
1907
- , ins(
1908
- css(
1909
- vml('roundrect', {arcsize: o.corners})
1910
- , { width: r
1911
- , height: o.scale * o.width
1912
- , left: o.scale * o.radius
1913
- , top: -o.scale * o.width >> 1
1914
- , filter: filter
1915
- }
1916
- )
1917
- , vml('fill', {color: getColor(o.color, i), opacity: o.opacity})
1918
- , vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change
1919
- )
1920
- )
1921
- );
1922
- }
1923
-
1924
- if (o.shadow)
1925
- for (i = 1; i <= o.lines; i++) {
1926
- seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)');
1927
- }
1928
-
1929
- for (i = 1; i <= o.lines; i++) seg(i);
1930
- return ins(el, g)
1931
- };
1932
-
1933
- Spinner.prototype.opacity = function (el, i, val, o) {
1934
- var c = el.firstChild;
1935
- o = o.shadow && o.lines || 0;
1936
- if (c && i + o < c.childNodes.length) {
1937
- c = c.childNodes[i + o]; c = c && c.firstChild; c = c && c.firstChild;
1938
- if (c) c.opacity = val;
1939
- }
1940
- };
1941
- }
1942
-
1943
- if (typeof document !== 'undefined') {
1944
- sheet = (function () {
1945
- var el = createEl('style', {type : 'text/css'});
1946
- ins(document.getElementsByTagName('head')[0], el);
1947
- return el.sheet || el.styleSheet
1948
- }());
1949
-
1950
- var probe = css(createEl('group'), {behavior: 'url(#default#VML)'});
1951
-
1952
- if (!vendor(probe, 'transform') && probe.adj) initVML();
1953
- else useCssAnimations = vendor(probe, 'animation');
1954
- }
1955
-
1956
- return Spinner
1957
-
1958
- }));
1959
- });
1960
-
1961
- var dist = createCommonjsModule(function (module, exports) {
1962
-
1963
- Object.defineProperty(exports, "__esModule", {
1964
- value: true
1965
- });
1966
-
1967
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1968
-
1969
-
1970
-
1971
- var _react2 = _interopRequireDefault(React);
1972
-
1973
-
1974
-
1975
- var _propTypes2 = _interopRequireDefault(PropTypes);
1976
-
1977
-
1978
-
1979
- var _spin2 = _interopRequireDefault(spin);
1980
-
1981
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1982
-
1983
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1984
-
1985
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1986
-
1987
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
1988
-
1989
- var Spinner = function (_Component) {
1990
- _inherits(Spinner, _Component);
1991
-
1992
- function Spinner() {
1993
- _classCallCheck(this, Spinner);
1994
-
1995
- return _possibleConstructorReturn(this, (Spinner.__proto__ || Object.getPrototypeOf(Spinner)).apply(this, arguments));
1996
- }
1997
-
1998
- _createClass(Spinner, [{
1999
- key: 'componentDidMount',
2000
- value: function componentDidMount() {
2001
- this.updateSpinner();
2002
- }
2003
- }, {
2004
- key: 'componentDidUpdate',
2005
- value: function componentDidUpdate() {
2006
- this.updateSpinner();
2007
- }
2008
- }, {
2009
- key: 'componentWillUnmount',
2010
- value: function componentWillUnmount() {
2011
- if (this.spinner) {
2012
- this.spinner.stop();
2013
- this.spinner = null;
2014
- }
2015
- }
2016
- }, {
2017
- key: 'updateSpinner',
2018
- value: function updateSpinner() {
2019
- var loaded = this.props.loaded;
2020
-
2021
- if (!loaded && !this.spinner) {
2022
- this.spinner = new _spin2.default(this.props.config);
2023
- this.spinner.spin(this.refs.loader);
2024
- } else if (loaded && this.spinner) {
2025
- this.spinner.stop();
2026
- this.spinner = null;
2027
- }
2028
- }
2029
- }, {
2030
- key: 'render',
2031
- value: function render() {
2032
- var _props = this.props,
2033
- loaded = _props.loaded,
2034
- className = _props.className;
2035
-
2036
-
2037
- if (loaded) {
2038
- return this.props.children ? React.Children.only(this.props.children) : null;
2039
- }
2040
-
2041
- return _react2.default.createElement('div', { className: className, ref: 'loader' });
2042
- }
2043
- }]);
2044
-
2045
- return Spinner;
2046
- }(React.Component);
2047
-
2048
- Spinner.propTypes = {
2049
- className: _propTypes2.default.string,
2050
- config: _propTypes2.default.object.isRequired,
2051
- loaded: _propTypes2.default.bool.isRequired,
2052
- children: _propTypes2.default.node
2053
- };
2054
- Spinner.defaultProps = {
2055
- config: {},
2056
- loaded: false,
2057
- className: 'loader'
2058
- };
2059
- exports.default = Spinner;
2060
- });
2061
-
2062
- var Spinner = unwrapExports(dist);
2063
-
2064
- function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2065
-
2066
- function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2067
- function LoginButton(props) {
2068
- const {
2069
- children,
2070
- className,
2071
- spinner,
2072
- spinnerConfig
2073
- } = props,
2074
- rest = objectWithoutProperties(props, ["children", "className", "spinner", "spinnerConfig"]);
2075
-
2076
- return React.createElement(Login$1, rest, ({
2077
- loading,
2078
- handleClick
2079
- }) => React.createElement("button", {
2080
- type: "button",
2081
- className: className,
2082
- onClick: handleClick,
2083
- disabled: loading
2084
- }, children, spinner && loading && React.createElement(Spinner, {
2085
- config: spinnerConfig
2086
- })));
2087
- }
2088
- LoginButton.defaultProps = _objectSpread$3({}, Login$1.defaultProps, {
2089
- className: undefined,
2090
- spinnerConfig: {},
2091
- spinner: true
2092
- });
2093
-
2094
- class EmbeddedPost extends PureComponent {
2095
- componentDidUpdate() {
2096
- const {
2097
- handleParse
2098
- } = this.props;
2099
- handleParse();
2100
- }
2101
-
2102
- render() {
2103
- const {
2104
- href,
2105
- width,
2106
- showText,
2107
- children
2108
- } = this.props;
2109
- return React.createElement("div", {
2110
- className: "fb-post",
2111
- "data-href": href,
2112
- "data-width": width,
2113
- "data-show-text": showText
2114
- }, children);
2115
- }
2116
-
2117
- }
2118
-
2119
- defineProperty(EmbeddedPost, "defaultProps", {
2120
- width: undefined,
2121
- showText: undefined,
2122
- children: undefined
2123
- });
2124
-
2125
- forwardRef((props, ref) => React.createElement(Parser, null, ({
2126
- handleParse
2127
- }) => React.createElement(EmbeddedPost, _extends_1({}, props, {
2128
- handleParse: handleParse,
2129
- ref: ref
2130
- }))));
2131
-
2132
- class EmbeddedVideo extends PureComponent {
2133
- componentDidUpdate() {
2134
- const {
2135
- handleParse
2136
- } = this.props;
2137
- handleParse();
2138
- }
2139
-
2140
- render() {
2141
- const {
2142
- href,
2143
- width,
2144
- showText,
2145
- allowFullScreen,
2146
- autoPlay,
2147
- showCaptions,
2148
- children
2149
- } = this.props;
2150
- return React.createElement("div", {
2151
- className: "fb-video",
2152
- "data-href": href,
2153
- "data-width": width,
2154
- "data-show-text": showText,
2155
- "data-show-captions": showCaptions,
2156
- "data-autoplay": autoPlay,
2157
- "data-allowfullscreen": allowFullScreen
2158
- }, children);
2159
- }
2160
-
2161
- }
2162
-
2163
- defineProperty(EmbeddedVideo, "defaultProps", {
2164
- width: undefined,
2165
- showText: undefined,
2166
- allowFullScreen: undefined,
2167
- autoPlay: undefined,
2168
- showCaptions: undefined,
2169
- children: undefined
2170
- });
2171
-
2172
- forwardRef((props, ref) => React.createElement(Parser, null, ({
2173
- handleParse
2174
- }) => React.createElement(EmbeddedVideo, _extends_1({}, props, {
2175
- handleParse: handleParse,
2176
- ref: ref
2177
- }))));
2178
-
2179
- class Comments extends PureComponent {
2180
- componentDidUpdate() {
2181
- const {
2182
- handleParse
2183
- } = this.props;
2184
- handleParse();
2185
- }
2186
-
2187
- render() {
2188
- const {
2189
- colorScheme,
2190
- href = getCurrentHref(),
2191
- numPosts,
2192
- orderBy,
2193
- width,
2194
- children,
2195
- mobile
2196
- } = this.props;
2197
- return React.createElement("div", {
2198
- className: "fb-comments",
2199
- "data-colorscheme": colorScheme,
2200
- "data-numposts": numPosts,
2201
- "data-href": href,
2202
- "data-order-by": orderBy,
2203
- "data-width": width,
2204
- "data-skin": colorScheme,
2205
- "data-mobile": mobile
2206
- }, children);
2207
- }
2208
-
2209
- }
2210
-
2211
- defineProperty(Comments, "defaultProps", {
2212
- href: undefined,
2213
- numPosts: undefined,
2214
- orderBy: undefined,
2215
- width: undefined,
2216
- colorScheme: undefined,
2217
- children: undefined,
2218
- mobile: undefined
2219
- });
2220
-
2221
- forwardRef((props, ref) => React.createElement(Parser, null, ({
2222
- handleParse
2223
- }) => React.createElement(Comments, _extends_1({}, props, {
2224
- handleParse: handleParse,
2225
- ref: ref
2226
- }))));
2227
-
2228
- class CommentsCount extends PureComponent {
2229
- componentDidUpdate() {
2230
- const {
2231
- handleParse
2232
- } = this.props;
2233
- handleParse();
2234
- }
2235
-
2236
- render() {
2237
- const {
2238
- href = getCurrentHref(),
2239
- children
2240
- } = this.props;
2241
- return React.createElement("span", {
2242
- className: "fb-comments-count",
2243
- "data-href": href
2244
- }, children);
2245
- }
2246
-
2247
- }
2248
-
2249
- defineProperty(CommentsCount, "defaultProps", {
2250
- href: undefined,
2251
- children: undefined
2252
- });
2253
-
2254
- forwardRef((props, ref) => React.createElement(Parser, null, ({
2255
- handleParse
2256
- }) => React.createElement(CommentsCount, _extends_1({}, props, {
2257
- handleParse: handleParse,
2258
- ref: ref
2259
- }))));
2260
-
2261
- class Feed extends Component {
2262
- constructor(...args) {
2263
- var _this;
2264
-
2265
- super(...args);
2266
- _this = this;
2267
-
2268
- defineProperty(this, "handleClick",
2269
- /*#__PURE__*/
2270
- function () {
2271
- var _ref = asyncToGenerator(function* (evn) {
2272
- evn.preventDefault();
2273
- const {
2274
- handleProcess
2275
- } = _this.props;
2276
- return handleProcess(
2277
- /*#__PURE__*/
2278
- function () {
2279
- var _ref2 = asyncToGenerator(function* (api) {
2280
- const {
2281
- link = getCurrentHref(),
2282
- display,
2283
- appId = api.getAppId(),
2284
- redirectURI,
2285
- from,
2286
- to,
2287
- picture,
2288
- source,
2289
- name,
2290
- caption,
2291
- description,
2292
- dataRef
2293
- } = _this.props;
2294
- return api.ui(clearUndefinedProperties({
2295
- method: 'feed',
2296
- link,
2297
- display,
2298
- app_id: appId,
2299
- redirect_uri: redirectURI,
2300
- from,
2301
- to,
2302
- picture,
2303
- source,
2304
- name,
2305
- caption,
2306
- description,
2307
- ref: dataRef
2308
- }));
2309
- });
2310
-
2311
- return function (_x2) {
2312
- return _ref2.apply(this, arguments);
2313
- };
2314
- }());
2315
- });
2316
-
2317
- return function (_x) {
2318
- return _ref.apply(this, arguments);
2319
- };
2320
- }());
2321
- }
2322
-
2323
- render() {
2324
- const {
2325
- children,
2326
- loading,
2327
- error,
2328
- data
2329
- } = this.props;
2330
- return children({
2331
- loading,
2332
- handleClick: this.handleClick,
2333
- error,
2334
- data
2335
- });
2336
- }
2337
-
2338
- }
2339
-
2340
- defineProperty(Feed, "defaultProps", {
2341
- link: undefined,
2342
- display: undefined,
2343
- appId: undefined,
2344
- redirectURI: undefined,
2345
- from: undefined,
2346
- to: undefined,
2347
- source: undefined,
2348
- picture: undefined,
2349
- name: undefined,
2350
- caption: undefined,
2351
- description: undefined,
2352
- dataRef: undefined
2353
- });
2354
-
2355
- forwardRef((props, ref) => React.createElement(Process, null, ({
2356
- loading,
2357
- handleProcess,
2358
- error,
2359
- data
2360
- }) => React.createElement(Feed, _extends_1({}, props, {
2361
- loading: loading,
2362
- handleProcess: handleProcess,
2363
- data: data,
2364
- error: error,
2365
- ref: ref
2366
- }))));
2367
-
2368
- class Group extends PureComponent {
2369
- componentDidUpdate() {
2370
- const {
2371
- handleParse
2372
- } = this.props;
2373
- handleParse();
2374
- }
2375
-
2376
- render() {
2377
- const {
2378
- style,
2379
- href = getCurrentHref(),
2380
- width,
2381
- showSocialContext,
2382
- showMetaData,
2383
- children,
2384
- skin
2385
- } = this.props;
2386
- return React.createElement("div", {
2387
- className: "fb-group",
2388
- style: style,
2389
- "data-href": href,
2390
- "data-width": width,
2391
- "data-show-social-context": showSocialContext,
2392
- "data-show-metadata": showMetaData,
2393
- "data-skin": skin
2394
- }, children);
2395
- }
2396
-
2397
- }
2398
-
2399
- defineProperty(Group, "defaultProps", {
2400
- showSocialContext: undefined,
2401
- showMetaData: undefined,
2402
- width: undefined,
2403
- children: undefined,
2404
- style: undefined,
2405
- href: undefined,
2406
- skin: undefined
2407
- });
2408
-
2409
- forwardRef((props, ref) => React.createElement(Parser, null, ({
2410
- handleParse
2411
- }) => React.createElement(Group, _extends_1({}, props, {
2412
- handleParse: handleParse,
2413
- ref: ref
2414
- }))));
2415
-
2416
- class LoginStatus$1 extends Component {
2417
- constructor(..._args) {
2418
- var _this;
2419
-
2420
- super(..._args);
2421
- _this = this;
2422
-
2423
- defineProperty(this, "state", {});
2424
-
2425
- defineProperty(this, "handleReady",
2426
- /*#__PURE__*/
2427
- function () {
2428
- var _ref = asyncToGenerator(function* (api) {
2429
- const {
2430
- event
2431
- } = _this.props;
2432
-
2433
- _this.setState({
2434
- api
2435
- });
2436
-
2437
- yield api.subscribe(event, _this.handleChange);
2438
- });
2439
-
2440
- return function (_x) {
2441
- return _ref.apply(this, arguments);
2442
- };
2443
- }());
2444
-
2445
- defineProperty(this, "handleChange", (...args) => {
2446
- const {
2447
- onChange
2448
- } = this.props;
2449
-
2450
- if (onChange) {
2451
- onChange(...args);
2452
- }
2453
- });
2454
- }
2455
-
2456
- componentWillUnmount() {
2457
- const {
2458
- state: {
2459
- api
2460
- },
2461
- props: {
2462
- event
2463
- }
2464
- } = this;
2465
-
2466
- if (api) {
2467
- api.unsubscribe(event, this.handleChange);
2468
- }
2469
- }
2470
-
2471
- render() {
2472
- const {
2473
- children
2474
- } = this.props;
2475
- return React.createElement(Initialize$1, {
2476
- onReady: this.handleReady
2477
- }, children);
2478
- }
2479
-
2480
- }
2481
-
2482
- defineProperty(LoginStatus$1, "defaultProps", {
2483
- onChange: undefined
2484
- });
2485
-
2486
- class Profile extends Component {
2487
- constructor(...args) {
2488
- var _this;
2489
-
2490
- super(...args);
2491
- _this = this;
2492
-
2493
- defineProperty(this, "state", {
2494
- loading: true
2495
- });
2496
-
2497
- defineProperty(this, "handleReady",
2498
- /*#__PURE__*/
2499
- function () {
2500
- var _ref = asyncToGenerator(function* (api) {
2501
- _this.api = api;
2502
-
2503
- _this.updateProfile();
2504
- });
2505
-
2506
- return function (_x) {
2507
- return _ref.apply(this, arguments);
2508
- };
2509
- }());
2510
-
2511
- defineProperty(this, "handleStatusChange", () => {
2512
- this.updateProfile();
2513
- });
2514
- }
2515
-
2516
- updateProfile() {
2517
- var _this2 = this;
2518
-
2519
- return asyncToGenerator(function* () {
2520
- const {
2521
- api,
2522
- props: {
2523
- fields
2524
- }
2525
- } = _this2;
2526
-
2527
- if (!api) {
2528
- return;
2529
- }
2530
-
2531
- try {
2532
- const response = yield api.getLoginStatus();
2533
-
2534
- if (response.status !== LoginStatus.CONNECTED) {
2535
- _this2.setState({
2536
- profile: undefined,
2537
- loading: false,
2538
- error: undefined
2539
- });
2540
-
2541
- return;
2542
- }
2543
-
2544
- const profile = yield api.getProfile({
2545
- fields
2546
- });
2547
-
2548
- _this2.setState({
2549
- profile,
2550
- loading: false,
2551
- error: undefined
2552
- });
2553
- } catch (error) {
2554
- _this2.setState({
2555
- profile: undefined,
2556
- loading: false,
2557
- error
2558
- });
2559
- }
2560
- })();
2561
- }
2562
-
2563
- render() {
2564
- const {
2565
- children
2566
- } = this.props;
2567
- const {
2568
- profile,
2569
- loading,
2570
- error
2571
- } = this.state;
2572
- return React.createElement(Initialize$1, {
2573
- onReady: this.handleReady
2574
- }, React.createElement(LoginStatus$1, {
2575
- event: "auth.statusChange",
2576
- onChange: this.handleStatusChange
2577
- }, children({
2578
- profile,
2579
- loading,
2580
- error
2581
- })));
2582
- }
2583
-
2584
- }
2585
-
2586
- defineProperty(Profile, "defaultProps", {
2587
- fields: Fields
2588
- });
2589
-
2590
- class CustomChat extends PureComponent {
2591
- componentDidUpdate() {
2592
- const {
2593
- handleParse
2594
- } = this.props;
2595
- handleParse();
2596
- }
2597
-
2598
- render() {
2599
- const {
2600
- children,
2601
- pageId,
2602
- themeColor,
2603
- loggedInGreeting,
2604
- loggedOutGreeting,
2605
- dataRef,
2606
- greetingDialogDisplay,
2607
- greetingDialogDelay
2608
- } = this.props;
2609
- return React.createElement("div", {
2610
- className: "fb-customerchat",
2611
- page_id: pageId,
2612
- theme_color: themeColor,
2613
- logged_in_greeting: loggedInGreeting,
2614
- logged_out_greeting: loggedOutGreeting,
2615
- greeting_dialog_display: greetingDialogDisplay,
2616
- greeting_dialog_delay: greetingDialogDelay,
2617
- "data-ref": dataRef
2618
- }, children);
2619
- }
2620
-
2621
- }
2622
-
2623
- defineProperty(CustomChat, "defaultProps", {
2624
- children: undefined,
2625
- themeColor: undefined,
2626
- loggedInGreeting: undefined,
2627
- loggedOutGreeting: undefined,
2628
- dataRef: undefined,
2629
- greetingDialogDisplay: undefined,
2630
- greetingDialogDelay: undefined
2631
- });
2632
-
2633
- forwardRef((props, ref) => React.createElement(Parser, null, ({
2634
- handleParse
2635
- }) => React.createElement(CustomChat, _extends_1({}, props, {
2636
- handleParse: handleParse,
2637
- ref: ref
2638
- }))));
2639
-
2640
- class MessageUs extends PureComponent {
2641
- componentDidUpdate() {
2642
- const {
2643
- handleParse
2644
- } = this.props;
2645
- handleParse();
2646
- }
2647
-
2648
- render() {
2649
- const {
2650
- color,
2651
- messengerAppId,
2652
- pageId,
2653
- children,
2654
- size
2655
- } = this.props;
2656
- return React.createElement("div", {
2657
- className: "fb-messengermessageus",
2658
- messenger_app_id: messengerAppId,
2659
- page_id: pageId,
2660
- "data-color": color,
2661
- "data-size": size
2662
- }, children);
2663
- }
2664
-
2665
- }
2666
-
2667
- defineProperty(MessageUs, "defaultProps", {
2668
- color: undefined,
2669
- size: undefined,
2670
- children: undefined
2671
- });
2672
-
2673
- forwardRef((props, ref) => React.createElement(Parser, null, ({
2674
- handleParse
2675
- }) => React.createElement(MessageUs, _extends_1({}, props, {
2676
- handleParse: handleParse,
2677
- ref: ref
2678
- }))));
2679
-
2680
- class MessengerCheckbox extends PureComponent {
2681
- componentDidUpdate() {
2682
- const {
2683
- handleParse
2684
- } = this.props;
2685
- handleParse();
2686
- }
2687
-
2688
- render() {
2689
- const {
2690
- origin,
2691
- prechecked,
2692
- allowLogin,
2693
- userRef,
2694
- messengerAppId,
2695
- pageId,
2696
- children,
2697
- size,
2698
- centerAlign,
2699
- skin
2700
- } = this.props;
2701
- return React.createElement("div", {
2702
- className: "fb-messenger-checkbox",
2703
- messenger_app_id: messengerAppId,
2704
- page_id: pageId,
2705
- size: size,
2706
- origin: origin,
2707
- user_ref: userRef,
2708
- prechecked: prechecked,
2709
- allow_login: allowLogin,
2710
- skin: skin,
2711
- center_align: centerAlign
2712
- }, children);
2713
- }
2714
-
2715
- }
2716
-
2717
- defineProperty(MessengerCheckbox, "defaultProps", {
2718
- size: undefined,
2719
- allowLogin: undefined,
2720
- prechecked: undefined,
2721
- userRef: undefined,
2722
- children: undefined,
2723
- origin: undefined,
2724
- skin: undefined,
2725
- centerAlign: undefined
2726
- });
2727
-
2728
- forwardRef((props, ref) => React.createElement(Parser, null, ({
2729
- handleParse
2730
- }) => React.createElement(MessengerCheckbox, _extends_1({}, props, {
2731
- handleParse: handleParse,
2732
- ref: ref
2733
- }))));
2734
-
2735
- // import MessengerColor from './constants/MessengerColor';
2736
-
2737
- class SendToMessenger extends PureComponent {
2738
- componentDidUpdate() {
2739
- const {
2740
- handleParse
2741
- } = this.props;
2742
- handleParse();
2743
- }
2744
-
2745
- render() {
2746
- const {
2747
- color,
2748
- messengerAppId,
2749
- pageId,
2750
- children,
2751
- dataRef,
2752
- size
2753
- } = this.props;
2754
- return React.createElement("div", {
2755
- className: "fb-send-to-messenger",
2756
- messenger_app_id: messengerAppId,
2757
- page_id: pageId,
2758
- "data-color": color,
2759
- "data-size": size,
2760
- "data-ref": dataRef
2761
- }, children);
2762
- }
2763
-
2764
- }
2765
-
2766
- defineProperty(SendToMessenger, "defaultProps", {
2767
- color: undefined,
2768
- size: undefined,
2769
- dataRef: undefined,
2770
- children: undefined
2771
- });
2772
-
2773
- forwardRef((props, ref) => React.createElement(Parser, null, ({
2774
- handleParse
2775
- }) => React.createElement(SendToMessenger, _extends_1({}, props, {
2776
- handleParse: handleParse,
2777
- ref: ref
2778
- }))));
2779
74
 
2780
75
  var ImageSlider = function ImageSlider(props) {
2781
76
  var innerSlider = useRef(null);
@@ -3047,9 +342,9 @@ var PartnerDetails = function PartnerDetails(_ref) {
3047
342
  'div',
3048
343
  { className: 'mb-5', style: { width: '100%', maxWidth: '100%', textAlign: 'center', padding: '15px', border: '2px solid #aaa', borderRadius: '15px' } },
3049
344
  partnerDetails.twitter ? React.createElement(TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } }) : partnerDetails.facebook && React.createElement(
3050
- Facebook$1,
345
+ FacebookProvider,
3051
346
  { appId: ' ' },
3052
- React.createElement(Page$1, { href: partnerDetails.facebook, tabs: 'timeline', width: '500', height: '500' })
347
+ React.createElement(Page, { href: partnerDetails.facebook, tabs: 'timeline', width: '500', height: '500' })
3053
348
  )
3054
349
  ),
3055
350
  React.createElement(
@@ -3089,7 +384,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
3089
384
  };
3090
385
 
3091
386
  PartnerDetails.returnGetInitialProps = function () {
3092
- var _ref2 = _asyncToGenerator$1( /*#__PURE__*/regenerator.mark(function _callee(identifier, partnerPageUrl, partnerDocumentGroupID, params, currentPage, client) {
387
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(identifier, partnerPageUrl, partnerDocumentGroupID, params, currentPage, client) {
3093
388
  var category = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
3094
389
 
3095
390
  var today, featureQuery, partnerQuery, taxonomyQuery, _ref3, _ref4, features, partnerDetails, taxonomyDetails, articlesQuery, articles;