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

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 (312) hide show
  1. package/dist/cjs/AD.js +10 -9
  2. package/dist/cjs/AD300x250.js +30 -30
  3. package/dist/cjs/AD300x250x600.js +30 -30
  4. package/dist/cjs/AD728x90.js +33 -33
  5. package/dist/cjs/ADFloatingFooter.js +32 -32
  6. package/dist/cjs/ADFooter.js +15 -14
  7. package/dist/cjs/ADGutter.js +32 -32
  8. package/dist/cjs/{ADInfeed-98c71bcd.js → ADInfeed-f8324b70.js} +15 -13
  9. package/dist/cjs/ADSkyscraper.js +32 -32
  10. package/dist/cjs/ADSponsoredResources.js +32 -32
  11. package/dist/cjs/ADWebcast.js +32 -32
  12. package/dist/cjs/ADWelcome.js +33 -33
  13. package/dist/cjs/{ADlgInfeed-9de32585.js → ADlgInfeed-98d7c699.js} +11 -10
  14. package/dist/cjs/AccordionPanel.js +31 -29
  15. package/dist/cjs/AdSlot.js +35 -35
  16. package/dist/cjs/AdSlotsProvider.js +20 -912
  17. package/dist/cjs/AlgoliaSearch.js +60 -14023
  18. package/dist/cjs/AlphabeticList.js +26 -25
  19. package/dist/cjs/ArticleCarousel.js +25 -21
  20. package/dist/cjs/ArticleProgramLandingPage.js +62 -62
  21. package/dist/cjs/ArticleSeriesLandingPage.js +43 -43
  22. package/dist/cjs/ArticleSeriesListing.js +62 -62
  23. package/dist/cjs/Auth.js +682 -1506
  24. package/dist/cjs/AuthWrapper.js +310 -268
  25. package/dist/cjs/{AuthorComponent-bb831b74.js → AuthorComponent-c21aac7f.js} +14 -13
  26. package/dist/cjs/Beam.js +8 -8
  27. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-36e54d77.js} +56 -55
  28. package/dist/cjs/Breadcrumbs.js +29 -27
  29. package/dist/cjs/CMEDeck.js +83 -84
  30. package/dist/cjs/Column1.js +14 -11
  31. package/dist/cjs/Column2.js +36 -33
  32. package/dist/cjs/Column3.js +61 -59
  33. package/dist/cjs/ConferenceArticleCard.js +23 -22
  34. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  35. package/dist/cjs/DeckContent.js +99 -96
  36. package/dist/cjs/DeckQueue.js +92 -89
  37. package/dist/cjs/{Dfp-26baccf1.js → Dfp-3f0ed4c8.js} +34 -34
  38. package/dist/cjs/EventsDeck.js +142 -135
  39. package/dist/cjs/ExternalResources.js +80 -80
  40. package/dist/cjs/Feature.js +26 -24
  41. package/dist/cjs/ForbesHero.js +43 -42
  42. package/dist/cjs/GridContent.js +238 -234
  43. package/dist/cjs/GridHero.js +45 -44
  44. package/dist/cjs/GroupDeck.js +60 -59
  45. package/dist/cjs/HamMagazine.js +137 -132
  46. package/dist/cjs/Header.js +14 -12
  47. package/dist/cjs/Hero.js +13 -12
  48. package/dist/cjs/HighlightenVideo.js +18 -17
  49. package/dist/cjs/HorizontalArticleListing.js +72 -72
  50. package/dist/cjs/HorizontalHero.js +26 -25
  51. package/dist/cjs/IssueContentDeck.js +78 -73
  52. package/dist/cjs/IssueDeck.js +77 -72
  53. package/dist/cjs/IssueLanding.js +67 -67
  54. package/dist/cjs/LeftNav.js +40 -39
  55. package/dist/cjs/MasterDeck.js +72 -72
  56. package/dist/cjs/MediaSeriesLanding.js +1186 -1095
  57. package/dist/cjs/NavDvm.js +79 -74
  58. package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
  59. package/dist/cjs/NavMagazine.js +143 -138
  60. package/dist/cjs/NavNative.js +138 -130
  61. package/dist/cjs/OncliveHero.js +19 -19
  62. package/dist/cjs/OncliveLargeHero.js +73 -72
  63. package/dist/cjs/PageFilter.js +15 -14
  64. package/dist/cjs/PartnerDetailListing.js +118 -3919
  65. package/dist/cjs/PdfDownload.js +10 -9
  66. package/dist/cjs/PopUpModal.js +21 -19
  67. package/dist/cjs/PubSection.js +43 -43
  68. package/dist/cjs/PubToc.js +16 -15
  69. package/dist/cjs/PublicationDeck.js +67 -62
  70. package/dist/cjs/PublicationLanding.js +112 -108
  71. package/dist/cjs/QueueDeckExpanded.js +310 -311
  72. package/dist/cjs/RecentNews.js +23 -22
  73. package/dist/cjs/RelatedContent.js +27 -26
  74. package/dist/cjs/RelatedTopicsDropdown.js +22 -19
  75. package/dist/cjs/RolesDeck.js +32 -27
  76. package/dist/cjs/Search.js +22 -18
  77. package/dist/cjs/Segment.js +6 -6
  78. package/dist/cjs/SeriesListingDeck.js +38 -39
  79. package/dist/cjs/{SeriesSlider-8bbc989f.js → SeriesSlider-e3e8ead7.js} +36 -35
  80. package/dist/cjs/SetCookie.js +1 -1
  81. package/dist/cjs/SideFooter.js +37 -36
  82. package/dist/cjs/SocialIcons.js +10 -9
  83. package/dist/cjs/{SocialSearchComponent-cea213aa.js → SocialSearchComponent-948138c7.js} +40 -36
  84. package/dist/cjs/SocialShare.js +31 -29
  85. package/dist/cjs/TaxonomyCard.js +64 -59
  86. package/dist/cjs/TaxonomyDescription.js +55 -55
  87. package/dist/cjs/TemplateNormal.js +74 -74
  88. package/dist/cjs/ThumbnailCard.js +23 -21
  89. package/dist/cjs/Ustream.js +31 -30
  90. package/dist/cjs/VerticalHero.js +17 -16
  91. package/dist/cjs/VideoProgramLandingPage.js +79 -76
  92. package/dist/cjs/VideoSeriesCard.js +32 -31
  93. package/dist/cjs/VideoSeriesFilter.js +18 -18
  94. package/dist/cjs/VideoSeriesLandingPage.js +52 -52
  95. package/dist/cjs/VideoSeriesListing.js +79 -79
  96. package/dist/cjs/View.js +265 -263
  97. package/dist/cjs/YahooHero.js +42 -41
  98. package/dist/cjs/YoutubeGroup.js +82 -75
  99. package/dist/cjs/{_is-array-754e012d.js → _is-array-6128bd56.js} +6 -6
  100. package/dist/cjs/{_iter-detect-60b2f026.js → _iter-detect-55a5657a.js} +8 -8
  101. package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
  102. package/dist/cjs/{_object-sap-5e74ba08.js → _object-sap-a175b4a9.js} +1 -1
  103. package/dist/cjs/{_object-to-array-5762f850.js → _object-to-array-8fe5a54f.js} +2 -2
  104. package/dist/cjs/{_to-object-329a650b.js → _to-object-6de10e57.js} +8 -8
  105. package/dist/cjs/{asyncToGenerator-140e5f89.js → asyncToGenerator-58c289d9.js} +32 -32
  106. package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-a195642e.js} +11 -9
  107. package/dist/cjs/{core.get-iterator-method-f62321d4.js → core.get-iterator-method-f474eacc.js} +2 -2
  108. package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
  109. package/dist/cjs/{define-property-f4d12f4e.js → define-property-c88be878.js} +6 -6
  110. package/dist/cjs/{defineProperty-55548b25.js → defineProperty-0cb76d99.js} +1 -1
  111. package/dist/cjs/{entities-310b46ee.js → entities-3f9d0f2f.js} +1 -1
  112. package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
  113. package/dist/cjs/{es6.string.iterator-cc0bbaa4.js → es6.string.iterator-c2573ffd.js} +6 -6
  114. package/dist/cjs/{extends-0a918631.js → extends-29bdbc6d.js} +7 -7
  115. package/dist/cjs/faundadb.js +21 -21
  116. package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
  117. package/dist/cjs/getRelatedArticle.js +20 -20
  118. package/dist/cjs/getRootDocGroup.js +8 -8
  119. package/dist/cjs/getSerializers.js +45 -46
  120. package/dist/cjs/{getTargeting-f1821260.js → getTargeting-32d1c2e4.js} +3 -3
  121. package/dist/cjs/getTargeting.js +8 -8
  122. package/dist/{esm/iconBase-602d52fe.js → cjs/iconBase-be4097c0.js} +33 -8
  123. package/dist/cjs/{index-98e01cb9.js → index-0e4427c8.js} +479 -13
  124. package/dist/cjs/{index-763f071f.js → index-32097c80.js} +1089 -1063
  125. package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
  126. package/dist/cjs/{index-be0c82be.js → index-efca863c.js} +36 -30
  127. package/dist/cjs/{index-3294d3bc.js → index-f86bb269.js} +44 -45
  128. package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
  129. package/dist/cjs/{index.esm-90433435.js → index.esm-00a6aade.js} +7 -16
  130. package/dist/cjs/{index.esm-4d410430.js → index.esm-2bb721c8.js} +21 -21
  131. package/dist/cjs/{index.esm-e32d3e8e.js → index.esm-c1e16606.js} +4 -7
  132. package/dist/cjs/{index.esm-ff47db6f.js → index.esm-f27f80d9.js} +6 -13
  133. package/dist/cjs/index.js +171 -166
  134. package/dist/cjs/{inherits-1f5a1c72.js → inherits-c2065b95.js} +20 -20
  135. package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
  136. package/dist/cjs/keys-7f2c2108.js +25 -0
  137. package/dist/cjs/{lodash-fc2922d0.js → lodash-f0783643.js} +128 -31
  138. package/dist/cjs/main-f1c77adb.js +973 -0
  139. package/dist/cjs/{md5-5039b1a6.js → md5-e1ca5797.js} +1 -1
  140. package/dist/cjs/{moment-575fe24c.js → moment-aca40de1.js} +11 -9
  141. package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
  142. package/dist/cjs/{slicedToArray-8f385299.js → slicedToArray-5d1bc3b3.js} +14 -14
  143. package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
  144. package/dist/cjs/stringify-c9ac1214.js +17 -0
  145. package/dist/cjs/timeDifferenceCalc.js +1 -1
  146. package/dist/cjs/{toConsumableArray-9a3476fe.js → toConsumableArray-ddb70795.js} +9 -9
  147. package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
  148. package/dist/cjs/{typeof-725500bc.js → typeof-88a668c5.js} +36 -36
  149. package/dist/cjs/urlFor.js +3 -3
  150. package/dist/cjs/{ustream-api-d092dc31.js → ustream-api-b2b9092f.js} +4 -4
  151. package/dist/cjs/{util-f2c1b65b.js → util-6f784d85.js} +1 -1
  152. package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
  153. package/dist/cjs/{web.dom.iterable-a0e279c1.js → web.dom.iterable-46657b5c.js} +3 -3
  154. package/dist/esm/AD.js +1 -1
  155. package/dist/esm/AD300x250.js +23 -24
  156. package/dist/esm/AD300x250x600.js +23 -24
  157. package/dist/esm/AD728x90.js +26 -27
  158. package/dist/esm/ADFloatingFooter.js +22 -23
  159. package/dist/esm/ADFooter.js +6 -6
  160. package/dist/esm/ADGutter.js +22 -23
  161. package/dist/esm/{ADInfeed-1cc9d817.js → ADInfeed-a71a3972.js} +6 -6
  162. package/dist/esm/ADSkyscraper.js +22 -23
  163. package/dist/esm/ADSponsoredResources.js +22 -23
  164. package/dist/esm/ADWebcast.js +22 -23
  165. package/dist/esm/ADWelcome.js +19 -20
  166. package/dist/esm/{ADlgInfeed-8c4f129e.js → ADlgInfeed-d94f1437.js} +4 -4
  167. package/dist/esm/AccordionPanel.js +8 -8
  168. package/dist/esm/AdSlot.js +23 -24
  169. package/dist/esm/AdSlotsProvider.js +16 -909
  170. package/dist/esm/AlgoliaSearch.js +29 -13993
  171. package/dist/esm/AlphabeticList.js +10 -10
  172. package/dist/esm/ArticleCarousel.js +18 -15
  173. package/dist/esm/ArticleProgramLandingPage.js +49 -50
  174. package/dist/esm/ArticleSeriesLandingPage.js +32 -33
  175. package/dist/esm/ArticleSeriesListing.js +34 -35
  176. package/dist/esm/Auth.js +592 -1420
  177. package/dist/esm/AuthWrapper.js +287 -246
  178. package/dist/esm/{AuthorComponent-34b16174.js → AuthorComponent-30aeba69.js} +1 -1
  179. package/dist/esm/Beam.js +8 -8
  180. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-c99c9a8d.js} +34 -34
  181. package/dist/esm/Breadcrumbs.js +7 -7
  182. package/dist/esm/CMEDeck.js +24 -25
  183. package/dist/esm/Column1.js +4 -4
  184. package/dist/esm/Column2.js +21 -21
  185. package/dist/esm/Column3.js +38 -39
  186. package/dist/esm/ConferenceArticleCard.js +7 -7
  187. package/dist/esm/DeckContent.js +49 -50
  188. package/dist/esm/DeckQueue.js +48 -49
  189. package/dist/esm/{Dfp-b7236041.js → Dfp-be030f2a.js} +14 -15
  190. package/dist/esm/EventsDeck.js +50 -50
  191. package/dist/esm/ExternalResources.js +47 -48
  192. package/dist/esm/Feature.js +4 -4
  193. package/dist/esm/ForbesHero.js +12 -12
  194. package/dist/esm/GridContent.js +90 -91
  195. package/dist/esm/GridHero.js +13 -13
  196. package/dist/esm/GroupDeck.js +14 -14
  197. package/dist/esm/HamMagazine.js +30 -30
  198. package/dist/esm/Hero.js +4 -4
  199. package/dist/esm/HighlightenVideo.js +2 -2
  200. package/dist/esm/HorizontalArticleListing.js +46 -47
  201. package/dist/esm/HorizontalHero.js +5 -5
  202. package/dist/esm/IssueContentDeck.js +27 -27
  203. package/dist/esm/IssueDeck.js +37 -37
  204. package/dist/esm/IssueLanding.js +55 -56
  205. package/dist/esm/LeftNav.js +21 -22
  206. package/dist/esm/MasterDeck.js +36 -37
  207. package/dist/esm/MediaSeriesLanding.js +733 -645
  208. package/dist/esm/NavDvm.js +16 -16
  209. package/dist/esm/NavMagazine.js +34 -34
  210. package/dist/esm/NavNative.js +34 -34
  211. package/dist/esm/OncliveHero.js +4 -5
  212. package/dist/esm/OncliveLargeHero.js +13 -13
  213. package/dist/esm/PageFilter.js +6 -6
  214. package/dist/esm/PartnerDetailListing.js +64 -3865
  215. package/dist/esm/PdfDownload.js +2 -2
  216. package/dist/esm/PopUpModal.js +6 -6
  217. package/dist/esm/PubSection.js +34 -35
  218. package/dist/esm/PubToc.js +8 -8
  219. package/dist/esm/PublicationDeck.js +24 -24
  220. package/dist/esm/PublicationLanding.js +49 -49
  221. package/dist/esm/QueueDeckExpanded.js +38 -39
  222. package/dist/esm/RecentNews.js +4 -4
  223. package/dist/esm/RelatedContent.js +7 -7
  224. package/dist/esm/RolesDeck.js +12 -12
  225. package/dist/esm/Search.js +8 -8
  226. package/dist/esm/Segment.js +6 -6
  227. package/dist/esm/SeriesListingDeck.js +20 -21
  228. package/dist/esm/{SeriesSlider-a866bb21.js → SeriesSlider-ae17159f.js} +10 -10
  229. package/dist/esm/SetCookie.js +1 -1
  230. package/dist/esm/SideFooter.js +15 -15
  231. package/dist/esm/{SocialSearchComponent-03c3e869.js → SocialSearchComponent-db963c3e.js} +12 -12
  232. package/dist/esm/TaxonomyCard.js +25 -25
  233. package/dist/esm/TaxonomyDescription.js +45 -46
  234. package/dist/esm/TemplateNormal.js +49 -50
  235. package/dist/esm/ThumbnailCard.js +7 -7
  236. package/dist/esm/Ustream.js +14 -14
  237. package/dist/esm/VerticalHero.js +3 -3
  238. package/dist/esm/VideoProgramLandingPage.js +53 -54
  239. package/dist/esm/VideoSeriesCard.js +13 -13
  240. package/dist/esm/VideoSeriesFilter.js +9 -9
  241. package/dist/esm/VideoSeriesLandingPage.js +38 -39
  242. package/dist/esm/VideoSeriesListing.js +35 -36
  243. package/dist/esm/View.js +89 -91
  244. package/dist/esm/YahooHero.js +15 -15
  245. package/dist/esm/YoutubeGroup.js +43 -37
  246. package/dist/esm/{_is-array-58e95429.js → _is-array-3e99e06e.js} +6 -6
  247. package/dist/esm/{_iter-detect-5d49a330.js → _iter-detect-7e5e5ce2.js} +8 -8
  248. package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
  249. package/dist/esm/{_object-sap-964b6feb.js → _object-sap-f353c2a9.js} +1 -1
  250. package/dist/esm/{_object-to-array-7e804fce.js → _object-to-array-0f197f89.js} +2 -2
  251. package/dist/esm/{_to-object-a4107da3.js → _to-object-b50e61c3.js} +9 -9
  252. package/dist/esm/{asyncToGenerator-fc1c2e29.js → asyncToGenerator-7f8f9219.js} +32 -32
  253. package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-57a70a56.js} +5 -4
  254. package/dist/esm/{core.get-iterator-method-e1de7503.js → core.get-iterator-method-133dfacd.js} +2 -2
  255. package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
  256. package/dist/esm/{define-property-8af5f002.js → define-property-fe54dc9f.js} +6 -6
  257. package/dist/esm/{defineProperty-94fd8bfc.js → defineProperty-f5ff6f5a.js} +1 -1
  258. package/dist/esm/{entities-7cc3bf45.js → entities-932b50cf.js} +1 -1
  259. package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
  260. package/dist/esm/{es6.string.iterator-c990c18c.js → es6.string.iterator-bc33758b.js} +7 -7
  261. package/dist/esm/{extends-6f2fcc99.js → extends-60e0e1c6.js} +7 -7
  262. package/dist/esm/faundadb.js +7 -7
  263. package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
  264. package/dist/esm/getRelatedArticle.js +14 -14
  265. package/dist/esm/getRootDocGroup.js +6 -6
  266. package/dist/esm/getSerializers.js +45 -46
  267. package/dist/esm/{getTargeting-bd800589.js → getTargeting-cf2724e3.js} +2 -2
  268. package/dist/esm/getTargeting.js +8 -8
  269. package/dist/{cjs/iconBase-68959171.js → esm/iconBase-ccc56b97.js} +2 -8
  270. package/dist/esm/{index-73819142.js → index-0dbff1d1.js} +36 -30
  271. package/dist/esm/{index-41a678ea.js → index-5cc7b406.js} +469 -4
  272. package/dist/esm/{index-36e590e8.js → index-5e84f9cd.js} +653 -637
  273. package/dist/esm/{index-5f7e79e7.js → index-755f2cc2.js} +6 -6
  274. package/dist/esm/{index-ef6d5dcf.js → index-79cfd25c.js} +44 -45
  275. package/dist/esm/{index.es-29c1cef5.js → index.es-a6137319.js} +23 -5
  276. package/dist/esm/{index.esm-fd746768.js → index.esm-37268dca.js} +4 -5
  277. package/dist/esm/{index.esm-f8aaeeeb.js → index.esm-9b042655.js} +4 -7
  278. package/dist/esm/{index.esm-cf08bf18.js → index.esm-d4932dea.js} +6 -13
  279. package/dist/esm/{index.esm-29e48d38.js → index.esm-f6156a57.js} +7 -16
  280. package/dist/esm/index.js +126 -124
  281. package/dist/esm/{inherits-cf8dde54.js → inherits-a41fe93f.js} +19 -19
  282. package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
  283. package/dist/esm/{keys-8eda7a5c.js → keys-7a3adabf.js} +6 -6
  284. package/dist/esm/{lodash-17fdfebb.js → lodash-f97fd99a.js} +128 -31
  285. package/dist/esm/main-d4165069.js +961 -0
  286. package/dist/esm/{md5-9be0e905.js → md5-4e42248e.js} +1 -1
  287. package/dist/esm/{moment-e2f9b20c.js → moment-bc12cb97.js} +11 -9
  288. package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-9be47857.js} +16 -16
  289. package/dist/esm/{slicedToArray-641f241f.js → slicedToArray-be2f7a22.js} +14 -14
  290. package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
  291. package/dist/esm/stringify-59c8f690.js +15 -0
  292. package/dist/esm/timeDifferenceCalc.js +1 -1
  293. package/dist/esm/{toConsumableArray-43aa614d.js → toConsumableArray-6d9a4616.js} +9 -9
  294. package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
  295. package/dist/esm/{typeof-6435ba1c.js → typeof-a286cf0c.js} +36 -36
  296. package/dist/esm/urlFor.js +1 -1
  297. package/dist/esm/{ustream-api-9a50644d.js → ustream-api-33a866b6.js} +4 -4
  298. package/dist/esm/{util-7700fc59.js → util-3ab476bf.js} +1 -1
  299. package/dist/esm/{web.dom.iterable-4439f05a.js → web.dom.iterable-4109ff68.js} +3 -3
  300. package/package.json +1 -1
  301. package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
  302. package/dist/cjs/events-1b438fe7.js +0 -469
  303. package/dist/cjs/index-e2e62963.js +0 -89
  304. package/dist/cjs/inherits-8d29278d.js +0 -110
  305. package/dist/cjs/keys-a586b7a0.js +0 -25
  306. package/dist/cjs/main-02daeefe.js +0 -862
  307. package/dist/cjs/stringify-7c5aff47.js +0 -17
  308. package/dist/esm/events-6c3a7a63.js +0 -467
  309. package/dist/esm/index-aaa2dae0.js +0 -85
  310. package/dist/esm/inherits-77d5e4fc.js +0 -101
  311. package/dist/esm/main-e4a934b2.js +0 -851
  312. package/dist/esm/stringify-4330ccdc.js +0 -15
