@mjhls/mjh-framework 1.0.966-reference-serializer-v3 → 1.0.966-test-D4S-1873

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 (165) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AlgoliaSearch.js +13 -5
  3. package/dist/cjs/ArticleProgramLandingPage.js +2 -1
  4. package/dist/cjs/Auth.js +20 -17
  5. package/dist/cjs/AuthWrapper.js +19 -13
  6. package/dist/cjs/CMEDeck.js +5 -1
  7. package/dist/cjs/Column1.js +1 -1
  8. package/dist/cjs/Column2.js +1 -1
  9. package/dist/cjs/Column3.js +1 -1
  10. package/dist/cjs/ConferenceArticleCard.js +15 -15
  11. package/dist/cjs/DeckContent.js +8 -8
  12. package/dist/cjs/Dfp-9be904d5.js +1 -1
  13. package/dist/cjs/EventsDeck.js +17 -17
  14. package/dist/cjs/ExternalResources.js +2 -1
  15. package/dist/cjs/HamMagazine.js +10 -10
  16. package/dist/cjs/Header.js +1 -1
  17. package/dist/cjs/HealthCareProfessionalModal.js +1 -1
  18. package/dist/cjs/HorizontalArticleListing.js +2 -1
  19. package/dist/cjs/IssueLanding.js +31 -30
  20. package/dist/cjs/KMTracker.js +15 -15
  21. package/dist/cjs/LeftNav.js +1 -1
  22. package/dist/cjs/MasterDeck.js +8 -8
  23. package/dist/cjs/MasterDeckPaginated.js +8 -8
  24. package/dist/cjs/{MediaSeriesCard-1420d4f2.js → MediaSeriesCard-200d270d.js} +66 -44
  25. package/dist/cjs/MediaSeriesLanding.js +8 -7
  26. package/dist/cjs/MediaSeriesLandingPaginated.js +8 -7
  27. package/dist/cjs/NavDvm.js +1 -1
  28. package/dist/cjs/NavMagazine.js +11 -11
  29. package/dist/cjs/NavNative.js +10 -10
  30. package/dist/cjs/PartnerDetailListing.js +2 -1
  31. package/dist/cjs/PartnerDetailListingPaginated.js +2 -1
  32. package/dist/cjs/PublicationLanding.js +26 -26
  33. package/dist/cjs/RelatedContent.js +28 -28
  34. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  35. package/dist/cjs/SeriesListingDeck.js +1 -1
  36. package/dist/cjs/{SeriesSlider-74546d19.js → SeriesSlider-594b19eb.js} +4 -4
  37. package/dist/cjs/SideFooter.js +2 -2
  38. package/dist/cjs/TaxonomyDescription.js +2 -1
  39. package/dist/cjs/VideoProgramLandingPage.js +2 -1
  40. package/dist/cjs/VideoSeriesCard.js +1 -1
  41. package/dist/cjs/View.js +6 -5
  42. package/dist/cjs/YoutubeGroup.js +4 -4
  43. package/dist/cjs/getSerializers.js +2 -1
  44. package/dist/cjs/{getTargeting-dab97fe1.js → getTargeting-3c5754ac.js} +9 -9
  45. package/dist/cjs/getTargeting.js +1 -1
  46. package/dist/cjs/{index-3927ac32.js → index-6bab3b25.js} +91 -556
  47. package/dist/cjs/index.js +3 -3
  48. package/dist/cjs/ustream-api-3819e4aa.js +1 -1
  49. package/dist/esm/AD.js +1 -1
  50. package/dist/esm/AD300x250.js +1 -1
  51. package/dist/esm/AD300x250x600.js +1 -1
  52. package/dist/esm/AD728x90.js +1 -1
  53. package/dist/esm/ADFloatingFooter.js +1 -1
  54. package/dist/esm/ADFooter.js +1 -1
  55. package/dist/esm/ADGutter.js +1 -1
  56. package/dist/esm/ADSkyscraper.js +1 -1
  57. package/dist/esm/ADSponsoredResources.js +1 -1
  58. package/dist/esm/ADWebcast.js +1 -1
  59. package/dist/esm/ADWelcome.js +1 -1
  60. package/dist/esm/AccordionPanel.js +1 -1
  61. package/dist/esm/AdSlot.js +1 -1
  62. package/dist/esm/AdSlotsProvider.js +1 -1
  63. package/dist/esm/AlgoliaSearch.js +14 -6
  64. package/dist/esm/AlphabeticList.js +1 -1
  65. package/dist/esm/ArticleCarousel.js +1 -1
  66. package/dist/esm/ArticleProgramLandingPage.js +3 -2
  67. package/dist/esm/ArticleSeriesLandingPage.js +1 -1
  68. package/dist/esm/ArticleSeriesListing.js +1 -1
  69. package/dist/esm/Auth.js +20 -18
  70. package/dist/esm/AuthWrapper.js +20 -14
  71. package/dist/esm/Beam.js +1 -1
  72. package/dist/esm/Breadcrumbs.js +1 -1
  73. package/dist/esm/CMEDeck.js +6 -2
  74. package/dist/esm/Column1.js +1 -2
  75. package/dist/esm/Column2.js +1 -2
  76. package/dist/esm/Column3.js +1 -2
  77. package/dist/esm/ConferenceArticleCard.js +16 -16
  78. package/dist/esm/ContentCardPaginated.js +1 -1
  79. package/dist/esm/DeckContent.js +9 -9
  80. package/dist/esm/DeckQueue.js +1 -1
  81. package/dist/esm/DeckQueuePaginated.js +1 -1
  82. package/dist/esm/Dfp-102f0beb.js +1 -1
  83. package/dist/esm/EventsDeck.js +18 -18
  84. package/dist/esm/ExternalResources.js +3 -2
  85. package/dist/esm/Feature.js +1 -1
  86. package/dist/esm/ForbesHero.js +1 -1
  87. package/dist/esm/GridContent.js +1 -1
  88. package/dist/esm/GridContentPaginated.js +1 -1
  89. package/dist/esm/GridHero.js +1 -1
  90. package/dist/esm/GroupDeck.js +1 -1
  91. package/dist/esm/HamMagazine.js +10 -11
  92. package/dist/esm/Header.js +1 -2
  93. package/dist/esm/HealthCareProfessionalModal.js +2 -2
  94. package/dist/esm/Hero.js +1 -1
  95. package/dist/esm/HighlightenVideo.js +1 -1
  96. package/dist/esm/HorizontalArticleListing.js +3 -2
  97. package/dist/esm/HorizontalHero.js +1 -1
  98. package/dist/esm/IssueContentDeck.js +1 -1
  99. package/dist/esm/IssueDeck.js +1 -1
  100. package/dist/esm/IssueLanding.js +32 -31
  101. package/dist/esm/KMTracker.js +16 -16
  102. package/dist/esm/LeftNav.js +1 -2
  103. package/dist/esm/MasterDeck.js +9 -9
  104. package/dist/esm/MasterDeckPaginated.js +9 -9
  105. package/dist/esm/{MediaSeriesCard-ae1d3c37.js → MediaSeriesCard-0f93cf68.js} +66 -44
  106. package/dist/esm/MediaSeriesLanding.js +9 -8
  107. package/dist/esm/MediaSeriesLandingPaginated.js +9 -8
  108. package/dist/esm/NavDvm.js +1 -2
  109. package/dist/esm/NavMagazine.js +11 -12
  110. package/dist/esm/NavNative.js +10 -11
  111. package/dist/esm/OncliveHero.js +1 -1
  112. package/dist/esm/OncliveLargeHero.js +1 -1
  113. package/dist/esm/PageFilter.js +1 -1
  114. package/dist/esm/PartnerDetailListing.js +3 -2
  115. package/dist/esm/PartnerDetailListingPaginated.js +3 -2
  116. package/dist/esm/PdfDownload.js +1 -1
  117. package/dist/esm/PopUpModal.js +1 -1
  118. package/dist/esm/PubSection.js +1 -1
  119. package/dist/esm/PubToc.js +1 -1
  120. package/dist/esm/PublicationDeck.js +1 -1
  121. package/dist/esm/PublicationLanding.js +27 -27
  122. package/dist/esm/QueueDeckExpanded.js +1 -1
  123. package/dist/esm/QueueDeckExpandedPaginated.js +1 -1
  124. package/dist/esm/RecentNews.js +1 -1
  125. package/dist/esm/RelatedContent.js +29 -29
  126. package/dist/esm/RelatedTopicsDropdown.js +11 -11
  127. package/dist/esm/RolesDeck.js +1 -1
  128. package/dist/esm/Schema.js +1 -1
  129. package/dist/esm/Search.js +1 -1
  130. package/dist/esm/Segment.js +1 -1
  131. package/dist/esm/SeriesListingDeck.js +2 -2
  132. package/dist/esm/{SeriesSlider-e495571f.js → SeriesSlider-f771e20d.js} +4 -4
  133. package/dist/esm/SetCookie.js +1 -1
  134. package/dist/esm/SideFooter.js +3 -3
  135. package/dist/esm/SocialIcons.js +1 -1
  136. package/dist/esm/SocialShare.js +1 -1
  137. package/dist/esm/TaxonomyCard.js +1 -1
  138. package/dist/esm/TaxonomyDescription.js +3 -2
  139. package/dist/esm/TemplateNormal.js +1 -1
  140. package/dist/esm/ThumbnailCard.js +1 -1
  141. package/dist/esm/Ustream.js +1 -1
  142. package/dist/esm/VerticalHero.js +1 -1
  143. package/dist/esm/VideoProgramLandingPage.js +3 -2
  144. package/dist/esm/VideoSeriesCard.js +2 -2
  145. package/dist/esm/VideoSeriesFilter.js +1 -1
  146. package/dist/esm/VideoSeriesLandingPage.js +1 -1
  147. package/dist/esm/VideoSeriesListing.js +1 -1
  148. package/dist/esm/View.js +7 -6
  149. package/dist/esm/YahooHero.js +1 -1
  150. package/dist/esm/YoutubeGroup.js +5 -5
  151. package/dist/esm/getKeywords.js +1 -1
  152. package/dist/esm/getQuery.js +1 -1
  153. package/dist/esm/getRelatedArticle.js +1 -1
  154. package/dist/esm/getRootDocGroup.js +1 -1
  155. package/dist/esm/getSerializers.js +2 -1
  156. package/dist/esm/getSeriesDetail.js +1 -1
  157. package/dist/esm/{getTargeting-04d979c9.js → getTargeting-42f9b439.js} +9 -9
  158. package/dist/esm/getTargeting.js +1 -1
  159. package/dist/esm/{index-e6489945.js → index-0074586c.js} +90 -556
  160. package/dist/esm/index.js +3 -3
  161. package/dist/esm/stringify-2b084bee.js +1 -1
  162. package/dist/esm/timeDifferenceCalc.js +1 -1
  163. package/dist/esm/urlFor.js +1 -1
  164. package/dist/esm/ustream-api-d3714624.js +1 -1
  165. package/package.json +115 -116
