vendor: 5,783 bytes, lines 1-162
1"use strict"; 2 3function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 4 5(function (global, factory) { 6 (typeof exports === "undefined" ? "undefined" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Util = factory(global.jQuery)); 7})(void 0, function ($) { 8 'use strict'; 9 10 function _interopDefaultLegacy(e) { 11 return e && _typeof(e) === 'object' && 'default' in e ? e : { 12 'default': e 13 }; 14 } 15 16 var $__default = _interopDefaultLegacy($); 17 18 var TRANSITION_END = 'transitionend'; 19 var MAX_UID = 1000000; 20 var MILLISECONDS_MULTIPLIER = 1000; 21 22 function toType(obj) { 23 if (obj === null || typeof obj === 'undefined') { 24 return "" + obj; 25 } 26 27 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); 28 } 29 30 function getSpecialTransitionEndEvent() { 31 return { 32 bindType: TRANSITION_END, 33 delegateType: TRANSITION_END, 34 handle: function handle(event) { 35 if ($__default['default'](event.target).is(this)) { 36 return event.handleObj.handler.apply(this, arguments); 37 } 38 39 return undefined; 40 } 41 }; 42 } 43 44 function transitionEndEmulator(duration) { 45 var _this = this; 46 47 var called = false; 48 $__default['default'](this).one(Util.TRANSITION_END, function () { 49 called = true; 50 }); 51 setTimeout(function () { 52 if (!called) { 53 Util.triggerTransitionEnd(_this); 54 } 55 }, duration); 56 return this; 57 } 58 59 function setTransitionEndSupport() { 60 $__default['default'].fn.emulateTransitionEnd = transitionEndEmulator; 61 $__default['default'].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); 62 } 63 64 var Util = { 65 TRANSITION_END: 'bsTransitionEnd', 66 getUID: function getUID(prefix) { 67 do { 68 prefix += ~~(Math.random() * MAX_UID); 69 } while (document.getElementById(prefix)); 70 71 return prefix; 72 }, 73 getSelectorFromElement: function getSelectorFromElement(element) { 74 var selector = element.getAttribute('data-target'); 75 76 if (!selector || selector === '#') { 77 var hrefAttr = element.getAttribute('href'); 78 selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''; 79 } 80 81 try { 82 return document.querySelector(selector) ? selector : null; 83 } catch (_) { 84 return null; 85 } 86 }, 87 getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { 88 if (!element) { 89 return 0; 90 } 91 92 var transitionDuration = $__default['default'](element).css('transition-duration'); 93 var transitionDelay = $__default['default'](element).css('transition-delay'); 94 var floatTransitionDuration = parseFloat(transitionDuration); 95 var floatTransitionDelay = parseFloat(transitionDelay); 96 97 if (!floatTransitionDuration && !floatTransitionDelay) { 98 return 0; 99 } 100 101 transitionDuration = transitionDuration.split(',')[0]; 102 transitionDelay = transitionDelay.split(',')[0]; 103 return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; 104 }, 105 reflow: function reflow(element) { 106 return element.offsetHeight; 107 }, 108 triggerTransitionEnd: function triggerTransitionEnd(element) { 109 $__default['default'](element).trigger(TRANSITION_END); 110 }, 111 supportsTransitionEnd: function supportsTransitionEnd() { 112 return Boolean(TRANSITION_END); 113 }, 114 isElement: function isElement(obj) { 115 return (obj[0] || obj).nodeType; 116 }, 117 typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { 118 for (var property in configTypes) { 119 if (Object.prototype.hasOwnProperty.call(configTypes, property)) { 120 var expectedTypes = configTypes[property]; 121 var value = config[property]; 122 var valueType = value && Util.isElement(value) ? 'element' : toType(value); 123 124 if (!new RegExp(expectedTypes).test(valueType)) { 125 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); 126 } 127 } 128 } 129 }, 130 findShadowRoot: function findShadowRoot(element) { 131 if (!document.documentElement.attachShadow) { 132 return null; 133 } 134 135 if (typeof element.getRootNode === 'function') { 136 var root = element.getRootNode(); 137 return root instanceof ShadowRoot ? root : null; 138 } 139 140 if (element instanceof ShadowRoot) { 141 return element; 142 } 143 144 if (!element.parentNode) { 145 return null; 146 } 147 148 return Util.findShadowRoot(element.parentNode); 149 }, 150 jQueryDetection: function jQueryDetection() { 151 if (typeof $__default['default'] === 'undefined') { 152 throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); 153 } 154 155 var version = $__default['default'].fn.jquery.split(' ')[0].split('.'); 156 var minMajor = 1; 157 var ltMajor = 2; 158 var minMinor = 9; 159 var minPatch = 1; 160 var maxMajor = 4; 161 162 if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >
162= maxMajor) { 163 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); 164 } 165 } 166 }; 167 Util.jQueryDetection(); 168 setTransitionEndSupport(); 169 return Util; 170});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.