@mjhls/mjh-framework 1.0.861-beta.0 → 1.0.861

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 (258) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AD.js +10 -9
  3. package/dist/cjs/AD300x250.js +11 -11
  4. package/dist/cjs/AD300x250x600.js +11 -11
  5. package/dist/cjs/AD728x90.js +12 -12
  6. package/dist/cjs/ADFloatingFooter.js +13 -13
  7. package/dist/cjs/ADFooter.js +9 -8
  8. package/dist/cjs/ADGutter.js +13 -13
  9. package/dist/cjs/{ADInfeed-98c71bcd.js → ADInfeed-ff26342c.js} +11 -9
  10. package/dist/cjs/ADSkyscraper.js +13 -13
  11. package/dist/cjs/ADSponsoredResources.js +13 -13
  12. package/dist/cjs/ADWebcast.js +13 -13
  13. package/dist/cjs/ADWelcome.js +17 -17
  14. package/dist/cjs/{ADlgInfeed-9de32585.js → ADlgInfeed-ad4953d4.js} +7 -6
  15. package/dist/cjs/AccordionPanel.js +24 -22
  16. package/dist/cjs/AdSlot.js +15 -15
  17. package/dist/cjs/AdSlotsProvider.js +11 -903
  18. package/dist/cjs/AlgoliaSearch.js +49 -14012
  19. package/dist/cjs/AlphabeticList.js +17 -16
  20. package/dist/cjs/ArticleCarousel.js +12 -11
  21. package/dist/cjs/ArticleProgramLandingPage.js +25 -24
  22. package/dist/cjs/ArticleSeriesLandingPage.js +21 -21
  23. package/dist/cjs/ArticleSeriesListing.js +41 -41
  24. package/dist/cjs/Auth.js +237 -1197
  25. package/dist/cjs/AuthWrapper.js +26 -561
  26. package/dist/cjs/{AuthorComponent-bb831b74.js → AuthorComponent-ac8972ce.js} +13 -12
  27. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-8b494587.js} +25 -24
  28. package/dist/cjs/Breadcrumbs.js +23 -21
  29. package/dist/cjs/CMEDeck.js +64 -65
  30. package/dist/cjs/Column1.js +14 -11
  31. package/dist/cjs/Column2.js +22 -19
  32. package/dist/cjs/Column3.js +36 -34
  33. package/dist/cjs/ConferenceArticleCard.js +33 -32
  34. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  35. package/dist/cjs/DeckContent.js +85 -82
  36. package/dist/cjs/DeckQueue.js +73 -70
  37. package/dist/cjs/{Dfp-26baccf1.js → Dfp-0bf098b5.js} +23 -23
  38. package/dist/cjs/EventsDeck.js +141 -134
  39. package/dist/cjs/ExternalResources.js +49 -48
  40. package/dist/cjs/Feature.js +25 -23
  41. package/dist/cjs/ForbesHero.js +35 -34
  42. package/dist/cjs/GridContent.js +209 -205
  43. package/dist/cjs/GridHero.js +36 -35
  44. package/dist/cjs/GroupDeck.js +49 -48
  45. package/dist/cjs/HamMagazine.js +130 -125
  46. package/dist/cjs/Header.js +14 -12
  47. package/dist/cjs/Hero.js +10 -9
  48. package/dist/cjs/HighlightenVideo.js +17 -16
  49. package/dist/cjs/HorizontalArticleListing.js +39 -38
  50. package/dist/cjs/HorizontalHero.js +24 -23
  51. package/dist/cjs/IssueContentDeck.js +70 -65
  52. package/dist/cjs/IssueDeck.js +66 -61
  53. package/dist/cjs/IssueLanding.js +60 -59
  54. package/dist/cjs/KMTracker.js +15 -15
  55. package/dist/cjs/LeftNav.js +23 -22
  56. package/dist/cjs/MasterDeck.js +59 -59
  57. package/dist/cjs/MediaSeriesLanding.js +801 -909
  58. package/dist/cjs/NavDvm.js +68 -63
  59. package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
  60. package/dist/cjs/NavMagazine.js +131 -126
  61. package/dist/cjs/NavNative.js +125 -117
  62. package/dist/cjs/OncliveHero.js +17 -17
  63. package/dist/cjs/OncliveLargeHero.js +64 -63
  64. package/dist/cjs/PageFilter.js +9 -8
  65. package/dist/cjs/PartnerDetailListing.js +288 -188
  66. package/dist/cjs/PdfDownload.js +9 -8
  67. package/dist/cjs/PopUpModal.js +15 -13
  68. package/dist/cjs/PubSection.js +21 -21
  69. package/dist/cjs/PubToc.js +8 -7
  70. package/dist/cjs/PublicationDeck.js +64 -59
  71. package/dist/cjs/PublicationLanding.js +114 -110
  72. package/dist/cjs/QueueDeckExpanded.js +286 -287
  73. package/dist/cjs/RecentNews.js +20 -19
  74. package/dist/cjs/RelatedContent.js +51 -50
  75. package/dist/cjs/RelatedTopicsDropdown.js +32 -29
  76. package/dist/cjs/RolesDeck.js +32 -27
  77. package/dist/cjs/Search.js +16 -12
  78. package/dist/cjs/SeriesListingDeck.js +26 -27
  79. package/dist/cjs/{SeriesSlider-8bbc989f.js → SeriesSlider-60fa1342.js} +38 -37
  80. package/dist/cjs/SideFooter.js +26 -25
  81. package/dist/cjs/SocialIcons.js +10 -9
  82. package/dist/cjs/{SocialSearchComponent-cea213aa.js → SocialSearchComponent-19548e2a.js} +38 -34
  83. package/dist/cjs/SocialShare.js +31 -29
  84. package/dist/cjs/TaxonomyCard.js +60 -55
  85. package/dist/cjs/TaxonomyDescription.js +24 -23
  86. package/dist/cjs/TemplateNormal.js +36 -36
  87. package/dist/cjs/ThumbnailCard.js +19 -17
  88. package/dist/cjs/Ustream.js +22 -21
  89. package/dist/cjs/VerticalHero.js +16 -15
  90. package/dist/cjs/VideoProgramLandingPage.js +45 -41
  91. package/dist/cjs/VideoSeriesCard.js +24 -23
  92. package/dist/cjs/VideoSeriesFilter.js +9 -9
  93. package/dist/cjs/VideoSeriesLandingPage.js +26 -26
  94. package/dist/cjs/VideoSeriesListing.js +58 -58
  95. package/dist/cjs/View.js +206 -202
  96. package/dist/cjs/YahooHero.js +31 -30
  97. package/dist/cjs/YoutubeGroup.js +55 -54
  98. package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-5c98aec7.js} +10 -8
  99. package/dist/cjs/{extends-0a918631.js → extends-60837c34.js} +0 -1
  100. package/dist/cjs/faundadb.js +1 -1
  101. package/dist/cjs/getRelatedArticle.js +67 -131
  102. package/dist/cjs/getSerializers.js +13 -13
  103. package/dist/cjs/{getTargeting-f1821260.js → getTargeting-3e45e4d4.js} +11 -11
  104. package/dist/cjs/getTargeting.js +2 -2
  105. package/dist/cjs/iconBase-68959171.js +0 -3
  106. package/dist/cjs/{index-98e01cb9.js → index-44481153.js} +494 -47
  107. package/dist/cjs/{index-edb47fba.js → index-87d0db67.js} +954 -1182
  108. package/dist/cjs/{index-3294d3bc.js → index-99edf08a.js} +1 -1
  109. package/dist/cjs/{index-96b3db50.js → index-9d365128.js} +12 -10
  110. package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
  111. package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
  112. package/dist/cjs/{index.esm-ff47db6f.js → index.esm-05850a2f.js} +5 -12
  113. package/dist/cjs/{index.esm-4d410430.js → index.esm-3ffa049c.js} +20 -20
  114. package/dist/cjs/{index.esm-e32d3e8e.js → index.esm-44f3e2d0.js} +3 -6
  115. package/dist/cjs/{index.esm-90433435.js → index.esm-974f47d9.js} +6 -15
  116. package/dist/cjs/index.js +65 -61
  117. package/dist/cjs/{inherits-452ff02c.js → inherits-87492b40.js} +1 -4
  118. package/dist/cjs/{lodash-fc2922d0.js → lodash-7fd85bcf.js} +71 -22
  119. package/dist/cjs/{main-02daeefe.js → main-7b5e57b0.js} +90 -54
  120. package/dist/cjs/{md5-5039b1a6.js → md5-e1ca5797.js} +1 -1
  121. package/dist/cjs/{moment-575fe24c.js → moment-ca3bd9fb.js} +10 -8
  122. package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-07939b41.js} +12 -11
  123. package/dist/cjs/timeDifferenceCalc.js +1 -1
  124. package/dist/cjs/{typeof-725500bc.js → typeof-9d7f610f.js} +1 -1
  125. package/dist/cjs/urlFor.js +3 -3
  126. package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
  127. package/dist/esm/AD.js +7 -7
  128. package/dist/esm/AD300x250.js +8 -9
  129. package/dist/esm/AD300x250x600.js +8 -9
  130. package/dist/esm/AD728x90.js +9 -10
  131. package/dist/esm/ADFloatingFooter.js +10 -11
  132. package/dist/esm/ADFooter.js +6 -6
  133. package/dist/esm/ADGutter.js +10 -11
  134. package/dist/esm/{ADInfeed-1cc9d817.js → ADInfeed-422ad6e6.js} +7 -7
  135. package/dist/esm/ADSkyscraper.js +10 -11
  136. package/dist/esm/ADSponsoredResources.js +10 -11
  137. package/dist/esm/ADWebcast.js +10 -11
  138. package/dist/esm/ADWelcome.js +14 -15
  139. package/dist/esm/{ADlgInfeed-8c4f129e.js → ADlgInfeed-f7468db8.js} +4 -4
  140. package/dist/esm/AccordionPanel.js +17 -17
  141. package/dist/esm/AdSlot.js +6 -7
  142. package/dist/esm/AdSlotsProvider.js +10 -903
  143. package/dist/esm/AlgoliaSearch.js +41 -14005
  144. package/dist/esm/AlphabeticList.js +14 -14
  145. package/dist/esm/ArticleCarousel.js +9 -9
  146. package/dist/esm/ArticleProgramLandingPage.js +22 -22
  147. package/dist/esm/ArticleSeriesLandingPage.js +18 -19
  148. package/dist/esm/ArticleSeriesListing.js +37 -38
  149. package/dist/esm/Auth.js +217 -1181
  150. package/dist/esm/AuthWrapper.js +24 -561
  151. package/dist/esm/{AuthorComponent-34b16174.js → AuthorComponent-8ffd4679.js} +10 -10
  152. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-d05b5b23.js} +4 -4
  153. package/dist/esm/Breadcrumbs.js +11 -11
  154. package/dist/esm/CMEDeck.js +61 -62
  155. package/dist/esm/Column1.js +9 -9
  156. package/dist/esm/Column2.js +17 -17
  157. package/dist/esm/Column3.js +31 -32
  158. package/dist/esm/ConferenceArticleCard.js +30 -30
  159. package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
  160. package/dist/esm/DeckContent.js +77 -78
  161. package/dist/esm/DeckQueue.js +65 -66
  162. package/dist/esm/{Dfp-b7236041.js → Dfp-85c9513e.js} +10 -11
  163. package/dist/esm/EventsDeck.js +110 -110
  164. package/dist/esm/ExternalResources.js +43 -43
  165. package/dist/esm/Feature.js +17 -17
  166. package/dist/esm/ForbesHero.js +28 -28
  167. package/dist/esm/GridContent.js +173 -174
  168. package/dist/esm/GridHero.js +29 -29
  169. package/dist/esm/GroupDeck.js +36 -36
  170. package/dist/esm/HamMagazine.js +100 -100
  171. package/dist/esm/Header.js +8 -8
  172. package/dist/esm/Hero.js +7 -7
  173. package/dist/esm/HighlightenVideo.js +14 -14
  174. package/dist/esm/HorizontalArticleListing.js +36 -36
  175. package/dist/esm/HorizontalHero.js +21 -21
  176. package/dist/esm/IssueContentDeck.js +53 -53
  177. package/dist/esm/IssueDeck.js +55 -55
  178. package/dist/esm/IssueLanding.js +57 -57
  179. package/dist/esm/KMTracker.js +15 -15
  180. package/dist/esm/LeftNav.js +17 -18
  181. package/dist/esm/MasterDeck.js +55 -56
  182. package/dist/esm/MediaSeriesLanding.js +561 -672
  183. package/dist/esm/NavDvm.js +46 -46
  184. package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
  185. package/dist/esm/NavMagazine.js +103 -103
  186. package/dist/esm/NavNative.js +92 -92
  187. package/dist/esm/OncliveHero.js +14 -15
  188. package/dist/esm/OncliveLargeHero.js +52 -52
  189. package/dist/esm/PageFilter.js +6 -6
  190. package/dist/esm/PartnerDetailListing.js +178 -79
  191. package/dist/esm/PdfDownload.js +6 -6
  192. package/dist/esm/PopUpModal.js +8 -8
  193. package/dist/esm/PubSection.js +18 -19
  194. package/dist/esm/PubToc.js +5 -5
  195. package/dist/esm/PublicationDeck.js +51 -51
  196. package/dist/esm/PublicationLanding.js +96 -96
  197. package/dist/esm/QueueDeckExpanded.js +252 -253
  198. package/dist/esm/RecentNews.js +17 -17
  199. package/dist/esm/RelatedContent.js +45 -45
  200. package/dist/esm/RelatedTopicsDropdown.js +21 -21
  201. package/dist/esm/RolesDeck.js +25 -25
  202. package/dist/esm/Search.js +7 -7
  203. package/dist/esm/SeriesListingDeck.js +21 -22
  204. package/dist/esm/{SeriesSlider-a866bb21.js → SeriesSlider-05ecb544.js} +28 -28
  205. package/dist/esm/SideFooter.js +21 -21
  206. package/dist/esm/SocialIcons.js +7 -7
  207. package/dist/esm/{SocialSearchComponent-03c3e869.js → SocialSearchComponent-47815365.js} +28 -28
  208. package/dist/esm/SocialShare.js +25 -25
  209. package/dist/esm/TaxonomyCard.js +51 -51
  210. package/dist/esm/TaxonomyDescription.js +18 -18
  211. package/dist/esm/TemplateNormal.js +32 -33
  212. package/dist/esm/ThumbnailCard.js +10 -10
  213. package/dist/esm/Ustream.js +18 -18
  214. package/dist/esm/VerticalHero.js +13 -13
  215. package/dist/esm/VideoProgramLandingPage.js +34 -34
  216. package/dist/esm/VideoSeriesCard.js +18 -18
  217. package/dist/esm/VideoSeriesFilter.js +6 -6
  218. package/dist/esm/VideoSeriesLandingPage.js +18 -19
  219. package/dist/esm/VideoSeriesListing.js +54 -55
  220. package/dist/esm/View.js +185 -185
  221. package/dist/esm/YahooHero.js +25 -25
  222. package/dist/esm/YoutubeGroup.js +39 -39
  223. package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-4abff0b1.js} +7 -6
  224. package/dist/esm/{extends-6f2fcc99.js → extends-eb69e8ac.js} +1 -1
  225. package/dist/esm/faundadb.js +1 -1
  226. package/dist/esm/getRelatedArticle.js +62 -126
  227. package/dist/esm/getSerializers.js +13 -13
  228. package/dist/esm/{getTargeting-bd800589.js → getTargeting-9cb7e014.js} +10 -10
  229. package/dist/esm/getTargeting.js +2 -2
  230. package/dist/esm/{index-41a678ea.js → index-1819118a.js} +487 -41
  231. package/dist/esm/{index-3dcc1323.js → index-20e503c9.js} +900 -1139
  232. package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
  233. package/dist/esm/{index-5f7e79e7.js → index-6c12bdd5.js} +4 -4
  234. package/dist/esm/{index-ef6d5dcf.js → index-fa2ffe86.js} +1 -1
  235. package/dist/esm/{index.es-29c1cef5.js → index.es-c6222053.js} +28 -10
  236. package/dist/esm/{index.esm-29e48d38.js → index.esm-3fdda599.js} +6 -15
  237. package/dist/esm/{index.esm-fd746768.js → index.esm-8ee5ff72.js} +17 -18
  238. package/dist/esm/{index.esm-cf08bf18.js → index.esm-a8ff922c.js} +5 -12
  239. package/dist/esm/{index.esm-f8aaeeeb.js → index.esm-c6715e80.js} +3 -6
  240. package/dist/esm/index.js +54 -53
  241. package/dist/esm/{inherits-cf8dde54.js → inherits-0d8cda6e.js} +2 -2
  242. package/dist/esm/{lodash-17fdfebb.js → lodash-ec8c6b48.js} +71 -22
  243. package/dist/esm/{main-e4a934b2.js → main-747e7d25.js} +87 -52
  244. package/dist/esm/{md5-9be0e905.js → md5-4e42248e.js} +1 -1
  245. package/dist/esm/{moment-e2f9b20c.js → moment-b6f49411.js} +10 -8
  246. package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-3822f1ce.js} +5 -5
  247. package/dist/esm/timeDifferenceCalc.js +1 -1
  248. package/dist/esm/{typeof-6435ba1c.js → typeof-af9c50d8.js} +1 -1
  249. package/dist/esm/urlFor.js +1 -1
  250. package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
  251. package/package.json +110 -110
  252. package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
  253. package/dist/cjs/events-1b438fe7.js +0 -469
  254. package/dist/cjs/index-e2e62963.js +0 -89
  255. package/dist/cjs/inherits-8d29278d.js +0 -110
  256. package/dist/esm/events-6c3a7a63.js +0 -467
  257. package/dist/esm/index-aaa2dae0.js +0 -85
  258. package/dist/esm/inherits-77d5e4fc.js +0 -101
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
-
5
3
  require('./_commonjsHelpers-06173234.js');