@@ -22,6 +22,7 @@ import { _ as _JSON$stringify } from './stringify-2b084bee.js';
22
22
  import Modal from 'react-bootstrap/Modal';
23
23
  import Button from 'react-bootstrap/Button';
24
24
  import Form from 'react-bootstrap/Form';
25
+ import ReactGA from 'react-ga';
25
26
  import GroupDeck from './GroupDeck.js';
26
27
  import { m as moment } from './moment-bc12cb97.js';
27
28
  import SocialShare from './SocialShare.js';
@@ -7483,17 +7484,52 @@ _defineProperty(ReactPlayer, "canEnablePIP", function (url) {
7483
7484
  var ReactPlayer = unwrapExports(ReactPlayer_1);
7484
7485
 
7485
7486
  var Audio = function Audio(_ref) {
7486
- var node = _ref.node,
7487
- _ref$audioAutoplay = _ref.audioAutoplay,
7488
- audioAutoplay = _ref$audioAutoplay === undefined ? false : _ref$audioAutoplay;
7487
+ var node = _ref.node;
7489
7488
 
7489
+ var audioSource = node.uploadAudio.asset.url;
7490
+ var reportPlay = function reportPlay() {
7491
+ console.log('Reporting audio playback play to GA');
7492
+ ReactGA.event({
7493
+ category: 'User',
7494
+ action: 'Audio Play',
7495
+ label: 'Play: ' + audioSource
7496
+ }, window.sessionStorage.GA_TRACKING_ID.split(',').map(function (id, index) {
7497
+ return 'ga_id_' + ++index;
7498
+ }));
7499
+ };
7500
+ var reportPause = function reportPause() {
7501
+ console.log('Reporting audio playback pause to GA');
7502
+ ReactGA.event({
7503
+ category: 'User',
7504
+ action: 'Audio Pause',
7505
+ label: 'Pause: ' + audioSource
7506
+ }, window.sessionStorage.GA_TRACKING_ID.split(',').map(function (id, index) {
7507
+ return 'ga_id_' + ++index;
7508
+ }));
7509
+ };
7510
+ var reportEnd = function reportEnd() {
7511
+ console.log('Reporting audio playback end to GA');
7512
+ ReactGA.event({
7513
+ category: 'User',
7514
+ action: 'Audio Playback End',
7515
+ label: 'Playback End: ' + audioSource
7516
+ }, window.sessionStorage.GA_TRACKING_ID.split(',').map(function (id, index) {
7517
+ return 'ga_id_' + ++index;
7518
+ }));
7519
+ };
7490
7520
  if (node.uploadAudio) {
7491
7521
  return React__default.createElement(
7492
7522
  'div',
7493
7523
  { className: 'audio d-block text-center mb-3' },
7494
7524
  React__default.createElement(
7495
7525
  'audio',
7496
- { controls: true, controlsList: 'nodownload', className: 'audio', autoPlay: audioAutoplay },
7526
+ {
7527
+ controls: true, controlsList: 'nodownload',
7528
+ className: 'audio',
7529
+ onPlay: reportPlay,
7530
+ onPause: reportPause,
7531
+ onEnded: reportEnd
7532
+ },
7497
7533
  React__default.createElement('source', { src: node.uploadAudio.asset.url, type: 'audio/ogg' }),
7498
7534
  React__default.createElement('source', { src: node.uploadAudio.asset.url, type: 'audio/mpeg' }),
7499
7535
  'Your browser does not support the audio element.'
@@ -7530,7 +7566,14 @@ var Audio = function Audio(_ref) {
7530
7566
  return React__default.createElement(
7531
7567
  'div',
7532
7568
  { className: 'audio' },
7533
- React__default.createElement(ReactPlayer, { url: node.audioFilePth, controls: true, width: '100%', height: '100%' }),
7569
+ React__default.createElement(ReactPlayer, { url: node.audioFilePth,
7570
+ onPlay: reportPlay,
7571
+ onPause: reportPause,
7572
+ onEnded: reportEnd,
7573
+ controls: true,
7574
+ width: '100%',
7575
+ height: '100%'
7576
+ }),
7534
7577
  node.caption && React__default.createElement(
7535
7578
  'p',
7536
7579
  { style: { fontSize: '.9rem' } },
@@ -10319,504 +10362,6 @@ var BlockTable = function BlockTable(props) {
10319
10362
  );
10320
10363
  };
10321
10364
 
10322
- var bibtexParse = createCommonjsModule(function (module, exports) {
10323
- /* start bibtexParse 0.0.24 */
10324
-
10325
- //Original work by Henrik Muehe (c) 2010
10326
- //
10327
- //CommonJS port by Mikola Lysenko 2013
10328
- //
10329
- //Port to Browser lib by ORCID / RCPETERS
10330
- //
10331
- //Issues:
10332
- //no comment handling within strings
10333
- //no string concatenation
10334
- //no variable values yet
10335
- //Grammar implemented here:
10336
- //bibtex -> (string | preamble | comment | entry)*;
10337
- //string -> '@STRING' '{' key_equals_value '}';
10338
- //preamble -> '@PREAMBLE' '{' value '}';
10339
- //comment -> '@COMMENT' '{' value '}';
10340
- //entry -> '@' key '{' key ',' key_value_list '}';
10341
- //key_value_list -> key_equals_value (',' key_equals_value)*;
10342
- //key_equals_value -> key '=' value;
10343
- //value -> value_quotes | value_braces | key;
10344
- //value_quotes -> '"' .*? '"'; // not quite
10345
- //value_braces -> '{' .*? '"'; // not quite
10346
- (function(exports) {
10347
-
10348
- function BibtexParser() {
10349
-
10350
- this.months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
10351
- this.notKey = [',','{','}',' ','='];
10352
- this.pos = 0;
10353
- this.input = "";
10354
- this.entries = new Array();
10355
-
10356
- this.currentEntry = "";
10357
-
10358
- this.setInput = function(t) {
10359
- this.input = t;
10360
- };
10361
-
10362
- this.getEntries = function() {
10363
- return this.entries;
10364
- };
10365
-
10366
- this.isWhitespace = function(s) {
10367
- return (s == ' ' || s == '\r' || s == '\t' || s == '\n');
10368
- };
10369
-
10370
- this.match = function(s, canCommentOut) {
10371
- if (canCommentOut == undefined || canCommentOut == null)
10372
- canCommentOut = true;
10373
- this.skipWhitespace(canCommentOut);
10374
- if (this.input.substring(this.pos, this.pos + s.length) == s) {
10375
- this.pos += s.length;
10376
- } else {
10377
- throw "Token mismatch, expected " + s + ", found "
10378
- + this.input.substring(this.pos);
10379
- } this.skipWhitespace(canCommentOut);
10380
- };
10381
-
10382
- this.tryMatch = function(s, canCommentOut) {
10383
- if (canCommentOut == undefined || canCommentOut == null)
10384
- canCommentOut = true;
10385
- this.skipWhitespace(canCommentOut);
10386
- if (this.input.substring(this.pos, this.pos + s.length) == s) {
10387
- return true;
10388
- } else {
10389
- return false;
10390
- } };
10391
-
10392
- /* when search for a match all text can be ignored, not just white space */
10393
- this.matchAt = function() {
10394
- while (this.input.length > this.pos && this.input[this.pos] != '@') {
10395
- this.pos++;
10396
- }
10397
- if (this.input[this.pos] == '@') {
10398
- return true;
10399
- } return false;
10400
- };
10401
-
10402
- this.skipWhitespace = function(canCommentOut) {
10403
- while (this.isWhitespace(this.input[this.pos])) {
10404
- this.pos++;
10405
- } if (this.input[this.pos] == "%" && canCommentOut == true) {
10406
- while (this.input[this.pos] != "\n") {
10407
- this.pos++;
10408
- } this.skipWhitespace(canCommentOut);
10409
- } };
10410
-
10411
- this.value_braces = function() {
10412
- var bracecount = 0;
10413
- this.match("{", false);
10414
- var start = this.pos;
10415
- var escaped = false;
10416
- while (true) {
10417
- if (!escaped) {
10418
- if (this.input[this.pos] == '}') {
10419
- if (bracecount > 0) {
10420
- bracecount--;
10421
- } else {
10422
- var end = this.pos;
10423
- this.match("}", false);
10424
- return this.input.substring(start, end);
10425
- } } else if (this.input[this.pos] == '{') {
10426
- bracecount++;
10427
- } else if (this.pos >= this.input.length - 1) {
10428
- throw "Unterminated value";
10429
- } } if (this.input[this.pos] == '\\' && escaped == false)
10430
- escaped = true;
10431
- else
10432
- escaped = false;
10433
- this.pos++;
10434
- } };
10435
-
10436
- this.value_comment = function() {
10437
- var str = '';
10438
- var brcktCnt = 0;
10439
- while (!(this.tryMatch("}", false) && brcktCnt == 0)) {
10440
- str = str + this.input[this.pos];
10441
- if (this.input[this.pos] == '{')
10442
- brcktCnt++;
10443
- if (this.input[this.pos] == '}')
10444
- brcktCnt--;
10445
- if (this.pos >= this.input.length - 1) {
10446
- throw "Unterminated value:" + this.input.substring(start);
10447
- } this.pos++;
10448
- } return str;
10449
- };
10450
-
10451
- this.value_quotes = function() {
10452
- this.match('"', false);
10453
- var start = this.pos;
10454
- var escaped = false;
10455
- while (true) {
10456
- if (!escaped) {
10457
- if (this.input[this.pos] == '"') {
10458
- var end = this.pos;
10459
- this.match('"', false);
10460
- return this.input.substring(start, end);
10461
- } else if (this.pos >= this.input.length - 1) {
10462
- throw "Unterminated value:" + this.input.substring(start);
10463
- } }
10464
- if (this.input[this.pos] == '\\' && escaped == false)
10465
- escaped = true;
10466
- else
10467
- escaped = false;
10468
- this.pos++;
10469
- } };
10470
-
10471
- this.single_value = function() {
10472
- var start = this.pos;
10473
- if (this.tryMatch("{")) {
10474
- return this.value_braces();
10475
- } else if (this.tryMatch('"')) {
10476
- return this.value_quotes();
10477
- } else {
10478
- var k = this.key();
10479
- if (k.match("^[0-9]+$"))
10480
- return k;
10481
- else if (this.months.indexOf(k.toLowerCase()) >= 0)
10482
- return k.toLowerCase();
10483
- else
10484
- throw "Value expected:" + this.input.substring(start) + ' for key: ' + k;
10485
-
10486
- } };
10487
-
10488
- this.value = function() {
10489
- var values = [];
10490
- values.push(this.single_value());
10491
- while (this.tryMatch("#")) {
10492
- this.match("#");
10493
- values.push(this.single_value());
10494
- } return values.join("");
10495
- };
10496
-
10497
- this.key = function(optional) {
10498
- var start = this.pos;
10499
- while (true) {
10500
- if (this.pos >= this.input.length) {
10501
- throw "Runaway key";
10502
- } // а-яА-Я is Cyrillic
10503
- //console.log(this.input[this.pos]);
10504
- if (this.notKey.indexOf(this.input[this.pos]) >= 0) {
10505
- if (optional && this.input[this.pos] != ',') {
10506
- this.pos = start;
10507
- return null;
10508
- } return this.input.substring(start, this.pos);
10509
- } else {
10510
- this.pos++;
10511
-
10512
- } } };
10513
-
10514
- this.key_equals_value = function() {
10515
- var key = this.key();
10516
- if (this.tryMatch("=")) {
10517
- this.match("=");
10518
- var val = this.value();
10519
- key = key.trim();
10520
- return [ key, val ];
10521
- } else {
10522
- throw "... = value expected, equals sign missing:"
10523
- + this.input.substring(this.pos);
10524
- } };
10525
-
10526
- this.key_value_list = function() {
10527
- var kv = this.key_equals_value();
10528
- this.currentEntry['entryTags'] = {};
10529
- this.currentEntry['entryTags'][kv[0]] = kv[1];
10530
- while (this.tryMatch(",")) {
10531
- this.match(",");
10532
- // fixes problems with commas at the end of a list
10533
- if (this.tryMatch("}")) {
10534
- break;
10535
- }
10536
- kv = this.key_equals_value();
10537
- this.currentEntry['entryTags'][kv[0]] = kv[1];
10538
- } };
10539
-
10540
- this.entry_body = function(d) {
10541
- this.currentEntry = {};
10542
- this.currentEntry['citationKey'] = this.key(true);
10543
- this.currentEntry['entryType'] = d.substring(1);
10544
- if (this.currentEntry['citationKey'] != null) {
10545
- this.match(",");
10546
- }
10547
- this.key_value_list();
10548
- this.entries.push(this.currentEntry);
10549
- };
10550
-
10551
- this.directive = function() {
10552
- this.match("@");
10553
- return "@" + this.key();
10554
- };
10555
-
10556
- this.preamble = function() {
10557
- this.currentEntry = {};
10558
- this.currentEntry['entryType'] = 'PREAMBLE';
10559
- this.currentEntry['entry'] = this.value_comment();
10560
- this.entries.push(this.currentEntry);
10561
- };
10562
-
10563
- this.comment = function() {
10564
- this.currentEntry = {};
10565
- this.currentEntry['entryType'] = 'COMMENT';
10566
- this.currentEntry['entry'] = this.value_comment();
10567
- this.entries.push(this.currentEntry);
10568
- };
10569
-
10570
- this.entry = function(d) {
10571
- this.entry_body(d);
10572
- };
10573
-
10574
- this.alernativeCitationKey = function () {
10575
- this.entries.forEach(function (entry) {
10576
- if (!entry.citationKey && entry.entryTags) {
10577
- entry.citationKey = '';
10578
- if (entry.entryTags.author) {
10579
- entry.citationKey += entry.entryTags.author.split(',')[0] += ', ';
10580
- }
10581
- entry.citationKey += entry.entryTags.year;
10582
- }
10583
- });
10584
- };
10585
-
10586
- this.bibtex = function() {
10587
- while (this.matchAt()) {
10588
- var d = this.directive();
10589
- this.match("{");
10590
- if (d.toUpperCase() == "@STRING") {
10591
- this.string();
10592
- } else if (d.toUpperCase() == "@PREAMBLE") {
10593
- this.preamble();
10594
- } else if (d.toUpperCase() == "@COMMENT") {
10595
- this.comment();
10596
- } else {
10597
- this.entry(d);
10598
- }
10599
- this.match("}");
10600
- }
10601
- this.alernativeCitationKey();
10602
- };
10603
- }
10604
- exports.toJSON = function(bibtex) {
10605
- var b = new BibtexParser();
10606
- b.setInput(bibtex);
10607
- b.bibtex();
10608
- return b.entries;
10609
- };
10610
-
10611
- /* added during hackathon don't hate on me */
10612
- exports.toBibtex = function(json) {
10613
- var out = '';
10614
- for ( var i in json) {
10615
- out += "@" + json[i].entryType;
10616
- out += '{';
10617
- if (json[i].citationKey)
10618
- out += json[i].citationKey + ', ';
10619
- if (json[i].entry)
10620
- out += json[i].entry ;
10621
- if (json[i].entryTags) {
10622
- var tags = '';
10623
- for (var jdx in json[i].entryTags) {
10624
- if (tags.length != 0)
10625
- tags += ', ';
10626
- tags += jdx + '= {' + json[i].entryTags[jdx] + '}';
10627
- }
10628
- out += tags;
10629
- }
10630
- out += '}\n\n';
10631
- }
10632
- return out;
10633
-
10634
- };
10635
-
10636
- })(exports);
10637
-
10638
- /* end bibtexParse */
10639
- });
10640
-
10641
- var References = function References(_ref) {
10642
- var node = _ref.node,
10643
- getSerializers = _ref.getSerializers;
10644
- var referenceslist = node.referenceslist;
10645
-
10646
- var getGoogleScholarUrl = function getGoogleScholarUrl(citationText, citationReferenceFormat) {
10647
- if (citationReferenceFormat == 'Bibtex' && citationText.length > 0 && citationText[0].children && citationText[0].children.length > 0 && citationText[0].children[0].text) {
10648
- var url = 'https://scholar.google.com/scholar_lookup?';
10649
- var bibtexJson = bibtexParse.toJSON(citationText[0].children[0].text)[0];
10650
- if (bibtexJson.entryTags) {
10651
- if (bibtexJson.entryTags.title) url += 'title=' + bibtexJson.entryTags.title;
10652
- if (bibtexJson.entryTags.author) {
10653
- bibtexJson.entryTags.author.split(',').map(function (authorName) {
10654
- return url += '&author=' + authorName;
10655
- });
10656
- }
10657
- if (bibtexJson.entryTags.year) {
10658
- url += '&publication_year=' + bibtexJson.entryTags.year;
10659
- }
10660
- if (bibtexJson.entryTags.journal) {
10661
- url += '&journal=' + bibtexJson.entryTags.journal;
10662
- }
10663
- if (bibtexJson.entryTags.volume) {
10664
- url += '&volume=' + bibtexJson.entryTags.volume;
10665
- }
10666
- if (bibtexJson.entryTags.pages) {
10667
- url += '&pages=' + bibtexJson.entryTags.pages.replace('--', '-');
10668
- }
10669
- }
10670
- return url;
10671
- }
10672
- };
10673
- var getPubmedUrl = function getPubmedUrl(citationText, citationReferenceFormat) {
10674
- if (citationReferenceFormat == 'URL' && citationText.length > 0 && citationText[0].children && citationText[0].children.length > 0 && citationText[0].children[0].text) {
10675
- return citationText[0].children[0].text;
10676
- }
10677
- };
10678
- var getCrossrefUrl = function getCrossrefUrl(citationText, citationReferenceFormat) {
10679
- if (citationReferenceFormat == 'URL' && citationText.length > 0 && citationText[0].children && citationText[0].children.length > 0 && citationText[0].children[0].text) {
10680
- if (citationText[0].children[0].text.includes('dx.doi.org')) {
10681
- return citationText[0].children[0].text;
10682
- } else {
10683
- return 'http://dx.doi.org/' + citationText[0].children[0].text;
10684
- }
10685
- }
10686
- };
10687
- return React__default.createElement(
10688
- 'div',
10689
- { className: 'references-list' },
10690
- React__default.createElement(
10691
- Head,
10692
- null,
10693
- React__default.createElement('script', { src: 'https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js' }),
10694
- React__default.createElement('script', { src: 'https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js' })
10695
- ),
10696
- React__default.createElement(
10697
- 'p',
10698
- { className: 'reference-title' },
10699
- React__default.createElement(
10700
- 'strong',
10701
- null,
10702
- 'REFERENCES'
10703
- )
10704
- ),
10705
- referenceslist && referenceslist.map(function (reference, ref_index) {
10706
- return React__default.createElement(
10707
- 'div',
10708
- { key: reference._key, id: reference.referenceID, className: 'reference-container' },
10709
- React__default.createElement(
10710
- 'div',
10711
- { className: 'reference-details', style: { display: 'flex', flexDirection: 'row' } },
10712
- React__default.createElement(
10713
- 'span',
10714
- null,
10715
- ref_index + 1,
10716
- '.\xA0'
10717
- ),
10718
- React__default.createElement(BlockContent, { blocks: reference.referenceTitle, serializers: getSerializers })
10719
- ),
10720
- reference.citations && reference.citations.length > 0 && React__default.createElement(
10721
- 'div',
10722
- { className: 'row citations-container ml-3 mr-3 mb-2' },
10723
- reference.citations.map(function (citation, cit_index) {
10724
- return React__default.createElement(
10725
- 'div',
10726
- { key: 'citation_' + cit_index, className: 'mr-3 citation-link' },
10727
- citation.citationName === 'googleScholar' ? React__default.createElement(
10728
- 'a',
10729
- { target: '_blank', href: getGoogleScholarUrl(citation.citationText, citation.citationReferenceFormat) },
10730
- 'Google Scholar'
10731
- ) : citation.citationName === 'pubMed' ? React__default.createElement(
10732
- 'a',
10733
- { target: '_blank', href: getPubmedUrl(citation.citationText, citation.citationReferenceFormat) },
10734
- 'PubMed'
10735
- ) : React__default.createElement(
10736
- 'a',
10737
- { target: '_blank', href: getCrossrefUrl(citation.citationText, citation.citationReferenceFormat) },
10738
- 'Crossref'
10739
- )
10740
- );
10741
- })
10742
- ),
10743
- React__default.createElement(
10744
- 'div',
10745
- {
10746
- className: 'modal fade',
10747
- id: 'reference_' + reference.referenceID,
10748
- tabindex: '-1',
10749
- role: 'dialog',
10750
- 'aria-labelledby': 'reference-modal-' + reference.referenceID,
10751
- 'aria-hidden': 'true' },
10752
- React__default.createElement(
10753
- 'div',
10754
- { className: 'modal-dialog modal-dialog-centered', role: 'document' },
10755
- React__default.createElement(
10756
- 'div',
10757
- { className: 'modal-content' },
10758
- React__default.createElement(
10759
- 'div',
10760
- { className: 'modal-body' },
10761
- React__default.createElement(
10762
- 'button',
10763
- { type: 'button', className: 'close', 'data-dismiss': 'modal', 'aria-label': 'Close' },
10764
- React__default.createElement(
10765
- 'span',
10766
- { 'aria-hidden': 'true' },
10767
- '\xD7'
10768
- )
10769
- ),
10770
- React__default.createElement(
10771
- 'div',
10772
- { className: 'reference-details', style: { display: 'flex', flexDirection: 'row' } },
10773
- React__default.createElement(
10774
- 'span',
10775
- null,
10776
- ref_index + 1,
10777
- '.\xA0'
10778
- ),
10779
- React__default.createElement(BlockContent, { blocks: reference.referenceTitle, serializers: getSerializers })
10780
- ),
10781
- reference.citations && reference.citations.length > 0 && React__default.createElement(
10782
- 'div',
10783
- { className: 'row citations-container ml-3 mr-3 mb-2' },
10784
- reference.citations.map(function (citation, cit_index) {
10785
- return React__default.createElement(
10786
- 'div',
10787
- { key: 'citation_' + cit_index, className: 'mr-3 citation-link' },
10788
- citation.citationName === 'googleScholar' ? React__default.createElement(
10789
- 'a',
10790
- { target: '_blank', href: getGoogleScholarUrl(citation.citationText, citation.citationReferenceFormat) },
10791
- 'Google Scholar'
10792
- ) : citation.citationName === 'pubMed' ? React__default.createElement(
10793
- 'a',
10794
- { target: '_blank', href: getPubmedUrl(citation.citationText, citation.citationReferenceFormat) },
10795
- 'PubMed'
10796
- ) : React__default.createElement(
10797
- 'a',
10798
- { target: '_blank', href: getCrossrefUrl(citation.citationText, citation.citationReferenceFormat) },
10799
- 'Crossref'
10800
- )
10801
- );
10802
- })
10803
- )
10804
- )
10805
- )
10806
- )
10807
- )
10808
- );
10809
- }),
10810
- React__default.createElement(
10811
- 'style',
10812
- { jsx: 'true' },
10813
- '\n .reference-details p {\n margin-bottom: 0.5rem;\n }\n .citation-link a {\n text-decoration: none;\n color: var(--primary);\n padding: 0.25rem 0.5rem;\n }\n .citation-link a:hover {\n color: #ffffff;\n background-color: var(--primary);\n border-radius: 15px;\n }\n '
10814
- )
10815
- );
10816
- };
10817
-
10818
- var References$1 = React__default.memo(References);
10819
-
10820
10365
  var ScrollToElement = function ScrollToElement(elementId) {
10821
10366
  var element = document.getElementById(elementId);
10822
10367
  if (element) {
@@ -10935,57 +10480,52 @@ var getSerializers = function getSerializers() {
10935
10480
 
10936
10481
  return React__default.createElement(MultiFigure, { node: node, client: client, getSerializers: getSerializers.apply(undefined, props) });
10937
10482
  },
10938
- referencesList: function referencesList(_ref6) {
10483
+ slideshow: function slideshow(_ref6) {
10939
10484
  var node = _ref6.node;
10940
-
10941
- return React__default.createElement(References$1, { node: node, client: client, getSerializers: getSerializers.apply(undefined, props) });
10942
- },
10943
- slideshow: function slideshow(_ref7) {
10944
- var node = _ref7.node;
10945
10485
  var slides = node.slides;
10946
10486
 
10947
10487
  return React__default.createElement(Slideshow$1, { slides: slides, client: client, pageview: pageview });
10948
10488
  },
10949
- sidebar: function sidebar(_ref8) {
10950
- var node = _ref8.node;
10489
+ sidebar: function sidebar(_ref7) {
10490
+ var node = _ref7.node;
10951
10491
  var caption = node.caption,
10952
10492
  content = node.content;
10953
10493
 
10954
10494
  return React__default.createElement(Sidebar, { caption: caption, content: content, getSerializers: getSerializers.apply(undefined, props) });
10955
10495
  },
10956
- datatable: function datatable(_ref9) {
10957
- var node = _ref9.node;
10496
+ datatable: function datatable(_ref8) {
10497
+ var node = _ref8.node;
10958
10498
  var table = node.table;
10959
10499
 
10960
10500
  return React__default.createElement(TableShow, { rows: table.rows });
10961
10501
  },
10962
- media: function media(_ref10) {
10963
- var node = _ref10.node;
10502
+ media: function media(_ref9) {
10503
+ var node = _ref9.node;
10964
10504
 
10965
10505
  return React__default.createElement(Media, { node: node, client: client });
10966
10506
  },
10967
- iframe: function iframe(_ref11) {
10968
- var node = _ref11.node;
10507
+ iframe: function iframe(_ref10) {
10508
+ var node = _ref10.node;
10969
10509
 
10970
10510
  return React__default.createElement(IFrame, { url: node.url, needSegmentSupport: node.needSegmentSupport });
10971
10511
  },
10972
- video: function video(_ref12) {
10973
- var node = _ref12.node;
10512
+ video: function video(_ref11) {
10513
+ var node = _ref11.node;
10974
10514
 
10975
10515
  return React__default.createElement(Video, { node: node, autoplay: autoplay, accountIDs: videoAccountIDs || {}, targeting: targeting, nextVideo: nextVideo });
10976
10516
  },
10977
- audio: function audio(_ref13) {
10978
- var node = _ref13.node;
10517
+ audio: function audio(_ref12) {
10518
+ var node = _ref12.node;
10979
10519
 
10980
10520
  return React__default.createElement(Audio, { node: node, audioAutoplay: audioAutoplay });
10981
10521
  },
10982
- poll: function poll(_ref14) {
10983
- var node = _ref14.node;
10522
+ poll: function poll(_ref13) {
10523
+ var node = _ref13.node;
10984
10524
 
10985
10525
  return React__default.createElement(Poll$1, { node: node, client: client, pageview: pageview, videoAccountIDs: videoAccountIDs, showVotes: showVotes, onVote: onVote, getSerializers: getSerializers.apply(undefined, props) });
10986
10526
  },
10987
- pollMultiChoice: function pollMultiChoice(_ref15) {
10988
- var node = _ref15.node;
10527
+ pollMultiChoice: function pollMultiChoice(_ref14) {
10528
+ var node = _ref14.node;
10989
10529
 
10990
10530
  return React__default.createElement(Poll, {
10991
10531
  node: node,
@@ -10997,31 +10537,31 @@ var getSerializers = function getSerializers() {
10997
10537
  getSerializers: getSerializers.apply(undefined, props)
10998
10538
  });
10999
10539
  },
11000
- quiz: function quiz(_ref16) {
11001
- var node = _ref16.node;
10540
+ quiz: function quiz(_ref15) {
10541
+ var node = _ref15.node;
11002
10542
  var quizzes = node.quizzes;
11003
10543
 
11004
10544
  return React__default.createElement(Quiz, { quizzes: quizzes, getSerializers: getSerializers.apply(undefined, props), pageview: pageview, currentPage: currentPage });
11005
10545
  },
11006
- leads: function leads(_ref17) {
11007
- var node = _ref17.node;
10546
+ leads: function leads(_ref16) {
10547
+ var node = _ref16.node;
11008
10548
  var leadID = node.leadID;
11009
10549
 
11010
10550
  var url = '' + drupalLeadSettings.baseUrl + leadID;
11011
10551
  return React__default.createElement(Leads, { url: url });
11012
10552
  },
11013
- slideshows: function slideshows(_ref18) {
11014
- var node = _ref18.node;
10553
+ slideshows: function slideshows(_ref17) {
10554
+ var node = _ref17.node;
11015
10555
 
11016
10556
  return React__default.createElement(Slideshow, { node: node, client: client, pageview: pageview, getSerializers: getSerializers.apply(undefined, props) });
11017
10557
  },
11018
- nativeAd: function nativeAd(_ref19) {
11019
- var node = _ref19.node;
10558
+ nativeAd: function nativeAd(_ref18) {
10559
+ var node = _ref18.node;
11020
10560
 
11021
10561
  return React__default.createElement(NativeAd, { node: node });
11022
10562
  },
11023
- html_anchor_links: function html_anchor_links(_ref20) {
11024
- var node = _ref20.node;
10563
+ html_anchor_links: function html_anchor_links(_ref19) {
10564
+ var node = _ref19.node;
11025
10565
 
11026
10566
  return React__default.createElement(AnchorLinkElement, { node: node, getSerializers: getSerializers.apply(undefined, props), articleId: articleId });
11027
10567
  },
@@ -11031,8 +10571,8 @@ var getSerializers = function getSerializers() {
11031
10571
  brtag: function brtag() {
11032
10572
  return React__default.createElement('br', { className: 'line-break' });
11033
10573
  },
11034
- formstack: function formstack(_ref21) {
11035
- var node = _ref21.node;
10574
+ formstack: function formstack(_ref20) {
10575
+ var node = _ref20.node;
11036
10576
  var FormID = node.FormID,
11037
10577
  Caption = node.Caption,
11038
10578
  needSegmentSupport = node.needSegmentSupport;
@@ -11040,13 +10580,13 @@ var getSerializers = function getSerializers() {
11040
10580
  return React__default.createElement(Formstack, { FormID: FormID, Caption: Caption, needSegmentSupport: needSegmentSupport });
11041
10581
  },
11042
10582
  formassembly: FormAssembly,
11043
- multimedia: function multimedia(_ref22) {
11044
- var node = _ref22.node;
10583
+ multimedia: function multimedia(_ref21) {
10584
+ var node = _ref21.node;
11045
10585
 
11046
10586
  return React__default.createElement(MultiMedia, { node: node, client: client });
11047
10587
  },
11048
- blockTable: function blockTable(_ref23) {
11049
- var node = _ref23.node;
10588
+ blockTable: function blockTable(_ref22) {
10589
+ var node = _ref22.node;
11050
10590
  return React__default.createElement(BlockTable, { node: node, client: client, getSerializers: getSerializers.apply(undefined, props) });
11051
10591
  }
11052
10592
  },
@@ -11072,13 +10612,7 @@ var getSerializers = function getSerializers() {
11072
10612
  blank = _props$mark.blank,
11073
10613
  color = _props$mark.color;
11074
10614
 
11075
- if (href && href.charAt(0) === '#' && href.includes('#reference_')) {
11076
- return React__default.createElement(
11077
- 'a',
11078
- { 'data-toggle': 'modal', 'data-target': href },
11079
- children
11080
- );
11081
- }
10615
+
11082
10616
  if (href && href.charAt(0) === '#') {
11083
10617
  var elementId = href.slice(1);
11084
10618
  if (articleId) elementId = elementId + '-' + articleId;
@@ -11098,32 +10632,32 @@ var getSerializers = function getSerializers() {
11098
10632
  children
11099
10633
  ) : children;
11100
10634
  },
11101
- alignleft: function alignleft(_ref24) {
11102
- var children = _ref24.children;
10635
+ alignleft: function alignleft(_ref23) {
10636
+ var children = _ref23.children;
11103
10637
  return React__default.createElement(
11104
10638
  'div',
11105
10639
  { style: { textAlign: 'left' } },
11106
10640
  children
11107
10641
  );
11108
10642
  },
11109
- alignright: function alignright(_ref25) {
11110
- var children = _ref25.children;
10643
+ alignright: function alignright(_ref24) {
10644
+ var children = _ref24.children;
11111
10645
  return React__default.createElement(
11112
10646
  'div',
11113
10647
  { style: { textAlign: 'right' } },
11114
10648
  children
11115
10649
  );
11116
10650
  },
11117
- aligncenter: function aligncenter(_ref26) {
11118
- var children = _ref26.children;
10651
+ aligncenter: function aligncenter(_ref25) {
10652
+ var children = _ref25.children;
11119
10653
  return React__default.createElement(
11120
10654
  'div',
11121
10655
  { style: { textAlign: 'center' } },
11122
10656
  children
11123
10657
  );
11124
10658
  },
11125
- alignjustify: function alignjustify(_ref27) {
11126
- var children = _ref27.children;
10659
+ alignjustify: function alignjustify(_ref26) {
10660
+ var children = _ref26.children;
11127
10661
  return React__default.createElement(
11128
10662
  'div',
11129
10663
  { style: { textAlign: 'justify' } },