package/dist/esm/Auth.js CHANGED
@@ -1,23 +1,24 @@
1
- import { a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
2
- import './_to-object-a4107da3.js';
3
- import './es6.string.iterator-c990c18c.js';
4
- import './_library-528f1934.js';
5
- import './_iter-detect-5d49a330.js';
6
- import './core.get-iterator-method-e1de7503.js';
7
- import './_object-pie-33c40e79.js';
8
- import { _ as _extends } from './extends-6f2fcc99.js';
9
- import './web.dom.iterable-4439f05a.js';
10
- import React__default, { useEffect, useLayoutEffect, createContext, useContext, useRef, useDebugValue, useState, useCallback, useMemo } from 'react';
1
+ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7f8f9219.js';
2
+ import { _ as _JSON$stringify } from './stringify-59c8f690.js';
3
+ import { _ as _slicedToArray, a as _getIterator } from './slicedToArray-be2f7a22.js';
4
+ import React__default, { useEffect, useState } from 'react';
11
5
  import Router from 'next/router';
12
- import { _ as _slicedToArray, a as _getIterator } from './slicedToArray-641f241f.js';
13
- import { _ as _JSON$stringify } from './stringify-4330ccdc.js';
14
- import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
6
+ import { _ as _extends } from './extends-60e0e1c6.js';
15
7
  import { Col, Form, Button, Spinner } from 'react-bootstrap';
16
- import { u as util } from './util-7700fc59.js';
8
+ import useSWR from 'swr';
17
9
  import { s as serialize_1, p as parse_1 } from './index-db3bb315.js';
18
10
  import Local from 'passport-local';
19
11
  import mysql from 'mysql';
20
- import { m as md5 } from './md5-9be0e905.js';
12
+ import { u as util } from './util-3ab476bf.js';
13
+ import { c as createCommonjsModule } from './_commonjsHelpers-0c4b6f40.js';
14
+ import { m as md5 } from './md5-4e42248e.js';
15
+ import './es6.string.iterator-bc33758b.js';
16
+ import './_to-object-b50e61c3.js';
17
+ import './web.dom.iterable-4109ff68.js';
18
+ import './_library-528f1934.js';
19
+ import './core.get-iterator-method-133dfacd.js';
20
+ import './_iter-detect-7e5e5ce2.js';
21
+ import './_object-pie-133f504a.js';
21
22
 
22
23
  var returnFormField = function returnFormField(_ref) {
23
24
  var name = _ref.name,
@@ -135,1056 +136,7 @@ var returnFormField = function returnFormField(_ref) {
135
136
  }
136
137
  };
137
138
 
138
- var has = Object.prototype.hasOwnProperty;
139
-
140
- function dequal(foo, bar) {
141
- var ctor, len;
142
- if (foo === bar) return true;
143
-
144
- if (foo && bar && (ctor=foo.constructor) === bar.constructor) {
145
- if (ctor === Date) return foo.getTime() === bar.getTime();
146
- if (ctor === RegExp) return foo.toString() === bar.toString();
147
-
148
- if (ctor === Array) {
149
- if ((len=foo.length) === bar.length) {
150
- while (len-- && dequal(foo[len], bar[len]));
151
- }
152
- return len === -1;
153
- }
154
-
155
- if (!ctor || typeof foo === 'object') {
156
- len = 0;
157
- for (ctor in foo) {
158
- if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
159
- if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
160
- }
161
- return Object.keys(bar).length === len;
162
- }
163
- }
164
-
165
- return foo !== foo && bar !== bar;
166
- }
167
-
168
- // use WeakMap to store the object->key mapping
169
- // so the objects can be garbage collected.
170
- // WeakMap uses a hashtable under the hood, so the lookup
171
- // complexity is almost O(1).
172
- var table = new WeakMap();
173
- // counter of the key
174
- var counter = 0;
175
- // hashes an array of objects and returns a string
176
- function hash(args) {
177
- if (!args.length)
178
- return '';
179
- var key = 'arg';
180
- for (var i = 0; i < args.length; ++i) {
181
- if (args[i] === null) {
182
- key += '@null';
183
- continue;
184
- }
185
- var _hash = void 0;
186
- if (typeof args[i] !== 'object' && typeof args[i] !== 'function') {
187
- // need to consider the case that args[i] is a string:
188
- // args[i] _hash
189
- // "undefined" -> '"undefined"'
190
- // undefined -> 'undefined'
191
- // 123 -> '123'
192
- // "null" -> '"null"'
193
- if (typeof args[i] === 'string') {
194
- _hash = '"' + args[i] + '"';
195
- }
196
- else {
197
- _hash = String(args[i]);
198
- }
199
- }
200
- else {
201
- if (!table.has(args[i])) {
202
- _hash = counter;
203
- table.set(args[i], counter++);
204
- }
205
- else {
206
- _hash = table.get(args[i]);
207
- }
208
- }
209
- key += '@' + _hash;
210
- }
211
- return key;
212
- }
213
-
214
- var Cache = /** @class */ (function () {
215
- function Cache(initialData) {
216
- if (initialData === void 0) { initialData = {}; }
217
- this.cache = new Map(Object.entries(initialData));
218
- this.subs = [];
219
- }
220
- Cache.prototype.get = function (key) {
221
- var _key = this.serializeKey(key)[0];
222
- return this.cache.get(_key);
223
- };
224
- Cache.prototype.set = function (key, value) {
225
- var _key = this.serializeKey(key)[0];
226
- this.cache.set(_key, value);
227
- this.notify();
228
- };
229
- Cache.prototype.keys = function () {
230
- return Array.from(this.cache.keys());
231
- };
232
- Cache.prototype.has = function (key) {
233
- var _key = this.serializeKey(key)[0];
234
- return this.cache.has(_key);
235
- };
236
- Cache.prototype.clear = function () {
237
- this.cache.clear();
238
- this.notify();
239
- };
240
- Cache.prototype.delete = function (key) {
241
- var _key = this.serializeKey(key)[0];
242
- this.cache.delete(_key);
243
- this.notify();
244
- };
245
- // TODO: introduce namespace for the cache
246
- Cache.prototype.serializeKey = function (key) {
247
- var args = null;
248
- if (typeof key === 'function') {
249
- try {
250
- key = key();
251
- }
252
- catch (err) {
253
- // dependencies not ready
254
- key = '';
255
- }
256
- }
257
- if (Array.isArray(key)) {
258
- // args array
259
- args = key;
260
- key = hash(key);
261
- }
262
- else {
263
- // convert null to ''
264
- key = String(key || '');
265
- }
266
- var errorKey = key ? 'err@' + key : '';
267
- var isValidatingKey = key ? 'validating@' + key : '';
268
- return [key, args, errorKey, isValidatingKey];
269
- };
270
- Cache.prototype.subscribe = function (listener) {
271
- var _this = this;
272
- if (typeof listener !== 'function') {
273
- throw new Error('Expected the listener to be a function.');
274
- }
275
- var isSubscribed = true;
276
- this.subs.push(listener);
277
- return function () {
278
- if (!isSubscribed)
279
- return;
280
- isSubscribed = false;
281
- var index = _this.subs.indexOf(listener);
282
- if (index > -1) {
283
- _this.subs[index] = _this.subs[_this.subs.length - 1];
284
- _this.subs.length--;
285
- }
286
- };
287
- };
288
- // Notify Cache subscribers about a change in the cache
289
- Cache.prototype.notify = function () {
290
- for (var _i = 0, _a = this.subs; _i < _a.length; _i++) {
291
- var listener = _a[_i];
292
- listener();
293
- }
294
- };
295
- return Cache;
296
- }());
297
-
298
- /**
299
- * Due to bug https://bugs.chromium.org/p/chromium/issues/detail?id=678075,
300
- * it's not reliable to detect if the browser is currently online or offline
301
- * based on `navigator.onLine`.
302
- * As a work around, we always assume it's online on first load, and change
303
- * the status upon `online` or `offline` events.
304
- */
305
- var online = true;
306
- var isOnline = function () { return online; };
307
- var isDocumentVisible = function () {
308
- if (typeof document !== 'undefined' &&
309
- document.visibilityState !== undefined) {
310
- return document.visibilityState !== 'hidden';
311
- }
312
- // always assume it's visible
313
- return true;
314
- };
315
- var fetcher = function (url) { return fetch(url).then(function (res) { return res.json(); }); };
316
- var registerOnFocus = function (cb) {
317
- if (typeof window !== 'undefined' &&
318
- window.addEventListener !== undefined &&
319
- typeof document !== 'undefined' &&
320
- document.addEventListener !== undefined) {
321
- // focus revalidate
322
- document.addEventListener('visibilitychange', function () { return cb(); }, false);
323
- window.addEventListener('focus', function () { return cb(); }, false);
324
- }
325
- };
326
- var registerOnReconnect = function (cb) {
327
- if (typeof window !== 'undefined' && window.addEventListener !== undefined) {
328
- // reconnect revalidate
329
- window.addEventListener('online', function () {
330
- online = true;
331
- cb();
332
- }, false);
333
- // nothing to revalidate, just update the status
334
- window.addEventListener('offline', function () { return (online = false); }, false);
335
- }
336
- };
337
- var webPreset = {
338
- isOnline: isOnline,
339
- isDocumentVisible: isDocumentVisible,
340
- fetcher: fetcher,
341
- registerOnFocus: registerOnFocus,
342
- registerOnReconnect: registerOnReconnect
343
- };
344
-
345
- var __assign = (undefined && undefined.__assign) || function () {
346
- __assign = Object.assign || function(t) {
347
- for (var s, i = 1, n = arguments.length; i < n; i++) {
348
- s = arguments[i];
349
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
350
- t[p] = s[p];
351
- }
352
- return t;
353
- };
354
- return __assign.apply(this, arguments);
355
- };
356
- // cache
357
- var cache = new Cache();
358
- // error retry
359
- function onErrorRetry(_, __, config, revalidate, opts) {
360
- if (!config.isDocumentVisible()) {
361
- // if it's hidden, stop
362
- // it will auto revalidate when focus
363
- return;
364
- }
365
- if (typeof config.errorRetryCount === 'number' &&
366
- opts.retryCount > config.errorRetryCount) {
367
- return;
368
- }
369
- // exponential backoff
370
- var count = Math.min(opts.retryCount, 8);
371
- var timeout = ~~((Math.random() + 0.5) * (1 << count)) * config.errorRetryInterval;
372
- setTimeout(revalidate, timeout, opts);
373
- }
374
- // client side: need to adjust the config
375
- // based on the browser status
376
- // slow connection (<= 70Kbps)
377
- var slowConnection = typeof window !== 'undefined' &&
378
- // @ts-ignore
379
- navigator['connection'] &&
380
- // @ts-ignore
381
- ['slow-2g', '2g'].indexOf(navigator['connection'].effectiveType) !== -1;
382
- // config
383
- var defaultConfig = __assign({
384
- // events
385
- onLoadingSlow: function () { }, onSuccess: function () { }, onError: function () { }, onErrorRetry: onErrorRetry, errorRetryInterval: (slowConnection ? 10 : 5) * 1000, focusThrottleInterval: 5 * 1000, dedupingInterval: 2 * 1000, loadingTimeout: (slowConnection ? 5 : 3) * 1000, refreshInterval: 0, revalidateOnFocus: true, revalidateOnReconnect: true, refreshWhenHidden: false, refreshWhenOffline: false, shouldRetryOnError: true, suspense: false, compare: dequal, isPaused: function () { return false; } }, webPreset);
386
-
387
- var IS_SERVER = typeof window === 'undefined' ||
388
- // @ts-ignore
389
- !!(typeof Deno !== 'undefined' && Deno && Deno.version && Deno.version.deno);
390
- // polyfill for requestAnimationFrame
391
- var rAF = IS_SERVER
392
- ? null
393
- : window['requestAnimationFrame']
394
- ? function (f) { return window['requestAnimationFrame'](f); }
395
- : function (f) { return setTimeout(f, 1); };
396
- // React currently throws a warning when using useLayoutEffect on the server.
397
- // To get around it, we can conditionally useEffect on the server (no-op) and
398
- // useLayoutEffect in the browser.
399
- var useIsomorphicLayoutEffect = IS_SERVER ? useEffect : useLayoutEffect;
400
-
401
- var SWRConfigContext = createContext({});
402
- SWRConfigContext.displayName = 'SWRConfigContext';
403
-
404
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
405
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
406
- return new (P || (P = Promise))(function (resolve, reject) {
407
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
408
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
409
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
410
- step((generator = generator.apply(thisArg, _arguments || [])).next());
411
- });
412
- };
413
- var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
414
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
415
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
416
- function verb(n) { return function (v) { return step([n, v]); }; }
417
- function step(op) {
418
- if (f) throw new TypeError("Generator is already executing.");
419
- while (_) try {
420
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
421
- if (y = 0, t) op = [op[0] & 2, t.value];
422
- switch (op[0]) {
423
- case 0: case 1: t = op; break;
424
- case 4: _.label++; return { value: op[1], done: false };
425
- case 5: _.label++; y = op[1]; op = [0]; continue;
426
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
427
- default:
428
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
429
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
430
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
431
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
432
- if (t[2]) _.ops.pop();
433
- _.trys.pop(); continue;
434
- }
435
- op = body.call(thisArg, _);
436
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
437
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
438
- }
439
- };
440
- // global state managers
441
- var CONCURRENT_PROMISES = {};
442
- var CONCURRENT_PROMISES_TS = {};
443
- var FOCUS_REVALIDATORS = {};
444
- var RECONNECT_REVALIDATORS = {};
445
- var CACHE_REVALIDATORS = {};
446
- var MUTATION_TS = {};
447
- var MUTATION_END_TS = {};
448
- // generate strictly increasing timestamps
449
- var now = (function () {
450
- var ts = 0;
451
- return function () { return ++ts; };
452
- })();
453
- // setup DOM events listeners for `focus` and `reconnect` actions
454
- if (!IS_SERVER) {
455
- var revalidate_1 = function (revalidators) {
456
- if (!defaultConfig.isDocumentVisible() || !defaultConfig.isOnline())
457
- return;
458
- for (var key in revalidators) {
459
- if (revalidators[key][0])
460
- revalidators[key][0]();
461
- }
462
- };
463
- if (typeof defaultConfig.registerOnFocus === 'function') {
464
- defaultConfig.registerOnFocus(function () { return revalidate_1(FOCUS_REVALIDATORS); });
465
- }
466
- if (typeof defaultConfig.registerOnReconnect === 'function') {
467
- defaultConfig.registerOnReconnect(function () { return revalidate_1(RECONNECT_REVALIDATORS); });
468
- }
469
- }
470
- var trigger = function (_key, shouldRevalidate) {
471
- if (shouldRevalidate === void 0) { shouldRevalidate = true; }
472
- // we are ignoring the second argument which correspond to the arguments
473
- // the fetcher will receive when key is an array
474
- var _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2], keyValidating = _a[3];
475
- if (!key)
476
- return Promise.resolve();
477
- var updaters = CACHE_REVALIDATORS[key];
478
- if (key && updaters) {
479
- var currentData = cache.get(key);
480
- var currentError = cache.get(keyErr);
481
- var currentIsValidating = cache.get(keyValidating);
482
- var promises = [];
483
- for (var i = 0; i < updaters.length; ++i) {
484
- promises.push(updaters[i](shouldRevalidate, currentData, currentError, currentIsValidating, i > 0));
485
- }
486
- // return new updated value
487
- return Promise.all(promises).then(function () { return cache.get(key); });
488
- }
489
- return Promise.resolve(cache.get(key));
490
- };
491
- var broadcastState = function (key, data, error, isValidating) {
492
- var updaters = CACHE_REVALIDATORS[key];
493
- if (key && updaters) {
494
- for (var i = 0; i < updaters.length; ++i) {
495
- updaters[i](false, data, error, isValidating);
496
- }
497
- }
498
- };
499
- var mutate = function (_key, _data, shouldRevalidate) {
500
- if (shouldRevalidate === void 0) { shouldRevalidate = true; }
501
- return __awaiter(void 0, void 0, void 0, function () {
502
- var _a, key, keyErr, beforeMutationTs, beforeConcurrentPromisesTs, data, error, isAsyncMutation, err_1, shouldAbort, updaters, promises, i;
503
- return __generator(this, function (_b) {
504
- switch (_b.label) {
505
- case 0:
506
- _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2];
507
- if (!key)
508
- return [2 /*return*/];
509
- // if there is no new data to update, let's just revalidate the key
510
- if (typeof _data === 'undefined')
511
- return [2 /*return*/, trigger(_key, shouldRevalidate)
512
- // update global timestamps
513
- ];
514
- // update global timestamps
515
- MUTATION_TS[key] = now() - 1;
516
- MUTATION_END_TS[key] = 0;
517
- beforeMutationTs = MUTATION_TS[key];
518
- beforeConcurrentPromisesTs = CONCURRENT_PROMISES_TS[key];
519
- isAsyncMutation = false;
520
- if (_data && typeof _data === 'function') {
521
- // `_data` is a function, call it passing current cache value
522
- try {
523
- _data = _data(cache.get(key));
524
- }
525
- catch (err) {
526
- // if `_data` function throws an error synchronously, it shouldn't be cached
527
- _data = undefined;
528
- error = err;
529
- }
530
- }
531
- if (!(_data && typeof _data.then === 'function')) return [3 /*break*/, 5];
532
- // `_data` is a promise
533
- isAsyncMutation = true;
534
- _b.label = 1;
535
- case 1:
536
- _b.trys.push([1, 3, , 4]);
537
- return [4 /*yield*/, _data];
538
- case 2:
539
- data = _b.sent();
540
- return [3 /*break*/, 4];
541
- case 3:
542
- err_1 = _b.sent();
543
- error = err_1;
544
- return [3 /*break*/, 4];
545
- case 4: return [3 /*break*/, 6];
546
- case 5:
547
- data = _data;
548
- _b.label = 6;
549
- case 6:
550
- shouldAbort = function () {
551
- // check if other mutations have occurred since we've started this mutation
552
- if (beforeMutationTs !== MUTATION_TS[key] ||
553
- beforeConcurrentPromisesTs !== CONCURRENT_PROMISES_TS[key]) {
554
- if (error)
555
- throw error;
556
- return true;
557
- }
558
- };
559
- // if there's a race we don't update cache or broadcast change, just return the data
560
- if (shouldAbort())
561
- return [2 /*return*/, data];
562
- if (typeof data !== 'undefined') {
563
- // update cached data
564
- cache.set(key, data);
565
- }
566
- // always update or reset the error
567
- cache.set(keyErr, error);
568
- // reset the timestamp to mark the mutation has ended
569
- MUTATION_END_TS[key] = now() - 1;
570
- if (!isAsyncMutation) {
571
- // we skip broadcasting if there's another mutation happened synchronously
572
- if (shouldAbort())
573
- return [2 /*return*/, data];
574
- }
575
- updaters = CACHE_REVALIDATORS[key];
576
- if (updaters) {
577
- promises = [];
578
- for (i = 0; i < updaters.length; ++i) {
579
- promises.push(updaters[i](!!shouldRevalidate, data, error, undefined, i > 0));
580
- }
581
- // return new updated value
582
- return [2 /*return*/, Promise.all(promises).then(function () {
583
- if (error)
584
- throw error;
585
- return cache.get(key);
586
- })];
587
- }
588
- // throw error or return data to be used by caller of mutate
589
- if (error)
590
- throw error;
591
- return [2 /*return*/, data];
592
- }
593
- });
594
- });
595
- };
596
- function useSWR() {
597
- var _this = this;
598
- var args = [];
599
- for (var _i = 0; _i < arguments.length; _i++) {
600
- args[_i] = arguments[_i];
601
- }
602
- var _key = args[0];
603
- var config = Object.assign({}, defaultConfig, useContext(SWRConfigContext), args.length > 2
604
- ? args[2]
605
- : args.length === 2 && typeof args[1] === 'object'
606
- ? args[1]
607
- : {});
608
- // in typescript args.length > 2 is not same as args.lenth === 3
609
- // we do a safe type assertion here
610
- // args.length === 3
611
- var fn = (args.length > 2
612
- ? args[1]
613
- : args.length === 2 && typeof args[1] === 'function'
614
- ? args[1]
615
- : /**
616
- pass fn as null will disable revalidate
617
- https://paco.sh/blog/shared-hook-state-with-swr
618
- */
619
- args[1] === null
620
- ? args[1]
621
- : config.fetcher);
622
- // we assume `key` as the identifier of the request
623
- // `key` can change but `fn` shouldn't
624
- // (because `revalidate` only depends on `key`)
625
- // `keyErr` is the cache key for error objects
626
- var _a = cache.serializeKey(_key), key = _a[0], fnArgs = _a[1], keyErr = _a[2], keyValidating = _a[3];
627
- var configRef = useRef(config);
628
- useIsomorphicLayoutEffect(function () {
629
- configRef.current = config;
630
- });
631
- var willRevalidateOnMount = function () {
632
- return (config.revalidateOnMount ||
633
- (!config.initialData && config.revalidateOnMount === undefined));
634
- };
635
- var resolveData = function () {
636
- var cachedData = cache.get(key);
637
- return typeof cachedData === 'undefined' ? config.initialData : cachedData;
638
- };
639
- var resolveIsValidating = function () {
640
- return !!cache.get(keyValidating) || (key && willRevalidateOnMount());
641
- };
642
- var initialData = resolveData();
643
- var initialError = cache.get(keyErr);
644
- var initialIsValidating = resolveIsValidating();
645
- // if a state is accessed (data, error or isValidating),
646
- // we add the state to dependencies so if the state is
647
- // updated in the future, we can trigger a rerender
648
- var stateDependencies = useRef({
649
- data: false,
650
- error: false,
651
- isValidating: false
652
- });
653
- var stateRef = useRef({
654
- data: initialData,
655
- error: initialError,
656
- isValidating: initialIsValidating
657
- });
658
- // display the data label in the React DevTools next to SWR hooks
659
- useDebugValue(stateRef.current.data);
660
- var rerender = useState({})[1];
661
- var dispatch = useCallback(function (payload) {
662
- var shouldUpdateState = false;
663
- for (var k in payload) {
664
- // @ts-ignore
665
- if (stateRef.current[k] === payload[k]) {
666
- continue;
667
- }
668
- // @ts-ignore
669
- stateRef.current[k] = payload[k];
670
- // @ts-ignore
671
- if (stateDependencies.current[k]) {
672
- shouldUpdateState = true;
673
- }
674
- }
675
- if (shouldUpdateState) {
676
- // if component is unmounted, should skip rerender
677
- // if component is not mounted, should skip rerender
678
- if (unmountedRef.current || !initialMountedRef.current)
679
- return;
680
- rerender({});
681
- }
682
- },
683
- // config.suspense isn't allowed to change during the lifecycle
684
- // eslint-disable-next-line react-hooks/exhaustive-deps
685
- []);
686
- // error ref inside revalidate (is last request errored?)
687
- var unmountedRef = useRef(false);
688
- var keyRef = useRef(key);
689
- // check if component is mounted in suspense mode
690
- var initialMountedRef = useRef(false);
691
- // do unmount check for callbacks
692
- var eventsCallback = useCallback(function (event) {
693
- var _a;
694
- var params = [];
695
- for (var _i = 1; _i < arguments.length; _i++) {
696
- params[_i - 1] = arguments[_i];
697
- }
698
- if (unmountedRef.current)
699
- return;
700
- if (!initialMountedRef.current)
701
- return;
702
- if (key !== keyRef.current)
703
- return;
704
- // @ts-ignore
705
- (_a = configRef.current)[event].apply(_a, params);
706
- }, [key]);
707
- var boundMutate = useCallback(function (data, shouldRevalidate) {
708
- return mutate(keyRef.current, data, shouldRevalidate);
709
- }, []);
710
- var addRevalidator = function (revalidators, callback) {
711
- if (!revalidators[key]) {
712
- revalidators[key] = [callback];
713
- }
714
- else {
715
- revalidators[key].push(callback);
716
- }
717
- return function () {
718
- var keyedRevalidators = revalidators[key];
719
- var index = keyedRevalidators.indexOf(callback);
720
- if (index >= 0) {
721
- // O(1): faster than splice
722
- keyedRevalidators[index] =
723
- keyedRevalidators[keyedRevalidators.length - 1];
724
- keyedRevalidators.pop();
725
- }
726
- };
727
- };
728
- // start a revalidation
729
- var revalidate = useCallback(function (revalidateOpts) {
730
- if (revalidateOpts === void 0) { revalidateOpts = {}; }
731
- return __awaiter(_this, void 0, void 0, function () {
732
- var _a, retryCount, _b, dedupe, loading, shouldDeduping, newData, startAt, newState, err_2;
733
- return __generator(this, function (_c) {
734
- switch (_c.label) {
735
- case 0:
736
- if (!key || !fn)
737
- return [2 /*return*/, false];
738
- if (unmountedRef.current)
739
- return [2 /*return*/, false];
740
- if (configRef.current.isPaused())
741
- return [2 /*return*/, false];
742
- _a = revalidateOpts.retryCount, retryCount = _a === void 0 ? 0 : _a, _b = revalidateOpts.dedupe, dedupe = _b === void 0 ? false : _b;
743
- loading = true;
744
- shouldDeduping = typeof CONCURRENT_PROMISES[key] !== 'undefined' && dedupe;
745
- _c.label = 1;
746
- case 1:
747
- _c.trys.push([1, 6, , 7]);
748
- dispatch({
749
- isValidating: true
750
- });
751
- cache.set(keyValidating, true);
752
- if (!shouldDeduping) {
753
- // also update other hooks
754
- broadcastState(key, stateRef.current.data, stateRef.current.error, true);
755
- }
756
- newData = void 0;
757
- startAt = void 0;
758
- if (!shouldDeduping) return [3 /*break*/, 3];
759
- // there's already an ongoing request,
760
- // this one needs to be deduplicated.
761
- startAt = CONCURRENT_PROMISES_TS[key];
762
- return [4 /*yield*/, CONCURRENT_PROMISES[key]];
763
- case 2:
764
- newData = _c.sent();
765
- return [3 /*break*/, 5];
766
- case 3:
767
- // if no cache being rendered currently (it shows a blank page),
768
- // we trigger the loading slow event.
769
- if (config.loadingTimeout && !cache.get(key)) {
770
- setTimeout(function () {
771
- if (loading)
772
- eventsCallback('onLoadingSlow', key, config);
773
- }, config.loadingTimeout);
774
- }
775
- if (fnArgs !== null) {
776
- CONCURRENT_PROMISES[key] = fn.apply(void 0, fnArgs);
777
- }
778
- else {
779
- CONCURRENT_PROMISES[key] = fn(key);
780
- }
781
- CONCURRENT_PROMISES_TS[key] = startAt = now();
782
- return [4 /*yield*/, CONCURRENT_PROMISES[key]];
783
- case 4:
784
- newData = _c.sent();
785
- setTimeout(function () {
786
- delete CONCURRENT_PROMISES[key];
787
- delete CONCURRENT_PROMISES_TS[key];
788
- }, config.dedupingInterval);
789
- // trigger the success event,
790
- // only do this for the original request.
791
- eventsCallback('onSuccess', newData, key, config);
792
- _c.label = 5;
793
- case 5:
794
- // if there're other ongoing request(s), started after the current one,
795
- // we need to ignore the current one to avoid possible race conditions:
796
- // req1------------------>res1 (current one)
797
- // req2---------------->res2
798
- // the request that fired later will always be kept.
799
- if (CONCURRENT_PROMISES_TS[key] > startAt) {
800
- return [2 /*return*/, false];
801
- }
802
- // if there're other mutations(s), overlapped with the current revalidation:
803
- // case 1:
804
- // req------------------>res
805
- // mutate------>end
806
- // case 2:
807
- // req------------>res
808
- // mutate------>end
809
- // case 3:
810
- // req------------------>res
811
- // mutate-------...---------->
812
- // we have to ignore the revalidation result (res) because it's no longer fresh.
813
- // meanwhile, a new revalidation should be triggered when the mutation ends.
814
- if (MUTATION_TS[key] &&
815
- // case 1
816
- (startAt <= MUTATION_TS[key] ||
817
- // case 2
818
- startAt <= MUTATION_END_TS[key] ||
819
- // case 3
820
- MUTATION_END_TS[key] === 0)) {
821
- dispatch({ isValidating: false });
822
- return [2 /*return*/, false];
823
- }
824
- cache.set(keyErr, undefined);
825
- cache.set(keyValidating, false);
826
- newState = {
827
- isValidating: false
828
- };
829
- if (typeof stateRef.current.error !== 'undefined') {
830
- // we don't have an error
831
- newState.error = undefined;
832
- }
833
- if (!config.compare(stateRef.current.data, newData)) {
834
- // deep compare to avoid extra re-render
835
- // data changed
836
- newState.data = newData;
837
- }
838
- if (!config.compare(cache.get(key), newData)) {
839
- cache.set(key, newData);
840
- }
841
- // merge the new state
842
- dispatch(newState);
843
- if (!shouldDeduping) {
844
- // also update other hooks
845
- broadcastState(key, newData, newState.error, false);
846
- }
847
- return [3 /*break*/, 7];
848
- case 6:
849
- err_2 = _c.sent();
850
- delete CONCURRENT_PROMISES[key];
851
- delete CONCURRENT_PROMISES_TS[key];
852
- if (configRef.current.isPaused()) {
853
- dispatch({
854
- isValidating: false
855
- });
856
- return [2 /*return*/, false];
857
- }
858
- cache.set(keyErr, err_2);
859
- // get a new error
860
- // don't use deep equal for errors
861
- if (stateRef.current.error !== err_2) {
862
- // we keep the stale data
863
- dispatch({
864
- isValidating: false,
865
- error: err_2
866
- });
867
- if (!shouldDeduping) {
868
- // also broadcast to update other hooks
869
- broadcastState(key, undefined, err_2, false);
870
- }
871
- }
872
- // events and retry
873
- eventsCallback('onError', err_2, key, config);
874
- if (config.shouldRetryOnError) {
875
- // when retrying, we always enable deduping
876
- eventsCallback('onErrorRetry', err_2, key, config, revalidate, {
877
- retryCount: retryCount + 1,
878
- dedupe: true
879
- });
880
- }
881
- return [3 /*break*/, 7];
882
- case 7:
883
- loading = false;
884
- return [2 /*return*/, true];
885
- }
886
- });
887
- });
888
- },
889
- // dispatch is immutable, and `eventsCallback`, `fnArgs`, `keyErr`, and `keyValidating` are based on `key`,
890
- // so we can them from the deps array.
891
- //
892
- // FIXME:
893
- // `fn` and `config` might be changed during the lifecycle,
894
- // but they might be changed every render like this.
895
- // useSWR('key', () => fetch('/api/'), { suspense: true })
896
- // So we omit the values from the deps array
897
- // even though it might cause unexpected behaviors.
898
- // eslint-disable-next-line react-hooks/exhaustive-deps
899
- [key]);
900
- // mounted (client side rendering)
901
- useIsomorphicLayoutEffect(function () {
902
- if (!key)
903
- return undefined;
904
- // after `key` updates, we need to mark it as mounted
905
- unmountedRef.current = false;
906
- var isUpdating = initialMountedRef.current;
907
- initialMountedRef.current = true;
908
- // after the component is mounted (hydrated),
909
- // we need to update the data from the cache
910
- // and trigger a revalidation
911
- var currentHookData = stateRef.current.data;
912
- var latestKeyedData = resolveData();
913
- // update the state if the key changed (not the inital render) or cache updated
914
- keyRef.current = key;
915
- if (!config.compare(currentHookData, latestKeyedData)) {
916
- dispatch({ data: latestKeyedData });
917
- }
918
- // revalidate with deduping
919
- var softRevalidate = function () { return revalidate({ dedupe: true }); };
920
- // trigger a revalidation
921
- if (isUpdating || willRevalidateOnMount()) {
922
- if (typeof latestKeyedData !== 'undefined' && !IS_SERVER) {
923
- // delay revalidate if there's cache
924
- // to not block the rendering
925
- // @ts-ignore it's safe to use requestAnimationFrame in browser
926
- rAF(softRevalidate);
927
- }
928
- else {
929
- softRevalidate();
930
- }
931
- }
932
- var pending = false;
933
- var onFocus = function () {
934
- if (pending || !configRef.current.revalidateOnFocus)
935
- return;
936
- pending = true;
937
- softRevalidate();
938
- setTimeout(function () { return (pending = false); }, configRef.current.focusThrottleInterval);
939
- };
940
- var onReconnect = function () {
941
- if (configRef.current.revalidateOnReconnect) {
942
- softRevalidate();
943
- }
944
- };
945
- // register global cache update listener
946
- var onUpdate = function (shouldRevalidate, updatedData, updatedError, updatedIsValidating, dedupe) {
947
- if (shouldRevalidate === void 0) { shouldRevalidate = true; }
948
- if (dedupe === void 0) { dedupe = true; }
949
- // update hook state
950
- var newState = {};
951
- var needUpdate = false;
952
- if (typeof updatedData !== 'undefined' &&
953
- !config.compare(stateRef.current.data, updatedData)) {
954
- newState.data = updatedData;
955
- needUpdate = true;
956
- }
957
- // always update error
958
- // because it can be `undefined`
959
- if (stateRef.current.error !== updatedError) {
960
- newState.error = updatedError;
961
- needUpdate = true;
962
- }
963
- if (typeof updatedIsValidating !== 'undefined' &&
964
- stateRef.current.isValidating !== updatedIsValidating) {
965
- newState.isValidating = updatedIsValidating;
966
- needUpdate = true;
967
- }
968
- if (needUpdate) {
969
- dispatch(newState);
970
- }
971
- if (shouldRevalidate) {
972
- if (dedupe) {
973
- return softRevalidate();
974
- }
975
- else {
976
- return revalidate();
977
- }
978
- }
979
- return false;
980
- };
981
- var unsubFocus = addRevalidator(FOCUS_REVALIDATORS, onFocus);
982
- var unsubReconnect = addRevalidator(RECONNECT_REVALIDATORS, onReconnect);
983
- var unsubUpdate = addRevalidator(CACHE_REVALIDATORS, onUpdate);
984
- return function () {
985
- // cleanup
986
- dispatch = function () { return null; };
987
- // mark it as unmounted
988
- unmountedRef.current = true;
989
- unsubFocus();
990
- unsubReconnect();
991
- unsubUpdate();
992
- };
993
- }, [key, revalidate]);
994
- useIsomorphicLayoutEffect(function () {
995
- var timer = null;
996
- var tick = function () { return __awaiter(_this, void 0, void 0, function () {
997
- return __generator(this, function (_a) {
998
- switch (_a.label) {
999
- case 0:
1000
- if (!(!stateRef.current.error &&
1001
- (configRef.current.refreshWhenHidden ||
1002
- configRef.current.isDocumentVisible()) &&
1003
- (configRef.current.refreshWhenOffline || configRef.current.isOnline()))) return [3 /*break*/, 2];
1004
- // only revalidate when the page is visible
1005
- // if API request errored, we stop polling in this round
1006
- // and let the error retry function handle it
1007
- return [4 /*yield*/, revalidate({ dedupe: true })];
1008
- case 1:
1009
- // only revalidate when the page is visible
1010
- // if API request errored, we stop polling in this round
1011
- // and let the error retry function handle it
1012
- _a.sent();
1013
- _a.label = 2;
1014
- case 2:
1015
- // Read the latest refreshInterval
1016
- if (configRef.current.refreshInterval && timer) {
1017
- timer = setTimeout(tick, configRef.current.refreshInterval);
1018
- }
1019
- return [2 /*return*/];
1020
- }
1021
- });
1022
- }); };
1023
- if (configRef.current.refreshInterval) {
1024
- timer = setTimeout(tick, configRef.current.refreshInterval);
1025
- }
1026
- return function () {
1027
- if (timer) {
1028
- clearTimeout(timer);
1029
- timer = null;
1030
- }
1031
- };
1032
- }, [
1033
- config.refreshInterval,
1034
- config.refreshWhenHidden,
1035
- config.refreshWhenOffline,
1036
- revalidate
1037
- ]);
1038
- // suspense
1039
- var latestData;
1040
- var latestError;
1041
- if (config.suspense) {
1042
- // in suspense mode, we can't return empty state
1043
- // (it should be suspended)
1044
- // try to get data and error from cache
1045
- latestData = cache.get(key);
1046
- latestError = cache.get(keyErr);
1047
- if (typeof latestData === 'undefined') {
1048
- latestData = initialData;
1049
- }
1050
- if (typeof latestError === 'undefined') {
1051
- latestError = initialError;
1052
- }
1053
- if (typeof latestData === 'undefined' &&
1054
- typeof latestError === 'undefined') {
1055
- // need to start the request if it hasn't
1056
- if (!CONCURRENT_PROMISES[key]) {
1057
- // trigger revalidate immediately
1058
- // to get the promise
1059
- // in this revalidate, should not rerender
1060
- revalidate();
1061
- }
1062
- if (CONCURRENT_PROMISES[key] &&
1063
- typeof CONCURRENT_PROMISES[key].then === 'function') {
1064
- // if it is a promise
1065
- throw CONCURRENT_PROMISES[key];
1066
- }
1067
- // it's a value, return it directly (override)
1068
- latestData = CONCURRENT_PROMISES[key];
1069
- }
1070
- if (typeof latestData === 'undefined' && latestError) {
1071
- // in suspense mode, throw error if there's no content
1072
- throw latestError;
1073
- }
1074
- }
1075
- // define returned state
1076
- // can be memorized since the state is a ref
1077
- var memoizedState = useMemo(function () {
1078
- // revalidate will be deprecated in the 1.x release
1079
- // because mutate() covers the same use case of revalidate().
1080
- // This remains only for backward compatibility
1081
- var state = { revalidate: revalidate, mutate: boundMutate };
1082
- Object.defineProperties(state, {
1083
- error: {
1084
- // `key` might be changed in the upcoming hook re-render,
1085
- // but the previous state will stay
1086
- // so we need to match the latest key and data (fallback to `initialData`)
1087
- get: function () {
1088
- stateDependencies.current.error = true;
1089
- if (config.suspense) {
1090
- return latestError;
1091
- }
1092
- return keyRef.current === key ? stateRef.current.error : initialError;
1093
- },
1094
- enumerable: true
1095
- },
1096
- data: {
1097
- get: function () {
1098
- stateDependencies.current.data = true;
1099
- if (config.suspense) {
1100
- return latestData;
1101
- }
1102
- return keyRef.current === key ? stateRef.current.data : initialData;
1103
- },
1104
- enumerable: true
1105
- },
1106
- isValidating: {
1107
- get: function () {
1108
- stateDependencies.current.isValidating = true;
1109
- return key ? stateRef.current.isValidating : false;
1110
- },
1111
- enumerable: true
1112
- }
1113
- });
1114
- return state;
1115
- // `config.suspense` isn't allowed to change during the lifecycle.
1116
- // `boundMutate` is immutable, and the immutability of `revalidate` depends on `key`
1117
- // so we can omit them from the deps array,
1118
- // but we put it to enable react-hooks/exhaustive-deps rule.
1119
- // `initialData` and `initialError` are not initial values
1120
- // because they are changed during the lifecycle
1121
- // so we should add them in the deps array.
1122
- }, [
1123
- revalidate,
1124
- initialData,
1125
- initialError,
1126
- boundMutate,
1127
- key,
1128
- config.suspense,
1129
- latestError,
1130
- latestData
1131
- ]);
1132
- return memoizedState;
1133
- }
1134
- Object.defineProperty(SWRConfigContext.Provider, 'default', {
1135
- value: defaultConfig
1136
- });
1137
- var SWRConfig = SWRConfigContext.Provider;
1138
-
1139
- var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
1140
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1141
- return new (P || (P = Promise))(function (resolve, reject) {
1142
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1143
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1144
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1145
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1146
- });
1147
- };
1148
- var __generator$1 = (undefined && undefined.__generator) || function (thisArg, body) {
1149
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1150
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1151
- function verb(n) { return function (v) { return step([n, v]); }; }
1152
- function step(op) {
1153
- if (f) throw new TypeError("Generator is already executing.");
1154
- while (_) try {
1155
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1156
- if (y = 0, t) op = [op[0] & 2, t.value];
1157
- switch (op[0]) {
1158
- case 0: case 1: t = op; break;
1159
- case 4: _.label++; return { value: op[1], done: false };
1160
- case 5: _.label++; y = op[1]; op = [0]; continue;
1161
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
1162
- default:
1163
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1164
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1165
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1166
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1167
- if (t[2]) _.ops.pop();
1168
- _.trys.pop(); continue;
1169
- }
1170
- op = body.call(thisArg, _);
1171
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1172
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1173
- }
1174
- };
1175
- var __rest = (undefined && undefined.__rest) || function (s, e) {
1176
- var t = {};
1177
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1178
- t[p] = s[p];
1179
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1180
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1181
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1182
- t[p[i]] = s[p[i]];
1183
- }
1184
- return t;
1185
- };
1186
-
1187
- var _this = undefined;
139
+ var _this$4 = undefined;
1188
140
 
