ext_yarn 0.4.0 → 0.5.0

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 (347) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +41 -47
  3. data/README.md +10 -0
  4. data/bin/yarn_after +12 -0
  5. data/lib/ext_yarn/version.rb +1 -1
  6. data/package.json +14 -13
  7. data/vendor/.yarn-integrity +35 -39
  8. data/vendor/bootswatch-sass/package.json +1 -1
  9. data/vendor/chart.js/dist/Chart.bundle.js +5754 -5711
  10. data/vendor/chart.js/dist/Chart.js +2118 -2046
  11. data/vendor/chart.js/package.json +1 -1
  12. data/vendor/chartkick/LICENSE.txt +1 -1
  13. data/vendor/chartkick/dist/chartkick.js +2239 -0
  14. data/vendor/chartkick/package.json +18 -8
  15. data/vendor/file-saver/dist/FileSaver.js +180 -0
  16. data/vendor/file-saver/package.json +16 -4
  17. data/vendor/jquery/dist/jquery.js +453 -342
  18. data/vendor/jquery/dist/jquery.slim.js +428 -319
  19. data/vendor/jquery/package.json +32 -21
  20. data/vendor/{tempusdominus-bootstrap-4 → jquery-touch-events}/LICENSE +21 -21
  21. data/vendor/jquery-touch-events/package.json +32 -0
  22. data/vendor/jquery-touch-events/src/jquery.mobile-events.js +920 -0
  23. data/vendor/jquery-ui-touch-punch-zoom-fork/jquery.ui.touch-punch.js +186 -0
  24. data/vendor/jquery-ujs/package.json +1 -1
  25. data/vendor/jquery-ujs/src/rails.js +14 -4
  26. data/vendor/{bootswatch → jquery.iframe-transport}/LICENSE +2 -2
  27. data/vendor/jquery.iframe-transport/jquery.iframe-transport.js +247 -0
  28. data/vendor/jquery.iframe-transport/package.json +28 -0
  29. data/vendor/jstz/dist/jstz.js +9 -1
  30. data/vendor/jstz/package.json +6 -4
  31. data/vendor/lazysizes/LICENSE +22 -0
  32. data/vendor/lazysizes/lazysizes-umd.js +706 -0
  33. data/vendor/lazysizes/lazysizes.js +703 -0
  34. data/vendor/lazysizes/package.json +65 -0
  35. data/vendor/lazysizes/plugins/artdirect/ls.artdirect.js +160 -0
  36. data/vendor/lazysizes/plugins/aspectratio/ls.aspectratio.js +209 -0
  37. data/vendor/lazysizes/plugins/attrchange/ls.attrchange.js +129 -0
  38. data/vendor/lazysizes/plugins/bgset/ls.bgset.js +198 -0
  39. data/vendor/lazysizes/plugins/blur-up/ls.blur-up.js +191 -0
  40. data/vendor/lazysizes/plugins/custommedia/ls.custommedia.js +75 -0
  41. data/vendor/lazysizes/plugins/fix-ios-sizes/fix-ios-sizes.js +80 -0
  42. data/vendor/lazysizes/plugins/include/ls.include.js +589 -0
  43. data/vendor/lazysizes/plugins/noscript/ls.noscript.js +87 -0
  44. data/vendor/lazysizes/plugins/object-fit/ls.object-fit.js +149 -0
  45. data/vendor/lazysizes/plugins/optimumx/ls.optimumx.js +273 -0
  46. data/vendor/lazysizes/plugins/parent-fit/ls.parent-fit.js +157 -0
  47. data/vendor/lazysizes/plugins/print/ls.print.js +51 -0
  48. data/vendor/lazysizes/plugins/progressive/ls.progressive.js +49 -0
  49. data/vendor/lazysizes/plugins/respimg/ls.respimg.js +314 -0
  50. data/vendor/lazysizes/plugins/rias/ls.rias.js +391 -0
  51. data/vendor/lazysizes/plugins/static-gecko-picture/ls.static-gecko-picture.js +82 -0
  52. data/vendor/lazysizes/plugins/twitter/ls.twitter.js +63 -0
  53. data/vendor/lazysizes/plugins/unload/ls.unload.js +155 -0
  54. data/vendor/lazysizes/plugins/unveilhooks/ls.unveilhooks.js +145 -0
  55. data/vendor/lazysizes/plugins/video-embed/ls.video-embed.js +114 -0
  56. data/vendor/lodash/core.js +75 -57
  57. data/vendor/lodash/lodash.js +105 -82
  58. data/vendor/lodash/package.json +2 -2
  59. data/vendor/moment/locale/af.js +58 -60
  60. data/vendor/moment/locale/ar-dz.js +45 -47
  61. data/vendor/moment/locale/ar-kw.js +45 -47
  62. data/vendor/moment/locale/ar-ly.js +106 -112
  63. data/vendor/moment/locale/ar-ma.js +45 -48
  64. data/vendor/moment/locale/ar-sa.js +88 -91
  65. data/vendor/moment/locale/ar-tn.js +45 -47
  66. data/vendor/moment/locale/ar.js +119 -128
  67. data/vendor/moment/locale/az.js +89 -91
  68. data/vendor/moment/locale/be.js +111 -115
  69. data/vendor/moment/locale/bg.js +73 -75
  70. data/vendor/moment/locale/bm.js +44 -47
  71. data/vendor/moment/locale/bn.js +103 -105
  72. data/vendor/moment/locale/bo.js +103 -105
  73. data/vendor/moment/locale/br.js +88 -90
  74. data/vendor/moment/locale/bs.js +133 -136
  75. data/vendor/moment/locale/ca.js +68 -70
  76. data/vendor/moment/locale/cs.js +160 -162
  77. data/vendor/moment/locale/cv.js +48 -50
  78. data/vendor/moment/locale/cy.js +64 -67
  79. data/vendor/moment/locale/da.js +46 -48
  80. data/vendor/moment/locale/de-at.js +61 -66
  81. data/vendor/moment/locale/de-ch.js +61 -65
  82. data/vendor/moment/locale/de.js +61 -65
  83. data/vendor/moment/locale/dv.js +82 -85
  84. data/vendor/moment/locale/el.js +82 -84
  85. data/vendor/moment/locale/en-au.js +53 -55
  86. data/vendor/moment/locale/en-ca.js +49 -51
  87. data/vendor/moment/locale/en-gb.js +53 -55
  88. data/vendor/moment/locale/en-ie.js +53 -55
  89. data/vendor/moment/locale/en-il.js +61 -0
  90. data/vendor/moment/locale/en-nz.js +53 -55
  91. data/vendor/moment/locale/eo.js +56 -60
  92. data/vendor/moment/locale/es-do.js +72 -73
  93. data/vendor/moment/locale/es-us.js +64 -66
  94. data/vendor/moment/locale/es.js +72 -74
  95. data/vendor/moment/locale/et.js +64 -67
  96. data/vendor/moment/locale/eu.js +52 -54
  97. data/vendor/moment/locale/fa.js +90 -93
  98. data/vendor/moment/locale/fi.js +93 -95
  99. data/vendor/moment/locale/fo.js +46 -48
  100. data/vendor/moment/locale/fr-ca.js +58 -60
  101. data/vendor/moment/locale/fr-ch.js +62 -64
  102. data/vendor/moment/locale/fr.js +66 -68
  103. data/vendor/moment/locale/fy.js +59 -61
  104. data/vendor/moment/locale/gd.js +57 -59
  105. data/vendor/moment/locale/gl.js +60 -62
  106. data/vendor/moment/locale/gom-latn.js +107 -109
  107. data/vendor/moment/locale/gu.js +108 -110
  108. data/vendor/moment/locale/he.js +77 -81
  109. data/vendor/moment/locale/hi.js +108 -110
  110. data/vendor/moment/locale/hr.js +136 -138
  111. data/vendor/moment/locale/hu.js +92 -94
  112. data/vendor/moment/locale/hy-am.js +78 -80
  113. data/vendor/moment/locale/id.js +67 -70
  114. data/vendor/moment/locale/is.js +110 -112
  115. data/vendor/moment/locale/it.js +53 -56
  116. data/vendor/moment/locale/ja.js +77 -67
  117. data/vendor/moment/locale/jv.js +67 -70
  118. data/vendor/moment/locale/ka.js +70 -72
  119. data/vendor/moment/locale/kk.js +72 -74
  120. data/vendor/moment/locale/km.js +96 -46
  121. data/vendor/moment/locale/kn.js +110 -112
  122. data/vendor/moment/locale/ko.js +66 -69
  123. data/vendor/moment/locale/ky.js +72 -75
  124. data/vendor/moment/locale/lb.js +113 -116
  125. data/vendor/moment/locale/lo.js +55 -57
  126. data/vendor/moment/locale/lt.js +100 -102
  127. data/vendor/moment/locale/lv.js +81 -84
  128. data/vendor/moment/locale/me.js +93 -95
  129. data/vendor/moment/locale/mi.js +50 -52
  130. data/vendor/moment/locale/mk.js +73 -75
  131. data/vendor/moment/locale/ml.js +66 -68
  132. data/vendor/moment/locale/mn.js +103 -0
  133. data/vendor/moment/locale/mr.js +140 -143
  134. data/vendor/moment/locale/ms-my.js +67 -70
  135. data/vendor/moment/locale/ms.js +67 -69
  136. data/vendor/moment/locale/mt.js +46 -48
  137. data/vendor/moment/locale/my.js +77 -82
  138. data/vendor/moment/locale/nb.js +48 -51
  139. data/vendor/moment/locale/ne.js +107 -109
  140. data/vendor/moment/locale/nl-be.js +68 -71
  141. data/vendor/moment/locale/nl.js +68 -71
  142. data/vendor/moment/locale/nn.js +46 -48
  143. data/vendor/moment/locale/pa-in.js +108 -110
  144. data/vendor/moment/locale/pl.js +104 -106
  145. data/vendor/moment/locale/pt-br.js +46 -48
  146. data/vendor/moment/locale/pt.js +50 -52
  147. data/vendor/moment/locale/ro.js +59 -62
  148. data/vendor/moment/locale/ru.js +153 -157
  149. data/vendor/moment/locale/sd.js +82 -84
  150. data/vendor/moment/locale/se.js +46 -49
  151. data/vendor/moment/locale/si.js +56 -58
  152. data/vendor/moment/locale/sk.js +138 -141
  153. data/vendor/moment/locale/sl.js +154 -156
  154. data/vendor/moment/locale/sq.js +54 -58
  155. data/vendor/moment/locale/sr-cyrl.js +93 -95
  156. data/vendor/moment/locale/sr.js +93 -95
  157. data/vendor/moment/locale/ss.js +72 -75
  158. data/vendor/moment/locale/sv.js +55 -57
  159. data/vendor/moment/locale/sw.js +45 -47
  160. data/vendor/moment/locale/ta.js +113 -116
  161. data/vendor/moment/locale/te.js +74 -76
  162. data/vendor/moment/locale/tet.js +53 -56
  163. data/vendor/moment/locale/tg.js +115 -0
  164. data/vendor/moment/locale/th.js +52 -54
  165. data/vendor/moment/locale/tl-ph.js +48 -50
  166. data/vendor/moment/locale/tlh.js +101 -103
  167. data/vendor/moment/locale/tr.js +80 -78
  168. data/vendor/moment/locale/tzl.js +75 -78
  169. data/vendor/moment/locale/tzm-latn.js +44 -46
  170. data/vendor/moment/locale/tzm.js +44 -46
  171. data/vendor/moment/locale/ug-cn.js +118 -0
  172. data/vendor/moment/locale/uk.js +129 -132
  173. data/vendor/moment/locale/ur.js +82 -85
  174. data/vendor/moment/locale/uz-latn.js +44 -46
  175. data/vendor/moment/locale/uz.js +44 -46
  176. data/vendor/moment/locale/vi.js +64 -66
  177. data/vendor/moment/locale/x-pseudo.js +54 -56
  178. data/vendor/moment/locale/yo.js +46 -48
  179. data/vendor/moment/locale/zh-cn.js +95 -98
  180. data/vendor/moment/locale/zh-hk.js +88 -92
  181. data/vendor/moment/locale/zh-tw.js +88 -91
  182. data/vendor/moment/min/locales.js +9701 -9581
  183. data/vendor/moment/min/moment-with-locales.js +13426 -13335
  184. data/vendor/moment/moment.js +3780 -3809
  185. data/vendor/moment/package.json +10 -10
  186. data/vendor/moment-timezone/builds/moment-timezone-with-data-2012-2022.js +43 -35
  187. data/vendor/moment-timezone/builds/moment-timezone-with-data.js +290 -282
  188. data/vendor/moment-timezone/moment-timezone-utils.js +12 -10
  189. data/vendor/moment-timezone/moment-timezone.js +15 -7
  190. data/vendor/moment-timezone/package.json +5 -3
  191. data/vendor/{bootstrap → pako}/LICENSE +2 -3
  192. data/vendor/pako/dist/pako.js +6811 -0
  193. data/vendor/pako/dist/pako_deflate.js +3995 -0
  194. data/vendor/pako/dist/pako_inflate.js +3295 -0
  195. data/vendor/pako/package.json +48 -0
  196. data/yarn.lock +51 -78
  197. metadata +45 -155
  198. data/vendor/bootstrap/dist/js/bootstrap.bundle.js +0 -6461
  199. data/vendor/bootstrap/dist/js/bootstrap.js +0 -3944
  200. data/vendor/bootstrap/js/dist/alert.js +0 -204
  201. data/vendor/bootstrap/js/dist/button.js +0 -192
  202. data/vendor/bootstrap/js/dist/carousel.js +0 -567
  203. data/vendor/bootstrap/js/dist/collapse.js +0 -431
  204. data/vendor/bootstrap/js/dist/dropdown.js +0 -552
  205. data/vendor/bootstrap/js/dist/index.js +0 -23
  206. data/vendor/bootstrap/js/dist/modal.js +0 -634
  207. data/vendor/bootstrap/js/dist/popover.js +0 -266
  208. data/vendor/bootstrap/js/dist/scrollspy.js +0 -379
  209. data/vendor/bootstrap/js/dist/tab.js +0 -278
  210. data/vendor/bootstrap/js/dist/tooltip.js +0 -734
  211. data/vendor/bootstrap/js/dist/util.js +0 -144
  212. data/vendor/bootstrap/package.json +0 -217
  213. data/vendor/bootstrap/scss/_alert.scss +0 -51
  214. data/vendor/bootstrap/scss/_badge.scss +0 -47
  215. data/vendor/bootstrap/scss/_breadcrumb.scss +0 -41
  216. data/vendor/bootstrap/scss/_button-group.scss +0 -172
  217. data/vendor/bootstrap/scss/_buttons.scss +0 -143
  218. data/vendor/bootstrap/scss/_card.scss +0 -301
  219. data/vendor/bootstrap/scss/_carousel.scss +0 -236
  220. data/vendor/bootstrap/scss/_close.scss +0 -35
  221. data/vendor/bootstrap/scss/_code.scss +0 -48
  222. data/vendor/bootstrap/scss/_custom-forms.scss +0 -433
  223. data/vendor/bootstrap/scss/_dropdown.scss +0 -166
  224. data/vendor/bootstrap/scss/_forms.scss +0 -333
  225. data/vendor/bootstrap/scss/_functions.scss +0 -86
  226. data/vendor/bootstrap/scss/_grid.scss +0 -52
  227. data/vendor/bootstrap/scss/_images.scss +0 -42
  228. data/vendor/bootstrap/scss/_input-group.scss +0 -173
  229. data/vendor/bootstrap/scss/_jumbotron.scss +0 -16
  230. data/vendor/bootstrap/scss/_list-group.scss +0 -115
  231. data/vendor/bootstrap/scss/_media.scss +0 -8
  232. data/vendor/bootstrap/scss/_mixins.scss +0 -41
  233. data/vendor/bootstrap/scss/_modal.scss +0 -180
  234. data/vendor/bootstrap/scss/_nav.scss +0 -118
  235. data/vendor/bootstrap/scss/_navbar.scss +0 -299
  236. data/vendor/bootstrap/scss/_pagination.scss +0 -78
  237. data/vendor/bootstrap/scss/_popover.scss +0 -183
  238. data/vendor/bootstrap/scss/_print.scss +0 -141
  239. data/vendor/bootstrap/scss/_progress.scss +0 -34
  240. data/vendor/bootstrap/scss/_reboot.scss +0 -483
  241. data/vendor/bootstrap/scss/_root.scss +0 -19
  242. data/vendor/bootstrap/scss/_tables.scss +0 -187
  243. data/vendor/bootstrap/scss/_tooltip.scss +0 -115
  244. data/vendor/bootstrap/scss/_transitions.scss +0 -22
  245. data/vendor/bootstrap/scss/_type.scss +0 -125
  246. data/vendor/bootstrap/scss/_utilities.scss +0 -15
  247. data/vendor/bootstrap/scss/_variables.scss +0 -952
  248. data/vendor/bootstrap/scss/bootstrap-grid.scss +0 -32
  249. data/vendor/bootstrap/scss/bootstrap-reboot.scss +0 -12
  250. data/vendor/bootstrap/scss/bootstrap.scss +0 -42
  251. data/vendor/bootstrap/scss/mixins/_alert.scss +0 -13
  252. data/vendor/bootstrap/scss/mixins/_background-variant.scss +0 -21
  253. data/vendor/bootstrap/scss/mixins/_badge.scss +0 -12
  254. data/vendor/bootstrap/scss/mixins/_border-radius.scss +0 -35
  255. data/vendor/bootstrap/scss/mixins/_box-shadow.scss +0 -5
  256. data/vendor/bootstrap/scss/mixins/_breakpoints.scss +0 -123
  257. data/vendor/bootstrap/scss/mixins/_buttons.scss +0 -109
  258. data/vendor/bootstrap/scss/mixins/_caret.scss +0 -66
  259. data/vendor/bootstrap/scss/mixins/_clearfix.scss +0 -7
  260. data/vendor/bootstrap/scss/mixins/_float.scss +0 -11
  261. data/vendor/bootstrap/scss/mixins/_forms.scss +0 -147
  262. data/vendor/bootstrap/scss/mixins/_gradients.scss +0 -45
  263. data/vendor/bootstrap/scss/mixins/_grid-framework.scss +0 -67
  264. data/vendor/bootstrap/scss/mixins/_grid.scss +0 -52
  265. data/vendor/bootstrap/scss/mixins/_hover.scss +0 -37
  266. data/vendor/bootstrap/scss/mixins/_image.scss +0 -36
  267. data/vendor/bootstrap/scss/mixins/_list-group.scss +0 -21
  268. data/vendor/bootstrap/scss/mixins/_lists.scss +0 -7
  269. data/vendor/bootstrap/scss/mixins/_nav-divider.scss +0 -10
  270. data/vendor/bootstrap/scss/mixins/_pagination.scss +0 -22
  271. data/vendor/bootstrap/scss/mixins/_reset-text.scss +0 -17
  272. data/vendor/bootstrap/scss/mixins/_resize.scss +0 -6
  273. data/vendor/bootstrap/scss/mixins/_screen-reader.scss +0 -33
  274. data/vendor/bootstrap/scss/mixins/_size.scss +0 -6
  275. data/vendor/bootstrap/scss/mixins/_table-row.scss +0 -30
  276. data/vendor/bootstrap/scss/mixins/_text-emphasis.scss +0 -14
  277. data/vendor/bootstrap/scss/mixins/_text-hide.scss +0 -13
  278. data/vendor/bootstrap/scss/mixins/_text-truncate.scss +0 -8
  279. data/vendor/bootstrap/scss/mixins/_transition.scss +0 -13
  280. data/vendor/bootstrap/scss/mixins/_visibility.scss +0 -7
  281. data/vendor/bootstrap/scss/utilities/_align.scss +0 -8
  282. data/vendor/bootstrap/scss/utilities/_background.scss +0 -19
  283. data/vendor/bootstrap/scss/utilities/_borders.scss +0 -59
  284. data/vendor/bootstrap/scss/utilities/_clearfix.scss +0 -3
  285. data/vendor/bootstrap/scss/utilities/_display.scss +0 -38
  286. data/vendor/bootstrap/scss/utilities/_embed.scss +0 -52
  287. data/vendor/bootstrap/scss/utilities/_flex.scss +0 -51
  288. data/vendor/bootstrap/scss/utilities/_float.scss +0 -9
  289. data/vendor/bootstrap/scss/utilities/_position.scss +0 -37
  290. data/vendor/bootstrap/scss/utilities/_screenreaders.scss +0 -11
  291. data/vendor/bootstrap/scss/utilities/_shadows.scss +0 -6
  292. data/vendor/bootstrap/scss/utilities/_sizing.scss +0 -12
  293. data/vendor/bootstrap/scss/utilities/_spacing.scss +0 -51
  294. data/vendor/bootstrap/scss/utilities/_text.scss +0 -58
  295. data/vendor/bootstrap/scss/utilities/_visibility.scss +0 -11
  296. data/vendor/bootswatch/dist/cerulean/_bootswatch.scss +0 -99
  297. data/vendor/bootswatch/dist/cerulean/_variables.scss +0 -57
  298. data/vendor/bootswatch/dist/cosmo/_bootswatch.scss +0 -38
  299. data/vendor/bootswatch/dist/cosmo/_variables.scss +0 -68
  300. data/vendor/bootswatch/dist/cyborg/_bootswatch.scss +0 -230
  301. data/vendor/bootswatch/dist/cyborg/_variables.scss +0 -173
  302. data/vendor/bootswatch/dist/darkly/_bootswatch.scss +0 -186
  303. data/vendor/bootswatch/dist/darkly/_variables.scss +0 -178
  304. data/vendor/bootswatch/dist/flatly/_bootswatch.scss +0 -185
  305. data/vendor/bootswatch/dist/flatly/_variables.scss +0 -113
  306. data/vendor/bootswatch/dist/journal/_bootswatch.scss +0 -73
  307. data/vendor/bootswatch/dist/journal/_variables.scss +0 -60
  308. data/vendor/bootswatch/dist/litera/_bootswatch.scss +0 -212
  309. data/vendor/bootswatch/dist/litera/_variables.scss +0 -77
  310. data/vendor/bootswatch/dist/lumen/_bootswatch.scss +0 -429
  311. data/vendor/bootswatch/dist/lumen/_variables.scss +0 -82
  312. data/vendor/bootswatch/dist/lux/_bootswatch.scss +0 -157
  313. data/vendor/bootswatch/dist/lux/_variables.scss +0 -120
  314. data/vendor/bootswatch/dist/materia/_bootswatch.scss +0 -677
  315. data/vendor/bootswatch/dist/materia/_variables.scss +0 -131
  316. data/vendor/bootswatch/dist/minty/_bootswatch.scss +0 -258
  317. data/vendor/bootswatch/dist/minty/_variables.scss +0 -97
  318. data/vendor/bootswatch/dist/pulse/_bootswatch.scss +0 -154
  319. data/vendor/bootswatch/dist/pulse/_variables.scss +0 -100
  320. data/vendor/bootswatch/dist/sandstone/_bootswatch.scss +0 -235
  321. data/vendor/bootswatch/dist/sandstone/_variables.scss +0 -143
  322. data/vendor/bootswatch/dist/simplex/_bootswatch.scss +0 -130
  323. data/vendor/bootswatch/dist/simplex/_variables.scss +0 -108
  324. data/vendor/bootswatch/dist/sketchy/_bootswatch.scss +0 -411
  325. data/vendor/bootswatch/dist/sketchy/_variables.scss +0 -164
  326. data/vendor/bootswatch/dist/slate/_bootswatch.scss +0 -425
  327. data/vendor/bootswatch/dist/slate/_variables.scss +0 -160
  328. data/vendor/bootswatch/dist/solar/_bootswatch.scss +0 -119
  329. data/vendor/bootswatch/dist/solar/_variables.scss +0 -175
  330. data/vendor/bootswatch/dist/spacelab/_bootswatch.scss +0 -167
  331. data/vendor/bootswatch/dist/spacelab/_variables.scss +0 -63
  332. data/vendor/bootswatch/dist/superhero/_bootswatch.scss +0 -200
  333. data/vendor/bootswatch/dist/superhero/_variables.scss +0 -148
  334. data/vendor/bootswatch/dist/united/_bootswatch.scss +0 -26
  335. data/vendor/bootswatch/dist/united/_variables.scss +0 -53
  336. data/vendor/bootswatch/dist/yeti/_bootswatch.scss +0 -468
  337. data/vendor/bootswatch/dist/yeti/_variables.scss +0 -110
  338. data/vendor/bootswatch/package.json +0 -38
  339. data/vendor/chartkick/chartkick.js +0 -1872
  340. data/vendor/file-saver/FileSaver.js +0 -188
  341. data/vendor/popper.js/dist/umd/popper-utils.js +0 -1133
  342. data/vendor/popper.js/dist/umd/popper.js +0 -2540
  343. data/vendor/popper.js/package.json +0 -54
  344. data/vendor/tempusdominus-bootstrap-4/build/js/tempusdominus-bootstrap-4.js +0 -2779
  345. data/vendor/tempusdominus-bootstrap-4/package.json +0 -79
  346. data/vendor/tempusdominus-bootstrap-4/src/sass/_tempusdominus-bootstrap-4.scss +0 -342
  347. data/vendor/tempusdominus-bootstrap-4/src/sass/tempusdominus-bootstrap-4-build.scss +0 -12