6
4
  require('./_to-object-329a650b.js');
7
5
  require('./es6.string.iterator-cc0bbaa4.js');
@@ -11,906 +9,16 @@ var toConsumableArray = require('./toConsumableArray-9a3476fe.js');
11
9
  require('./core.get-iterator-method-f62321d4.js');
12
10
  require('./web.dom.iterable-a0e279c1.js');
13
11
  var React = require('react');
14
- var React__default = _interopDefault(React);
15
- require('./events-1b438fe7.js');
16
- var index = require('./index-98e01cb9.js');
17
- var PropTypes = require('prop-types');
18
- var PropTypes__default = _interopDefault(PropTypes);
19
- var main = require('./main-02daeefe.js');
12
+ var index = require('./index-44481153.js');
13
+ require('prop-types');
14
+ var main = require('./main-7b5e57b0.js');
20
15
  var asyncToGenerator = require('./asyncToGenerator-140e5f89.js');
16
+ var ReactGA = require('react-ga');
21
17
 
22
- function warn(s) {
23
- console.warn('[react-ga]', s);
24
- }
25
-
26
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
27
-
28
- 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; }
29
-
30
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
31
-
32
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
33
-
34
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
35
-
36
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
-
38
- 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); } }
39
-
40
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
41
-
42
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
43
-
44
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
45
-
46
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
47
-
48
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
49
-
50
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
51
-
52
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
53
-
54
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
-
56
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
57
- var NEWTAB = '_blank';
58
- var MIDDLECLICK = 1;
59
-
60
- var OutboundLink = /*#__PURE__*/function (_Component) {
61
- _inherits(OutboundLink, _Component);
62
-
63
- var _super = _createSuper(OutboundLink);
64
-
65
- function OutboundLink() {
66
- var _this;
67
-
68
- _classCallCheck(this, OutboundLink);
69
-
70
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
71
- args[_key] = arguments[_key];
72
- }
73
-
74
- _this = _super.call.apply(_super, [this].concat(args));
75
-
76
- _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
77
- var _this$props = _this.props,
78
- target = _this$props.target,
79
- eventLabel = _this$props.eventLabel,
80
- to = _this$props.to,
81
- onClick = _this$props.onClick,
82
- trackerNames = _this$props.trackerNames;
83
- var eventMeta = {
84
- label: eventLabel
85
- };
86
- var sameTarget = target !== NEWTAB;
87
- var normalClick = !(event.ctrlKey || event.shiftKey || event.metaKey || event.button === MIDDLECLICK);
88
-
89
- if (sameTarget && normalClick) {
90
- event.preventDefault();
91
- OutboundLink.trackLink(eventMeta, function () {
92
- window.location.href = to;
93
- }, trackerNames);
94
- } else {
95
- OutboundLink.trackLink(eventMeta, function () {}, trackerNames);
96
- }
97
-
98
- if (onClick) {
99
- onClick(event);
100
- }
101
- });
102
-
103
- return _this;
104
- }
105
-
106
- _createClass(OutboundLink, [{
107
- key: "render",
108
- value: function render() {
109
- var _this$props2 = this.props,
110
- href = _this$props2.to,
111
- target = _this$props2.target,
112
- oldProps = _objectWithoutProperties(_this$props2, ["to", "target"]);
113
-
114
- var props = _objectSpread(_objectSpread({}, oldProps), {}, {
115
- target: target,
116
- href: href,
117
- onClick: this.handleClick
118
- });
119
-
120
- if (target === NEWTAB) {
121
- props.rel = "".concat(props.rel ? props.rel : '', " noopener noreferrer").trim();
122
- }
123
-
124
- delete props.eventLabel;
125
- delete props.trackerNames;
126
- return /*#__PURE__*/React__default.createElement('a', props);
127
- }
128
- }]);
129
-
130
- return OutboundLink;
131
- }(React.Component);
132
-
133
- _defineProperty(OutboundLink, "trackLink", function () {
134
- warn('ga tracking not enabled');
135
- });
136
- OutboundLink.propTypes = {
137
- eventLabel: PropTypes__default.string.isRequired,
138
- target: PropTypes__default.string,
139
- to: PropTypes__default.string,
140
- onClick: PropTypes__default.func,
141
- trackerNames: PropTypes__default.arrayOf(PropTypes__default.string)
142
- };
143
- OutboundLink.defaultProps = {
144
- target: null,
145
- to: null,
146
- onClick: null,
147
- trackerNames: null
148
- };
149
-
150
- // See if s could be an email address. We don't want to send personal data like email.
151
- // https://support.google.com/analytics/answer/2795983?hl=en
152
- function mightBeEmail(s) {
153
- // There's no point trying to validate rfc822 fully, just look for ...@...
154
- return typeof s === 'string' && s.indexOf('@') !== -1;
155
- }
156
-
157
- var redacted = 'REDACTED (Potential Email Address)';
158
- function redactEmail(string) {
159
- if (mightBeEmail(string)) {
160
- warn('This arg looks like an email address, redacting.');
161
- return redacted;
162
- }
163
-
164
- return string;
165
- }
166
-
167
- // GA strings need to have leading/trailing whitespace trimmed, and not all
168
- // browsers have String.prototoype.trim().
169
- function trim(s) {
170
- return s && s.toString().replace(/^\s+|\s+$/g, '');
171
- }
172
-
173
- /**
174
- * To Title Case 2.1 - http://individed.com/code/to-title-case/
175
- * Copyright 2008-2013 David Gouch. Licensed under the MIT License.
176
- * https://github.com/gouch/to-title-case
177
- */
178
- var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i; // test
179
-
180
- function toTitleCase(string) {
181
- return trim(string).replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function (match, index, title) {
182
- if (index > 0 && index + match.length !== title.length && match.search(smallWords) > -1 && title.charAt(index - 2) !== ':' && (title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') && title.charAt(index - 1).search(/[^\s-]/) < 0) {
183
- return match.toLowerCase();
184
- }
185
-
186
- if (match.substr(1).search(/[A-Z]|\../) > -1) {
187
- return match;
188
- }
189
-
190
- return match.charAt(0).toUpperCase() + match.substr(1);
191
- });
192
- }
193
-
194
- function format() {
195
- var s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
196
- var titleCase = arguments.length > 1 ? arguments[1] : undefined;
197
- var redactingEmail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
198
-
199
- var _str = s || '';
200
-
201
- if (titleCase) {
202
- _str = toTitleCase(s);
203
- }
204
-
205
- if (redactingEmail) {
206
- _str = redactEmail(_str);
207
- }
208
-
209
- return _str;
210
- }
211
-
212
- function removeLeadingSlash(string) {
213
- if (string.substring(0, 1) === '/') {
214
- return string.substring(1);
215
- }
216
-
217
- return string;
218
- }
219
-
220
- var isLoaded = false;
221
- function loadGA (options) {
222
- if (isLoaded) return;
223
- isLoaded = true;
224
- var gaAddress = 'https://www.google-analytics.com/analytics.js';
225
-
226
- if (options && options.gaAddress) {
227
- gaAddress = options.gaAddress;
228
- } else if (options && options.debug) {
229
- gaAddress = 'https://www.google-analytics.com/analytics_debug.js';
230
- }
231
-
232
- var onerror = options && options.onerror; // https://developers.google.com/analytics/devguides/collection/analyticsjs/
233
-
234
- /* eslint-disable */
235
-
236
- (function (i, s, o, g, r, a, m) {
237
- i['GoogleAnalyticsObject'] = r;
238
- i[r] = i[r] || function () {
239
- (i[r].q = i[r].q || []).push(arguments);
240
- }, i[r].l = 1 * new Date();
241
- a = s.createElement(o), m = s.getElementsByTagName(o)[0];
242
- a.async = 1;
243
- a.src = g;
244
- a.onerror = onerror;
245
- m.parentNode.insertBefore(a, m);
246
- })(window, document, 'script', gaAddress, 'ga');
247
- /* eslint-enable */
248
-
249
- }
250
-
251
- function log(s) {
252
- console.info('[react-ga]', s);
253
- }
254
-
255
- var gaCalls = [];
256
- var TestModeAPI = {
257
- calls: gaCalls,
258
- ga: function ga() {
259
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
260
- args[_key] = arguments[_key];
261
- }
262
-
263
- gaCalls.push([].concat(args));
264
- },
265
- resetCalls: function resetCalls() {
266
- gaCalls.length = 0;
267
- }
268
- };
269
-
270
- function _objectWithoutProperties$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$1(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
271
-
272
- function _objectWithoutPropertiesLoose$1(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
273
-
274
- 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; }
275
-
276
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
277
-
278
- function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
279
-
280
- function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
281
-
282
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
283
-
284
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
285
-
286
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
287
-
288
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
289
-
290
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
291
-
292
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
293
-
294
- var _isNotBrowser = typeof window === 'undefined' || typeof document === 'undefined';
295
-
296
- var _debug = false;
297
- var _titleCase = true;
298
- var _testMode = false;
299
- var _alwaysSendToDefaultTracker = true;
300
- var _redactEmail = true;
301
-
302
- var internalGa = function internalGa() {
303
- var _window;
304
-
305
- if (_testMode) return TestModeAPI.ga.apply(TestModeAPI, arguments);
306
- if (_isNotBrowser) return false;
307
- if (!window.ga) return warn('ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually');
308
- return (_window = window).ga.apply(_window, arguments);
309
- };
310
-
311
- function _format(s) {
312
- return format(s, _titleCase, _redactEmail);
313
- }
314
-
315
- function _gaCommand(trackerNames) {
316
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
317
- args[_key - 1] = arguments[_key];
318
- }
319
-
320
- var command = args[0];
321
-
322
- if (typeof internalGa === 'function') {
323
- if (typeof command !== 'string') {
324
- warn('ga command must be a string');
325
- return;
326
- }
327
-
328
- if (_alwaysSendToDefaultTracker || !Array.isArray(trackerNames)) internalGa.apply(void 0, args);
329
-
330
- if (Array.isArray(trackerNames)) {
331
- trackerNames.forEach(function (name) {
332
- internalGa.apply(void 0, _toConsumableArray(["".concat(name, ".").concat(command)].concat(args.slice(1))));
333
- });
334
- }
335
- }
336
- }
337
-
338
- function _initialize(gaTrackingID, options) {
339
- if (!gaTrackingID) {
340
- warn('gaTrackingID is required in initialize()');
341
- return;
342
- }
343
-
344
- if (options) {
345
- if (options.debug && options.debug === true) {
346
- _debug = true;
347
- }
348
-
349
- if (options.titleCase === false) {
350
- _titleCase = false;
351
- }
352
-
353
- if (options.redactEmail === false) {
354
- _redactEmail = false;
355
- }
356
-
357
- if (options.useExistingGa) {
358
- return;
359
- }
360
- }
361
-
362
- if (options && options.gaOptions) {
363
- internalGa('create', gaTrackingID, options.gaOptions);
364
- } else {
365
- internalGa('create', gaTrackingID, 'auto');
366
- }
367
- }
368
-
369
- function addTrackers(configsOrTrackingId, options) {
370
- if (Array.isArray(configsOrTrackingId)) {
371
- configsOrTrackingId.forEach(function (config) {
372
- if (_typeof$1(config) !== 'object') {
373
- warn('All configs must be an object');
374
- return;
375
- }
376
-
377
- _initialize(config.trackingId, config);
378
- });
379
- } else {
380
- _initialize(configsOrTrackingId, options);
381
- }
382
-
383
- return true;
384
- }
385
- function initialize(configsOrTrackingId, options) {
386
- if (options && options.testMode === true) {
387
- _testMode = true;
388
- } else {
389
- if (_isNotBrowser) {
390
- return;
391
- }
392
-
393
- if (!options || options.standardImplementation !== true) loadGA(options);
394
- }
395
-
396
- _alwaysSendToDefaultTracker = options && typeof options.alwaysSendToDefaultTracker === 'boolean' ? options.alwaysSendToDefaultTracker : true;
397
- addTrackers(configsOrTrackingId, options);
398
- }
399
- /**
400
- * ga:
401
- * Returns the original GA object.
402
- */
403
-
404
- function ga() {
405
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
406
- args[_key2] = arguments[_key2];
407
- }
408
-
409
- if (args.length > 0) {
410
- internalGa.apply(void 0, args);
411
-
412
- if (_debug) {
413
- log("called ga('arguments');");
414
- log("with arguments: ".concat(JSON.stringify(args)));
415
- }
416
- }
417
-
418
- return window.ga;
419
- }
420
- /**
421
- * set:
422
- * GA tracker set method
423
- * @param {Object} fieldsObject - a field/value pair or a group of field/value pairs on the tracker
424
- * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
425
- */
426
-
427
- function set(fieldsObject, trackerNames) {
428
- if (!fieldsObject) {
429
- warn('`fieldsObject` is required in .set()');
430
- return;
431
- }
432
-
433
- if (_typeof$1(fieldsObject) !== 'object') {
434
- warn('Expected `fieldsObject` arg to be an Object');
435
- return;
436
- }
437
-
438
- if (Object.keys(fieldsObject).length === 0) {
439
- warn('empty `fieldsObject` given to .set()');
440
- }
441
-
442
- _gaCommand(trackerNames, 'set', fieldsObject);
443
-
444
- if (_debug) {
445
- log("called ga('set', fieldsObject);");
446
- log("with fieldsObject: ".concat(JSON.stringify(fieldsObject)));
447
- }
448
- }
449
- /**
450
- * send:
451
- * Clone of the low level `ga.send` method
452
- * WARNING: No validations will be applied to this
453
- * @param {Object} fieldObject - field object for tracking different analytics
454
- * @param {Array} trackerNames - trackers to send the command to
455
- * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
456
- */
457
-
458
- function send(fieldObject, trackerNames) {
459
- _gaCommand(trackerNames, 'send', fieldObject);
460
-
461
- if (_debug) {
462
- log("called ga('send', fieldObject);");
463
- log("with fieldObject: ".concat(JSON.stringify(fieldObject)));
464
- log("with trackers: ".concat(JSON.stringify(trackerNames)));
465
- }
466
- }
467
- /**
468
- * pageview:
469
- * Basic GA pageview tracking
470
- * @param {String} path - the current page page e.g. '/about'
471
- * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
472
- * @param {String} title - (optional) the page title e. g. 'My Website'
473
- */
474
-
475
- function pageview(rawPath, trackerNames, title) {
476
- if (!rawPath) {
477
- warn('path is required in .pageview()');
478
- return;
479
- }
480
-
481
- var path = trim(rawPath);
482
-
483
- if (path === '') {
484
- warn('path cannot be an empty string in .pageview()');
485
- return;
486
- }
487
-
488
- var extraFields = {};
489
-
490
- if (title) {
491
- extraFields.title = title;
492
- }
493
-
494
- if (typeof ga === 'function') {
495
- _gaCommand(trackerNames, 'send', _objectSpread$1({
496
- hitType: 'pageview',
497
- page: path
498
- }, extraFields));
499
-
500
- if (_debug) {
501
- log("called ga('send', 'pageview', path);");
502
- var extraLog = '';
503
-
504
- if (title) {
505
- extraLog = " and title: ".concat(title);
506
- }
507
-
508
- log("with path: ".concat(path).concat(extraLog));
509
- }
510
- }
511
- }
512
- /**
513
- * modalview:
514
- * a proxy to basic GA pageview tracking to consistently track
515
- * modal views that are an equivalent UX to a traditional pageview
516
- * @param {String} modalName e.g. 'add-or-edit-club'
517
- * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
518
- */
519
-
520
- function modalview(rawModalName, trackerNames) {
521
- if (!rawModalName) {
522
- warn('modalName is required in .modalview(modalName)');
523
- return;
524
- }
525
-
526
- var modalName = removeLeadingSlash(trim(rawModalName));
527
-
528
- if (modalName === '') {
529
- warn('modalName cannot be an empty string or a single / in .modalview()');
530
- return;
531
- }
532
-
533
- if (typeof ga === 'function') {
534
- var path = "/modal/".concat(modalName);
535
-
536
- _gaCommand(trackerNames, 'send', 'pageview', path);
537
-
538
- if (_debug) {
539
- log("called ga('send', 'pageview', path);");
540
- log("with path: ".concat(path));
541
- }
542
- }
543
- }
544
- /**
545
- * timing:
546
- * GA timing
547
- * @param args.category {String} required
548
- * @param args.variable {String} required
549
- * @param args.value {Int} required
550
- * @param args.label {String} required
551
- * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
552
- */
553
-
554
- function timing() {
555
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
556
- category = _ref.category,
557
- variable = _ref.variable,
558
- value = _ref.value,
559
- label = _ref.label;
560
-
561
- var trackerNames = arguments.length > 1 ? arguments[1] : undefined;
562
-
563
- if (typeof ga === 'function') {
564
- if (!category || !variable || typeof value !== 'number') {
565
- warn('args.category, args.variable ' + 'AND args.value are required in timing() ' + 'AND args.value has to be a number');
566
- return;
567
- } // Required Fields
568
-
569
-
570
- var fieldObject = {
571
- hitType: 'timing',
572
- timingCategory: _format(category),
573
- timingVar: _format(variable),
574
- timingValue: value
575
- };
576
-
577
- if (label) {
578
- fieldObject.timingLabel = _format(label);
579
- }
580
-
581
- send(fieldObject, trackerNames);
582
- }
583
- }
584
- /**
585
- * event:
586
- * GA event tracking
587
- * @param args.category {String} required
588
- * @param args.action {String} required
589
- * @param args.label {String} optional
590
- * @param args.value {Int} optional
591
- * @param args.nonInteraction {boolean} optional
592
- * @param args.transport {string} optional
593
- * @param {{action: string, category: string}} trackerNames - (optional) a list of extra trackers to run the command on
594
- */
595
-
596
- function event() {
597
- var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
598
- category = _ref2.category,
599
- action = _ref2.action,
600
- label = _ref2.label,
601
- value = _ref2.value,
602
- nonInteraction = _ref2.nonInteraction,
603
- transport = _ref2.transport,
604
- args = _objectWithoutProperties$1(_ref2, ["category", "action", "label", "value", "nonInteraction", "transport"]);
605
-
606
- var trackerNames = arguments.length > 1 ? arguments[1] : undefined;
607
-
608
- if (typeof ga === 'function') {
609
- // Simple Validation
610
- if (!category || !action) {
611
- warn('args.category AND args.action are required in event()');
612
- return;
613
- } // Required Fields
614
-
615
-
616
- var fieldObject = {
617
- hitType: 'event',
618
- eventCategory: _format(category),
619
- eventAction: _format(action)
620
- }; // Optional Fields
621
-
622
- if (label) {
623
- fieldObject.eventLabel = _format(label);
624
- }
625
-
626
- if (typeof value !== 'undefined') {
627
- if (typeof value !== 'number') {
628
- warn('Expected `args.value` arg to be a Number.');
629
- } else {
630
- fieldObject.eventValue = value;
631
- }
632
- }
633
-
634
- if (typeof nonInteraction !== 'undefined') {
635
- if (typeof nonInteraction !== 'boolean') {
636
- warn('`args.nonInteraction` must be a boolean.');
637
- } else {
638
- fieldObject.nonInteraction = nonInteraction;
639
- }
640
- }
641
-
642
- if (typeof transport !== 'undefined') {
643
- if (typeof transport !== 'string') {
644
- warn('`args.transport` must be a string.');
645
- } else {
646
- if (['beacon', 'xhr', 'image'].indexOf(transport) === -1) {
647
- warn('`args.transport` must be either one of these values: `beacon`, `xhr` or `image`');
648
- }
649
-
650
- fieldObject.transport = transport;
651
- }
652
- }
653
-
654
- Object.keys(args).filter(function (key) {
655
- return key.substr(0, 'dimension'.length) === 'dimension';
656
- }).forEach(function (key) {
657
- fieldObject[key] = args[key];
658
- });
659
- Object.keys(args).filter(function (key) {
660
- return key.substr(0, 'metric'.length) === 'metric';
661
- }).forEach(function (key) {
662
- fieldObject[key] = args[key];
663
- }); // Send to GA
664
-
665
- send(fieldObject, trackerNames);
666
- }
667
- }
668
- /**
669
- * exception:
670
- * GA exception tracking
671
- * @param args.description {String} optional
672
- * @param args.fatal {boolean} optional
673
- * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
674
- */
675
-
676
- function exception(_ref3, trackerNames) {
677
- var description = _ref3.description,
678
- fatal = _ref3.fatal;
679
-
680
- if (typeof ga === 'function') {
681
- // Required Fields
682
- var fieldObject = {
683
- hitType: 'exception'
684
- }; // Optional Fields
685
-
686
- if (description) {
687
- fieldObject.exDescription = _format(description);
688
- }
689
-
690
- if (typeof fatal !== 'undefined') {
691
- if (typeof fatal !== 'boolean') {
692
- warn('`args.fatal` must be a boolean.');
693
- } else {
694
- fieldObject.exFatal = fatal;
695
- }
696
- } // Send to GA
697
-
698
-
699
- send(fieldObject, trackerNames);
700
- }
701
- }
702
- var plugin = {
703
- /**
704
- * require:
705
- * GA requires a plugin
706
- * @param name {String} e.g. 'ecommerce' or 'myplugin'
707
- * @param options {Object} optional e.g {path: '/log', debug: true}
708
- * @param trackerName {String} optional e.g 'trackerName'
709
- */
710
- require: function require(rawName, options, trackerName) {
711
- if (typeof ga === 'function') {
712
- // Required Fields
713
- if (!rawName) {
714
- warn('`name` is required in .require()');
715
- return;
716
- }
717
-
718
- var name = trim(rawName);
719
-
720
- if (name === '') {
721
- warn('`name` cannot be an empty string in .require()');
722
- return;
723
- }
724
-
725
- var requireString = trackerName ? "".concat(trackerName, ".require") : 'require'; // Optional Fields
726
-
727
- if (options) {
728
- if (_typeof$1(options) !== 'object') {
729
- warn('Expected `options` arg to be an Object');
730
- return;
731
- }
732
-
733
- if (Object.keys(options).length === 0) {
734
- warn('Empty `options` given to .require()');
735
- }
736
-
737
- ga(requireString, name, options);
738
-
739
- if (_debug) {
740
- log("called ga('require', '".concat(name, "', ").concat(JSON.stringify(options)));
741
- }
742
- } else {
743
- ga(requireString, name);
744
-
745
- if (_debug) {
746
- log("called ga('require', '".concat(name, "');"));
747
- }
748
- }
749
- }
750
- },
751
-
752
- /**
753
- * execute:
754
- * GA execute action for plugin
755
- * Takes variable number of arguments
756
- * @param pluginName {String} e.g. 'ecommerce' or 'myplugin'
757
- * @param action {String} e.g. 'addItem' or 'myCustomAction'
758
- * @param actionType {String} optional e.g. 'detail'
759
- * @param payload {Object} optional e.g { id: '1x5e', name : 'My product to track' }
760
- */
761
- execute: function execute(pluginName, action) {
762
- var payload;
763
- var actionType;
764
-
765
- for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
766
- args[_key3 - 2] = arguments[_key3];
767
- }
768
-
769
- if (args.length === 1) {
770
- payload = args[0];
771
- } else {
772
- actionType = args[0];
773
- payload = args[1];
774
- }
775
-
776
- if (typeof ga === 'function') {
777
- if (typeof pluginName !== 'string') {
778
- warn('Expected `pluginName` arg to be a String.');
779
- } else if (typeof action !== 'string') {
780
- warn('Expected `action` arg to be a String.');
781
- } else {
782
- var command = "".concat(pluginName, ":").concat(action);
783
- payload = payload || null;
784
-
785
- if (actionType && payload) {
786
- ga(command, actionType, payload);
787
-
788
- if (_debug) {
789
- log("called ga('".concat(command, "');"));
790
- log("actionType: \"".concat(actionType, "\" with payload: ").concat(JSON.stringify(payload)));
791
- }
792
- } else if (payload) {
793
- ga(command, payload);
794
-
795
- if (_debug) {
796
- log("called ga('".concat(command, "');"));
797
- log("with payload: ".concat(JSON.stringify(payload)));
798
- }
799
- } else {
800
- ga(command);
801
-
802
- if (_debug) {
803
- log("called ga('".concat(command, "');"));
804
- }
805
- }
806
- }
807
- }
808
- }
809
- };
810
- /**
811
- * outboundLink:
812
- * GA outboundLink tracking
813
- * @param args.label {String} e.g. url, or 'Create an Account'
814
- * @param {function} hitCallback - Called after processing a hit.
815
- */
816
-
817
- function outboundLink(args, hitCallback, trackerNames) {
818
- if (typeof hitCallback !== 'function') {
819
- warn('hitCallback function is required');
820
- return;
821
- }
822
-
823
- if (typeof ga === 'function') {
824
- // Simple Validation
825
- if (!args || !args.label) {
826
- warn('args.label is required in outboundLink()');
827
- return;
828
- } // Required Fields
829
-
830
-
831
- var fieldObject = {
832
- hitType: 'event',
833
- eventCategory: 'Outbound',
834
- eventAction: 'Click',
835
- eventLabel: _format(args.label)
836
- };
837
- var safetyCallbackCalled = false;
838
-
839
- var safetyCallback = function safetyCallback() {
840
- // This prevents a delayed response from GA
841
- // causing hitCallback from being fired twice
842
- safetyCallbackCalled = true;
843
- hitCallback();
844
- }; // Using a timeout to ensure the execution of critical application code
845
- // in the case when the GA server might be down
846
- // or an ad blocker prevents sending the data
847
- // register safety net timeout:
848
-
849
-
850
- var t = setTimeout(safetyCallback, 250);
851
-
852
- var clearableCallbackForGA = function clearableCallbackForGA() {
853
- clearTimeout(t);
854
-
855
- if (!safetyCallbackCalled) {
856
- hitCallback();
857
- }
858
- };
859
-
860
- fieldObject.hitCallback = clearableCallbackForGA; // Send to GA
861
-
862
- send(fieldObject, trackerNames);
863
- } else {
864
- // if ga is not defined, return the callback so the application
865
- // continues to work as expected
866
- setTimeout(hitCallback, 0);
867
- }
868
- }
869
- var testModeAPI = TestModeAPI;
870
- var core = {
871
- initialize: initialize,
872
- ga: ga,
873
- set: set,
874
- send: send,
875
- pageview: pageview,
876
- modalview: modalview,
877
- timing: timing,
878
- event: event,
879
- exception: exception,
880
- plugin: plugin,
881
- outboundLink: outboundLink,
882
- testModeAPI: TestModeAPI
883
- };
884
-
885
- var Defaults = /*#__PURE__*/Object.freeze({
886
- __proto__: null,
887
- addTrackers: addTrackers,
888
- initialize: initialize,
889
- ga: ga,
890
- set: set,
891
- send: send,
892
- pageview: pageview,
893
- modalview: modalview,
894
- timing: timing,
895
- event: event,
896
- exception: exception,
897
- plugin: plugin,
898
- outboundLink: outboundLink,
899
- testModeAPI: testModeAPI,
900
- 'default': core
901
- });
902
-
903
- 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; }
904
-
905
- function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
18
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
906
19
 
