diff options
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/util.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/dist/util.js | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/util.js b/vendor/twbs/bootstrap/js/dist/util.js index 0e9b3d0a7..841704f8a 100644 --- a/vendor/twbs/bootstrap/js/dist/util.js +++ b/vendor/twbs/bootstrap/js/dist/util.js @@ -1,20 +1,20 @@ /*! - * Bootstrap util.js v4.3.1 (https://getbootstrap.com/) - * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Bootstrap util.js v4.5.2 (https://getbootstrap.com/) + * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : - (global = global || self, global.Util = factory(global.jQuery)); -}(this, function ($) { 'use strict'; + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Util = factory(global.jQuery)); +}(this, (function ($) { 'use strict'; - $ = $ && $.hasOwnProperty('default') ? $['default'] : $; + $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; /** * -------------------------------------------------------------------------- - * Bootstrap (v4.3.1): util.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Bootstrap (v4.5.2): util.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** @@ -28,6 +28,10 @@ var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp) function toType(obj) { + if (obj === null || typeof obj === 'undefined') { + return "" + obj; + } + return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); } @@ -40,7 +44,7 @@ return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params } - return undefined; // eslint-disable-line no-undefined + return undefined; } }; } @@ -162,11 +166,28 @@ } return Util.findShadowRoot(element.parentNode); + }, + jQueryDetection: function jQueryDetection() { + if (typeof $ === 'undefined') { + throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); + } + + var version = $.fn.jquery.split(' ')[0].split('.'); + var minMajor = 1; + var ltMajor = 2; + var minMinor = 9; + var minPatch = 1; + var maxMajor = 4; + + if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { + throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); + } } }; + Util.jQueryDetection(); setTransitionEndSupport(); return Util; -})); +}))); //# sourceMappingURL=util.js.map |