@@ -1,1133 +0,0 @@
1
- /**!
2
- * @fileOverview Kickass library to create and place poppers near their reference elements.
3
- * @version 1.14.4
4
- * @license
5
- * Copyright (c) 2016 Federico Zivolo and contributors
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- (function (global, factory) {
26
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
27
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
28
- (factory((global.PopperUtils = {})));
29
- }(this, (function (exports) { 'use strict';
30
-
31
- /**
32
- * Get CSS computed property of the given element
33
- * @method
34
- * @memberof Popper.Utils
35
- * @argument {Eement} element
36
- * @argument {String} property
37
- */
38
- function getStyleComputedProperty(element, property) {
39
- if (element.nodeType !== 1) {
40
- return [];
41
- }
42
- // NOTE: 1 DOM access here
43
- var css = getComputedStyle(element, null);
44
- return property ? css[property] : css;
45
- }
46
-
47
- /**
48
- * Returns the parentNode or the host of the element
49
- * @method
50
- * @memberof Popper.Utils
51
- * @argument {Element} element
52
- * @returns {Element} parent
53
- */
54
- function getParentNode(element) {
55
- if (element.nodeName === 'HTML') {
56
- return element;
57
- }
58
- return element.parentNode || element.host;
59
- }
60
-
61
- /**
62
- * Returns the scrolling parent of the given element
63
- * @method
64
- * @memberof Popper.Utils
65
- * @argument {Element} element
66
- * @returns {Element} scroll parent
67
- */
68
- function getScrollParent(element) {
69
- // Return body, `getScroll` will take care to get the correct `scrollTop` from it
70
- if (!element) {
71
- return document.body;
72
- }
73
-
74
- switch (element.nodeName) {
75
- case 'HTML':
76
- case 'BODY':
77
- return element.ownerDocument.body;
78
- case '#document':
79
- return element.body;
80
- }
81
-
82
- // Firefox want us to check `-x` and `-y` variations as well
83
-
84
- var _getStyleComputedProp = getStyleComputedProperty(element),
85
- overflow = _getStyleComputedProp.overflow,
86
- overflowX = _getStyleComputedProp.overflowX,
87
- overflowY = _getStyleComputedProp.overflowY;
88
-
89
- if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
90
- return element;
91
- }
92
-
93
- return getScrollParent(getParentNode(element));
94
- }
95
-
96
- var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
97
-
98
- var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
99
- var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
100
-
101
- /**
102
- * Determines if the browser is Internet Explorer
103
- * @method
104
- * @memberof Popper.Utils
105
- * @param {Number} version to check
106
- * @returns {Boolean} isIE
107
- */
108
- function isIE(version) {
109
- if (version === 11) {
110
- return isIE11;
111
- }
112
- if (version === 10) {
113
- return isIE10;
114
- }
115
- return isIE11 || isIE10;
116
- }
117
-
118
- /**
119
- * Returns the offset parent of the given element
120
- * @method
121
- * @memberof Popper.Utils
122
- * @argument {Element} element
123
- * @returns {Element} offset parent
124
- */
125
- function getOffsetParent(element) {
126
- if (!element) {
127
- return document.documentElement;
128
- }
129
-
130
- var noOffsetParent = isIE(10) ? document.body : null;
131
-
132
- // NOTE: 1 DOM access here
133
- var offsetParent = element.offsetParent;
134
- // Skip hidden elements which don't have an offsetParent
135
- while (offsetParent === noOffsetParent && element.nextElementSibling) {
136
- offsetParent = (element = element.nextElementSibling).offsetParent;
137
- }
138
-
139
- var nodeName = offsetParent && offsetParent.nodeName;
140
-
141
- if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
142
- return element ? element.ownerDocument.documentElement : document.documentElement;
143
- }
144
-
145
- // .offsetParent will return the closest TD or TABLE in case
146
- // no offsetParent is present, I hate this job...
147
- if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
148
- return getOffsetParent(offsetParent);
149
- }
150
-
151
- return offsetParent;
152
- }
153
-
154
- function isOffsetContainer(element) {
155
- var nodeName = element.nodeName;
156
-
157
- if (nodeName === 'BODY') {
158
- return false;
159
- }
160
- return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
161
- }
162
-
163
- /**
164
- * Finds the root node (document, shadowDOM root) of the given element
165
- * @method
166
- * @memberof Popper.Utils
167
- * @argument {Element} node
168
- * @returns {Element} root node
169
- */
170
- function getRoot(node) {
171
- if (node.parentNode !== null) {
172
- return getRoot(node.parentNode);
173
- }
174
-
175
- return node;
176
- }
177
-
178
- /**
179
- * Finds the offset parent common to the two provided nodes
180
- * @method
181
- * @memberof Popper.Utils
182
- * @argument {Element} element1
183
- * @argument {Element} element2
184
- * @returns {Element} common offset parent
185
- */
186
- function findCommonOffsetParent(element1, element2) {
187
- // This check is needed to avoid errors in case one of the elements isn't defined for any reason
188
- if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
189
- return document.documentElement;
190
- }
191
-
192
- // Here we make sure to give as "start" the element that comes first in the DOM
193
- var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
194
- var start = order ? element1 : element2;
195
- var end = order ? element2 : element1;
196
-
197
- // Get common ancestor container
198
- var range = document.createRange();
199
- range.setStart(start, 0);
200
- range.setEnd(end, 0);
201
- var commonAncestorContainer = range.commonAncestorContainer;
202
-
203
- // Both nodes are inside #document
204
-
205
- if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
206
- if (isOffsetContainer(commonAncestorContainer)) {
207
- return commonAncestorContainer;
208
- }
209
-
210
- return getOffsetParent(commonAncestorContainer);
211
- }
212
-
213
- // one of the nodes is inside shadowDOM, find which one
214
- var element1root = getRoot(element1);
215
- if (element1root.host) {
216
- return findCommonOffsetParent(element1root.host, element2);
217
- } else {
218
- return findCommonOffsetParent(element1, getRoot(element2).host);
219
- }
220
- }
221
-
222
- /**
223
- * Gets the scroll value of the given element in the given side (top and left)
224
- * @method
225
- * @memberof Popper.Utils
226
- * @argument {Element} element
227
- * @argument {String} side `top` or `left`
228
- * @returns {number} amount of scrolled pixels
229
- */
230
- function getScroll(element) {
231
- var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
232
-
233
- var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
234
- var nodeName = element.nodeName;
235
-
236
- if (nodeName === 'BODY' || nodeName === 'HTML') {
237
- var html = element.ownerDocument.documentElement;
238
- var scrollingElement = element.ownerDocument.scrollingElement || html;
239
- return scrollingElement[upperSide];
240
- }
241
-
242
- return element[upperSide];
243
- }
244
-
245
- /*
246
- * Sum or subtract the element scroll values (left and top) from a given rect object
247
- * @method
248
- * @memberof Popper.Utils
249
- * @param {Object} rect - Rect object you want to change
250
- * @param {HTMLElement} element - The element from the function reads the scroll values
251
- * @param {Boolean} subtract - set to true if you want to subtract the scroll values
252
- * @return {Object} rect - The modifier rect object
253
- */
254
- function includeScroll(rect, element) {
255
- var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
256
-
257
- var scrollTop = getScroll(element, 'top');
258
- var scrollLeft = getScroll(element, 'left');
259
- var modifier = subtract ? -1 : 1;
260
- rect.top += scrollTop * modifier;
261
- rect.bottom += scrollTop * modifier;
262
- rect.left += scrollLeft * modifier;
263
- rect.right += scrollLeft * modifier;
264
- return rect;
265
- }
266
-
267
- /*
268
- * Helper to detect borders of a given element
269
- * @method
270
- * @memberof Popper.Utils
271
- * @param {CSSStyleDeclaration} styles
272
- * Result of `getStyleComputedProperty` on the given element
273
- * @param {String} axis - `x` or `y`
274
- * @return {number} borders - The borders size of the given axis
275
- */
276
-
277
- function getBordersSize(styles, axis) {
278
- var sideA = axis === 'x' ? 'Left' : 'Top';
279
- var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
280
-
281
- return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
282
- }
283
-
284
- function getSize(axis, body, html, computedStyle) {
285
- return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
286
- }
287
-
288
- function getWindowSizes(document) {
289
- var body = document.body;
290
- var html = document.documentElement;
291
- var computedStyle = isIE(10) && getComputedStyle(html);
292
-
293
- return {
294
- height: getSize('Height', body, html, computedStyle),
295
- width: getSize('Width', body, html, computedStyle)
296
- };
297
- }
298
-
299
- var _extends = Object.assign || function (target) {
300
- for (var i = 1; i < arguments.length; i++) {
301
- var source = arguments[i];
302
-
303
- for (var key in source) {
304
- if (Object.prototype.hasOwnProperty.call(source, key)) {
305
- target[key] = source[key];
306
- }
307
- }
308
- }
309
-
310
- return target;
311
- };
312
-
313
- /**
314
- * Given element offsets, generate an output similar to getBoundingClientRect
315
- * @method
316
- * @memberof Popper.Utils
317
- * @argument {Object} offsets
318
- * @returns {Object} ClientRect like output
319
- */
320
- function getClientRect(offsets) {
321
- return _extends({}, offsets, {
322
- right: offsets.left + offsets.width,
323
- bottom: offsets.top + offsets.height
324
- });
325
- }
326
-
327
- /**
328
- * Get bounding client rect of given element
329
- * @method
330
- * @memberof Popper.Utils
331
- * @param {HTMLElement} element
332
- * @return {Object} client rect
333
- */
334
- function getBoundingClientRect(element) {
335
- var rect = {};
336
-
337
- // IE10 10 FIX: Please, don't ask, the element isn't
338
- // considered in DOM in some circumstances...
339
- // This isn't reproducible in IE10 compatibility mode of IE11
340
- try {
341
- if (isIE(10)) {
342
- rect = element.getBoundingClientRect();
343
- var scrollTop = getScroll(element, 'top');
344
- var scrollLeft = getScroll(element, 'left');
345
- rect.top += scrollTop;
346
- rect.left += scrollLeft;
347
- rect.bottom += scrollTop;
348
- rect.right += scrollLeft;
349
- } else {
350
- rect = element.getBoundingClientRect();
351
- }
352
- } catch (e) {}
353
-
354
- var result = {
355
- left: rect.left,
356
- top: rect.top,
357
- width: rect.right - rect.left,
358
- height: rect.bottom - rect.top
359
- };
360
-
361
- // subtract scrollbar size from sizes
362
- var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
363
- var width = sizes.width || element.clientWidth || result.right - result.left;
364
- var height = sizes.height || element.clientHeight || result.bottom - result.top;
365
-
366
- var horizScrollbar = element.offsetWidth - width;
367
- var vertScrollbar = element.offsetHeight - height;
368
-
369
- // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
370
- // we make this check conditional for performance reasons
371
- if (horizScrollbar || vertScrollbar) {
372
- var styles = getStyleComputedProperty(element);
373
- horizScrollbar -= getBordersSize(styles, 'x');
374
- vertScrollbar -= getBordersSize(styles, 'y');
375
-
376
- result.width -= horizScrollbar;
377
- result.height -= vertScrollbar;
378
- }
379
-
380
- return getClientRect(result);
381
- }
382
-
383
- function getOffsetRectRelativeToArbitraryNode(children, parent) {
384
- var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
385
-
386
- var isIE10 = isIE(10);
387
- var isHTML = parent.nodeName === 'HTML';
388
- var childrenRect = getBoundingClientRect(children);
389
- var parentRect = getBoundingClientRect(parent);
390
- var scrollParent = getScrollParent(children);
391
-
392
- var styles = getStyleComputedProperty(parent);
393
- var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
394
- var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
395
-
396
- // In cases where the parent is fixed, we must ignore negative scroll in offset calc
397
- if (fixedPosition && isHTML) {
398
- parentRect.top = Math.max(parentRect.top, 0);
399
- parentRect.left = Math.max(parentRect.left, 0);
400
- }
401
- var offsets = getClientRect({
402
- top: childrenRect.top - parentRect.top - borderTopWidth,
403
- left: childrenRect.left - parentRect.left - borderLeftWidth,
404
- width: childrenRect.width,
405
- height: childrenRect.height
406
- });
407
- offsets.marginTop = 0;
408
- offsets.marginLeft = 0;
409
-
410
- // Subtract margins of documentElement in case it's being used as parent
411
- // we do this only on HTML because it's the only element that behaves
412
- // differently when margins are applied to it. The margins are included in
413
- // the box of the documentElement, in the other cases not.
414
- if (!isIE10 && isHTML) {
415
- var marginTop = parseFloat(styles.marginTop, 10);
416
- var marginLeft = parseFloat(styles.marginLeft, 10);
417
-
418
- offsets.top -= borderTopWidth - marginTop;
419
- offsets.bottom -= borderTopWidth - marginTop;
420
- offsets.left -= borderLeftWidth - marginLeft;
421
- offsets.right -= borderLeftWidth - marginLeft;
422
-
423
- // Attach marginTop and marginLeft because in some circumstances we may need them
424
- offsets.marginTop = marginTop;
425
- offsets.marginLeft = marginLeft;
426
- }
427
-
428
- if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
429
- offsets = includeScroll(offsets, parent);
430
- }
431
-
432
- return offsets;
433
- }
434
-
435
- function getViewportOffsetRectRelativeToArtbitraryNode(element) {
436
- var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
437
-
438
- var html = element.ownerDocument.documentElement;
439
- var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
440
- var width = Math.max(html.clientWidth, window.innerWidth || 0);
441
- var height = Math.max(html.clientHeight, window.innerHeight || 0);
442
-
443
- var scrollTop = !excludeScroll ? getScroll(html) : 0;
444
- var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
445
-
446
- var offset = {
447
- top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
448
- left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
449
- width: width,
450
- height: height
451
- };
452
-
453
- return getClientRect(offset);
454
- }
455
-
456
- /**
457
- * Check if the given element is fixed or is inside a fixed parent
458
- * @method
459
- * @memberof Popper.Utils
460
- * @argument {Element} element
461
- * @argument {Element} customContainer
462
- * @returns {Boolean} answer to "isFixed?"
463
- */
464
- function isFixed(element) {
465
- var nodeName = element.nodeName;
466
- if (nodeName === 'BODY' || nodeName === 'HTML') {
467
- return false;
468
- }
469
- if (getStyleComputedProperty(element, 'position') === 'fixed') {
470
- return true;
471
- }
472
- return isFixed(getParentNode(element));
473
- }
474
-
475
- /**
476
- * Finds the first parent of an element that has a transformed property defined
477
- * @method
478
- * @memberof Popper.Utils
479
- * @argument {Element} element
480
- * @returns {Element} first transformed parent or documentElement
481
- */
482
-
483
- function getFixedPositionOffsetParent(element) {
484
- // This check is needed to avoid errors in case one of the elements isn't defined for any reason
485
- if (!element || !element.parentElement || isIE()) {
486
- return document.documentElement;
487
- }
488
- var el = element.parentElement;
489
- while (el && getStyleComputedProperty(el, 'transform') === 'none') {
490
- el = el.parentElement;
491
- }
492
- return el || document.documentElement;
493
- }
494
-
495
- /**
496
- * Computed the boundaries limits and return them
497
- * @method
498
- * @memberof Popper.Utils
499
- * @param {HTMLElement} popper
500
- * @param {HTMLElement} reference
501
- * @param {number} padding
502
- * @param {HTMLElement} boundariesElement - Element used to define the boundaries
503
- * @param {Boolean} fixedPosition - Is in fixed position mode
504
- * @returns {Object} Coordinates of the boundaries
505
- */
506
- function getBoundaries(popper, reference, padding, boundariesElement) {
507
- var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
508
-
509
- // NOTE: 1 DOM access here
510
-
511
- var boundaries = { top: 0, left: 0 };
512
- var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
513
-
514
- // Handle viewport case
515
- if (boundariesElement === 'viewport') {
516
- boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
517
- } else {
518
- // Handle other cases based on DOM element used as boundaries
519
- var boundariesNode = void 0;
520
- if (boundariesElement === 'scrollParent') {
521
- boundariesNode = getScrollParent(getParentNode(reference));
522
- if (boundariesNode.nodeName === 'BODY') {
523
- boundariesNode = popper.ownerDocument.documentElement;
524
- }
525
- } else if (boundariesElement === 'window') {
526
- boundariesNode = popper.ownerDocument.documentElement;
527
- } else {
528
- boundariesNode = boundariesElement;
529
- }
530
-
531
- var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
532
-
533
- // In case of HTML, we need a different computation
534
- if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
535
- var _getWindowSizes = getWindowSizes(popper.ownerDocument),
536
- height = _getWindowSizes.height,
537
- width = _getWindowSizes.width;
538
-
539
- boundaries.top += offsets.top - offsets.marginTop;
540
- boundaries.bottom = height + offsets.top;
541
- boundaries.left += offsets.left - offsets.marginLeft;
542
- boundaries.right = width + offsets.left;
543
- } else {
544
- // for all the other DOM elements, this one is good
545
- boundaries = offsets;
546
- }
547
- }
548
-
549
- // Add paddings
550
- padding = padding || 0;
551
- var isPaddingNumber = typeof padding === 'number';
552
- boundaries.left += isPaddingNumber ? padding : padding.left || 0;
553
- boundaries.top += isPaddingNumber ? padding : padding.top || 0;
554
- boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
555
- boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
556
-
557
- return boundaries;
558
- }
559
-
560
- function getArea(_ref) {
561
- var width = _ref.width,
562
- height = _ref.height;
563
-
564
- return width * height;
565
- }
566
-
567
- /**
568
- * Utility used to transform the `auto` placement to the placement with more
569
- * available space.
570
- * @method
571
- * @memberof Popper.Utils
572
- * @argument {Object} data - The data object generated by update method
573
- * @argument {Object} options - Modifiers configuration and options
574
- * @returns {Object} The data object, properly modified
575
- */
576
- function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
577
- var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
578
-
579
- if (placement.indexOf('auto') === -1) {
580
- return placement;
581
- }
582
-
583
- var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
584
-
585
- var rects = {
586
- top: {
587
- width: boundaries.width,
588
- height: refRect.top - boundaries.top
589
- },
590
- right: {
591
- width: boundaries.right - refRect.right,
592
- height: boundaries.height
593
- },
594
- bottom: {
595
- width: boundaries.width,
596
- height: boundaries.bottom - refRect.bottom
597
- },
598
- left: {
599
- width: refRect.left - boundaries.left,
600
- height: boundaries.height
601
- }
602
- };
603
-
604
- var sortedAreas = Object.keys(rects).map(function (key) {
605
- return _extends({
606
- key: key
607
- }, rects[key], {
608
- area: getArea(rects[key])
609
- });
610
- }).sort(function (a, b) {
611
- return b.area - a.area;
612
- });
613
-
614
- var filteredAreas = sortedAreas.filter(function (_ref2) {
615
- var width = _ref2.width,
616
- height = _ref2.height;
617
- return width >= popper.clientWidth && height >= popper.clientHeight;
618
- });
619
-
620
- var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
621
-
622
- var variation = placement.split('-')[1];
623
-
624
- return computedPlacement + (variation ? '-' + variation : '');
625
- }
626
-
627
- var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
628
- var timeoutDuration = 0;
629
- for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
630
- if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
631
- timeoutDuration = 1;
632
- break;
633
- }
634
- }
635
-
636
- function microtaskDebounce(fn) {
637
- var called = false;
638
- return function () {
639
- if (called) {
640
- return;
641
- }
642
- called = true;
643
- window.Promise.resolve().then(function () {
644
- called = false;
645
- fn();
646
- });
647
- };
648
- }
649
-
650
- function taskDebounce(fn) {
651
- var scheduled = false;
652
- return function () {
653
- if (!scheduled) {
654
- scheduled = true;
655
- setTimeout(function () {
656
- scheduled = false;
657
- fn();
658
- }, timeoutDuration);
659
- }
660
- };
661
- }
662
-
663
- var supportsMicroTasks = isBrowser && window.Promise;
664
-
665
- /**
666
- * Create a debounced version of a method, that's asynchronously deferred
667
- * but called in the minimum time possible.
668
- *
669
- * @method
670
- * @memberof Popper.Utils
671
- * @argument {Function} fn
672
- * @returns {Function}
673
- */
674
- var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
675
-
676
- /**
677
- * Mimics the `find` method of Array
678
- * @method
679
- * @memberof Popper.Utils
680
- * @argument {Array} arr
681
- * @argument prop
682
- * @argument value
683
- * @returns index or -1
684
- */
685
- function find(arr, check) {
686
- // use native find if supported
687
- if (Array.prototype.find) {
688
- return arr.find(check);
689
- }
690
-
691
- // use `filter` to obtain the same behavior of `find`
692
- return arr.filter(check)[0];
693
- }
694
-
695
- /**
696
- * Return the index of the matching object
697
- * @method
698
- * @memberof Popper.Utils
699
- * @argument {Array} arr
700
- * @argument prop
701
- * @argument value
702
- * @returns index or -1
703
- */
704
- function findIndex(arr, prop, value) {
705
- // use native findIndex if supported
706
- if (Array.prototype.findIndex) {
707
- return arr.findIndex(function (cur) {
708
- return cur[prop] === value;
709
- });
710
- }
711
-
712
- // use `find` + `indexOf` if `findIndex` isn't supported
713
- var match = find(arr, function (obj) {
714
- return obj[prop] === value;
715
- });
716
- return arr.indexOf(match);
717
- }
718
-
719
- /**
720
- * Get the position of the given element, relative to its offset parent
721
- * @method
722
- * @memberof Popper.Utils
723
- * @param {Element} element
724
- * @return {Object} position - Coordinates of the element and its `scrollTop`
725
- */
726
- function getOffsetRect(element) {
727
- var elementRect = void 0;
728
- if (element.nodeName === 'HTML') {
729
- var _getWindowSizes = getWindowSizes(element.ownerDocument),
730
- width = _getWindowSizes.width,
731
- height = _getWindowSizes.height;
732
-
733
- elementRect = {
734
- width: width,
735
- height: height,
736
- left: 0,
737
- top: 0
738
- };
739
- } else {
740
- elementRect = {
741
- width: element.offsetWidth,
742
- height: element.offsetHeight,
743
- left: element.offsetLeft,
744
- top: element.offsetTop
745
- };
746
- }
747
-
748
- // position
749
- return getClientRect(elementRect);
750
- }
751
-
752
- /**
753
- * Get the outer sizes of the given element (offset size + margins)
754
- * @method
755
- * @memberof Popper.Utils
756
- * @argument {Element} element
757
- * @returns {Object} object containing width and height properties
758
- */
759
- function getOuterSizes(element) {
760
- var styles = getComputedStyle(element);
761
- var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
762
- var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
763
- var result = {
764
- width: element.offsetWidth + y,
765
- height: element.offsetHeight + x
766
- };
767
- return result;
768
- }
769
-
770
- /**
771
- * Get the opposite placement of the given one
772
- * @method
773
- * @memberof Popper.Utils
774
- * @argument {String} placement
775
- * @returns {String} flipped placement
776
- */
777
- function getOppositePlacement(placement) {
778
- var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
779
- return placement.replace(/left|right|bottom|top/g, function (matched) {
780
- return hash[matched];
781
- });
782
- }
783
-
784
- /**
785
- * Get offsets to the popper
786
- * @method
787
- * @memberof Popper.Utils
788
- * @param {Object} position - CSS position the Popper will get applied
789
- * @param {HTMLElement} popper - the popper element
790
- * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
791
- * @param {String} placement - one of the valid placement options
792
- * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
793
- */
794
- function getPopperOffsets(popper, referenceOffsets, placement) {
795
- placement = placement.split('-')[0];
796
-
797
- // Get popper node sizes
798
- var popperRect = getOuterSizes(popper);
799
-
800
- // Add position, width and height to our offsets object
801
- var popperOffsets = {
802
- width: popperRect.width,
803
- height: popperRect.height
804
- };
805
-
806
- // depending by the popper placement we have to compute its offsets slightly differently
807
- var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
808
- var mainSide = isHoriz ? 'top' : 'left';
809
- var secondarySide = isHoriz ? 'left' : 'top';
810
- var measurement = isHoriz ? 'height' : 'width';
811
- var secondaryMeasurement = !isHoriz ? 'height' : 'width';
812
-
813
- popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
814
- if (placement === secondarySide) {
815
- popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
816
- } else {
817
- popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
818
- }
819
-
820
- return popperOffsets;
821
- }
822
-
823
- /**
824
- * Get offsets to the reference element
825
- * @method
826
- * @memberof Popper.Utils
827
- * @param {Object} state
828
- * @param {Element} popper - the popper element
829
- * @param {Element} reference - the reference element (the popper will be relative to this)
830
- * @param {Element} fixedPosition - is in fixed position mode
831
- * @returns {Object} An object containing the offsets which will be applied to the popper
832
- */
833
- function getReferenceOffsets(state, popper, reference) {
834
- var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
835
-
836
- var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
837
- return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
838
- }
839
-
840
- /**
841
- * Get the prefixed supported property name
842
- * @method
843
- * @memberof Popper.Utils
844
- * @argument {String} property (camelCase)
845
- * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
846
- */
847
- function getSupportedPropertyName(property) {
848
- var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
849
- var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
850
-
851
- for (var i = 0; i < prefixes.length; i++) {
852
- var prefix = prefixes[i];
853
- var toCheck = prefix ? '' + prefix + upperProp : property;
854
- if (typeof document.body.style[toCheck] !== 'undefined') {
855
- return toCheck;
856
- }
857
- }
858
- return null;
859
- }
860
-
861
- /**
862
- * Check if the given variable is a function
863
- * @method
864
- * @memberof Popper.Utils
865
- * @argument {Any} functionToCheck - variable to check
866
- * @returns {Boolean} answer to: is a function?
867
- */
868
- function isFunction(functionToCheck) {
869
- var getType = {};
870
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
871
- }
872
-
873
- /**
874
- * Helper used to know if the given modifier is enabled.
875
- * @method
876
- * @memberof Popper.Utils
877
- * @returns {Boolean}
878
- */
879
- function isModifierEnabled(modifiers, modifierName) {
880
- return modifiers.some(function (_ref) {
881
- var name = _ref.name,
882
- enabled = _ref.enabled;
883
- return enabled && name === modifierName;
884
- });
885
- }
886
-
887
- /**
888
- * Helper used to know if the given modifier depends from another one.<br />
889
- * It checks if the needed modifier is listed and enabled.
890
- * @method
891
- * @memberof Popper.Utils
892
- * @param {Array} modifiers - list of modifiers
893
- * @param {String} requestingName - name of requesting modifier
894
- * @param {String} requestedName - name of requested modifier
895
- * @returns {Boolean}
896
- */
897
- function isModifierRequired(modifiers, requestingName, requestedName) {
898
- var requesting = find(modifiers, function (_ref) {
899
- var name = _ref.name;
900
- return name === requestingName;
901
- });
902
-
903
- var isRequired = !!requesting && modifiers.some(function (modifier) {
904
- return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
905
- });
906
-
907
- if (!isRequired) {
908
- var _requesting = '`' + requestingName + '`';
909
- var requested = '`' + requestedName + '`';
910
- console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
911
- }
912
- return isRequired;
913
- }
914
-
915
- /**
916
- * Tells if a given input is a number
917
- * @method
918
- * @memberof Popper.Utils
919
- * @param {*} input to check
920
- * @return {Boolean}
921
- */
922
- function isNumeric(n) {
923
- return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
924
- }
925
-
926
- /**
927
- * Get the window associated with the element
928
- * @argument {Element} element
929
- * @returns {Window}
930
- */
931
- function getWindow(element) {
932
- var ownerDocument = element.ownerDocument;
933
- return ownerDocument ? ownerDocument.defaultView : window;
934
- }
935
-
936
- /**
937
- * Remove event listeners used to update the popper position
938
- * @method
939
- * @memberof Popper.Utils
940
- * @private
941
- */
942
- function removeEventListeners(reference, state) {
943
- // Remove resize event listener on window
944
- getWindow(reference).removeEventListener('resize', state.updateBound);
945
-
946
- // Remove scroll event listener on scroll parents
947
- state.scrollParents.forEach(function (target) {
948
- target.removeEventListener('scroll', state.updateBound);
949
- });
950
-
951
- // Reset state
952
- state.updateBound = null;
953
- state.scrollParents = [];
954
- state.scrollElement = null;
955
- state.eventsEnabled = false;
956
- return state;
957
- }
958
-
959
- /**
960
- * Loop trough the list of modifiers and run them in order,
961
- * each of them will then edit the data object.
962
- * @method
963
- * @memberof Popper.Utils
964
- * @param {dataObject} data
965
- * @param {Array} modifiers
966
- * @param {String} ends - Optional modifier name used as stopper
967
- * @returns {dataObject}
968
- */
969
- function runModifiers(modifiers, data, ends) {
970
- var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
971
-
972
- modifiersToRun.forEach(function (modifier) {
973
- if (modifier['function']) {
974
- // eslint-disable-line dot-notation
975
- console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
976
- }
977
- var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
978
- if (modifier.enabled && isFunction(fn)) {
979
- // Add properties to offsets to make them a complete clientRect object
980
- // we do this before each modifier to make sure the previous one doesn't
981
- // mess with these values
982
- data.offsets.popper = getClientRect(data.offsets.popper);
983
- data.offsets.reference = getClientRect(data.offsets.reference);
984
-
985
- data = fn(data, modifier);
986
- }
987
- });
988
-
989
- return data;
990
- }
991
-
992
- /**
993
- * Set the attributes to the given popper
994
- * @method
995
- * @memberof Popper.Utils
996
- * @argument {Element} element - Element to apply the attributes to
997
- * @argument {Object} styles
998
- * Object with a list of properties and values which will be applied to the element
999
- */
1000
- function setAttributes(element, attributes) {
1001
- Object.keys(attributes).forEach(function (prop) {
1002
- var value = attributes[prop];
1003
- if (value !== false) {
1004
- element.setAttribute(prop, attributes[prop]);
1005
- } else {
1006
- element.removeAttribute(prop);
1007
- }
1008
- });
1009
- }
1010
-
1011
- /**
1012
- * Set the style to the given popper
1013
- * @method
1014
- * @memberof Popper.Utils
1015
- * @argument {Element} element - Element to apply the style to
1016
- * @argument {Object} styles
1017
- * Object with a list of properties and values which will be applied to the element
1018
- */
1019
- function setStyles(element, styles) {
1020
- Object.keys(styles).forEach(function (prop) {
1021
- var unit = '';
1022
- // add unit if the value is numeric and is one of the following
1023
- if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
1024
- unit = 'px';
1025
- }
1026
- element.style[prop] = styles[prop] + unit;
1027
- });
1028
- }
1029
-
1030
- function attachToScrollParents(scrollParent, event, callback, scrollParents) {
1031
- var isBody = scrollParent.nodeName === 'BODY';
1032
- var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
1033
- target.addEventListener(event, callback, { passive: true });
1034
-
1035
- if (!isBody) {
1036
- attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
1037
- }
1038
- scrollParents.push(target);
1039
- }
1040
-
1041
- /**
1042
- * Setup needed event listeners used to update the popper position
1043
- * @method
1044
- * @memberof Popper.Utils
1045
- * @private
1046
- */
1047
- function setupEventListeners(reference, options, state, updateBound) {
1048
- // Resize event listener on window
1049
- state.updateBound = updateBound;
1050
- getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
1051
-
1052
- // Scroll event listener on scroll parents
1053
- var scrollElement = getScrollParent(reference);
1054
- attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
1055
- state.scrollElement = scrollElement;
1056
- state.eventsEnabled = true;
1057
-
1058
- return state;
1059
- }
1060
-
1061
- // This is here just for backward compatibility with versions lower than v1.10.3
1062
- // you should import the utilities using named exports, if you want them all use:
1063
- // ```
1064
- // import * as PopperUtils from 'popper-utils';
1065
- // ```
1066
- // The default export will be removed in the next major version.
1067
- var index = {
1068
- computeAutoPlacement: computeAutoPlacement,
1069
- debounce: debounce,
1070
- findIndex: findIndex,
1071
- getBordersSize: getBordersSize,
1072
- getBoundaries: getBoundaries,
1073
- getBoundingClientRect: getBoundingClientRect,
1074
- getClientRect: getClientRect,
1075
- getOffsetParent: getOffsetParent,
1076
- getOffsetRect: getOffsetRect,
1077
- getOffsetRectRelativeToArbitraryNode: getOffsetRectRelativeToArbitraryNode,
1078
- getOuterSizes: getOuterSizes,
1079
- getParentNode: getParentNode,
1080
- getPopperOffsets: getPopperOffsets,
1081
- getReferenceOffsets: getReferenceOffsets,
1082
- getScroll: getScroll,
1083
- getScrollParent: getScrollParent,
1084
- getStyleComputedProperty: getStyleComputedProperty,
1085
- getSupportedPropertyName: getSupportedPropertyName,
1086
- getWindowSizes: getWindowSizes,
1087
- isFixed: isFixed,
1088
- isFunction: isFunction,
1089
- isModifierEnabled: isModifierEnabled,
1090
- isModifierRequired: isModifierRequired,
1091
- isNumeric: isNumeric,
1092
- removeEventListeners: removeEventListeners,
1093
- runModifiers: runModifiers,
1094
- setAttributes: setAttributes,
1095
- setStyles: setStyles,
1096
- setupEventListeners: setupEventListeners
1097
- };
1098
-
1099
- exports.computeAutoPlacement = computeAutoPlacement;
1100
- exports.debounce = debounce;
1101
- exports.findIndex = findIndex;
1102
- exports.getBordersSize = getBordersSize;
1103
- exports.getBoundaries = getBoundaries;
1104
- exports.getBoundingClientRect = getBoundingClientRect;
1105
- exports.getClientRect = getClientRect;
1106
- exports.getOffsetParent = getOffsetParent;
1107
- exports.getOffsetRect = getOffsetRect;
1108
- exports.getOffsetRectRelativeToArbitraryNode = getOffsetRectRelativeToArbitraryNode;
1109
- exports.getOuterSizes = getOuterSizes;
1110
- exports.getParentNode = getParentNode;
1111
- exports.getPopperOffsets = getPopperOffsets;
1112
- exports.getReferenceOffsets = getReferenceOffsets;
1113
- exports.getScroll = getScroll;
1114
- exports.getScrollParent = getScrollParent;
1115
- exports.getStyleComputedProperty = getStyleComputedProperty;
1116
- exports.getSupportedPropertyName = getSupportedPropertyName;
1117
- exports.getWindowSizes = getWindowSizes;
1118
- exports.isFixed = isFixed;
1119
- exports.isFunction = isFunction;
1120
- exports.isModifierEnabled = isModifierEnabled;
1121
- exports.isModifierRequired = isModifierRequired;
1122
- exports.isNumeric = isNumeric;
1123
- exports.removeEventListeners = removeEventListeners;
1124
- exports.runModifiers = runModifiers;
1125
- exports.setAttributes = setAttributes;
1126
- exports.setStyles = setStyles;
1127
- exports.setupEventListeners = setupEventListeners;
1128
- exports['default'] = index;
1129
-
1130
- Object.defineProperty(exports, '__esModule', { value: true });
1131
-
1132
- })));
1133
- //# sourceMappingURL=popper-utils.js.map