907
- function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
908
- OutboundLink.origTrackLink = OutboundLink.trackLink;
909
- OutboundLink.trackLink = outboundLink;
910
- var OutboundLink$1 = OutboundLink;
911
- var ReactGA = _objectSpread$2(_objectSpread$2({}, Defaults), {}, {
912
- OutboundLink: OutboundLink$1
913
- });
20
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
21
+ var ReactGA__default = /*#__PURE__*/_interopDefaultLegacy(ReactGA);
914
22
 
915
23
  var _this = undefined;
916
24
 
@@ -934,7 +42,7 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
934
42
  if (!GA_TRACKING_ID && typeof window !== 'undefined') GA_TRACKING_ID = sessionStorage.getItem('GA_TRACKING_ID');
935
43
 
936
44
  if (GA_TRACKING_ID && GA_TRACKING_ID.includes(',')) {
937
- ReactGA.event({
45
+ ReactGA__default['default'].event({
938
46
  category: category,
939
47
  action: action,
940
48
  nonInteraction: true
@@ -942,7 +50,7 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
942
50
  return 'ga_id_' + ++index;
943
51
  }));
944
52
  } else {
945
- ReactGA.event({
53
+ ReactGA__default['default'].event({
946
54
  category: category,
947
55
  action: action,
948
56
  nonInteraction: true
@@ -1012,7 +120,7 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
1012
120
  _refreshADs$mobileAds = refreshADs.mobileAds, mobileAds = _refreshADs$mobileAds === undefined ? ['leaderboard-ad'] : _refreshADs$mobileAds, _refreshADs$desktopAd = refreshADs.desktopAds, desktopAds = _refreshADs$desktopAd === undefined ? [] : _refreshADs$desktopAd;
1013
121
  ads = [];
1014
122
 
1015
- if (!main.main_36) {
123
+ if (!main.main_40) {
1016
124
  _context2.next = 8;
1017
125
  break;
1018
126
  }
@@ -1062,7 +170,7 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
1062
170
  };
1063
171
  }, []);
1064
172
 
1065
- return React__default.createElement(
173
+ return React__default['default'].createElement(
1066
174
  index.lib_1,
1067
175
  {
1068
176
  dfpNetworkId: networkID,