@mjhls/mjh-framework 1.0.859-beta.4 → 1.0.859-d4d-374

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