1189
141
  var dataHandler = function () {
1190
142
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(api_url, body) {
@@ -1250,7 +202,7 @@ var dataHandler = function () {
1250
202
  return _context.stop();
1251
203
  }
1252
204
  }
1253
- }, _callee, _this, [[0, 20]]);
205
+ }, _callee, _this$4, [[0, 20]]);
1254
206
  }));
1255
207
 
1256
208
  return function dataHandler(_x, _x2) {
@@ -1446,9 +398,9 @@ var countries = ["United States", "Afghanistan", "Albania", "Algeria", "American
1446
398
 
1447
399
  var states = ['AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM', 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', 'WA', 'WV', 'WI', 'WY'];
1448
400
 
1449
- var _this$1 = undefined;
401
+ var _this$3 = undefined;
1450
402
 
1451
- var SignupForm = function SignupForm(props) {
403
+ var SignupForm$1 = function SignupForm(props) {
1452
404
  var handleSubmit = function () {
1453
405
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3(e) {
1454
406
  var formData, body, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, key, res;
@@ -1609,7 +561,7 @@ var SignupForm = function SignupForm(props) {
1609
561
  return _context.stop();
1610
562
  }
1611
563
  }
1612
- }, _callee, _this$1);
564
+ }, _callee, _this$3);
1613
565
  }));
1614
566
 
1615
567
  return function loadInitData() {
@@ -1676,7 +628,7 @@ var SignupForm = function SignupForm(props) {
1676
628
  return _context2.stop();
1677
629
  }
1678
630
  }
1679
- }, _callee2, _this$1);
631
+ }, _callee2, _this$3);
1680
632
  }));
1681
633
 
1682
634
  return function handleOccupationChanged(_x) {
@@ -1826,7 +778,7 @@ var SignupForm = function SignupForm(props) {
1826
778
 
1827
779
  var _this$2 = undefined;
1828
780
 
1829
- var SignupForm$1 = function SignupForm(props) {
781
+ var SignupForm = function SignupForm(props) {
1830
782
  var handleSubmit = function () {
1831
783
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3(e) {
1832
784
  var formData, body, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, key, res;
@@ -2361,10 +1313,10 @@ var iron = /*#__PURE__*/Object.freeze({
2361
1313
  getSession: getSession
2362
1314
  });
2363
1315
 
2364
- var toStr = Object.prototype.toString;
1316
+ var toStr$5 = Object.prototype.toString;
2365
1317
 
2366
1318
  var isArguments = function isArguments(value) {
2367
- var str = toStr.call(value);
1319
+ var str = toStr$5.call(value);
2368
1320
  var isArgs = str === '[object Arguments]';
2369
1321
  if (!isArgs) {
2370
1322
  isArgs = str !== '[object Array]' &&
@@ -2372,16 +1324,16 @@ var isArguments = function isArguments(value) {
2372
1324
  typeof value === 'object' &&
2373
1325
  typeof value.length === 'number' &&
2374
1326
  value.length >= 0 &&
2375
- toStr.call(value.callee) === '[object Function]';
1327
+ toStr$5.call(value.callee) === '[object Function]';
2376
1328
  }
2377
1329
  return isArgs;
2378
1330
  };
2379
1331
 
2380
- var keysShim;
1332
+ var keysShim$1;
2381
1333
  if (!Object.keys) {
2382
1334
  // modified from https://github.com/es-shims/es5-shim
2383
1335
  var has$1 = Object.prototype.hasOwnProperty;
2384
- var toStr$1 = Object.prototype.toString;
1336
+ var toStr$4 = Object.prototype.toString;
2385
1337
  var isArgs = isArguments; // eslint-disable-line global-require
2386
1338
  var isEnumerable = Object.prototype.propertyIsEnumerable;
2387
1339
  var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
@@ -2454,11 +1406,11 @@ if (!Object.keys) {
2454
1406
  }
2455
1407
  };
2456
1408
 
2457
- keysShim = function keys(object) {
1409
+ keysShim$1 = function keys(object) {
2458
1410
  var isObject = object !== null && typeof object === 'object';
2459
- var isFunction = toStr$1.call(object) === '[object Function]';
1411
+ var isFunction = toStr$4.call(object) === '[object Function]';
2460
1412
  var isArguments = isArgs(object);
2461
- var isString = isObject && toStr$1.call(object) === '[object String]';
1413
+ var isString = isObject && toStr$4.call(object) === '[object String]';
2462
1414
  var theKeys = [];
2463
1415
 
2464
1416
  if (!isObject && !isFunction && !isArguments) {
@@ -2496,17 +1448,17 @@ if (!Object.keys) {
2496
1448
  return theKeys;
2497
1449
  };
2498
1450
  }
2499
- var implementation = keysShim;
1451
+ var implementation$3 = keysShim$1;
2500
1452
 
2501
- var slice = Array.prototype.slice;
1453
+ var slice$1 = Array.prototype.slice;
2502
1454
 
2503
1455
 
2504
1456
  var origKeys = Object.keys;
2505
- var keysShim$1 = origKeys ? function keys(o) { return origKeys(o); } : implementation;
1457
+ var keysShim = origKeys ? function keys(o) { return origKeys(o); } : implementation$3;
2506
1458
 
2507
1459
  var originalKeys = Object.keys;
2508
1460
 
2509
- keysShim$1.shim = function shimObjectKeys() {
1461
+ keysShim.shim = function shimObjectKeys() {
2510
1462
  if (Object.keys) {
2511
1463
  var keysWorksWithArguments = (function () {
2512
1464
  // Safari 5.0 bug
@@ -2516,27 +1468,27 @@ keysShim$1.shim = function shimObjectKeys() {
2516
1468
  if (!keysWorksWithArguments) {
2517
1469
  Object.keys = function keys(object) { // eslint-disable-line func-name-matching
2518
1470
  if (isArguments(object)) {
2519
- return originalKeys(slice.call(object));
1471
+ return originalKeys(slice$1.call(object));
2520
1472
  }
2521
1473
  return originalKeys(object);
2522
1474
  };
2523
1475
  }
2524
1476
  } else {
2525
- Object.keys = keysShim$1;
1477
+ Object.keys = keysShim;
2526
1478
  }
2527
- return Object.keys || keysShim$1;
1479
+ return Object.keys || keysShim;
2528
1480
  };
2529
1481
 
2530
- var objectKeys = keysShim$1;
1482
+ var objectKeys = keysShim;
2531
1483
 
2532
- var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
1484
+ var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
2533
1485
 
2534
- var toStr$2 = Object.prototype.toString;
1486
+ var toStr$3 = Object.prototype.toString;
2535
1487
  var concat = Array.prototype.concat;
2536
1488
  var origDefineProperty = Object.defineProperty;
2537
1489
 
2538
1490
  var isFunction = function (fn) {
2539
- return typeof fn === 'function' && toStr$2.call(fn) === '[object Function]';
1491
+ return typeof fn === 'function' && toStr$3.call(fn) === '[object Function]';
2540
1492
  };
2541
1493
 
2542
1494
  var arePropertyDescriptorsSupported = function () {
@@ -2573,7 +1525,7 @@ var defineProperty = function (object, name, value, predicate) {
2573
1525
  var defineProperties = function (object, map) {
2574
1526
  var predicates = arguments.length > 2 ? arguments[2] : {};
2575
1527
  var props = objectKeys(map);
2576
- if (hasSymbols) {
1528
+ if (hasSymbols$4) {
2577
1529
  props = concat.call(props, Object.getOwnPropertySymbols(map));
2578
1530
  }
2579
1531
  for (var i = 0; i < props.length; i += 1) {
@@ -2585,6 +1537,59 @@ defineProperties.supportsDescriptors = !!supportsDescriptors;
2585
1537
 
2586
1538
  var defineProperties_1 = defineProperties;
2587
1539
 
1540
+ /* eslint no-invalid-this: 1 */
1541
+
1542
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
1543
+ var slice = Array.prototype.slice;
1544
+ var toStr$2 = Object.prototype.toString;
1545
+ var funcType = '[object Function]';
1546
+
1547
+ var implementation$2 = function bind(that) {
1548
+ var target = this;
1549
+ if (typeof target !== 'function' || toStr$2.call(target) !== funcType) {
1550
+ throw new TypeError(ERROR_MESSAGE + target);
1551
+ }
1552
+ var args = slice.call(arguments, 1);
1553
+
1554
+ var bound;
1555
+ var binder = function () {
1556
+ if (this instanceof bound) {
1557
+ var result = target.apply(
1558
+ this,
1559
+ args.concat(slice.call(arguments))
1560
+ );
1561
+ if (Object(result) === result) {
1562
+ return result;
1563
+ }
1564
+ return this;
1565
+ } else {
1566
+ return target.apply(
1567
+ that,
1568
+ args.concat(slice.call(arguments))
1569
+ );
1570
+ }
1571
+ };
1572
+
1573
+ var boundLength = Math.max(0, target.length - args.length);
1574
+ var boundArgs = [];
1575
+ for (var i = 0; i < boundLength; i++) {
1576
+ boundArgs.push('$' + i);
1577
+ }
1578
+
1579
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
1580
+
1581
+ if (target.prototype) {
1582
+ var Empty = function Empty() {};
1583
+ Empty.prototype = target.prototype;
1584
+ bound.prototype = new Empty();
1585
+ Empty.prototype = null;
1586
+ }
1587
+
1588
+ return bound;
1589
+ };
1590
+
1591
+ var functionBind = Function.prototype.bind || implementation$2;
1592
+
2588
1593
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
2589
1594
  var shams = function hasSymbols() {
2590
1595
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
@@ -2608,7 +1613,7 @@ var shams = function hasSymbols() {
2608
1613
 
2609
1614
  var symVal = 42;
2610
1615
  obj[sym] = symVal;
2611
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
1616
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
2612
1617
  if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
2613
1618
 
2614
1619
  if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
@@ -2626,10 +1631,10 @@ var shams = function hasSymbols() {
2626
1631
  return true;
2627
1632
  };
2628
1633
 
2629
- var origSymbol = commonjsGlobal.Symbol;
1634
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
2630
1635
 
2631
1636
 
2632
- var hasSymbols$1 = function hasNativeSymbols() {
1637
+ var hasSymbols$3 = function hasNativeSymbols() {
2633
1638
  if (typeof origSymbol !== 'function') { return false; }
2634
1639
  if (typeof Symbol !== 'function') { return false; }
2635
1640
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -2638,79 +1643,34 @@ var hasSymbols$1 = function hasNativeSymbols() {
2638
1643
  return shams();
2639
1644
  };
2640
1645
 
2641
- /* eslint no-invalid-this: 1 */
2642
-
2643
- var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
2644
- var slice$1 = Array.prototype.slice;
2645
- var toStr$3 = Object.prototype.toString;
2646
- var funcType = '[object Function]';
2647
-
2648
- var implementation$1 = function bind(that) {
2649
- var target = this;
2650
- if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
2651
- throw new TypeError(ERROR_MESSAGE + target);
2652
- }
2653
- var args = slice$1.call(arguments, 1);
2654
-
2655
- var bound;
2656
- var binder = function () {
2657
- if (this instanceof bound) {
2658
- var result = target.apply(
2659
- this,
2660
- args.concat(slice$1.call(arguments))
2661
- );
2662
- if (Object(result) === result) {
2663
- return result;
2664
- }
2665
- return this;
2666
- } else {
2667
- return target.apply(
2668
- that,
2669
- args.concat(slice$1.call(arguments))
2670
- );
2671
- }
2672
- };
2673
-
2674
- var boundLength = Math.max(0, target.length - args.length);
2675
- var boundArgs = [];
2676
- for (var i = 0; i < boundLength; i++) {
2677
- boundArgs.push('$' + i);
2678
- }
1646
+ var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
2679
1647
 
2680
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
1648
+ var undefined$1;
2681
1649
 
2682
- if (target.prototype) {
2683
- var Empty = function Empty() {};
2684
- Empty.prototype = target.prototype;
2685
- bound.prototype = new Empty();
2686
- Empty.prototype = null;
2687
- }
1650
+ var $SyntaxError$1 = SyntaxError;
1651
+ var $Function = Function;
1652
+ var $TypeError$5 = TypeError;
2688
1653
 
2689
- return bound;
1654
+ // eslint-disable-next-line consistent-return
1655
+ var getEvalledConstructor = function (expressionSyntax) {
1656
+ try {
1657
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1658
+ } catch (e) {}
2690
1659
  };
2691
1660
 
2692
- var functionBind = Function.prototype.bind || implementation$1;
2693
-
2694
- /* globals
2695
- Atomics,
2696
- SharedArrayBuffer,
2697
- */
2698
-
2699
- var undefined$1;
2700
-
2701
- var $TypeError = TypeError;
2702
-
2703
- var $gOPD = Object.getOwnPropertyDescriptor;
2704
- if ($gOPD) {
1661
+ var $gOPD$2 = Object.getOwnPropertyDescriptor;
1662
+ if ($gOPD$2) {
2705
1663
  try {
2706
- $gOPD({}, '');
1664
+ $gOPD$2({}, '');
2707
1665
  } catch (e) {
2708
- $gOPD = null; // this is IE 8, which has a broken gOPD
1666
+ $gOPD$2 = null; // this is IE 8, which has a broken gOPD
2709
1667
  }
2710
1668
  }
2711
1669
 
2712
- var throwTypeError = function () { throw new $TypeError(); };
2713
- var ThrowTypeError = $gOPD
1670
+ var throwTypeError = function () {
1671
+ throw new $TypeError$5();
1672
+ };
1673
+ var ThrowTypeError = $gOPD$2
2714
1674
  ? (function () {
2715
1675
  try {
2716
1676
  // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
@@ -2719,7 +1679,7 @@ var ThrowTypeError = $gOPD
2719
1679
  } catch (calleeThrows) {
2720
1680
  try {
2721
1681
  // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
2722
- return $gOPD(arguments, 'callee').get;
1682
+ return $gOPD$2(arguments, 'callee').get;
2723
1683
  } catch (gOPDthrows) {
2724
1684
  return throwTypeError;
2725
1685
  }
@@ -2727,206 +1687,354 @@ var ThrowTypeError = $gOPD
2727
1687
  }())
2728
1688
  : throwTypeError;
2729
1689
 
2730
- var hasSymbols$2 = hasSymbols$1();
1690
+ var hasSymbols$2 = hasSymbols$3();
2731
1691
 
2732
1692
  var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
2733
- var generatorFunction = undefined$1;
2734
- var asyncFunction = undefined$1;
2735
- var asyncGenFunction = undefined$1;
1693
+
1694
+ var needsEval = {};
2736
1695
 
2737
1696
  var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
2738
1697
 
2739
1698
  var INTRINSICS = {
1699
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
2740
1700
  '%Array%': Array,
2741
1701
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
2742
- '%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer.prototype,
2743
1702
  '%ArrayIteratorPrototype%': hasSymbols$2 ? getProto([][Symbol.iterator]()) : undefined$1,
2744
- '%ArrayPrototype%': Array.prototype,
2745
- '%ArrayProto_entries%': Array.prototype.entries,
2746
- '%ArrayProto_forEach%': Array.prototype.forEach,
2747
- '%ArrayProto_keys%': Array.prototype.keys,
2748
- '%ArrayProto_values%': Array.prototype.values,
2749
1703
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
2750
- '%AsyncFunction%': asyncFunction,
2751
- '%AsyncFunctionPrototype%': undefined$1,
2752
- '%AsyncGenerator%': undefined$1,
2753
- '%AsyncGeneratorFunction%': asyncGenFunction,
2754
- '%AsyncGeneratorPrototype%': undefined$1,
2755
- '%AsyncIteratorPrototype%': undefined$1,
1704
+ '%AsyncFunction%': needsEval,
1705
+ '%AsyncGenerator%': needsEval,
1706
+ '%AsyncGeneratorFunction%': needsEval,
1707
+ '%AsyncIteratorPrototype%': needsEval,
2756
1708
  '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1709
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
2757
1710
  '%Boolean%': Boolean,
2758
- '%BooleanPrototype%': Boolean.prototype,
2759
1711
  '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
2760
- '%DataViewPrototype%': typeof DataView === 'undefined' ? undefined$1 : DataView.prototype,
2761
1712
  '%Date%': Date,
2762
- '%DatePrototype%': Date.prototype,
2763
1713
  '%decodeURI%': decodeURI,
2764
1714
  '%decodeURIComponent%': decodeURIComponent,
2765
1715
  '%encodeURI%': encodeURI,
2766
1716
  '%encodeURIComponent%': encodeURIComponent,
2767
1717
  '%Error%': Error,
2768
- '%ErrorPrototype%': Error.prototype,
2769
1718
  '%eval%': eval, // eslint-disable-line no-eval
2770
1719
  '%EvalError%': EvalError,
2771
- '%EvalErrorPrototype%': EvalError.prototype,
2772
1720
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
2773
- '%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array.prototype,
2774
1721
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
2775
- '%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array.prototype,
2776
- '%Function%': Function,
2777
- '%FunctionPrototype%': Function.prototype,
2778
- '%Generator%': undefined$1,
2779
- '%GeneratorFunction%': generatorFunction,
2780
- '%GeneratorPrototype%': undefined$1,
1722
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1723
+ '%Function%': $Function,
1724
+ '%GeneratorFunction%': needsEval,
2781
1725
  '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
2782
- '%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array.prototype,
2783
1726
  '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
2784
- '%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined$1 : Int8Array.prototype,
2785
1727
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
2786
- '%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array.prototype,
2787
1728
  '%isFinite%': isFinite,
2788
1729
  '%isNaN%': isNaN,
2789
1730
  '%IteratorPrototype%': hasSymbols$2 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
2790
1731
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
2791
- '%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined$1,
2792
1732
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
2793
1733
  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
2794
- '%MapPrototype%': typeof Map === 'undefined' ? undefined$1 : Map.prototype,
2795
1734
  '%Math%': Math,
2796
1735
  '%Number%': Number,
2797
- '%NumberPrototype%': Number.prototype,
2798
1736
  '%Object%': Object,
2799
- '%ObjectPrototype%': Object.prototype,
2800
- '%ObjProto_toString%': Object.prototype.toString,
2801
- '%ObjProto_valueOf%': Object.prototype.valueOf,
2802
1737
  '%parseFloat%': parseFloat,
2803
1738
  '%parseInt%': parseInt,
2804
1739
  '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
2805
- '%PromisePrototype%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype,
2806
- '%PromiseProto_then%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype.then,
2807
- '%Promise_all%': typeof Promise === 'undefined' ? undefined$1 : Promise.all,
2808
- '%Promise_reject%': typeof Promise === 'undefined' ? undefined$1 : Promise.reject,
2809
- '%Promise_resolve%': typeof Promise === 'undefined' ? undefined$1 : Promise.resolve,
2810
1740
  '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
2811
1741
  '%RangeError%': RangeError,
2812
- '%RangeErrorPrototype%': RangeError.prototype,
2813
1742
  '%ReferenceError%': ReferenceError,
2814
- '%ReferenceErrorPrototype%': ReferenceError.prototype,
2815
1743
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
2816
1744
  '%RegExp%': RegExp,
2817
- '%RegExpPrototype%': RegExp.prototype,
2818
1745
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
2819
1746
  '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
2820
- '%SetPrototype%': typeof Set === 'undefined' ? undefined$1 : Set.prototype,
2821
1747
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
2822
- '%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer.prototype,
2823
1748
  '%String%': String,
2824
1749
  '%StringIteratorPrototype%': hasSymbols$2 ? getProto(''[Symbol.iterator]()) : undefined$1,
2825
- '%StringPrototype%': String.prototype,
2826
1750
  '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
2827
- '%SymbolPrototype%': hasSymbols$2 ? Symbol.prototype : undefined$1,
2828
- '%SyntaxError%': SyntaxError,
2829
- '%SyntaxErrorPrototype%': SyntaxError.prototype,
1751
+ '%SyntaxError%': $SyntaxError$1,
2830
1752
  '%ThrowTypeError%': ThrowTypeError,
2831
1753
  '%TypedArray%': TypedArray,
2832
- '%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined$1,
2833
- '%TypeError%': $TypeError,
2834
- '%TypeErrorPrototype%': $TypeError.prototype,
1754
+ '%TypeError%': $TypeError$5,
2835
1755
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
2836
- '%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array.prototype,
2837
1756
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
2838
- '%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray.prototype,
2839
1757
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
2840
- '%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array.prototype,
2841
1758
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
2842
- '%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array.prototype,
2843
1759
  '%URIError%': URIError,
2844
- '%URIErrorPrototype%': URIError.prototype,
2845
1760
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
2846
- '%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap.prototype,
2847
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
2848
- '%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet.prototype
2849
- };
1761
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1762
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1763
+ };
1764
+
1765
+ var doEval = function doEval(name) {
1766
+ var value;
1767
+ if (name === '%AsyncFunction%') {
1768
+ value = getEvalledConstructor('async function () {}');
1769
+ } else if (name === '%GeneratorFunction%') {
1770
+ value = getEvalledConstructor('function* () {}');
1771
+ } else if (name === '%AsyncGeneratorFunction%') {
1772
+ value = getEvalledConstructor('async function* () {}');
1773
+ } else if (name === '%AsyncGenerator%') {
1774
+ var fn = doEval('%AsyncGeneratorFunction%');
1775
+ if (fn) {
1776
+ value = fn.prototype;
1777
+ }
1778
+ } else if (name === '%AsyncIteratorPrototype%') {
1779
+ var gen = doEval('%AsyncGenerator%');
1780
+ if (gen) {
1781
+ value = getProto(gen.prototype);
1782
+ }
1783
+ }
2850
1784
 
1785
+ INTRINSICS[name] = value;
2851
1786
 
1787
+ return value;
1788
+ };
1789
+
1790
+ var LEGACY_ALIASES = {
1791
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1792
+ '%ArrayPrototype%': ['Array', 'prototype'],
1793
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1794
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1795
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1796
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1797
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1798
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1799
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1800
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
1801
+ '%DataViewPrototype%': ['DataView', 'prototype'],
1802
+ '%DatePrototype%': ['Date', 'prototype'],
1803
+ '%ErrorPrototype%': ['Error', 'prototype'],
1804
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1805
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1806
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1807
+ '%FunctionPrototype%': ['Function', 'prototype'],
1808
+ '%Generator%': ['GeneratorFunction', 'prototype'],
1809
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1810
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1811
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1812
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1813
+ '%JSONParse%': ['JSON', 'parse'],
1814
+ '%JSONStringify%': ['JSON', 'stringify'],
1815
+ '%MapPrototype%': ['Map', 'prototype'],
1816
+ '%NumberPrototype%': ['Number', 'prototype'],
1817
+ '%ObjectPrototype%': ['Object', 'prototype'],
1818
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1819
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1820
+ '%PromisePrototype%': ['Promise', 'prototype'],
1821
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1822
+ '%Promise_all%': ['Promise', 'all'],
1823
+ '%Promise_reject%': ['Promise', 'reject'],
1824
+ '%Promise_resolve%': ['Promise', 'resolve'],
1825
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1826
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1827
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
1828
+ '%SetPrototype%': ['Set', 'prototype'],
1829
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1830
+ '%StringPrototype%': ['String', 'prototype'],
1831
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
1832
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1833
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1834
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1835
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1836
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1837
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1838
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1839
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
1840
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1841
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
1842
+ };
1843
+
1844
+
1845
+
1846
+ var $concat$2 = functionBind.call(Function.call, Array.prototype.concat);
1847
+ var $spliceApply = functionBind.call(Function.apply, Array.prototype.splice);
2852
1848
  var $replace = functionBind.call(Function.call, String.prototype.replace);
1849
+ var $strSlice = functionBind.call(Function.call, String.prototype.slice);
2853
1850
 
2854
1851
  /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
2855
1852
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
2856
1853
  var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
2857
1854
  var stringToPath = function stringToPath(string) {
1855
+ var first = $strSlice(string, 0, 1);
1856
+ var last = $strSlice(string, -1);
1857
+ if (first === '%' && last !== '%') {
1858
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
1859
+ } else if (last === '%' && first !== '%') {
1860
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
1861
+ }
2858
1862
  var result = [];
2859
1863
  $replace(string, rePropName, function (match, number, quote, subString) {
2860
- result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match);
1864
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
2861
1865
  });
2862
1866
  return result;
2863
1867
  };
2864
1868
  /* end adaptation */
2865
1869
 
2866
1870
  var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
2867
- if (!(name in INTRINSICS)) {
2868
- throw new SyntaxError('intrinsic ' + name + ' does not exist!');
1871
+ var intrinsicName = name;
1872
+ var alias;
1873
+ if (src(LEGACY_ALIASES, intrinsicName)) {
1874
+ alias = LEGACY_ALIASES[intrinsicName];
1875
+ intrinsicName = '%' + alias[0] + '%';
2869
1876
  }
2870
1877
 
2871
- // istanbul ignore if // hopefully this is impossible to test :-)
2872
- if (typeof INTRINSICS[name] === 'undefined' && !allowMissing) {
2873
- throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1878
+ if (src(INTRINSICS, intrinsicName)) {
1879
+ var value = INTRINSICS[intrinsicName];
1880
+ if (value === needsEval) {
1881
+ value = doEval(intrinsicName);
1882
+ }
1883
+ if (typeof value === 'undefined' && !allowMissing) {
1884
+ throw new $TypeError$5('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1885
+ }
1886
+
1887
+ return {
1888
+ alias: alias,
1889
+ name: intrinsicName,
1890
+ value: value
1891
+ };
2874
1892
  }
2875
1893
 
2876
- return INTRINSICS[name];
1894
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
2877
1895
  };
2878
1896
 
2879
- var GetIntrinsic = function GetIntrinsic(name, allowMissing) {
1897
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
2880
1898
  if (typeof name !== 'string' || name.length === 0) {
2881
- throw new TypeError('intrinsic name must be a non-empty string');
1899
+ throw new $TypeError$5('intrinsic name must be a non-empty string');
2882
1900
  }
2883
1901
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
2884
- throw new TypeError('"allowMissing" argument must be a boolean');
1902
+ throw new $TypeError$5('"allowMissing" argument must be a boolean');
2885
1903
  }
2886
1904
 
2887
1905
  var parts = stringToPath(name);
1906
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1907
+
1908
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1909
+ var intrinsicRealName = intrinsic.name;
1910
+ var value = intrinsic.value;
1911
+ var skipFurtherCaching = false;
1912
+
1913
+ var alias = intrinsic.alias;
1914
+ if (alias) {
1915
+ intrinsicBaseName = alias[0];
1916
+ $spliceApply(parts, $concat$2([0, 1], alias));
1917
+ }
1918
+
1919
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1920
+ var part = parts[i];
1921
+ var first = $strSlice(part, 0, 1);
1922
+ var last = $strSlice(part, -1);
1923
+ if (
1924
+ (
1925
+ (first === '"' || first === "'" || first === '`')
1926
+ || (last === '"' || last === "'" || last === '`')
1927
+ )
1928
+ && first !== last
1929
+ ) {
1930
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
1931
+ }
1932
+ if (part === 'constructor' || !isOwn) {
1933
+ skipFurtherCaching = true;
1934
+ }
1935
+
1936
+ intrinsicBaseName += '.' + part;
1937
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
2888
1938
 
2889
- var value = getBaseIntrinsic('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing);
2890
- for (var i = 1; i < parts.length; i += 1) {
2891
- if (value != null) {
2892
- if ($gOPD && (i + 1) >= parts.length) {
2893
- var desc = $gOPD(value, parts[i]);
2894
- if (!allowMissing && !(parts[i] in value)) {
2895
- throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
1939
+ if (src(INTRINSICS, intrinsicRealName)) {
1940
+ value = INTRINSICS[intrinsicRealName];
1941
+ } else if (value != null) {
1942
+ if (!(part in value)) {
1943
+ if (!allowMissing) {
1944
+ throw new $TypeError$5('base intrinsic for ' + name + ' exists, but the property is not available.');
1945
+ }
1946
+ return void undefined$1;
1947
+ }
1948
+ if ($gOPD$2 && (i + 1) >= parts.length) {
1949
+ var desc = $gOPD$2(value, part);
1950
+ isOwn = !!desc;
1951
+
1952
+ // By convention, when a data property is converted to an accessor
1953
+ // property to emulate a data property that does not suffer from
1954
+ // the override mistake, that accessor's getter is marked with
1955
+ // an `originalValue` property. Here, when we detect this, we
1956
+ // uphold the illusion by pretending to see that original data
1957
+ // property, i.e., returning the value rather than the getter
1958
+ // itself.
1959
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1960
+ value = desc.get;
1961
+ } else {
1962
+ value = value[part];
2896
1963
  }
2897
- value = desc ? (desc.get || desc.value) : value[parts[i]];
2898
1964
  } else {
2899
- value = value[parts[i]];
1965
+ isOwn = src(value, part);
1966
+ value = value[part];
1967
+ }
1968
+
1969
+ if (isOwn && !skipFurtherCaching) {
1970
+ INTRINSICS[intrinsicRealName] = value;
2900
1971
  }
2901
1972
  }
2902
1973
  }
2903
1974
  return value;
2904
1975
  };
2905
1976
 
2906
- var $Function = GetIntrinsic('%Function%');
2907
- var $apply = $Function.apply;
2908
- var $call = $Function.call;
1977
+ var callBind = createCommonjsModule(function (module) {
1978
+
2909
1979
 
2910
- var callBind = function callBind() {
2911
- return functionBind.apply($call, arguments);
1980
+
1981
+
1982
+ var $apply = getIntrinsic('%Function.prototype.apply%');
1983
+ var $call = getIntrinsic('%Function.prototype.call%');
1984
+ var $reflectApply = getIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
1985
+
1986
+ var $gOPD = getIntrinsic('%Object.getOwnPropertyDescriptor%', true);
1987
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
1988
+ var $max = getIntrinsic('%Math.max%');
1989
+
1990
+ if ($defineProperty) {
1991
+ try {
1992
+ $defineProperty({}, 'a', { value: 1 });
1993
+ } catch (e) {
1994
+ // IE 8 has a broken defineProperty
1995
+ $defineProperty = null;
1996
+ }
1997
+ }
1998
+
1999
+ module.exports = function callBind(originalFunction) {
2000
+ var func = $reflectApply(functionBind, $call, arguments);
2001
+ if ($gOPD && $defineProperty) {
2002
+ var desc = $gOPD(func, 'length');
2003
+ if (desc.configurable) {
2004
+ // original length, plus the receiver, minus any additional arguments (after the receiver)
2005
+ $defineProperty(
2006
+ func,
2007
+ 'length',
2008
+ { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
2009
+ );
2010
+ }
2011
+ }
2012
+ return func;
2912
2013
  };
2913
2014
 
2914
- var apply = function applyBind() {
2915
- return functionBind.apply($apply, arguments);
2015
+ var applyBind = function applyBind() {
2016
+ return $reflectApply(functionBind, $apply, arguments);
2916
2017
  };
2917
- callBind.apply = apply;
2918
2018
 
2919
- var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
2019
+ if ($defineProperty) {
2020
+ $defineProperty(module.exports, 'apply', { value: applyBind });
2021
+ } else {
2022
+ module.exports.apply = applyBind;
2023
+ }
2024
+ });
2025
+ callBind.apply;
2026
+
2027
+ var $indexOf = callBind(getIntrinsic('String.prototype.indexOf'));
2920
2028
 
2921
- var callBound = function callBoundIntrinsic(name, allowMissing) {
2922
- var intrinsic = GetIntrinsic(name, !!allowMissing);
2923
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.')) {
2029
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
2030
+ var intrinsic = getIntrinsic(name, !!allowMissing);
2031
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
2924
2032
  return callBind(intrinsic);
2925
2033
  }
2926
2034
  return intrinsic;
2927
2035
  };
2928
2036
 
2929
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
2037
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
2930
2038
 
2931
2039
  if ($defineProperty) {
2932
2040
  try {
@@ -2939,7 +2047,7 @@ if ($defineProperty) {
2939
2047
 
2940
2048
 
2941
2049
 
2942
- var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
2050
+ var $isEnumerable$1 = callBound$1('Object.prototype.propertyIsEnumerable');
2943
2051
 
2944
2052
  // eslint-disable-next-line max-params
2945
2053
  var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {
@@ -2953,7 +2061,7 @@ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue,
2953
2061
  }
2954
2062
 
2955
2063
  // fallback for ES3
2956
- if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {
2064
+ if (P in O && $isEnumerable$1(O, P) !== !!desc['[[Enumerable]]']) {
2957
2065
  // a non-enumerable existing property
2958
2066
  return false;
2959
2067
  }
@@ -2968,15 +2076,13 @@ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue,
2968
2076
  return true;
2969
2077
  };
2970
2078
 
2971
- var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
2972
-
2973
- var $TypeError$1 = GetIntrinsic('%TypeError%');
2974
- var $SyntaxError = GetIntrinsic('%SyntaxError%');
2079
+ var $TypeError$4 = getIntrinsic('%TypeError%');
2080
+ var $SyntaxError = getIntrinsic('%SyntaxError%');
2975
2081
 
2976
2082
 
2977
2083
 
2978
2084
  var predicates = {
2979
- // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type
2085
+ // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type
2980
2086
  'Property Descriptor': function isPropertyDescriptor(Type, Desc) {
2981
2087
  if (Type(Desc) !== 'Object') {
2982
2088
  return false;
@@ -2999,7 +2105,7 @@ var predicates = {
2999
2105
  var isData = src(Desc, '[[Value]]');
3000
2106
  var IsAccessor = src(Desc, '[[Get]]') || src(Desc, '[[Set]]');
3001
2107
  if (isData && IsAccessor) {
3002
- throw new $TypeError$1('Property Descriptors may not be both accessor and data descriptors');
2108
+ throw new $TypeError$4('Property Descriptors may not be both accessor and data descriptors');
3003
2109
  }
3004
2110
  return true;
3005
2111
  }
@@ -3011,13 +2117,13 @@ var assertRecord = function assertRecord(Type, recordType, argumentName, value)
3011
2117
  throw new $SyntaxError('unknown record type: ' + recordType);
3012
2118
  }
3013
2119
  if (!predicate(Type, value)) {
3014
- throw new $TypeError$1(argumentName + ' must be a ' + recordType);
2120
+ throw new $TypeError$4(argumentName + ' must be a ' + recordType);
3015
2121
  }
3016
2122
  };
3017
2123
 
3018
- // https://www.ecma-international.org/ecma-262/5.1/#sec-8
2124
+ // https://262.ecma-international.org/5.1/#sec-8
3019
2125
 
3020
- var Type = function Type(x) {
2126
+ var Type$1 = function Type(x) {
3021
2127
  if (x === null) {
3022
2128
  return 'Null';
3023
2129
  }
@@ -3038,23 +2144,26 @@ var Type = function Type(x) {
3038
2144
  }
3039
2145
  };
3040
2146
 
3041
- // https://www.ecma-international.org/ecma-262/6.0/#sec-tostring
2147
+ // https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
3042
2148
 
3043
- var Type$1 = function Type$1(x) {
2149
+ var Type = function Type(x) {
3044
2150
  if (typeof x === 'symbol') {
3045
2151
  return 'Symbol';
3046
2152
  }
3047
- return Type(x);
2153
+ if (typeof x === 'bigint') {
2154
+ return 'BigInt';
2155
+ }
2156
+ return Type$1(x);
3048
2157
  };
3049
2158
 
3050
- // https://www.ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
2159
+ // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
3051
2160
 
3052
2161
  var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
3053
2162
  if (typeof Desc === 'undefined') {
3054
2163
  return Desc;
3055
2164
  }
3056
2165
 
3057
- assertRecord(Type$1, 'Property Descriptor', 'Desc', Desc);
2166
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
3058
2167
 
3059
2168
  var obj = {};
3060
2169
  if ('[[Value]]' in Desc) {
@@ -3078,7 +2187,7 @@ var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
3078
2187
  return obj;
3079
2188
  };
3080
2189
 
3081
- var $gOPD$1 = GetIntrinsic('%Object.getOwnPropertyDescriptor%');
2190
+ var $gOPD$1 = getIntrinsic('%Object.getOwnPropertyDescriptor%');
3082
2191
  if ($gOPD$1) {
3083
2192
  try {
3084
2193
  $gOPD$1([], 'length');
@@ -3090,65 +2199,85 @@ if ($gOPD$1) {
3090
2199
 
3091
2200
  var getOwnPropertyDescriptor = $gOPD$1;
3092
2201
 
3093
- var $Array = GetIntrinsic('%Array%');
2202
+ var $Array = getIntrinsic('%Array%');
3094
2203
 
3095
2204
  // eslint-disable-next-line global-require
3096
- var toStr$4 = !$Array.isArray && callBound('Object.prototype.toString');
2205
+ var toStr$1 = !$Array.isArray && callBound$1('Object.prototype.toString');
3097
2206
 
3098
- // https://www.ecma-international.org/ecma-262/6.0/#sec-isarray
2207
+ // https://ecma-international.org/ecma-262/6.0/#sec-isarray
3099
2208
 
3100
2209
  var IsArray = $Array.isArray || function IsArray(argument) {
3101
- return toStr$4(argument) === '[object Array]';
2210
+ return toStr$1(argument) === '[object Array]';
3102
2211
  };
3103
2212
 
3104
- // https://www.ecma-international.org/ecma-262/6.0/#sec-ispropertykey
2213
+ // https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey
3105
2214
 
3106
2215
  var IsPropertyKey = function IsPropertyKey(argument) {
3107
2216
  return typeof argument === 'string' || typeof argument === 'symbol';
3108
2217
  };
3109
2218
 
3110
- var regexExec = RegExp.prototype.exec;
3111
- var gOPD = Object.getOwnPropertyDescriptor;
2219
+ var hasSymbols$1 = hasSymbols$3();
2220
+ var hasToStringTag$1 = hasSymbols$1 && typeof Symbol.toStringTag === 'symbol';
2221
+ var has;
2222
+ var $exec;
2223
+ var isRegexMarker;
2224
+ var badStringifier;
3112
2225
 
3113
- var tryRegexExecCall = function tryRegexExec(value) {
3114
- try {
3115
- var lastIndex = value.lastIndex;
3116
- value.lastIndex = 0; // eslint-disable-line no-param-reassign
2226
+ if (hasToStringTag$1) {
2227
+ has = callBound$1('Object.prototype.hasOwnProperty');
2228
+ $exec = callBound$1('RegExp.prototype.exec');
2229
+ isRegexMarker = {};
3117
2230
 
3118
- regexExec.call(value);
3119
- return true;
3120
- } catch (e) {
3121
- return false;
3122
- } finally {
3123
- value.lastIndex = lastIndex; // eslint-disable-line no-param-reassign
2231
+ var throwRegexMarker = function () {
2232
+ throw isRegexMarker;
2233
+ };
2234
+ badStringifier = {
2235
+ toString: throwRegexMarker,
2236
+ valueOf: throwRegexMarker
2237
+ };
2238
+
2239
+ if (typeof Symbol.toPrimitive === 'symbol') {
2240
+ badStringifier[Symbol.toPrimitive] = throwRegexMarker;
3124
2241
  }
3125
- };
3126
- var toStr$5 = Object.prototype.toString;
2242
+ }
2243
+
2244
+ var $toString = callBound$1('Object.prototype.toString');
2245
+ var gOPD = Object.getOwnPropertyDescriptor;
3127
2246
  var regexClass = '[object RegExp]';
3128
- var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
3129
2247
 
3130
- var isRegex = function isRegex(value) {
3131
- if (!value || typeof value !== 'object') {
3132
- return false;
3133
- }
3134
- if (!hasToStringTag) {
3135
- return toStr$5.call(value) === regexClass;
3136
- }
2248
+ var isRegex = hasToStringTag$1
2249
+ // eslint-disable-next-line consistent-return
2250
+ ? function isRegex(value) {
2251
+ if (!value || typeof value !== 'object') {
2252
+ return false;
2253
+ }
3137
2254
 
3138
- var descriptor = gOPD(value, 'lastIndex');
3139
- var hasLastIndexDataProperty = descriptor && src(descriptor, 'value');
3140
- if (!hasLastIndexDataProperty) {
3141
- return false;
2255
+ var descriptor = gOPD(value, 'lastIndex');
2256
+ var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
2257
+ if (!hasLastIndexDataProperty) {
2258
+ return false;
2259
+ }
2260
+
2261
+ try {
2262
+ $exec(value, badStringifier);
2263
+ } catch (e) {
2264
+ return e === isRegexMarker;
2265
+ }
3142
2266
  }
2267
+ : function isRegex(value) {
2268
+ // In older browsers, typeof regex incorrectly returns 'function'
2269
+ if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
2270
+ return false;
2271
+ }
3143
2272
 
3144
- return tryRegexExecCall(value);
3145
- };
2273
+ return $toString(value) === regexClass;
2274
+ };
3146
2275
 
3147
- // http://www.ecma-international.org/ecma-262/5.1/#sec-9.2
2276
+ // http://262.ecma-international.org/5.1/#sec-9.2
3148
2277
 
3149
2278
  var ToBoolean = function ToBoolean(value) { return !!value; };
3150
2279
 
3151
- var $match = GetIntrinsic('%Symbol.match%', true);
2280
+ var $match = getIntrinsic('%Symbol.match%', true);
3152
2281
 
3153
2282
 
3154
2283
 
@@ -3170,6 +2299,27 @@ var IsRegExp = function IsRegExp(argument) {
3170
2299
  };
3171
2300
 
3172
2301
  var fnToStr = Function.prototype.toString;
2302
+ var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
2303
+ var badArrayLike;
2304
+ var isCallableMarker;
2305
+ if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
2306
+ try {
2307
+ badArrayLike = Object.defineProperty({}, 'length', {
2308
+ get: function () {
2309
+ throw isCallableMarker;
2310
+ }
2311
+ });
2312
+ isCallableMarker = {};
2313
+ // eslint-disable-next-line no-throw-literal
2314
+ reflectApply(function () { throw 42; }, null, badArrayLike);
2315
+ } catch (_) {
2316
+ if (_ !== isCallableMarker) {
2317
+ reflectApply = null;
2318
+ }
2319
+ }
2320
+ } else {
2321
+ reflectApply = null;
2322
+ }
3173
2323
 
3174
2324
  var constructorRegex = /^\s*class\b/;
3175
2325
  var isES6ClassFn = function isES6ClassFunction(value) {
@@ -3190,36 +2340,52 @@ var tryFunctionObject = function tryFunctionToStr(value) {
3190
2340
  return false;
3191
2341
  }
3192
2342
  };
3193
- var toStr$6 = Object.prototype.toString;
2343
+ var toStr = Object.prototype.toString;
3194
2344
  var fnClass = '[object Function]';
3195
2345
  var genClass = '[object GeneratorFunction]';
3196
- var hasToStringTag$1 = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
3197
-
3198
- var isCallable = function isCallable(value) {
3199
- if (!value) { return false; }
3200
- if (typeof value !== 'function' && typeof value !== 'object') { return false; }
3201
- if (typeof value === 'function' && !value.prototype) { return true; }
3202
- if (hasToStringTag$1) { return tryFunctionObject(value); }
3203
- if (isES6ClassFn(value)) { return false; }
3204
- var strClass = toStr$6.call(value);
3205
- return strClass === fnClass || strClass === genClass;
3206
- };
2346
+ var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
2347
+ /* globals document: false */
2348
+ var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};
2349
+
2350
+ var isCallable = reflectApply
2351
+ ? function isCallable(value) {
2352
+ if (value === documentDotAll) { return true; }
2353
+ if (!value) { return false; }
2354
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2355
+ if (typeof value === 'function' && !value.prototype) { return true; }
2356
+ try {
2357
+ reflectApply(value, null, badArrayLike);
2358
+ } catch (e) {
2359
+ if (e !== isCallableMarker) { return false; }
2360
+ }
2361
+ return !isES6ClassFn(value);
2362
+ }
2363
+ : function isCallable(value) {
2364
+ if (value === documentDotAll) { return true; }
2365
+ if (!value) { return false; }
2366
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2367
+ if (typeof value === 'function' && !value.prototype) { return true; }
2368
+ if (hasToStringTag) { return tryFunctionObject(value); }
2369
+ if (isES6ClassFn(value)) { return false; }
2370
+ var strClass = toStr.call(value);
2371
+ return strClass === fnClass || strClass === genClass;
2372
+ };
3207
2373
 
3208
- // http://www.ecma-international.org/ecma-262/5.1/#sec-9.11
2374
+ // http://262.ecma-international.org/5.1/#sec-9.11
3209
2375
 
3210
2376
  var IsCallable = isCallable;
3211
2377
 
3212
- var $TypeError$2 = GetIntrinsic('%TypeError%');
2378
+ var $TypeError$3 = getIntrinsic('%TypeError%');
3213
2379
 
3214
2380
 
3215
2381
 
3216
2382
 
3217
2383
 
3218
- // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5
2384
+ // https://262.ecma-international.org/5.1/#sec-8.10.5
3219
2385
 
3220
2386
  var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
3221
- if (Type$1(Obj) !== 'Object') {
3222
- throw new $TypeError$2('ToPropertyDescriptor requires an object');
2387
+ if (Type(Obj) !== 'Object') {
2388
+ throw new $TypeError$3('ToPropertyDescriptor requires an object');
3223
2389
  }
3224
2390
 
3225
2391
  var desc = {};
@@ -3238,29 +2404,29 @@ var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
3238
2404
  if (src(Obj, 'get')) {
3239
2405
  var getter = Obj.get;
3240
2406
  if (typeof getter !== 'undefined' && !IsCallable(getter)) {
3241
- throw new TypeError('getter must be a function');
2407
+ throw new $TypeError$3('getter must be a function');
3242
2408
  }
3243
2409
  desc['[[Get]]'] = getter;
3244
2410
  }
3245
2411
  if (src(Obj, 'set')) {
3246
2412
  var setter = Obj.set;
3247
2413
  if (typeof setter !== 'undefined' && !IsCallable(setter)) {
3248
- throw new $TypeError$2('setter must be a function');
2414
+ throw new $TypeError$3('setter must be a function');
3249
2415
  }
3250
2416
  desc['[[Set]]'] = setter;
3251
2417
  }
3252
2418
 
3253
2419
  if ((src(desc, '[[Get]]') || src(desc, '[[Set]]')) && (src(desc, '[[Value]]') || src(desc, '[[Writable]]'))) {
3254
- throw new $TypeError$2('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
2420
+ throw new $TypeError$3('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
3255
2421
  }
3256
2422
  return desc;
3257
2423
  };
3258
2424
 
3259
- var $TypeError$3 = GetIntrinsic('%TypeError%');
2425
+ var $TypeError$2 = getIntrinsic('%TypeError%');
3260
2426
 
3261
2427
 
3262
2428
 
3263
- var $isEnumerable$1 = callBound('Object.prototype.propertyIsEnumerable');
2429
+ var $isEnumerable = callBound$1('Object.prototype.propertyIsEnumerable');
3264
2430
 
3265
2431
 
3266
2432
 
@@ -3270,14 +2436,14 @@ var $isEnumerable$1 = callBound('Object.prototype.propertyIsEnumerable');
3270
2436
 
3271
2437
 
3272
2438
 
3273
- // https://www.ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
2439
+ // https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
3274
2440
 
3275
2441
  var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
3276
- if (Type$1(O) !== 'Object') {
3277
- throw new $TypeError$3('Assertion failed: O must be an Object');
2442
+ if (Type(O) !== 'Object') {
2443
+ throw new $TypeError$2('Assertion failed: O must be an Object');
3278
2444
  }
3279
2445
  if (!IsPropertyKey(P)) {
3280
- throw new $TypeError$3('Assertion failed: P must be a Property Key');
2446
+ throw new $TypeError$2('Assertion failed: P must be a Property Key');
3281
2447
  }
3282
2448
  if (!src(O, P)) {
3283
2449
  return void 0;
@@ -3288,7 +2454,7 @@ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
3288
2454
  var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
3289
2455
  return {
3290
2456
  '[[Configurable]]': !(arrayLength || regexLastIndex),
3291
- '[[Enumerable]]': $isEnumerable$1(O, P),
2457
+ '[[Enumerable]]': $isEnumerable(O, P),
3292
2458
  '[[Value]]': O[P],
3293
2459
  '[[Writable]]': true
3294
2460
  };
@@ -3296,14 +2462,14 @@ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
3296
2462
  return ToPropertyDescriptor(getOwnPropertyDescriptor(O, P));
3297
2463
  };
3298
2464
 
3299
- // https://www.ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
2465
+ // https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
3300
2466
 
3301
2467
  var IsDataDescriptor = function IsDataDescriptor(Desc) {
3302
2468
  if (typeof Desc === 'undefined') {
3303
2469
  return false;
3304
2470
  }
3305
2471
 
3306
- assertRecord(Type$1, 'Property Descriptor', 'Desc', Desc);
2472
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
3307
2473
 
3308
2474
  if (!src(Desc, '[[Value]]') && !src(Desc, '[[Writable]]')) {
3309
2475
  return false;
@@ -3316,14 +2482,14 @@ var isPrimitive = function isPrimitive(value) {
3316
2482
  return value === null || (typeof value !== 'function' && typeof value !== 'object');
3317
2483
  };
3318
2484
 
3319
- var $Object = GetIntrinsic('%Object%');
2485
+ var $Object$1 = getIntrinsic('%Object%');
3320
2486
 
3321
2487
 
3322
2488
 
3323
- var $preventExtensions = $Object.preventExtensions;
3324
- var $isExtensible = $Object.isExtensible;
2489
+ var $preventExtensions = $Object$1.preventExtensions;
2490
+ var $isExtensible = $Object$1.isExtensible;
3325
2491
 
3326
- // https://www.ecma-international.org/ecma-262/6.0/#sec-isextensible-o
2492
+ // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
3327
2493
 
3328
2494
  var IsExtensible = $preventExtensions
3329
2495
  ? function IsExtensible(obj) {
@@ -3337,7 +2503,7 @@ var _isNaN = Number.isNaN || function isNaN(a) {
3337
2503
  return a !== a;
3338
2504
  };
3339
2505
 
3340
- // http://www.ecma-international.org/ecma-262/5.1/#sec-9.12
2506
+ // http://262.ecma-international.org/5.1/#sec-9.12
3341
2507
 
3342
2508
  var SameValue = function SameValue(x, y) {
3343
2509
  if (x === y) { // 0 === -0, but they are not identical.
@@ -3347,7 +2513,7 @@ var SameValue = function SameValue(x, y) {
3347
2513
  return _isNaN(x) && _isNaN(y);
3348
2514
  };
3349
2515
 
3350
- var $TypeError$4 = GetIntrinsic('%TypeError%');
2516
+ var $TypeError$1 = getIntrinsic('%TypeError%');
3351
2517
 
3352
2518
 
3353
2519
 
@@ -3359,18 +2525,18 @@ var $TypeError$4 = GetIntrinsic('%TypeError%');
3359
2525
 
3360
2526
 
3361
2527
 
3362
- // https://www.ecma-international.org/ecma-262/6.0/#sec-createdataproperty
2528
+ // https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty
3363
2529
 
3364
2530
  var CreateDataProperty = function CreateDataProperty(O, P, V) {
3365
- if (Type$1(O) !== 'Object') {
3366
- throw new $TypeError$4('Assertion failed: Type(O) is not Object');
2531
+ if (Type(O) !== 'Object') {
2532
+ throw new $TypeError$1('Assertion failed: Type(O) is not Object');
3367
2533
  }
3368
2534
  if (!IsPropertyKey(P)) {
3369
- throw new $TypeError$4('Assertion failed: IsPropertyKey(P) is not true');
2535
+ throw new $TypeError$1('Assertion failed: IsPropertyKey(P) is not true');
3370
2536
  }
3371
2537
  var oldDesc = OrdinaryGetOwnProperty(O, P);
3372
- var extensible = oldDesc || IsExtensible(O);
3373
- var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable);
2538
+ var extensible = !oldDesc || IsExtensible(O);
2539
+ var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']);
3374
2540
  if (immutable || !extensible) {
3375
2541
  return false;
3376
2542
  }
@@ -3389,44 +2555,44 @@ var CreateDataProperty = function CreateDataProperty(O, P, V) {
3389
2555
  );
3390
2556
  };
3391
2557
 
3392
- var $TypeError$5 = GetIntrinsic('%TypeError%');
2558
+ var $TypeError = getIntrinsic('%TypeError%');
3393
2559
 
3394
- // http://www.ecma-international.org/ecma-262/5.1/#sec-9.10
2560
+ // http://262.ecma-international.org/5.1/#sec-9.10
3395
2561
 
3396
2562
  var CheckObjectCoercible = function CheckObjectCoercible(value, optMessage) {
3397
2563
  if (value == null) {
3398
- throw new $TypeError$5(optMessage || ('Cannot call method on ' + value));
2564
+ throw new $TypeError(optMessage || ('Cannot call method on ' + value));
3399
2565
  }
3400
2566
  return value;
3401
2567
  };
3402
2568
 
3403
2569
  var RequireObjectCoercible = CheckObjectCoercible;
3404
2570
 
3405
- var $Object$1 = GetIntrinsic('%Object%');
2571
+ var $Object = getIntrinsic('%Object%');
3406
2572
 
3407
2573
 
3408
2574
 
3409
- // https://www.ecma-international.org/ecma-262/6.0/#sec-toobject
2575
+ // https://ecma-international.org/ecma-262/6.0/#sec-toobject
3410
2576
 
3411
2577
  var ToObject = function ToObject(value) {
3412
2578
  RequireObjectCoercible(value);
3413
- return $Object$1(value);
2579
+ return $Object(value);
3414
2580
  };
3415
2581
 
3416
- var $gOPD$2 = Object.getOwnPropertyDescriptor;
2582
+ var $gOPD = Object.getOwnPropertyDescriptor;
3417
2583
  var $getOwnNames = Object.getOwnPropertyNames;
3418
2584
  var $getSymbols = Object.getOwnPropertySymbols;
3419
- var $concat = callBound('Array.prototype.concat');
3420
- var $reduce = callBound('Array.prototype.reduce');
2585
+ var $concat$1 = callBound$1('Array.prototype.concat');
2586
+ var $reduce = callBound$1('Array.prototype.reduce');
3421
2587
  var getAll = $getSymbols ? function (obj) {
3422
- return $concat($getOwnNames(obj), $getSymbols(obj));
2588
+ return $concat$1($getOwnNames(obj), $getSymbols(obj));
3423
2589
  } : $getOwnNames;
3424
2590
 
3425
- var isES5 = IsCallable($gOPD$2) && IsCallable($getOwnNames);
2591
+ var isES5$1 = IsCallable($gOPD) && IsCallable($getOwnNames);
3426
2592
 
3427
- var implementation$2 = function getOwnPropertyDescriptors(value) {
2593
+ var implementation$1 = function getOwnPropertyDescriptors(value) {
3428
2594
  RequireObjectCoercible(value);
3429
- if (!isES5) {
2595
+ if (!isES5$1) {
3430
2596
  throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor');
3431
2597
  }
3432
2598
 
@@ -3434,7 +2600,7 @@ var implementation$2 = function getOwnPropertyDescriptors(value) {
3434
2600
  return $reduce(
3435
2601
  getAll(O),
3436
2602
  function (acc, key) {
3437
- var descriptor = $gOPD$2(O, key);
2603
+ var descriptor = $gOPD(O, key);
3438
2604
  if (typeof descriptor !== 'undefined') {
3439
2605
  CreateDataProperty(acc, key, descriptor);
3440
2606
  }
@@ -3444,34 +2610,40 @@ var implementation$2 = function getOwnPropertyDescriptors(value) {
3444
2610
  );
3445
2611
  };
3446
2612
 
3447
- var polyfill = function getPolyfill() {
3448
- return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation$2;
2613
+ var polyfill$2 = function getPolyfill() {
2614
+ return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation$1;
3449
2615
  };
3450
2616
 
3451
- var shim = function shimGetOwnPropertyDescriptors() {
3452
- var polyfill$1 = polyfill();
2617
+ var shim$1 = function shimGetOwnPropertyDescriptors() {
2618
+ var polyfill = polyfill$2();
3453
2619
  defineProperties_1(
3454
2620
  Object,
3455
- { getOwnPropertyDescriptors: polyfill$1 },
3456
- { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill$1; } }
2621
+ { getOwnPropertyDescriptors: polyfill },
2622
+ { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill; } }
3457
2623
  );
3458
- return polyfill$1;
2624
+ return polyfill;
3459
2625
  };
3460
2626
 
3461
- defineProperties_1(implementation$2, {
3462
- getPolyfill: polyfill,
3463
- implementation: implementation$2,
3464
- shim: shim
2627
+ var bound = callBind(polyfill$2(), Object);
2628
+
2629
+ defineProperties_1(bound, {
2630
+ getPolyfill: polyfill$2,
2631
+ implementation: implementation$1,
2632
+ shim: shim$1
3465
2633
  });
3466
2634
 
3467
- var object_getownpropertydescriptors = implementation$2;
2635
+ var object_getownpropertydescriptors = bound;
2636
+
2637
+ // TODO; semver-major: remove
3468
2638
 
3469
- var isES5$1 = typeof Object.defineProperty === 'function'
2639
+ var callBound = callBound$1;
2640
+
2641
+ var isES5 = typeof Object.defineProperty === 'function'
3470
2642
  && typeof Object.defineProperties === 'function';
3471
2643
 
3472
2644
  var hasProto = [].__proto__ === Array.prototype; // eslint-disable-line no-proto
3473
2645
 
3474
- if (!isES5$1 || !hasProto) {
2646
+ if (!isES5 || !hasProto) {
3475
2647
  throw new TypeError('util.promisify requires a true ES5 environment, that also supports `__proto__`');
3476
2648
  }
3477
2649
 
@@ -3484,15 +2656,15 @@ if (typeof Promise !== 'function') {
3484
2656
 
3485
2657
 
3486
2658
  var $slice = callBound('Array.prototype.slice');
3487
- var $concat$1 = callBound('Array.prototype.concat');
2659
+ var $concat = callBound('Array.prototype.concat');
3488
2660
  var $forEach = callBound('Array.prototype.forEach');
3489
2661
 
3490
- var hasSymbols$3 = hasSymbols$1();
2662
+ var hasSymbols = hasSymbols$3();
3491
2663
 
3492
- var kCustomPromisifiedSymbol = hasSymbols$3 ? Symbol('util.promisify.custom') : null;
3493
- var kCustomPromisifyArgsSymbol = hasSymbols$3 ? Symbol('customPromisifyArgs') : null;
2664
+ var kCustomPromisifiedSymbol = hasSymbols ? Symbol('util.promisify.custom') : null;
2665
+ var kCustomPromisifyArgsSymbol = hasSymbols ? Symbol('customPromisifyArgs') : null;
3494
2666
 
3495
- var implementation$3 = function promisify(orig) {
2667
+ var implementation = function promisify(orig) {
3496
2668
  if (typeof orig !== 'function') {
3497
2669
  var error = new TypeError('The "original" argument must be of type function');
3498
2670
  error.name = 'TypeError [ERR_INVALID_ARG_TYPE]';
@@ -3500,7 +2672,7 @@ var implementation$3 = function promisify(orig) {
3500
2672
  throw error;
3501
2673
  }
3502
2674
 
3503
- if (hasSymbols$3 && orig[kCustomPromisifiedSymbol]) {
2675
+ if (hasSymbols && orig[kCustomPromisifiedSymbol]) {
3504
2676
  var customFunction = orig[kCustomPromisifiedSymbol];
3505
2677
  if (typeof customFunction !== 'function') {
3506
2678
  throw new TypeError('The [util.promisify.custom] property must be a function');
@@ -3522,7 +2694,7 @@ var implementation$3 = function promisify(orig) {
3522
2694
  var args = $slice(arguments);
3523
2695
  var self = this; // eslint-disable-line no-invalid-this
3524
2696
  return new Promise(function (resolve, reject) {
3525
- orig.apply(self, $concat$1(args, function (err) {
2697
+ orig.apply(self, $concat(args, function (err) {
3526
2698
  var values = arguments.length > 1 ? $slice(arguments, 1) : [];
3527
2699
  if (err) {
3528
2700
  reject(err);
@@ -3552,17 +2724,17 @@ var implementation$3 = function promisify(orig) {
3552
2724
 
3553
2725
  var custom = kCustomPromisifiedSymbol;
3554
2726
  var customPromisifyArgs = kCustomPromisifyArgsSymbol;
3555
- implementation$3.custom = custom;
3556
- implementation$3.customPromisifyArgs = customPromisifyArgs;
2727
+ implementation.custom = custom;
2728
+ implementation.customPromisifyArgs = customPromisifyArgs;
3557
2729
 
3558
2730
  var polyfill$1 = function getPolyfill() {
3559
2731
  if (typeof util.promisify === 'function') {
3560
2732
  return util.promisify;
3561
2733
  }
3562
- return implementation$3;
2734
+ return implementation;
3563
2735
  };
3564
2736
 
3565
- var shim$1 = function shimUtilPromisify() {
2737
+ var shim = function shimUtilPromisify() {
3566
2738
  var polyfill = polyfill$1();
3567
2739
  if (polyfill !== util.promisify) {
3568
2740
  Object.defineProperty(util, 'promisify', {
@@ -3575,20 +2747,20 @@ var shim$1 = function shimUtilPromisify() {
3575
2747
  return polyfill;
3576
2748
  };
3577
2749
 
3578
- var polyfill$2 = polyfill$1();
2750
+ var polyfill = polyfill$1();
3579
2751
 
3580
2752
 
3581
2753
  /* eslint-disable no-unused-vars */
3582
2754
  var boundPromisify = function promisify(orig) {
3583
2755
  /* eslint-enable no-unused-vars */
3584
- return polyfill$2.apply(util, arguments);
2756
+ return polyfill.apply(util, arguments);
3585
2757
  };
3586
2758
  defineProperties_1(boundPromisify, {
3587
- custom: polyfill$2.custom,
3588
- customPromisifyArgs: polyfill$2.customPromisifyArgs,
2759
+ custom: polyfill.custom,
2760
+ customPromisifyArgs: polyfill.customPromisifyArgs,
3589
2761
  getPolyfill: polyfill$1,
3590
- implementation: implementation$3,
3591
- shim: shim$1
2762
+ implementation: implementation,
2763
+ shim: shim
3592
2764
  });
3593
2765
 
3594
2766
  var util_promisify = boundPromisify;
@@ -3629,16 +2801,16 @@ function connect() {
3629
2801
 
3630
2802
  var db = connect;
3631
2803
 
3632
- var _this$3 = undefined;
2804
+ var _this$1 = undefined;
3633
2805
 
3634
- var config = {
2806
+ var config$1 = {
3635
2807
  host: 'sanity-datasource.cluster-crao688bsrdh.us-east-1.rds.amazonaws.com',
3636
2808
  user: 'nasp',
3637
2809
  password: 'uRNkF9SkfXQs6AKK',
3638
2810
  database: 'user'
3639
2811
  };
3640
2812
 
3641
- var findUser = function () {
2813
+ var findUser$1 = function () {
3642
2814
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(email) {
3643
2815
  var password = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
3644
2816
  var db$1, query, res, user, hash, passwordsMatch, user_shared, occupation_id;
@@ -3650,7 +2822,7 @@ var findUser = function () {
3650
2822
  _context.prev = 1;
3651
2823
 
3652
2824
 
3653
- db$1 = db(config);
2825
+ db$1 = db(config$1);
3654
2826
 
3655
2827
  query = '\n select * \n from user \n where trim(lower(email)) = ?\n ';
3656
2828
  _context.next = 6;
@@ -3746,7 +2918,7 @@ var findUser = function () {
3746
2918
  };
3747
2919
  }();
3748
2920
 
3749
- var updateUser = function () {
2921
+ var updateUser$1 = function () {
3750
2922
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(data) {
3751
2923
  var db$1, query, res, hash, columns, i, column, occupation_name;
3752
2924
  return regenerator.wrap(function _callee2$(_context2) {
@@ -3759,7 +2931,7 @@ var updateUser = function () {
3759
2931
 
3760
2932
  validateUserData(data);
3761
2933
 
3762
- db$1 = db(config);
2934
+ db$1 = db(config$1);
3763
2935
 
3764
2936
  _context2.next = 6;
3765
2937
  return db$1.beginTransaction();
@@ -3866,7 +3038,7 @@ var updateUser = function () {
3866
3038
 
3867
3039
  return _context2.abrupt('return', {
3868
3040
  error: '',
3869
- user: findUser(data.email)
3041
+ user: findUser$1(data.email)
3870
3042
  });
3871
3043
 
3872
3044
  case 45:
@@ -3978,7 +3150,7 @@ var getOccupationNameById = function () {
3978
3150
  return _context3.stop();
3979
3151
  }
3980
3152
  }
3981
- }, _callee3, _this$3);
3153
+ }, _callee3, _this$1);
3982
3154
  }));
3983
3155
 
3984
3156
  return function getOccupationNameById(_x5, _x6) {
@@ -3986,7 +3158,7 @@ var getOccupationNameById = function () {
3986
3158
  };
3987
3159
  }();
3988
3160
 
3989
- var createUser = function () {
3161
+ var createUser$1 = function () {
3990
3162
  var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4(data) {
3991
3163
  var db$1, query, res, hash, columns, i, column, user_id, occupation_name;
3992
3164
  return regenerator.wrap(function _callee4$(_context4) {
@@ -3999,7 +3171,7 @@ var createUser = function () {
3999
3171
 
4000
3172
  validateUserData(data, true);
4001
3173
 
4002
- db$1 = db(config);
3174
+ db$1 = db(config$1);
4003
3175
 
4004
3176
  _context4.next = 6;
4005
3177
  return db$1.beginTransaction();
@@ -4095,7 +3267,7 @@ var createUser = function () {
4095
3267
  case 39:
4096
3268
  return _context4.abrupt('return', {
4097
3269
  error: '',
4098
- user: findUser(data.email)
3270
+ user: findUser$1(data.email)
4099
3271
  });
4100
3272
 
4101
3273
  case 42:
@@ -4133,7 +3305,7 @@ var createUser = function () {
4133
3305
  };
4134
3306
  }();
4135
3307
 
4136
- var createUser$1 = function () {
3308
+ var createUser = function () {
4137
3309
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(data) {
4138
3310
  var res;
4139
3311
  return regenerator.wrap(function _callee$(_context) {
@@ -4141,7 +3313,7 @@ var createUser$1 = function () {
4141
3313
  switch (_context.prev = _context.next) {
4142
3314
  case 0:
4143
3315
  _context.next = 2;
4144
- return createUser(data);
3316
+ return createUser$1(data);
4145
3317
 
4146
3318
  case 2:
4147
3319
  res = _context.sent;
@@ -4169,7 +3341,7 @@ var createUser$1 = function () {
4169
3341
  };
4170
3342
  }();
4171
3343
 
4172
- var updateUser$1 = function () {
3344
+ var updateUser = function () {
4173
3345
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(data) {
4174
3346
  var res;
4175
3347
  return regenerator.wrap(function _callee2$(_context2) {
@@ -4177,7 +3349,7 @@ var updateUser$1 = function () {
4177
3349
  switch (_context2.prev = _context2.next) {
4178
3350
  case 0:
4179
3351
  _context2.next = 2;
4180
- return updateUser(data);
3352
+ return updateUser$1(data);
4181
3353
 
4182
3354
  case 2:
4183
3355
  res = _context2.sent;
@@ -4205,7 +3377,7 @@ var updateUser$1 = function () {
4205
3377
  };
4206
3378
  }();
4207
3379
 
4208
- var findUser$1 = function () {
3380
+ var findUser = function () {
4209
3381
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3(_ref4) {
4210
3382
  var email = _ref4.email,
4211
3383
  password = _ref4.password;
@@ -4215,7 +3387,7 @@ var findUser$1 = function () {
4215
3387
  switch (_context3.prev = _context3.next) {
4216
3388
  case 0:
4217
3389
  _context3.next = 2;
4218
- return findUser(email, password);
3390
+ return findUser$1(email, password);
4219
3391
 
4220
3392
  case 2:
4221
3393
  res = _context3.sent;
@@ -4245,9 +3417,9 @@ var findUser$1 = function () {
4245
3417
 
4246
3418
  var user = /*#__PURE__*/Object.freeze({
4247
3419
  __proto__: null,
4248
- createUser: createUser$1,
4249
- updateUser: updateUser$1,
4250
- findUser: findUser$1
3420
+ createUser: createUser,
3421
+ updateUser: updateUser,
3422
+ findUser: findUser
4251
3423
  });
4252
3424
 
4253
3425
  var localStrategy = new Local.Strategy({
@@ -4255,7 +3427,7 @@ var localStrategy = new Local.Strategy({
4255
3427
  passwordField: 'password'
4256
3428
  }, function (email, password, done) {
4257
3429
 
4258
- findUser$1({ email: email, password: password }).then(function (user) {
3430
+ findUser({ email: email, password: password }).then(function (user) {
4259
3431
  done(null, user);
4260
3432
  }).catch(function (error) {
4261
3433
  done(error);
@@ -4267,9 +3439,9 @@ var passportLocal = /*#__PURE__*/Object.freeze({
4267
3439
  localStrategy: localStrategy
4268
3440
  });
4269
3441
 
4270
- var _this$4 = undefined;
3442
+ var _this = undefined;
4271
3443
 
4272
- var config$1 = {
3444
+ var config = {
4273
3445
  host: 'sanity-datasource.cluster-crao688bsrdh.us-east-1.rds.amazonaws.com',
4274
3446
  user: 'nasp',
4275
3447
  password: 'uRNkF9SkfXQs6AKK',
@@ -4283,7 +3455,7 @@ var getOccupation = function () {
4283
3455
  while (1) {
4284
3456
  switch (_context.prev = _context.next) {
4285
3457
  case 0:
4286
- db$1 = db(config$1);
3458
+ db$1 = db(config);
4287
3459
  query = '\n select name as label, id as value\n from occupation\n where type = ?\n ';
4288
3460
  _context.next = 4;
4289
3461
  return db$1.query(query, [type]);
@@ -4301,7 +3473,7 @@ var getOccupation = function () {
4301
3473
  return _context.stop();
4302
3474
  }
4303
3475
  }
4304
- }, _callee, _this$4);
3476
+ }, _callee, _this);
4305
3477
  }));
4306
3478
 
4307
3479
  return function getOccupation(_x) {
@@ -4316,7 +3488,7 @@ var getFieldsAndOptions = function () {
4316
3488
  while (1) {
4317
3489
  switch (_context2.prev = _context2.next) {
4318
3490
  case 0:
4319
- db$1 = db(config$1);
3491
+ db$1 = db(config);
4320
3492
  query = '\n select * \n from field\n where occupation_id = ?\n order by sorting\n ';
4321
3493
  _context2.next = 4;
4322
3494
  return db$1.query(query, [occupation]);
@@ -4364,7 +3536,7 @@ var getFieldsAndOptions = function () {
4364
3536
  return _context2.stop();
4365
3537
  }
4366
3538
  }
4367
- }, _callee2, _this$4);
3539
+ }, _callee2, _this);
4368
3540
  }));
4369
3541
 
4370
3542
  return function getFieldsAndOptions(_x2) {
@@ -4435,8 +3607,8 @@ var ProcessData = (function () {
4435
3607
  })();
4436
3608
 
4437
3609
  var LoginForm_1 = LoginForm;
4438
- var SignupForm_1 = SignupForm;
4439
- var ProfileForm_1 = SignupForm$1;
3610
+ var SignupForm_1 = SignupForm$1;
3611
+ var ProfileForm_1 = SignupForm;
4440
3612
  var AuthCookies_1 = authCookies;
4441
3613
  var AuthHooks_1 = hooks;
4442
3614
  var Iron_1 = iron;