[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 var bootstrap = (function (exports) { 2 'use strict'; 3 4 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; 5 6 var check = function (it) { 7 return it && it.Math == Math && it; 8 }; 9 10 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 11 var global$U = 12 // eslint-disable-next-line es/no-global-this -- safe 13 check(typeof globalThis == 'object' && globalThis) || 14 check(typeof window == 'object' && window) || 15 // eslint-disable-next-line no-restricted-globals -- safe 16 check(typeof self == 'object' && self) || 17 check(typeof commonjsGlobal == 'object' && commonjsGlobal) || 18 // eslint-disable-next-line no-new-func -- fallback 19 (function () { return this; })() || Function('return this')(); 20 21 var shared$4 = {exports: {}}; 22 23 var global$T = global$U; 24 25 // eslint-disable-next-line es/no-object-defineproperty -- safe 26 var defineProperty$9 = Object.defineProperty; 27 28 var setGlobal$3 = function (key, value) { 29 try { 30 defineProperty$9(global$T, key, { value: value, configurable: true, writable: true }); 31 } catch (error) { 32 global$T[key] = value; 33 } return value; 34 }; 35 36 var global$S = global$U; 37 var setGlobal$2 = setGlobal$3; 38 39 var SHARED = '__core-js_shared__'; 40 var store$3 = global$S[SHARED] || setGlobal$2(SHARED, {}); 41 42 var sharedStore = store$3; 43 44 var store$2 = sharedStore; 45 46 (shared$4.exports = function (key, value) { 47 return store$2[key] || (store$2[key] = value !== undefined ? value : {}); 48 })('versions', []).push({ 49 version: '3.20.1', 50 mode: 'global', 51 copyright: '© 2021 Denis Pushkarev (zloirock.ru)' 52 }); 53 54 var FunctionPrototype$3 = Function.prototype; 55 var bind$9 = FunctionPrototype$3.bind; 56 var call$i = FunctionPrototype$3.call; 57 var callBind = bind$9 && bind$9.bind(call$i); 58 59 var functionUncurryThis = bind$9 ? function (fn) { 60 return fn && callBind(call$i, fn); 61 } : function (fn) { 62 return fn && function () { 63 return call$i.apply(fn, arguments); 64 }; 65 }; 66 67 var global$R = global$U; 68 69 var TypeError$j = global$R.TypeError; 70 71 // `RequireObjectCoercible` abstract operation 72 // https://tc39.es/ecma262/#sec-requireobjectcoercible 73 var requireObjectCoercible$9 = function (it) { 74 if (it == undefined) throw TypeError$j("Can't call method on " + it); 75 return it; 76 }; 77 78 var global$Q = global$U; 79 var requireObjectCoercible$8 = requireObjectCoercible$9; 80 81 var Object$5 = global$Q.Object; 82 83 // `ToObject` abstract operation 84 // https://tc39.es/ecma262/#sec-toobject 85 var toObject$a = function (argument) { 86 return Object$5(requireObjectCoercible$8(argument)); 87 }; 88 89 var uncurryThis$z = functionUncurryThis; 90 var toObject$9 = toObject$a; 91 92 var hasOwnProperty = uncurryThis$z({}.hasOwnProperty); 93 94 // `HasOwnProperty` abstract operation 95 // https://tc39.es/ecma262/#sec-hasownproperty 96 var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { 97 return hasOwnProperty(toObject$9(it), key); 98 }; 99 100 var uncurryThis$y = functionUncurryThis; 101 102 var id$1 = 0; 103 var postfix = Math.random(); 104 var toString$g = uncurryThis$y(1.0.toString); 105 106 var uid$3 = function (key) { 107 return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$g(++id$1 + postfix, 36); 108 }; 109 110 // `IsCallable` abstract operation 111 // https://tc39.es/ecma262/#sec-iscallable 112 var isCallable$m = function (argument) { 113 return typeof argument == 'function'; 114 }; 115 116 var global$P = global$U; 117 var isCallable$l = isCallable$m; 118 119 var aFunction = function (argument) { 120 return isCallable$l(argument) ? argument : undefined; 121 }; 122 123 var getBuiltIn$7 = function (namespace, method) { 124 return arguments.length < 2 ? aFunction(global$P[namespace]) : global$P[namespace] && global$P[namespace][method]; 125 }; 126 127 var getBuiltIn$6 = getBuiltIn$7; 128 129 var engineUserAgent = getBuiltIn$6('navigator', 'userAgent') || ''; 130 131 var global$O = global$U; 132 var userAgent$5 = engineUserAgent; 133 134 var process$3 = global$O.process; 135 var Deno = global$O.Deno; 136 var versions = process$3 && process$3.versions || Deno && Deno.version; 137 var v8 = versions && versions.v8; 138 var match, version; 139 140 if (v8) { 141 match = v8.split('.'); 142 // in old Chrome, versions of V8 isn't V8 = Chrome / 10 143 // but their correct versions are not interesting for us 144 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); 145 } 146 147 // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` 148 // so check `userAgent` even if `.v8` exists, but 0 149 if (!version && userAgent$5) { 150 match = userAgent$5.match(/Edge\/(\d+)/); 151 if (!match || match[1] >= 74) { 152 match = userAgent$5.match(/Chrome\/(\d+)/); 153 if (match) version = +match[1]; 154 } 155 } 156 157 var engineV8Version = version; 158 159 var fails$w = function (exec) { 160 try { 161 return !!exec(); 162 } catch (error) { 163 return true; 164 } 165 }; 166 167 /* eslint-disable es/no-symbol -- required for testing */ 168 169 var V8_VERSION$3 = engineV8Version; 170 var fails$v = fails$w; 171 172 // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing 173 var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$v(function () { 174 var symbol = Symbol(); 175 // Chrome 38 Symbol has incorrect toString conversion 176 // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances 177 return !String(symbol) || !(Object(symbol) instanceof Symbol) || 178 // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances 179 !Symbol.sham && V8_VERSION$3 && V8_VERSION$3 < 41; 180 }); 181 182 /* eslint-disable es/no-symbol -- required for testing */ 183 184 var NATIVE_SYMBOL$1 = nativeSymbol; 185 186 var useSymbolAsUid = NATIVE_SYMBOL$1 187 && !Symbol.sham 188 && typeof Symbol.iterator == 'symbol'; 189 190 var global$N = global$U; 191 var shared$3 = shared$4.exports; 192 var hasOwn$c = hasOwnProperty_1; 193 var uid$2 = uid$3; 194 var NATIVE_SYMBOL = nativeSymbol; 195 var USE_SYMBOL_AS_UID$1 = useSymbolAsUid; 196 197 var WellKnownSymbolsStore = shared$3('wks'); 198 var Symbol$3 = global$N.Symbol; 199 var symbolFor = Symbol$3 && Symbol$3['for']; 200 var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$3 : Symbol$3 && Symbol$3.withoutSetter || uid$2; 201 202 var wellKnownSymbol$n = function (name) { 203 if (!hasOwn$c(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) { 204 var description = 'Symbol.' + name; 205 if (NATIVE_SYMBOL && hasOwn$c(Symbol$3, name)) { 206 WellKnownSymbolsStore[name] = Symbol$3[name]; 207 } else if (USE_SYMBOL_AS_UID$1 && symbolFor) { 208 WellKnownSymbolsStore[name] = symbolFor(description); 209 } else { 210 WellKnownSymbolsStore[name] = createWellKnownSymbol(description); 211 } 212 } return WellKnownSymbolsStore[name]; 213 }; 214 215 var wellKnownSymbol$m = wellKnownSymbol$n; 216 217 var TO_STRING_TAG$3 = wellKnownSymbol$m('toStringTag'); 218 var test$1 = {}; 219 220 test$1[TO_STRING_TAG$3] = 'z'; 221 222 var toStringTagSupport = String(test$1) === '[object z]'; 223 224 var redefine$b = {exports: {}}; 225 226 var fails$u = fails$w; 227 228 // Detect IE8's incomplete defineProperty implementation 229 var descriptors = !fails$u(function () { 230 // eslint-disable-next-line es/no-object-defineproperty -- required for testing 231 return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; 232 }); 233 234 var objectDefineProperty = {}; 235 236 var isCallable$k = isCallable$m; 237 238 var isObject$g = function (it) { 239 return typeof it == 'object' ? it !== null : isCallable$k(it); 240 }; 241 242 var global$M = global$U; 243 var isObject$f = isObject$g; 244 245 var document$3 = global$M.document; 246 // typeof document.createElement is 'object' in old IE 247 var EXISTS$1 = isObject$f(document$3) && isObject$f(document$3.createElement); 248 249 var documentCreateElement$2 = function (it) { 250 return EXISTS$1 ? document$3.createElement(it) : {}; 251 }; 252 253 var DESCRIPTORS$d = descriptors; 254 var fails$t = fails$w; 255 var createElement$1 = documentCreateElement$2; 256 257 // Thank's IE8 for his funny defineProperty 258 var ie8DomDefine = !DESCRIPTORS$d && !fails$t(function () { 259 // eslint-disable-next-line es/no-object-defineproperty -- required for testing 260 return Object.defineProperty(createElement$1('div'), 'a', { 261 get: function () { return 7; } 262 }).a != 7; 263 }); 264 265 var global$L = global$U; 266 var isObject$e = isObject$g; 267 268 var String$5 = global$L.String; 269 var TypeError$i = global$L.TypeError; 270 271 // `Assert: Type(argument) is Object` 272 var anObject$h = function (argument) { 273 if (isObject$e(argument)) return argument; 274 throw TypeError$i(String$5(argument) + ' is not an object'); 275 }; 276 277 var call$h = Function.prototype.call; 278 279 var functionCall = call$h.bind ? call$h.bind(call$h) : function () { 280 return call$h.apply(call$h, arguments); 281 }; 282 283 var uncurryThis$x = functionUncurryThis; 284 285 var objectIsPrototypeOf = uncurryThis$x({}.isPrototypeOf); 286 287 var global$K = global$U; 288 var getBuiltIn$5 = getBuiltIn$7; 289 var isCallable$j = isCallable$m; 290 var isPrototypeOf$5 = objectIsPrototypeOf; 291 var USE_SYMBOL_AS_UID = useSymbolAsUid; 292 293 var Object$4 = global$K.Object; 294 295 var isSymbol$3 = USE_SYMBOL_AS_UID ? function (it) { 296 return typeof it == 'symbol'; 297 } : function (it) { 298 var $Symbol = getBuiltIn$5('Symbol'); 299 return isCallable$j($Symbol) && isPrototypeOf$5($Symbol.prototype, Object$4(it)); 300 }; 301 302 var global$J = global$U; 303 304 var String$4 = global$J.String; 305 306 var tryToString$4 = function (argument) { 307 try { 308 return String$4(argument); 309 } catch (error) { 310 return 'Object'; 311 } 312 }; 313 314 var global$I = global$U; 315 var isCallable$i = isCallable$m; 316 var tryToString$3 = tryToString$4; 317 318 var TypeError$h = global$I.TypeError; 319 320 // `Assert: IsCallable(argument) is true` 321 var aCallable$7 = function (argument) { 322 if (isCallable$i(argument)) return argument; 323 throw TypeError$h(tryToString$3(argument) + ' is not a function'); 324 }; 325 326 var aCallable$6 = aCallable$7; 327 328 // `GetMethod` abstract operation 329 // https://tc39.es/ecma262/#sec-getmethod 330 var getMethod$6 = function (V, P) { 331 var func = V[P]; 332 return func == null ? undefined : aCallable$6(func); 333 }; 334 335 var global$H = global$U; 336 var call$g = functionCall; 337 var isCallable$h = isCallable$m; 338 var isObject$d = isObject$g; 339 340 var TypeError$g = global$H.TypeError; 341 342 // `OrdinaryToPrimitive` abstract operation 343 // https://tc39.es/ecma262/#sec-ordinarytoprimitive 344 var ordinaryToPrimitive$1 = function (input, pref) { 345 var fn, val; 346 if (pref === 'string' && isCallable$h(fn = input.toString) && !isObject$d(val = call$g(fn, input))) return val; 347 if (isCallable$h(fn = input.valueOf) && !isObject$d(val = call$g(fn, input))) return val; 348 if (pref !== 'string' && isCallable$h(fn = input.toString) && !isObject$d(val = call$g(fn, input))) return val; 349 throw TypeError$g("Can't convert object to primitive value"); 350 }; 351 352 var global$G = global$U; 353 var call$f = functionCall; 354 var isObject$c = isObject$g; 355 var isSymbol$2 = isSymbol$3; 356 var getMethod$5 = getMethod$6; 357 var ordinaryToPrimitive = ordinaryToPrimitive$1; 358 var wellKnownSymbol$l = wellKnownSymbol$n; 359 360 var TypeError$f = global$G.TypeError; 361 var TO_PRIMITIVE = wellKnownSymbol$l('toPrimitive'); 362 363 // `ToPrimitive` abstract operation 364 // https://tc39.es/ecma262/#sec-toprimitive 365 var toPrimitive$2 = function (input, pref) { 366 if (!isObject$c(input) || isSymbol$2(input)) return input; 367 var exoticToPrim = getMethod$5(input, TO_PRIMITIVE); 368 var result; 369 if (exoticToPrim) { 370 if (pref === undefined) pref = 'default'; 371 result = call$f(exoticToPrim, input, pref); 372 if (!isObject$c(result) || isSymbol$2(result)) return result; 373 throw TypeError$f("Can't convert object to primitive value"); 374 } 375 if (pref === undefined) pref = 'number'; 376 return ordinaryToPrimitive(input, pref); 377 }; 378 379 var toPrimitive$1 = toPrimitive$2; 380 var isSymbol$1 = isSymbol$3; 381 382 // `ToPropertyKey` abstract operation 383 // https://tc39.es/ecma262/#sec-topropertykey 384 var toPropertyKey$3 = function (argument) { 385 var key = toPrimitive$1(argument, 'string'); 386 return isSymbol$1(key) ? key : key + ''; 387 }; 388 389 var global$F = global$U; 390 var DESCRIPTORS$c = descriptors; 391 var IE8_DOM_DEFINE$1 = ie8DomDefine; 392 var anObject$g = anObject$h; 393 var toPropertyKey$2 = toPropertyKey$3; 394 395 var TypeError$e = global$F.TypeError; 396 // eslint-disable-next-line es/no-object-defineproperty -- safe 397 var $defineProperty = Object.defineProperty; 398 399 // `Object.defineProperty` method 400 // https://tc39.es/ecma262/#sec-object.defineproperty 401 objectDefineProperty.f = DESCRIPTORS$c ? $defineProperty : function defineProperty(O, P, Attributes) { 402 anObject$g(O); 403 P = toPropertyKey$2(P); 404 anObject$g(Attributes); 405 if (IE8_DOM_DEFINE$1) try { 406 return $defineProperty(O, P, Attributes); 407 } catch (error) { /* empty */ } 408 if ('get' in Attributes || 'set' in Attributes) throw TypeError$e('Accessors not supported'); 409 if ('value' in Attributes) O[P] = Attributes.value; 410 return O; 411 }; 412 413 var createPropertyDescriptor$4 = function (bitmap, value) { 414 return { 415 enumerable: !(bitmap & 1), 416 configurable: !(bitmap & 2), 417 writable: !(bitmap & 4), 418 value: value 419 }; 420 }; 421 422 var DESCRIPTORS$b = descriptors; 423 var definePropertyModule$5 = objectDefineProperty; 424 var createPropertyDescriptor$3 = createPropertyDescriptor$4; 425 426 var createNonEnumerableProperty$8 = DESCRIPTORS$b ? function (object, key, value) { 427 return definePropertyModule$5.f(object, key, createPropertyDescriptor$3(1, value)); 428 } : function (object, key, value) { 429 object[key] = value; 430 return object; 431 }; 432 433 var uncurryThis$w = functionUncurryThis; 434 var isCallable$g = isCallable$m; 435 var store$1 = sharedStore; 436 437 var functionToString$1 = uncurryThis$w(Function.toString); 438 439 // this helper broken in `[email protected]`, so we can't use `shared` helper 440 if (!isCallable$g(store$1.inspectSource)) { 441 store$1.inspectSource = function (it) { 442 return functionToString$1(it); 443 }; 444 } 445 446 var inspectSource$4 = store$1.inspectSource; 447 448 var global$E = global$U; 449 var isCallable$f = isCallable$m; 450 var inspectSource$3 = inspectSource$4; 451 452 var WeakMap$1 = global$E.WeakMap; 453 454 var nativeWeakMap = isCallable$f(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1)); 455 456 var shared$2 = shared$4.exports; 457 var uid$1 = uid$3; 458 459 var keys$2 = shared$2('keys'); 460 461 var sharedKey$3 = function (key) { 462 return keys$2[key] || (keys$2[key] = uid$1(key)); 463 }; 464 465 var hiddenKeys$5 = {}; 466 467 var NATIVE_WEAK_MAP = nativeWeakMap; 468 var global$D = global$U; 469 var uncurryThis$v = functionUncurryThis; 470 var isObject$b = isObject$g; 471 var createNonEnumerableProperty$7 = createNonEnumerableProperty$8; 472 var hasOwn$b = hasOwnProperty_1; 473 var shared$1 = sharedStore; 474 var sharedKey$2 = sharedKey$3; 475 var hiddenKeys$4 = hiddenKeys$5; 476 477 var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; 478 var TypeError$d = global$D.TypeError; 479 var WeakMap = global$D.WeakMap; 480 var set$1, get, has; 481 482 var enforce = function (it) { 483 return has(it) ? get(it) : set$1(it, {}); 484 }; 485 486 var getterFor = function (TYPE) { 487 return function (it) { 488 var state; 489 if (!isObject$b(it) || (state = get(it)).type !== TYPE) { 490 throw TypeError$d('Incompatible receiver, ' + TYPE + ' required'); 491 } return state; 492 }; 493 }; 494 495 if (NATIVE_WEAK_MAP || shared$1.state) { 496 var store = shared$1.state || (shared$1.state = new WeakMap()); 497 var wmget = uncurryThis$v(store.get); 498 var wmhas = uncurryThis$v(store.has); 499 var wmset = uncurryThis$v(store.set); 500 set$1 = function (it, metadata) { 501 if (wmhas(store, it)) throw new TypeError$d(OBJECT_ALREADY_INITIALIZED); 502 metadata.facade = it; 503 wmset(store, it, metadata); 504 return metadata; 505 }; 506 get = function (it) { 507 return wmget(store, it) || {}; 508 }; 509 has = function (it) { 510 return wmhas(store, it); 511 }; 512 } else { 513 var STATE = sharedKey$2('state'); 514 hiddenKeys$4[STATE] = true; 515 set$1 = function (it, metadata) { 516 if (hasOwn$b(it, STATE)) throw new TypeError$d(OBJECT_ALREADY_INITIALIZED); 517 metadata.facade = it; 518 createNonEnumerableProperty$7(it, STATE, metadata); 519 return metadata; 520 }; 521 get = function (it) { 522 return hasOwn$b(it, STATE) ? it[STATE] : {}; 523 }; 524 has = function (it) { 525 return hasOwn$b(it, STATE); 526 }; 527 } 528 529 var internalState = { 530 set: set$1, 531 get: get, 532 has: has, 533 enforce: enforce, 534 getterFor: getterFor 535 }; 536 537 var DESCRIPTORS$a = descriptors; 538 var hasOwn$a = hasOwnProperty_1; 539 540 var FunctionPrototype$2 = Function.prototype; 541 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe 542 var getDescriptor = DESCRIPTORS$a && Object.getOwnPropertyDescriptor; 543 544 var EXISTS = hasOwn$a(FunctionPrototype$2, 'name'); 545 // additional protection from minified / mangled / dropped function names 546 var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; 547 var CONFIGURABLE = EXISTS && (!DESCRIPTORS$a || (DESCRIPTORS$a && getDescriptor(FunctionPrototype$2, 'name').configurable)); 548 549 var functionName = { 550 EXISTS: EXISTS, 551 PROPER: PROPER, 552 CONFIGURABLE: CONFIGURABLE 553 }; 554 555 var global$C = global$U; 556 var isCallable$e = isCallable$m; 557 var hasOwn$9 = hasOwnProperty_1; 558 var createNonEnumerableProperty$6 = createNonEnumerableProperty$8; 559 var setGlobal$1 = setGlobal$3; 560 var inspectSource$2 = inspectSource$4; 561 var InternalStateModule$4 = internalState; 562 var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE; 563 564 var getInternalState$5 = InternalStateModule$4.get; 565 var enforceInternalState$1 = InternalStateModule$4.enforce; 566 var TEMPLATE = String(String).split('String'); 567 568 (redefine$b.exports = function (O, key, value, options) { 569 var unsafe = options ? !!options.unsafe : false; 570 var simple = options ? !!options.enumerable : false; 571 var noTargetGet = options ? !!options.noTargetGet : false; 572 var name = options && options.name !== undefined ? options.name : key; 573 var state; 574 if (isCallable$e(value)) { 575 if (String(name).slice(0, 7) === 'Symbol(') { 576 name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; 577 } 578 if (!hasOwn$9(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) { 579 createNonEnumerableProperty$6(value, 'name', name); 580 } 581 state = enforceInternalState$1(value); 582 if (!state.source) { 583 state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); 584 } 585 } 586 if (O === global$C) { 587 if (simple) O[key] = value; 588 else setGlobal$1(key, value); 589 return; 590 } else if (!unsafe) { 591 delete O[key]; 592 } else if (!noTargetGet && O[key]) { 593 simple = true; 594 } 595 if (simple) O[key] = value; 596 else createNonEnumerableProperty$6(O, key, value); 597 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative 598 })(Function.prototype, 'toString', function toString() { 599 return isCallable$e(this) && getInternalState$5(this).source || inspectSource$2(this); 600 }); 601 602 var uncurryThis$u = functionUncurryThis; 603 604 var toString$f = uncurryThis$u({}.toString); 605 var stringSlice$7 = uncurryThis$u(''.slice); 606 607 var classofRaw$1 = function (it) { 608 return stringSlice$7(toString$f(it), 8, -1); 609 }; 610 611 var global$B = global$U; 612 var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport; 613 var isCallable$d = isCallable$m; 614 var classofRaw = classofRaw$1; 615 var wellKnownSymbol$k = wellKnownSymbol$n; 616 617 var TO_STRING_TAG$2 = wellKnownSymbol$k('toStringTag'); 618 var Object$3 = global$B.Object; 619 620 // ES3 wrong here 621 var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; 622 623 // fallback for IE11 Script Access Denied error 624 var tryGet = function (it, key) { 625 try { 626 return it[key]; 627 } catch (error) { /* empty */ } 628 }; 629 630 // getting tag from ES6+ `Object.prototype.toString` 631 var classof$c = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) { 632 var O, tag, result; 633 return it === undefined ? 'Undefined' : it === null ? 'Null' 634 // @@toStringTag case 635 : typeof (tag = tryGet(O = Object$3(it), TO_STRING_TAG$2)) == 'string' ? tag 636 // builtinTag case 637 : CORRECT_ARGUMENTS ? classofRaw(O) 638 // ES3 arguments fallback 639 : (result = classofRaw(O)) == 'Object' && isCallable$d(O.callee) ? 'Arguments' : result; 640 }; 641 642 var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport; 643 var classof$b = classof$c; 644 645 // `Object.prototype.toString` method implementation 646 // https://tc39.es/ecma262/#sec-object.prototype.tostring 647 var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() { 648 return '[object ' + classof$b(this) + ']'; 649 }; 650 651 var TO_STRING_TAG_SUPPORT = toStringTagSupport; 652 var redefine$a = redefine$b.exports; 653 var toString$e = objectToString; 654 655 // `Object.prototype.toString` method 656 // https://tc39.es/ecma262/#sec-object.prototype.tostring 657 if (!TO_STRING_TAG_SUPPORT) { 658 redefine$a(Object.prototype, 'toString', toString$e, { unsafe: true }); 659 } 660 661 // iterable DOM collections 662 // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods 663 var domIterables = { 664 CSSRuleList: 0, 665 CSSStyleDeclaration: 0, 666 CSSValueList: 0, 667 ClientRectList: 0, 668 DOMRectList: 0, 669 DOMStringList: 0, 670 DOMTokenList: 1, 671 DataTransferItemList: 0, 672 FileList: 0, 673 HTMLAllCollection: 0, 674 HTMLCollection: 0, 675 HTMLFormElement: 0, 676 HTMLSelectElement: 0, 677 MediaList: 0, 678 MimeTypeArray: 0, 679 NamedNodeMap: 0, 680 NodeList: 1, 681 PaintRequestList: 0, 682 Plugin: 0, 683 PluginArray: 0, 684 SVGLengthList: 0, 685 SVGNumberList: 0, 686 SVGPathSegList: 0, 687 SVGPointList: 0, 688 SVGStringList: 0, 689 SVGTransformList: 0, 690 SourceBufferList: 0, 691 StyleSheetList: 0, 692 TextTrackCueList: 0, 693 TextTrackList: 0, 694 TouchList: 0 695 }; 696 697 // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` 698 var documentCreateElement$1 = documentCreateElement$2; 699 700 var classList = documentCreateElement$1('span').classList; 701 var DOMTokenListPrototype$2 = classList && classList.constructor && classList.constructor.prototype; 702 703 var domTokenListPrototype = DOMTokenListPrototype$2 === Object.prototype ? undefined : DOMTokenListPrototype$2; 704 705 var uncurryThis$t = functionUncurryThis; 706 var aCallable$5 = aCallable$7; 707 708 var bind$8 = uncurryThis$t(uncurryThis$t.bind); 709 710 // optional / simple context binding 711 var functionBindContext = function (fn, that) { 712 aCallable$5(fn); 713 return that === undefined ? fn : bind$8 ? bind$8(fn, that) : function (/* ...args */) { 714 return fn.apply(that, arguments); 715 }; 716 }; 717 718 var global$A = global$U; 719 var uncurryThis$s = functionUncurryThis; 720 var fails$s = fails$w; 721 var classof$a = classofRaw$1; 722 723 var Object$2 = global$A.Object; 724 var split = uncurryThis$s(''.split); 725 726 // fallback for non-array-like ES3 and non-enumerable old V8 strings 727 var indexedObject = fails$s(function () { 728 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 729 // eslint-disable-next-line no-prototype-builtins -- safe 730 return !Object$2('z').propertyIsEnumerable(0); 731 }) ? function (it) { 732 return classof$a(it) == 'String' ? split(it, '') : Object$2(it); 733 } : Object$2; 734 735 var ceil = Math.ceil; 736 var floor$2 = Math.floor; 737 738 // `ToIntegerOrInfinity` abstract operation 739 // https://tc39.es/ecma262/#sec-tointegerorinfinity 740 var toIntegerOrInfinity$4 = function (argument) { 741 var number = +argument; 742 // eslint-disable-next-line no-self-compare -- safe 743 return number !== number || number === 0 ? 0 : (number > 0 ? floor$2 : ceil)(number); 744 }; 745 746 var toIntegerOrInfinity$3 = toIntegerOrInfinity$4; 747 748 var min$5 = Math.min; 749 750 // `ToLength` abstract operation 751 // https://tc39.es/ecma262/#sec-tolength 752 var toLength$5 = function (argument) { 753 return argument > 0 ? min$5(toIntegerOrInfinity$3(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 754 }; 755 756 var toLength$4 = toLength$5; 757 758 // `LengthOfArrayLike` abstract operation 759 // https://tc39.es/ecma262/#sec-lengthofarraylike 760 var lengthOfArrayLike$9 = function (obj) { 761 return toLength$4(obj.length); 762 }; 763 764 var classof$9 = classofRaw$1; 765 766 // `IsArray` abstract operation 767 // https://tc39.es/ecma262/#sec-isarray 768 // eslint-disable-next-line es/no-array-isarray -- safe 769 var isArray$3 = Array.isArray || function isArray(argument) { 770 return classof$9(argument) == 'Array'; 771 }; 772 773 var uncurryThis$r = functionUncurryThis; 774 var fails$r = fails$w; 775 var isCallable$c = isCallable$m; 776 var classof$8 = classof$c; 777 var getBuiltIn$4 = getBuiltIn$7; 778 var inspectSource$1 = inspectSource$4; 779 780 var noop$1 = function () { /* empty */ }; 781 var empty = []; 782 var construct = getBuiltIn$4('Reflect', 'construct'); 783 var constructorRegExp = /^\s*(?:class|function)\b/; 784 var exec$4 = uncurryThis$r(constructorRegExp.exec); 785 var INCORRECT_TO_STRING = !constructorRegExp.exec(noop$1); 786 787 var isConstructorModern = function isConstructor(argument) { 788 if (!isCallable$c(argument)) return false; 789 try { 790 construct(noop$1, empty, argument); 791 return true; 792 } catch (error) { 793 return false; 794 } 795 }; 796 797 var isConstructorLegacy = function isConstructor(argument) { 798 if (!isCallable$c(argument)) return false; 799 switch (classof$8(argument)) { 800 case 'AsyncFunction': 801 case 'GeneratorFunction': 802 case 'AsyncGeneratorFunction': return false; 803 } 804 try { 805 // we can't check .prototype since constructors produced by .bind haven't it 806 // `Function#toString` throws on some built-it function in some legacy engines 807 // (for example, `DOMQuad` and similar in FF41-) 808 return INCORRECT_TO_STRING || !!exec$4(constructorRegExp, inspectSource$1(argument)); 809 } catch (error) { 810 return true; 811 } 812 }; 813 814 isConstructorLegacy.sham = true; 815 816 // `IsConstructor` abstract operation 817 // https://tc39.es/ecma262/#sec-isconstructor 818 var isConstructor$4 = !construct || fails$r(function () { 819 var called; 820 return isConstructorModern(isConstructorModern.call) 821 || !isConstructorModern(Object) 822 || !isConstructorModern(function () { called = true; }) 823 || called; 824 }) ? isConstructorLegacy : isConstructorModern; 825 826 var global$z = global$U; 827 var isArray$2 = isArray$3; 828 var isConstructor$3 = isConstructor$4; 829 var isObject$a = isObject$g; 830 var wellKnownSymbol$j = wellKnownSymbol$n; 831 832 var SPECIES$6 = wellKnownSymbol$j('species'); 833 var Array$4 = global$z.Array; 834 835 // a part of `ArraySpeciesCreate` abstract operation 836 // https://tc39.es/ecma262/#sec-arrayspeciescreate 837 var arraySpeciesConstructor$1 = function (originalArray) { 838 var C; 839 if (isArray$2(originalArray)) { 840 C = originalArray.constructor; 841 // cross-realm fallback 842 if (isConstructor$3(C) && (C === Array$4 || isArray$2(C.prototype))) C = undefined; 843 else if (isObject$a(C)) { 844 C = C[SPECIES$6]; 845 if (C === null) C = undefined; 846 } 847 } return C === undefined ? Array$4 : C; 848 }; 849 850 var arraySpeciesConstructor = arraySpeciesConstructor$1; 851 852 // `ArraySpeciesCreate` abstract operation 853 // https://tc39.es/ecma262/#sec-arrayspeciescreate 854 var arraySpeciesCreate$2 = function (originalArray, length) { 855 return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); 856 }; 857 858 var bind$7 = functionBindContext; 859 var uncurryThis$q = functionUncurryThis; 860 var IndexedObject$4 = indexedObject; 861 var toObject$8 = toObject$a; 862 var lengthOfArrayLike$8 = lengthOfArrayLike$9; 863 var arraySpeciesCreate$1 = arraySpeciesCreate$2; 864 865 var push$4 = uncurryThis$q([].push); 866 867 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation 868 var createMethod$4 = function (TYPE) { 869 var IS_MAP = TYPE == 1; 870 var IS_FILTER = TYPE == 2; 871 var IS_SOME = TYPE == 3; 872 var IS_EVERY = TYPE == 4; 873 var IS_FIND_INDEX = TYPE == 6; 874 var IS_FILTER_REJECT = TYPE == 7; 875 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; 876 return function ($this, callbackfn, that, specificCreate) { 877 var O = toObject$8($this); 878 var self = IndexedObject$4(O); 879 var boundFunction = bind$7(callbackfn, that); 880 var length = lengthOfArrayLike$8(self); 881 var index = 0; 882 var create = specificCreate || arraySpeciesCreate$1; 883 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined; 884 var value, result; 885 for (;length > index; index++) if (NO_HOLES || index in self) { 886 value = self[index]; 887 result = boundFunction(value, index, O); 888 if (TYPE) { 889 if (IS_MAP) target[index] = result; // map 890 else if (result) switch (TYPE) { 891 case 3: return true; // some 892 case 5: return value; // find 893 case 6: return index; // findIndex 894 case 2: push$4(target, value); // filter 895 } else switch (TYPE) { 896 case 4: return false; // every 897 case 7: push$4(target, value); // filterReject 898 } 899 } 900 } 901 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; 902 }; 903 }; 904 905 var arrayIteration = { 906 // `Array.prototype.forEach` method 907 // https://tc39.es/ecma262/#sec-array.prototype.foreach 908 forEach: createMethod$4(0), 909 // `Array.prototype.map` method 910 // https://tc39.es/ecma262/#sec-array.prototype.map 911 map: createMethod$4(1), 912 // `Array.prototype.filter` method 913 // https://tc39.es/ecma262/#sec-array.prototype.filter 914 filter: createMethod$4(2), 915 // `Array.prototype.some` method 916 // https://tc39.es/ecma262/#sec-array.prototype.some 917 some: createMethod$4(3), 918 // `Array.prototype.every` method 919 // https://tc39.es/ecma262/#sec-array.prototype.every 920 every: createMethod$4(4), 921 // `Array.prototype.find` method 922 // https://tc39.es/ecma262/#sec-array.prototype.find 923 find: createMethod$4(5), 924 // `Array.prototype.findIndex` method 925 // https://tc39.es/ecma262/#sec-array.prototype.findIndex 926 findIndex: createMethod$4(6), 927 // `Array.prototype.filterReject` method 928 // https://github.com/tc39/proposal-array-filtering 929 filterReject: createMethod$4(7) 930 }; 931 932 var fails$q = fails$w; 933 934 var arrayMethodIsStrict$4 = function (METHOD_NAME, argument) { 935 var method = [][METHOD_NAME]; 936 return !!method && fails$q(function () { 937 // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing 938 method.call(null, argument || function () { throw 1; }, 1); 939 }); 940 }; 941 942 var $forEach = arrayIteration.forEach; 943 var arrayMethodIsStrict$3 = arrayMethodIsStrict$4; 944 945 var STRICT_METHOD$3 = arrayMethodIsStrict$3('forEach'); 946 947 // `Array.prototype.forEach` method implementation 948 // https://tc39.es/ecma262/#sec-array.prototype.foreach 949 var arrayForEach = !STRICT_METHOD$3 ? function forEach(callbackfn /* , thisArg */) { 950 return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); 951 // eslint-disable-next-line es/no-array-prototype-foreach -- safe 952 } : [].forEach; 953 954 var global$y = global$U; 955 var DOMIterables$1 = domIterables; 956 var DOMTokenListPrototype$1 = domTokenListPrototype; 957 var forEach = arrayForEach; 958 var createNonEnumerableProperty$5 = createNonEnumerableProperty$8; 959 960 var handlePrototype$1 = function (CollectionPrototype) { 961 // some Chrome versions have non-configurable methods on DOMTokenList 962 if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { 963 createNonEnumerableProperty$5(CollectionPrototype, 'forEach', forEach); 964 } catch (error) { 965 CollectionPrototype.forEach = forEach; 966 } 967 }; 968 969 for (var COLLECTION_NAME$1 in DOMIterables$1) { 970 if (DOMIterables$1[COLLECTION_NAME$1]) { 971 handlePrototype$1(global$y[COLLECTION_NAME$1] && global$y[COLLECTION_NAME$1].prototype); 972 } 973 } 974 975 handlePrototype$1(DOMTokenListPrototype$1); 976 977 var objectGetOwnPropertyDescriptor = {}; 978 979 var objectPropertyIsEnumerable = {}; 980 981 var $propertyIsEnumerable = {}.propertyIsEnumerable; 982 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe 983 var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor; 984 985 // Nashorn ~ JDK8 bug 986 var NASHORN_BUG = getOwnPropertyDescriptor$4 && !$propertyIsEnumerable.call({ 1: 2 }, 1); 987 988 // `Object.prototype.propertyIsEnumerable` method implementation 989 // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable 990 objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) { 991 var descriptor = getOwnPropertyDescriptor$4(this, V); 992 return !!descriptor && descriptor.enumerable; 993 } : $propertyIsEnumerable; 994 995 // toObject with fallback for non-array-like ES3 strings 996 var IndexedObject$3 = indexedObject; 997 var requireObjectCoercible$7 = requireObjectCoercible$9; 998 999 var toIndexedObject$8 = function (it) { 1000 return IndexedObject$3(requireObjectCoercible$7(it)); 1001 }; 1002 1003 var DESCRIPTORS$9 = descriptors; 1004 var call$e = functionCall; 1005 var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable; 1006 var createPropertyDescriptor$2 = createPropertyDescriptor$4; 1007 var toIndexedObject$7 = toIndexedObject$8; 1008 var toPropertyKey$1 = toPropertyKey$3; 1009 var hasOwn$8 = hasOwnProperty_1; 1010 var IE8_DOM_DEFINE = ie8DomDefine; 1011 1012 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe 1013 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; 1014 1015 // `Object.getOwnPropertyDescriptor` method 1016 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor 1017 objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { 1018 O = toIndexedObject$7(O); 1019 P = toPropertyKey$1(P); 1020 if (IE8_DOM_DEFINE) try { 1021 return $getOwnPropertyDescriptor(O, P); 1022 } catch (error) { /* empty */ } 1023 if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$e(propertyIsEnumerableModule$1.f, O, P), O[P]); 1024 }; 1025 1026 var objectGetOwnPropertyNames = {}; 1027 1028 var toIntegerOrInfinity$2 = toIntegerOrInfinity$4; 1029 1030 var max$4 = Math.max; 1031 var min$4 = Math.min; 1032 1033 // Helper for a popular repeating case of the spec: 1034 // Let integer be ? ToInteger(index). 1035 // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). 1036 var toAbsoluteIndex$3 = function (index, length) { 1037 var integer = toIntegerOrInfinity$2(index); 1038 return integer < 0 ? max$4(integer + length, 0) : min$4(integer, length); 1039 }; 1040 1041 var toIndexedObject$6 = toIndexedObject$8; 1042 var toAbsoluteIndex$2 = toAbsoluteIndex$3; 1043 var lengthOfArrayLike$7 = lengthOfArrayLike$9; 1044 1045 // `Array.prototype.{ indexOf, includes }` methods implementation 1046 var createMethod$3 = function (IS_INCLUDES) { 1047 return function ($this, el, fromIndex) { 1048 var O = toIndexedObject$6($this); 1049 var length = lengthOfArrayLike$7(O); 1050 var index = toAbsoluteIndex$2(fromIndex, length); 1051 var value; 1052 // Array#includes uses SameValueZero equality algorithm 1053 // eslint-disable-next-line no-self-compare -- NaN check 1054 if (IS_INCLUDES && el != el) while (length > index) { 1055 value = O[index++]; 1056 // eslint-disable-next-line no-self-compare -- NaN check 1057 if (value != value) return true; 1058 // Array#indexOf ignores holes, Array#includes - not 1059 } else for (;length > index; index++) { 1060 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; 1061 } return !IS_INCLUDES && -1; 1062 }; 1063 }; 1064 1065 var arrayIncludes = { 1066 // `Array.prototype.includes` method 1067 // https://tc39.es/ecma262/#sec-array.prototype.includes 1068 includes: createMethod$3(true), 1069 // `Array.prototype.indexOf` method 1070 // https://tc39.es/ecma262/#sec-array.prototype.indexof 1071 indexOf: createMethod$3(false) 1072 }; 1073 1074 var uncurryThis$p = functionUncurryThis; 1075 var hasOwn$7 = hasOwnProperty_1; 1076 var toIndexedObject$5 = toIndexedObject$8; 1077 var indexOf$1 = arrayIncludes.indexOf; 1078 var hiddenKeys$3 = hiddenKeys$5; 1079 1080 var push$3 = uncurryThis$p([].push); 1081 1082 var objectKeysInternal = function (object, names) { 1083 var O = toIndexedObject$5(object); 1084 var i = 0; 1085 var result = []; 1086 var key; 1087 for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push$3(result, key); 1088 // Don't enum bug & hidden keys 1089 while (names.length > i) if (hasOwn$7(O, key = names[i++])) { 1090 ~indexOf$1(result, key) || push$3(result, key); 1091 } 1092 return result; 1093 }; 1094 1095 // IE8- don't enum bug keys 1096 var enumBugKeys$3 = [ 1097 'constructor', 1098 'hasOwnProperty', 1099 'isPrototypeOf', 1100 'propertyIsEnumerable', 1101 'toLocaleString', 1102 'toString', 1103 'valueOf' 1104 ]; 1105 1106 var internalObjectKeys$1 = objectKeysInternal; 1107 var enumBugKeys$2 = enumBugKeys$3; 1108 1109 var hiddenKeys$2 = enumBugKeys$2.concat('length', 'prototype'); 1110 1111 // `Object.getOwnPropertyNames` method 1112 // https://tc39.es/ecma262/#sec-object.getownpropertynames 1113 // eslint-disable-next-line es/no-object-getownpropertynames -- safe 1114 objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { 1115 return internalObjectKeys$1(O, hiddenKeys$2); 1116 }; 1117 1118 var objectGetOwnPropertySymbols = {}; 1119 1120 // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe 1121 objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols; 1122 1123 var getBuiltIn$3 = getBuiltIn$7; 1124 var uncurryThis$o = functionUncurryThis; 1125 var getOwnPropertyNamesModule$1 = objectGetOwnPropertyNames; 1126 var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols; 1127 var anObject$f = anObject$h; 1128 1129 var concat$2 = uncurryThis$o([].concat); 1130 1131 // all object keys, includes non-enumerable and symbols 1132 var ownKeys$1 = getBuiltIn$3('Reflect', 'ownKeys') || function ownKeys(it) { 1133 var keys = getOwnPropertyNamesModule$1.f(anObject$f(it)); 1134 var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f; 1135 return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys; 1136 }; 1137 1138 var hasOwn$6 = hasOwnProperty_1; 1139 var ownKeys = ownKeys$1; 1140 var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor; 1141 var definePropertyModule$4 = objectDefineProperty; 1142 1143 var copyConstructorProperties$1 = function (target, source, exceptions) { 1144 var keys = ownKeys(source); 1145 var defineProperty = definePropertyModule$4.f; 1146 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; 1147 for (var i = 0; i < keys.length; i++) { 1148 var key = keys[i]; 1149 if (!hasOwn$6(target, key) && !(exceptions && hasOwn$6(exceptions, key))) { 1150 defineProperty(target, key, getOwnPropertyDescriptor(source, key)); 1151 } 1152 } 1153 }; 1154 1155 var fails$p = fails$w; 1156 var isCallable$b = isCallable$m; 1157 1158 var replacement = /#|\.prototype\./; 1159 1160 var isForced$5 = function (feature, detection) { 1161 var value = data[normalize(feature)]; 1162 return value == POLYFILL ? true 1163 : value == NATIVE ? false 1164 : isCallable$b(detection) ? fails$p(detection) 1165 : !!detection; 1166 }; 1167 1168 var normalize = isForced$5.normalize = function (string) { 1169 return String(string).replace(replacement, '.').toLowerCase(); 1170 }; 1171 1172 var data = isForced$5.data = {}; 1173 var NATIVE = isForced$5.NATIVE = 'N'; 1174 var POLYFILL = isForced$5.POLYFILL = 'P'; 1175 1176 var isForced_1 = isForced$5; 1177 1178 var global$x = global$U; 1179 var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f; 1180 var createNonEnumerableProperty$4 = createNonEnumerableProperty$8; 1181 var redefine$9 = redefine$b.exports; 1182 var setGlobal = setGlobal$3; 1183 var copyConstructorProperties = copyConstructorProperties$1; 1184 var isForced$4 = isForced_1; 1185 1186 /* 1187 options.target - name of the target object 1188 options.global - target is the global object 1189 options.stat - export as static methods of target 1190 options.proto - export as prototype methods of target 1191 options.real - real prototype method for the `pure` version 1192 options.forced - export even if the native feature is available 1193 options.bind - bind methods to the target, required for the `pure` version 1194 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version 1195 options.unsafe - use the simple assignment of property instead of delete + defineProperty 1196 options.sham - add a flag to not completely full polyfills 1197 options.enumerable - export as enumerable property 1198 options.noTargetGet - prevent calling a getter on target 1199 options.name - the .name of the function if it does not match the key 1200 */ 1201 var _export = function (options, source) { 1202 var TARGET = options.target; 1203 var GLOBAL = options.global; 1204 var STATIC = options.stat; 1205 var FORCED, target, key, targetProperty, sourceProperty, descriptor; 1206 if (GLOBAL) { 1207 target = global$x; 1208 } else if (STATIC) { 1209 target = global$x[TARGET] || setGlobal(TARGET, {}); 1210 } else { 1211 target = (global$x[TARGET] || {}).prototype; 1212 } 1213 if (target) for (key in source) { 1214 sourceProperty = source[key]; 1215 if (options.noTargetGet) { 1216 descriptor = getOwnPropertyDescriptor$3(target, key); 1217 targetProperty = descriptor && descriptor.value; 1218 } else targetProperty = target[key]; 1219 FORCED = isForced$4(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); 1220 // contained in target 1221 if (!FORCED && targetProperty !== undefined) { 1222 if (typeof sourceProperty == typeof targetProperty) continue; 1223 copyConstructorProperties(sourceProperty, targetProperty); 1224 } 1225 // add a flag to not completely full polyfills 1226 if (options.sham || (targetProperty && targetProperty.sham)) { 1227 createNonEnumerableProperty$4(sourceProperty, 'sham', true); 1228 } 1229 // extend global 1230 redefine$9(target, key, sourceProperty, options); 1231 } 1232 }; 1233 1234 var fails$o = fails$w; 1235 var wellKnownSymbol$i = wellKnownSymbol$n; 1236 var V8_VERSION$2 = engineV8Version; 1237 1238 var SPECIES$5 = wellKnownSymbol$i('species'); 1239 1240 var arrayMethodHasSpeciesSupport$4 = function (METHOD_NAME) { 1241 // We can't use this feature detection in V8 since it causes 1242 // deoptimization and serious performance degradation 1243 // https://github.com/zloirock/core-js/issues/677 1244 return V8_VERSION$2 >= 51 || !fails$o(function () { 1245 var array = []; 1246 var constructor = array.constructor = {}; 1247 constructor[SPECIES$5] = function () { 1248 return { foo: 1 }; 1249 }; 1250 return array[METHOD_NAME](Boolean).foo !== 1; 1251 }); 1252 }; 1253 1254 var $$n = _export; 1255 var $map = arrayIteration.map; 1256 var arrayMethodHasSpeciesSupport$3 = arrayMethodHasSpeciesSupport$4; 1257 1258 var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$3('map'); 1259 1260 // `Array.prototype.map` method 1261 // https://tc39.es/ecma262/#sec-array.prototype.map 1262 // with adding support of @@species 1263 $$n({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, { 1264 map: function map(callbackfn /* , thisArg */) { 1265 return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); 1266 } 1267 }); 1268 1269 var call$d = functionCall; 1270 var anObject$e = anObject$h; 1271 var getMethod$4 = getMethod$6; 1272 1273 var iteratorClose$2 = function (iterator, kind, value) { 1274 var innerResult, innerError; 1275 anObject$e(iterator); 1276 try { 1277 innerResult = getMethod$4(iterator, 'return'); 1278 if (!innerResult) { 1279 if (kind === 'throw') throw value; 1280 return value; 1281 } 1282 innerResult = call$d(innerResult, iterator); 1283 } catch (error) { 1284 innerError = true; 1285 innerResult = error; 1286 } 1287 if (kind === 'throw') throw value; 1288 if (innerError) throw innerResult; 1289 anObject$e(innerResult); 1290 return value; 1291 }; 1292 1293 var anObject$d = anObject$h; 1294 var iteratorClose$1 = iteratorClose$2; 1295 1296 // call something on iterator step with safe closing on error 1297 var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) { 1298 try { 1299 return ENTRIES ? fn(anObject$d(value)[0], value[1]) : fn(value); 1300 } catch (error) { 1301 iteratorClose$1(iterator, 'throw', error); 1302 } 1303 }; 1304 1305 var iterators = {}; 1306 1307 var wellKnownSymbol$h = wellKnownSymbol$n; 1308 var Iterators$4 = iterators; 1309 1310 var ITERATOR$7 = wellKnownSymbol$h('iterator'); 1311 var ArrayPrototype$1 = Array.prototype; 1312 1313 // check on default Array iterator 1314 var isArrayIteratorMethod$2 = function (it) { 1315 return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$7] === it); 1316 }; 1317 1318 var toPropertyKey = toPropertyKey$3; 1319 var definePropertyModule$3 = objectDefineProperty; 1320 var createPropertyDescriptor$1 = createPropertyDescriptor$4; 1321 1322 var createProperty$4 = function (object, key, value) { 1323 var propertyKey = toPropertyKey(key); 1324 if (propertyKey in object) definePropertyModule$3.f(object, propertyKey, createPropertyDescriptor$1(0, value)); 1325 else object[propertyKey] = value; 1326 }; 1327 1328 var classof$7 = classof$c; 1329 var getMethod$3 = getMethod$6; 1330 var Iterators$3 = iterators; 1331 var wellKnownSymbol$g = wellKnownSymbol$n; 1332 1333 var ITERATOR$6 = wellKnownSymbol$g('iterator'); 1334 1335 var getIteratorMethod$3 = function (it) { 1336 if (it != undefined) return getMethod$3(it, ITERATOR$6) 1337 || getMethod$3(it, '@@iterator') 1338 || Iterators$3[classof$7(it)]; 1339 }; 1340 1341 var global$w = global$U; 1342 var call$c = functionCall; 1343 var aCallable$4 = aCallable$7; 1344 var anObject$c = anObject$h; 1345 var tryToString$2 = tryToString$4; 1346 var getIteratorMethod$2 = getIteratorMethod$3; 1347 1348 var TypeError$c = global$w.TypeError; 1349 1350 var getIterator$2 = function (argument, usingIterator) { 1351 var iteratorMethod = arguments.length < 2 ? getIteratorMethod$2(argument) : usingIterator; 1352 if (aCallable$4(iteratorMethod)) return anObject$c(call$c(iteratorMethod, argument)); 1353 throw TypeError$c(tryToString$2(argument) + ' is not iterable'); 1354 }; 1355 1356 var global$v = global$U; 1357 var bind$6 = functionBindContext; 1358 var call$b = functionCall; 1359 var toObject$7 = toObject$a; 1360 var callWithSafeIterationClosing = callWithSafeIterationClosing$1; 1361 var isArrayIteratorMethod$1 = isArrayIteratorMethod$2; 1362 var isConstructor$2 = isConstructor$4; 1363 var lengthOfArrayLike$6 = lengthOfArrayLike$9; 1364 var createProperty$3 = createProperty$4; 1365 var getIterator$1 = getIterator$2; 1366 var getIteratorMethod$1 = getIteratorMethod$3; 1367 1368 var Array$3 = global$v.Array; 1369 1370 // `Array.from` method implementation 1371 // https://tc39.es/ecma262/#sec-array.from 1372 var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { 1373 var O = toObject$7(arrayLike); 1374 var IS_CONSTRUCTOR = isConstructor$2(this); 1375 var argumentsLength = arguments.length; 1376 var mapfn = argumentsLength > 1 ? arguments[1] : undefined; 1377 var mapping = mapfn !== undefined; 1378 if (mapping) mapfn = bind$6(mapfn, argumentsLength > 2 ? arguments[2] : undefined); 1379 var iteratorMethod = getIteratorMethod$1(O); 1380 var index = 0; 1381 var length, result, step, iterator, next, value; 1382 // if the target is not iterable or it's an array with the default iterator - use a simple case 1383 if (iteratorMethod && !(this == Array$3 && isArrayIteratorMethod$1(iteratorMethod))) { 1384 iterator = getIterator$1(O, iteratorMethod); 1385 next = iterator.next; 1386 result = IS_CONSTRUCTOR ? new this() : []; 1387 for (;!(step = call$b(next, iterator)).done; index++) { 1388 value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; 1389 createProperty$3(result, index, value); 1390 } 1391 } else { 1392 length = lengthOfArrayLike$6(O); 1393 result = IS_CONSTRUCTOR ? new this(length) : Array$3(length); 1394 for (;length > index; index++) { 1395 value = mapping ? mapfn(O[index], index) : O[index]; 1396 createProperty$3(result, index, value); 1397 } 1398 } 1399 result.length = index; 1400 return result; 1401 }; 1402 1403 var wellKnownSymbol$f = wellKnownSymbol$n; 1404 1405 var ITERATOR$5 = wellKnownSymbol$f('iterator'); 1406 var SAFE_CLOSING = false; 1407 1408 try { 1409 var called = 0; 1410 var iteratorWithReturn = { 1411 next: function () { 1412 return { done: !!called++ }; 1413 }, 1414 'return': function () { 1415 SAFE_CLOSING = true; 1416 } 1417 }; 1418 iteratorWithReturn[ITERATOR$5] = function () { 1419 return this; 1420 }; 1421 // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing 1422 Array.from(iteratorWithReturn, function () { throw 2; }); 1423 } catch (error) { /* empty */ } 1424 1425 var checkCorrectnessOfIteration$3 = function (exec, SKIP_CLOSING) { 1426 if (!SKIP_CLOSING && !SAFE_CLOSING) return false; 1427 var ITERATION_SUPPORT = false; 1428 try { 1429 var object = {}; 1430 object[ITERATOR$5] = function () { 1431 return { 1432 next: function () { 1433 return { done: ITERATION_SUPPORT = true }; 1434 } 1435 }; 1436 }; 1437 exec(object); 1438 } catch (error) { /* empty */ } 1439 return ITERATION_SUPPORT; 1440 }; 1441 1442 var $$m = _export; 1443 var from = arrayFrom; 1444 var checkCorrectnessOfIteration$2 = checkCorrectnessOfIteration$3; 1445 1446 var INCORRECT_ITERATION$1 = !checkCorrectnessOfIteration$2(function (iterable) { 1447 // eslint-disable-next-line es/no-array-from -- required for testing 1448 Array.from(iterable); 1449 }); 1450 1451 // `Array.from` method 1452 // https://tc39.es/ecma262/#sec-array.from 1453 $$m({ target: 'Array', stat: true, forced: INCORRECT_ITERATION$1 }, { 1454 from: from 1455 }); 1456 1457 var global$u = global$U; 1458 var classof$6 = classof$c; 1459 1460 var String$3 = global$u.String; 1461 1462 var toString$d = function (argument) { 1463 if (classof$6(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); 1464 return String$3(argument); 1465 }; 1466 1467 var uncurryThis$n = functionUncurryThis; 1468 var toIntegerOrInfinity$1 = toIntegerOrInfinity$4; 1469 var toString$c = toString$d; 1470 var requireObjectCoercible$6 = requireObjectCoercible$9; 1471 1472 var charAt$6 = uncurryThis$n(''.charAt); 1473 var charCodeAt$1 = uncurryThis$n(''.charCodeAt); 1474 var stringSlice$6 = uncurryThis$n(''.slice); 1475 1476 var createMethod$2 = function (CONVERT_TO_STRING) { 1477 return function ($this, pos) { 1478 var S = toString$c(requireObjectCoercible$6($this)); 1479 var position = toIntegerOrInfinity$1(pos); 1480 var size = S.length; 1481 var first, second; 1482 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; 1483 first = charCodeAt$1(S, position); 1484 return first < 0xD800 || first > 0xDBFF || position + 1 === size 1485 || (second = charCodeAt$1(S, position + 1)) < 0xDC00 || second > 0xDFFF 1486 ? CONVERT_TO_STRING 1487 ? charAt$6(S, position) 1488 : first 1489 : CONVERT_TO_STRING 1490 ? stringSlice$6(S, position, position + 2) 1491 : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; 1492 }; 1493 }; 1494 1495 var stringMultibyte = { 1496 // `String.prototype.codePointAt` method 1497 // https://tc39.es/ecma262/#sec-string.prototype.codepointat 1498 codeAt: createMethod$2(false), 1499 // `String.prototype.at` method 1500 // https://github.com/mathiasbynens/String.prototype.at 1501 charAt: createMethod$2(true) 1502 }; 1503 1504 var internalObjectKeys = objectKeysInternal; 1505 var enumBugKeys$1 = enumBugKeys$3; 1506 1507 // `Object.keys` method 1508 // https://tc39.es/ecma262/#sec-object.keys 1509 // eslint-disable-next-line es/no-object-keys -- safe 1510 var objectKeys$2 = Object.keys || function keys(O) { 1511 return internalObjectKeys(O, enumBugKeys$1); 1512 }; 1513 1514 var DESCRIPTORS$8 = descriptors; 1515 var definePropertyModule$2 = objectDefineProperty; 1516 var anObject$b = anObject$h; 1517 var toIndexedObject$4 = toIndexedObject$8; 1518 var objectKeys$1 = objectKeys$2; 1519 1520 // `Object.defineProperties` method 1521 // https://tc39.es/ecma262/#sec-object.defineproperties 1522 // eslint-disable-next-line es/no-object-defineproperties -- safe 1523 var objectDefineProperties = DESCRIPTORS$8 ? Object.defineProperties : function defineProperties(O, Properties) { 1524 anObject$b(O); 1525 var props = toIndexedObject$4(Properties); 1526 var keys = objectKeys$1(Properties); 1527 var length = keys.length; 1528 var index = 0; 1529 var key; 1530 while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]); 1531 return O; 1532 }; 1533 1534 var getBuiltIn$2 = getBuiltIn$7; 1535 1536 var html$2 = getBuiltIn$2('document', 'documentElement'); 1537 1538 /* global ActiveXObject -- old IE, WSH */ 1539 1540 var anObject$a = anObject$h; 1541 var defineProperties = objectDefineProperties; 1542 var enumBugKeys = enumBugKeys$3; 1543 var hiddenKeys$1 = hiddenKeys$5; 1544 var html$1 = html$2; 1545 var documentCreateElement = documentCreateElement$2; 1546 var sharedKey$1 = sharedKey$3; 1547 1548 var GT = '>'; 1549 var LT = '<'; 1550 var PROTOTYPE = 'prototype'; 1551 var SCRIPT = 'script'; 1552 var IE_PROTO$1 = sharedKey$1('IE_PROTO'); 1553 1554 var EmptyConstructor = function () { /* empty */ }; 1555 1556 var scriptTag = function (content) { 1557 return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; 1558 }; 1559 1560 // Create object with fake `null` prototype: use ActiveX Object with cleared prototype 1561 var NullProtoObjectViaActiveX = function (activeXDocument) { 1562 activeXDocument.write(scriptTag('')); 1563 activeXDocument.close(); 1564 var temp = activeXDocument.parentWindow.Object; 1565 activeXDocument = null; // avoid memory leak 1566 return temp; 1567 }; 1568 1569 // Create object with fake `null` prototype: use iframe Object with cleared prototype 1570 var NullProtoObjectViaIFrame = function () { 1571 // Thrash, waste and sodomy: IE GC bug 1572 var iframe = documentCreateElement('iframe'); 1573 var JS = 'java' + SCRIPT + ':'; 1574 var iframeDocument; 1575 iframe.style.display = 'none'; 1576 html$1.appendChild(iframe); 1577 // https://github.com/zloirock/core-js/issues/475 1578 iframe.src = String(JS); 1579 iframeDocument = iframe.contentWindow.document; 1580 iframeDocument.open(); 1581 iframeDocument.write(scriptTag('document.F=Object')); 1582 iframeDocument.close(); 1583 return iframeDocument.F; 1584 }; 1585 1586 // Check for document.domain and active x support 1587 // No need to use active x approach when document.domain is not set 1588 // see https://github.com/es-shims/es5-shim/issues/150 1589 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 1590 // avoid IE GC bug 1591 var activeXDocument; 1592 var NullProtoObject = function () { 1593 try { 1594 activeXDocument = new ActiveXObject('htmlfile'); 1595 } catch (error) { /* ignore */ } 1596 NullProtoObject = typeof document != 'undefined' 1597 ? document.domain && activeXDocument 1598 ? NullProtoObjectViaActiveX(activeXDocument) // old IE 1599 : NullProtoObjectViaIFrame() 1600 : NullProtoObjectViaActiveX(activeXDocument); // WSH 1601 var length = enumBugKeys.length; 1602 while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; 1603 return NullProtoObject(); 1604 }; 1605 1606 hiddenKeys$1[IE_PROTO$1] = true; 1607 1608 // `Object.create` method 1609 // https://tc39.es/ecma262/#sec-object.create 1610 var objectCreate = Object.create || function create(O, Properties) { 1611 var result; 1612 if (O !== null) { 1613 EmptyConstructor[PROTOTYPE] = anObject$a(O); 1614 result = new EmptyConstructor(); 1615 EmptyConstructor[PROTOTYPE] = null; 1616 // add "__proto__" for Object.getPrototypeOf polyfill 1617 result[IE_PROTO$1] = O; 1618 } else result = NullProtoObject(); 1619 return Properties === undefined ? result : defineProperties(result, Properties); 1620 }; 1621 1622 var fails$n = fails$w; 1623 1624 var correctPrototypeGetter = !fails$n(function () { 1625 function F() { /* empty */ } 1626 F.prototype.constructor = null; 1627 // eslint-disable-next-line es/no-object-getprototypeof -- required for testing 1628 return Object.getPrototypeOf(new F()) !== F.prototype; 1629 }); 1630 1631 var global$t = global$U; 1632 var hasOwn$5 = hasOwnProperty_1; 1633 var isCallable$a = isCallable$m; 1634 var toObject$6 = toObject$a; 1635 var sharedKey = sharedKey$3; 1636 var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter; 1637 1638 var IE_PROTO = sharedKey('IE_PROTO'); 1639 var Object$1 = global$t.Object; 1640 var ObjectPrototype = Object$1.prototype; 1641 1642 // `Object.getPrototypeOf` method 1643 // https://tc39.es/ecma262/#sec-object.getprototypeof 1644 var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$1.getPrototypeOf : function (O) { 1645 var object = toObject$6(O); 1646 if (hasOwn$5(object, IE_PROTO)) return object[IE_PROTO]; 1647 var constructor = object.constructor; 1648 if (isCallable$a(constructor) && object instanceof constructor) { 1649 return constructor.prototype; 1650 } return object instanceof Object$1 ? ObjectPrototype : null; 1651 }; 1652 1653 var fails$m = fails$w; 1654 var isCallable$9 = isCallable$m; 1655 var getPrototypeOf$1 = objectGetPrototypeOf; 1656 var redefine$8 = redefine$b.exports; 1657 var wellKnownSymbol$e = wellKnownSymbol$n; 1658 1659 var ITERATOR$4 = wellKnownSymbol$e('iterator'); 1660 var BUGGY_SAFARI_ITERATORS$1 = false; 1661 1662 // `%IteratorPrototype%` object 1663 // https://tc39.es/ecma262/#sec-%iteratorprototype%-object 1664 var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator; 1665 1666 /* eslint-disable es/no-array-prototype-keys -- safe */ 1667 if ([].keys) { 1668 arrayIterator = [].keys(); 1669 // Safari 8 has buggy iterators w/o `next` 1670 if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true; 1671 else { 1672 PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator)); 1673 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype; 1674 } 1675 } 1676 1677 var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$m(function () { 1678 var test = {}; 1679 // FF44- legacy iterators case 1680 return IteratorPrototype$2[ITERATOR$4].call(test) !== test; 1681 }); 1682 1683 if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {}; 1684 1685 // `%IteratorPrototype%[@@iterator]()` method 1686 // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator 1687 if (!isCallable$9(IteratorPrototype$2[ITERATOR$4])) { 1688 redefine$8(IteratorPrototype$2, ITERATOR$4, function () { 1689 return this; 1690 }); 1691 } 1692 1693 var iteratorsCore = { 1694 IteratorPrototype: IteratorPrototype$2, 1695 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1 1696 }; 1697 1698 var defineProperty$8 = objectDefineProperty.f; 1699 var hasOwn$4 = hasOwnProperty_1; 1700 var wellKnownSymbol$d = wellKnownSymbol$n; 1701 1702 var TO_STRING_TAG$1 = wellKnownSymbol$d('toStringTag'); 1703 1704 var setToStringTag$4 = function (target, TAG, STATIC) { 1705 if (target && !STATIC) target = target.prototype; 1706 if (target && !hasOwn$4(target, TO_STRING_TAG$1)) { 1707 defineProperty$8(target, TO_STRING_TAG$1, { configurable: true, value: TAG }); 1708 } 1709 }; 1710 1711 var IteratorPrototype$1 = iteratorsCore.IteratorPrototype; 1712 var create$3 = objectCreate; 1713 var createPropertyDescriptor = createPropertyDescriptor$4; 1714 var setToStringTag$3 = setToStringTag$4; 1715 var Iterators$2 = iterators; 1716 1717 var returnThis$1 = function () { return this; }; 1718 1719 var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) { 1720 var TO_STRING_TAG = NAME + ' Iterator'; 1721 IteratorConstructor.prototype = create$3(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) }); 1722 setToStringTag$3(IteratorConstructor, TO_STRING_TAG, false); 1723 Iterators$2[TO_STRING_TAG] = returnThis$1; 1724 return IteratorConstructor; 1725 }; 1726 1727 var global$s = global$U; 1728 var isCallable$8 = isCallable$m; 1729 1730 var String$2 = global$s.String; 1731 var TypeError$b = global$s.TypeError; 1732 1733 var aPossiblePrototype$1 = function (argument) { 1734 if (typeof argument == 'object' || isCallable$8(argument)) return argument; 1735 throw TypeError$b("Can't set " + String$2(argument) + ' as a prototype'); 1736 }; 1737 1738 /* eslint-disable no-proto -- safe */ 1739 1740 var uncurryThis$m = functionUncurryThis; 1741 var anObject$9 = anObject$h; 1742 var aPossiblePrototype = aPossiblePrototype$1; 1743 1744 // `Object.setPrototypeOf` method 1745 // https://tc39.es/ecma262/#sec-object.setprototypeof 1746 // Works with __proto__ only. Old v8 can't work with null proto objects. 1747 // eslint-disable-next-line es/no-object-setprototypeof -- safe 1748 var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { 1749 var CORRECT_SETTER = false; 1750 var test = {}; 1751 var setter; 1752 try { 1753 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe 1754 setter = uncurryThis$m(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set); 1755 setter(test, []); 1756 CORRECT_SETTER = test instanceof Array; 1757 } catch (error) { /* empty */ } 1758 return function setPrototypeOf(O, proto) { 1759 anObject$9(O); 1760 aPossiblePrototype(proto); 1761 if (CORRECT_SETTER) setter(O, proto); 1762 else O.__proto__ = proto; 1763 return O; 1764 }; 1765 }() : undefined); 1766 1767 var $$l = _export; 1768 var call$a = functionCall; 1769 var FunctionName = functionName; 1770 var isCallable$7 = isCallable$m; 1771 var createIteratorConstructor = createIteratorConstructor$1; 1772 var getPrototypeOf = objectGetPrototypeOf; 1773 var setPrototypeOf$2 = objectSetPrototypeOf; 1774 var setToStringTag$2 = setToStringTag$4; 1775 var createNonEnumerableProperty$3 = createNonEnumerableProperty$8; 1776 var redefine$7 = redefine$b.exports; 1777 var wellKnownSymbol$c = wellKnownSymbol$n; 1778 var Iterators$1 = iterators; 1779 var IteratorsCore = iteratorsCore; 1780 1781 var PROPER_FUNCTION_NAME$2 = FunctionName.PROPER; 1782 var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; 1783 var IteratorPrototype = IteratorsCore.IteratorPrototype; 1784 var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; 1785 var ITERATOR$3 = wellKnownSymbol$c('iterator'); 1786 var KEYS = 'keys'; 1787 var VALUES = 'values'; 1788 var ENTRIES = 'entries'; 1789 1790 var returnThis = function () { return this; }; 1791 1792 var defineIterator$3 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { 1793 createIteratorConstructor(IteratorConstructor, NAME, next); 1794 1795 var getIterationMethod = function (KIND) { 1796 if (KIND === DEFAULT && defaultIterator) return defaultIterator; 1797 if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; 1798 switch (KIND) { 1799 case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; 1800 case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; 1801 case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; 1802 } return function () { return new IteratorConstructor(this); }; 1803 }; 1804 1805 var TO_STRING_TAG = NAME + ' Iterator'; 1806 var INCORRECT_VALUES_NAME = false; 1807 var IterablePrototype = Iterable.prototype; 1808 var nativeIterator = IterablePrototype[ITERATOR$3] 1809 || IterablePrototype['@@iterator'] 1810 || DEFAULT && IterablePrototype[DEFAULT]; 1811 var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); 1812 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; 1813 var CurrentIteratorPrototype, methods, KEY; 1814 1815 // fix native 1816 if (anyNativeIterator) { 1817 CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); 1818 if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { 1819 if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { 1820 if (setPrototypeOf$2) { 1821 setPrototypeOf$2(CurrentIteratorPrototype, IteratorPrototype); 1822 } else if (!isCallable$7(CurrentIteratorPrototype[ITERATOR$3])) { 1823 redefine$7(CurrentIteratorPrototype, ITERATOR$3, returnThis); 1824 } 1825 } 1826 // Set @@toStringTag to native iterators 1827 setToStringTag$2(CurrentIteratorPrototype, TO_STRING_TAG, true); 1828 } 1829 } 1830 1831 // fix Array.prototype.{ values, @@iterator }.name in V8 / FF 1832 if (PROPER_FUNCTION_NAME$2 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { 1833 if (CONFIGURABLE_FUNCTION_NAME) { 1834 createNonEnumerableProperty$3(IterablePrototype, 'name', VALUES); 1835 } else { 1836 INCORRECT_VALUES_NAME = true; 1837 defaultIterator = function values() { return call$a(nativeIterator, this); }; 1838 } 1839 } 1840 1841 // export additional methods 1842 if (DEFAULT) { 1843 methods = { 1844 values: getIterationMethod(VALUES), 1845 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), 1846 entries: getIterationMethod(ENTRIES) 1847 }; 1848 if (FORCED) for (KEY in methods) { 1849 if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { 1850 redefine$7(IterablePrototype, KEY, methods[KEY]); 1851 } 1852 } else $$l({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); 1853 } 1854 1855 // define iterator 1856 if (IterablePrototype[ITERATOR$3] !== defaultIterator) { 1857 redefine$7(IterablePrototype, ITERATOR$3, defaultIterator, { name: DEFAULT }); 1858 } 1859 Iterators$1[NAME] = defaultIterator; 1860 1861 return methods; 1862 }; 1863 1864 var charAt$5 = stringMultibyte.charAt; 1865 var toString$b = toString$d; 1866 var InternalStateModule$3 = internalState; 1867 var defineIterator$2 = defineIterator$3; 1868 1869 var STRING_ITERATOR = 'String Iterator'; 1870 var setInternalState$3 = InternalStateModule$3.set; 1871 var getInternalState$4 = InternalStateModule$3.getterFor(STRING_ITERATOR); 1872 1873 // `String.prototype[@@iterator]` method 1874 // https://tc39.es/ecma262/#sec-string.prototype-@@iterator 1875 defineIterator$2(String, 'String', function (iterated) { 1876 setInternalState$3(this, { 1877 type: STRING_ITERATOR, 1878 string: toString$b(iterated), 1879 index: 0 1880 }); 1881 // `%StringIteratorPrototype%.next` method 1882 // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next 1883 }, function next() { 1884 var state = getInternalState$4(this); 1885 var string = state.string; 1886 var index = state.index; 1887 var point; 1888 if (index >= string.length) return { value: undefined, done: true }; 1889 point = charAt$5(string, index); 1890 state.index += point.length; 1891 return { value: point, done: false }; 1892 }); 1893 1894 function _defineProperties(target, props) { 1895 for (var i = 0; i < props.length; i++) { 1896 var descriptor = props[i]; 1897 descriptor.enumerable = descriptor.enumerable || false; 1898 descriptor.configurable = true; 1899 if ("value" in descriptor) descriptor.writable = true; 1900 Object.defineProperty(target, descriptor.key, descriptor); 1901 } 1902 } 1903 1904 function _createClass(Constructor, protoProps, staticProps) { 1905 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 1906 if (staticProps) _defineProperties(Constructor, staticProps); 1907 Object.defineProperty(Constructor, "prototype", { 1908 writable: false 1909 }); 1910 return Constructor; 1911 } 1912 1913 function _inheritsLoose(subClass, superClass) { 1914 subClass.prototype = Object.create(superClass.prototype); 1915 subClass.prototype.constructor = subClass; 1916 1917 _setPrototypeOf(subClass, superClass); 1918 } 1919 1920 function _setPrototypeOf(o, p) { 1921 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { 1922 o.__proto__ = p; 1923 return o; 1924 }; 1925 1926 return _setPrototypeOf(o, p); 1927 } 1928 1929 var isObject$9 = isObject$g; 1930 var classof$5 = classofRaw$1; 1931 var wellKnownSymbol$b = wellKnownSymbol$n; 1932 1933 var MATCH$2 = wellKnownSymbol$b('match'); 1934 1935 // `IsRegExp` abstract operation 1936 // https://tc39.es/ecma262/#sec-isregexp 1937 var isRegexp = function (it) { 1938 var isRegExp; 1939 return isObject$9(it) && ((isRegExp = it[MATCH$2]) !== undefined ? !!isRegExp : classof$5(it) == 'RegExp'); 1940 }; 1941 1942 var global$r = global$U; 1943 var isRegExp$2 = isRegexp; 1944 1945 var TypeError$a = global$r.TypeError; 1946 1947 var notARegexp = function (it) { 1948 if (isRegExp$2(it)) { 1949 throw TypeError$a("The method doesn't accept regular expressions"); 1950 } return it; 1951 }; 1952 1953 var wellKnownSymbol$a = wellKnownSymbol$n; 1954 1955 var MATCH$1 = wellKnownSymbol$a('match'); 1956 1957 var correctIsRegexpLogic = function (METHOD_NAME) { 1958 var regexp = /./; 1959 try { 1960 '/./'[METHOD_NAME](regexp); 1961 } catch (error1) { 1962 try { 1963 regexp[MATCH$1] = false; 1964 return '/./'[METHOD_NAME](regexp); 1965 } catch (error2) { /* empty */ } 1966 } return false; 1967 }; 1968 1969 var $$k = _export; 1970 var uncurryThis$l = functionUncurryThis; 1971 var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; 1972 var toLength$3 = toLength$5; 1973 var toString$a = toString$d; 1974 var notARegExp$1 = notARegexp; 1975 var requireObjectCoercible$5 = requireObjectCoercible$9; 1976 var correctIsRegExpLogic$1 = correctIsRegexpLogic; 1977 1978 // eslint-disable-next-line es/no-string-prototype-startswith -- safe 1979 var un$StartsWith = uncurryThis$l(''.startsWith); 1980 var stringSlice$5 = uncurryThis$l(''.slice); 1981 var min$3 = Math.min; 1982 1983 var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic$1('startsWith'); 1984 // https://github.com/zloirock/core-js/pull/702 1985 var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () { 1986 var descriptor = getOwnPropertyDescriptor$2(String.prototype, 'startsWith'); 1987 return descriptor && !descriptor.writable; 1988 }(); 1989 1990 // `String.prototype.startsWith` method 1991 // https://tc39.es/ecma262/#sec-string.prototype.startswith 1992 $$k({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { 1993 startsWith: function startsWith(searchString /* , position = 0 */) { 1994 var that = toString$a(requireObjectCoercible$5(this)); 1995 notARegExp$1(searchString); 1996 var index = toLength$3(min$3(arguments.length > 1 ? arguments[1] : undefined, that.length)); 1997 var search = toString$a(searchString); 1998 return un$StartsWith 1999 ? un$StartsWith(that, search, index) 2000 : stringSlice$5(that, index, index + search.length) === search; 2001 } 2002 }); 2003 2004 var anObject$8 = anObject$h; 2005 2006 // `RegExp.prototype.flags` getter implementation 2007 // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags 2008 var regexpFlags$1 = function () { 2009 var that = anObject$8(this); 2010 var result = ''; 2011 if (that.global) result += 'g'; 2012 if (that.ignoreCase) result += 'i'; 2013 if (that.multiline) result += 'm'; 2014 if (that.dotAll) result += 's'; 2015 if (that.unicode) result += 'u'; 2016 if (that.sticky) result += 'y'; 2017 return result; 2018 }; 2019 2020 var fails$l = fails$w; 2021 var global$q = global$U; 2022 2023 // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError 2024 var $RegExp$2 = global$q.RegExp; 2025 2026 var UNSUPPORTED_Y$3 = fails$l(function () { 2027 var re = $RegExp$2('a', 'y'); 2028 re.lastIndex = 2; 2029 return re.exec('abcd') != null; 2030 }); 2031 2032 // UC Browser bug 2033 // https://github.com/zloirock/core-js/issues/1008 2034 var MISSED_STICKY$2 = UNSUPPORTED_Y$3 || fails$l(function () { 2035 return !$RegExp$2('a', 'y').sticky; 2036 }); 2037 2038 var BROKEN_CARET = UNSUPPORTED_Y$3 || fails$l(function () { 2039 // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 2040 var re = $RegExp$2('^r', 'gy'); 2041 re.lastIndex = 2; 2042 return re.exec('str') != null; 2043 }); 2044 2045 var regexpStickyHelpers = { 2046 BROKEN_CARET: BROKEN_CARET, 2047 MISSED_STICKY: MISSED_STICKY$2, 2048 UNSUPPORTED_Y: UNSUPPORTED_Y$3 2049 }; 2050 2051 var fails$k = fails$w; 2052 var global$p = global$U; 2053 2054 // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError 2055 var $RegExp$1 = global$p.RegExp; 2056 2057 var regexpUnsupportedDotAll = fails$k(function () { 2058 var re = $RegExp$1('.', 's'); 2059 return !(re.dotAll && re.exec('\n') && re.flags === 's'); 2060 }); 2061 2062 var fails$j = fails$w; 2063 var global$o = global$U; 2064 2065 // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError 2066 var $RegExp = global$o.RegExp; 2067 2068 var regexpUnsupportedNcg = fails$j(function () { 2069 var re = $RegExp('(?<a>b)', 'g'); 2070 return re.exec('b').groups.a !== 'b' || 2071 'b'.replace(re, '$<a>c') !== 'bc'; 2072 }); 2073 2074 /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ 2075 /* eslint-disable regexp/no-useless-quantifier -- testing */ 2076 var call$9 = functionCall; 2077 var uncurryThis$k = functionUncurryThis; 2078 var toString$9 = toString$d; 2079 var regexpFlags = regexpFlags$1; 2080 var stickyHelpers$2 = regexpStickyHelpers; 2081 var shared = shared$4.exports; 2082 var create$2 = objectCreate; 2083 var getInternalState$3 = internalState.get; 2084 var UNSUPPORTED_DOT_ALL$1 = regexpUnsupportedDotAll; 2085 var UNSUPPORTED_NCG$1 = regexpUnsupportedNcg; 2086 2087 var nativeReplace = shared('native-string-replace', String.prototype.replace); 2088 var nativeExec = RegExp.prototype.exec; 2089 var patchedExec = nativeExec; 2090 var charAt$4 = uncurryThis$k(''.charAt); 2091 var indexOf = uncurryThis$k(''.indexOf); 2092 var replace$3 = uncurryThis$k(''.replace); 2093 var stringSlice$4 = uncurryThis$k(''.slice); 2094 2095 var UPDATES_LAST_INDEX_WRONG = (function () { 2096 var re1 = /a/; 2097 var re2 = /b*/g; 2098 call$9(nativeExec, re1, 'a'); 2099 call$9(nativeExec, re2, 'a'); 2100 return re1.lastIndex !== 0 || re2.lastIndex !== 0; 2101 })(); 2102 2103 var UNSUPPORTED_Y$2 = stickyHelpers$2.BROKEN_CARET; 2104 2105 // nonparticipating capturing group, copied from es5-shim's String#split patch. 2106 var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; 2107 2108 var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$2 || UNSUPPORTED_DOT_ALL$1 || UNSUPPORTED_NCG$1; 2109 2110 if (PATCH) { 2111 patchedExec = function exec(string) { 2112 var re = this; 2113 var state = getInternalState$3(re); 2114 var str = toString$9(string); 2115 var raw = state.raw; 2116 var result, reCopy, lastIndex, match, i, object, group; 2117 2118 if (raw) { 2119 raw.lastIndex = re.lastIndex; 2120 result = call$9(patchedExec, raw, str); 2121 re.lastIndex = raw.lastIndex; 2122 return result; 2123 } 2124 2125 var groups = state.groups; 2126 var sticky = UNSUPPORTED_Y$2 && re.sticky; 2127 var flags = call$9(regexpFlags, re); 2128 var source = re.source; 2129 var charsAdded = 0; 2130 var strCopy = str; 2131 2132 if (sticky) { 2133 flags = replace$3(flags, 'y', ''); 2134 if (indexOf(flags, 'g') === -1) { 2135 flags += 'g'; 2136 } 2137 2138 strCopy = stringSlice$4(str, re.lastIndex); 2139 // Support anchored sticky behavior. 2140 if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$4(str, re.lastIndex - 1) !== '\n')) { 2141 source = '(?: ' + source + ')'; 2142 strCopy = ' ' + strCopy; 2143 charsAdded++; 2144 } 2145 // ^(? + rx + ) is needed, in combination with some str slicing, to 2146 // simulate the 'y' flag. 2147 reCopy = new RegExp('^(?:' + source + ')', flags); 2148 } 2149 2150 if (NPCG_INCLUDED) { 2151 reCopy = new RegExp('^' + source + '$(?!\\s)', flags); 2152 } 2153 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; 2154 2155 match = call$9(nativeExec, sticky ? reCopy : re, strCopy); 2156 2157 if (sticky) { 2158 if (match) { 2159 match.input = stringSlice$4(match.input, charsAdded); 2160 match[0] = stringSlice$4(match[0], charsAdded); 2161 match.index = re.lastIndex; 2162 re.lastIndex += match[0].length; 2163 } else re.lastIndex = 0; 2164 } else if (UPDATES_LAST_INDEX_WRONG && match) { 2165 re.lastIndex = re.global ? match.index + match[0].length : lastIndex; 2166 } 2167 if (NPCG_INCLUDED && match && match.length > 1) { 2168 // Fix browsers whose `exec` methods don't consistently return `undefined` 2169 // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ 2170 call$9(nativeReplace, match[0], reCopy, function () { 2171 for (i = 1; i < arguments.length - 2; i++) { 2172 if (arguments[i] === undefined) match[i] = undefined; 2173 } 2174 }); 2175 } 2176 2177 if (match && groups) { 2178 match.groups = object = create$2(null); 2179 for (i = 0; i < groups.length; i++) { 2180 group = groups[i]; 2181 object[group[0]] = match[group[1]]; 2182 } 2183 } 2184 2185 return match; 2186 }; 2187 } 2188 2189 var regexpExec$3 = patchedExec; 2190 2191 var $$j = _export; 2192 var exec$3 = regexpExec$3; 2193 2194 // `RegExp.prototype.exec` method 2195 // https://tc39.es/ecma262/#sec-regexp.prototype.exec 2196 $$j({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, { 2197 exec: exec$3 2198 }); 2199 2200 // TODO: Remove from `core-js@4` since it's moved to entry points 2201 2202 var uncurryThis$j = functionUncurryThis; 2203 var redefine$6 = redefine$b.exports; 2204 var regexpExec$2 = regexpExec$3; 2205 var fails$i = fails$w; 2206 var wellKnownSymbol$9 = wellKnownSymbol$n; 2207 var createNonEnumerableProperty$2 = createNonEnumerableProperty$8; 2208 2209 var SPECIES$4 = wellKnownSymbol$9('species'); 2210 var RegExpPrototype$3 = RegExp.prototype; 2211 2212 var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) { 2213 var SYMBOL = wellKnownSymbol$9(KEY); 2214 2215 var DELEGATES_TO_SYMBOL = !fails$i(function () { 2216 // String methods call symbol-named RegEp methods 2217 var O = {}; 2218 O[SYMBOL] = function () { return 7; }; 2219 return ''[KEY](O) != 7; 2220 }); 2221 2222 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$i(function () { 2223 // Symbol-named RegExp methods call .exec 2224 var execCalled = false; 2225 var re = /a/; 2226 2227 if (KEY === 'split') { 2228 // We can't use real regex here since it causes deoptimization 2229 // and serious performance degradation in V8 2230 // https://github.com/zloirock/core-js/issues/306 2231 re = {}; 2232 // RegExp[@@split] doesn't call the regex's exec method, but first creates 2233 // a new one. We need to return the patched regex when creating the new one. 2234 re.constructor = {}; 2235 re.constructor[SPECIES$4] = function () { return re; }; 2236 re.flags = ''; 2237 re[SYMBOL] = /./[SYMBOL]; 2238 } 2239 2240 re.exec = function () { execCalled = true; return null; }; 2241 2242 re[SYMBOL](''); 2243 return !execCalled; 2244 }); 2245 2246 if ( 2247 !DELEGATES_TO_SYMBOL || 2248 !DELEGATES_TO_EXEC || 2249 FORCED 2250 ) { 2251 var uncurriedNativeRegExpMethod = uncurryThis$j(/./[SYMBOL]); 2252 var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { 2253 var uncurriedNativeMethod = uncurryThis$j(nativeMethod); 2254 var $exec = regexp.exec; 2255 if ($exec === regexpExec$2 || $exec === RegExpPrototype$3.exec) { 2256 if (DELEGATES_TO_SYMBOL && !forceStringMethod) { 2257 // The native String method already delegates to @@method (this 2258 // polyfilled function), leasing to infinite recursion. 2259 // We avoid it by directly calling the native @@method method. 2260 return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) }; 2261 } 2262 return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) }; 2263 } 2264 return { done: false }; 2265 }); 2266 2267 redefine$6(String.prototype, KEY, methods[0]); 2268 redefine$6(RegExpPrototype$3, SYMBOL, methods[1]); 2269 } 2270 2271 if (SHAM) createNonEnumerableProperty$2(RegExpPrototype$3[SYMBOL], 'sham', true); 2272 }; 2273 2274 var charAt$3 = stringMultibyte.charAt; 2275 2276 // `AdvanceStringIndex` abstract operation 2277 // https://tc39.es/ecma262/#sec-advancestringindex 2278 var advanceStringIndex$3 = function (S, index, unicode) { 2279 return index + (unicode ? charAt$3(S, index).length : 1); 2280 }; 2281 2282 var global$n = global$U; 2283 var call$8 = functionCall; 2284 var anObject$7 = anObject$h; 2285 var isCallable$6 = isCallable$m; 2286 var classof$4 = classofRaw$1; 2287 var regexpExec$1 = regexpExec$3; 2288 2289 var TypeError$9 = global$n.TypeError; 2290 2291 // `RegExpExec` abstract operation 2292 // https://tc39.es/ecma262/#sec-regexpexec 2293 var regexpExecAbstract = function (R, S) { 2294 var exec = R.exec; 2295 if (isCallable$6(exec)) { 2296 var result = call$8(exec, R, S); 2297 if (result !== null) anObject$7(result); 2298 return result; 2299 } 2300 if (classof$4(R) === 'RegExp') return call$8(regexpExec$1, R, S); 2301 throw TypeError$9('RegExp#exec called on incompatible receiver'); 2302 }; 2303 2304 var call$7 = functionCall; 2305 var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic; 2306 var anObject$6 = anObject$h; 2307 var toLength$2 = toLength$5; 2308 var toString$8 = toString$d; 2309 var requireObjectCoercible$4 = requireObjectCoercible$9; 2310 var getMethod$2 = getMethod$6; 2311 var advanceStringIndex$2 = advanceStringIndex$3; 2312 var regExpExec$2 = regexpExecAbstract; 2313 2314 // @@match logic 2315 fixRegExpWellKnownSymbolLogic$2('match', function (MATCH, nativeMatch, maybeCallNative) { 2316 return [ 2317 // `String.prototype.match` method 2318 // https://tc39.es/ecma262/#sec-string.prototype.match 2319 function match(regexp) { 2320 var O = requireObjectCoercible$4(this); 2321 var matcher = regexp == undefined ? undefined : getMethod$2(regexp, MATCH); 2322 return matcher ? call$7(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$8(O)); 2323 }, 2324 // `RegExp.prototype[@@match]` method 2325 // https://tc39.es/ecma262/#sec-regexp.prototype-@@match 2326 function (string) { 2327 var rx = anObject$6(this); 2328 var S = toString$8(string); 2329 var res = maybeCallNative(nativeMatch, rx, S); 2330 2331 if (res.done) return res.value; 2332 2333 if (!rx.global) return regExpExec$2(rx, S); 2334 2335 var fullUnicode = rx.unicode; 2336 rx.lastIndex = 0; 2337 var A = []; 2338 var n = 0; 2339 var result; 2340 while ((result = regExpExec$2(rx, S)) !== null) { 2341 var matchStr = toString$8(result[0]); 2342 A[n] = matchStr; 2343 if (matchStr === '') rx.lastIndex = advanceStringIndex$2(S, toLength$2(rx.lastIndex), fullUnicode); 2344 n++; 2345 } 2346 return n === 0 ? null : A; 2347 } 2348 ]; 2349 }); 2350 2351 var wellKnownSymbol$8 = wellKnownSymbol$n; 2352 var create$1 = objectCreate; 2353 var definePropertyModule$1 = objectDefineProperty; 2354 2355 var UNSCOPABLES = wellKnownSymbol$8('unscopables'); 2356 var ArrayPrototype = Array.prototype; 2357 2358 // Array.prototype[@@unscopables] 2359 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables 2360 if (ArrayPrototype[UNSCOPABLES] == undefined) { 2361 definePropertyModule$1.f(ArrayPrototype, UNSCOPABLES, { 2362 configurable: true, 2363 value: create$1(null) 2364 }); 2365 } 2366 2367 // add a key to Array.prototype[@@unscopables] 2368 var addToUnscopables$3 = function (key) { 2369 ArrayPrototype[UNSCOPABLES][key] = true; 2370 }; 2371 2372 var $$i = _export; 2373 var $includes = arrayIncludes.includes; 2374 var addToUnscopables$2 = addToUnscopables$3; 2375 2376 // `Array.prototype.includes` method 2377 // https://tc39.es/ecma262/#sec-array.prototype.includes 2378 $$i({ target: 'Array', proto: true }, { 2379 includes: function includes(el /* , fromIndex = 0 */) { 2380 return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); 2381 } 2382 }); 2383 2384 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables 2385 addToUnscopables$2('includes'); 2386 2387 var $$h = _export; 2388 var uncurryThis$i = functionUncurryThis; 2389 var notARegExp = notARegexp; 2390 var requireObjectCoercible$3 = requireObjectCoercible$9; 2391 var toString$7 = toString$d; 2392 var correctIsRegExpLogic = correctIsRegexpLogic; 2393 2394 var stringIndexOf$2 = uncurryThis$i(''.indexOf); 2395 2396 // `String.prototype.includes` method 2397 // https://tc39.es/ecma262/#sec-string.prototype.includes 2398 $$h({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { 2399 includes: function includes(searchString /* , position = 0 */) { 2400 return !!~stringIndexOf$2( 2401 toString$7(requireObjectCoercible$3(this)), 2402 toString$7(notARegExp(searchString)), 2403 arguments.length > 1 ? arguments[1] : undefined 2404 ); 2405 } 2406 }); 2407 2408 var FunctionPrototype$1 = Function.prototype; 2409 var apply$3 = FunctionPrototype$1.apply; 2410 var bind$5 = FunctionPrototype$1.bind; 2411 var call$6 = FunctionPrototype$1.call; 2412 2413 // eslint-disable-next-line es/no-reflect -- safe 2414 var functionApply = typeof Reflect == 'object' && Reflect.apply || (bind$5 ? call$6.bind(apply$3) : function () { 2415 return call$6.apply(apply$3, arguments); 2416 }); 2417 2418 var global$m = global$U; 2419 var isConstructor$1 = isConstructor$4; 2420 var tryToString$1 = tryToString$4; 2421 2422 var TypeError$8 = global$m.TypeError; 2423 2424 // `Assert: IsConstructor(argument) is true` 2425 var aConstructor$1 = function (argument) { 2426 if (isConstructor$1(argument)) return argument; 2427 throw TypeError$8(tryToString$1(argument) + ' is not a constructor'); 2428 }; 2429 2430 var anObject$5 = anObject$h; 2431 var aConstructor = aConstructor$1; 2432 var wellKnownSymbol$7 = wellKnownSymbol$n; 2433 2434 var SPECIES$3 = wellKnownSymbol$7('species'); 2435 2436 // `SpeciesConstructor` abstract operation 2437 // https://tc39.es/ecma262/#sec-speciesconstructor 2438 var speciesConstructor$2 = function (O, defaultConstructor) { 2439 var C = anObject$5(O).constructor; 2440 var S; 2441 return C === undefined || (S = anObject$5(C)[SPECIES$3]) == undefined ? defaultConstructor : aConstructor(S); 2442 }; 2443 2444 var global$l = global$U; 2445 var toAbsoluteIndex$1 = toAbsoluteIndex$3; 2446 var lengthOfArrayLike$5 = lengthOfArrayLike$9; 2447 var createProperty$2 = createProperty$4; 2448 2449 var Array$2 = global$l.Array; 2450 var max$3 = Math.max; 2451 2452 var arraySliceSimple = function (O, start, end) { 2453 var length = lengthOfArrayLike$5(O); 2454 var k = toAbsoluteIndex$1(start, length); 2455 var fin = toAbsoluteIndex$1(end === undefined ? length : end, length); 2456 var result = Array$2(max$3(fin - k, 0)); 2457 for (var n = 0; k < fin; k++, n++) createProperty$2(result, n, O[k]); 2458 result.length = n; 2459 return result; 2460 }; 2461 2462 var apply$2 = functionApply; 2463 var call$5 = functionCall; 2464 var uncurryThis$h = functionUncurryThis; 2465 var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic; 2466 var isRegExp$1 = isRegexp; 2467 var anObject$4 = anObject$h; 2468 var requireObjectCoercible$2 = requireObjectCoercible$9; 2469 var speciesConstructor$1 = speciesConstructor$2; 2470 var advanceStringIndex$1 = advanceStringIndex$3; 2471 var toLength$1 = toLength$5; 2472 var toString$6 = toString$d; 2473 var getMethod$1 = getMethod$6; 2474 var arraySlice$5 = arraySliceSimple; 2475 var callRegExpExec = regexpExecAbstract; 2476 var regexpExec = regexpExec$3; 2477 var stickyHelpers$1 = regexpStickyHelpers; 2478 var fails$h = fails$w; 2479 2480 var UNSUPPORTED_Y$1 = stickyHelpers$1.UNSUPPORTED_Y; 2481 var MAX_UINT32 = 0xFFFFFFFF; 2482 var min$2 = Math.min; 2483 var $push = [].push; 2484 var exec$2 = uncurryThis$h(/./.exec); 2485 var push$2 = uncurryThis$h($push); 2486 var stringSlice$3 = uncurryThis$h(''.slice); 2487 2488 // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec 2489 // Weex JS has frozen built-in prototypes, so use try / catch wrapper 2490 var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$h(function () { 2491 // eslint-disable-next-line regexp/no-empty-group -- required for testing 2492 var re = /(?:)/; 2493 var originalExec = re.exec; 2494 re.exec = function () { return originalExec.apply(this, arguments); }; 2495 var result = 'ab'.split(re); 2496 return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; 2497 }); 2498 2499 // @@split logic 2500 fixRegExpWellKnownSymbolLogic$1('split', function (SPLIT, nativeSplit, maybeCallNative) { 2501 var internalSplit; 2502 if ( 2503 'abbc'.split(/(b)*/)[1] == 'c' || 2504 // eslint-disable-next-line regexp/no-empty-group -- required for testing 2505 'test'.split(/(?:)/, -1).length != 4 || 2506 'ab'.split(/(?:ab)*/).length != 2 || 2507 '.'.split(/(.?)(.?)/).length != 4 || 2508 // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing 2509 '.'.split(/()()/).length > 1 || 2510 ''.split(/.?/).length 2511 ) { 2512 // based on es5-shim implementation, need to rework it 2513 internalSplit = function (separator, limit) { 2514 var string = toString$6(requireObjectCoercible$2(this)); 2515 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; 2516 if (lim === 0) return []; 2517 if (separator === undefined) return [string]; 2518 // If `separator` is not a regex, use native split 2519 if (!isRegExp$1(separator)) { 2520 return call$5(nativeSplit, string, separator, lim); 2521 } 2522 var output = []; 2523 var flags = (separator.ignoreCase ? 'i' : '') + 2524 (separator.multiline ? 'm' : '') + 2525 (separator.unicode ? 'u' : '') + 2526 (separator.sticky ? 'y' : ''); 2527 var lastLastIndex = 0; 2528 // Make `global` and avoid `lastIndex` issues by working with a copy 2529 var separatorCopy = new RegExp(separator.source, flags + 'g'); 2530 var match, lastIndex, lastLength; 2531 while (match = call$5(regexpExec, separatorCopy, string)) { 2532 lastIndex = separatorCopy.lastIndex; 2533 if (lastIndex > lastLastIndex) { 2534 push$2(output, stringSlice$3(string, lastLastIndex, match.index)); 2535 if (match.length > 1 && match.index < string.length) apply$2($push, output, arraySlice$5(match, 1)); 2536 lastLength = match[0].length; 2537 lastLastIndex = lastIndex; 2538 if (output.length >= lim) break; 2539 } 2540 if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop 2541 } 2542 if (lastLastIndex === string.length) { 2543 if (lastLength || !exec$2(separatorCopy, '')) push$2(output, ''); 2544 } else push$2(output, stringSlice$3(string, lastLastIndex)); 2545 return output.length > lim ? arraySlice$5(output, 0, lim) : output; 2546 }; 2547 // Chakra, V8 2548 } else if ('0'.split(undefined, 0).length) { 2549 internalSplit = function (separator, limit) { 2550 return separator === undefined && limit === 0 ? [] : call$5(nativeSplit, this, separator, limit); 2551 }; 2552 } else internalSplit = nativeSplit; 2553 2554 return [ 2555 // `String.prototype.split` method 2556 // https://tc39.es/ecma262/#sec-string.prototype.split 2557 function split(separator, limit) { 2558 var O = requireObjectCoercible$2(this); 2559 var splitter = separator == undefined ? undefined : getMethod$1(separator, SPLIT); 2560 return splitter 2561 ? call$5(splitter, separator, O, limit) 2562 : call$5(internalSplit, toString$6(O), separator, limit); 2563 }, 2564 // `RegExp.prototype[@@split]` method 2565 // https://tc39.es/ecma262/#sec-regexp.prototype-@@split 2566 // 2567 // NOTE: This cannot be properly polyfilled in engines that don't support 2568 // the 'y' flag. 2569 function (string, limit) { 2570 var rx = anObject$4(this); 2571 var S = toString$6(string); 2572 var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit); 2573 2574 if (res.done) return res.value; 2575 2576 var C = speciesConstructor$1(rx, RegExp); 2577 2578 var unicodeMatching = rx.unicode; 2579 var flags = (rx.ignoreCase ? 'i' : '') + 2580 (rx.multiline ? 'm' : '') + 2581 (rx.unicode ? 'u' : '') + 2582 (UNSUPPORTED_Y$1 ? 'g' : 'y'); 2583 2584 // ^(? + rx + ) is needed, in combination with some S slicing, to 2585 // simulate the 'y' flag. 2586 var splitter = new C(UNSUPPORTED_Y$1 ? '^(?:' + rx.source + ')' : rx, flags); 2587 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; 2588 if (lim === 0) return []; 2589 if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; 2590 var p = 0; 2591 var q = 0; 2592 var A = []; 2593 while (q < S.length) { 2594 splitter.lastIndex = UNSUPPORTED_Y$1 ? 0 : q; 2595 var z = callRegExpExec(splitter, UNSUPPORTED_Y$1 ? stringSlice$3(S, q) : S); 2596 var e; 2597 if ( 2598 z === null || 2599 (e = min$2(toLength$1(splitter.lastIndex + (UNSUPPORTED_Y$1 ? q : 0)), S.length)) === p 2600 ) { 2601 q = advanceStringIndex$1(S, q, unicodeMatching); 2602 } else { 2603 push$2(A, stringSlice$3(S, p, q)); 2604 if (A.length === lim) return A; 2605 for (var i = 1; i <= z.length - 1; i++) { 2606 push$2(A, z[i]); 2607 if (A.length === lim) return A; 2608 } 2609 q = p = e; 2610 } 2611 } 2612 push$2(A, stringSlice$3(S, p)); 2613 return A; 2614 } 2615 ]; 2616 }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y$1); 2617 2618 // a string of all valid unicode whitespaces 2619 var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + 2620 '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; 2621 2622 var uncurryThis$g = functionUncurryThis; 2623 var requireObjectCoercible$1 = requireObjectCoercible$9; 2624 var toString$5 = toString$d; 2625 var whitespaces$3 = whitespaces$4; 2626 2627 var replace$2 = uncurryThis$g(''.replace); 2628 var whitespace = '[' + whitespaces$3 + ']'; 2629 var ltrim = RegExp('^' + whitespace + whitespace + '*'); 2630 var rtrim = RegExp(whitespace + whitespace + '*$'); 2631 2632 // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation 2633 var createMethod$1 = function (TYPE) { 2634 return function ($this) { 2635 var string = toString$5(requireObjectCoercible$1($this)); 2636 if (TYPE & 1) string = replace$2(string, ltrim, ''); 2637 if (TYPE & 2) string = replace$2(string, rtrim, ''); 2638 return string; 2639 }; 2640 }; 2641 2642 var stringTrim = { 2643 // `String.prototype.{ trimLeft, trimStart }` methods 2644 // https://tc39.es/ecma262/#sec-string.prototype.trimstart 2645 start: createMethod$1(1), 2646 // `String.prototype.{ trimRight, trimEnd }` methods 2647 // https://tc39.es/ecma262/#sec-string.prototype.trimend 2648 end: createMethod$1(2), 2649 // `String.prototype.trim` method 2650 // https://tc39.es/ecma262/#sec-string.prototype.trim 2651 trim: createMethod$1(3) 2652 }; 2653 2654 var PROPER_FUNCTION_NAME$1 = functionName.PROPER; 2655 var fails$g = fails$w; 2656 var whitespaces$2 = whitespaces$4; 2657 2658 var non = '\u200B\u0085\u180E'; 2659 2660 // check that a method works with the correct list 2661 // of whitespaces and has a correct name 2662 var stringTrimForced = function (METHOD_NAME) { 2663 return fails$g(function () { 2664 return !!whitespaces$2[METHOD_NAME]() 2665 || non[METHOD_NAME]() !== non 2666 || (PROPER_FUNCTION_NAME$1 && whitespaces$2[METHOD_NAME].name !== METHOD_NAME); 2667 }); 2668 }; 2669 2670 var $$g = _export; 2671 var $trim = stringTrim.trim; 2672 var forcedStringTrimMethod = stringTrimForced; 2673 2674 // `String.prototype.trim` method 2675 // https://tc39.es/ecma262/#sec-string.prototype.trim 2676 $$g({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, { 2677 trim: function trim() { 2678 return $trim(this); 2679 } 2680 }); 2681 2682 var global$k = global$U; 2683 var fails$f = fails$w; 2684 var uncurryThis$f = functionUncurryThis; 2685 var toString$4 = toString$d; 2686 var trim$2 = stringTrim.trim; 2687 var whitespaces$1 = whitespaces$4; 2688 2689 var charAt$2 = uncurryThis$f(''.charAt); 2690 var n$ParseFloat = global$k.parseFloat; 2691 var Symbol$2 = global$k.Symbol; 2692 var ITERATOR$2 = Symbol$2 && Symbol$2.iterator; 2693 var FORCED$4 = 1 / n$ParseFloat(whitespaces$1 + '-0') !== -Infinity 2694 // MS Edge 18- broken with boxed symbols 2695 || (ITERATOR$2 && !fails$f(function () { n$ParseFloat(Object(ITERATOR$2)); })); 2696 2697 // `parseFloat` method 2698 // https://tc39.es/ecma262/#sec-parsefloat-string 2699 var numberParseFloat = FORCED$4 ? function parseFloat(string) { 2700 var trimmedString = trim$2(toString$4(string)); 2701 var result = n$ParseFloat(trimmedString); 2702 return result === 0 && charAt$2(trimmedString, 0) == '-' ? -0 : result; 2703 } : n$ParseFloat; 2704 2705 var $$f = _export; 2706 var parseFloat$1 = numberParseFloat; 2707 2708 // `Number.parseFloat` method 2709 // https://tc39.es/ecma262/#sec-number.parseFloat 2710 // eslint-disable-next-line es/no-number-parsefloat -- required for testing 2711 $$f({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat$1 }, { 2712 parseFloat: parseFloat$1 2713 }); 2714 2715 var isCallable$5 = isCallable$m; 2716 var isObject$8 = isObject$g; 2717 var setPrototypeOf$1 = objectSetPrototypeOf; 2718 2719 // makes subclassing work correct for wrapped built-ins 2720 var inheritIfRequired$3 = function ($this, dummy, Wrapper) { 2721 var NewTarget, NewTargetPrototype; 2722 if ( 2723 // it can work only with native `setPrototypeOf` 2724 setPrototypeOf$1 && 2725 // we haven't completely correct pre-ES6 way for getting `new.target`, so use this 2726 isCallable$5(NewTarget = dummy.constructor) && 2727 NewTarget !== Wrapper && 2728 isObject$8(NewTargetPrototype = NewTarget.prototype) && 2729 NewTargetPrototype !== Wrapper.prototype 2730 ) setPrototypeOf$1($this, NewTargetPrototype); 2731 return $this; 2732 }; 2733 2734 var uncurryThis$e = functionUncurryThis; 2735 2736 // `thisNumberValue` abstract operation 2737 // https://tc39.es/ecma262/#sec-thisnumbervalue 2738 var thisNumberValue$1 = uncurryThis$e(1.0.valueOf); 2739 2740 var DESCRIPTORS$7 = descriptors; 2741 var global$j = global$U; 2742 var uncurryThis$d = functionUncurryThis; 2743 var isForced$3 = isForced_1; 2744 var redefine$5 = redefine$b.exports; 2745 var hasOwn$3 = hasOwnProperty_1; 2746 var inheritIfRequired$2 = inheritIfRequired$3; 2747 var isPrototypeOf$4 = objectIsPrototypeOf; 2748 var isSymbol = isSymbol$3; 2749 var toPrimitive = toPrimitive$2; 2750 var fails$e = fails$w; 2751 var getOwnPropertyNames$2 = objectGetOwnPropertyNames.f; 2752 var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; 2753 var defineProperty$7 = objectDefineProperty.f; 2754 var thisNumberValue = thisNumberValue$1; 2755 var trim$1 = stringTrim.trim; 2756 2757 var NUMBER = 'Number'; 2758 var NativeNumber = global$j[NUMBER]; 2759 var NumberPrototype = NativeNumber.prototype; 2760 var TypeError$7 = global$j.TypeError; 2761 var arraySlice$4 = uncurryThis$d(''.slice); 2762 var charCodeAt = uncurryThis$d(''.charCodeAt); 2763 2764 // `ToNumeric` abstract operation 2765 // https://tc39.es/ecma262/#sec-tonumeric 2766 var toNumeric = function (value) { 2767 var primValue = toPrimitive(value, 'number'); 2768 return typeof primValue == 'bigint' ? primValue : toNumber(primValue); 2769 }; 2770 2771 // `ToNumber` abstract operation 2772 // https://tc39.es/ecma262/#sec-tonumber 2773 var toNumber = function (argument) { 2774 var it = toPrimitive(argument, 'number'); 2775 var first, third, radix, maxCode, digits, length, index, code; 2776 if (isSymbol(it)) throw TypeError$7('Cannot convert a Symbol value to a number'); 2777 if (typeof it == 'string' && it.length > 2) { 2778 it = trim$1(it); 2779 first = charCodeAt(it, 0); 2780 if (first === 43 || first === 45) { 2781 third = charCodeAt(it, 2); 2782 if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix 2783 } else if (first === 48) { 2784 switch (charCodeAt(it, 1)) { 2785 case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i 2786 case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i 2787 default: return +it; 2788 } 2789 digits = arraySlice$4(it, 2); 2790 length = digits.length; 2791 for (index = 0; index < length; index++) { 2792 code = charCodeAt(digits, index); 2793 // parseInt parses a string to a first unavailable symbol 2794 // but ToNumber should return NaN if a string contains unavailable symbols 2795 if (code < 48 || code > maxCode) return NaN; 2796 } return parseInt(digits, radix); 2797 } 2798 } return +it; 2799 }; 2800 2801 // `Number` constructor 2802 // https://tc39.es/ecma262/#sec-number-constructor 2803 if (isForced$3(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { 2804 var NumberWrapper = function Number(value) { 2805 var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value)); 2806 var dummy = this; 2807 // check on 1..constructor(foo) case 2808 return isPrototypeOf$4(NumberPrototype, dummy) && fails$e(function () { thisNumberValue(dummy); }) 2809 ? inheritIfRequired$2(Object(n), dummy, NumberWrapper) : n; 2810 }; 2811 for (var keys$1 = DESCRIPTORS$7 ? getOwnPropertyNames$2(NativeNumber) : ( 2812 // ES3: 2813 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + 2814 // ES2015 (in case, if modules with ES2015 Number statics required before): 2815 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' + 2816 // ESNext 2817 'fromString,range' 2818 ).split(','), j = 0, key; keys$1.length > j; j++) { 2819 if (hasOwn$3(NativeNumber, key = keys$1[j]) && !hasOwn$3(NumberWrapper, key)) { 2820 defineProperty$7(NumberWrapper, key, getOwnPropertyDescriptor$1(NativeNumber, key)); 2821 } 2822 } 2823 NumberWrapper.prototype = NumberPrototype; 2824 NumberPrototype.constructor = NumberWrapper; 2825 redefine$5(global$j, NUMBER, NumberWrapper); 2826 } 2827 2828 var $$e = _export; 2829 var toObject$5 = toObject$a; 2830 var nativeKeys = objectKeys$2; 2831 var fails$d = fails$w; 2832 2833 var FAILS_ON_PRIMITIVES$2 = fails$d(function () { nativeKeys(1); }); 2834 2835 // `Object.keys` method 2836 // https://tc39.es/ecma262/#sec-object.keys 2837 $$e({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$2 }, { 2838 keys: function keys(it) { 2839 return nativeKeys(toObject$5(it)); 2840 } 2841 }); 2842 2843 // TODO: Remove from `core-js@4` since it's moved to entry points 2844 2845 var $$d = _export; 2846 var global$i = global$U; 2847 var call$4 = functionCall; 2848 var uncurryThis$c = functionUncurryThis; 2849 var isCallable$4 = isCallable$m; 2850 var isObject$7 = isObject$g; 2851 2852 var DELEGATES_TO_EXEC = function () { 2853 var execCalled = false; 2854 var re = /[ac]/; 2855 re.exec = function () { 2856 execCalled = true; 2857 return /./.exec.apply(this, arguments); 2858 }; 2859 return re.test('abc') === true && execCalled; 2860 }(); 2861 2862 var Error$1 = global$i.Error; 2863 var un$Test = uncurryThis$c(/./.test); 2864 2865 // `RegExp.prototype.test` method 2866 // https://tc39.es/ecma262/#sec-regexp.prototype.test 2867 $$d({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, { 2868 test: function (str) { 2869 var exec = this.exec; 2870 if (!isCallable$4(exec)) return un$Test(this, str); 2871 var result = call$4(exec, this, str); 2872 if (result !== null && !isObject$7(result)) { 2873 throw new Error$1('RegExp exec method returned something other than an Object or null'); 2874 } 2875 return !!result; 2876 } 2877 }); 2878 2879 var getBuiltIn$1 = getBuiltIn$7; 2880 var definePropertyModule = objectDefineProperty; 2881 var wellKnownSymbol$6 = wellKnownSymbol$n; 2882 var DESCRIPTORS$6 = descriptors; 2883 2884 var SPECIES$2 = wellKnownSymbol$6('species'); 2885 2886 var setSpecies$3 = function (CONSTRUCTOR_NAME) { 2887 var Constructor = getBuiltIn$1(CONSTRUCTOR_NAME); 2888 var defineProperty = definePropertyModule.f; 2889 2890 if (DESCRIPTORS$6 && Constructor && !Constructor[SPECIES$2]) { 2891 defineProperty(Constructor, SPECIES$2, { 2892 configurable: true, 2893 get: function () { return this; } 2894 }); 2895 } 2896 }; 2897 2898 var DESCRIPTORS$5 = descriptors; 2899 var global$h = global$U; 2900 var uncurryThis$b = functionUncurryThis; 2901 var isForced$2 = isForced_1; 2902 var inheritIfRequired$1 = inheritIfRequired$3; 2903 var createNonEnumerableProperty$1 = createNonEnumerableProperty$8; 2904 var defineProperty$6 = objectDefineProperty.f; 2905 var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f; 2906 var isPrototypeOf$3 = objectIsPrototypeOf; 2907 var isRegExp = isRegexp; 2908 var toString$3 = toString$d; 2909 var regExpFlags$1 = regexpFlags$1; 2910 var stickyHelpers = regexpStickyHelpers; 2911 var redefine$4 = redefine$b.exports; 2912 var fails$c = fails$w; 2913 var hasOwn$2 = hasOwnProperty_1; 2914 var enforceInternalState = internalState.enforce; 2915 var setSpecies$2 = setSpecies$3; 2916 var wellKnownSymbol$5 = wellKnownSymbol$n; 2917 var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll; 2918 var UNSUPPORTED_NCG = regexpUnsupportedNcg; 2919 2920 var MATCH = wellKnownSymbol$5('match'); 2921 var NativeRegExp = global$h.RegExp; 2922 var RegExpPrototype$2 = NativeRegExp.prototype; 2923 var SyntaxError = global$h.SyntaxError; 2924 var getFlags$1 = uncurryThis$b(regExpFlags$1); 2925 var exec$1 = uncurryThis$b(RegExpPrototype$2.exec); 2926 var charAt$1 = uncurryThis$b(''.charAt); 2927 var replace$1 = uncurryThis$b(''.replace); 2928 var stringIndexOf$1 = uncurryThis$b(''.indexOf); 2929 var stringSlice$2 = uncurryThis$b(''.slice); 2930 // TODO: Use only propper RegExpIdentifierName 2931 var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/; 2932 var re1 = /a/g; 2933 var re2 = /a/g; 2934 2935 // "new" should create a new object, old webkit bug 2936 var CORRECT_NEW = new NativeRegExp(re1) !== re1; 2937 2938 var MISSED_STICKY$1 = stickyHelpers.MISSED_STICKY; 2939 var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y; 2940 2941 var BASE_FORCED = DESCRIPTORS$5 && 2942 (!CORRECT_NEW || MISSED_STICKY$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails$c(function () { 2943 re2[MATCH] = false; 2944 // RegExp constructor can alter flags and IsRegExp works correct with @@match 2945 return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i'; 2946 })); 2947 2948 var handleDotAll = function (string) { 2949 var length = string.length; 2950 var index = 0; 2951 var result = ''; 2952 var brackets = false; 2953 var chr; 2954 for (; index <= length; index++) { 2955 chr = charAt$1(string, index); 2956 if (chr === '\\') { 2957 result += chr + charAt$1(string, ++index); 2958 continue; 2959 } 2960 if (!brackets && chr === '.') { 2961 result += '[\\s\\S]'; 2962 } else { 2963 if (chr === '[') { 2964 brackets = true; 2965 } else if (chr === ']') { 2966 brackets = false; 2967 } result += chr; 2968 } 2969 } return result; 2970 }; 2971 2972 var handleNCG = function (string) { 2973 var length = string.length; 2974 var index = 0; 2975 var result = ''; 2976 var named = []; 2977 var names = {}; 2978 var brackets = false; 2979 var ncg = false; 2980 var groupid = 0; 2981 var groupname = ''; 2982 var chr; 2983 for (; index <= length; index++) { 2984 chr = charAt$1(string, index); 2985 if (chr === '\\') { 2986 chr = chr + charAt$1(string, ++index); 2987 } else if (chr === ']') { 2988 brackets = false; 2989 } else if (!brackets) switch (true) { 2990 case chr === '[': 2991 brackets = true; 2992 break; 2993 case chr === '(': 2994 if (exec$1(IS_NCG, stringSlice$2(string, index + 1))) { 2995 index += 2; 2996 ncg = true; 2997 } 2998 result += chr; 2999 groupid++; 3000 continue; 3001 case chr === '>' && ncg: 3002 if (groupname === '' || hasOwn$2(names, groupname)) { 3003 throw new SyntaxError('Invalid capture group name'); 3004 } 3005 names[groupname] = true; 3006 named[named.length] = [groupname, groupid]; 3007 ncg = false; 3008 groupname = ''; 3009 continue; 3010 } 3011 if (ncg) groupname += chr; 3012 else result += chr; 3013 } return [result, named]; 3014 }; 3015 3016 // `RegExp` constructor 3017 // https://tc39.es/ecma262/#sec-regexp-constructor 3018 if (isForced$2('RegExp', BASE_FORCED)) { 3019 var RegExpWrapper = function RegExp(pattern, flags) { 3020 var thisIsRegExp = isPrototypeOf$3(RegExpPrototype$2, this); 3021 var patternIsRegExp = isRegExp(pattern); 3022 var flagsAreUndefined = flags === undefined; 3023 var groups = []; 3024 var rawPattern = pattern; 3025 var rawFlags, dotAll, sticky, handled, result, state; 3026 3027 if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) { 3028 return pattern; 3029 } 3030 3031 if (patternIsRegExp || isPrototypeOf$3(RegExpPrototype$2, pattern)) { 3032 pattern = pattern.source; 3033 if (flagsAreUndefined) flags = 'flags' in rawPattern ? rawPattern.flags : getFlags$1(rawPattern); 3034 } 3035 3036 pattern = pattern === undefined ? '' : toString$3(pattern); 3037 flags = flags === undefined ? '' : toString$3(flags); 3038 rawPattern = pattern; 3039 3040 if (UNSUPPORTED_DOT_ALL && 'dotAll' in re1) { 3041 dotAll = !!flags && stringIndexOf$1(flags, 's') > -1; 3042 if (dotAll) flags = replace$1(flags, /s/g, ''); 3043 } 3044 3045 rawFlags = flags; 3046 3047 if (MISSED_STICKY$1 && 'sticky' in re1) { 3048 sticky = !!flags && stringIndexOf$1(flags, 'y') > -1; 3049 if (sticky && UNSUPPORTED_Y) flags = replace$1(flags, /y/g, ''); 3050 } 3051 3052 if (UNSUPPORTED_NCG) { 3053 handled = handleNCG(pattern); 3054 pattern = handled[0]; 3055 groups = handled[1]; 3056 } 3057 3058 result = inheritIfRequired$1(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype$2, RegExpWrapper); 3059 3060 if (dotAll || sticky || groups.length) { 3061 state = enforceInternalState(result); 3062 if (dotAll) { 3063 state.dotAll = true; 3064 state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags); 3065 } 3066 if (sticky) state.sticky = true; 3067 if (groups.length) state.groups = groups; 3068 } 3069 3070 if (pattern !== rawPattern) try { 3071 // fails in old engines, but we have no alternatives for unsupported regex syntax 3072 createNonEnumerableProperty$1(result, 'source', rawPattern === '' ? '(?:)' : rawPattern); 3073 } catch (error) { /* empty */ } 3074 3075 return result; 3076 }; 3077 3078 var proxy = function (key) { 3079 key in RegExpWrapper || defineProperty$6(RegExpWrapper, key, { 3080 configurable: true, 3081 get: function () { return NativeRegExp[key]; }, 3082 set: function (it) { NativeRegExp[key] = it; } 3083 }); 3084 }; 3085 3086 for (var keys = getOwnPropertyNames$1(NativeRegExp), index = 0; keys.length > index;) { 3087 proxy(keys[index++]); 3088 } 3089 3090 RegExpPrototype$2.constructor = RegExpWrapper; 3091 RegExpWrapper.prototype = RegExpPrototype$2; 3092 redefine$4(global$h, 'RegExp', RegExpWrapper); 3093 } 3094 3095 // https://tc39.es/ecma262/#sec-get-regexp-@@species 3096 setSpecies$2('RegExp'); 3097 3098 var global$g = global$U; 3099 var DESCRIPTORS$4 = descriptors; 3100 var MISSED_STICKY = regexpStickyHelpers.MISSED_STICKY; 3101 var classof$3 = classofRaw$1; 3102 var defineProperty$5 = objectDefineProperty.f; 3103 var getInternalState$2 = internalState.get; 3104 3105 var RegExpPrototype$1 = RegExp.prototype; 3106 var TypeError$6 = global$g.TypeError; 3107 3108 // `RegExp.prototype.sticky` getter 3109 // https://tc39.es/ecma262/#sec-get-regexp.prototype.sticky 3110 if (DESCRIPTORS$4 && MISSED_STICKY) { 3111 defineProperty$5(RegExpPrototype$1, 'sticky', { 3112 configurable: true, 3113 get: function () { 3114 if (this === RegExpPrototype$1) return undefined; 3115 // We can't use InternalStateModule.getterFor because 3116 // we don't add metadata for regexps created by a literal. 3117 if (classof$3(this) === 'RegExp') { 3118 return !!getInternalState$2(this).sticky; 3119 } 3120 throw TypeError$6('Incompatible receiver, RegExp required'); 3121 } 3122 }); 3123 } 3124 3125 var uncurryThis$a = functionUncurryThis; 3126 var PROPER_FUNCTION_NAME = functionName.PROPER; 3127 var redefine$3 = redefine$b.exports; 3128 var anObject$3 = anObject$h; 3129 var isPrototypeOf$2 = objectIsPrototypeOf; 3130 var $toString = toString$d; 3131 var fails$b = fails$w; 3132 var regExpFlags = regexpFlags$1; 3133 3134 var TO_STRING = 'toString'; 3135 var RegExpPrototype = RegExp.prototype; 3136 var n$ToString = RegExpPrototype[TO_STRING]; 3137 var getFlags = uncurryThis$a(regExpFlags); 3138 3139 var NOT_GENERIC = fails$b(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); 3140 // FF44- RegExp#toString has a wrong name 3141 var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING; 3142 3143 // `RegExp.prototype.toString` method 3144 // https://tc39.es/ecma262/#sec-regexp.prototype.tostring 3145 if (NOT_GENERIC || INCORRECT_NAME) { 3146 redefine$3(RegExp.prototype, TO_STRING, function toString() { 3147 var R = anObject$3(this); 3148 var p = $toString(R.source); 3149 var rf = R.flags; 3150 var f = $toString(rf === undefined && isPrototypeOf$2(RegExpPrototype, R) && !('flags' in RegExpPrototype) ? getFlags(R) : rf); 3151 return '/' + p + '/' + f; 3152 }, { unsafe: true }); 3153 } 3154 3155 /** 3156 * -------------------------------------------------------------------------- 3157 * Bootstrap (v5.1.3): util/index.js 3158 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 3159 * -------------------------------------------------------------------------- 3160 */ 3161 var MAX_UID = 1000000; 3162 var MILLISECONDS_MULTIPLIER = 1000; 3163 var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) 3164 3165 var toType = function toType(obj) { 3166 if (obj === null || obj === undefined) { 3167 return "" + obj; 3168 } 3169 3170 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); 3171 }; 3172 /** 3173 * -------------------------------------------------------------------------- 3174 * Public Util Api 3175 * -------------------------------------------------------------------------- 3176 */ 3177 3178 3179 var getUID = function getUID(prefix) { 3180 do { 3181 prefix += Math.floor(Math.random() * MAX_UID); 3182 } while (document.getElementById(prefix)); 3183 3184 return prefix; 3185 }; 3186 3187 var getSelector = function getSelector(element) { 3188 var selector = element.getAttribute('data-bs-target'); 3189 3190 if (!selector || selector === '#') { 3191 var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, 3192 // so everything starting with `#` or `.`. If a "real" URL is used as the selector, 3193 // `document.querySelector` will rightfully complain it is invalid. 3194 // See https://github.com/twbs/bootstrap/issues/32273 3195 3196 if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { 3197 return null; 3198 } // Just in case some CMS puts out a full URL with the anchor appended 3199 3200 3201 if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { 3202 hrefAttr = "#" + hrefAttr.split('#')[1]; 3203 } 3204 3205 selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; 3206 } 3207 3208 return selector; 3209 }; 3210 3211 var getSelectorFromElement = function getSelectorFromElement(element) { 3212 var selector = getSelector(element); 3213 3214 if (selector) { 3215 return document.querySelector(selector) ? selector : null; 3216 } 3217 3218 return null; 3219 }; 3220 3221 var getElementFromSelector = function getElementFromSelector(element) { 3222 var selector = getSelector(element); 3223 return selector ? document.querySelector(selector) : null; 3224 }; 3225 3226 var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) { 3227 if (!element) { 3228 return 0; 3229 } // Get transition-duration of the element 3230 3231 3232 var _window$getComputedSt = window.getComputedStyle(element), 3233 transitionDuration = _window$getComputedSt.transitionDuration, 3234 transitionDelay = _window$getComputedSt.transitionDelay; 3235 3236 var floatTransitionDuration = Number.parseFloat(transitionDuration); 3237 var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found 3238 3239 if (!floatTransitionDuration && !floatTransitionDelay) { 3240 return 0; 3241 } // If multiple durations are defined, take the first 3242 3243 3244 transitionDuration = transitionDuration.split(',')[0]; 3245 transitionDelay = transitionDelay.split(',')[0]; 3246 return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; 3247 }; 3248 3249 var triggerTransitionEnd = function triggerTransitionEnd(element) { 3250 element.dispatchEvent(new Event(TRANSITION_END)); 3251 }; 3252 3253 var isElement$1 = function isElement(obj) { 3254 if (!obj || typeof obj !== 'object') { 3255 return false; 3256 } 3257 3258 if (typeof obj.jquery !== 'undefined') { 3259 obj = obj[0]; 3260 } 3261 3262 return typeof obj.nodeType !== 'undefined'; 3263 }; 3264 3265 var getElement = function getElement(obj) { 3266 if (isElement$1(obj)) { 3267 // it's a jQuery object or a node element 3268 return obj.jquery ? obj[0] : obj; 3269 } 3270 3271 if (typeof obj === 'string' && obj.length > 0) { 3272 return document.querySelector(obj); 3273 } 3274 3275 return null; 3276 }; 3277 3278 var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) { 3279 Object.keys(configTypes).forEach(function (property) { 3280 var expectedTypes = configTypes[property]; 3281 var value = config[property]; 3282 var valueType = value && isElement$1(value) ? 'element' : toType(value); 3283 3284 if (!new RegExp(expectedTypes).test(valueType)) { 3285 throw new TypeError(componentName.toUpperCase() + ": Option \"" + property + "\" provided type \"" + valueType + "\" but expected type \"" + expectedTypes + "\"."); 3286 } 3287 }); 3288 }; 3289 3290 var isVisible = function isVisible(element) { 3291 if (!isElement$1(element) || element.getClientRects().length === 0) { 3292 return false; 3293 } 3294 3295 return getComputedStyle(element).getPropertyValue('visibility') === 'visible'; 3296 }; 3297 3298 var isDisabled = function isDisabled(element) { 3299 if (!element || element.nodeType !== Node.ELEMENT_NODE) { 3300 return true; 3301 } 3302 3303 if (element.classList.contains('disabled')) { 3304 return true; 3305 } 3306 3307 if (typeof element.disabled !== 'undefined') { 3308 return element.disabled; 3309 } 3310 3311 return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'; 3312 }; 3313 3314 var findShadowRoot = function findShadowRoot(element) { 3315 if (!document.documentElement.attachShadow) { 3316 return null; 3317 } // Can find the shadow root otherwise it'll return the document 3318 3319 3320 if (typeof element.getRootNode === 'function') { 3321 var root = element.getRootNode(); 3322 return root instanceof ShadowRoot ? root : null; 3323 } 3324 3325 if (element instanceof ShadowRoot) { 3326 return element; 3327 } // when we don't find a shadow root 3328 3329 3330 if (!element.parentNode) { 3331 return null; 3332 } 3333 3334 return findShadowRoot(element.parentNode); 3335 }; 3336 3337 var noop = function noop() {}; 3338 /** 3339 * Trick to restart an element's animation 3340 * 3341 * @param {HTMLElement} element 3342 * @return void 3343 * 3344 * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation 3345 */ 3346 3347 3348 var reflow = function reflow(element) { 3349 // eslint-disable-next-line no-unused-expressions 3350 element.offsetHeight; 3351 }; 3352 3353 var getjQuery = function getjQuery() { 3354 var _window = window, 3355 jQuery = _window.jQuery; 3356 3357 if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) { 3358 return jQuery; 3359 } 3360 3361 return null; 3362 }; 3363 3364 var DOMContentLoadedCallbacks = []; 3365 3366 var onDOMContentLoaded = function onDOMContentLoaded(callback) { 3367 if (document.readyState === 'loading') { 3368 // add listener on the first call when the document is in loading state 3369 if (!DOMContentLoadedCallbacks.length) { 3370 document.addEventListener('DOMContentLoaded', function () { 3371 DOMContentLoadedCallbacks.forEach(function (callback) { 3372 return callback(); 3373 }); 3374 }); 3375 } 3376 3377 DOMContentLoadedCallbacks.push(callback); 3378 } else { 3379 callback(); 3380 } 3381 }; 3382 3383 var isRTL = function isRTL() { 3384 return document.documentElement.dir === 'rtl'; 3385 }; 3386 3387 var defineJQueryPlugin = function defineJQueryPlugin(plugin) { 3388 onDOMContentLoaded(function () { 3389 var $ = getjQuery(); 3390 /* istanbul ignore if */ 3391 3392 if ($) { 3393 var name = plugin.NAME; 3394 var JQUERY_NO_CONFLICT = $.fn[name]; 3395 $.fn[name] = plugin.jQueryInterface; 3396 $.fn[name].Constructor = plugin; 3397 3398 $.fn[name].noConflict = function () { 3399 $.fn[name] = JQUERY_NO_CONFLICT; 3400 return plugin.jQueryInterface; 3401 }; 3402 } 3403 }); 3404 }; 3405 3406 var execute = function execute(callback) { 3407 if (typeof callback === 'function') { 3408 callback(); 3409 } 3410 }; 3411 3412 var executeAfterTransition = function executeAfterTransition(callback, transitionElement, waitForTransition) { 3413 if (waitForTransition === void 0) { 3414 waitForTransition = true; 3415 } 3416 3417 if (!waitForTransition) { 3418 execute(callback); 3419 return; 3420 } 3421 3422 var durationPadding = 5; 3423 var emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding; 3424 var called = false; 3425 3426 var handler = function handler(_ref) { 3427 var target = _ref.target; 3428 3429 if (target !== transitionElement) { 3430 return; 3431 } 3432 3433 called = true; 3434 transitionElement.removeEventListener(TRANSITION_END, handler); 3435 execute(callback); 3436 }; 3437 3438 transitionElement.addEventListener(TRANSITION_END, handler); 3439 setTimeout(function () { 3440 if (!called) { 3441 triggerTransitionEnd(transitionElement); 3442 } 3443 }, emulatedDuration); 3444 }; 3445 /** 3446 * Return the previous/next element of a list. 3447 * 3448 * @param {array} list The list of elements 3449 * @param activeElement The active element 3450 * @param shouldGetNext Choose to get next or previous element 3451 * @param isCycleAllowed 3452 * @return {Element|elem} The proper element 3453 */ 3454 3455 3456 var getNextActiveElement = function getNextActiveElement(list, activeElement, shouldGetNext, isCycleAllowed) { 3457 var index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed 3458 3459 if (index === -1) { 3460 return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0]; 3461 } 3462 3463 var listLength = list.length; 3464 index += shouldGetNext ? 1 : -1; 3465 3466 if (isCycleAllowed) { 3467 index = (index + listLength) % listLength; 3468 } 3469 3470 return list[Math.max(0, Math.min(index, listLength - 1))]; 3471 }; 3472 3473 var toIndexedObject$3 = toIndexedObject$8; 3474 var addToUnscopables$1 = addToUnscopables$3; 3475 var Iterators = iterators; 3476 var InternalStateModule$2 = internalState; 3477 var defineProperty$4 = objectDefineProperty.f; 3478 var defineIterator$1 = defineIterator$3; 3479 var DESCRIPTORS$3 = descriptors; 3480 3481 var ARRAY_ITERATOR = 'Array Iterator'; 3482 var setInternalState$2 = InternalStateModule$2.set; 3483 var getInternalState$1 = InternalStateModule$2.getterFor(ARRAY_ITERATOR); 3484 3485 // `Array.prototype.entries` method 3486 // https://tc39.es/ecma262/#sec-array.prototype.entries 3487 // `Array.prototype.keys` method 3488 // https://tc39.es/ecma262/#sec-array.prototype.keys 3489 // `Array.prototype.values` method 3490 // https://tc39.es/ecma262/#sec-array.prototype.values 3491 // `Array.prototype[@@iterator]` method 3492 // https://tc39.es/ecma262/#sec-array.prototype-@@iterator 3493 // `CreateArrayIterator` internal method 3494 // https://tc39.es/ecma262/#sec-createarrayiterator 3495 var es_array_iterator = defineIterator$1(Array, 'Array', function (iterated, kind) { 3496 setInternalState$2(this, { 3497 type: ARRAY_ITERATOR, 3498 target: toIndexedObject$3(iterated), // target 3499 index: 0, // next index 3500 kind: kind // kind 3501 }); 3502 // `%ArrayIteratorPrototype%.next` method 3503 // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next 3504 }, function () { 3505 var state = getInternalState$1(this); 3506 var target = state.target; 3507 var kind = state.kind; 3508 var index = state.index++; 3509 if (!target || index >= target.length) { 3510 state.target = undefined; 3511 return { value: undefined, done: true }; 3512 } 3513 if (kind == 'keys') return { value: index, done: false }; 3514 if (kind == 'values') return { value: target[index], done: false }; 3515 return { value: [index, target[index]], done: false }; 3516 }, 'values'); 3517 3518 // argumentsList[@@iterator] is %ArrayProto_values% 3519 // https://tc39.es/ecma262/#sec-createunmappedargumentsobject 3520 // https://tc39.es/ecma262/#sec-createmappedargumentsobject 3521 var values = Iterators.Arguments = Iterators.Array; 3522 3523 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables 3524 addToUnscopables$1('keys'); 3525 addToUnscopables$1('values'); 3526 addToUnscopables$1('entries'); 3527 3528 // V8 ~ Chrome 45- bug 3529 if (DESCRIPTORS$3 && values.name !== 'values') try { 3530 defineProperty$4(values, 'name', { value: 'values' }); 3531 } catch (error) { /* empty */ } 3532 3533 var internalMetadata = {exports: {}}; 3534 3535 var objectGetOwnPropertyNamesExternal = {}; 3536 3537 /* eslint-disable es/no-object-getownpropertynames -- safe */ 3538 3539 var classof$2 = classofRaw$1; 3540 var toIndexedObject$2 = toIndexedObject$8; 3541 var $getOwnPropertyNames = objectGetOwnPropertyNames.f; 3542 var arraySlice$3 = arraySliceSimple; 3543 3544 var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames 3545 ? Object.getOwnPropertyNames(window) : []; 3546 3547 var getWindowNames = function (it) { 3548 try { 3549 return $getOwnPropertyNames(it); 3550 } catch (error) { 3551 return arraySlice$3(windowNames); 3552 } 3553 }; 3554 3555 // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window 3556 objectGetOwnPropertyNamesExternal.f = function getOwnPropertyNames(it) { 3557 return windowNames && classof$2(it) == 'Window' 3558 ? getWindowNames(it) 3559 : $getOwnPropertyNames(toIndexedObject$2(it)); 3560 }; 3561 3562 // FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it 3563 var fails$a = fails$w; 3564 3565 var arrayBufferNonExtensible = fails$a(function () { 3566 if (typeof ArrayBuffer == 'function') { 3567 var buffer = new ArrayBuffer(8); 3568 // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe 3569 if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 }); 3570 } 3571 }); 3572 3573 var fails$9 = fails$w; 3574 var isObject$6 = isObject$g; 3575 var classof$1 = classofRaw$1; 3576 var ARRAY_BUFFER_NON_EXTENSIBLE = arrayBufferNonExtensible; 3577 3578 // eslint-disable-next-line es/no-object-isextensible -- safe 3579 var $isExtensible = Object.isExtensible; 3580 var FAILS_ON_PRIMITIVES$1 = fails$9(function () { $isExtensible(1); }); 3581 3582 // `Object.isExtensible` method 3583 // https://tc39.es/ecma262/#sec-object.isextensible 3584 var objectIsExtensible = (FAILS_ON_PRIMITIVES$1 || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) { 3585 if (!isObject$6(it)) return false; 3586 if (ARRAY_BUFFER_NON_EXTENSIBLE && classof$1(it) == 'ArrayBuffer') return false; 3587 return $isExtensible ? $isExtensible(it) : true; 3588 } : $isExtensible; 3589 3590 var fails$8 = fails$w; 3591 3592 var freezing = !fails$8(function () { 3593 // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing 3594 return Object.isExtensible(Object.preventExtensions({})); 3595 }); 3596 3597 var $$c = _export; 3598 var uncurryThis$9 = functionUncurryThis; 3599 var hiddenKeys = hiddenKeys$5; 3600 var isObject$5 = isObject$g; 3601 var hasOwn$1 = hasOwnProperty_1; 3602 var defineProperty$3 = objectDefineProperty.f; 3603 var getOwnPropertyNamesModule = objectGetOwnPropertyNames; 3604 var getOwnPropertyNamesExternalModule = objectGetOwnPropertyNamesExternal; 3605 var isExtensible = objectIsExtensible; 3606 var uid = uid$3; 3607 var FREEZING = freezing; 3608 3609 var REQUIRED = false; 3610 var METADATA = uid('meta'); 3611 var id = 0; 3612 3613 var setMetadata = function (it) { 3614 defineProperty$3(it, METADATA, { value: { 3615 objectID: 'O' + id++, // object ID 3616 weakData: {} // weak collections IDs 3617 } }); 3618 }; 3619 3620 var fastKey$1 = function (it, create) { 3621 // return a primitive with prefix 3622 if (!isObject$5(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; 3623 if (!hasOwn$1(it, METADATA)) { 3624 // can't set metadata to uncaught frozen object 3625 if (!isExtensible(it)) return 'F'; 3626 // not necessary to add metadata 3627 if (!create) return 'E'; 3628 // add missing metadata 3629 setMetadata(it); 3630 // return object ID 3631 } return it[METADATA].objectID; 3632 }; 3633 3634 var getWeakData = function (it, create) { 3635 if (!hasOwn$1(it, METADATA)) { 3636 // can't set metadata to uncaught frozen object 3637 if (!isExtensible(it)) return true; 3638 // not necessary to add metadata 3639 if (!create) return false; 3640 // add missing metadata 3641 setMetadata(it); 3642 // return the store of weak collections IDs 3643 } return it[METADATA].weakData; 3644 }; 3645 3646 // add metadata on freeze-family methods calling 3647 var onFreeze = function (it) { 3648 if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn$1(it, METADATA)) setMetadata(it); 3649 return it; 3650 }; 3651 3652 var enable = function () { 3653 meta.enable = function () { /* empty */ }; 3654 REQUIRED = true; 3655 var getOwnPropertyNames = getOwnPropertyNamesModule.f; 3656 var splice = uncurryThis$9([].splice); 3657 var test = {}; 3658 test[METADATA] = 1; 3659 3660 // prevent exposing of metadata key 3661 if (getOwnPropertyNames(test).length) { 3662 getOwnPropertyNamesModule.f = function (it) { 3663 var result = getOwnPropertyNames(it); 3664 for (var i = 0, length = result.length; i < length; i++) { 3665 if (result[i] === METADATA) { 3666 splice(result, i, 1); 3667 break; 3668 } 3669 } return result; 3670 }; 3671 3672 $$c({ target: 'Object', stat: true, forced: true }, { 3673 getOwnPropertyNames: getOwnPropertyNamesExternalModule.f 3674 }); 3675 } 3676 }; 3677 3678 var meta = internalMetadata.exports = { 3679 enable: enable, 3680 fastKey: fastKey$1, 3681 getWeakData: getWeakData, 3682 onFreeze: onFreeze 3683 }; 3684 3685 hiddenKeys[METADATA] = true; 3686 3687 var global$f = global$U; 3688 var bind$4 = functionBindContext; 3689 var call$3 = functionCall; 3690 var anObject$2 = anObject$h; 3691 var tryToString = tryToString$4; 3692 var isArrayIteratorMethod = isArrayIteratorMethod$2; 3693 var lengthOfArrayLike$4 = lengthOfArrayLike$9; 3694 var isPrototypeOf$1 = objectIsPrototypeOf; 3695 var getIterator = getIterator$2; 3696 var getIteratorMethod = getIteratorMethod$3; 3697 var iteratorClose = iteratorClose$2; 3698 3699 var TypeError$5 = global$f.TypeError; 3700 3701 var Result = function (stopped, result) { 3702 this.stopped = stopped; 3703 this.result = result; 3704 }; 3705 3706 var ResultPrototype = Result.prototype; 3707 3708 var iterate$3 = function (iterable, unboundFunction, options) { 3709 var that = options && options.that; 3710 var AS_ENTRIES = !!(options && options.AS_ENTRIES); 3711 var IS_ITERATOR = !!(options && options.IS_ITERATOR); 3712 var INTERRUPTED = !!(options && options.INTERRUPTED); 3713 var fn = bind$4(unboundFunction, that); 3714 var iterator, iterFn, index, length, result, next, step; 3715 3716 var stop = function (condition) { 3717 if (iterator) iteratorClose(iterator, 'normal', condition); 3718 return new Result(true, condition); 3719 }; 3720 3721 var callFn = function (value) { 3722 if (AS_ENTRIES) { 3723 anObject$2(value); 3724 return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); 3725 } return INTERRUPTED ? fn(value, stop) : fn(value); 3726 }; 3727 3728 if (IS_ITERATOR) { 3729 iterator = iterable; 3730 } else { 3731 iterFn = getIteratorMethod(iterable); 3732 if (!iterFn) throw TypeError$5(tryToString(iterable) + ' is not iterable'); 3733 // optimisation for array iterators 3734 if (isArrayIteratorMethod(iterFn)) { 3735 for (index = 0, length = lengthOfArrayLike$4(iterable); length > index; index++) { 3736 result = callFn(iterable[index]); 3737 if (result && isPrototypeOf$1(ResultPrototype, result)) return result; 3738 } return new Result(false); 3739 } 3740 iterator = getIterator(iterable, iterFn); 3741 } 3742 3743 next = iterator.next; 3744 while (!(step = call$3(next, iterator)).done) { 3745 try { 3746 result = callFn(step.value); 3747 } catch (error) { 3748 iteratorClose(iterator, 'throw', error); 3749 } 3750 if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result; 3751 } return new Result(false); 3752 }; 3753 3754 var global$e = global$U; 3755 var isPrototypeOf = objectIsPrototypeOf; 3756 3757 var TypeError$4 = global$e.TypeError; 3758 3759 var anInstance$3 = function (it, Prototype) { 3760 if (isPrototypeOf(Prototype, it)) return it; 3761 throw TypeError$4('Incorrect invocation'); 3762 }; 3763 3764 var $$b = _export; 3765 var global$d = global$U; 3766 var uncurryThis$8 = functionUncurryThis; 3767 var isForced$1 = isForced_1; 3768 var redefine$2 = redefine$b.exports; 3769 var InternalMetadataModule = internalMetadata.exports; 3770 var iterate$2 = iterate$3; 3771 var anInstance$2 = anInstance$3; 3772 var isCallable$3 = isCallable$m; 3773 var isObject$4 = isObject$g; 3774 var fails$7 = fails$w; 3775 var checkCorrectnessOfIteration$1 = checkCorrectnessOfIteration$3; 3776 var setToStringTag$1 = setToStringTag$4; 3777 var inheritIfRequired = inheritIfRequired$3; 3778 3779 var collection$2 = function (CONSTRUCTOR_NAME, wrapper, common) { 3780 var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; 3781 var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; 3782 var ADDER = IS_MAP ? 'set' : 'add'; 3783 var NativeConstructor = global$d[CONSTRUCTOR_NAME]; 3784 var NativePrototype = NativeConstructor && NativeConstructor.prototype; 3785 var Constructor = NativeConstructor; 3786 var exported = {}; 3787 3788 var fixMethod = function (KEY) { 3789 var uncurriedNativeMethod = uncurryThis$8(NativePrototype[KEY]); 3790 redefine$2(NativePrototype, KEY, 3791 KEY == 'add' ? function add(value) { 3792 uncurriedNativeMethod(this, value === 0 ? 0 : value); 3793 return this; 3794 } : KEY == 'delete' ? function (key) { 3795 return IS_WEAK && !isObject$4(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); 3796 } : KEY == 'get' ? function get(key) { 3797 return IS_WEAK && !isObject$4(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key); 3798 } : KEY == 'has' ? function has(key) { 3799 return IS_WEAK && !isObject$4(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); 3800 } : function set(key, value) { 3801 uncurriedNativeMethod(this, key === 0 ? 0 : key, value); 3802 return this; 3803 } 3804 ); 3805 }; 3806 3807 var REPLACE = isForced$1( 3808 CONSTRUCTOR_NAME, 3809 !isCallable$3(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails$7(function () { 3810 new NativeConstructor().entries().next(); 3811 })) 3812 ); 3813 3814 if (REPLACE) { 3815 // create collection constructor 3816 Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER); 3817 InternalMetadataModule.enable(); 3818 } else if (isForced$1(CONSTRUCTOR_NAME, true)) { 3819 var instance = new Constructor(); 3820 // early implementations not supports chaining 3821 var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; 3822 // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false 3823 var THROWS_ON_PRIMITIVES = fails$7(function () { instance.has(1); }); 3824 // most early implementations doesn't supports iterables, most modern - not close it correctly 3825 // eslint-disable-next-line no-new -- required for testing 3826 var ACCEPT_ITERABLES = checkCorrectnessOfIteration$1(function (iterable) { new NativeConstructor(iterable); }); 3827 // for early implementations -0 and +0 not the same 3828 var BUGGY_ZERO = !IS_WEAK && fails$7(function () { 3829 // V8 ~ Chromium 42- fails only with 5+ elements 3830 var $instance = new NativeConstructor(); 3831 var index = 5; 3832 while (index--) $instance[ADDER](index, index); 3833 return !$instance.has(-0); 3834 }); 3835 3836 if (!ACCEPT_ITERABLES) { 3837 Constructor = wrapper(function (dummy, iterable) { 3838 anInstance$2(dummy, NativePrototype); 3839 var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor); 3840 if (iterable != undefined) iterate$2(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); 3841 return that; 3842 }); 3843 Constructor.prototype = NativePrototype; 3844 NativePrototype.constructor = Constructor; 3845 } 3846 3847 if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { 3848 fixMethod('delete'); 3849 fixMethod('has'); 3850 IS_MAP && fixMethod('get'); 3851 } 3852 3853 if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); 3854 3855 // weak collections should not contains .clear method 3856 if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear; 3857 } 3858 3859 exported[CONSTRUCTOR_NAME] = Constructor; 3860 $$b({ global: true, forced: Constructor != NativeConstructor }, exported); 3861 3862 setToStringTag$1(Constructor, CONSTRUCTOR_NAME); 3863 3864 if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP); 3865 3866 return Constructor; 3867 }; 3868 3869 var redefine$1 = redefine$b.exports; 3870 3871 var redefineAll$2 = function (target, src, options) { 3872 for (var key in src) redefine$1(target, key, src[key], options); 3873 return target; 3874 }; 3875 3876 var defineProperty$2 = objectDefineProperty.f; 3877 var create = objectCreate; 3878 var redefineAll$1 = redefineAll$2; 3879 var bind$3 = functionBindContext; 3880 var anInstance$1 = anInstance$3; 3881 var iterate$1 = iterate$3; 3882 var defineIterator = defineIterator$3; 3883 var setSpecies$1 = setSpecies$3; 3884 var DESCRIPTORS$2 = descriptors; 3885 var fastKey = internalMetadata.exports.fastKey; 3886 var InternalStateModule$1 = internalState; 3887 3888 var setInternalState$1 = InternalStateModule$1.set; 3889 var internalStateGetterFor = InternalStateModule$1.getterFor; 3890 3891 var collectionStrong$2 = { 3892 getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { 3893 var Constructor = wrapper(function (that, iterable) { 3894 anInstance$1(that, Prototype); 3895 setInternalState$1(that, { 3896 type: CONSTRUCTOR_NAME, 3897 index: create(null), 3898 first: undefined, 3899 last: undefined, 3900 size: 0 3901 }); 3902 if (!DESCRIPTORS$2) that.size = 0; 3903 if (iterable != undefined) iterate$1(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); 3904 }); 3905 3906 var Prototype = Constructor.prototype; 3907 3908 var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); 3909 3910 var define = function (that, key, value) { 3911 var state = getInternalState(that); 3912 var entry = getEntry(that, key); 3913 var previous, index; 3914 // change existing entry 3915 if (entry) { 3916 entry.value = value; 3917 // create new entry 3918 } else { 3919 state.last = entry = { 3920 index: index = fastKey(key, true), 3921 key: key, 3922 value: value, 3923 previous: previous = state.last, 3924 next: undefined, 3925 removed: false 3926 }; 3927 if (!state.first) state.first = entry; 3928 if (previous) previous.next = entry; 3929 if (DESCRIPTORS$2) state.size++; 3930 else that.size++; 3931 // add to index 3932 if (index !== 'F') state.index[index] = entry; 3933 } return that; 3934 }; 3935 3936 var getEntry = function (that, key) { 3937 var state = getInternalState(that); 3938 // fast case 3939 var index = fastKey(key); 3940 var entry; 3941 if (index !== 'F') return state.index[index]; 3942 // frozen object case 3943 for (entry = state.first; entry; entry = entry.next) { 3944 if (entry.key == key) return entry; 3945 } 3946 }; 3947 3948 redefineAll$1(Prototype, { 3949 // `{ Map, Set }.prototype.clear()` methods 3950 // https://tc39.es/ecma262/#sec-map.prototype.clear 3951 // https://tc39.es/ecma262/#sec-set.prototype.clear 3952 clear: function clear() { 3953 var that = this; 3954 var state = getInternalState(that); 3955 var data = state.index; 3956 var entry = state.first; 3957 while (entry) { 3958 entry.removed = true; 3959 if (entry.previous) entry.previous = entry.previous.next = undefined; 3960 delete data[entry.index]; 3961 entry = entry.next; 3962 } 3963 state.first = state.last = undefined; 3964 if (DESCRIPTORS$2) state.size = 0; 3965 else that.size = 0; 3966 }, 3967 // `{ Map, Set }.prototype.delete(key)` methods 3968 // https://tc39.es/ecma262/#sec-map.prototype.delete 3969 // https://tc39.es/ecma262/#sec-set.prototype.delete 3970 'delete': function (key) { 3971 var that = this; 3972 var state = getInternalState(that); 3973 var entry = getEntry(that, key); 3974 if (entry) { 3975 var next = entry.next; 3976 var prev = entry.previous; 3977 delete state.index[entry.index]; 3978 entry.removed = true; 3979 if (prev) prev.next = next; 3980 if (next) next.previous = prev; 3981 if (state.first == entry) state.first = next; 3982 if (state.last == entry) state.last = prev; 3983 if (DESCRIPTORS$2) state.size--; 3984 else that.size--; 3985 } return !!entry; 3986 }, 3987 // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods 3988 // https://tc39.es/ecma262/#sec-map.prototype.foreach 3989 // https://tc39.es/ecma262/#sec-set.prototype.foreach 3990 forEach: function forEach(callbackfn /* , that = undefined */) { 3991 var state = getInternalState(this); 3992 var boundFunction = bind$3(callbackfn, arguments.length > 1 ? arguments[1] : undefined); 3993 var entry; 3994 while (entry = entry ? entry.next : state.first) { 3995 boundFunction(entry.value, entry.key, this); 3996 // revert to the last existing entry 3997 while (entry && entry.removed) entry = entry.previous; 3998 } 3999 }, 4000 // `{ Map, Set}.prototype.has(key)` methods 4001 // https://tc39.es/ecma262/#sec-map.prototype.has 4002 // https://tc39.es/ecma262/#sec-set.prototype.has 4003 has: function has(key) { 4004 return !!getEntry(this, key); 4005 } 4006 }); 4007 4008 redefineAll$1(Prototype, IS_MAP ? { 4009 // `Map.prototype.get(key)` method 4010 // https://tc39.es/ecma262/#sec-map.prototype.get 4011 get: function get(key) { 4012 var entry = getEntry(this, key); 4013 return entry && entry.value; 4014 }, 4015 // `Map.prototype.set(key, value)` method 4016 // https://tc39.es/ecma262/#sec-map.prototype.set 4017 set: function set(key, value) { 4018 return define(this, key === 0 ? 0 : key, value); 4019 } 4020 } : { 4021 // `Set.prototype.add(value)` method 4022 // https://tc39.es/ecma262/#sec-set.prototype.add 4023 add: function add(value) { 4024 return define(this, value = value === 0 ? 0 : value, value); 4025 } 4026 }); 4027 if (DESCRIPTORS$2) defineProperty$2(Prototype, 'size', { 4028 get: function () { 4029 return getInternalState(this).size; 4030 } 4031 }); 4032 return Constructor; 4033 }, 4034 setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) { 4035 var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator'; 4036 var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME); 4037 var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); 4038 // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods 4039 // https://tc39.es/ecma262/#sec-map.prototype.entries 4040 // https://tc39.es/ecma262/#sec-map.prototype.keys 4041 // https://tc39.es/ecma262/#sec-map.prototype.values 4042 // https://tc39.es/ecma262/#sec-map.prototype-@@iterator 4043 // https://tc39.es/ecma262/#sec-set.prototype.entries 4044 // https://tc39.es/ecma262/#sec-set.prototype.keys 4045 // https://tc39.es/ecma262/#sec-set.prototype.values 4046 // https://tc39.es/ecma262/#sec-set.prototype-@@iterator 4047 defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) { 4048 setInternalState$1(this, { 4049 type: ITERATOR_NAME, 4050 target: iterated, 4051 state: getInternalCollectionState(iterated), 4052 kind: kind, 4053 last: undefined 4054 }); 4055 }, function () { 4056 var state = getInternalIteratorState(this); 4057 var kind = state.kind; 4058 var entry = state.last; 4059 // revert to the last existing entry 4060 while (entry && entry.removed) entry = entry.previous; 4061 // get next entry 4062 if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) { 4063 // or finish the iteration 4064 state.target = undefined; 4065 return { value: undefined, done: true }; 4066 } 4067 // return step by kind 4068 if (kind == 'keys') return { value: entry.key, done: false }; 4069 if (kind == 'values') return { value: entry.value, done: false }; 4070 return { value: [entry.key, entry.value], done: false }; 4071 }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); 4072 4073 // `{ Map, Set }.prototype[@@species]` accessors 4074 // https://tc39.es/ecma262/#sec-get-map-@@species 4075 // https://tc39.es/ecma262/#sec-get-set-@@species 4076 setSpecies$1(CONSTRUCTOR_NAME); 4077 } 4078 }; 4079 4080 var collection$1 = collection$2; 4081 var collectionStrong$1 = collectionStrong$2; 4082 4083 // `Set` constructor 4084 // https://tc39.es/ecma262/#sec-set-objects 4085 collection$1('Set', function (init) { 4086 return function Set() { return init(this, arguments.length ? arguments[0] : undefined); }; 4087 }, collectionStrong$1); 4088 4089 var global$c = global$U; 4090 var DOMIterables = domIterables; 4091 var DOMTokenListPrototype = domTokenListPrototype; 4092 var ArrayIteratorMethods = es_array_iterator; 4093 var createNonEnumerableProperty = createNonEnumerableProperty$8; 4094 var wellKnownSymbol$4 = wellKnownSymbol$n; 4095 4096 var ITERATOR$1 = wellKnownSymbol$4('iterator'); 4097 var TO_STRING_TAG = wellKnownSymbol$4('toStringTag'); 4098 var ArrayValues = ArrayIteratorMethods.values; 4099 4100 var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) { 4101 if (CollectionPrototype) { 4102 // some Chrome versions have non-configurable methods on DOMTokenList 4103 if (CollectionPrototype[ITERATOR$1] !== ArrayValues) try { 4104 createNonEnumerableProperty(CollectionPrototype, ITERATOR$1, ArrayValues); 4105 } catch (error) { 4106 CollectionPrototype[ITERATOR$1] = ArrayValues; 4107 } 4108 if (!CollectionPrototype[TO_STRING_TAG]) { 4109 createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); 4110 } 4111 if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { 4112 // some Chrome versions have non-configurable methods on DOMTokenList 4113 if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { 4114 createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); 4115 } catch (error) { 4116 CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; 4117 } 4118 } 4119 } 4120 }; 4121 4122 for (var COLLECTION_NAME in DOMIterables) { 4123 handlePrototype(global$c[COLLECTION_NAME] && global$c[COLLECTION_NAME].prototype, COLLECTION_NAME); 4124 } 4125 4126 handlePrototype(DOMTokenListPrototype, 'DOMTokenList'); 4127 4128 var uncurryThis$7 = functionUncurryThis; 4129 var toObject$4 = toObject$a; 4130 4131 var floor$1 = Math.floor; 4132 var charAt = uncurryThis$7(''.charAt); 4133 var replace = uncurryThis$7(''.replace); 4134 var stringSlice$1 = uncurryThis$7(''.slice); 4135 var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; 4136 var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; 4137 4138 // `GetSubstitution` abstract operation 4139 // https://tc39.es/ecma262/#sec-getsubstitution 4140 var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) { 4141 var tailPos = position + matched.length; 4142 var m = captures.length; 4143 var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; 4144 if (namedCaptures !== undefined) { 4145 namedCaptures = toObject$4(namedCaptures); 4146 symbols = SUBSTITUTION_SYMBOLS; 4147 } 4148 return replace(replacement, symbols, function (match, ch) { 4149 var capture; 4150 switch (charAt(ch, 0)) { 4151 case '$': return '$'; 4152 case '&': return matched; 4153 case '`': return stringSlice$1(str, 0, position); 4154 case "'": return stringSlice$1(str, tailPos); 4155 case '<': 4156 capture = namedCaptures[stringSlice$1(ch, 1, -1)]; 4157 break; 4158 default: // \d\d? 4159 var n = +ch; 4160 if (n === 0) return match; 4161 if (n > m) { 4162 var f = floor$1(n / 10); 4163 if (f === 0) return match; 4164 if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1); 4165 return match; 4166 } 4167 capture = captures[n - 1]; 4168 } 4169 return capture === undefined ? '' : capture; 4170 }); 4171 }; 4172 4173 var apply$1 = functionApply; 4174 var call$2 = functionCall; 4175 var uncurryThis$6 = functionUncurryThis; 4176 var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic; 4177 var fails$6 = fails$w; 4178 var anObject$1 = anObject$h; 4179 var isCallable$2 = isCallable$m; 4180 var toIntegerOrInfinity = toIntegerOrInfinity$4; 4181 var toLength = toLength$5; 4182 var toString$2 = toString$d; 4183 var requireObjectCoercible = requireObjectCoercible$9; 4184 var advanceStringIndex = advanceStringIndex$3; 4185 var getMethod = getMethod$6; 4186 var getSubstitution = getSubstitution$1; 4187 var regExpExec$1 = regexpExecAbstract; 4188 var wellKnownSymbol$3 = wellKnownSymbol$n; 4189 4190 var REPLACE = wellKnownSymbol$3('replace'); 4191 var max$2 = Math.max; 4192 var min$1 = Math.min; 4193 var concat$1 = uncurryThis$6([].concat); 4194 var push$1 = uncurryThis$6([].push); 4195 var stringIndexOf = uncurryThis$6(''.indexOf); 4196 var stringSlice = uncurryThis$6(''.slice); 4197 4198 var maybeToString = function (it) { 4199 return it === undefined ? it : String(it); 4200 }; 4201 4202 // IE <= 11 replaces $0 with the whole match, as if it was $& 4203 // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 4204 var REPLACE_KEEPS_$0 = (function () { 4205 // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing 4206 return 'a'.replace(/./, '$0') === '$0'; 4207 })(); 4208 4209 // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string 4210 var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { 4211 if (/./[REPLACE]) { 4212 return /./[REPLACE]('a', '$0') === ''; 4213 } 4214 return false; 4215 })(); 4216 4217 var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$6(function () { 4218 var re = /./; 4219 re.exec = function () { 4220 var result = []; 4221 result.groups = { a: '7' }; 4222 return result; 4223 }; 4224 // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive 4225 return ''.replace(re, '$<a>') !== '7'; 4226 }); 4227 4228 // @@replace logic 4229 fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) { 4230 var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; 4231 4232 return [ 4233 // `String.prototype.replace` method 4234 // https://tc39.es/ecma262/#sec-string.prototype.replace 4235 function replace(searchValue, replaceValue) { 4236 var O = requireObjectCoercible(this); 4237 var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE); 4238 return replacer 4239 ? call$2(replacer, searchValue, O, replaceValue) 4240 : call$2(nativeReplace, toString$2(O), searchValue, replaceValue); 4241 }, 4242 // `RegExp.prototype[@@replace]` method 4243 // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace 4244 function (string, replaceValue) { 4245 var rx = anObject$1(this); 4246 var S = toString$2(string); 4247 4248 if ( 4249 typeof replaceValue == 'string' && 4250 stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 && 4251 stringIndexOf(replaceValue, '$<') === -1 4252 ) { 4253 var res = maybeCallNative(nativeReplace, rx, S, replaceValue); 4254 if (res.done) return res.value; 4255 } 4256 4257 var functionalReplace = isCallable$2(replaceValue); 4258 if (!functionalReplace) replaceValue = toString$2(replaceValue); 4259 4260 var global = rx.global; 4261 if (global) { 4262 var fullUnicode = rx.unicode; 4263 rx.lastIndex = 0; 4264 } 4265 var results = []; 4266 while (true) { 4267 var result = regExpExec$1(rx, S); 4268 if (result === null) break; 4269 4270 push$1(results, result); 4271 if (!global) break; 4272 4273 var matchStr = toString$2(result[0]); 4274 if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); 4275 } 4276 4277 var accumulatedResult = ''; 4278 var nextSourcePosition = 0; 4279 for (var i = 0; i < results.length; i++) { 4280 result = results[i]; 4281 4282 var matched = toString$2(result[0]); 4283 var position = max$2(min$1(toIntegerOrInfinity(result.index), S.length), 0); 4284 var captures = []; 4285 // NOTE: This is equivalent to 4286 // captures = result.slice(1).map(maybeToString) 4287 // but for some reason `nativeSlice.call(result, 1, result.length)` (called in 4288 // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and 4289 // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. 4290 for (var j = 1; j < result.length; j++) push$1(captures, maybeToString(result[j])); 4291 var namedCaptures = result.groups; 4292 if (functionalReplace) { 4293 var replacerArgs = concat$1([matched], captures, position, S); 4294 if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures); 4295 var replacement = toString$2(apply$1(replaceValue, undefined, replacerArgs)); 4296 } else { 4297 replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); 4298 } 4299 if (position >= nextSourcePosition) { 4300 accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement; 4301 nextSourcePosition = position + matched.length; 4302 } 4303 } 4304 return accumulatedResult + stringSlice(S, nextSourcePosition); 4305 } 4306 ]; 4307 }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE); 4308 4309 var uncurryThis$5 = functionUncurryThis; 4310 4311 var arraySlice$2 = uncurryThis$5([].slice); 4312 4313 var $$a = _export; 4314 var global$b = global$U; 4315 var isArray$1 = isArray$3; 4316 var isConstructor = isConstructor$4; 4317 var isObject$3 = isObject$g; 4318 var toAbsoluteIndex = toAbsoluteIndex$3; 4319 var lengthOfArrayLike$3 = lengthOfArrayLike$9; 4320 var toIndexedObject$1 = toIndexedObject$8; 4321 var createProperty$1 = createProperty$4; 4322 var wellKnownSymbol$2 = wellKnownSymbol$n; 4323 var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$4; 4324 var un$Slice = arraySlice$2; 4325 4326 var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$2('slice'); 4327 4328 var SPECIES$1 = wellKnownSymbol$2('species'); 4329 var Array$1 = global$b.Array; 4330 var max$1 = Math.max; 4331 4332 // `Array.prototype.slice` method 4333 // https://tc39.es/ecma262/#sec-array.prototype.slice 4334 // fallback for not array-like ES3 strings and DOM objects 4335 $$a({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, { 4336 slice: function slice(start, end) { 4337 var O = toIndexedObject$1(this); 4338 var length = lengthOfArrayLike$3(O); 4339 var k = toAbsoluteIndex(start, length); 4340 var fin = toAbsoluteIndex(end === undefined ? length : end, length); 4341 // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible 4342 var Constructor, result, n; 4343 if (isArray$1(O)) { 4344 Constructor = O.constructor; 4345 // cross-realm fallback 4346 if (isConstructor(Constructor) && (Constructor === Array$1 || isArray$1(Constructor.prototype))) { 4347 Constructor = undefined; 4348 } else if (isObject$3(Constructor)) { 4349 Constructor = Constructor[SPECIES$1]; 4350 if (Constructor === null) Constructor = undefined; 4351 } 4352 if (Constructor === Array$1 || Constructor === undefined) { 4353 return un$Slice(O, k, fin); 4354 } 4355 } 4356 result = new (Constructor === undefined ? Array$1 : Constructor)(max$1(fin - k, 0)); 4357 for (n = 0; k < fin; k++, n++) if (k in O) createProperty$1(result, n, O[k]); 4358 result.length = n; 4359 return result; 4360 } 4361 }); 4362 4363 /** 4364 * ------------------------------------------------------------------------ 4365 * Constants 4366 * ------------------------------------------------------------------------ 4367 */ 4368 4369 var namespaceRegex = /[^.]*(?=\..*)\.|.*/; 4370 var stripNameRegex = /\..*/; 4371 var stripUidRegex = /::\d+$/; 4372 var eventRegistry = {}; // Events storage 4373 4374 var uidEvent = 1; 4375 var customEvents = { 4376 mouseenter: 'mouseover', 4377 mouseleave: 'mouseout' 4378 }; 4379 var customEventsRegex = /^(mouseenter|mouseleave)/i; 4380 var nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']); 4381 /** 4382 * ------------------------------------------------------------------------ 4383 * Private methods 4384 * ------------------------------------------------------------------------ 4385 */ 4386 4387 function getUidEvent(element, uid) { 4388 return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++; 4389 } 4390 4391 function getEvent(element) { 4392 var uid = getUidEvent(element); 4393 element.uidEvent = uid; 4394 eventRegistry[uid] = eventRegistry[uid] || {}; 4395 return eventRegistry[uid]; 4396 } 4397 4398 function bootstrapHandler(element, fn) { 4399 return function handler(event) { 4400 event.delegateTarget = element; 4401 4402 if (handler.oneOff) { 4403 EventHandler.off(element, event.type, fn); 4404 } 4405 4406 return fn.apply(element, [event]); 4407 }; 4408 } 4409 4410 function bootstrapDelegationHandler(element, selector, fn) { 4411 return function handler(event) { 4412 var domElements = element.querySelectorAll(selector); 4413 4414 for (var target = event.target; target && target !== this; target = target.parentNode) { 4415 for (var i = domElements.length; i--;) { 4416 if (domElements[i] === target) { 4417 event.delegateTarget = target; 4418 4419 if (handler.oneOff) { 4420 EventHandler.off(element, event.type, selector, fn); 4421 } 4422 4423 return fn.apply(target, [event]); 4424 } 4425 } 4426 } // To please ESLint 4427 4428 4429 return null; 4430 }; 4431 } 4432 4433 function findHandler(events, handler, delegationSelector) { 4434 if (delegationSelector === void 0) { 4435 delegationSelector = null; 4436 } 4437 4438 var uidEventList = Object.keys(events); 4439 4440 for (var i = 0, len = uidEventList.length; i < len; i++) { 4441 var event = events[uidEventList[i]]; 4442 4443 if (event.originalHandler === handler && event.delegationSelector === delegationSelector) { 4444 return event; 4445 } 4446 } 4447 4448 return null; 4449 } 4450 4451 function normalizeParams(originalTypeEvent, handler, delegationFn) { 4452 var delegation = typeof handler === 'string'; 4453 var originalHandler = delegation ? delegationFn : handler; 4454 var typeEvent = getTypeEvent(originalTypeEvent); 4455 var isNative = nativeEvents.has(typeEvent); 4456 4457 if (!isNative) { 4458 typeEvent = originalTypeEvent; 4459 } 4460 4461 return [delegation, originalHandler, typeEvent]; 4462 } 4463 4464 function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) { 4465 if (typeof originalTypeEvent !== 'string' || !element) { 4466 return; 4467 } 4468 4469 if (!handler) { 4470 handler = delegationFn; 4471 delegationFn = null; 4472 } // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position 4473 // this prevents the handler from being dispatched the same way as mouseover or mouseout does 4474 4475 4476 if (customEventsRegex.test(originalTypeEvent)) { 4477 var wrapFn = function wrapFn(fn) { 4478 return function (event) { 4479 if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) { 4480 return fn.call(this, event); 4481 } 4482 }; 4483 }; 4484 4485 if (delegationFn) { 4486 delegationFn = wrapFn(delegationFn); 4487 } else { 4488 handler = wrapFn(handler); 4489 } 4490 } 4491 4492 var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn), 4493 delegation = _normalizeParams[0], 4494 originalHandler = _normalizeParams[1], 4495 typeEvent = _normalizeParams[2]; 4496 4497 var events = getEvent(element); 4498 var handlers = events[typeEvent] || (events[typeEvent] = {}); 4499 var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null); 4500 4501 if (previousFn) { 4502 previousFn.oneOff = previousFn.oneOff && oneOff; 4503 return; 4504 } 4505 4506 var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, '')); 4507 var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler); 4508 fn.delegationSelector = delegation ? handler : null; 4509 fn.originalHandler = originalHandler; 4510 fn.oneOff = oneOff; 4511 fn.uidEvent = uid; 4512 handlers[uid] = fn; 4513 element.addEventListener(typeEvent, fn, delegation); 4514 } 4515 4516 function removeHandler(element, events, typeEvent, handler, delegationSelector) { 4517 var fn = findHandler(events[typeEvent], handler, delegationSelector); 4518 4519 if (!fn) { 4520 return; 4521 } 4522 4523 element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); 4524 delete events[typeEvent][fn.uidEvent]; 4525 } 4526 4527 function removeNamespacedHandlers(element, events, typeEvent, namespace) { 4528 var storeElementEvent = events[typeEvent] || {}; 4529 Object.keys(storeElementEvent).forEach(function (handlerKey) { 4530 if (handlerKey.includes(namespace)) { 4531 var event = storeElementEvent[handlerKey]; 4532 removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector); 4533 } 4534 }); 4535 } 4536 4537 function getTypeEvent(event) { 4538 // allow to get the native events from namespaced events ('click.bs.button' --> 'click') 4539 event = event.replace(stripNameRegex, ''); 4540 return customEvents[event] || event; 4541 } 4542 4543 var EventHandler = { 4544 on: function on(element, event, handler, delegationFn) { 4545 addHandler(element, event, handler, delegationFn, false); 4546 }, 4547 one: function one(element, event, handler, delegationFn) { 4548 addHandler(element, event, handler, delegationFn, true); 4549 }, 4550 off: function off(element, originalTypeEvent, handler, delegationFn) { 4551 if (typeof originalTypeEvent !== 'string' || !element) { 4552 return; 4553 } 4554 4555 var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn), 4556 delegation = _normalizeParams2[0], 4557 originalHandler = _normalizeParams2[1], 4558 typeEvent = _normalizeParams2[2]; 4559 4560 var inNamespace = typeEvent !== originalTypeEvent; 4561 var events = getEvent(element); 4562 var isNamespace = originalTypeEvent.startsWith('.'); 4563 4564 if (typeof originalHandler !== 'undefined') { 4565 // Simplest case: handler is passed, remove that listener ONLY. 4566 if (!events || !events[typeEvent]) { 4567 return; 4568 } 4569 4570 removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null); 4571 return; 4572 } 4573 4574 if (isNamespace) { 4575 Object.keys(events).forEach(function (elementEvent) { 4576 removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); 4577 }); 4578 } 4579 4580 var storeElementEvent = events[typeEvent] || {}; 4581 Object.keys(storeElementEvent).forEach(function (keyHandlers) { 4582 var handlerKey = keyHandlers.replace(stripUidRegex, ''); 4583 4584 if (!inNamespace || originalTypeEvent.includes(handlerKey)) { 4585 var event = storeElementEvent[keyHandlers]; 4586 removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector); 4587 } 4588 }); 4589 }, 4590 trigger: function trigger(element, event, args) { 4591 if (typeof event !== 'string' || !element) { 4592 return null; 4593 } 4594 4595 var $ = getjQuery(); 4596 var typeEvent = getTypeEvent(event); 4597 var inNamespace = event !== typeEvent; 4598 var isNative = nativeEvents.has(typeEvent); 4599 var jQueryEvent; 4600 var bubbles = true; 4601 var nativeDispatch = true; 4602 var defaultPrevented = false; 4603 var evt = null; 4604 4605 if (inNamespace && $) { 4606 jQueryEvent = $.Event(event, args); 4607 $(element).trigger(jQueryEvent); 4608 bubbles = !jQueryEvent.isPropagationStopped(); 4609 nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); 4610 defaultPrevented = jQueryEvent.isDefaultPrevented(); 4611 } 4612 4613 if (isNative) { 4614 evt = document.createEvent('HTMLEvents'); 4615 evt.initEvent(typeEvent, bubbles, true); 4616 } else { 4617 evt = new CustomEvent(event, { 4618 bubbles: bubbles, 4619 cancelable: true 4620 }); 4621 } // merge custom information in our event 4622 4623 4624 if (typeof args !== 'undefined') { 4625 Object.keys(args).forEach(function (key) { 4626 Object.defineProperty(evt, key, { 4627 get: function get() { 4628 return args[key]; 4629 } 4630 }); 4631 }); 4632 } 4633 4634 if (defaultPrevented) { 4635 evt.preventDefault(); 4636 } 4637 4638 if (nativeDispatch) { 4639 element.dispatchEvent(evt); 4640 } 4641 4642 if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') { 4643 jQueryEvent.preventDefault(); 4644 } 4645 4646 return evt; 4647 } 4648 }; 4649 4650 var $$9 = _export; 4651 var fails$5 = fails$w; 4652 var getOwnPropertyNames = objectGetOwnPropertyNamesExternal.f; 4653 4654 // eslint-disable-next-line es/no-object-getownpropertynames -- required for testing 4655 var FAILS_ON_PRIMITIVES = fails$5(function () { return !Object.getOwnPropertyNames(1); }); 4656 4657 // `Object.getOwnPropertyNames` method 4658 // https://tc39.es/ecma262/#sec-object.getownpropertynames 4659 $$9({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { 4660 getOwnPropertyNames: getOwnPropertyNames 4661 }); 4662 4663 var collection = collection$2; 4664 var collectionStrong = collectionStrong$2; 4665 4666 // `Map` constructor 4667 // https://tc39.es/ecma262/#sec-map-objects 4668 collection('Map', function (init) { 4669 return function Map() { return init(this, arguments.length ? arguments[0] : undefined); }; 4670 }, collectionStrong); 4671 4672 /** 4673 * -------------------------------------------------------------------------- 4674 * Bootstrap (v5.1.3): dom/data.js 4675 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 4676 * -------------------------------------------------------------------------- 4677 */ 4678 4679 /** 4680 * ------------------------------------------------------------------------ 4681 * Constants 4682 * ------------------------------------------------------------------------ 4683 */ 4684 var elementMap = new Map(); 4685 var Data = { 4686 set: function set(element, key, instance) { 4687 if (!elementMap.has(element)) { 4688 elementMap.set(element, new Map()); 4689 } 4690 4691 var instanceMap = elementMap.get(element); // make it clear we only want one instance per element 4692 // can be removed later when multiple key/instances are fine to be used 4693 4694 if (!instanceMap.has(key) && instanceMap.size !== 0) { 4695 // eslint-disable-next-line no-console 4696 console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: " + Array.from(instanceMap.keys())[0] + "."); 4697 return; 4698 } 4699 4700 instanceMap.set(key, instance); 4701 }, 4702 get: function get(element, key) { 4703 if (elementMap.has(element)) { 4704 return elementMap.get(element).get(key) || null; 4705 } 4706 4707 return null; 4708 }, 4709 remove: function remove(element, key) { 4710 if (!elementMap.has(element)) { 4711 return; 4712 } 4713 4714 var instanceMap = elementMap.get(element); 4715 instanceMap.delete(key); // free up element references if there are no instances left for an element 4716 4717 if (instanceMap.size === 0) { 4718 elementMap.delete(element); 4719 } 4720 } 4721 }; 4722 4723 /** 4724 * ------------------------------------------------------------------------ 4725 * Constants 4726 * ------------------------------------------------------------------------ 4727 */ 4728 4729 var VERSION = '5.1.3'; 4730 4731 var BaseComponent = /*#__PURE__*/function () { 4732 function BaseComponent(element) { 4733 element = getElement(element); 4734 4735 if (!element) { 4736 return; 4737 } 4738 4739 this._element = element; 4740 Data.set(this._element, this.constructor.DATA_KEY, this); 4741 } 4742 4743 var _proto = BaseComponent.prototype; 4744 4745 _proto.dispose = function dispose() { 4746 var _this = this; 4747 4748 Data.remove(this._element, this.constructor.DATA_KEY); 4749 EventHandler.off(this._element, this.constructor.EVENT_KEY); 4750 Object.getOwnPropertyNames(this).forEach(function (propertyName) { 4751 _this[propertyName] = null; 4752 }); 4753 }; 4754 4755 _proto._queueCallback = function _queueCallback(callback, element, isAnimated) { 4756 if (isAnimated === void 0) { 4757 isAnimated = true; 4758 } 4759 4760 executeAfterTransition(callback, element, isAnimated); 4761 } 4762 /** Static */ 4763 ; 4764 4765 BaseComponent.getInstance = function getInstance(element) { 4766 return Data.get(getElement(element), this.DATA_KEY); 4767 }; 4768 4769 BaseComponent.getOrCreateInstance = function getOrCreateInstance(element, config) { 4770 if (config === void 0) { 4771 config = {}; 4772 } 4773 4774 return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null); 4775 }; 4776 4777 _createClass(BaseComponent, null, [{ 4778 key: "VERSION", 4779 get: function get() { 4780 return VERSION; 4781 } 4782 }, { 4783 key: "NAME", 4784 get: function get() { 4785 throw new Error('You have to implement the static method "NAME", for each component!'); 4786 } 4787 }, { 4788 key: "DATA_KEY", 4789 get: function get() { 4790 return "bs." + this.NAME; 4791 } 4792 }, { 4793 key: "EVENT_KEY", 4794 get: function get() { 4795 return "." + this.DATA_KEY; 4796 } 4797 }]); 4798 4799 return BaseComponent; 4800 }(); 4801 4802 var enableDismissTrigger = function enableDismissTrigger(component, method) { 4803 if (method === void 0) { 4804 method = 'hide'; 4805 } 4806 4807 var clickEvent = "click.dismiss" + component.EVENT_KEY; 4808 var name = component.NAME; 4809 EventHandler.on(document, clickEvent, "[data-bs-dismiss=\"" + name + "\"]", function (event) { 4810 if (['A', 'AREA'].includes(this.tagName)) { 4811 event.preventDefault(); 4812 } 4813 4814 if (isDisabled(this)) { 4815 return; 4816 } 4817 4818 var target = getElementFromSelector(this) || this.closest("." + name); 4819 var instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method 4820 4821 instance[method](); 4822 }); 4823 }; 4824 4825 /** 4826 * ------------------------------------------------------------------------ 4827 * Constants 4828 * ------------------------------------------------------------------------ 4829 */ 4830 4831 var NAME$e = 'alert'; 4832 var DATA_KEY$c = 'bs.alert'; 4833 var EVENT_KEY$c = "." + DATA_KEY$c; 4834 var EVENT_CLOSE = "close" + EVENT_KEY$c; 4835 var EVENT_CLOSED = "closed" + EVENT_KEY$c; 4836 var CLASS_NAME_FADE$5 = 'fade'; 4837 var CLASS_NAME_SHOW$8 = 'show'; 4838 /** 4839 * ------------------------------------------------------------------------ 4840 * Class Definition 4841 * ------------------------------------------------------------------------ 4842 */ 4843 4844 var Alert = /*#__PURE__*/function (_BaseComponent) { 4845 _inheritsLoose(Alert, _BaseComponent); 4846 4847 function Alert() { 4848 return _BaseComponent.apply(this, arguments) || this; 4849 } 4850 4851 var _proto = Alert.prototype; 4852 4853 // Public 4854 _proto.close = function close() { 4855 var _this = this; 4856 4857 var closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE); 4858 4859 if (closeEvent.defaultPrevented) { 4860 return; 4861 } 4862 4863 this._element.classList.remove(CLASS_NAME_SHOW$8); 4864 4865 var isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5); 4866 4867 this._queueCallback(function () { 4868 return _this._destroyElement(); 4869 }, this._element, isAnimated); 4870 } // Private 4871 ; 4872 4873 _proto._destroyElement = function _destroyElement() { 4874 this._element.remove(); 4875 4876 EventHandler.trigger(this._element, EVENT_CLOSED); 4877 this.dispose(); 4878 } // Static 4879 ; 4880 4881 Alert.jQueryInterface = function jQueryInterface(config) { 4882 return this.each(function () { 4883 var data = Alert.getOrCreateInstance(this); 4884 4885 if (typeof config !== 'string') { 4886 return; 4887 } 4888 4889 if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { 4890 throw new TypeError("No method named \"" + config + "\""); 4891 } 4892 4893 data[config](this); 4894 }); 4895 }; 4896 4897 _createClass(Alert, null, [{ 4898 key: "NAME", 4899 get: // Getters 4900 function get() { 4901 return NAME$e; 4902 } 4903 }]); 4904 4905 return Alert; 4906 }(BaseComponent); 4907 /** 4908 * ------------------------------------------------------------------------ 4909 * Data Api implementation 4910 * ------------------------------------------------------------------------ 4911 */ 4912 4913 4914 enableDismissTrigger(Alert, 'close'); 4915 /** 4916 * ------------------------------------------------------------------------ 4917 * jQuery 4918 * ------------------------------------------------------------------------ 4919 * add .Alert to jQuery only if jQuery is present 4920 */ 4921 4922 defineJQueryPlugin(Alert); 4923 4924 window.bootstrap = window.bootstrap || {}; 4925 window.bootstrap.Alert = Alert; 4926 4927 if (Joomla && Joomla.getOptions) { 4928 // Get the elements/configurations from the PHP 4929 var alerts = Joomla.getOptions('bootstrap.alert'); // Initialise the elements 4930 4931 if (alerts && alerts.length) { 4932 alerts.forEach(function (selector) { 4933 Array.from(document.querySelectorAll(selector)).map(function (el) { 4934 return new window.bootstrap.Alert(el); 4935 }); 4936 }); 4937 } 4938 } 4939 4940 /** 4941 * ------------------------------------------------------------------------ 4942 * Constants 4943 * ------------------------------------------------------------------------ 4944 */ 4945 4946 var NAME$d = 'button'; 4947 var DATA_KEY$b = 'bs.button'; 4948 var EVENT_KEY$b = "." + DATA_KEY$b; 4949 var DATA_API_KEY$7 = '.data-api'; 4950 var CLASS_NAME_ACTIVE$3 = 'active'; 4951 var SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]'; 4952 var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$b + DATA_API_KEY$7; 4953 /** 4954 * ------------------------------------------------------------------------ 4955 * Class Definition 4956 * ------------------------------------------------------------------------ 4957 */ 4958 4959 var Button = /*#__PURE__*/function (_BaseComponent) { 4960 _inheritsLoose(Button, _BaseComponent); 4961 4962 function Button() { 4963 return _BaseComponent.apply(this, arguments) || this; 4964 } 4965 4966 var _proto = Button.prototype; 4967 4968 // Public 4969 _proto.toggle = function toggle() { 4970 // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method 4971 this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3)); 4972 } // Static 4973 ; 4974 4975 Button.jQueryInterface = function jQueryInterface(config) { 4976 return this.each(function () { 4977 var data = Button.getOrCreateInstance(this); 4978 4979 if (config === 'toggle') { 4980 data[config](); 4981 } 4982 }); 4983 }; 4984 4985 _createClass(Button, null, [{ 4986 key: "NAME", 4987 get: // Getters 4988 function get() { 4989 return NAME$d; 4990 } 4991 }]); 4992 4993 return Button; 4994 }(BaseComponent); 4995 /** 4996 * ------------------------------------------------------------------------ 4997 * Data Api implementation 4998 * ------------------------------------------------------------------------ 4999 */ 5000 5001 5002 EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, function (event) { 5003 event.preventDefault(); 5004 var button = event.target.closest(SELECTOR_DATA_TOGGLE$5); 5005 var data = Button.getOrCreateInstance(button); 5006 data.toggle(); 5007 }); 5008 /** 5009 * ------------------------------------------------------------------------ 5010 * jQuery 5011 * ------------------------------------------------------------------------ 5012 * add .Button to jQuery only if jQuery is present 5013 */ 5014 5015 defineJQueryPlugin(Button); 5016 5017 window.bootstrap = window.bootstrap || {}; 5018 window.bootstrap.Button = Button; 5019 5020 if (Joomla && Joomla.getOptions) { 5021 // Get the elements/configurations from the PHP 5022 var buttons = Joomla.getOptions('bootstrap.button'); // Initialise the elements 5023 5024 if (buttons && buttons.length) { 5025 buttons.forEach(function (selector) { 5026 Array.from(document.querySelectorAll(selector)).map(function (el) { 5027 return new window.bootstrap.Button(el); 5028 }); 5029 }); 5030 } 5031 } 5032 5033 var DESCRIPTORS$1 = descriptors; 5034 var uncurryThis$4 = functionUncurryThis; 5035 var call$1 = functionCall; 5036 var fails$4 = fails$w; 5037 var objectKeys = objectKeys$2; 5038 var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols; 5039 var propertyIsEnumerableModule = objectPropertyIsEnumerable; 5040 var toObject$3 = toObject$a; 5041 var IndexedObject$2 = indexedObject; 5042 5043 // eslint-disable-next-line es/no-object-assign -- safe 5044 var $assign = Object.assign; 5045 // eslint-disable-next-line es/no-object-defineproperty -- required for testing 5046 var defineProperty$1 = Object.defineProperty; 5047 var concat = uncurryThis$4([].concat); 5048 5049 // `Object.assign` method 5050 // https://tc39.es/ecma262/#sec-object.assign 5051 var objectAssign = !$assign || fails$4(function () { 5052 // should have correct order of operations (Edge bug) 5053 if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', { 5054 enumerable: true, 5055 get: function () { 5056 defineProperty$1(this, 'b', { 5057 value: 3, 5058 enumerable: false 5059 }); 5060 } 5061 }), { b: 2 })).b !== 1) return true; 5062 // should work with symbols and should have deterministic property order (V8 bug) 5063 var A = {}; 5064 var B = {}; 5065 // eslint-disable-next-line es/no-symbol -- safe 5066 var symbol = Symbol(); 5067 var alphabet = 'abcdefghijklmnopqrst'; 5068 A[symbol] = 7; 5069 alphabet.split('').forEach(function (chr) { B[chr] = chr; }); 5070 return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet; 5071 }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` 5072 var T = toObject$3(target); 5073 var argumentsLength = arguments.length; 5074 var index = 1; 5075 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; 5076 var propertyIsEnumerable = propertyIsEnumerableModule.f; 5077 while (argumentsLength > index) { 5078 var S = IndexedObject$2(arguments[index++]); 5079 var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S); 5080 var length = keys.length; 5081 var j = 0; 5082 var key; 5083 while (length > j) { 5084 key = keys[j++]; 5085 if (!DESCRIPTORS$1 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key]; 5086 } 5087 } return T; 5088 } : $assign; 5089 5090 var $$8 = _export; 5091 var assign = objectAssign; 5092 5093 // `Object.assign` method 5094 // https://tc39.es/ecma262/#sec-object.assign 5095 // eslint-disable-next-line es/no-object-assign -- required for testing 5096 $$8({ target: 'Object', stat: true, forced: Object.assign !== assign }, { 5097 assign: assign 5098 }); 5099 5100 var $$7 = _export; 5101 var $find = arrayIteration.find; 5102 var addToUnscopables = addToUnscopables$3; 5103 5104 var FIND = 'find'; 5105 var SKIPS_HOLES = true; 5106 5107 // Shouldn't skip holes 5108 if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); 5109 5110 // `Array.prototype.find` method 5111 // https://tc39.es/ecma262/#sec-array.prototype.find 5112 $$7({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { 5113 find: function find(callbackfn /* , that = undefined */) { 5114 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); 5115 } 5116 }); 5117 5118 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables 5119 addToUnscopables(FIND); 5120 5121 var $$6 = _export; 5122 var $filter = arrayIteration.filter; 5123 var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$4; 5124 5125 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$1('filter'); 5126 5127 // `Array.prototype.filter` method 5128 // https://tc39.es/ecma262/#sec-array.prototype.filter 5129 // with adding support of @@species 5130 $$6({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { 5131 filter: function filter(callbackfn /* , thisArg */) { 5132 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); 5133 } 5134 }); 5135 5136 /** 5137 * -------------------------------------------------------------------------- 5138 * Bootstrap (v5.1.3): dom/manipulator.js 5139 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5140 * -------------------------------------------------------------------------- 5141 */ 5142 function normalizeData(val) { 5143 if (val === 'true') { 5144 return true; 5145 } 5146 5147 if (val === 'false') { 5148 return false; 5149 } 5150 5151 if (val === Number(val).toString()) { 5152 return Number(val); 5153 } 5154 5155 if (val === '' || val === 'null') { 5156 return null; 5157 } 5158 5159 return val; 5160 } 5161 5162 function normalizeDataKey(key) { 5163 return key.replace(/[A-Z]/g, function (chr) { 5164 return "-" + chr.toLowerCase(); 5165 }); 5166 } 5167 5168 var Manipulator = { 5169 setDataAttribute: function setDataAttribute(element, key, value) { 5170 element.setAttribute("data-bs-" + normalizeDataKey(key), value); 5171 }, 5172 removeDataAttribute: function removeDataAttribute(element, key) { 5173 element.removeAttribute("data-bs-" + normalizeDataKey(key)); 5174 }, 5175 getDataAttributes: function getDataAttributes(element) { 5176 if (!element) { 5177 return {}; 5178 } 5179 5180 var attributes = {}; 5181 Object.keys(element.dataset).filter(function (key) { 5182 return key.startsWith('bs'); 5183 }).forEach(function (key) { 5184 var pureKey = key.replace(/^bs/, ''); 5185 pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length); 5186 attributes[pureKey] = normalizeData(element.dataset[key]); 5187 }); 5188 return attributes; 5189 }, 5190 getDataAttribute: function getDataAttribute(element, key) { 5191 return normalizeData(element.getAttribute("data-bs-" + normalizeDataKey(key))); 5192 }, 5193 offset: function offset(element) { 5194 var rect = element.getBoundingClientRect(); 5195 return { 5196 top: rect.top + window.pageYOffset, 5197 left: rect.left + window.pageXOffset 5198 }; 5199 }, 5200 position: function position(element) { 5201 return { 5202 top: element.offsetTop, 5203 left: element.offsetLeft 5204 }; 5205 } 5206 }; 5207 5208 var $$5 = _export; 5209 var global$a = global$U; 5210 var fails$3 = fails$w; 5211 var isArray = isArray$3; 5212 var isObject$2 = isObject$g; 5213 var toObject$2 = toObject$a; 5214 var lengthOfArrayLike$2 = lengthOfArrayLike$9; 5215 var createProperty = createProperty$4; 5216 var arraySpeciesCreate = arraySpeciesCreate$2; 5217 var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$4; 5218 var wellKnownSymbol$1 = wellKnownSymbol$n; 5219 var V8_VERSION$1 = engineV8Version; 5220 5221 var IS_CONCAT_SPREADABLE = wellKnownSymbol$1('isConcatSpreadable'); 5222 var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; 5223 var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; 5224 var TypeError$3 = global$a.TypeError; 5225 5226 // We can't use this feature detection in V8 since it causes 5227 // deoptimization and serious performance degradation 5228 // https://github.com/zloirock/core-js/issues/679 5229 var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION$1 >= 51 || !fails$3(function () { 5230 var array = []; 5231 array[IS_CONCAT_SPREADABLE] = false; 5232 return array.concat()[0] !== array; 5233 }); 5234 5235 var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); 5236 5237 var isConcatSpreadable = function (O) { 5238 if (!isObject$2(O)) return false; 5239 var spreadable = O[IS_CONCAT_SPREADABLE]; 5240 return spreadable !== undefined ? !!spreadable : isArray(O); 5241 }; 5242 5243 var FORCED$3 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; 5244 5245 // `Array.prototype.concat` method 5246 // https://tc39.es/ecma262/#sec-array.prototype.concat 5247 // with adding support of @@isConcatSpreadable and @@species 5248 $$5({ target: 'Array', proto: true, forced: FORCED$3 }, { 5249 // eslint-disable-next-line no-unused-vars -- required for `.length` 5250 concat: function concat(arg) { 5251 var O = toObject$2(this); 5252 var A = arraySpeciesCreate(O, 0); 5253 var n = 0; 5254 var i, k, length, len, E; 5255 for (i = -1, length = arguments.length; i < length; i++) { 5256 E = i === -1 ? O : arguments[i]; 5257 if (isConcatSpreadable(E)) { 5258 len = lengthOfArrayLike$2(E); 5259 if (n + len > MAX_SAFE_INTEGER) throw TypeError$3(MAXIMUM_ALLOWED_INDEX_EXCEEDED); 5260 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); 5261 } else { 5262 if (n >= MAX_SAFE_INTEGER) throw TypeError$3(MAXIMUM_ALLOWED_INDEX_EXCEEDED); 5263 createProperty(A, n++, E); 5264 } 5265 } 5266 A.length = n; 5267 return A; 5268 } 5269 }); 5270 5271 var $$4 = _export; 5272 var uncurryThis$3 = functionUncurryThis; 5273 var IndexedObject$1 = indexedObject; 5274 var toIndexedObject = toIndexedObject$8; 5275 var arrayMethodIsStrict$2 = arrayMethodIsStrict$4; 5276 5277 var un$Join = uncurryThis$3([].join); 5278 5279 var ES3_STRINGS = IndexedObject$1 != Object; 5280 var STRICT_METHOD$2 = arrayMethodIsStrict$2('join', ','); 5281 5282 // `Array.prototype.join` method 5283 // https://tc39.es/ecma262/#sec-array.prototype.join 5284 $$4({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$2 }, { 5285 join: function join(separator) { 5286 return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator); 5287 } 5288 }); 5289 5290 var NODE_TEXT = 3; 5291 var SelectorEngine = { 5292 find: function find(selector, element) { 5293 var _ref; 5294 5295 if (element === void 0) { 5296 element = document.documentElement; 5297 } 5298 5299 return (_ref = []).concat.apply(_ref, Element.prototype.querySelectorAll.call(element, selector)); 5300 }, 5301 findOne: function findOne(selector, element) { 5302 if (element === void 0) { 5303 element = document.documentElement; 5304 } 5305 5306 return Element.prototype.querySelector.call(element, selector); 5307 }, 5308 children: function children(element, selector) { 5309 var _ref2; 5310 5311 return (_ref2 = []).concat.apply(_ref2, element.children).filter(function (child) { 5312 return child.matches(selector); 5313 }); 5314 }, 5315 parents: function parents(element, selector) { 5316 var parents = []; 5317 var ancestor = element.parentNode; 5318 5319 while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) { 5320 if (ancestor.matches(selector)) { 5321 parents.push(ancestor); 5322 } 5323 5324 ancestor = ancestor.parentNode; 5325 } 5326 5327 return parents; 5328 }, 5329 prev: function prev(element, selector) { 5330 var previous = element.previousElementSibling; 5331 5332 while (previous) { 5333 if (previous.matches(selector)) { 5334 return [previous]; 5335 } 5336 5337 previous = previous.previousElementSibling; 5338 } 5339 5340 return []; 5341 }, 5342 next: function next(element, selector) { 5343 var next = element.nextElementSibling; 5344 5345 while (next) { 5346 if (next.matches(selector)) { 5347 return [next]; 5348 } 5349 5350 next = next.nextElementSibling; 5351 } 5352 5353 return []; 5354 }, 5355 focusableChildren: function focusableChildren(element) { 5356 var focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(function (selector) { 5357 return selector + ":not([tabindex^=\"-\"])"; 5358 }).join(', '); 5359 return this.find(focusables, element).filter(function (el) { 5360 return !isDisabled(el) && isVisible(el); 5361 }); 5362 } 5363 }; 5364 5365 /** 5366 * ------------------------------------------------------------------------ 5367 * Constants 5368 * ------------------------------------------------------------------------ 5369 */ 5370 5371 var NAME$c = 'collapse'; 5372 var DATA_KEY$a = 'bs.collapse'; 5373 var EVENT_KEY$a = "." + DATA_KEY$a; 5374 var DATA_API_KEY$6 = '.data-api'; 5375 var Default$a = { 5376 toggle: true, 5377 parent: null 5378 }; 5379 var DefaultType$a = { 5380 toggle: 'boolean', 5381 parent: '(null|element)' 5382 }; 5383 var EVENT_SHOW$5 = "show" + EVENT_KEY$a; 5384 var EVENT_SHOWN$5 = "shown" + EVENT_KEY$a; 5385 var EVENT_HIDE$5 = "hide" + EVENT_KEY$a; 5386 var EVENT_HIDDEN$5 = "hidden" + EVENT_KEY$a; 5387 var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$a + DATA_API_KEY$6; 5388 var CLASS_NAME_SHOW$7 = 'show'; 5389 var CLASS_NAME_COLLAPSE = 'collapse'; 5390 var CLASS_NAME_COLLAPSING = 'collapsing'; 5391 var CLASS_NAME_COLLAPSED = 'collapsed'; 5392 var CLASS_NAME_DEEPER_CHILDREN = ":scope ." + CLASS_NAME_COLLAPSE + " ." + CLASS_NAME_COLLAPSE; 5393 var CLASS_NAME_HORIZONTAL = 'collapse-horizontal'; 5394 var WIDTH = 'width'; 5395 var HEIGHT = 'height'; 5396 var SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing'; 5397 var SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]'; 5398 /** 5399 * ------------------------------------------------------------------------ 5400 * Class Definition 5401 * ------------------------------------------------------------------------ 5402 */ 5403 5404 var Collapse = /*#__PURE__*/function (_BaseComponent) { 5405 _inheritsLoose(Collapse, _BaseComponent); 5406 5407 function Collapse(element, config) { 5408 var _this; 5409 5410 _this = _BaseComponent.call(this, element) || this; 5411 _this._isTransitioning = false; 5412 _this._config = _this._getConfig(config); 5413 _this._triggerArray = []; 5414 var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4); 5415 5416 for (var i = 0, len = toggleList.length; i < len; i++) { 5417 var elem = toggleList[i]; 5418 var selector = getSelectorFromElement(elem); 5419 var filterElement = SelectorEngine.find(selector).filter(function (foundElem) { 5420 return foundElem === _this._element; 5421 }); 5422 5423 if (selector !== null && filterElement.length) { 5424 _this._selector = selector; 5425 5426 _this._triggerArray.push(elem); 5427 } 5428 } 5429 5430 _this._initializeChildren(); 5431 5432 if (!_this._config.parent) { 5433 _this._addAriaAndCollapsedClass(_this._triggerArray, _this._isShown()); 5434 } 5435 5436 if (_this._config.toggle) { 5437 _this.toggle(); 5438 } 5439 5440 return _this; 5441 } // Getters 5442 5443 5444 var _proto = Collapse.prototype; 5445 5446 // Public 5447 _proto.toggle = function toggle() { 5448 if (this._isShown()) { 5449 this.hide(); 5450 } else { 5451 this.show(); 5452 } 5453 }; 5454 5455 _proto.show = function show() { 5456 var _this2 = this; 5457 5458 if (this._isTransitioning || this._isShown()) { 5459 return; 5460 } 5461 5462 var actives = []; 5463 var activesData; 5464 5465 if (this._config.parent) { 5466 var children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); 5467 actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(function (elem) { 5468 return !children.includes(elem); 5469 }); // remove children if greater depth 5470 } 5471 5472 var container = SelectorEngine.findOne(this._selector); 5473 5474 if (actives.length) { 5475 var tempActiveData = actives.find(function (elem) { 5476 return container !== elem; 5477 }); 5478 activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null; 5479 5480 if (activesData && activesData._isTransitioning) { 5481 return; 5482 } 5483 } 5484 5485 var startEvent = EventHandler.trigger(this._element, EVENT_SHOW$5); 5486 5487 if (startEvent.defaultPrevented) { 5488 return; 5489 } 5490 5491 actives.forEach(function (elemActive) { 5492 if (container !== elemActive) { 5493 Collapse.getOrCreateInstance(elemActive, { 5494 toggle: false 5495 }).hide(); 5496 } 5497 5498 if (!activesData) { 5499 Data.set(elemActive, DATA_KEY$a, null); 5500 } 5501 }); 5502 5503 var dimension = this._getDimension(); 5504 5505 this._element.classList.remove(CLASS_NAME_COLLAPSE); 5506 5507 this._element.classList.add(CLASS_NAME_COLLAPSING); 5508 5509 this._element.style[dimension] = 0; 5510 5511 this._addAriaAndCollapsedClass(this._triggerArray, true); 5512 5513 this._isTransitioning = true; 5514 5515 var complete = function complete() { 5516 _this2._isTransitioning = false; 5517 5518 _this2._element.classList.remove(CLASS_NAME_COLLAPSING); 5519 5520 _this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7); 5521 5522 _this2._element.style[dimension] = ''; 5523 EventHandler.trigger(_this2._element, EVENT_SHOWN$5); 5524 }; 5525 5526 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); 5527 var scrollSize = "scroll" + capitalizedDimension; 5528 5529 this._queueCallback(complete, this._element, true); 5530 5531 this._element.style[dimension] = this._element[scrollSize] + "px"; 5532 }; 5533 5534 _proto.hide = function hide() { 5535 var _this3 = this; 5536 5537 if (this._isTransitioning || !this._isShown()) { 5538 return; 5539 } 5540 5541 var startEvent = EventHandler.trigger(this._element, EVENT_HIDE$5); 5542 5543 if (startEvent.defaultPrevented) { 5544 return; 5545 } 5546 5547 var dimension = this._getDimension(); 5548 5549 this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; 5550 reflow(this._element); 5551 5552 this._element.classList.add(CLASS_NAME_COLLAPSING); 5553 5554 this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7); 5555 5556 var triggerArrayLength = this._triggerArray.length; 5557 5558 for (var i = 0; i < triggerArrayLength; i++) { 5559 var trigger = this._triggerArray[i]; 5560 var elem = getElementFromSelector(trigger); 5561 5562 if (elem && !this._isShown(elem)) { 5563 this._addAriaAndCollapsedClass([trigger], false); 5564 } 5565 } 5566 5567 this._isTransitioning = true; 5568 5569 var complete = function complete() { 5570 _this3._isTransitioning = false; 5571 5572 _this3._element.classList.remove(CLASS_NAME_COLLAPSING); 5573 5574 _this3._element.classList.add(CLASS_NAME_COLLAPSE); 5575 5576 EventHandler.trigger(_this3._element, EVENT_HIDDEN$5); 5577 }; 5578 5579 this._element.style[dimension] = ''; 5580 5581 this._queueCallback(complete, this._element, true); 5582 }; 5583 5584 _proto._isShown = function _isShown(element) { 5585 if (element === void 0) { 5586 element = this._element; 5587 } 5588 5589 return element.classList.contains(CLASS_NAME_SHOW$7); 5590 } // Private 5591 ; 5592 5593 _proto._getConfig = function _getConfig(config) { 5594 config = Object.assign({}, Default$a, Manipulator.getDataAttributes(this._element), config); 5595 config.toggle = Boolean(config.toggle); // Coerce string values 5596 5597 config.parent = getElement(config.parent); 5598 typeCheckConfig(NAME$c, config, DefaultType$a); 5599 return config; 5600 }; 5601 5602 _proto._getDimension = function _getDimension() { 5603 return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; 5604 }; 5605 5606 _proto._initializeChildren = function _initializeChildren() { 5607 var _this4 = this; 5608 5609 if (!this._config.parent) { 5610 return; 5611 } 5612 5613 var children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); 5614 SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(function (elem) { 5615 return !children.includes(elem); 5616 }).forEach(function (element) { 5617 var selected = getElementFromSelector(element); 5618 5619 if (selected) { 5620 _this4._addAriaAndCollapsedClass([element], _this4._isShown(selected)); 5621 } 5622 }); 5623 }; 5624 5625 _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(triggerArray, isOpen) { 5626 if (!triggerArray.length) { 5627 return; 5628 } 5629 5630 triggerArray.forEach(function (elem) { 5631 if (isOpen) { 5632 elem.classList.remove(CLASS_NAME_COLLAPSED); 5633 } else { 5634 elem.classList.add(CLASS_NAME_COLLAPSED); 5635 } 5636 5637 elem.setAttribute('aria-expanded', isOpen); 5638 }); 5639 } // Static 5640 ; 5641 5642 Collapse.jQueryInterface = function jQueryInterface(config) { 5643 return this.each(function () { 5644 var _config = {}; 5645 5646 if (typeof config === 'string' && /show|hide/.test(config)) { 5647 _config.toggle = false; 5648 } 5649 5650 var data = Collapse.getOrCreateInstance(this, _config); 5651 5652 if (typeof config === 'string') { 5653 if (typeof data[config] === 'undefined') { 5654 throw new TypeError("No method named \"" + config + "\""); 5655 } 5656 5657 data[config](); 5658 } 5659 }); 5660 }; 5661 5662 _createClass(Collapse, null, [{ 5663 key: "Default", 5664 get: function get() { 5665 return Default$a; 5666 } 5667 }, { 5668 key: "NAME", 5669 get: function get() { 5670 return NAME$c; 5671 } 5672 }]); 5673 5674 return Collapse; 5675 }(BaseComponent); 5676 /** 5677 * ------------------------------------------------------------------------ 5678 * Data Api implementation 5679 * ------------------------------------------------------------------------ 5680 */ 5681 5682 5683 EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$4, function (event) { 5684 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element 5685 if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') { 5686 event.preventDefault(); 5687 } 5688 5689 var selector = getSelectorFromElement(this); 5690 var selectorElements = SelectorEngine.find(selector); 5691 selectorElements.forEach(function (element) { 5692 Collapse.getOrCreateInstance(element, { 5693 toggle: false 5694 }).toggle(); 5695 }); 5696 }); 5697 /** 5698 * ------------------------------------------------------------------------ 5699 * jQuery 5700 * ------------------------------------------------------------------------ 5701 * add .Collapse to jQuery only if jQuery is present 5702 */ 5703 5704 defineJQueryPlugin(Collapse); 5705 5706 window.bootstrap = window.bootstrap || {}; 5707 window.bootstrap.Collapse = Collapse; 5708 5709 if (Joomla && Joomla.getOptions) { 5710 // Get the elements/configurations from the PHP 5711 var collapses = Object.assign({}, Joomla.getOptions('bootstrap.collapse'), Joomla.getOptions('bootstrap.accordion')); // Initialise the elements 5712 5713 Object.keys(collapses).forEach(function (collapse) { 5714 var opt = collapses[collapse]; 5715 var options = { 5716 toggle: opt.toggle ? opt.toggle : true 5717 }; 5718 5719 if (opt.parent) { 5720 options.parent = opt.parent; 5721 } 5722 5723 var elements = Array.from(document.querySelectorAll(collapse)); 5724 5725 if (elements.length) { 5726 elements.map(function (el) { 5727 return new window.bootstrap.Collapse(el, options); 5728 }); 5729 } 5730 }); 5731 } 5732 5733 var global$9 = global$U; 5734 var fails$2 = fails$w; 5735 var uncurryThis$2 = functionUncurryThis; 5736 var toString$1 = toString$d; 5737 var trim = stringTrim.trim; 5738 var whitespaces = whitespaces$4; 5739 5740 var $parseInt = global$9.parseInt; 5741 var Symbol$1 = global$9.Symbol; 5742 var ITERATOR = Symbol$1 && Symbol$1.iterator; 5743 var hex = /^[+-]?0x/i; 5744 var exec = uncurryThis$2(hex.exec); 5745 var FORCED$2 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22 5746 // MS Edge 18- broken with boxed symbols 5747 || (ITERATOR && !fails$2(function () { $parseInt(Object(ITERATOR)); })); 5748 5749 // `parseInt` method 5750 // https://tc39.es/ecma262/#sec-parseint-string-radix 5751 var numberParseInt = FORCED$2 ? function parseInt(string, radix) { 5752 var S = trim(toString$1(string)); 5753 return $parseInt(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10)); 5754 } : $parseInt; 5755 5756 var $$3 = _export; 5757 var parseInt$1 = numberParseInt; 5758 5759 // `Number.parseInt` method 5760 // https://tc39.es/ecma262/#sec-number.parseint 5761 // eslint-disable-next-line es/no-number-parseint -- required for testing 5762 $$3({ target: 'Number', stat: true, forced: Number.parseInt != parseInt$1 }, { 5763 parseInt: parseInt$1 5764 }); 5765 5766 var _KEY_TO_DIRECTION; 5767 /** 5768 * ------------------------------------------------------------------------ 5769 * Constants 5770 * ------------------------------------------------------------------------ 5771 */ 5772 5773 var NAME$b = 'carousel'; 5774 var DATA_KEY$9 = 'bs.carousel'; 5775 var EVENT_KEY$9 = "." + DATA_KEY$9; 5776 var DATA_API_KEY$5 = '.data-api'; 5777 var ARROW_LEFT_KEY = 'ArrowLeft'; 5778 var ARROW_RIGHT_KEY = 'ArrowRight'; 5779 var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch 5780 5781 var SWIPE_THRESHOLD = 40; 5782 var Default$9 = { 5783 interval: 5000, 5784 keyboard: true, 5785 slide: false, 5786 pause: 'hover', 5787 wrap: true, 5788 touch: true 5789 }; 5790 var DefaultType$9 = { 5791 interval: '(number|boolean)', 5792 keyboard: 'boolean', 5793 slide: '(boolean|string)', 5794 pause: '(string|boolean)', 5795 wrap: 'boolean', 5796 touch: 'boolean' 5797 }; 5798 var ORDER_NEXT = 'next'; 5799 var ORDER_PREV = 'prev'; 5800 var DIRECTION_LEFT = 'left'; 5801 var DIRECTION_RIGHT = 'right'; 5802 var KEY_TO_DIRECTION = (_KEY_TO_DIRECTION = {}, _KEY_TO_DIRECTION[ARROW_LEFT_KEY] = DIRECTION_RIGHT, _KEY_TO_DIRECTION[ARROW_RIGHT_KEY] = DIRECTION_LEFT, _KEY_TO_DIRECTION); 5803 var EVENT_SLIDE = "slide" + EVENT_KEY$9; 5804 var EVENT_SLID = "slid" + EVENT_KEY$9; 5805 var EVENT_KEYDOWN = "keydown" + EVENT_KEY$9; 5806 var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$9; 5807 var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$9; 5808 var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$9; 5809 var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$9; 5810 var EVENT_TOUCHEND = "touchend" + EVENT_KEY$9; 5811 var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$9; 5812 var EVENT_POINTERUP = "pointerup" + EVENT_KEY$9; 5813 var EVENT_DRAG_START = "dragstart" + EVENT_KEY$9; 5814 var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$9 + DATA_API_KEY$5; 5815 var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$9 + DATA_API_KEY$5; 5816 var CLASS_NAME_CAROUSEL = 'carousel'; 5817 var CLASS_NAME_ACTIVE$2 = 'active'; 5818 var CLASS_NAME_SLIDE = 'slide'; 5819 var CLASS_NAME_END = 'carousel-item-end'; 5820 var CLASS_NAME_START = 'carousel-item-start'; 5821 var CLASS_NAME_NEXT = 'carousel-item-next'; 5822 var CLASS_NAME_PREV = 'carousel-item-prev'; 5823 var CLASS_NAME_POINTER_EVENT = 'pointer-event'; 5824 var SELECTOR_ACTIVE$1 = '.active'; 5825 var SELECTOR_ACTIVE_ITEM = '.active.carousel-item'; 5826 var SELECTOR_ITEM = '.carousel-item'; 5827 var SELECTOR_ITEM_IMG = '.carousel-item img'; 5828 var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'; 5829 var SELECTOR_INDICATORS = '.carousel-indicators'; 5830 var SELECTOR_INDICATOR = '[data-bs-target]'; 5831 var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'; 5832 var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'; 5833 var POINTER_TYPE_TOUCH = 'touch'; 5834 var POINTER_TYPE_PEN = 'pen'; 5835 /** 5836 * ------------------------------------------------------------------------ 5837 * Class Definition 5838 * ------------------------------------------------------------------------ 5839 */ 5840 5841 var Carousel = /*#__PURE__*/function (_BaseComponent) { 5842 _inheritsLoose(Carousel, _BaseComponent); 5843 5844 function Carousel(element, config) { 5845 var _this; 5846 5847 _this = _BaseComponent.call(this, element) || this; 5848 _this._items = null; 5849 _this._interval = null; 5850 _this._activeElement = null; 5851 _this._isPaused = false; 5852 _this._isSliding = false; 5853 _this.touchTimeout = null; 5854 _this.touchStartX = 0; 5855 _this.touchDeltaX = 0; 5856 _this._config = _this._getConfig(config); 5857 _this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, _this._element); 5858 _this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; 5859 _this._pointerEvent = Boolean(window.PointerEvent); 5860 5861 _this._addEventListeners(); 5862 5863 return _this; 5864 } // Getters 5865 5866 5867 var _proto = Carousel.prototype; 5868 5869 // Public 5870 _proto.next = function next() { 5871 this._slide(ORDER_NEXT); 5872 }; 5873 5874 _proto.nextWhenVisible = function nextWhenVisible() { 5875 // Don't call next when the page isn't visible 5876 // or the carousel or its parent isn't visible 5877 if (!document.hidden && isVisible(this._element)) { 5878 this.next(); 5879 } 5880 }; 5881 5882 _proto.prev = function prev() { 5883 this._slide(ORDER_PREV); 5884 }; 5885 5886 _proto.pause = function pause(event) { 5887 if (!event) { 5888 this._isPaused = true; 5889 } 5890 5891 if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) { 5892 triggerTransitionEnd(this._element); 5893 this.cycle(true); 5894 } 5895 5896 clearInterval(this._interval); 5897 this._interval = null; 5898 }; 5899 5900 _proto.cycle = function cycle(event) { 5901 if (!event) { 5902 this._isPaused = false; 5903 } 5904 5905 if (this._interval) { 5906 clearInterval(this._interval); 5907 this._interval = null; 5908 } 5909 5910 if (this._config && this._config.interval && !this._isPaused) { 5911 this._updateInterval(); 5912 5913 this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); 5914 } 5915 }; 5916 5917 _proto.to = function to(index) { 5918 var _this2 = this; 5919 5920 this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element); 5921 5922 var activeIndex = this._getItemIndex(this._activeElement); 5923 5924 if (index > this._items.length - 1 || index < 0) { 5925 return; 5926 } 5927 5928 if (this._isSliding) { 5929 EventHandler.one(this._element, EVENT_SLID, function () { 5930 return _this2.to(index); 5931 }); 5932 return; 5933 } 5934 5935 if (activeIndex === index) { 5936 this.pause(); 5937 this.cycle(); 5938 return; 5939 } 5940 5941 var order = index > activeIndex ? ORDER_NEXT : ORDER_PREV; 5942 5943 this._slide(order, this._items[index]); 5944 } // Private 5945 ; 5946 5947 _proto._getConfig = function _getConfig(config) { 5948 config = Object.assign({}, Default$9, Manipulator.getDataAttributes(this._element), typeof config === 'object' ? config : {}); 5949 typeCheckConfig(NAME$b, config, DefaultType$9); 5950 return config; 5951 }; 5952 5953 _proto._handleSwipe = function _handleSwipe() { 5954 var absDeltax = Math.abs(this.touchDeltaX); 5955 5956 if (absDeltax <= SWIPE_THRESHOLD) { 5957 return; 5958 } 5959 5960 var direction = absDeltax / this.touchDeltaX; 5961 this.touchDeltaX = 0; 5962 5963 if (!direction) { 5964 return; 5965 } 5966 5967 this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT); 5968 }; 5969 5970 _proto._addEventListeners = function _addEventListeners() { 5971 var _this3 = this; 5972 5973 if (this._config.keyboard) { 5974 EventHandler.on(this._element, EVENT_KEYDOWN, function (event) { 5975 return _this3._keydown(event); 5976 }); 5977 } 5978 5979 if (this._config.pause === 'hover') { 5980 EventHandler.on(this._element, EVENT_MOUSEENTER, function (event) { 5981 return _this3.pause(event); 5982 }); 5983 EventHandler.on(this._element, EVENT_MOUSELEAVE, function (event) { 5984 return _this3.cycle(event); 5985 }); 5986 } 5987 5988 if (this._config.touch && this._touchSupported) { 5989 this._addTouchEventListeners(); 5990 } 5991 }; 5992 5993 _proto._addTouchEventListeners = function _addTouchEventListeners() { 5994 var _this4 = this; 5995 5996 var hasPointerPenTouch = function hasPointerPenTouch(event) { 5997 return _this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH); 5998 }; 5999 6000 var start = function start(event) { 6001 if (hasPointerPenTouch(event)) { 6002 _this4.touchStartX = event.clientX; 6003 } else if (!_this4._pointerEvent) { 6004 _this4.touchStartX = event.touches[0].clientX; 6005 } 6006 }; 6007 6008 var move = function move(event) { 6009 // ensure swiping with one touch and not pinching 6010 _this4.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - _this4.touchStartX; 6011 }; 6012 6013 var end = function end(event) { 6014 if (hasPointerPenTouch(event)) { 6015 _this4.touchDeltaX = event.clientX - _this4.touchStartX; 6016 } 6017 6018 _this4._handleSwipe(); 6019 6020 if (_this4._config.pause === 'hover') { 6021 // If it's a touch-enabled device, mouseenter/leave are fired as 6022 // part of the mouse compatibility events on first tap - the carousel 6023 // would stop cycling until user tapped out of it; 6024 // here, we listen for touchend, explicitly pause the carousel 6025 // (as if it's the second time we tap on it, mouseenter compat event 6026 // is NOT fired) and after a timeout (to allow for mouse compatibility 6027 // events to fire) we explicitly restart cycling 6028 _this4.pause(); 6029 6030 if (_this4.touchTimeout) { 6031 clearTimeout(_this4.touchTimeout); 6032 } 6033 6034 _this4.touchTimeout = setTimeout(function (event) { 6035 return _this4.cycle(event); 6036 }, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval); 6037 } 6038 }; 6039 6040 SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) { 6041 EventHandler.on(itemImg, EVENT_DRAG_START, function (event) { 6042 return event.preventDefault(); 6043 }); 6044 }); 6045 6046 if (this._pointerEvent) { 6047 EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) { 6048 return start(event); 6049 }); 6050 EventHandler.on(this._element, EVENT_POINTERUP, function (event) { 6051 return end(event); 6052 }); 6053 6054 this._element.classList.add(CLASS_NAME_POINTER_EVENT); 6055 } else { 6056 EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) { 6057 return start(event); 6058 }); 6059 EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) { 6060 return move(event); 6061 }); 6062 EventHandler.on(this._element, EVENT_TOUCHEND, function (event) { 6063 return end(event); 6064 }); 6065 } 6066 }; 6067 6068 _proto._keydown = function _keydown(event) { 6069 if (/input|textarea/i.test(event.target.tagName)) { 6070 return; 6071 } 6072 6073 var direction = KEY_TO_DIRECTION[event.key]; 6074 6075 if (direction) { 6076 event.preventDefault(); 6077 6078 this._slide(direction); 6079 } 6080 }; 6081 6082 _proto._getItemIndex = function _getItemIndex(element) { 6083 this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : []; 6084 return this._items.indexOf(element); 6085 }; 6086 6087 _proto._getItemByOrder = function _getItemByOrder(order, activeElement) { 6088 var isNext = order === ORDER_NEXT; 6089 return getNextActiveElement(this._items, activeElement, isNext, this._config.wrap); 6090 }; 6091 6092 _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { 6093 var targetIndex = this._getItemIndex(relatedTarget); 6094 6095 var fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)); 6096 6097 return EventHandler.trigger(this._element, EVENT_SLIDE, { 6098 relatedTarget: relatedTarget, 6099 direction: eventDirectionName, 6100 from: fromIndex, 6101 to: targetIndex 6102 }); 6103 }; 6104 6105 _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { 6106 if (this._indicatorsElement) { 6107 var activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE$1, this._indicatorsElement); 6108 activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2); 6109 activeIndicator.removeAttribute('aria-current'); 6110 var indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement); 6111 6112 for (var i = 0; i < indicators.length; i++) { 6113 if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) { 6114 indicators[i].classList.add(CLASS_NAME_ACTIVE$2); 6115 indicators[i].setAttribute('aria-current', 'true'); 6116 break; 6117 } 6118 } 6119 } 6120 }; 6121 6122 _proto._updateInterval = function _updateInterval() { 6123 var element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element); 6124 6125 if (!element) { 6126 return; 6127 } 6128 6129 var elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10); 6130 6131 if (elementInterval) { 6132 this._config.defaultInterval = this._config.defaultInterval || this._config.interval; 6133 this._config.interval = elementInterval; 6134 } else { 6135 this._config.interval = this._config.defaultInterval || this._config.interval; 6136 } 6137 }; 6138 6139 _proto._slide = function _slide(directionOrOrder, element) { 6140 var _this5 = this; 6141 6142 var order = this._directionToOrder(directionOrOrder); 6143 6144 var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element); 6145 6146 var activeElementIndex = this._getItemIndex(activeElement); 6147 6148 var nextElement = element || this._getItemByOrder(order, activeElement); 6149 6150 var nextElementIndex = this._getItemIndex(nextElement); 6151 6152 var isCycling = Boolean(this._interval); 6153 var isNext = order === ORDER_NEXT; 6154 var directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END; 6155 var orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV; 6156 6157 var eventDirectionName = this._orderToDirection(order); 6158 6159 if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$2)) { 6160 this._isSliding = false; 6161 return; 6162 } 6163 6164 if (this._isSliding) { 6165 return; 6166 } 6167 6168 var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); 6169 6170 if (slideEvent.defaultPrevented) { 6171 return; 6172 } 6173 6174 if (!activeElement || !nextElement) { 6175 // Some weirdness is happening, so we bail 6176 return; 6177 } 6178 6179 this._isSliding = true; 6180 6181 if (isCycling) { 6182 this.pause(); 6183 } 6184 6185 this._setActiveIndicatorElement(nextElement); 6186 6187 this._activeElement = nextElement; 6188 6189 var triggerSlidEvent = function triggerSlidEvent() { 6190 EventHandler.trigger(_this5._element, EVENT_SLID, { 6191 relatedTarget: nextElement, 6192 direction: eventDirectionName, 6193 from: activeElementIndex, 6194 to: nextElementIndex 6195 }); 6196 }; 6197 6198 if (this._element.classList.contains(CLASS_NAME_SLIDE)) { 6199 nextElement.classList.add(orderClassName); 6200 reflow(nextElement); 6201 activeElement.classList.add(directionalClassName); 6202 nextElement.classList.add(directionalClassName); 6203 6204 var completeCallBack = function completeCallBack() { 6205 nextElement.classList.remove(directionalClassName, orderClassName); 6206 nextElement.classList.add(CLASS_NAME_ACTIVE$2); 6207 activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName); 6208 _this5._isSliding = false; 6209 setTimeout(triggerSlidEvent, 0); 6210 }; 6211 6212 this._queueCallback(completeCallBack, activeElement, true); 6213 } else { 6214 activeElement.classList.remove(CLASS_NAME_ACTIVE$2); 6215 nextElement.classList.add(CLASS_NAME_ACTIVE$2); 6216 this._isSliding = false; 6217 triggerSlidEvent(); 6218 } 6219 6220 if (isCycling) { 6221 this.cycle(); 6222 } 6223 }; 6224 6225 _proto._directionToOrder = function _directionToOrder(direction) { 6226 if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) { 6227 return direction; 6228 } 6229 6230 if (isRTL()) { 6231 return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT; 6232 } 6233 6234 return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV; 6235 }; 6236 6237 _proto._orderToDirection = function _orderToDirection(order) { 6238 if (![ORDER_NEXT, ORDER_PREV].includes(order)) { 6239 return order; 6240 } 6241 6242 if (isRTL()) { 6243 return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT; 6244 } 6245 6246 return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT; 6247 } // Static 6248 ; 6249 6250 Carousel.carouselInterface = function carouselInterface(element, config) { 6251 var data = Carousel.getOrCreateInstance(element, config); 6252 var _config = data._config; 6253 6254 if (typeof config === 'object') { 6255 _config = Object.assign({}, _config, config); 6256 } 6257 6258 var action = typeof config === 'string' ? config : _config.slide; 6259 6260 if (typeof config === 'number') { 6261 data.to(config); 6262 } else if (typeof action === 'string') { 6263 if (typeof data[action] === 'undefined') { 6264 throw new TypeError("No method named \"" + action + "\""); 6265 } 6266 6267 data[action](); 6268 } else if (_config.interval && _config.ride) { 6269 data.pause(); 6270 data.cycle(); 6271 } 6272 }; 6273 6274 Carousel.jQueryInterface = function jQueryInterface(config) { 6275 return this.each(function () { 6276 Carousel.carouselInterface(this, config); 6277 }); 6278 }; 6279 6280 Carousel.dataApiClickHandler = function dataApiClickHandler(event) { 6281 var target = getElementFromSelector(this); 6282 6283 if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) { 6284 return; 6285 } 6286 6287 var config = Object.assign({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this)); 6288 var slideIndex = this.getAttribute('data-bs-slide-to'); 6289 6290 if (slideIndex) { 6291 config.interval = false; 6292 } 6293 6294 Carousel.carouselInterface(target, config); 6295 6296 if (slideIndex) { 6297 Carousel.getInstance(target).to(slideIndex); 6298 } 6299 6300 event.preventDefault(); 6301 }; 6302 6303 _createClass(Carousel, null, [{ 6304 key: "Default", 6305 get: function get() { 6306 return Default$9; 6307 } 6308 }, { 6309 key: "NAME", 6310 get: function get() { 6311 return NAME$b; 6312 } 6313 }]); 6314 6315 return Carousel; 6316 }(BaseComponent); 6317 /** 6318 * ------------------------------------------------------------------------ 6319 * Data Api implementation 6320 * ------------------------------------------------------------------------ 6321 */ 6322 6323 6324 EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler); 6325 EventHandler.on(window, EVENT_LOAD_DATA_API$2, function () { 6326 var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE); 6327 6328 for (var i = 0, len = carousels.length; i < len; i++) { 6329 Carousel.carouselInterface(carousels[i], Carousel.getInstance(carousels[i])); 6330 } 6331 }); 6332 /** 6333 * ------------------------------------------------------------------------ 6334 * jQuery 6335 * ------------------------------------------------------------------------ 6336 * add .Carousel to jQuery only if jQuery is present 6337 */ 6338 6339 defineJQueryPlugin(Carousel); 6340 6341 window.bootstrap = window.bootstrap || {}; 6342 window.bootstrap.Carousel = Carousel; 6343 6344 if (Joomla && Joomla.getOptions) { 6345 // Get the elements/configurations from the PHP 6346 var carousels = Joomla.getOptions('bootstrap.carousel'); // Initialise the elements 6347 6348 if (typeof carousels === 'object' && carousels !== null) { 6349 Object.keys(carousels).forEach(function (carousel) { 6350 var opt = carousels[carousel]; 6351 var options = { 6352 interval: opt.interval ? opt.interval : 5000, 6353 keyboard: opt.keyboard ? opt.keyboard : true, 6354 pause: opt.pause ? opt.pause : 'hover', 6355 slide: opt.slide ? opt.slide : false, 6356 wrap: opt.wrap ? opt.wrap : true, 6357 touch: opt.touch ? opt.touch : true 6358 }; 6359 var elements = Array.from(document.querySelectorAll(carousel)); 6360 6361 if (elements.length) { 6362 elements.map(function (el) { 6363 return new window.bootstrap.Carousel(el, options); 6364 }); 6365 } 6366 }); 6367 } 6368 } 6369 6370 var DESCRIPTORS = descriptors; 6371 var FUNCTION_NAME_EXISTS = functionName.EXISTS; 6372 var uncurryThis$1 = functionUncurryThis; 6373 var defineProperty = objectDefineProperty.f; 6374 6375 var FunctionPrototype = Function.prototype; 6376 var functionToString = uncurryThis$1(FunctionPrototype.toString); 6377 var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/; 6378 var regExpExec = uncurryThis$1(nameRE.exec); 6379 var NAME$a = 'name'; 6380 6381 // Function instances `.name` property 6382 // https://tc39.es/ecma262/#sec-function-instances-name 6383 if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) { 6384 defineProperty(FunctionPrototype, NAME$a, { 6385 configurable: true, 6386 get: function () { 6387 try { 6388 return regExpExec(nameRE, functionToString(this))[1]; 6389 } catch (error) { 6390 return ''; 6391 } 6392 } 6393 }); 6394 } 6395 6396 var global$8 = global$U; 6397 var aCallable$3 = aCallable$7; 6398 var toObject$1 = toObject$a; 6399 var IndexedObject = indexedObject; 6400 var lengthOfArrayLike$1 = lengthOfArrayLike$9; 6401 6402 var TypeError$2 = global$8.TypeError; 6403 6404 // `Array.prototype.{ reduce, reduceRight }` methods implementation 6405 var createMethod = function (IS_RIGHT) { 6406 return function (that, callbackfn, argumentsLength, memo) { 6407 aCallable$3(callbackfn); 6408 var O = toObject$1(that); 6409 var self = IndexedObject(O); 6410 var length = lengthOfArrayLike$1(O); 6411 var index = IS_RIGHT ? length - 1 : 0; 6412 var i = IS_RIGHT ? -1 : 1; 6413 if (argumentsLength < 2) while (true) { 6414 if (index in self) { 6415 memo = self[index]; 6416 index += i; 6417 break; 6418 } 6419 index += i; 6420 if (IS_RIGHT ? index < 0 : length <= index) { 6421 throw TypeError$2('Reduce of empty array with no initial value'); 6422 } 6423 } 6424 for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) { 6425 memo = callbackfn(memo, self[index], index, O); 6426 } 6427 return memo; 6428 }; 6429 }; 6430 6431 var arrayReduce = { 6432 // `Array.prototype.reduce` method 6433 // https://tc39.es/ecma262/#sec-array.prototype.reduce 6434 left: createMethod(false), 6435 // `Array.prototype.reduceRight` method 6436 // https://tc39.es/ecma262/#sec-array.prototype.reduceright 6437 right: createMethod(true) 6438 }; 6439 6440 var classof = classofRaw$1; 6441 var global$7 = global$U; 6442 6443 var engineIsNode = classof(global$7.process) == 'process'; 6444 6445 var $$2 = _export; 6446 var $reduce = arrayReduce.left; 6447 var arrayMethodIsStrict$1 = arrayMethodIsStrict$4; 6448 var CHROME_VERSION = engineV8Version; 6449 var IS_NODE$3 = engineIsNode; 6450 6451 var STRICT_METHOD$1 = arrayMethodIsStrict$1('reduce'); 6452 // Chrome 80-82 has a critical bug 6453 // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982 6454 var CHROME_BUG = !IS_NODE$3 && CHROME_VERSION > 79 && CHROME_VERSION < 83; 6455 6456 // `Array.prototype.reduce` method 6457 // https://tc39.es/ecma262/#sec-array.prototype.reduce 6458 $$2({ target: 'Array', proto: true, forced: !STRICT_METHOD$1 || CHROME_BUG }, { 6459 reduce: function reduce(callbackfn /* , initialValue */) { 6460 var length = arguments.length; 6461 return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined); 6462 } 6463 }); 6464 6465 var top = 'top'; 6466 var bottom = 'bottom'; 6467 var right = 'right'; 6468 var left = 'left'; 6469 var auto = 'auto'; 6470 var basePlacements = [top, bottom, right, left]; 6471 var start = 'start'; 6472 var end = 'end'; 6473 var clippingParents = 'clippingParents'; 6474 var viewport = 'viewport'; 6475 var popper = 'popper'; 6476 var reference = 'reference'; 6477 var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { 6478 return acc.concat([placement + "-" + start, placement + "-" + end]); 6479 }, []); 6480 var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { 6481 return acc.concat([placement, placement + "-" + start, placement + "-" + end]); 6482 }, []); // modifiers that need to read the DOM 6483 6484 var beforeRead = 'beforeRead'; 6485 var read = 'read'; 6486 var afterRead = 'afterRead'; // pure-logic modifiers 6487 6488 var beforeMain = 'beforeMain'; 6489 var main = 'main'; 6490 var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) 6491 6492 var beforeWrite = 'beforeWrite'; 6493 var write = 'write'; 6494 var afterWrite = 'afterWrite'; 6495 var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; 6496 6497 function getNodeName(element) { 6498 return element ? (element.nodeName || '').toLowerCase() : null; 6499 } 6500 6501 function getWindow(node) { 6502 if (node == null) { 6503 return window; 6504 } 6505 6506 if (node.toString() !== '[object Window]') { 6507 var ownerDocument = node.ownerDocument; 6508 return ownerDocument ? ownerDocument.defaultView || window : window; 6509 } 6510 6511 return node; 6512 } 6513 6514 function isElement(node) { 6515 var OwnElement = getWindow(node).Element; 6516 return node instanceof OwnElement || node instanceof Element; 6517 } 6518 6519 function isHTMLElement(node) { 6520 var OwnElement = getWindow(node).HTMLElement; 6521 return node instanceof OwnElement || node instanceof HTMLElement; 6522 } 6523 6524 function isShadowRoot(node) { 6525 // IE 11 has no ShadowRoot 6526 if (typeof ShadowRoot === 'undefined') { 6527 return false; 6528 } 6529 6530 var OwnElement = getWindow(node).ShadowRoot; 6531 return node instanceof OwnElement || node instanceof ShadowRoot; 6532 } 6533 6534 // and applies them to the HTMLElements such as popper and arrow 6535 6536 function applyStyles(_ref) { 6537 var state = _ref.state; 6538 Object.keys(state.elements).forEach(function (name) { 6539 var style = state.styles[name] || {}; 6540 var attributes = state.attributes[name] || {}; 6541 var element = state.elements[name]; // arrow is optional + virtual elements 6542 6543 if (!isHTMLElement(element) || !getNodeName(element)) { 6544 return; 6545 } // Flow doesn't support to extend this property, but it's the most 6546 // effective way to apply styles to an HTMLElement 6547 // $FlowFixMe[cannot-write] 6548 6549 6550 Object.assign(element.style, style); 6551 Object.keys(attributes).forEach(function (name) { 6552 var value = attributes[name]; 6553 6554 if (value === false) { 6555 element.removeAttribute(name); 6556 } else { 6557 element.setAttribute(name, value === true ? '' : value); 6558 } 6559 }); 6560 }); 6561 } 6562 6563 function effect$2(_ref2) { 6564 var state = _ref2.state; 6565 var initialStyles = { 6566 popper: { 6567 position: state.options.strategy, 6568 left: '0', 6569 top: '0', 6570 margin: '0' 6571 }, 6572 arrow: { 6573 position: 'absolute' 6574 }, 6575 reference: {} 6576 }; 6577 Object.assign(state.elements.popper.style, initialStyles.popper); 6578 state.styles = initialStyles; 6579 6580 if (state.elements.arrow) { 6581 Object.assign(state.elements.arrow.style, initialStyles.arrow); 6582 } 6583 6584 return function () { 6585 Object.keys(state.elements).forEach(function (name) { 6586 var element = state.elements[name]; 6587 var attributes = state.attributes[name] || {}; 6588 var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them 6589 6590 var style = styleProperties.reduce(function (style, property) { 6591 style[property] = ''; 6592 return style; 6593 }, {}); // arrow is optional + virtual elements 6594 6595 if (!isHTMLElement(element) || !getNodeName(element)) { 6596 return; 6597 } 6598 6599 Object.assign(element.style, style); 6600 Object.keys(attributes).forEach(function (attribute) { 6601 element.removeAttribute(attribute); 6602 }); 6603 }); 6604 }; 6605 } // eslint-disable-next-line import/no-unused-modules 6606 6607 6608 var applyStyles$1 = { 6609 name: 'applyStyles', 6610 enabled: true, 6611 phase: 'write', 6612 fn: applyStyles, 6613 effect: effect$2, 6614 requires: ['computeStyles'] 6615 }; 6616 6617 function getBasePlacement(placement) { 6618 return placement.split('-')[0]; 6619 } 6620 6621 var max = Math.max; 6622 var min = Math.min; 6623 var round = Math.round; 6624 6625 function getBoundingClientRect(element, includeScale) { 6626 if (includeScale === void 0) { 6627 includeScale = false; 6628 } 6629 6630 var rect = element.getBoundingClientRect(); 6631 var scaleX = 1; 6632 var scaleY = 1; 6633 6634 if (isHTMLElement(element) && includeScale) { 6635 var offsetHeight = element.offsetHeight; 6636 var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale 6637 // Fallback to 1 in case both values are `0` 6638 6639 if (offsetWidth > 0) { 6640 scaleX = round(rect.width) / offsetWidth || 1; 6641 } 6642 6643 if (offsetHeight > 0) { 6644 scaleY = round(rect.height) / offsetHeight || 1; 6645 } 6646 } 6647 6648 return { 6649 width: rect.width / scaleX, 6650 height: rect.height / scaleY, 6651 top: rect.top / scaleY, 6652 right: rect.right / scaleX, 6653 bottom: rect.bottom / scaleY, 6654 left: rect.left / scaleX, 6655 x: rect.left / scaleX, 6656 y: rect.top / scaleY 6657 }; 6658 } 6659 6660 // means it doesn't take into account transforms. 6661 6662 function getLayoutRect(element) { 6663 var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. 6664 // Fixes https://github.com/popperjs/popper-core/issues/1223 6665 6666 var width = element.offsetWidth; 6667 var height = element.offsetHeight; 6668 6669 if (Math.abs(clientRect.width - width) <= 1) { 6670 width = clientRect.width; 6671 } 6672 6673 if (Math.abs(clientRect.height - height) <= 1) { 6674 height = clientRect.height; 6675 } 6676 6677 return { 6678 x: element.offsetLeft, 6679 y: element.offsetTop, 6680 width: width, 6681 height: height 6682 }; 6683 } 6684 6685 function contains(parent, child) { 6686 var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method 6687 6688 if (parent.contains(child)) { 6689 return true; 6690 } // then fallback to custom implementation with Shadow DOM support 6691 else if (rootNode && isShadowRoot(rootNode)) { 6692 var next = child; 6693 6694 do { 6695 if (next && parent.isSameNode(next)) { 6696 return true; 6697 } // $FlowFixMe[prop-missing]: need a better way to handle this... 6698 6699 6700 next = next.parentNode || next.host; 6701 } while (next); 6702 } // Give up, the result is false 6703 6704 6705 return false; 6706 } 6707 6708 function getComputedStyle$1(element) { 6709 return getWindow(element).getComputedStyle(element); 6710 } 6711 6712 function isTableElement(element) { 6713 return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; 6714 } 6715 6716 function getDocumentElement(element) { 6717 // $FlowFixMe[incompatible-return]: assume body is always available 6718 return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] 6719 element.document) || window.document).documentElement; 6720 } 6721 6722 function getParentNode(element) { 6723 if (getNodeName(element) === 'html') { 6724 return element; 6725 } 6726 6727 return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle 6728 // $FlowFixMe[incompatible-return] 6729 // $FlowFixMe[prop-missing] 6730 element.assignedSlot || // step into the shadow DOM of the parent of a slotted node 6731 element.parentNode || ( // DOM Element detected 6732 isShadowRoot(element) ? element.host : null) || // ShadowRoot detected 6733 // $FlowFixMe[incompatible-call]: HTMLElement is a Node 6734 getDocumentElement(element) // fallback 6735 6736 ); 6737 } 6738 6739 function getTrueOffsetParent(element) { 6740 if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 6741 getComputedStyle$1(element).position === 'fixed') { 6742 return null; 6743 } 6744 6745 return element.offsetParent; 6746 } // `.offsetParent` reports `null` for fixed elements, while absolute elements 6747 // return the containing block 6748 6749 6750 function getContainingBlock(element) { 6751 var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1; 6752 var isIE = navigator.userAgent.indexOf('Trident') !== -1; 6753 6754 if (isIE && isHTMLElement(element)) { 6755 // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport 6756 var elementCss = getComputedStyle$1(element); 6757 6758 if (elementCss.position === 'fixed') { 6759 return null; 6760 } 6761 } 6762 6763 var currentNode = getParentNode(element); 6764 6765 while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { 6766 var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that 6767 // create a containing block. 6768 // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block 6769 6770 if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { 6771 return currentNode; 6772 } else { 6773 currentNode = currentNode.parentNode; 6774 } 6775 } 6776 6777 return null; 6778 } // Gets the closest ancestor positioned element. Handles some edge cases, 6779 // such as table ancestors and cross browser bugs. 6780 6781 6782 function getOffsetParent(element) { 6783 var window = getWindow(element); 6784 var offsetParent = getTrueOffsetParent(element); 6785 6786 while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') { 6787 offsetParent = getTrueOffsetParent(offsetParent); 6788 } 6789 6790 if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) { 6791 return window; 6792 } 6793 6794 return offsetParent || getContainingBlock(element) || window; 6795 } 6796 6797 function getMainAxisFromPlacement(placement) { 6798 return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; 6799 } 6800 6801 function within(min$1, value, max$1) { 6802 return max(min$1, min(value, max$1)); 6803 } 6804 function withinMaxClamp(min, value, max) { 6805 var v = within(min, value, max); 6806 return v > max ? max : v; 6807 } 6808 6809 function getFreshSideObject() { 6810 return { 6811 top: 0, 6812 right: 0, 6813 bottom: 0, 6814 left: 0 6815 }; 6816 } 6817 6818 function mergePaddingObject(paddingObject) { 6819 return Object.assign({}, getFreshSideObject(), paddingObject); 6820 } 6821 6822 function expandToHashMap(value, keys) { 6823 return keys.reduce(function (hashMap, key) { 6824 hashMap[key] = value; 6825 return hashMap; 6826 }, {}); 6827 } 6828 6829 var toPaddingObject = function toPaddingObject(padding, state) { 6830 padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { 6831 placement: state.placement 6832 })) : padding; 6833 return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); 6834 }; 6835 6836 function arrow(_ref) { 6837 var _state$modifiersData$; 6838 6839 var state = _ref.state, 6840 name = _ref.name, 6841 options = _ref.options; 6842 var arrowElement = state.elements.arrow; 6843 var popperOffsets = state.modifiersData.popperOffsets; 6844 var basePlacement = getBasePlacement(state.placement); 6845 var axis = getMainAxisFromPlacement(basePlacement); 6846 var isVertical = [left, right].indexOf(basePlacement) >= 0; 6847 var len = isVertical ? 'height' : 'width'; 6848 6849 if (!arrowElement || !popperOffsets) { 6850 return; 6851 } 6852 6853 var paddingObject = toPaddingObject(options.padding, state); 6854 var arrowRect = getLayoutRect(arrowElement); 6855 var minProp = axis === 'y' ? top : left; 6856 var maxProp = axis === 'y' ? bottom : right; 6857 var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; 6858 var startDiff = popperOffsets[axis] - state.rects.reference[axis]; 6859 var arrowOffsetParent = getOffsetParent(arrowElement); 6860 var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; 6861 var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is 6862 // outside of the popper bounds 6863 6864 var min = paddingObject[minProp]; 6865 var max = clientSize - arrowRect[len] - paddingObject[maxProp]; 6866 var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; 6867 var offset = within(min, center, max); // Prevents breaking syntax highlighting... 6868 6869 var axisProp = axis; 6870 state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); 6871 } 6872 6873 function effect$1(_ref2) { 6874 var state = _ref2.state, 6875 options = _ref2.options; 6876 var _options$element = options.element, 6877 arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; 6878 6879 if (arrowElement == null) { 6880 return; 6881 } // CSS selector 6882 6883 6884 if (typeof arrowElement === 'string') { 6885 arrowElement = state.elements.popper.querySelector(arrowElement); 6886 6887 if (!arrowElement) { 6888 return; 6889 } 6890 } 6891 6892 if (!contains(state.elements.popper, arrowElement)) { 6893 6894 return; 6895 } 6896 6897 state.elements.arrow = arrowElement; 6898 } // eslint-disable-next-line import/no-unused-modules 6899 6900 6901 var arrow$1 = { 6902 name: 'arrow', 6903 enabled: true, 6904 phase: 'main', 6905 fn: arrow, 6906 effect: effect$1, 6907 requires: ['popperOffsets'], 6908 requiresIfExists: ['preventOverflow'] 6909 }; 6910 6911 function getVariation(placement) { 6912 return placement.split('-')[1]; 6913 } 6914 6915 var unsetSides = { 6916 top: 'auto', 6917 right: 'auto', 6918 bottom: 'auto', 6919 left: 'auto' 6920 }; // Round the offsets to the nearest suitable subpixel based on the DPR. 6921 // Zooming can change the DPR, but it seems to report a value that will 6922 // cleanly divide the values into the appropriate subpixels. 6923 6924 function roundOffsetsByDPR(_ref) { 6925 var x = _ref.x, 6926 y = _ref.y; 6927 var win = window; 6928 var dpr = win.devicePixelRatio || 1; 6929 return { 6930 x: round(x * dpr) / dpr || 0, 6931 y: round(y * dpr) / dpr || 0 6932 }; 6933 } 6934 6935 function mapToStyles(_ref2) { 6936 var _Object$assign2; 6937 6938 var popper = _ref2.popper, 6939 popperRect = _ref2.popperRect, 6940 placement = _ref2.placement, 6941 variation = _ref2.variation, 6942 offsets = _ref2.offsets, 6943 position = _ref2.position, 6944 gpuAcceleration = _ref2.gpuAcceleration, 6945 adaptive = _ref2.adaptive, 6946 roundOffsets = _ref2.roundOffsets, 6947 isFixed = _ref2.isFixed; 6948 6949 var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, 6950 _ref3$x = _ref3.x, 6951 x = _ref3$x === void 0 ? 0 : _ref3$x, 6952 _ref3$y = _ref3.y, 6953 y = _ref3$y === void 0 ? 0 : _ref3$y; 6954 6955 var hasX = offsets.hasOwnProperty('x'); 6956 var hasY = offsets.hasOwnProperty('y'); 6957 var sideX = left; 6958 var sideY = top; 6959 var win = window; 6960 6961 if (adaptive) { 6962 var offsetParent = getOffsetParent(popper); 6963 var heightProp = 'clientHeight'; 6964 var widthProp = 'clientWidth'; 6965 6966 if (offsetParent === getWindow(popper)) { 6967 offsetParent = getDocumentElement(popper); 6968 6969 if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') { 6970 heightProp = 'scrollHeight'; 6971 widthProp = 'scrollWidth'; 6972 } 6973 } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it 6974 6975 6976 offsetParent = offsetParent; 6977 6978 if (placement === top || (placement === left || placement === right) && variation === end) { 6979 sideY = bottom; 6980 var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] 6981 offsetParent[heightProp]; 6982 y -= offsetY - popperRect.height; 6983 y *= gpuAcceleration ? 1 : -1; 6984 } 6985 6986 if (placement === left || (placement === top || placement === bottom) && variation === end) { 6987 sideX = right; 6988 var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] 6989 offsetParent[widthProp]; 6990 x -= offsetX - popperRect.width; 6991 x *= gpuAcceleration ? 1 : -1; 6992 } 6993 } 6994 6995 var commonStyles = Object.assign({ 6996 position: position 6997 }, adaptive && unsetSides); 6998 6999 if (gpuAcceleration) { 7000 var _Object$assign; 7001 7002 return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); 7003 } 7004 7005 return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); 7006 } 7007 7008 function computeStyles(_ref4) { 7009 var state = _ref4.state, 7010 options = _ref4.options; 7011 var _options$gpuAccelerat = options.gpuAcceleration, 7012 gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, 7013 _options$adaptive = options.adaptive, 7014 adaptive = _options$adaptive === void 0 ? true : _options$adaptive, 7015 _options$roundOffsets = options.roundOffsets, 7016 roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; 7017 7018 var commonStyles = { 7019 placement: getBasePlacement(state.placement), 7020 variation: getVariation(state.placement), 7021 popper: state.elements.popper, 7022 popperRect: state.rects.popper, 7023 gpuAcceleration: gpuAcceleration, 7024 isFixed: state.options.strategy === 'fixed' 7025 }; 7026 7027 if (state.modifiersData.popperOffsets != null) { 7028 state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { 7029 offsets: state.modifiersData.popperOffsets, 7030 position: state.options.strategy, 7031 adaptive: adaptive, 7032 roundOffsets: roundOffsets 7033 }))); 7034 } 7035 7036 if (state.modifiersData.arrow != null) { 7037 state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { 7038 offsets: state.modifiersData.arrow, 7039 position: 'absolute', 7040 adaptive: false, 7041 roundOffsets: roundOffsets 7042 }))); 7043 } 7044 7045 state.attributes.popper = Object.assign({}, state.attributes.popper, { 7046 'data-popper-placement': state.placement 7047 }); 7048 } // eslint-disable-next-line import/no-unused-modules 7049 7050 7051 var computeStyles$1 = { 7052 name: 'computeStyles', 7053 enabled: true, 7054 phase: 'beforeWrite', 7055 fn: computeStyles, 7056 data: {} 7057 }; 7058 7059 var passive = { 7060 passive: true 7061 }; 7062 7063 function effect(_ref) { 7064 var state = _ref.state, 7065 instance = _ref.instance, 7066 options = _ref.options; 7067 var _options$scroll = options.scroll, 7068 scroll = _options$scroll === void 0 ? true : _options$scroll, 7069 _options$resize = options.resize, 7070 resize = _options$resize === void 0 ? true : _options$resize; 7071 var window = getWindow(state.elements.popper); 7072 var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); 7073 7074 if (scroll) { 7075 scrollParents.forEach(function (scrollParent) { 7076 scrollParent.addEventListener('scroll', instance.update, passive); 7077 }); 7078 } 7079 7080 if (resize) { 7081 window.addEventListener('resize', instance.update, passive); 7082 } 7083 7084 return function () { 7085 if (scroll) { 7086 scrollParents.forEach(function (scrollParent) { 7087 scrollParent.removeEventListener('scroll', instance.update, passive); 7088 }); 7089 } 7090 7091 if (resize) { 7092 window.removeEventListener('resize', instance.update, passive); 7093 } 7094 }; 7095 } // eslint-disable-next-line import/no-unused-modules 7096 7097 7098 var eventListeners = { 7099 name: 'eventListeners', 7100 enabled: true, 7101 phase: 'write', 7102 fn: function fn() {}, 7103 effect: effect, 7104 data: {} 7105 }; 7106 7107 var hash$1 = { 7108 left: 'right', 7109 right: 'left', 7110 bottom: 'top', 7111 top: 'bottom' 7112 }; 7113 function getOppositePlacement(placement) { 7114 return placement.replace(/left|right|bottom|top/g, function (matched) { 7115 return hash$1[matched]; 7116 }); 7117 } 7118 7119 var hash = { 7120 start: 'end', 7121 end: 'start' 7122 }; 7123 function getOppositeVariationPlacement(placement) { 7124 return placement.replace(/start|end/g, function (matched) { 7125 return hash[matched]; 7126 }); 7127 } 7128 7129 function getWindowScroll(node) { 7130 var win = getWindow(node); 7131 var scrollLeft = win.pageXOffset; 7132 var scrollTop = win.pageYOffset; 7133 return { 7134 scrollLeft: scrollLeft, 7135 scrollTop: scrollTop 7136 }; 7137 } 7138 7139 function getWindowScrollBarX(element) { 7140 // If <html> has a CSS width greater than the viewport, then this will be 7141 // incorrect for RTL. 7142 // Popper 1 is broken in this case and never had a bug report so let's assume 7143 // it's not an issue. I don't think anyone ever specifies width on <html> 7144 // anyway. 7145 // Browsers where the left scrollbar doesn't cause an issue report `0` for 7146 // this (e.g. Edge 2019, IE11, Safari) 7147 return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; 7148 } 7149 7150 function getViewportRect(element) { 7151 var win = getWindow(element); 7152 var html = getDocumentElement(element); 7153 var visualViewport = win.visualViewport; 7154 var width = html.clientWidth; 7155 var height = html.clientHeight; 7156 var x = 0; 7157 var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper 7158 // can be obscured underneath it. 7159 // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even 7160 // if it isn't open, so if this isn't available, the popper will be detected 7161 // to overflow the bottom of the screen too early. 7162 7163 if (visualViewport) { 7164 width = visualViewport.width; 7165 height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently) 7166 // In Chrome, it returns a value very close to 0 (+/-) but contains rounding 7167 // errors due to floating point numbers, so we need to check precision. 7168 // Safari returns a number <= 0, usually < -1 when pinch-zoomed 7169 // Feature detection fails in mobile emulation mode in Chrome. 7170 // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) < 7171 // 0.001 7172 // Fallback here: "Not Safari" userAgent 7173 7174 if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { 7175 x = visualViewport.offsetLeft; 7176 y = visualViewport.offsetTop; 7177 } 7178 } 7179 7180 return { 7181 width: width, 7182 height: height, 7183 x: x + getWindowScrollBarX(element), 7184 y: y 7185 }; 7186 } 7187 7188 // of the `<html>` and `<body>` rect bounds if horizontally scrollable 7189 7190 function getDocumentRect(element) { 7191 var _element$ownerDocumen; 7192 7193 var html = getDocumentElement(element); 7194 var winScroll = getWindowScroll(element); 7195 var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; 7196 var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); 7197 var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); 7198 var x = -winScroll.scrollLeft + getWindowScrollBarX(element); 7199 var y = -winScroll.scrollTop; 7200 7201 if (getComputedStyle$1(body || html).direction === 'rtl') { 7202 x += max(html.clientWidth, body ? body.clientWidth : 0) - width; 7203 } 7204 7205 return { 7206 width: width, 7207 height: height, 7208 x: x, 7209 y: y 7210 }; 7211 } 7212 7213 function isScrollParent(element) { 7214 // Firefox wants us to check `-x` and `-y` variations as well 7215 var _getComputedStyle = getComputedStyle$1(element), 7216 overflow = _getComputedStyle.overflow, 7217 overflowX = _getComputedStyle.overflowX, 7218 overflowY = _getComputedStyle.overflowY; 7219 7220 return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); 7221 } 7222 7223 function getScrollParent(node) { 7224 if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { 7225 // $FlowFixMe[incompatible-return]: assume body is always available 7226 return node.ownerDocument.body; 7227 } 7228 7229 if (isHTMLElement(node) && isScrollParent(node)) { 7230 return node; 7231 } 7232 7233 return getScrollParent(getParentNode(node)); 7234 } 7235 7236 /* 7237 given a DOM element, return the list of all scroll parents, up the list of ancesors 7238 until we get to the top window object. This list is what we attach scroll listeners 7239 to, because if any of these parent elements scroll, we'll need to re-calculate the 7240 reference element's position. 7241 */ 7242 7243 function listScrollParents(element, list) { 7244 var _element$ownerDocumen; 7245 7246 if (list === void 0) { 7247 list = []; 7248 } 7249 7250 var scrollParent = getScrollParent(element); 7251 var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); 7252 var win = getWindow(scrollParent); 7253 var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; 7254 var updatedList = list.concat(target); 7255 return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here 7256 updatedList.concat(listScrollParents(getParentNode(target))); 7257 } 7258 7259 function rectToClientRect(rect) { 7260 return Object.assign({}, rect, { 7261 left: rect.x, 7262 top: rect.y, 7263 right: rect.x + rect.width, 7264 bottom: rect.y + rect.height 7265 }); 7266 } 7267 7268 function getInnerBoundingClientRect(element) { 7269 var rect = getBoundingClientRect(element); 7270 rect.top = rect.top + element.clientTop; 7271 rect.left = rect.left + element.clientLeft; 7272 rect.bottom = rect.top + element.clientHeight; 7273 rect.right = rect.left + element.clientWidth; 7274 rect.width = element.clientWidth; 7275 rect.height = element.clientHeight; 7276 rect.x = rect.left; 7277 rect.y = rect.top; 7278 return rect; 7279 } 7280 7281 function getClientRectFromMixedType(element, clippingParent) { 7282 return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); 7283 } // A "clipping parent" is an overflowable container with the characteristic of 7284 // clipping (or hiding) overflowing elements with a position different from 7285 // `initial` 7286 7287 7288 function getClippingParents(element) { 7289 var clippingParents = listScrollParents(getParentNode(element)); 7290 var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0; 7291 var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; 7292 7293 if (!isElement(clipperElement)) { 7294 return []; 7295 } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 7296 7297 7298 return clippingParents.filter(function (clippingParent) { 7299 return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle$1(clippingParent).position !== 'static' : true); 7300 }); 7301 } // Gets the maximum area that the element is visible in due to any number of 7302 // clipping parents 7303 7304 7305 function getClippingRect(element, boundary, rootBoundary) { 7306 var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); 7307 var clippingParents = [].concat(mainClippingParents, [rootBoundary]); 7308 var firstClippingParent = clippingParents[0]; 7309 var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { 7310 var rect = getClientRectFromMixedType(element, clippingParent); 7311 accRect.top = max(rect.top, accRect.top); 7312 accRect.right = min(rect.right, accRect.right); 7313 accRect.bottom = min(rect.bottom, accRect.bottom); 7314 accRect.left = max(rect.left, accRect.left); 7315 return accRect; 7316 }, getClientRectFromMixedType(element, firstClippingParent)); 7317 clippingRect.width = clippingRect.right - clippingRect.left; 7318 clippingRect.height = clippingRect.bottom - clippingRect.top; 7319 clippingRect.x = clippingRect.left; 7320 clippingRect.y = clippingRect.top; 7321 return clippingRect; 7322 } 7323 7324 function computeOffsets(_ref) { 7325 var reference = _ref.reference, 7326 element = _ref.element, 7327 placement = _ref.placement; 7328 var basePlacement = placement ? getBasePlacement(placement) : null; 7329 var variation = placement ? getVariation(placement) : null; 7330 var commonX = reference.x + reference.width / 2 - element.width / 2; 7331 var commonY = reference.y + reference.height / 2 - element.height / 2; 7332 var offsets; 7333 7334 switch (basePlacement) { 7335 case top: 7336 offsets = { 7337 x: commonX, 7338 y: reference.y - element.height 7339 }; 7340 break; 7341 7342 case bottom: 7343 offsets = { 7344 x: commonX, 7345 y: reference.y + reference.height 7346 }; 7347 break; 7348 7349 case right: 7350 offsets = { 7351 x: reference.x + reference.width, 7352 y: commonY 7353 }; 7354 break; 7355 7356 case left: 7357 offsets = { 7358 x: reference.x - element.width, 7359 y: commonY 7360 }; 7361 break; 7362 7363 default: 7364 offsets = { 7365 x: reference.x, 7366 y: reference.y 7367 }; 7368 } 7369 7370 var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; 7371 7372 if (mainAxis != null) { 7373 var len = mainAxis === 'y' ? 'height' : 'width'; 7374 7375 switch (variation) { 7376 case start: 7377 offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); 7378 break; 7379 7380 case end: 7381 offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); 7382 break; 7383 } 7384 } 7385 7386 return offsets; 7387 } 7388 7389 function detectOverflow(state, options) { 7390 if (options === void 0) { 7391 options = {}; 7392 } 7393 7394 var _options = options, 7395 _options$placement = _options.placement, 7396 placement = _options$placement === void 0 ? state.placement : _options$placement, 7397 _options$boundary = _options.boundary, 7398 boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, 7399 _options$rootBoundary = _options.rootBoundary, 7400 rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, 7401 _options$elementConte = _options.elementContext, 7402 elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, 7403 _options$altBoundary = _options.altBoundary, 7404 altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, 7405 _options$padding = _options.padding, 7406 padding = _options$padding === void 0 ? 0 : _options$padding; 7407 var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); 7408 var altContext = elementContext === popper ? reference : popper; 7409 var popperRect = state.rects.popper; 7410 var element = state.elements[altBoundary ? altContext : elementContext]; 7411 var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); 7412 var referenceClientRect = getBoundingClientRect(state.elements.reference); 7413 var popperOffsets = computeOffsets({ 7414 reference: referenceClientRect, 7415 element: popperRect, 7416 strategy: 'absolute', 7417 placement: placement 7418 }); 7419 var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); 7420 var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect 7421 // 0 or negative = within the clipping rect 7422 7423 var overflowOffsets = { 7424 top: clippingClientRect.top - elementClientRect.top + paddingObject.top, 7425 bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, 7426 left: clippingClientRect.left - elementClientRect.left + paddingObject.left, 7427 right: elementClientRect.right - clippingClientRect.right + paddingObject.right 7428 }; 7429 var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element 7430 7431 if (elementContext === popper && offsetData) { 7432 var offset = offsetData[placement]; 7433 Object.keys(overflowOffsets).forEach(function (key) { 7434 var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; 7435 var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; 7436 overflowOffsets[key] += offset[axis] * multiply; 7437 }); 7438 } 7439 7440 return overflowOffsets; 7441 } 7442 7443 var arraySlice$1 = arraySliceSimple; 7444 7445 var floor = Math.floor; 7446 7447 var mergeSort = function (array, comparefn) { 7448 var length = array.length; 7449 var middle = floor(length / 2); 7450 return length < 8 ? insertionSort(array, comparefn) : merge( 7451 array, 7452 mergeSort(arraySlice$1(array, 0, middle), comparefn), 7453 mergeSort(arraySlice$1(array, middle), comparefn), 7454 comparefn 7455 ); 7456 }; 7457 7458 var insertionSort = function (array, comparefn) { 7459 var length = array.length; 7460 var i = 1; 7461 var element, j; 7462 7463 while (i < length) { 7464 j = i; 7465 element = array[i]; 7466 while (j && comparefn(array[j - 1], element) > 0) { 7467 array[j] = array[--j]; 7468 } 7469 if (j !== i++) array[j] = element; 7470 } return array; 7471 }; 7472 7473 var merge = function (array, left, right, comparefn) { 7474 var llength = left.length; 7475 var rlength = right.length; 7476 var lindex = 0; 7477 var rindex = 0; 7478 7479 while (lindex < llength || rindex < rlength) { 7480 array[lindex + rindex] = (lindex < llength && rindex < rlength) 7481 ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++] 7482 : lindex < llength ? left[lindex++] : right[rindex++]; 7483 } return array; 7484 }; 7485 7486 var arraySort = mergeSort; 7487 7488 var userAgent$4 = engineUserAgent; 7489 7490 var firefox = userAgent$4.match(/firefox\/(\d+)/i); 7491 7492 var engineFfVersion = !!firefox && +firefox[1]; 7493 7494 var UA = engineUserAgent; 7495 7496 var engineIsIeOrEdge = /MSIE|Trident/.test(UA); 7497 7498 var userAgent$3 = engineUserAgent; 7499 7500 var webkit = userAgent$3.match(/AppleWebKit\/(\d+)\./); 7501 7502 var engineWebkitVersion = !!webkit && +webkit[1]; 7503 7504 var $$1 = _export; 7505 var uncurryThis = functionUncurryThis; 7506 var aCallable$2 = aCallable$7; 7507 var toObject = toObject$a; 7508 var lengthOfArrayLike = lengthOfArrayLike$9; 7509 var toString = toString$d; 7510 var fails$1 = fails$w; 7511 var internalSort = arraySort; 7512 var arrayMethodIsStrict = arrayMethodIsStrict$4; 7513 var FF = engineFfVersion; 7514 var IE_OR_EDGE = engineIsIeOrEdge; 7515 var V8 = engineV8Version; 7516 var WEBKIT = engineWebkitVersion; 7517 7518 var test = []; 7519 var un$Sort = uncurryThis(test.sort); 7520 var push = uncurryThis(test.push); 7521 7522 // IE8- 7523 var FAILS_ON_UNDEFINED = fails$1(function () { 7524 test.sort(undefined); 7525 }); 7526 // V8 bug 7527 var FAILS_ON_NULL = fails$1(function () { 7528 test.sort(null); 7529 }); 7530 // Old WebKit 7531 var STRICT_METHOD = arrayMethodIsStrict('sort'); 7532 7533 var STABLE_SORT = !fails$1(function () { 7534 // feature detection can be too slow, so check engines versions 7535 if (V8) return V8 < 70; 7536 if (FF && FF > 3) return; 7537 if (IE_OR_EDGE) return true; 7538 if (WEBKIT) return WEBKIT < 603; 7539 7540 var result = ''; 7541 var code, chr, value, index; 7542 7543 // generate an array with more 512 elements (Chakra and old V8 fails only in this case) 7544 for (code = 65; code < 76; code++) { 7545 chr = String.fromCharCode(code); 7546 7547 switch (code) { 7548 case 66: case 69: case 70: case 72: value = 3; break; 7549 case 68: case 71: value = 4; break; 7550 default: value = 2; 7551 } 7552 7553 for (index = 0; index < 47; index++) { 7554 test.push({ k: chr + index, v: value }); 7555 } 7556 } 7557 7558 test.sort(function (a, b) { return b.v - a.v; }); 7559 7560 for (index = 0; index < test.length; index++) { 7561 chr = test[index].k.charAt(0); 7562 if (result.charAt(result.length - 1) !== chr) result += chr; 7563 } 7564 7565 return result !== 'DGBEFHACIJK'; 7566 }); 7567 7568 var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT; 7569 7570 var getSortCompare = function (comparefn) { 7571 return function (x, y) { 7572 if (y === undefined) return -1; 7573 if (x === undefined) return 1; 7574 if (comparefn !== undefined) return +comparefn(x, y) || 0; 7575 return toString(x) > toString(y) ? 1 : -1; 7576 }; 7577 }; 7578 7579 // `Array.prototype.sort` method 7580 // https://tc39.es/ecma262/#sec-array.prototype.sort 7581 $$1({ target: 'Array', proto: true, forced: FORCED$1 }, { 7582 sort: function sort(comparefn) { 7583 if (comparefn !== undefined) aCallable$2(comparefn); 7584 7585 var array = toObject(this); 7586 7587 if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn); 7588 7589 var items = []; 7590 var arrayLength = lengthOfArrayLike(array); 7591 var itemsLength, index; 7592 7593 for (index = 0; index < arrayLength; index++) { 7594 if (index in array) push(items, array[index]); 7595 } 7596 7597 internalSort(items, getSortCompare(comparefn)); 7598 7599 itemsLength = items.length; 7600 index = 0; 7601 7602 while (index < itemsLength) array[index] = items[index++]; 7603 while (index < arrayLength) delete array[index++]; 7604 7605 return array; 7606 } 7607 }); 7608 7609 function computeAutoPlacement(state, options) { 7610 if (options === void 0) { 7611 options = {}; 7612 } 7613 7614 var _options = options, 7615 placement = _options.placement, 7616 boundary = _options.boundary, 7617 rootBoundary = _options.rootBoundary, 7618 padding = _options.padding, 7619 flipVariations = _options.flipVariations, 7620 _options$allowedAutoP = _options.allowedAutoPlacements, 7621 allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; 7622 var variation = getVariation(placement); 7623 var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { 7624 return getVariation(placement) === variation; 7625 }) : basePlacements; 7626 var allowedPlacements = placements$1.filter(function (placement) { 7627 return allowedAutoPlacements.indexOf(placement) >= 0; 7628 }); 7629 7630 if (allowedPlacements.length === 0) { 7631 allowedPlacements = placements$1; 7632 } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... 7633 7634 7635 var overflows = allowedPlacements.reduce(function (acc, placement) { 7636 acc[placement] = detectOverflow(state, { 7637 placement: placement, 7638 boundary: boundary, 7639 rootBoundary: rootBoundary, 7640 padding: padding 7641 })[getBasePlacement(placement)]; 7642 return acc; 7643 }, {}); 7644 return Object.keys(overflows).sort(function (a, b) { 7645 return overflows[a] - overflows[b]; 7646 }); 7647 } 7648 7649 function getExpandedFallbackPlacements(placement) { 7650 if (getBasePlacement(placement) === auto) { 7651 return []; 7652 } 7653 7654 var oppositePlacement = getOppositePlacement(placement); 7655 return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; 7656 } 7657 7658 function flip(_ref) { 7659 var state = _ref.state, 7660 options = _ref.options, 7661 name = _ref.name; 7662 7663 if (state.modifiersData[name]._skip) { 7664 return; 7665 } 7666 7667 var _options$mainAxis = options.mainAxis, 7668 checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, 7669 _options$altAxis = options.altAxis, 7670 checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, 7671 specifiedFallbackPlacements = options.fallbackPlacements, 7672 padding = options.padding, 7673 boundary = options.boundary, 7674 rootBoundary = options.rootBoundary, 7675 altBoundary = options.altBoundary, 7676 _options$flipVariatio = options.flipVariations, 7677 flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, 7678 allowedAutoPlacements = options.allowedAutoPlacements; 7679 var preferredPlacement = state.options.placement; 7680 var basePlacement = getBasePlacement(preferredPlacement); 7681 var isBasePlacement = basePlacement === preferredPlacement; 7682 var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); 7683 var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { 7684 return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { 7685 placement: placement, 7686 boundary: boundary, 7687 rootBoundary: rootBoundary, 7688 padding: padding, 7689 flipVariations: flipVariations, 7690 allowedAutoPlacements: allowedAutoPlacements 7691 }) : placement); 7692 }, []); 7693 var referenceRect = state.rects.reference; 7694 var popperRect = state.rects.popper; 7695 var checksMap = new Map(); 7696 var makeFallbackChecks = true; 7697 var firstFittingPlacement = placements[0]; 7698 7699 for (var i = 0; i < placements.length; i++) { 7700 var placement = placements[i]; 7701 7702 var _basePlacement = getBasePlacement(placement); 7703 7704 var isStartVariation = getVariation(placement) === start; 7705 var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; 7706 var len = isVertical ? 'width' : 'height'; 7707 var overflow = detectOverflow(state, { 7708 placement: placement, 7709 boundary: boundary, 7710 rootBoundary: rootBoundary, 7711 altBoundary: altBoundary, 7712 padding: padding 7713 }); 7714 var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; 7715 7716 if (referenceRect[len] > popperRect[len]) { 7717 mainVariationSide = getOppositePlacement(mainVariationSide); 7718 } 7719 7720 var altVariationSide = getOppositePlacement(mainVariationSide); 7721 var checks = []; 7722 7723 if (checkMainAxis) { 7724 checks.push(overflow[_basePlacement] <= 0); 7725 } 7726 7727 if (checkAltAxis) { 7728 checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); 7729 } 7730 7731 if (checks.every(function (check) { 7732 return check; 7733 })) { 7734 firstFittingPlacement = placement; 7735 makeFallbackChecks = false; 7736 break; 7737 } 7738 7739 checksMap.set(placement, checks); 7740 } 7741 7742 if (makeFallbackChecks) { 7743 // `2` may be desired in some cases – research later 7744 var numberOfChecks = flipVariations ? 3 : 1; 7745 7746 var _loop = function _loop(_i) { 7747 var fittingPlacement = placements.find(function (placement) { 7748 var checks = checksMap.get(placement); 7749 7750 if (checks) { 7751 return checks.slice(0, _i).every(function (check) { 7752 return check; 7753 }); 7754 } 7755 }); 7756 7757 if (fittingPlacement) { 7758 firstFittingPlacement = fittingPlacement; 7759 return "break"; 7760 } 7761 }; 7762 7763 for (var _i = numberOfChecks; _i > 0; _i--) { 7764 var _ret = _loop(_i); 7765 7766 if (_ret === "break") break; 7767 } 7768 } 7769 7770 if (state.placement !== firstFittingPlacement) { 7771 state.modifiersData[name]._skip = true; 7772 state.placement = firstFittingPlacement; 7773 state.reset = true; 7774 } 7775 } // eslint-disable-next-line import/no-unused-modules 7776 7777 7778 var flip$1 = { 7779 name: 'flip', 7780 enabled: true, 7781 phase: 'main', 7782 fn: flip, 7783 requiresIfExists: ['offset'], 7784 data: { 7785 _skip: false 7786 } 7787 }; 7788 7789 function getSideOffsets(overflow, rect, preventedOffsets) { 7790 if (preventedOffsets === void 0) { 7791 preventedOffsets = { 7792 x: 0, 7793 y: 0 7794 }; 7795 } 7796 7797 return { 7798 top: overflow.top - rect.height - preventedOffsets.y, 7799 right: overflow.right - rect.width + preventedOffsets.x, 7800 bottom: overflow.bottom - rect.height + preventedOffsets.y, 7801 left: overflow.left - rect.width - preventedOffsets.x 7802 }; 7803 } 7804 7805 function isAnySideFullyClipped(overflow) { 7806 return [top, right, bottom, left].some(function (side) { 7807 return overflow[side] >= 0; 7808 }); 7809 } 7810 7811 function hide(_ref) { 7812 var state = _ref.state, 7813 name = _ref.name; 7814 var referenceRect = state.rects.reference; 7815 var popperRect = state.rects.popper; 7816 var preventedOffsets = state.modifiersData.preventOverflow; 7817 var referenceOverflow = detectOverflow(state, { 7818 elementContext: 'reference' 7819 }); 7820 var popperAltOverflow = detectOverflow(state, { 7821 altBoundary: true 7822 }); 7823 var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); 7824 var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); 7825 var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); 7826 var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); 7827 state.modifiersData[name] = { 7828 referenceClippingOffsets: referenceClippingOffsets, 7829 popperEscapeOffsets: popperEscapeOffsets, 7830 isReferenceHidden: isReferenceHidden, 7831 hasPopperEscaped: hasPopperEscaped 7832 }; 7833 state.attributes.popper = Object.assign({}, state.attributes.popper, { 7834 'data-popper-reference-hidden': isReferenceHidden, 7835 'data-popper-escaped': hasPopperEscaped 7836 }); 7837 } // eslint-disable-next-line import/no-unused-modules 7838 7839 7840 var hide$1 = { 7841 name: 'hide', 7842 enabled: true, 7843 phase: 'main', 7844 requiresIfExists: ['preventOverflow'], 7845 fn: hide 7846 }; 7847 7848 function distanceAndSkiddingToXY(placement, rects, offset) { 7849 var basePlacement = getBasePlacement(placement); 7850 var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; 7851 7852 var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { 7853 placement: placement 7854 })) : offset, 7855 skidding = _ref[0], 7856 distance = _ref[1]; 7857 7858 skidding = skidding || 0; 7859 distance = (distance || 0) * invertDistance; 7860 return [left, right].indexOf(basePlacement) >= 0 ? { 7861 x: distance, 7862 y: skidding 7863 } : { 7864 x: skidding, 7865 y: distance 7866 }; 7867 } 7868 7869 function offset(_ref2) { 7870 var state = _ref2.state, 7871 options = _ref2.options, 7872 name = _ref2.name; 7873 var _options$offset = options.offset, 7874 offset = _options$offset === void 0 ? [0, 0] : _options$offset; 7875 var data = placements.reduce(function (acc, placement) { 7876 acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); 7877 return acc; 7878 }, {}); 7879 var _data$state$placement = data[state.placement], 7880 x = _data$state$placement.x, 7881 y = _data$state$placement.y; 7882 7883 if (state.modifiersData.popperOffsets != null) { 7884 state.modifiersData.popperOffsets.x += x; 7885 state.modifiersData.popperOffsets.y += y; 7886 } 7887 7888 state.modifiersData[name] = data; 7889 } // eslint-disable-next-line import/no-unused-modules 7890 7891 7892 var offset$1 = { 7893 name: 'offset', 7894 enabled: true, 7895 phase: 'main', 7896 requires: ['popperOffsets'], 7897 fn: offset 7898 }; 7899 7900 function popperOffsets(_ref) { 7901 var state = _ref.state, 7902 name = _ref.name; // Offsets are the actual position the popper needs to have to be 7903 // properly positioned near its reference element 7904 // This is the most basic placement, and will be adjusted by 7905 // the modifiers in the next step 7906 7907 state.modifiersData[name] = computeOffsets({ 7908 reference: state.rects.reference, 7909 element: state.rects.popper, 7910 strategy: 'absolute', 7911 placement: state.placement 7912 }); 7913 } // eslint-disable-next-line import/no-unused-modules 7914 7915 7916 var popperOffsets$1 = { 7917 name: 'popperOffsets', 7918 enabled: true, 7919 phase: 'read', 7920 fn: popperOffsets, 7921 data: {} 7922 }; 7923 7924 function getAltAxis(axis) { 7925 return axis === 'x' ? 'y' : 'x'; 7926 } 7927 7928 function preventOverflow(_ref) { 7929 var state = _ref.state, 7930 options = _ref.options, 7931 name = _ref.name; 7932 var _options$mainAxis = options.mainAxis, 7933 checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, 7934 _options$altAxis = options.altAxis, 7935 checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, 7936 boundary = options.boundary, 7937 rootBoundary = options.rootBoundary, 7938 altBoundary = options.altBoundary, 7939 padding = options.padding, 7940 _options$tether = options.tether, 7941 tether = _options$tether === void 0 ? true : _options$tether, 7942 _options$tetherOffset = options.tetherOffset, 7943 tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; 7944 var overflow = detectOverflow(state, { 7945 boundary: boundary, 7946 rootBoundary: rootBoundary, 7947 padding: padding, 7948 altBoundary: altBoundary 7949 }); 7950 var basePlacement = getBasePlacement(state.placement); 7951 var variation = getVariation(state.placement); 7952 var isBasePlacement = !variation; 7953 var mainAxis = getMainAxisFromPlacement(basePlacement); 7954 var altAxis = getAltAxis(mainAxis); 7955 var popperOffsets = state.modifiersData.popperOffsets; 7956 var referenceRect = state.rects.reference; 7957 var popperRect = state.rects.popper; 7958 var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { 7959 placement: state.placement 7960 })) : tetherOffset; 7961 var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { 7962 mainAxis: tetherOffsetValue, 7963 altAxis: tetherOffsetValue 7964 } : Object.assign({ 7965 mainAxis: 0, 7966 altAxis: 0 7967 }, tetherOffsetValue); 7968 var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; 7969 var data = { 7970 x: 0, 7971 y: 0 7972 }; 7973 7974 if (!popperOffsets) { 7975 return; 7976 } 7977 7978 if (checkMainAxis) { 7979 var _offsetModifierState$; 7980 7981 var mainSide = mainAxis === 'y' ? top : left; 7982 var altSide = mainAxis === 'y' ? bottom : right; 7983 var len = mainAxis === 'y' ? 'height' : 'width'; 7984 var offset = popperOffsets[mainAxis]; 7985 var min$1 = offset + overflow[mainSide]; 7986 var max$1 = offset - overflow[altSide]; 7987 var additive = tether ? -popperRect[len] / 2 : 0; 7988 var minLen = variation === start ? referenceRect[len] : popperRect[len]; 7989 var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go 7990 // outside the reference bounds 7991 7992 var arrowElement = state.elements.arrow; 7993 var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { 7994 width: 0, 7995 height: 0 7996 }; 7997 var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); 7998 var arrowPaddingMin = arrowPaddingObject[mainSide]; 7999 var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want 8000 // to include its full size in the calculation. If the reference is small 8001 // and near the edge of a boundary, the popper can overflow even if the 8002 // reference is not overflowing as well (e.g. virtual elements with no 8003 // width or height) 8004 8005 var arrowLen = within(0, referenceRect[len], arrowRect[len]); 8006 var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; 8007 var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; 8008 var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); 8009 var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; 8010 var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; 8011 var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; 8012 var tetherMax = offset + maxOffset - offsetModifierValue; 8013 var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1); 8014 popperOffsets[mainAxis] = preventedOffset; 8015 data[mainAxis] = preventedOffset - offset; 8016 } 8017 8018 if (checkAltAxis) { 8019 var _offsetModifierState$2; 8020 8021 var _mainSide = mainAxis === 'x' ? top : left; 8022 8023 var _altSide = mainAxis === 'x' ? bottom : right; 8024 8025 var _offset = popperOffsets[altAxis]; 8026 8027 var _len = altAxis === 'y' ? 'height' : 'width'; 8028 8029 var _min = _offset + overflow[_mainSide]; 8030 8031 var _max = _offset - overflow[_altSide]; 8032 8033 var isOriginSide = [top, left].indexOf(basePlacement) !== -1; 8034 8035 var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; 8036 8037 var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; 8038 8039 var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; 8040 8041 var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); 8042 8043 popperOffsets[altAxis] = _preventedOffset; 8044 data[altAxis] = _preventedOffset - _offset; 8045 } 8046 8047 state.modifiersData[name] = data; 8048 } // eslint-disable-next-line import/no-unused-modules 8049 8050 8051 var preventOverflow$1 = { 8052 name: 'preventOverflow', 8053 enabled: true, 8054 phase: 'main', 8055 fn: preventOverflow, 8056 requiresIfExists: ['offset'] 8057 }; 8058 8059 var global$6 = global$U; 8060 8061 var nativePromiseConstructor = global$6.Promise; 8062 8063 var userAgent$2 = engineUserAgent; 8064 8065 var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2); 8066 8067 var global$5 = global$U; 8068 var apply = functionApply; 8069 var bind$2 = functionBindContext; 8070 var isCallable$1 = isCallable$m; 8071 var hasOwn = hasOwnProperty_1; 8072 var fails = fails$w; 8073 var html = html$2; 8074 var arraySlice = arraySlice$2; 8075 var createElement = documentCreateElement$2; 8076 var IS_IOS$1 = engineIsIos; 8077 var IS_NODE$2 = engineIsNode; 8078 8079 var set = global$5.setImmediate; 8080 var clear = global$5.clearImmediate; 8081 var process$2 = global$5.process; 8082 var Dispatch = global$5.Dispatch; 8083 var Function$1 = global$5.Function; 8084 var MessageChannel = global$5.MessageChannel; 8085 var String$1 = global$5.String; 8086 var counter = 0; 8087 var queue$1 = {}; 8088 var ONREADYSTATECHANGE = 'onreadystatechange'; 8089 var location, defer, channel, port; 8090 8091 try { 8092 // Deno throws a ReferenceError on `location` access without `--location` flag 8093 location = global$5.location; 8094 } catch (error) { /* empty */ } 8095 8096 var run = function (id) { 8097 if (hasOwn(queue$1, id)) { 8098 var fn = queue$1[id]; 8099 delete queue$1[id]; 8100 fn(); 8101 } 8102 }; 8103 8104 var runner = function (id) { 8105 return function () { 8106 run(id); 8107 }; 8108 }; 8109 8110 var listener = function (event) { 8111 run(event.data); 8112 }; 8113 8114 var post = function (id) { 8115 // old engines have not location.origin 8116 global$5.postMessage(String$1(id), location.protocol + '//' + location.host); 8117 }; 8118 8119 // Node.js 0.9+ & IE10+ has setImmediate, otherwise: 8120 if (!set || !clear) { 8121 set = function setImmediate(fn) { 8122 var args = arraySlice(arguments, 1); 8123 queue$1[++counter] = function () { 8124 apply(isCallable$1(fn) ? fn : Function$1(fn), undefined, args); 8125 }; 8126 defer(counter); 8127 return counter; 8128 }; 8129 clear = function clearImmediate(id) { 8130 delete queue$1[id]; 8131 }; 8132 // Node.js 0.8- 8133 if (IS_NODE$2) { 8134 defer = function (id) { 8135 process$2.nextTick(runner(id)); 8136 }; 8137 // Sphere (JS game engine) Dispatch API 8138 } else if (Dispatch && Dispatch.now) { 8139 defer = function (id) { 8140 Dispatch.now(runner(id)); 8141 }; 8142 // Browsers with MessageChannel, includes WebWorkers 8143 // except iOS - https://github.com/zloirock/core-js/issues/624 8144 } else if (MessageChannel && !IS_IOS$1) { 8145 channel = new MessageChannel(); 8146 port = channel.port2; 8147 channel.port1.onmessage = listener; 8148 defer = bind$2(port.postMessage, port); 8149 // Browsers with postMessage, skip WebWorkers 8150 // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' 8151 } else if ( 8152 global$5.addEventListener && 8153 isCallable$1(global$5.postMessage) && 8154 !global$5.importScripts && 8155 location && location.protocol !== 'file:' && 8156 !fails(post) 8157 ) { 8158 defer = post; 8159 global$5.addEventListener('message', listener, false); 8160 // IE8- 8161 } else if (ONREADYSTATECHANGE in createElement('script')) { 8162 defer = function (id) { 8163 html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { 8164 html.removeChild(this); 8165 run(id); 8166 }; 8167 }; 8168 // Rest old browsers 8169 } else { 8170 defer = function (id) { 8171 setTimeout(runner(id), 0); 8172 }; 8173 } 8174 } 8175 8176 var task$1 = { 8177 set: set, 8178 clear: clear 8179 }; 8180 8181 var userAgent$1 = engineUserAgent; 8182 var global$4 = global$U; 8183 8184 var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$4.Pebble !== undefined; 8185 8186 var userAgent = engineUserAgent; 8187 8188 var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent); 8189 8190 var global$3 = global$U; 8191 var bind$1 = functionBindContext; 8192 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; 8193 var macrotask = task$1.set; 8194 var IS_IOS = engineIsIos; 8195 var IS_IOS_PEBBLE = engineIsIosPebble; 8196 var IS_WEBOS_WEBKIT = engineIsWebosWebkit; 8197 var IS_NODE$1 = engineIsNode; 8198 8199 var MutationObserver = global$3.MutationObserver || global$3.WebKitMutationObserver; 8200 var document$2 = global$3.document; 8201 var process$1 = global$3.process; 8202 var Promise$1 = global$3.Promise; 8203 // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask` 8204 var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$3, 'queueMicrotask'); 8205 var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value; 8206 8207 var flush, head, last, notify$1, toggle, node, promise, then; 8208 8209 // modern engines have queueMicrotask method 8210 if (!queueMicrotask) { 8211 flush = function () { 8212 var parent, fn; 8213 if (IS_NODE$1 && (parent = process$1.domain)) parent.exit(); 8214 while (head) { 8215 fn = head.fn; 8216 head = head.next; 8217 try { 8218 fn(); 8219 } catch (error) { 8220 if (head) notify$1(); 8221 else last = undefined; 8222 throw error; 8223 } 8224 } last = undefined; 8225 if (parent) parent.enter(); 8226 }; 8227 8228 // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339 8229 // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898 8230 if (!IS_IOS && !IS_NODE$1 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) { 8231 toggle = true; 8232 node = document$2.createTextNode(''); 8233 new MutationObserver(flush).observe(node, { characterData: true }); 8234 notify$1 = function () { 8235 node.data = toggle = !toggle; 8236 }; 8237 // environments with maybe non-completely correct, but existent Promise 8238 } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) { 8239 // Promise.resolve without an argument throws an error in LG WebOS 2 8240 promise = Promise$1.resolve(undefined); 8241 // workaround of WebKit ~ iOS Safari 10.1 bug 8242 promise.constructor = Promise$1; 8243 then = bind$1(promise.then, promise); 8244 notify$1 = function () { 8245 then(flush); 8246 }; 8247 // Node.js without promises 8248 } else if (IS_NODE$1) { 8249 notify$1 = function () { 8250 process$1.nextTick(flush); 8251 }; 8252 // for other environments - macrotask based on: 8253 // - setImmediate 8254 // - MessageChannel 8255 // - window.postMessag 8256 // - onreadystatechange 8257 // - setTimeout 8258 } else { 8259 // strange IE + webpack dev server bug - use .bind(global) 8260 macrotask = bind$1(macrotask, global$3); 8261 notify$1 = function () { 8262 macrotask(flush); 8263 }; 8264 } 8265 } 8266 8267 var microtask$1 = queueMicrotask || function (fn) { 8268 var task = { fn: fn, next: undefined }; 8269 if (last) last.next = task; 8270 if (!head) { 8271 head = task; 8272 notify$1(); 8273 } last = task; 8274 }; 8275 8276 var newPromiseCapability$2 = {}; 8277 8278 var aCallable$1 = aCallable$7; 8279 8280 var PromiseCapability = function (C) { 8281 var resolve, reject; 8282 this.promise = new C(function ($$resolve, $$reject) { 8283 if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); 8284 resolve = $$resolve; 8285 reject = $$reject; 8286 }); 8287 this.resolve = aCallable$1(resolve); 8288 this.reject = aCallable$1(reject); 8289 }; 8290 8291 // `NewPromiseCapability` abstract operation 8292 // https://tc39.es/ecma262/#sec-newpromisecapability 8293 newPromiseCapability$2.f = function (C) { 8294 return new PromiseCapability(C); 8295 }; 8296 8297 var anObject = anObject$h; 8298 var isObject$1 = isObject$g; 8299 var newPromiseCapability$1 = newPromiseCapability$2; 8300 8301 var promiseResolve$1 = function (C, x) { 8302 anObject(C); 8303 if (isObject$1(x) && x.constructor === C) return x; 8304 var promiseCapability = newPromiseCapability$1.f(C); 8305 var resolve = promiseCapability.resolve; 8306 resolve(x); 8307 return promiseCapability.promise; 8308 }; 8309 8310 var global$2 = global$U; 8311 8312 var hostReportErrors$1 = function (a, b) { 8313 var console = global$2.console; 8314 if (console && console.error) { 8315 arguments.length == 1 ? console.error(a) : console.error(a, b); 8316 } 8317 }; 8318 8319 var perform$1 = function (exec) { 8320 try { 8321 return { error: false, value: exec() }; 8322 } catch (error) { 8323 return { error: true, value: error }; 8324 } 8325 }; 8326 8327 var Queue$1 = function () { 8328 this.head = null; 8329 this.tail = null; 8330 }; 8331 8332 Queue$1.prototype = { 8333 add: function (item) { 8334 var entry = { item: item, next: null }; 8335 if (this.head) this.tail.next = entry; 8336 else this.head = entry; 8337 this.tail = entry; 8338 }, 8339 get: function () { 8340 var entry = this.head; 8341 if (entry) { 8342 this.head = entry.next; 8343 if (this.tail === entry) this.tail = null; 8344 return entry.item; 8345 } 8346 } 8347 }; 8348 8349 var queue = Queue$1; 8350 8351 var engineIsBrowser = typeof window == 'object'; 8352 8353 var $ = _export; 8354 var global$1 = global$U; 8355 var getBuiltIn = getBuiltIn$7; 8356 var call = functionCall; 8357 var NativePromise = nativePromiseConstructor; 8358 var redefine = redefine$b.exports; 8359 var redefineAll = redefineAll$2; 8360 var setPrototypeOf = objectSetPrototypeOf; 8361 var setToStringTag = setToStringTag$4; 8362 var setSpecies = setSpecies$3; 8363 var aCallable = aCallable$7; 8364 var isCallable = isCallable$m; 8365 var isObject = isObject$g; 8366 var anInstance = anInstance$3; 8367 var inspectSource = inspectSource$4; 8368 var iterate = iterate$3; 8369 var checkCorrectnessOfIteration = checkCorrectnessOfIteration$3; 8370 var speciesConstructor = speciesConstructor$2; 8371 var task = task$1.set; 8372 var microtask = microtask$1; 8373 var promiseResolve = promiseResolve$1; 8374 var hostReportErrors = hostReportErrors$1; 8375 var newPromiseCapabilityModule = newPromiseCapability$2; 8376 var perform = perform$1; 8377 var Queue = queue; 8378 var InternalStateModule = internalState; 8379 var isForced = isForced_1; 8380 var wellKnownSymbol = wellKnownSymbol$n; 8381 var IS_BROWSER = engineIsBrowser; 8382 var IS_NODE = engineIsNode; 8383 var V8_VERSION = engineV8Version; 8384 8385 var SPECIES = wellKnownSymbol('species'); 8386 var PROMISE = 'Promise'; 8387 8388 var getInternalState = InternalStateModule.getterFor(PROMISE); 8389 var setInternalState = InternalStateModule.set; 8390 var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); 8391 var NativePromisePrototype = NativePromise && NativePromise.prototype; 8392 var PromiseConstructor = NativePromise; 8393 var PromisePrototype = NativePromisePrototype; 8394 var TypeError$1 = global$1.TypeError; 8395 var document$1 = global$1.document; 8396 var process = global$1.process; 8397 var newPromiseCapability = newPromiseCapabilityModule.f; 8398 var newGenericPromiseCapability = newPromiseCapability; 8399 8400 var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent); 8401 var NATIVE_REJECTION_EVENT = isCallable(global$1.PromiseRejectionEvent); 8402 var UNHANDLED_REJECTION = 'unhandledrejection'; 8403 var REJECTION_HANDLED = 'rejectionhandled'; 8404 var PENDING = 0; 8405 var FULFILLED = 1; 8406 var REJECTED = 2; 8407 var HANDLED = 1; 8408 var UNHANDLED = 2; 8409 var SUBCLASSING = false; 8410 8411 var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; 8412 8413 var FORCED = isForced(PROMISE, function () { 8414 var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor); 8415 var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor); 8416 // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables 8417 // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 8418 // We can't detect it synchronously, so just check versions 8419 if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true; 8420 // We can't use @@species feature detection in V8 since it causes 8421 // deoptimization and performance degradation 8422 // https://github.com/zloirock/core-js/issues/679 8423 if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false; 8424 // Detect correctness of subclassing with @@species support 8425 var promise = new PromiseConstructor(function (resolve) { resolve(1); }); 8426 var FakePromise = function (exec) { 8427 exec(function () { /* empty */ }, function () { /* empty */ }); 8428 }; 8429 var constructor = promise.constructor = {}; 8430 constructor[SPECIES] = FakePromise; 8431 SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise; 8432 if (!SUBCLASSING) return true; 8433 // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test 8434 return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT; 8435 }); 8436 8437 var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) { 8438 PromiseConstructor.all(iterable)['catch'](function () { /* empty */ }); 8439 }); 8440 8441 // helpers 8442 var isThenable = function (it) { 8443 var then; 8444 return isObject(it) && isCallable(then = it.then) ? then : false; 8445 }; 8446 8447 var callReaction = function (reaction, state) { 8448 var value = state.value; 8449 var ok = state.state == FULFILLED; 8450 var handler = ok ? reaction.ok : reaction.fail; 8451 var resolve = reaction.resolve; 8452 var reject = reaction.reject; 8453 var domain = reaction.domain; 8454 var result, then, exited; 8455 try { 8456 if (handler) { 8457 if (!ok) { 8458 if (state.rejection === UNHANDLED) onHandleUnhandled(state); 8459 state.rejection = HANDLED; 8460 } 8461 if (handler === true) result = value; 8462 else { 8463 if (domain) domain.enter(); 8464 result = handler(value); // can throw 8465 if (domain) { 8466 domain.exit(); 8467 exited = true; 8468 } 8469 } 8470 if (result === reaction.promise) { 8471 reject(TypeError$1('Promise-chain cycle')); 8472 } else if (then = isThenable(result)) { 8473 call(then, result, resolve, reject); 8474 } else resolve(result); 8475 } else reject(value); 8476 } catch (error) { 8477 if (domain && !exited) domain.exit(); 8478 reject(error); 8479 } 8480 }; 8481 8482 var notify = function (state, isReject) { 8483 if (state.notified) return; 8484 state.notified = true; 8485 microtask(function () { 8486 var reactions = state.reactions; 8487 var reaction; 8488 while (reaction = reactions.get()) { 8489 callReaction(reaction, state); 8490 } 8491 state.notified = false; 8492 if (isReject && !state.rejection) onUnhandled(state); 8493 }); 8494 }; 8495 8496 var dispatchEvent = function (name, promise, reason) { 8497 var event, handler; 8498 if (DISPATCH_EVENT) { 8499 event = document$1.createEvent('Event'); 8500 event.promise = promise; 8501 event.reason = reason; 8502 event.initEvent(name, false, true); 8503 global$1.dispatchEvent(event); 8504 } else event = { promise: promise, reason: reason }; 8505 if (!NATIVE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event); 8506 else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); 8507 }; 8508 8509 var onUnhandled = function (state) { 8510 call(task, global$1, function () { 8511 var promise = state.facade; 8512 var value = state.value; 8513 var IS_UNHANDLED = isUnhandled(state); 8514 var result; 8515 if (IS_UNHANDLED) { 8516 result = perform(function () { 8517 if (IS_NODE) { 8518 process.emit('unhandledRejection', value, promise); 8519 } else dispatchEvent(UNHANDLED_REJECTION, promise, value); 8520 }); 8521 // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should 8522 state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; 8523 if (result.error) throw result.value; 8524 } 8525 }); 8526 }; 8527 8528 var isUnhandled = function (state) { 8529 return state.rejection !== HANDLED && !state.parent; 8530 }; 8531 8532 var onHandleUnhandled = function (state) { 8533 call(task, global$1, function () { 8534 var promise = state.facade; 8535 if (IS_NODE) { 8536 process.emit('rejectionHandled', promise); 8537 } else dispatchEvent(REJECTION_HANDLED, promise, state.value); 8538 }); 8539 }; 8540 8541 var bind = function (fn, state, unwrap) { 8542 return function (value) { 8543 fn(state, value, unwrap); 8544 }; 8545 }; 8546 8547 var internalReject = function (state, value, unwrap) { 8548 if (state.done) return; 8549 state.done = true; 8550 if (unwrap) state = unwrap; 8551 state.value = value; 8552 state.state = REJECTED; 8553 notify(state, true); 8554 }; 8555 8556 var internalResolve = function (state, value, unwrap) { 8557 if (state.done) return; 8558 state.done = true; 8559 if (unwrap) state = unwrap; 8560 try { 8561 if (state.facade === value) throw TypeError$1("Promise can't be resolved itself"); 8562 var then = isThenable(value); 8563 if (then) { 8564 microtask(function () { 8565 var wrapper = { done: false }; 8566 try { 8567 call(then, value, 8568 bind(internalResolve, wrapper, state), 8569 bind(internalReject, wrapper, state) 8570 ); 8571 } catch (error) { 8572 internalReject(wrapper, error, state); 8573 } 8574 }); 8575 } else { 8576 state.value = value; 8577 state.state = FULFILLED; 8578 notify(state, false); 8579 } 8580 } catch (error) { 8581 internalReject({ done: false }, error, state); 8582 } 8583 }; 8584 8585 // constructor polyfill 8586 if (FORCED) { 8587 // 25.4.3.1 Promise(executor) 8588 PromiseConstructor = function Promise(executor) { 8589 anInstance(this, PromisePrototype); 8590 aCallable(executor); 8591 call(Internal, this); 8592 var state = getInternalState(this); 8593 try { 8594 executor(bind(internalResolve, state), bind(internalReject, state)); 8595 } catch (error) { 8596 internalReject(state, error); 8597 } 8598 }; 8599 PromisePrototype = PromiseConstructor.prototype; 8600 // eslint-disable-next-line no-unused-vars -- required for `.length` 8601 Internal = function Promise(executor) { 8602 setInternalState(this, { 8603 type: PROMISE, 8604 done: false, 8605 notified: false, 8606 parent: false, 8607 reactions: new Queue(), 8608 rejection: false, 8609 state: PENDING, 8610 value: undefined 8611 }); 8612 }; 8613 Internal.prototype = redefineAll(PromisePrototype, { 8614 // `Promise.prototype.then` method 8615 // https://tc39.es/ecma262/#sec-promise.prototype.then 8616 then: function then(onFulfilled, onRejected) { 8617 var state = getInternalPromiseState(this); 8618 var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); 8619 state.parent = true; 8620 reaction.ok = isCallable(onFulfilled) ? onFulfilled : true; 8621 reaction.fail = isCallable(onRejected) && onRejected; 8622 reaction.domain = IS_NODE ? process.domain : undefined; 8623 if (state.state == PENDING) state.reactions.add(reaction); 8624 else microtask(function () { 8625 callReaction(reaction, state); 8626 }); 8627 return reaction.promise; 8628 }, 8629 // `Promise.prototype.catch` method 8630 // https://tc39.es/ecma262/#sec-promise.prototype.catch 8631 'catch': function (onRejected) { 8632 return this.then(undefined, onRejected); 8633 } 8634 }); 8635 OwnPromiseCapability = function () { 8636 var promise = new Internal(); 8637 var state = getInternalState(promise); 8638 this.promise = promise; 8639 this.resolve = bind(internalResolve, state); 8640 this.reject = bind(internalReject, state); 8641 }; 8642 newPromiseCapabilityModule.f = newPromiseCapability = function (C) { 8643 return C === PromiseConstructor || C === PromiseWrapper 8644 ? new OwnPromiseCapability(C) 8645 : newGenericPromiseCapability(C); 8646 }; 8647 8648 if (isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) { 8649 nativeThen = NativePromisePrototype.then; 8650 8651 if (!SUBCLASSING) { 8652 // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs 8653 redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) { 8654 var that = this; 8655 return new PromiseConstructor(function (resolve, reject) { 8656 call(nativeThen, that, resolve, reject); 8657 }).then(onFulfilled, onRejected); 8658 // https://github.com/zloirock/core-js/issues/640 8659 }, { unsafe: true }); 8660 8661 // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then` 8662 redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true }); 8663 } 8664 8665 // make `.constructor === Promise` work for native promise-based APIs 8666 try { 8667 delete NativePromisePrototype.constructor; 8668 } catch (error) { /* empty */ } 8669 8670 // make `instanceof Promise` work for native promise-based APIs 8671 if (setPrototypeOf) { 8672 setPrototypeOf(NativePromisePrototype, PromisePrototype); 8673 } 8674 } 8675 } 8676 8677 $({ global: true, wrap: true, forced: FORCED }, { 8678 Promise: PromiseConstructor 8679 }); 8680 8681 setToStringTag(PromiseConstructor, PROMISE, false); 8682 setSpecies(PROMISE); 8683 8684 PromiseWrapper = getBuiltIn(PROMISE); 8685 8686 // statics 8687 $({ target: PROMISE, stat: true, forced: FORCED }, { 8688 // `Promise.reject` method 8689 // https://tc39.es/ecma262/#sec-promise.reject 8690 reject: function reject(r) { 8691 var capability = newPromiseCapability(this); 8692 call(capability.reject, undefined, r); 8693 return capability.promise; 8694 } 8695 }); 8696 8697 $({ target: PROMISE, stat: true, forced: FORCED }, { 8698 // `Promise.resolve` method 8699 // https://tc39.es/ecma262/#sec-promise.resolve 8700 resolve: function resolve(x) { 8701 return promiseResolve(this, x); 8702 } 8703 }); 8704 8705 $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, { 8706 // `Promise.all` method 8707 // https://tc39.es/ecma262/#sec-promise.all 8708 all: function all(iterable) { 8709 var C = this; 8710 var capability = newPromiseCapability(C); 8711 var resolve = capability.resolve; 8712 var reject = capability.reject; 8713 var result = perform(function () { 8714 var $promiseResolve = aCallable(C.resolve); 8715 var values = []; 8716 var counter = 0; 8717 var remaining = 1; 8718 iterate(iterable, function (promise) { 8719 var index = counter++; 8720 var alreadyCalled = false; 8721 remaining++; 8722 call($promiseResolve, C, promise).then(function (value) { 8723 if (alreadyCalled) return; 8724 alreadyCalled = true; 8725 values[index] = value; 8726 --remaining || resolve(values); 8727 }, reject); 8728 }); 8729 --remaining || resolve(values); 8730 }); 8731 if (result.error) reject(result.value); 8732 return capability.promise; 8733 }, 8734 // `Promise.race` method 8735 // https://tc39.es/ecma262/#sec-promise.race 8736 race: function race(iterable) { 8737 var C = this; 8738 var capability = newPromiseCapability(C); 8739 var reject = capability.reject; 8740 var result = perform(function () { 8741 var $promiseResolve = aCallable(C.resolve); 8742 iterate(iterable, function (promise) { 8743 call($promiseResolve, C, promise).then(capability.resolve, reject); 8744 }); 8745 }); 8746 if (result.error) reject(result.value); 8747 return capability.promise; 8748 } 8749 }); 8750 8751 function getHTMLElementScroll(element) { 8752 return { 8753 scrollLeft: element.scrollLeft, 8754 scrollTop: element.scrollTop 8755 }; 8756 } 8757 8758 function getNodeScroll(node) { 8759 if (node === getWindow(node) || !isHTMLElement(node)) { 8760 return getWindowScroll(node); 8761 } else { 8762 return getHTMLElementScroll(node); 8763 } 8764 } 8765 8766 function isElementScaled(element) { 8767 var rect = element.getBoundingClientRect(); 8768 var scaleX = round(rect.width) / element.offsetWidth || 1; 8769 var scaleY = round(rect.height) / element.offsetHeight || 1; 8770 return scaleX !== 1 || scaleY !== 1; 8771 } // Returns the composite rect of an element relative to its offsetParent. 8772 // Composite means it takes into account transforms as well as layout. 8773 8774 8775 function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { 8776 if (isFixed === void 0) { 8777 isFixed = false; 8778 } 8779 8780 var isOffsetParentAnElement = isHTMLElement(offsetParent); 8781 var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); 8782 var documentElement = getDocumentElement(offsetParent); 8783 var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); 8784 var scroll = { 8785 scrollLeft: 0, 8786 scrollTop: 0 8787 }; 8788 var offsets = { 8789 x: 0, 8790 y: 0 8791 }; 8792 8793 if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { 8794 if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 8795 isScrollParent(documentElement)) { 8796 scroll = getNodeScroll(offsetParent); 8797 } 8798 8799 if (isHTMLElement(offsetParent)) { 8800 offsets = getBoundingClientRect(offsetParent, true); 8801 offsets.x += offsetParent.clientLeft; 8802 offsets.y += offsetParent.clientTop; 8803 } else if (documentElement) { 8804 offsets.x = getWindowScrollBarX(documentElement); 8805 } 8806 } 8807 8808 return { 8809 x: rect.left + scroll.scrollLeft - offsets.x, 8810 y: rect.top + scroll.scrollTop - offsets.y, 8811 width: rect.width, 8812 height: rect.height 8813 }; 8814 } 8815 8816 function order(modifiers) { 8817 var map = new Map(); 8818 var visited = new Set(); 8819 var result = []; 8820 modifiers.forEach(function (modifier) { 8821 map.set(modifier.name, modifier); 8822 }); // On visiting object, check for its dependencies and visit them recursively 8823 8824 function sort(modifier) { 8825 visited.add(modifier.name); 8826 var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); 8827 requires.forEach(function (dep) { 8828 if (!visited.has(dep)) { 8829 var depModifier = map.get(dep); 8830 8831 if (depModifier) { 8832 sort(depModifier); 8833 } 8834 } 8835 }); 8836 result.push(modifier); 8837 } 8838 8839 modifiers.forEach(function (modifier) { 8840 if (!visited.has(modifier.name)) { 8841 // check for visited object 8842 sort(modifier); 8843 } 8844 }); 8845 return result; 8846 } 8847 8848 function orderModifiers(modifiers) { 8849 // order based on dependencies 8850 var orderedModifiers = order(modifiers); // order based on phase 8851 8852 return modifierPhases.reduce(function (acc, phase) { 8853 return acc.concat(orderedModifiers.filter(function (modifier) { 8854 return modifier.phase === phase; 8855 })); 8856 }, []); 8857 } 8858 8859 function debounce(fn) { 8860 var pending; 8861 return function () { 8862 if (!pending) { 8863 pending = new Promise(function (resolve) { 8864 Promise.resolve().then(function () { 8865 pending = undefined; 8866 resolve(fn()); 8867 }); 8868 }); 8869 } 8870 8871 return pending; 8872 }; 8873 } 8874 8875 function mergeByName(modifiers) { 8876 var merged = modifiers.reduce(function (merged, current) { 8877 var existing = merged[current.name]; 8878 merged[current.name] = existing ? Object.assign({}, existing, current, { 8879 options: Object.assign({}, existing.options, current.options), 8880 data: Object.assign({}, existing.data, current.data) 8881 }) : current; 8882 return merged; 8883 }, {}); // IE11 does not support Object.values 8884 8885 return Object.keys(merged).map(function (key) { 8886 return merged[key]; 8887 }); 8888 } 8889 8890 var DEFAULT_OPTIONS = { 8891 placement: 'bottom', 8892 modifiers: [], 8893 strategy: 'absolute' 8894 }; 8895 8896 function areValidElements() { 8897 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 8898 args[_key] = arguments[_key]; 8899 } 8900 8901 return !args.some(function (element) { 8902 return !(element && typeof element.getBoundingClientRect === 'function'); 8903 }); 8904 } 8905 8906 function popperGenerator(generatorOptions) { 8907 if (generatorOptions === void 0) { 8908 generatorOptions = {}; 8909 } 8910 8911 var _generatorOptions = generatorOptions, 8912 _generatorOptions$def = _generatorOptions.defaultModifiers, 8913 defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, 8914 _generatorOptions$def2 = _generatorOptions.defaultOptions, 8915 defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; 8916 return function createPopper(reference, popper, options) { 8917 if (options === void 0) { 8918 options = defaultOptions; 8919 } 8920 8921 var state = { 8922 placement: 'bottom', 8923 orderedModifiers: [], 8924 options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), 8925 modifiersData: {}, 8926 elements: { 8927 reference: reference, 8928 popper: popper 8929 }, 8930 attributes: {}, 8931 styles: {} 8932 }; 8933 var effectCleanupFns = []; 8934 var isDestroyed = false; 8935 var instance = { 8936 state: state, 8937 setOptions: function setOptions(setOptionsAction) { 8938 var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction; 8939 cleanupModifierEffects(); 8940 state.options = Object.assign({}, defaultOptions, state.options, options); 8941 state.scrollParents = { 8942 reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], 8943 popper: listScrollParents(popper) 8944 }; // Orders the modifiers based on their dependencies and `phase` 8945 // properties 8946 8947 var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers 8948 8949 state.orderedModifiers = orderedModifiers.filter(function (m) { 8950 return m.enabled; 8951 }); // Validate the provided modifiers so that the consumer will get warned 8952 8953 runModifierEffects(); 8954 return instance.update(); 8955 }, 8956 // Sync update – it will always be executed, even if not necessary. This 8957 // is useful for low frequency updates where sync behavior simplifies the 8958 // logic. 8959 // For high frequency updates (e.g. `resize` and `scroll` events), always 8960 // prefer the async Popper#update method 8961 forceUpdate: function forceUpdate() { 8962 if (isDestroyed) { 8963 return; 8964 } 8965 8966 var _state$elements = state.elements, 8967 reference = _state$elements.reference, 8968 popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements 8969 // anymore 8970 8971 if (!areValidElements(reference, popper)) { 8972 8973 return; 8974 } // Store the reference and popper rects to be read by modifiers 8975 8976 8977 state.rects = { 8978 reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), 8979 popper: getLayoutRect(popper) 8980 }; // Modifiers have the ability to reset the current update cycle. The 8981 // most common use case for this is the `flip` modifier changing the 8982 // placement, which then needs to re-run all the modifiers, because the 8983 // logic was previously ran for the previous placement and is therefore 8984 // stale/incorrect 8985 8986 state.reset = false; 8987 state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier 8988 // is filled with the initial data specified by the modifier. This means 8989 // it doesn't persist and is fresh on each update. 8990 // To ensure persistent data, use `${name}#persistent` 8991 8992 state.orderedModifiers.forEach(function (modifier) { 8993 return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); 8994 }); 8995 8996 for (var index = 0; index < state.orderedModifiers.length; index++) { 8997 8998 if (state.reset === true) { 8999 state.reset = false; 9000 index = -1; 9001 continue; 9002 } 9003 9004 var _state$orderedModifie = state.orderedModifiers[index], 9005 fn = _state$orderedModifie.fn, 9006 _state$orderedModifie2 = _state$orderedModifie.options, 9007 _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, 9008 name = _state$orderedModifie.name; 9009 9010 if (typeof fn === 'function') { 9011 state = fn({ 9012 state: state, 9013 options: _options, 9014 name: name, 9015 instance: instance 9016 }) || state; 9017 } 9018 } 9019 }, 9020 // Async and optimistically optimized update – it will not be executed if 9021 // not necessary (debounced to run at most once-per-tick) 9022 update: debounce(function () { 9023 return new Promise(function (resolve) { 9024 instance.forceUpdate(); 9025 resolve(state); 9026 }); 9027 }), 9028 destroy: function destroy() { 9029 cleanupModifierEffects(); 9030 isDestroyed = true; 9031 } 9032 }; 9033 9034 if (!areValidElements(reference, popper)) { 9035 9036 return instance; 9037 } 9038 9039 instance.setOptions(options).then(function (state) { 9040 if (!isDestroyed && options.onFirstUpdate) { 9041 options.onFirstUpdate(state); 9042 } 9043 }); // Modifiers have the ability to execute arbitrary code before the first 9044 // update cycle runs. They will be executed in the same order as the update 9045 // cycle. This is useful when a modifier adds some persistent data that 9046 // other modifiers need to use, but the modifier is run after the dependent 9047 // one. 9048 9049 function runModifierEffects() { 9050 state.orderedModifiers.forEach(function (_ref3) { 9051 var name = _ref3.name, 9052 _ref3$options = _ref3.options, 9053 options = _ref3$options === void 0 ? {} : _ref3$options, 9054 effect = _ref3.effect; 9055 9056 if (typeof effect === 'function') { 9057 var cleanupFn = effect({ 9058 state: state, 9059 name: name, 9060 instance: instance, 9061 options: options 9062 }); 9063 9064 var noopFn = function noopFn() {}; 9065 9066 effectCleanupFns.push(cleanupFn || noopFn); 9067 } 9068 }); 9069 } 9070 9071 function cleanupModifierEffects() { 9072 effectCleanupFns.forEach(function (fn) { 9073 return fn(); 9074 }); 9075 effectCleanupFns = []; 9076 } 9077 9078 return instance; 9079 }; 9080 } 9081 var createPopper$2 = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules 9082 9083 var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1]; 9084 var createPopper$1 = /*#__PURE__*/popperGenerator({ 9085 defaultModifiers: defaultModifiers$1 9086 }); // eslint-disable-next-line import/no-unused-modules 9087 9088 var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1]; 9089 var createPopper = /*#__PURE__*/popperGenerator({ 9090 defaultModifiers: defaultModifiers 9091 }); // eslint-disable-next-line import/no-unused-modules 9092 9093 var Popper = /*#__PURE__*/Object.freeze({ 9094 __proto__: null, 9095 popperGenerator: popperGenerator, 9096 detectOverflow: detectOverflow, 9097 createPopperBase: createPopper$2, 9098 createPopper: createPopper, 9099 createPopperLite: createPopper$1, 9100 top: top, 9101 bottom: bottom, 9102 right: right, 9103 left: left, 9104 auto: auto, 9105 basePlacements: basePlacements, 9106 start: start, 9107 end: end, 9108 clippingParents: clippingParents, 9109 viewport: viewport, 9110 popper: popper, 9111 reference: reference, 9112 variationPlacements: variationPlacements, 9113 placements: placements, 9114 beforeRead: beforeRead, 9115 read: read, 9116 afterRead: afterRead, 9117 beforeMain: beforeMain, 9118 main: main, 9119 afterMain: afterMain, 9120 beforeWrite: beforeWrite, 9121 write: write, 9122 afterWrite: afterWrite, 9123 modifierPhases: modifierPhases, 9124 applyStyles: applyStyles$1, 9125 arrow: arrow$1, 9126 computeStyles: computeStyles$1, 9127 eventListeners: eventListeners, 9128 flip: flip$1, 9129 hide: hide$1, 9130 offset: offset$1, 9131 popperOffsets: popperOffsets$1, 9132 preventOverflow: preventOverflow$1 9133 }); 9134 9135 /** 9136 * ------------------------------------------------------------------------ 9137 * Constants 9138 * ------------------------------------------------------------------------ 9139 */ 9140 9141 var NAME$9 = 'dropdown'; 9142 var DATA_KEY$8 = 'bs.dropdown'; 9143 var EVENT_KEY$8 = "." + DATA_KEY$8; 9144 var DATA_API_KEY$4 = '.data-api'; 9145 var ESCAPE_KEY$2 = 'Escape'; 9146 var SPACE_KEY = 'Space'; 9147 var TAB_KEY$1 = 'Tab'; 9148 var ARROW_UP_KEY = 'ArrowUp'; 9149 var ARROW_DOWN_KEY = 'ArrowDown'; 9150 var RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button 9151 9152 var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEY + "|" + ARROW_DOWN_KEY + "|" + ESCAPE_KEY$2); 9153 var EVENT_HIDE$4 = "hide" + EVENT_KEY$8; 9154 var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$8; 9155 var EVENT_SHOW$4 = "show" + EVENT_KEY$8; 9156 var EVENT_SHOWN$4 = "shown" + EVENT_KEY$8; 9157 var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$8 + DATA_API_KEY$4; 9158 var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$8 + DATA_API_KEY$4; 9159 var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$8 + DATA_API_KEY$4; 9160 var CLASS_NAME_SHOW$6 = 'show'; 9161 var CLASS_NAME_DROPUP = 'dropup'; 9162 var CLASS_NAME_DROPEND = 'dropend'; 9163 var CLASS_NAME_DROPSTART = 'dropstart'; 9164 var CLASS_NAME_NAVBAR = 'navbar'; 9165 var SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]'; 9166 var SELECTOR_MENU = '.dropdown-menu'; 9167 var SELECTOR_NAVBAR_NAV = '.navbar-nav'; 9168 var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'; 9169 var PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'; 9170 var PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'; 9171 var PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'; 9172 var PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'; 9173 var PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'; 9174 var PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'; 9175 var Default$8 = { 9176 offset: [0, 2], 9177 boundary: 'clippingParents', 9178 reference: 'toggle', 9179 display: 'dynamic', 9180 popperConfig: null, 9181 autoClose: true 9182 }; 9183 var DefaultType$8 = { 9184 offset: '(array|string|function)', 9185 boundary: '(string|element)', 9186 reference: '(string|element|object)', 9187 display: 'string', 9188 popperConfig: '(null|object|function)', 9189 autoClose: '(boolean|string)' 9190 }; 9191 /** 9192 * ------------------------------------------------------------------------ 9193 * Class Definition 9194 * ------------------------------------------------------------------------ 9195 */ 9196 9197 var Dropdown = /*#__PURE__*/function (_BaseComponent) { 9198 _inheritsLoose(Dropdown, _BaseComponent); 9199 9200 function Dropdown(element, config) { 9201 var _this; 9202 9203 _this = _BaseComponent.call(this, element) || this; 9204 _this._popper = null; 9205 _this._config = _this._getConfig(config); 9206 _this._menu = _this._getMenuElement(); 9207 _this._inNavbar = _this._detectNavbar(); 9208 return _this; 9209 } // Getters 9210 9211 9212 var _proto = Dropdown.prototype; 9213 9214 // Public 9215 _proto.toggle = function toggle() { 9216 return this._isShown() ? this.hide() : this.show(); 9217 }; 9218 9219 _proto.show = function show() { 9220 if (isDisabled(this._element) || this._isShown(this._menu)) { 9221 return; 9222 } 9223 9224 var relatedTarget = { 9225 relatedTarget: this._element 9226 }; 9227 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget); 9228 9229 if (showEvent.defaultPrevented) { 9230 return; 9231 } 9232 9233 var parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar 9234 9235 if (this._inNavbar) { 9236 Manipulator.setDataAttribute(this._menu, 'popper', 'none'); 9237 } else { 9238 this._createPopper(parent); 9239 } // If this is a touch-enabled device we add extra 9240 // empty mouseover listeners to the body's immediate children; 9241 // only needed because of broken event delegation on iOS 9242 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 9243 9244 9245 if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) { 9246 var _ref; 9247 9248 (_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) { 9249 return EventHandler.on(elem, 'mouseover', noop); 9250 }); 9251 } 9252 9253 this._element.focus(); 9254 9255 this._element.setAttribute('aria-expanded', true); 9256 9257 this._menu.classList.add(CLASS_NAME_SHOW$6); 9258 9259 this._element.classList.add(CLASS_NAME_SHOW$6); 9260 9261 EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget); 9262 }; 9263 9264 _proto.hide = function hide() { 9265 if (isDisabled(this._element) || !this._isShown(this._menu)) { 9266 return; 9267 } 9268 9269 var relatedTarget = { 9270 relatedTarget: this._element 9271 }; 9272 9273 this._completeHide(relatedTarget); 9274 }; 9275 9276 _proto.dispose = function dispose() { 9277 if (this._popper) { 9278 this._popper.destroy(); 9279 } 9280 9281 _BaseComponent.prototype.dispose.call(this); 9282 }; 9283 9284 _proto.update = function update() { 9285 this._inNavbar = this._detectNavbar(); 9286 9287 if (this._popper) { 9288 this._popper.update(); 9289 } 9290 } // Private 9291 ; 9292 9293 _proto._completeHide = function _completeHide(relatedTarget) { 9294 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget); 9295 9296 if (hideEvent.defaultPrevented) { 9297 return; 9298 } // If this is a touch-enabled device we remove the extra 9299 // empty mouseover listeners we added for iOS support 9300 9301 9302 if ('ontouchstart' in document.documentElement) { 9303 var _ref2; 9304 9305 (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) { 9306 return EventHandler.off(elem, 'mouseover', noop); 9307 }); 9308 } 9309 9310 if (this._popper) { 9311 this._popper.destroy(); 9312 } 9313 9314 this._menu.classList.remove(CLASS_NAME_SHOW$6); 9315 9316 this._element.classList.remove(CLASS_NAME_SHOW$6); 9317 9318 this._element.setAttribute('aria-expanded', 'false'); 9319 9320 Manipulator.removeDataAttribute(this._menu, 'popper'); 9321 EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget); 9322 }; 9323 9324 _proto._getConfig = function _getConfig(config) { 9325 config = Object.assign({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config); 9326 typeCheckConfig(NAME$9, config, this.constructor.DefaultType); 9327 9328 if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') { 9329 // Popper virtual elements require a getBoundingClientRect method 9330 throw new TypeError(NAME$9.toUpperCase() + ": Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method."); 9331 } 9332 9333 return config; 9334 }; 9335 9336 _proto._createPopper = function _createPopper(parent) { 9337 if (typeof Popper === 'undefined') { 9338 throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); 9339 } 9340 9341 var referenceElement = this._element; 9342 9343 if (this._config.reference === 'parent') { 9344 referenceElement = parent; 9345 } else if (isElement$1(this._config.reference)) { 9346 referenceElement = getElement(this._config.reference); 9347 } else if (typeof this._config.reference === 'object') { 9348 referenceElement = this._config.reference; 9349 } 9350 9351 var popperConfig = this._getPopperConfig(); 9352 9353 var isDisplayStatic = popperConfig.modifiers.find(function (modifier) { 9354 return modifier.name === 'applyStyles' && modifier.enabled === false; 9355 }); 9356 this._popper = createPopper(referenceElement, this._menu, popperConfig); 9357 9358 if (isDisplayStatic) { 9359 Manipulator.setDataAttribute(this._menu, 'popper', 'static'); 9360 } 9361 }; 9362 9363 _proto._isShown = function _isShown(element) { 9364 if (element === void 0) { 9365 element = this._element; 9366 } 9367 9368 return element.classList.contains(CLASS_NAME_SHOW$6); 9369 }; 9370 9371 _proto._getMenuElement = function _getMenuElement() { 9372 return SelectorEngine.next(this._element, SELECTOR_MENU)[0]; 9373 }; 9374 9375 _proto._getPlacement = function _getPlacement() { 9376 var parentDropdown = this._element.parentNode; 9377 9378 if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) { 9379 return PLACEMENT_RIGHT; 9380 } 9381 9382 if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) { 9383 return PLACEMENT_LEFT; 9384 } // We need to trim the value because custom properties can also include spaces 9385 9386 9387 var isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'; 9388 9389 if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) { 9390 return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP; 9391 } 9392 9393 return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM; 9394 }; 9395 9396 _proto._detectNavbar = function _detectNavbar() { 9397 return this._element.closest("." + CLASS_NAME_NAVBAR) !== null; 9398 }; 9399 9400 _proto._getOffset = function _getOffset() { 9401 var _this2 = this; 9402 9403 var offset = this._config.offset; 9404 9405 if (typeof offset === 'string') { 9406 return offset.split(',').map(function (val) { 9407 return Number.parseInt(val, 10); 9408 }); 9409 } 9410 9411 if (typeof offset === 'function') { 9412 return function (popperData) { 9413 return offset(popperData, _this2._element); 9414 }; 9415 } 9416 9417 return offset; 9418 }; 9419 9420 _proto._getPopperConfig = function _getPopperConfig() { 9421 var defaultBsPopperConfig = { 9422 placement: this._getPlacement(), 9423 modifiers: [{ 9424 name: 'preventOverflow', 9425 options: { 9426 boundary: this._config.boundary 9427 } 9428 }, { 9429 name: 'offset', 9430 options: { 9431 offset: this._getOffset() 9432 } 9433 }] 9434 }; // Disable Popper if we have a static display 9435 9436 if (this._config.display === 'static') { 9437 defaultBsPopperConfig.modifiers = [{ 9438 name: 'applyStyles', 9439 enabled: false 9440 }]; 9441 } 9442 9443 return Object.assign({}, defaultBsPopperConfig, typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig); 9444 }; 9445 9446 _proto._selectMenuItem = function _selectMenuItem(_ref3) { 9447 var key = _ref3.key, 9448 target = _ref3.target; 9449 var items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible); 9450 9451 if (!items.length) { 9452 return; 9453 } // if target isn't included in items (e.g. when expanding the dropdown) 9454 // allow cycling to get the last item in case key equals ARROW_UP_KEY 9455 9456 9457 getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus(); 9458 } // Static 9459 ; 9460 9461 Dropdown.jQueryInterface = function jQueryInterface(config) { 9462 return this.each(function () { 9463 var data = Dropdown.getOrCreateInstance(this, config); 9464 9465 if (typeof config !== 'string') { 9466 return; 9467 } 9468 9469 if (typeof data[config] === 'undefined') { 9470 throw new TypeError("No method named \"" + config + "\""); 9471 } 9472 9473 data[config](); 9474 }); 9475 }; 9476 9477 Dropdown.clearMenus = function clearMenus(event) { 9478 if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1)) { 9479 return; 9480 } 9481 9482 var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3); 9483 9484 for (var i = 0, len = toggles.length; i < len; i++) { 9485 var context = Dropdown.getInstance(toggles[i]); 9486 9487 if (!context || context._config.autoClose === false) { 9488 continue; 9489 } 9490 9491 if (!context._isShown()) { 9492 continue; 9493 } 9494 9495 var relatedTarget = { 9496 relatedTarget: context._element 9497 }; 9498 9499 if (event) { 9500 var composedPath = event.composedPath(); 9501 var isMenuTarget = composedPath.includes(context._menu); 9502 9503 if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) { 9504 continue; 9505 } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu 9506 9507 9508 if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) { 9509 continue; 9510 } 9511 9512 if (event.type === 'click') { 9513 relatedTarget.clickEvent = event; 9514 } 9515 } 9516 9517 context._completeHide(relatedTarget); 9518 } 9519 }; 9520 9521 Dropdown.getParentFromElement = function getParentFromElement(element) { 9522 return getElementFromSelector(element) || element.parentNode; 9523 }; 9524 9525 Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) { 9526 // If not input/textarea: 9527 // - And not a key in REGEXP_KEYDOWN => not a dropdown command 9528 // If input/textarea: 9529 // - If space key => not a dropdown command 9530 // - If key is other than escape 9531 // - If key is not up or down => not a dropdown command 9532 // - If trigger inside the menu => not a dropdown command 9533 if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY$2 && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) { 9534 return; 9535 } 9536 9537 var isActive = this.classList.contains(CLASS_NAME_SHOW$6); 9538 9539 if (!isActive && event.key === ESCAPE_KEY$2) { 9540 return; 9541 } 9542 9543 event.preventDefault(); 9544 event.stopPropagation(); 9545 9546 if (isDisabled(this)) { 9547 return; 9548 } 9549 9550 var getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0]; 9551 var instance = Dropdown.getOrCreateInstance(getToggleButton); 9552 9553 if (event.key === ESCAPE_KEY$2) { 9554 instance.hide(); 9555 return; 9556 } 9557 9558 if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) { 9559 if (!isActive) { 9560 instance.show(); 9561 } 9562 9563 instance._selectMenuItem(event); 9564 9565 return; 9566 } 9567 9568 if (!isActive || event.key === SPACE_KEY) { 9569 Dropdown.clearMenus(); 9570 } 9571 }; 9572 9573 _createClass(Dropdown, null, [{ 9574 key: "Default", 9575 get: function get() { 9576 return Default$8; 9577 } 9578 }, { 9579 key: "DefaultType", 9580 get: function get() { 9581 return DefaultType$8; 9582 } 9583 }, { 9584 key: "NAME", 9585 get: function get() { 9586 return NAME$9; 9587 } 9588 }]); 9589 9590 return Dropdown; 9591 }(BaseComponent); 9592 /** 9593 * ------------------------------------------------------------------------ 9594 * Data Api implementation 9595 * ------------------------------------------------------------------------ 9596 */ 9597 9598 9599 EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler); 9600 EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler); 9601 EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus); 9602 EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus); 9603 EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) { 9604 event.preventDefault(); 9605 Dropdown.getOrCreateInstance(this).toggle(); 9606 }); 9607 /** 9608 * ------------------------------------------------------------------------ 9609 * jQuery 9610 * ------------------------------------------------------------------------ 9611 * add .Dropdown to jQuery only if jQuery is present 9612 */ 9613 9614 defineJQueryPlugin(Dropdown); 9615 9616 window.bootstrap = window.bootstrap || {}; 9617 window.bootstrap.Dropdown = Dropdown; 9618 9619 if (Joomla && Joomla.getOptions) { 9620 // Get the elements/configurations from the PHP 9621 var dropdowns = Joomla.getOptions('bootstrap.dropdown'); // Initialise the elements 9622 9623 if (typeof dropdowns === 'object' && dropdowns !== null) { 9624 Object.keys(dropdowns).forEach(function (dropdown) { 9625 var opt = dropdowns[dropdown]; 9626 var options = { 9627 interval: opt.interval ? opt.interval : 5000, 9628 pause: opt.pause ? opt.pause : 'hover' 9629 }; 9630 var elements = Array.from(document.querySelectorAll(dropdown)); 9631 9632 if (elements.length) { 9633 elements.map(function (el) { 9634 return new window.bootstrap.Dropdown(el, options); 9635 }); 9636 } 9637 }); 9638 } 9639 } 9640 9641 var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'; 9642 var SELECTOR_STICKY_CONTENT = '.sticky-top'; 9643 9644 var ScrollBarHelper = /*#__PURE__*/function () { 9645 function ScrollBarHelper() { 9646 this._element = document.body; 9647 } 9648 9649 var _proto = ScrollBarHelper.prototype; 9650 9651 _proto.getWidth = function getWidth() { 9652 // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes 9653 var documentWidth = document.documentElement.clientWidth; 9654 return Math.abs(window.innerWidth - documentWidth); 9655 }; 9656 9657 _proto.hide = function hide() { 9658 var width = this.getWidth(); 9659 9660 this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width 9661 9662 9663 this._setElementAttributes(this._element, 'paddingRight', function (calculatedValue) { 9664 return calculatedValue + width; 9665 }); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth 9666 9667 9668 this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', function (calculatedValue) { 9669 return calculatedValue + width; 9670 }); 9671 9672 this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', function (calculatedValue) { 9673 return calculatedValue - width; 9674 }); 9675 }; 9676 9677 _proto._disableOverFlow = function _disableOverFlow() { 9678 this._saveInitialAttribute(this._element, 'overflow'); 9679 9680 this._element.style.overflow = 'hidden'; 9681 }; 9682 9683 _proto._setElementAttributes = function _setElementAttributes(selector, styleProp, callback) { 9684 var _this = this; 9685 9686 var scrollbarWidth = this.getWidth(); 9687 9688 var manipulationCallBack = function manipulationCallBack(element) { 9689 if (element !== _this._element && window.innerWidth > element.clientWidth + scrollbarWidth) { 9690 return; 9691 } 9692 9693 _this._saveInitialAttribute(element, styleProp); 9694 9695 var calculatedValue = window.getComputedStyle(element)[styleProp]; 9696 element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + "px"; 9697 }; 9698 9699 this._applyManipulationCallback(selector, manipulationCallBack); 9700 }; 9701 9702 _proto.reset = function reset() { 9703 this._resetElementAttributes(this._element, 'overflow'); 9704 9705 this._resetElementAttributes(this._element, 'paddingRight'); 9706 9707 this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight'); 9708 9709 this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight'); 9710 }; 9711 9712 _proto._saveInitialAttribute = function _saveInitialAttribute(element, styleProp) { 9713 var actualValue = element.style[styleProp]; 9714 9715 if (actualValue) { 9716 Manipulator.setDataAttribute(element, styleProp, actualValue); 9717 } 9718 }; 9719 9720 _proto._resetElementAttributes = function _resetElementAttributes(selector, styleProp) { 9721 var manipulationCallBack = function manipulationCallBack(element) { 9722 var value = Manipulator.getDataAttribute(element, styleProp); 9723 9724 if (typeof value === 'undefined') { 9725 element.style.removeProperty(styleProp); 9726 } else { 9727 Manipulator.removeDataAttribute(element, styleProp); 9728 element.style[styleProp] = value; 9729 } 9730 }; 9731 9732 this._applyManipulationCallback(selector, manipulationCallBack); 9733 }; 9734 9735 _proto._applyManipulationCallback = function _applyManipulationCallback(selector, callBack) { 9736 if (isElement$1(selector)) { 9737 callBack(selector); 9738 } else { 9739 SelectorEngine.find(selector, this._element).forEach(callBack); 9740 } 9741 }; 9742 9743 _proto.isOverflowing = function isOverflowing() { 9744 return this.getWidth() > 0; 9745 }; 9746 9747 return ScrollBarHelper; 9748 }(); 9749 9750 var Default$7 = { 9751 className: 'modal-backdrop', 9752 isVisible: true, 9753 // if false, we use the backdrop helper without adding any element to the dom 9754 isAnimated: false, 9755 rootElement: 'body', 9756 // give the choice to place backdrop under different elements 9757 clickCallback: null 9758 }; 9759 var DefaultType$7 = { 9760 className: 'string', 9761 isVisible: 'boolean', 9762 isAnimated: 'boolean', 9763 rootElement: '(element|string)', 9764 clickCallback: '(function|null)' 9765 }; 9766 var NAME$8 = 'backdrop'; 9767 var CLASS_NAME_FADE$4 = 'fade'; 9768 var CLASS_NAME_SHOW$5 = 'show'; 9769 var EVENT_MOUSEDOWN = "mousedown.bs." + NAME$8; 9770 9771 var Backdrop = /*#__PURE__*/function () { 9772 function Backdrop(config) { 9773 this._config = this._getConfig(config); 9774 this._isAppended = false; 9775 this._element = null; 9776 } 9777 9778 var _proto = Backdrop.prototype; 9779 9780 _proto.show = function show(callback) { 9781 if (!this._config.isVisible) { 9782 execute(callback); 9783 return; 9784 } 9785 9786 this._append(); 9787 9788 if (this._config.isAnimated) { 9789 reflow(this._getElement()); 9790 } 9791 9792 this._getElement().classList.add(CLASS_NAME_SHOW$5); 9793 9794 this._emulateAnimation(function () { 9795 execute(callback); 9796 }); 9797 }; 9798 9799 _proto.hide = function hide(callback) { 9800 var _this = this; 9801 9802 if (!this._config.isVisible) { 9803 execute(callback); 9804 return; 9805 } 9806 9807 this._getElement().classList.remove(CLASS_NAME_SHOW$5); 9808 9809 this._emulateAnimation(function () { 9810 _this.dispose(); 9811 9812 execute(callback); 9813 }); 9814 } // Private 9815 ; 9816 9817 _proto._getElement = function _getElement() { 9818 if (!this._element) { 9819 var backdrop = document.createElement('div'); 9820 backdrop.className = this._config.className; 9821 9822 if (this._config.isAnimated) { 9823 backdrop.classList.add(CLASS_NAME_FADE$4); 9824 } 9825 9826 this._element = backdrop; 9827 } 9828 9829 return this._element; 9830 }; 9831 9832 _proto._getConfig = function _getConfig(config) { 9833 config = Object.assign({}, Default$7, typeof config === 'object' ? config : {}); // use getElement() with the default "body" to get a fresh Element on each instantiation 9834 9835 config.rootElement = getElement(config.rootElement); 9836 typeCheckConfig(NAME$8, config, DefaultType$7); 9837 return config; 9838 }; 9839 9840 _proto._append = function _append() { 9841 var _this2 = this; 9842 9843 if (this._isAppended) { 9844 return; 9845 } 9846 9847 this._config.rootElement.append(this._getElement()); 9848 9849 EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, function () { 9850 execute(_this2._config.clickCallback); 9851 }); 9852 this._isAppended = true; 9853 }; 9854 9855 _proto.dispose = function dispose() { 9856 if (!this._isAppended) { 9857 return; 9858 } 9859 9860 EventHandler.off(this._element, EVENT_MOUSEDOWN); 9861 9862 this._element.remove(); 9863 9864 this._isAppended = false; 9865 }; 9866 9867 _proto._emulateAnimation = function _emulateAnimation(callback) { 9868 executeAfterTransition(callback, this._getElement(), this._config.isAnimated); 9869 }; 9870 9871 return Backdrop; 9872 }(); 9873 9874 var Default$6 = { 9875 trapElement: null, 9876 // The element to trap focus inside of 9877 autofocus: true 9878 }; 9879 var DefaultType$6 = { 9880 trapElement: 'element', 9881 autofocus: 'boolean' 9882 }; 9883 var NAME$7 = 'focustrap'; 9884 var DATA_KEY$7 = 'bs.focustrap'; 9885 var EVENT_KEY$7 = "." + DATA_KEY$7; 9886 var EVENT_FOCUSIN$1 = "focusin" + EVENT_KEY$7; 9887 var EVENT_KEYDOWN_TAB = "keydown.tab" + EVENT_KEY$7; 9888 var TAB_KEY = 'Tab'; 9889 var TAB_NAV_FORWARD = 'forward'; 9890 var TAB_NAV_BACKWARD = 'backward'; 9891 9892 var FocusTrap = /*#__PURE__*/function () { 9893 function FocusTrap(config) { 9894 this._config = this._getConfig(config); 9895 this._isActive = false; 9896 this._lastTabNavDirection = null; 9897 } 9898 9899 var _proto = FocusTrap.prototype; 9900 9901 _proto.activate = function activate() { 9902 var _this = this; 9903 9904 var _this$_config = this._config, 9905 trapElement = _this$_config.trapElement, 9906 autofocus = _this$_config.autofocus; 9907 9908 if (this._isActive) { 9909 return; 9910 } 9911 9912 if (autofocus) { 9913 trapElement.focus(); 9914 } 9915 9916 EventHandler.off(document, EVENT_KEY$7); // guard against infinite focus loop 9917 9918 EventHandler.on(document, EVENT_FOCUSIN$1, function (event) { 9919 return _this._handleFocusin(event); 9920 }); 9921 EventHandler.on(document, EVENT_KEYDOWN_TAB, function (event) { 9922 return _this._handleKeydown(event); 9923 }); 9924 this._isActive = true; 9925 }; 9926 9927 _proto.deactivate = function deactivate() { 9928 if (!this._isActive) { 9929 return; 9930 } 9931 9932 this._isActive = false; 9933 EventHandler.off(document, EVENT_KEY$7); 9934 } // Private 9935 ; 9936 9937 _proto._handleFocusin = function _handleFocusin(event) { 9938 var target = event.target; 9939 var trapElement = this._config.trapElement; 9940 9941 if (target === document || target === trapElement || trapElement.contains(target)) { 9942 return; 9943 } 9944 9945 var elements = SelectorEngine.focusableChildren(trapElement); 9946 9947 if (elements.length === 0) { 9948 trapElement.focus(); 9949 } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) { 9950 elements[elements.length - 1].focus(); 9951 } else { 9952 elements[0].focus(); 9953 } 9954 }; 9955 9956 _proto._handleKeydown = function _handleKeydown(event) { 9957 if (event.key !== TAB_KEY) { 9958 return; 9959 } 9960 9961 this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD; 9962 }; 9963 9964 _proto._getConfig = function _getConfig(config) { 9965 config = Object.assign({}, Default$6, typeof config === 'object' ? config : {}); 9966 typeCheckConfig(NAME$7, config, DefaultType$6); 9967 return config; 9968 }; 9969 9970 return FocusTrap; 9971 }(); 9972 9973 /** 9974 * ------------------------------------------------------------------------ 9975 * Constants 9976 * ------------------------------------------------------------------------ 9977 */ 9978 9979 var NAME$6 = 'modal'; 9980 var DATA_KEY$6 = 'bs.modal'; 9981 var EVENT_KEY$6 = "." + DATA_KEY$6; 9982 var DATA_API_KEY$3 = '.data-api'; 9983 var ESCAPE_KEY$1 = 'Escape'; 9984 var Default$5 = { 9985 backdrop: true, 9986 keyboard: true, 9987 focus: true 9988 }; 9989 var DefaultType$5 = { 9990 backdrop: '(boolean|string)', 9991 keyboard: 'boolean', 9992 focus: 'boolean' 9993 }; 9994 var EVENT_HIDE$3 = "hide" + EVENT_KEY$6; 9995 var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$6; 9996 var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$6; 9997 var EVENT_SHOW$3 = "show" + EVENT_KEY$6; 9998 var EVENT_SHOWN$3 = "shown" + EVENT_KEY$6; 9999 var EVENT_RESIZE = "resize" + EVENT_KEY$6; 10000 var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY$6; 10001 var EVENT_KEYDOWN_DISMISS$1 = "keydown.dismiss" + EVENT_KEY$6; 10002 var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$6; 10003 var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$6; 10004 var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$6 + DATA_API_KEY$3; 10005 var CLASS_NAME_OPEN = 'modal-open'; 10006 var CLASS_NAME_FADE$3 = 'fade'; 10007 var CLASS_NAME_SHOW$4 = 'show'; 10008 var CLASS_NAME_STATIC = 'modal-static'; 10009 var OPEN_SELECTOR$1 = '.modal.show'; 10010 var SELECTOR_DIALOG = '.modal-dialog'; 10011 var SELECTOR_MODAL_BODY = '.modal-body'; 10012 var SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]'; 10013 /** 10014 * ------------------------------------------------------------------------ 10015 * Class Definition 10016 * ------------------------------------------------------------------------ 10017 */ 10018 10019 var Modal = /*#__PURE__*/function (_BaseComponent) { 10020 _inheritsLoose(Modal, _BaseComponent); 10021 10022 function Modal(element, config) { 10023 var _this; 10024 10025 _this = _BaseComponent.call(this, element) || this; 10026 _this._config = _this._getConfig(config); 10027 _this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, _this._element); 10028 _this._backdrop = _this._initializeBackDrop(); 10029 _this._focustrap = _this._initializeFocusTrap(); 10030 _this._isShown = false; 10031 _this._ignoreBackdropClick = false; 10032 _this._isTransitioning = false; 10033 _this._scrollBar = new ScrollBarHelper(); 10034 return _this; 10035 } // Getters 10036 10037 10038 var _proto = Modal.prototype; 10039 10040 // Public 10041 _proto.toggle = function toggle(relatedTarget) { 10042 return this._isShown ? this.hide() : this.show(relatedTarget); 10043 }; 10044 10045 _proto.show = function show(relatedTarget) { 10046 var _this2 = this; 10047 10048 if (this._isShown || this._isTransitioning) { 10049 return; 10050 } 10051 10052 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, { 10053 relatedTarget: relatedTarget 10054 }); 10055 10056 if (showEvent.defaultPrevented) { 10057 return; 10058 } 10059 10060 this._isShown = true; 10061 10062 if (this._isAnimated()) { 10063 this._isTransitioning = true; 10064 } 10065 10066 this._scrollBar.hide(); 10067 10068 document.body.classList.add(CLASS_NAME_OPEN); 10069 10070 this._adjustDialog(); 10071 10072 this._setEscapeEvent(); 10073 10074 this._setResizeEvent(); 10075 10076 EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () { 10077 EventHandler.one(_this2._element, EVENT_MOUSEUP_DISMISS, function (event) { 10078 if (event.target === _this2._element) { 10079 _this2._ignoreBackdropClick = true; 10080 } 10081 }); 10082 }); 10083 10084 this._showBackdrop(function () { 10085 return _this2._showElement(relatedTarget); 10086 }); 10087 }; 10088 10089 _proto.hide = function hide() { 10090 var _this3 = this; 10091 10092 if (!this._isShown || this._isTransitioning) { 10093 return; 10094 } 10095 10096 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3); 10097 10098 if (hideEvent.defaultPrevented) { 10099 return; 10100 } 10101 10102 this._isShown = false; 10103 10104 var isAnimated = this._isAnimated(); 10105 10106 if (isAnimated) { 10107 this._isTransitioning = true; 10108 } 10109 10110 this._setEscapeEvent(); 10111 10112 this._setResizeEvent(); 10113 10114 this._focustrap.deactivate(); 10115 10116 this._element.classList.remove(CLASS_NAME_SHOW$4); 10117 10118 EventHandler.off(this._element, EVENT_CLICK_DISMISS); 10119 EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS); 10120 10121 this._queueCallback(function () { 10122 return _this3._hideModal(); 10123 }, this._element, isAnimated); 10124 }; 10125 10126 _proto.dispose = function dispose() { 10127 [window, this._dialog].forEach(function (htmlElement) { 10128 return EventHandler.off(htmlElement, EVENT_KEY$6); 10129 }); 10130 10131 this._backdrop.dispose(); 10132 10133 this._focustrap.deactivate(); 10134 10135 _BaseComponent.prototype.dispose.call(this); 10136 }; 10137 10138 _proto.handleUpdate = function handleUpdate() { 10139 this._adjustDialog(); 10140 } // Private 10141 ; 10142 10143 _proto._initializeBackDrop = function _initializeBackDrop() { 10144 return new Backdrop({ 10145 isVisible: Boolean(this._config.backdrop), 10146 // 'static' option will be translated to true, and booleans will keep their value 10147 isAnimated: this._isAnimated() 10148 }); 10149 }; 10150 10151 _proto._initializeFocusTrap = function _initializeFocusTrap() { 10152 return new FocusTrap({ 10153 trapElement: this._element 10154 }); 10155 }; 10156 10157 _proto._getConfig = function _getConfig(config) { 10158 config = Object.assign({}, Default$5, Manipulator.getDataAttributes(this._element), typeof config === 'object' ? config : {}); 10159 typeCheckConfig(NAME$6, config, DefaultType$5); 10160 return config; 10161 }; 10162 10163 _proto._showElement = function _showElement(relatedTarget) { 10164 var _this4 = this; 10165 10166 var isAnimated = this._isAnimated(); 10167 10168 var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog); 10169 10170 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { 10171 // Don't move modal's DOM position 10172 document.body.append(this._element); 10173 } 10174 10175 this._element.style.display = 'block'; 10176 10177 this._element.removeAttribute('aria-hidden'); 10178 10179 this._element.setAttribute('aria-modal', true); 10180 10181 this._element.setAttribute('role', 'dialog'); 10182 10183 this._element.scrollTop = 0; 10184 10185 if (modalBody) { 10186 modalBody.scrollTop = 0; 10187 } 10188 10189 if (isAnimated) { 10190 reflow(this._element); 10191 } 10192 10193 this._element.classList.add(CLASS_NAME_SHOW$4); 10194 10195 var transitionComplete = function transitionComplete() { 10196 if (_this4._config.focus) { 10197 _this4._focustrap.activate(); 10198 } 10199 10200 _this4._isTransitioning = false; 10201 EventHandler.trigger(_this4._element, EVENT_SHOWN$3, { 10202 relatedTarget: relatedTarget 10203 }); 10204 }; 10205 10206 this._queueCallback(transitionComplete, this._dialog, isAnimated); 10207 }; 10208 10209 _proto._setEscapeEvent = function _setEscapeEvent() { 10210 var _this5 = this; 10211 10212 if (this._isShown) { 10213 EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, function (event) { 10214 if (_this5._config.keyboard && event.key === ESCAPE_KEY$1) { 10215 event.preventDefault(); 10216 10217 _this5.hide(); 10218 } else if (!_this5._config.keyboard && event.key === ESCAPE_KEY$1) { 10219 _this5._triggerBackdropTransition(); 10220 } 10221 }); 10222 } else { 10223 EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1); 10224 } 10225 }; 10226 10227 _proto._setResizeEvent = function _setResizeEvent() { 10228 var _this6 = this; 10229 10230 if (this._isShown) { 10231 EventHandler.on(window, EVENT_RESIZE, function () { 10232 return _this6._adjustDialog(); 10233 }); 10234 } else { 10235 EventHandler.off(window, EVENT_RESIZE); 10236 } 10237 }; 10238 10239 _proto._hideModal = function _hideModal() { 10240 var _this7 = this; 10241 10242 this._element.style.display = 'none'; 10243 10244 this._element.setAttribute('aria-hidden', true); 10245 10246 this._element.removeAttribute('aria-modal'); 10247 10248 this._element.removeAttribute('role'); 10249 10250 this._isTransitioning = false; 10251 10252 this._backdrop.hide(function () { 10253 document.body.classList.remove(CLASS_NAME_OPEN); 10254 10255 _this7._resetAdjustments(); 10256 10257 _this7._scrollBar.reset(); 10258 10259 EventHandler.trigger(_this7._element, EVENT_HIDDEN$3); 10260 }); 10261 }; 10262 10263 _proto._showBackdrop = function _showBackdrop(callback) { 10264 var _this8 = this; 10265 10266 EventHandler.on(this._element, EVENT_CLICK_DISMISS, function (event) { 10267 if (_this8._ignoreBackdropClick) { 10268 _this8._ignoreBackdropClick = false; 10269 return; 10270 } 10271 10272 if (event.target !== event.currentTarget) { 10273 return; 10274 } 10275 10276 if (_this8._config.backdrop === true) { 10277 _this8.hide(); 10278 } else if (_this8._config.backdrop === 'static') { 10279 _this8._triggerBackdropTransition(); 10280 } 10281 }); 10282 10283 this._backdrop.show(callback); 10284 }; 10285 10286 _proto._isAnimated = function _isAnimated() { 10287 return this._element.classList.contains(CLASS_NAME_FADE$3); 10288 }; 10289 10290 _proto._triggerBackdropTransition = function _triggerBackdropTransition() { 10291 var _this9 = this; 10292 10293 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED); 10294 10295 if (hideEvent.defaultPrevented) { 10296 return; 10297 } 10298 10299 var _this$_element = this._element, 10300 classList = _this$_element.classList, 10301 scrollHeight = _this$_element.scrollHeight, 10302 style = _this$_element.style; 10303 var isModalOverflowing = scrollHeight > document.documentElement.clientHeight; // return if the following background transition hasn't yet completed 10304 10305 if (!isModalOverflowing && style.overflowY === 'hidden' || classList.contains(CLASS_NAME_STATIC)) { 10306 return; 10307 } 10308 10309 if (!isModalOverflowing) { 10310 style.overflowY = 'hidden'; 10311 } 10312 10313 classList.add(CLASS_NAME_STATIC); 10314 10315 this._queueCallback(function () { 10316 classList.remove(CLASS_NAME_STATIC); 10317 10318 if (!isModalOverflowing) { 10319 _this9._queueCallback(function () { 10320 style.overflowY = ''; 10321 }, _this9._dialog); 10322 } 10323 }, this._dialog); 10324 10325 this._element.focus(); 10326 } // ---------------------------------------------------------------------- 10327 // the following methods are used to handle overflowing modals 10328 // ---------------------------------------------------------------------- 10329 ; 10330 10331 _proto._adjustDialog = function _adjustDialog() { 10332 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; 10333 10334 var scrollbarWidth = this._scrollBar.getWidth(); 10335 10336 var isBodyOverflowing = scrollbarWidth > 0; 10337 10338 if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) { 10339 this._element.style.paddingLeft = scrollbarWidth + "px"; 10340 } 10341 10342 if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) { 10343 this._element.style.paddingRight = scrollbarWidth + "px"; 10344 } 10345 }; 10346 10347 _proto._resetAdjustments = function _resetAdjustments() { 10348 this._element.style.paddingLeft = ''; 10349 this._element.style.paddingRight = ''; 10350 } // Static 10351 ; 10352 10353 Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) { 10354 return this.each(function () { 10355 var data = Modal.getOrCreateInstance(this, config); 10356 10357 if (typeof config !== 'string') { 10358 return; 10359 } 10360 10361 if (typeof data[config] === 'undefined') { 10362 throw new TypeError("No method named \"" + config + "\""); 10363 } 10364 10365 data[config](relatedTarget); 10366 }); 10367 }; 10368 10369 _createClass(Modal, null, [{ 10370 key: "Default", 10371 get: function get() { 10372 return Default$5; 10373 } 10374 }, { 10375 key: "NAME", 10376 get: function get() { 10377 return NAME$6; 10378 } 10379 }]); 10380 10381 return Modal; 10382 }(BaseComponent); 10383 /** 10384 * ------------------------------------------------------------------------ 10385 * Data Api implementation 10386 * ------------------------------------------------------------------------ 10387 */ 10388 10389 10390 EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) { 10391 var _this10 = this; 10392 10393 var target = getElementFromSelector(this); 10394 10395 if (['A', 'AREA'].includes(this.tagName)) { 10396 event.preventDefault(); 10397 } 10398 10399 EventHandler.one(target, EVENT_SHOW$3, function (showEvent) { 10400 if (showEvent.defaultPrevented) { 10401 // only register focus restorer if modal will actually get shown 10402 return; 10403 } 10404 10405 EventHandler.one(target, EVENT_HIDDEN$3, function () { 10406 if (isVisible(_this10)) { 10407 _this10.focus(); 10408 } 10409 }); 10410 }); // avoid conflict when clicking moddal toggler while another one is open 10411 10412 var allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1); 10413 10414 if (allReadyOpen) { 10415 Modal.getInstance(allReadyOpen).hide(); 10416 } 10417 10418 var data = Modal.getOrCreateInstance(target); 10419 data.toggle(this); 10420 }); 10421 enableDismissTrigger(Modal); 10422 /** 10423 * ------------------------------------------------------------------------ 10424 * jQuery 10425 * ------------------------------------------------------------------------ 10426 * add .Modal to jQuery only if jQuery is present 10427 */ 10428 10429 defineJQueryPlugin(Modal); 10430 10431 Joomla = Joomla || {}; 10432 Joomla.Modal = Joomla.Modal || {}; 10433 window.bootstrap = window.bootstrap || {}; 10434 window.bootstrap.Modal = Modal; 10435 var allowed = { 10436 iframe: ['src', 'name', 'width', 'height'] 10437 }; 10438 10439 Joomla.initialiseModal = function (modal, options) { 10440 if (!(modal instanceof Element)) { 10441 return; 10442 } // eslint-disable-next-line no-new 10443 10444 10445 new window.bootstrap.Modal(modal, options); // Comply with the Joomla API - Bound element.open/close 10446 10447 modal.open = function () { 10448 window.bootstrap.Modal.getInstance(modal).show(modal); 10449 }; 10450 10451 modal.close = function () { 10452 window.bootstrap.Modal.getInstance(modal).hide(); 10453 }; // Do some Joomla specific changes 10454 10455 10456 modal.addEventListener('show.bs.modal', function () { 10457 // Comply with the Joomla API - Set the current Modal ID 10458 Joomla.Modal.setCurrent(modal); 10459 10460 if (modal.dataset.url) { 10461 var modalBody = modal.querySelector('.modal-body'); 10462 var iframe = modalBody.querySelector('iframe'); 10463 10464 if (iframe) { 10465 var addData = modal.querySelector('joomla-field-mediamore'); 10466 10467 if (addData) { 10468 addData.parentNode.removeChild(addData); 10469 } 10470 10471 iframe.parentNode.removeChild(iframe); 10472 } // @todo merge https://github.com/joomla/joomla-cms/pull/20788 10473 // Hacks because com_associations and field modals use pure javascript in the url! 10474 10475 10476 if (modal.dataset.iframe.indexOf('document.getElementById') > 0) { 10477 var iframeTextArr = modal.dataset.iframe.split('+'); 10478 var idFieldArr = iframeTextArr[1].split('"'); 10479 var el; 10480 idFieldArr[0] = idFieldArr[0].replace(/"/g, '"'); 10481 10482 if (!document.getElementById(idFieldArr[1])) { 10483 // eslint-disable-next-line no-new-func 10484 var fn = new Function("return " + idFieldArr[0]); // This is UNSAFE!!!! 10485 10486 el = fn.call(null); 10487 } else { 10488 el = document.getElementById(idFieldArr[1]).value; 10489 } 10490 10491 modalBody.insertAdjacentHTML('afterbegin', Joomla.sanitizeHtml("" + iframeTextArr[0] + el + iframeTextArr[2], allowed)); 10492 } else { 10493 modalBody.insertAdjacentHTML('afterbegin', Joomla.sanitizeHtml(modal.dataset.iframe, allowed)); 10494 } 10495 } 10496 }); 10497 modal.addEventListener('shown.bs.modal', function () { 10498 var modalBody = modal.querySelector('.modal-body'); 10499 var modalHeader = modal.querySelector('.modal-header'); 10500 var modalFooter = modal.querySelector('.modal-footer'); 10501 var modalHeaderHeight = 0; 10502 var modalFooterHeight = 0; 10503 var maxModalBodyHeight = 0; 10504 var modalBodyPadding = 0; 10505 var modalBodyHeightOuter = 0; 10506 10507 if (modalBody) { 10508 if (modalHeader) { 10509 var modalHeaderRects = modalHeader.getBoundingClientRect(); 10510 modalHeaderHeight = modalHeaderRects.height; 10511 modalBodyHeightOuter = modalBody.offsetHeight; 10512 } 10513 10514 if (modalFooter) { 10515 modalFooterHeight = parseFloat(getComputedStyle(modalFooter, null).height.replace('px', '')); 10516 } 10517 10518 var modalBodyHeight = parseFloat(getComputedStyle(modalBody, null).height.replace('px', '')); 10519 var padding = modalBody.offsetTop; 10520 var maxModalHeight = parseFloat(getComputedStyle(document.body, null).height.replace('px', '')) - padding * 2; 10521 modalBodyPadding = modalBodyHeightOuter - modalBodyHeight; 10522 maxModalBodyHeight = maxModalHeight - (modalHeaderHeight + modalFooterHeight + modalBodyPadding); 10523 } 10524 10525 if (modal.dataset.url) { 10526 var iframeEl = modal.querySelector('iframe'); 10527 var iframeHeight = parseFloat(getComputedStyle(iframeEl, null).height.replace('px', '')); 10528 10529 if (iframeHeight > maxModalBodyHeight) { 10530 modalBody.style.maxHeight = maxModalBodyHeight; 10531 modalBody.style.overflowY = 'auto'; 10532 iframeEl.style.maxHeight = maxModalBodyHeight - modalBodyPadding; 10533 } 10534 } 10535 }); 10536 modal.addEventListener('hide.bs.modal', function () { 10537 var modalBody = modal.querySelector('.modal-body'); 10538 modalBody.style.maxHeight = 'initial'; 10539 }); 10540 modal.addEventListener('hidden.bs.modal', function () { 10541 // Comply with the Joomla API - Remove the current Modal ID 10542 Joomla.Modal.setCurrent(''); 10543 }); 10544 }; 10545 /** 10546 * Method to invoke a click on button inside an iframe 10547 * 10548 * @param {object} options Object with the css selector for the parent element of an iframe 10549 * and the selector of the button in the iframe that will be clicked 10550 * { iframeSelector: '', buttonSelector: '' } 10551 * @returns {boolean} 10552 * 10553 * @since 4.0.0 10554 */ 10555 10556 10557 Joomla.iframeButtonClick = function (options) { 10558 if (!options.iframeSelector || !options.buttonSelector) { 10559 throw new Error('Selector is missing'); 10560 } 10561 10562 var iframe = document.querySelector(options.iframeSelector + " iframe"); 10563 10564 if (iframe) { 10565 var button = iframe.contentWindow.document.querySelector(options.buttonSelector); 10566 10567 if (button) { 10568 button.click(); 10569 } 10570 } 10571 }; 10572 10573 if (Joomla && Joomla.getOptions) { 10574 // Get the elements/configurations from the PHP 10575 var modals = Joomla.getOptions('bootstrap.modal'); // Initialise the elements 10576 10577 if (typeof modals === 'object' && modals !== null) { 10578 Object.keys(modals).forEach(function (modal) { 10579 var opt = modals[modal]; 10580 var options = { 10581 backdrop: opt.backdrop ? opt.backdrop : true, 10582 keyboard: opt.keyboard ? opt.keyboard : true, 10583 focus: opt.focus ? opt.focus : true 10584 }; 10585 Array.from(document.querySelectorAll(modal)).map(function (modalEl) { 10586 return Joomla.initialiseModal(modalEl, options); 10587 }); 10588 }); 10589 } 10590 } 10591 10592 /** 10593 * ------------------------------------------------------------------------ 10594 * Constants 10595 * ------------------------------------------------------------------------ 10596 */ 10597 10598 var NAME$5 = 'offcanvas'; 10599 var DATA_KEY$5 = 'bs.offcanvas'; 10600 var EVENT_KEY$5 = "." + DATA_KEY$5; 10601 var DATA_API_KEY$2 = '.data-api'; 10602 var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$5 + DATA_API_KEY$2; 10603 var ESCAPE_KEY = 'Escape'; 10604 var Default$4 = { 10605 backdrop: true, 10606 keyboard: true, 10607 scroll: false 10608 }; 10609 var DefaultType$4 = { 10610 backdrop: 'boolean', 10611 keyboard: 'boolean', 10612 scroll: 'boolean' 10613 }; 10614 var CLASS_NAME_SHOW$3 = 'show'; 10615 var CLASS_NAME_BACKDROP = 'offcanvas-backdrop'; 10616 var OPEN_SELECTOR = '.offcanvas.show'; 10617 var EVENT_SHOW$2 = "show" + EVENT_KEY$5; 10618 var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5; 10619 var EVENT_HIDE$2 = "hide" + EVENT_KEY$5; 10620 var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5; 10621 var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$5 + DATA_API_KEY$2; 10622 var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5; 10623 var SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]'; 10624 /** 10625 * ------------------------------------------------------------------------ 10626 * Class Definition 10627 * ------------------------------------------------------------------------ 10628 */ 10629 10630 var Offcanvas = /*#__PURE__*/function (_BaseComponent) { 10631 _inheritsLoose(Offcanvas, _BaseComponent); 10632 10633 function Offcanvas(element, config) { 10634 var _this; 10635 10636 _this = _BaseComponent.call(this, element) || this; 10637 _this._config = _this._getConfig(config); 10638 _this._isShown = false; 10639 _this._backdrop = _this._initializeBackDrop(); 10640 _this._focustrap = _this._initializeFocusTrap(); 10641 10642 _this._addEventListeners(); 10643 10644 return _this; 10645 } // Getters 10646 10647 10648 var _proto = Offcanvas.prototype; 10649 10650 // Public 10651 _proto.toggle = function toggle(relatedTarget) { 10652 return this._isShown ? this.hide() : this.show(relatedTarget); 10653 }; 10654 10655 _proto.show = function show(relatedTarget) { 10656 var _this2 = this; 10657 10658 if (this._isShown) { 10659 return; 10660 } 10661 10662 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, { 10663 relatedTarget: relatedTarget 10664 }); 10665 10666 if (showEvent.defaultPrevented) { 10667 return; 10668 } 10669 10670 this._isShown = true; 10671 this._element.style.visibility = 'visible'; 10672 10673 this._backdrop.show(); 10674 10675 if (!this._config.scroll) { 10676 new ScrollBarHelper().hide(); 10677 } 10678 10679 this._element.removeAttribute('aria-hidden'); 10680 10681 this._element.setAttribute('aria-modal', true); 10682 10683 this._element.setAttribute('role', 'dialog'); 10684 10685 this._element.classList.add(CLASS_NAME_SHOW$3); 10686 10687 var completeCallBack = function completeCallBack() { 10688 if (!_this2._config.scroll) { 10689 _this2._focustrap.activate(); 10690 } 10691 10692 EventHandler.trigger(_this2._element, EVENT_SHOWN$2, { 10693 relatedTarget: relatedTarget 10694 }); 10695 }; 10696 10697 this._queueCallback(completeCallBack, this._element, true); 10698 }; 10699 10700 _proto.hide = function hide() { 10701 var _this3 = this; 10702 10703 if (!this._isShown) { 10704 return; 10705 } 10706 10707 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2); 10708 10709 if (hideEvent.defaultPrevented) { 10710 return; 10711 } 10712 10713 this._focustrap.deactivate(); 10714 10715 this._element.blur(); 10716 10717 this._isShown = false; 10718 10719 this._element.classList.remove(CLASS_NAME_SHOW$3); 10720 10721 this._backdrop.hide(); 10722 10723 var completeCallback = function completeCallback() { 10724 _this3._element.setAttribute('aria-hidden', true); 10725 10726 _this3._element.removeAttribute('aria-modal'); 10727 10728 _this3._element.removeAttribute('role'); 10729 10730 _this3._element.style.visibility = 'hidden'; 10731 10732 if (!_this3._config.scroll) { 10733 new ScrollBarHelper().reset(); 10734 } 10735 10736 EventHandler.trigger(_this3._element, EVENT_HIDDEN$2); 10737 }; 10738 10739 this._queueCallback(completeCallback, this._element, true); 10740 }; 10741 10742 _proto.dispose = function dispose() { 10743 this._backdrop.dispose(); 10744 10745 this._focustrap.deactivate(); 10746 10747 _BaseComponent.prototype.dispose.call(this); 10748 } // Private 10749 ; 10750 10751 _proto._getConfig = function _getConfig(config) { 10752 config = Object.assign({}, Default$4, Manipulator.getDataAttributes(this._element), typeof config === 'object' ? config : {}); 10753 typeCheckConfig(NAME$5, config, DefaultType$4); 10754 return config; 10755 }; 10756 10757 _proto._initializeBackDrop = function _initializeBackDrop() { 10758 var _this4 = this; 10759 10760 return new Backdrop({ 10761 className: CLASS_NAME_BACKDROP, 10762 isVisible: this._config.backdrop, 10763 isAnimated: true, 10764 rootElement: this._element.parentNode, 10765 clickCallback: function clickCallback() { 10766 return _this4.hide(); 10767 } 10768 }); 10769 }; 10770 10771 _proto._initializeFocusTrap = function _initializeFocusTrap() { 10772 return new FocusTrap({ 10773 trapElement: this._element 10774 }); 10775 }; 10776 10777 _proto._addEventListeners = function _addEventListeners() { 10778 var _this5 = this; 10779 10780 EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) { 10781 if (_this5._config.keyboard && event.key === ESCAPE_KEY) { 10782 _this5.hide(); 10783 } 10784 }); 10785 } // Static 10786 ; 10787 10788 Offcanvas.jQueryInterface = function jQueryInterface(config) { 10789 return this.each(function () { 10790 var data = Offcanvas.getOrCreateInstance(this, config); 10791 10792 if (typeof config !== 'string') { 10793 return; 10794 } 10795 10796 if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { 10797 throw new TypeError("No method named \"" + config + "\""); 10798 } 10799 10800 data[config](this); 10801 }); 10802 }; 10803 10804 _createClass(Offcanvas, null, [{ 10805 key: "NAME", 10806 get: function get() { 10807 return NAME$5; 10808 } 10809 }, { 10810 key: "Default", 10811 get: function get() { 10812 return Default$4; 10813 } 10814 }]); 10815 10816 return Offcanvas; 10817 }(BaseComponent); 10818 /** 10819 * ------------------------------------------------------------------------ 10820 * Data Api implementation 10821 * ------------------------------------------------------------------------ 10822 */ 10823 10824 10825 EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) { 10826 var _this6 = this; 10827 10828 var target = getElementFromSelector(this); 10829 10830 if (['A', 'AREA'].includes(this.tagName)) { 10831 event.preventDefault(); 10832 } 10833 10834 if (isDisabled(this)) { 10835 return; 10836 } 10837 10838 EventHandler.one(target, EVENT_HIDDEN$2, function () { 10839 // focus on trigger when it is closed 10840 if (isVisible(_this6)) { 10841 _this6.focus(); 10842 } 10843 }); // avoid conflict when clicking a toggler of an offcanvas, while another is open 10844 10845 var allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR); 10846 10847 if (allReadyOpen && allReadyOpen !== target) { 10848 Offcanvas.getInstance(allReadyOpen).hide(); 10849 } 10850 10851 var data = Offcanvas.getOrCreateInstance(target); 10852 data.toggle(this); 10853 }); 10854 EventHandler.on(window, EVENT_LOAD_DATA_API$1, function () { 10855 return SelectorEngine.find(OPEN_SELECTOR).forEach(function (el) { 10856 return Offcanvas.getOrCreateInstance(el).show(); 10857 }); 10858 }); 10859 enableDismissTrigger(Offcanvas); 10860 /** 10861 * ------------------------------------------------------------------------ 10862 * jQuery 10863 * ------------------------------------------------------------------------ 10864 */ 10865 10866 defineJQueryPlugin(Offcanvas); 10867 10868 window.bootstrap = window.bootstrap || {}; 10869 window.bootstrap.Offcanvas = Offcanvas; 10870 10871 if (Joomla && Joomla.getOptions) { 10872 // Get the elements/configurations from the PHP 10873 var offcanvases = Joomla.getOptions('bootstrap.offcanvas'); // Initialise the elements 10874 10875 if (typeof offcanvases === 'object' && offcanvases !== null) { 10876 Object.keys(offcanvases).forEach(function (offcanvas) { 10877 var opt = offcanvases[offcanvas]; 10878 var options = { 10879 backdrop: opt.backdrop ? opt.backdrop : true, 10880 keyboard: opt.keyboard ? opt.keyboard : true, 10881 scroll: opt.scroll ? opt.scroll : true 10882 }; 10883 var elements = Array.from(document.querySelectorAll(offcanvas)); 10884 10885 if (elements.length) { 10886 elements.map(function (el) { 10887 return new window.bootstrap.Offcanvas(el, options); 10888 }); 10889 } 10890 }); 10891 } 10892 } 10893 10894 /** 10895 * -------------------------------------------------------------------------- 10896 * Bootstrap (v5.1.3): util/sanitizer.js 10897 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 10898 * -------------------------------------------------------------------------- 10899 */ 10900 var uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']); 10901 var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; 10902 /** 10903 * A pattern that recognizes a commonly useful subset of URLs that are safe. 10904 * 10905 * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts 10906 */ 10907 10908 var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i; 10909 /** 10910 * A pattern that matches safe data URLs. Only matches image, video and audio types. 10911 * 10912 * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts 10913 */ 10914 10915 var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i; 10916 10917 var allowedAttribute = function allowedAttribute(attribute, allowedAttributeList) { 10918 var attributeName = attribute.nodeName.toLowerCase(); 10919 10920 if (allowedAttributeList.includes(attributeName)) { 10921 if (uriAttributes.has(attributeName)) { 10922 return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue)); 10923 } 10924 10925 return true; 10926 } 10927 10928 var regExp = allowedAttributeList.filter(function (attributeRegex) { 10929 return attributeRegex instanceof RegExp; 10930 }); // Check if a regular expression validates the attribute. 10931 10932 for (var i = 0, len = regExp.length; i < len; i++) { 10933 if (regExp[i].test(attributeName)) { 10934 return true; 10935 } 10936 } 10937 10938 return false; 10939 }; 10940 10941 var DefaultAllowlist = { 10942 // Global attributes allowed on any supplied element below. 10943 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], 10944 a: ['target', 'href', 'title', 'rel'], 10945 area: [], 10946 b: [], 10947 br: [], 10948 col: [], 10949 code: [], 10950 div: [], 10951 em: [], 10952 hr: [], 10953 h1: [], 10954 h2: [], 10955 h3: [], 10956 h4: [], 10957 h5: [], 10958 h6: [], 10959 i: [], 10960 img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], 10961 li: [], 10962 ol: [], 10963 p: [], 10964 pre: [], 10965 s: [], 10966 small: [], 10967 span: [], 10968 sub: [], 10969 sup: [], 10970 strong: [], 10971 u: [], 10972 ul: [] 10973 }; 10974 function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) { 10975 var _ref; 10976 10977 if (!unsafeHtml.length) { 10978 return unsafeHtml; 10979 } 10980 10981 if (sanitizeFn && typeof sanitizeFn === 'function') { 10982 return sanitizeFn(unsafeHtml); 10983 } 10984 10985 var domParser = new window.DOMParser(); 10986 var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); 10987 10988 var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*')); 10989 10990 var _loop = function _loop(i, len) { 10991 var _ref2; 10992 10993 var element = elements[i]; 10994 var elementName = element.nodeName.toLowerCase(); 10995 10996 if (!Object.keys(allowList).includes(elementName)) { 10997 element.remove(); 10998 return "continue"; 10999 } 11000 11001 var attributeList = (_ref2 = []).concat.apply(_ref2, element.attributes); 11002 11003 var allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []); 11004 attributeList.forEach(function (attribute) { 11005 if (!allowedAttribute(attribute, allowedAttributes)) { 11006 element.removeAttribute(attribute.nodeName); 11007 } 11008 }); 11009 }; 11010 11011 for (var i = 0, len = elements.length; i < len; i++) { 11012 var _ret = _loop(i); 11013 11014 if (_ret === "continue") continue; 11015 } 11016 11017 return createdDocument.body.innerHTML; 11018 } 11019 11020 /** 11021 * ------------------------------------------------------------------------ 11022 * Constants 11023 * ------------------------------------------------------------------------ 11024 */ 11025 11026 var NAME$4 = 'tooltip'; 11027 var DATA_KEY$4 = 'bs.tooltip'; 11028 var EVENT_KEY$4 = "." + DATA_KEY$4; 11029 var CLASS_PREFIX$1 = 'bs-tooltip'; 11030 var DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']); 11031 var DefaultType$3 = { 11032 animation: 'boolean', 11033 template: 'string', 11034 title: '(string|element|function)', 11035 trigger: 'string', 11036 delay: '(number|object)', 11037 html: 'boolean', 11038 selector: '(string|boolean)', 11039 placement: '(string|function)', 11040 offset: '(array|string|function)', 11041 container: '(string|element|boolean)', 11042 fallbackPlacements: 'array', 11043 boundary: '(string|element)', 11044 customClass: '(string|function)', 11045 sanitize: 'boolean', 11046 sanitizeFn: '(null|function)', 11047 allowList: 'object', 11048 popperConfig: '(null|object|function)' 11049 }; 11050 var AttachmentMap = { 11051 AUTO: 'auto', 11052 TOP: 'top', 11053 RIGHT: isRTL() ? 'left' : 'right', 11054 BOTTOM: 'bottom', 11055 LEFT: isRTL() ? 'right' : 'left' 11056 }; 11057 var Default$3 = { 11058 animation: true, 11059 template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>', 11060 trigger: 'hover focus', 11061 title: '', 11062 delay: 0, 11063 html: false, 11064 selector: false, 11065 placement: 'top', 11066 offset: [0, 0], 11067 container: false, 11068 fallbackPlacements: ['top', 'right', 'bottom', 'left'], 11069 boundary: 'clippingParents', 11070 customClass: '', 11071 sanitize: true, 11072 sanitizeFn: null, 11073 allowList: DefaultAllowlist, 11074 popperConfig: null 11075 }; 11076 var Event$2 = { 11077 HIDE: "hide" + EVENT_KEY$4, 11078 HIDDEN: "hidden" + EVENT_KEY$4, 11079 SHOW: "show" + EVENT_KEY$4, 11080 SHOWN: "shown" + EVENT_KEY$4, 11081 INSERTED: "inserted" + EVENT_KEY$4, 11082 CLICK: "click" + EVENT_KEY$4, 11083 FOCUSIN: "focusin" + EVENT_KEY$4, 11084 FOCUSOUT: "focusout" + EVENT_KEY$4, 11085 MOUSEENTER: "mouseenter" + EVENT_KEY$4, 11086 MOUSELEAVE: "mouseleave" + EVENT_KEY$4 11087 }; 11088 var CLASS_NAME_FADE$2 = 'fade'; 11089 var CLASS_NAME_MODAL = 'modal'; 11090 var CLASS_NAME_SHOW$2 = 'show'; 11091 var HOVER_STATE_SHOW = 'show'; 11092 var HOVER_STATE_OUT = 'out'; 11093 var SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; 11094 var SELECTOR_MODAL = "." + CLASS_NAME_MODAL; 11095 var EVENT_MODAL_HIDE = 'hide.bs.modal'; 11096 var TRIGGER_HOVER = 'hover'; 11097 var TRIGGER_FOCUS = 'focus'; 11098 var TRIGGER_CLICK = 'click'; 11099 var TRIGGER_MANUAL = 'manual'; 11100 /** 11101 * ------------------------------------------------------------------------ 11102 * Class Definition 11103 * ------------------------------------------------------------------------ 11104 */ 11105 11106 var Tooltip = /*#__PURE__*/function (_BaseComponent) { 11107 _inheritsLoose(Tooltip, _BaseComponent); 11108 11109 function Tooltip(element, config) { 11110 var _this; 11111 11112 if (typeof Popper === 'undefined') { 11113 throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)'); 11114 } 11115 11116 _this = _BaseComponent.call(this, element) || this; // private 11117 11118 _this._isEnabled = true; 11119 _this._timeout = 0; 11120 _this._hoverState = ''; 11121 _this._activeTrigger = {}; 11122 _this._popper = null; // Protected 11123 11124 _this._config = _this._getConfig(config); 11125 _this.tip = null; 11126 11127 _this._setListeners(); 11128 11129 return _this; 11130 } // Getters 11131 11132 11133 var _proto = Tooltip.prototype; 11134 11135 // Public 11136 _proto.enable = function enable() { 11137 this._isEnabled = true; 11138 }; 11139 11140 _proto.disable = function disable() { 11141 this._isEnabled = false; 11142 }; 11143 11144 _proto.toggleEnabled = function toggleEnabled() { 11145 this._isEnabled = !this._isEnabled; 11146 }; 11147 11148 _proto.toggle = function toggle(event) { 11149 if (!this._isEnabled) { 11150 return; 11151 } 11152 11153 if (event) { 11154 var context = this._initializeOnDelegatedTarget(event); 11155 11156 context._activeTrigger.click = !context._activeTrigger.click; 11157 11158 if (context._isWithActiveTrigger()) { 11159 context._enter(null, context); 11160 } else { 11161 context._leave(null, context); 11162 } 11163 } else { 11164 if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$2)) { 11165 this._leave(null, this); 11166 11167 return; 11168 } 11169 11170 this._enter(null, this); 11171 } 11172 }; 11173 11174 _proto.dispose = function dispose() { 11175 clearTimeout(this._timeout); 11176 EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); 11177 11178 if (this.tip) { 11179 this.tip.remove(); 11180 } 11181 11182 this._disposePopper(); 11183 11184 _BaseComponent.prototype.dispose.call(this); 11185 }; 11186 11187 _proto.show = function show() { 11188 var _this2 = this; 11189 11190 if (this._element.style.display === 'none') { 11191 throw new Error('Please use show on visible elements'); 11192 } 11193 11194 if (!(this.isWithContent() && this._isEnabled)) { 11195 return; 11196 } 11197 11198 var showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW); 11199 var shadowRoot = findShadowRoot(this._element); 11200 var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element); 11201 11202 if (showEvent.defaultPrevented || !isInTheDom) { 11203 return; 11204 } // A trick to recreate a tooltip in case a new title is given by using the NOT documented `data-bs-original-title` 11205 // This will be removed later in favor of a `setContent` method 11206 11207 11208 if (this.constructor.NAME === 'tooltip' && this.tip && this.getTitle() !== this.tip.querySelector(SELECTOR_TOOLTIP_INNER).innerHTML) { 11209 this._disposePopper(); 11210 11211 this.tip.remove(); 11212 this.tip = null; 11213 } 11214 11215 var tip = this.getTipElement(); 11216 var tipId = getUID(this.constructor.NAME); 11217 tip.setAttribute('id', tipId); 11218 11219 this._element.setAttribute('aria-describedby', tipId); 11220 11221 if (this._config.animation) { 11222 tip.classList.add(CLASS_NAME_FADE$2); 11223 } 11224 11225 var placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement; 11226 11227 var attachment = this._getAttachment(placement); 11228 11229 this._addAttachmentClass(attachment); 11230 11231 var container = this._config.container; 11232 Data.set(tip, this.constructor.DATA_KEY, this); 11233 11234 if (!this._element.ownerDocument.documentElement.contains(this.tip)) { 11235 container.append(tip); 11236 EventHandler.trigger(this._element, this.constructor.Event.INSERTED); 11237 } 11238 11239 if (this._popper) { 11240 this._popper.update(); 11241 } else { 11242 this._popper = createPopper(this._element, tip, this._getPopperConfig(attachment)); 11243 } 11244 11245 tip.classList.add(CLASS_NAME_SHOW$2); 11246 11247 var customClass = this._resolvePossibleFunction(this._config.customClass); 11248 11249 if (customClass) { 11250 var _tip$classList; 11251 11252 (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' ')); 11253 } // If this is a touch-enabled device we add extra 11254 // empty mouseover listeners to the body's immediate children; 11255 // only needed because of broken event delegation on iOS 11256 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 11257 11258 11259 if ('ontouchstart' in document.documentElement) { 11260 var _ref; 11261 11262 (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) { 11263 EventHandler.on(element, 'mouseover', noop); 11264 }); 11265 } 11266 11267 var complete = function complete() { 11268 var prevHoverState = _this2._hoverState; 11269 _this2._hoverState = null; 11270 EventHandler.trigger(_this2._element, _this2.constructor.Event.SHOWN); 11271 11272 if (prevHoverState === HOVER_STATE_OUT) { 11273 _this2._leave(null, _this2); 11274 } 11275 }; 11276 11277 var isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2); 11278 11279 this._queueCallback(complete, this.tip, isAnimated); 11280 }; 11281 11282 _proto.hide = function hide() { 11283 var _this3 = this; 11284 11285 if (!this._popper) { 11286 return; 11287 } 11288 11289 var tip = this.getTipElement(); 11290 11291 var complete = function complete() { 11292 if (_this3._isWithActiveTrigger()) { 11293 return; 11294 } 11295 11296 if (_this3._hoverState !== HOVER_STATE_SHOW) { 11297 tip.remove(); 11298 } 11299 11300 _this3._cleanTipClass(); 11301 11302 _this3._element.removeAttribute('aria-describedby'); 11303 11304 EventHandler.trigger(_this3._element, _this3.constructor.Event.HIDDEN); 11305 11306 _this3._disposePopper(); 11307 }; 11308 11309 var hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE); 11310 11311 if (hideEvent.defaultPrevented) { 11312 return; 11313 } 11314 11315 tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra 11316 // empty mouseover listeners we added for iOS support 11317 11318 if ('ontouchstart' in document.documentElement) { 11319 var _ref2; 11320 11321 (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) { 11322 return EventHandler.off(element, 'mouseover', noop); 11323 }); 11324 } 11325 11326 this._activeTrigger[TRIGGER_CLICK] = false; 11327 this._activeTrigger[TRIGGER_FOCUS] = false; 11328 this._activeTrigger[TRIGGER_HOVER] = false; 11329 var isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2); 11330 11331 this._queueCallback(complete, this.tip, isAnimated); 11332 11333 this._hoverState = ''; 11334 }; 11335 11336 _proto.update = function update() { 11337 if (this._popper !== null) { 11338 this._popper.update(); 11339 } 11340 } // Protected 11341 ; 11342 11343 _proto.isWithContent = function isWithContent() { 11344 return Boolean(this.getTitle()); 11345 }; 11346 11347 _proto.getTipElement = function getTipElement() { 11348 if (this.tip) { 11349 return this.tip; 11350 } 11351 11352 var element = document.createElement('div'); 11353 element.innerHTML = this._config.template; 11354 var tip = element.children[0]; 11355 this.setContent(tip); 11356 tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2); 11357 this.tip = tip; 11358 return this.tip; 11359 }; 11360 11361 _proto.setContent = function setContent(tip) { 11362 this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER); 11363 }; 11364 11365 _proto._sanitizeAndSetContent = function _sanitizeAndSetContent(template, content, selector) { 11366 var templateElement = SelectorEngine.findOne(selector, template); 11367 11368 if (!content && templateElement) { 11369 templateElement.remove(); 11370 return; 11371 } // we use append for html objects to maintain js events 11372 11373 11374 this.setElementContent(templateElement, content); 11375 }; 11376 11377 _proto.setElementContent = function setElementContent(element, content) { 11378 if (element === null) { 11379 return; 11380 } 11381 11382 if (isElement$1(content)) { 11383 content = getElement(content); // content is a DOM node or a jQuery 11384 11385 if (this._config.html) { 11386 if (content.parentNode !== element) { 11387 element.innerHTML = ''; 11388 element.append(content); 11389 } 11390 } else { 11391 element.textContent = content.textContent; 11392 } 11393 11394 return; 11395 } 11396 11397 if (this._config.html) { 11398 if (this._config.sanitize) { 11399 content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn); 11400 } 11401 11402 element.innerHTML = content; 11403 } else { 11404 element.textContent = content; 11405 } 11406 }; 11407 11408 _proto.getTitle = function getTitle() { 11409 var title = this._element.getAttribute('data-bs-original-title') || this._config.title; 11410 11411 return this._resolvePossibleFunction(title); 11412 }; 11413 11414 _proto.updateAttachment = function updateAttachment(attachment) { 11415 if (attachment === 'right') { 11416 return 'end'; 11417 } 11418 11419 if (attachment === 'left') { 11420 return 'start'; 11421 } 11422 11423 return attachment; 11424 } // Private 11425 ; 11426 11427 _proto._initializeOnDelegatedTarget = function _initializeOnDelegatedTarget(event, context) { 11428 return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); 11429 }; 11430 11431 _proto._getOffset = function _getOffset() { 11432 var _this4 = this; 11433 11434 var offset = this._config.offset; 11435 11436 if (typeof offset === 'string') { 11437 return offset.split(',').map(function (val) { 11438 return Number.parseInt(val, 10); 11439 }); 11440 } 11441 11442 if (typeof offset === 'function') { 11443 return function (popperData) { 11444 return offset(popperData, _this4._element); 11445 }; 11446 } 11447 11448 return offset; 11449 }; 11450 11451 _proto._resolvePossibleFunction = function _resolvePossibleFunction(content) { 11452 return typeof content === 'function' ? content.call(this._element) : content; 11453 }; 11454 11455 _proto._getPopperConfig = function _getPopperConfig(attachment) { 11456 var _this5 = this; 11457 11458 var defaultBsPopperConfig = { 11459 placement: attachment, 11460 modifiers: [{ 11461 name: 'flip', 11462 options: { 11463 fallbackPlacements: this._config.fallbackPlacements 11464 } 11465 }, { 11466 name: 'offset', 11467 options: { 11468 offset: this._getOffset() 11469 } 11470 }, { 11471 name: 'preventOverflow', 11472 options: { 11473 boundary: this._config.boundary 11474 } 11475 }, { 11476 name: 'arrow', 11477 options: { 11478 element: "." + this.constructor.NAME + "-arrow" 11479 } 11480 }, { 11481 name: 'onChange', 11482 enabled: true, 11483 phase: 'afterWrite', 11484 fn: function fn(data) { 11485 return _this5._handlePopperPlacementChange(data); 11486 } 11487 }], 11488 onFirstUpdate: function onFirstUpdate(data) { 11489 if (data.options.placement !== data.placement) { 11490 _this5._handlePopperPlacementChange(data); 11491 } 11492 } 11493 }; 11494 return Object.assign({}, defaultBsPopperConfig, typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig); 11495 }; 11496 11497 _proto._addAttachmentClass = function _addAttachmentClass(attachment) { 11498 this.getTipElement().classList.add(this._getBasicClassPrefix() + "-" + this.updateAttachment(attachment)); 11499 }; 11500 11501 _proto._getAttachment = function _getAttachment(placement) { 11502 return AttachmentMap[placement.toUpperCase()]; 11503 }; 11504 11505 _proto._setListeners = function _setListeners() { 11506 var _this6 = this; 11507 11508 var triggers = this._config.trigger.split(' '); 11509 11510 triggers.forEach(function (trigger) { 11511 if (trigger === 'click') { 11512 EventHandler.on(_this6._element, _this6.constructor.Event.CLICK, _this6._config.selector, function (event) { 11513 return _this6.toggle(event); 11514 }); 11515 } else if (trigger !== TRIGGER_MANUAL) { 11516 var eventIn = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSEENTER : _this6.constructor.Event.FOCUSIN; 11517 var eventOut = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSELEAVE : _this6.constructor.Event.FOCUSOUT; 11518 EventHandler.on(_this6._element, eventIn, _this6._config.selector, function (event) { 11519 return _this6._enter(event); 11520 }); 11521 EventHandler.on(_this6._element, eventOut, _this6._config.selector, function (event) { 11522 return _this6._leave(event); 11523 }); 11524 } 11525 }); 11526 11527 this._hideModalHandler = function () { 11528 if (_this6._element) { 11529 _this6.hide(); 11530 } 11531 }; 11532 11533 EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); 11534 11535 if (this._config.selector) { 11536 this._config = Object.assign({}, this._config, { 11537 trigger: 'manual', 11538 selector: '' 11539 }); 11540 } else { 11541 this._fixTitle(); 11542 } 11543 }; 11544 11545 _proto._fixTitle = function _fixTitle() { 11546 var title = this._element.getAttribute('title'); 11547 11548 var originalTitleType = typeof this._element.getAttribute('data-bs-original-title'); 11549 11550 if (title || originalTitleType !== 'string') { 11551 this._element.setAttribute('data-bs-original-title', title || ''); 11552 11553 if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) { 11554 this._element.setAttribute('aria-label', title); 11555 } 11556 11557 this._element.setAttribute('title', ''); 11558 } 11559 }; 11560 11561 _proto._enter = function _enter(event, context) { 11562 context = this._initializeOnDelegatedTarget(event, context); 11563 11564 if (event) { 11565 context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; 11566 } 11567 11568 if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$2) || context._hoverState === HOVER_STATE_SHOW) { 11569 context._hoverState = HOVER_STATE_SHOW; 11570 return; 11571 } 11572 11573 clearTimeout(context._timeout); 11574 context._hoverState = HOVER_STATE_SHOW; 11575 11576 if (!context._config.delay || !context._config.delay.show) { 11577 context.show(); 11578 return; 11579 } 11580 11581 context._timeout = setTimeout(function () { 11582 if (context._hoverState === HOVER_STATE_SHOW) { 11583 context.show(); 11584 } 11585 }, context._config.delay.show); 11586 }; 11587 11588 _proto._leave = function _leave(event, context) { 11589 context = this._initializeOnDelegatedTarget(event, context); 11590 11591 if (event) { 11592 context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); 11593 } 11594 11595 if (context._isWithActiveTrigger()) { 11596 return; 11597 } 11598 11599 clearTimeout(context._timeout); 11600 context._hoverState = HOVER_STATE_OUT; 11601 11602 if (!context._config.delay || !context._config.delay.hide) { 11603 context.hide(); 11604 return; 11605 } 11606 11607 context._timeout = setTimeout(function () { 11608 if (context._hoverState === HOVER_STATE_OUT) { 11609 context.hide(); 11610 } 11611 }, context._config.delay.hide); 11612 }; 11613 11614 _proto._isWithActiveTrigger = function _isWithActiveTrigger() { 11615 for (var trigger in this._activeTrigger) { 11616 if (this._activeTrigger[trigger]) { 11617 return true; 11618 } 11619 } 11620 11621 return false; 11622 }; 11623 11624 _proto._getConfig = function _getConfig(config) { 11625 var dataAttributes = Manipulator.getDataAttributes(this._element); 11626 Object.keys(dataAttributes).forEach(function (dataAttr) { 11627 if (DISALLOWED_ATTRIBUTES.has(dataAttr)) { 11628 delete dataAttributes[dataAttr]; 11629 } 11630 }); 11631 config = Object.assign({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); 11632 config.container = config.container === false ? document.body : getElement(config.container); 11633 11634 if (typeof config.delay === 'number') { 11635 config.delay = { 11636 show: config.delay, 11637 hide: config.delay 11638 }; 11639 } 11640 11641 if (typeof config.title === 'number') { 11642 config.title = config.title.toString(); 11643 } 11644 11645 if (typeof config.content === 'number') { 11646 config.content = config.content.toString(); 11647 } 11648 11649 typeCheckConfig(NAME$4, config, this.constructor.DefaultType); 11650 11651 if (config.sanitize) { 11652 config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn); 11653 } 11654 11655 return config; 11656 }; 11657 11658 _proto._getDelegateConfig = function _getDelegateConfig() { 11659 var config = {}; 11660 11661 for (var key in this._config) { 11662 if (this.constructor.Default[key] !== this._config[key]) { 11663 config[key] = this._config[key]; 11664 } 11665 } // In the future can be replaced with: 11666 // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]]) 11667 // `Object.fromEntries(keysWithDifferentValues)` 11668 11669 11670 return config; 11671 }; 11672 11673 _proto._cleanTipClass = function _cleanTipClass() { 11674 var tip = this.getTipElement(); 11675 var basicClassPrefixRegex = new RegExp("(^|\\s)" + this._getBasicClassPrefix() + "\\S+", 'g'); 11676 var tabClass = tip.getAttribute('class').match(basicClassPrefixRegex); 11677 11678 if (tabClass !== null && tabClass.length > 0) { 11679 tabClass.map(function (token) { 11680 return token.trim(); 11681 }).forEach(function (tClass) { 11682 return tip.classList.remove(tClass); 11683 }); 11684 } 11685 }; 11686 11687 _proto._getBasicClassPrefix = function _getBasicClassPrefix() { 11688 return CLASS_PREFIX$1; 11689 }; 11690 11691 _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) { 11692 var state = popperData.state; 11693 11694 if (!state) { 11695 return; 11696 } 11697 11698 this.tip = state.elements.popper; 11699 11700 this._cleanTipClass(); 11701 11702 this._addAttachmentClass(this._getAttachment(state.placement)); 11703 }; 11704 11705 _proto._disposePopper = function _disposePopper() { 11706 if (this._popper) { 11707 this._popper.destroy(); 11708 11709 this._popper = null; 11710 } 11711 } // Static 11712 ; 11713 11714 Tooltip.jQueryInterface = function jQueryInterface(config) { 11715 return this.each(function () { 11716 var data = Tooltip.getOrCreateInstance(this, config); 11717 11718 if (typeof config === 'string') { 11719 if (typeof data[config] === 'undefined') { 11720 throw new TypeError("No method named \"" + config + "\""); 11721 } 11722 11723 data[config](); 11724 } 11725 }); 11726 }; 11727 11728 _createClass(Tooltip, null, [{ 11729 key: "Default", 11730 get: function get() { 11731 return Default$3; 11732 } 11733 }, { 11734 key: "NAME", 11735 get: function get() { 11736 return NAME$4; 11737 } 11738 }, { 11739 key: "Event", 11740 get: function get() { 11741 return Event$2; 11742 } 11743 }, { 11744 key: "DefaultType", 11745 get: function get() { 11746 return DefaultType$3; 11747 } 11748 }]); 11749 11750 return Tooltip; 11751 }(BaseComponent); 11752 /** 11753 * ------------------------------------------------------------------------ 11754 * jQuery 11755 * ------------------------------------------------------------------------ 11756 * add .Tooltip to jQuery only if jQuery is present 11757 */ 11758 11759 11760 defineJQueryPlugin(Tooltip); 11761 11762 /** 11763 * ------------------------------------------------------------------------ 11764 * Constants 11765 * ------------------------------------------------------------------------ 11766 */ 11767 11768 var NAME$3 = 'popover'; 11769 var DATA_KEY$3 = 'bs.popover'; 11770 var EVENT_KEY$3 = "." + DATA_KEY$3; 11771 var CLASS_PREFIX = 'bs-popover'; 11772 var Default$2 = Object.assign({}, Tooltip.Default, { 11773 placement: 'right', 11774 offset: [0, 8], 11775 trigger: 'click', 11776 content: '', 11777 template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>' 11778 }); 11779 var DefaultType$2 = Object.assign({}, Tooltip.DefaultType, { 11780 content: '(string|element|function)' 11781 }); 11782 var Event$1 = { 11783 HIDE: "hide" + EVENT_KEY$3, 11784 HIDDEN: "hidden" + EVENT_KEY$3, 11785 SHOW: "show" + EVENT_KEY$3, 11786 SHOWN: "shown" + EVENT_KEY$3, 11787 INSERTED: "inserted" + EVENT_KEY$3, 11788 CLICK: "click" + EVENT_KEY$3, 11789 FOCUSIN: "focusin" + EVENT_KEY$3, 11790 FOCUSOUT: "focusout" + EVENT_KEY$3, 11791 MOUSEENTER: "mouseenter" + EVENT_KEY$3, 11792 MOUSELEAVE: "mouseleave" + EVENT_KEY$3 11793 }; 11794 var SELECTOR_TITLE = '.popover-header'; 11795 var SELECTOR_CONTENT = '.popover-body'; 11796 /** 11797 * ------------------------------------------------------------------------ 11798 * Class Definition 11799 * ------------------------------------------------------------------------ 11800 */ 11801 11802 var Popover = /*#__PURE__*/function (_Tooltip) { 11803 _inheritsLoose(Popover, _Tooltip); 11804 11805 function Popover() { 11806 return _Tooltip.apply(this, arguments) || this; 11807 } 11808 11809 var _proto = Popover.prototype; 11810 11811 // Overrides 11812 _proto.isWithContent = function isWithContent() { 11813 return this.getTitle() || this._getContent(); 11814 }; 11815 11816 _proto.setContent = function setContent(tip) { 11817 this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE); 11818 11819 this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT); 11820 } // Private 11821 ; 11822 11823 _proto._getContent = function _getContent() { 11824 return this._resolvePossibleFunction(this._config.content); 11825 }; 11826 11827 _proto._getBasicClassPrefix = function _getBasicClassPrefix() { 11828 return CLASS_PREFIX; 11829 } // Static 11830 ; 11831 11832 Popover.jQueryInterface = function jQueryInterface(config) { 11833 return this.each(function () { 11834 var data = Popover.getOrCreateInstance(this, config); 11835 11836 if (typeof config === 'string') { 11837 if (typeof data[config] === 'undefined') { 11838 throw new TypeError("No method named \"" + config + "\""); 11839 } 11840 11841 data[config](); 11842 } 11843 }); 11844 }; 11845 11846 _createClass(Popover, null, [{ 11847 key: "Default", 11848 get: // Getters 11849 function get() { 11850 return Default$2; 11851 } 11852 }, { 11853 key: "NAME", 11854 get: function get() { 11855 return NAME$3; 11856 } 11857 }, { 11858 key: "Event", 11859 get: function get() { 11860 return Event$1; 11861 } 11862 }, { 11863 key: "DefaultType", 11864 get: function get() { 11865 return DefaultType$2; 11866 } 11867 }]); 11868 11869 return Popover; 11870 }(Tooltip); 11871 /** 11872 * ------------------------------------------------------------------------ 11873 * jQuery 11874 * ------------------------------------------------------------------------ 11875 * add .Popover to jQuery only if jQuery is present 11876 */ 11877 11878 11879 defineJQueryPlugin(Popover); 11880 11881 window.bootstrap = window.bootstrap || {}; 11882 window.bootstrap.Popover = Popover; 11883 window.bootstrap.Tooltip = Tooltip; 11884 11885 if (Joomla && Joomla.getOptions) { 11886 // Get the elements/configurations from the PHP 11887 var tooltips = Joomla.getOptions('bootstrap.tooltip'); 11888 var popovers = Joomla.getOptions('bootstrap.popover'); // Initialise the elements 11889 11890 if (typeof popovers === 'object' && popovers !== null) { 11891 Object.keys(popovers).forEach(function (popover) { 11892 var opt = popovers[popover]; 11893 var options = { 11894 animation: opt.animation ? opt.animation : true, 11895 container: opt.container ? opt.container : false, 11896 delay: opt.delay ? opt.delay : 0, 11897 html: opt.html ? opt.html : false, 11898 placement: opt.placement ? opt.placement : 'top', 11899 selector: opt.selector ? opt.selector : false, 11900 title: opt.title ? opt.title : '', 11901 trigger: opt.trigger ? opt.trigger : 'click', 11902 offset: opt.offset ? opt.offset : 0, 11903 fallbackPlacement: opt.fallbackPlacement ? opt.fallbackPlacement : 'flip', 11904 boundary: opt.boundary ? opt.boundary : 'scrollParent', 11905 customClass: opt.customClass ? opt.customClass : '', 11906 sanitize: opt.sanitize ? opt.sanitize : true, 11907 sanitizeFn: opt.sanitizeFn ? opt.sanitizeFn : null, 11908 popperConfig: opt.popperConfig ? opt.popperConfig : null 11909 }; 11910 11911 if (opt.content) { 11912 options.content = opt.content; 11913 } 11914 11915 if (opt.template) { 11916 options.template = opt.template; 11917 } 11918 11919 if (opt.allowList) { 11920 options.allowList = opt.allowList; 11921 } 11922 11923 var elements = Array.from(document.querySelectorAll(popover)); 11924 11925 if (elements.length) { 11926 elements.map(function (el) { 11927 return new window.bootstrap.Popover(el, options); 11928 }); 11929 } 11930 }); 11931 } // Initialise the elements 11932 11933 11934 if (typeof tooltips === 'object' && tooltips !== null) { 11935 Object.keys(tooltips).forEach(function (tooltip) { 11936 var opt = tooltips[tooltip]; 11937 var options = { 11938 animation: opt.animation ? opt.animation : true, 11939 container: opt.container ? opt.container : false, 11940 delay: opt.delay ? opt.delay : 0, 11941 html: opt.html ? opt.html : false, 11942 selector: opt.selector ? opt.selector : false, 11943 trigger: opt.trigger ? opt.trigger : 'hover focus', 11944 fallbackPlacement: opt.fallbackPlacement ? opt.fallbackPlacement : null, 11945 boundary: opt.boundary ? opt.boundary : 'clippingParents', 11946 title: opt.title ? opt.title : '', 11947 customClass: opt.customClass ? opt.customClass : '', 11948 sanitize: opt.sanitize ? opt.sanitize : true, 11949 sanitizeFn: opt.sanitizeFn ? opt.sanitizeFn : null, 11950 popperConfig: opt.popperConfig ? opt.popperConfig : null 11951 }; 11952 11953 if (opt.placement) { 11954 options.placement = opt.placement; 11955 } 11956 11957 if (opt.template) { 11958 options.template = opt.template; 11959 } 11960 11961 if (opt.allowList) { 11962 options.allowList = opt.allowList; 11963 } 11964 11965 var elements = Array.from(document.querySelectorAll(tooltip)); 11966 11967 if (elements.length) { 11968 elements.map(function (el) { 11969 return new window.bootstrap.Tooltip(el, options); 11970 }); 11971 } 11972 }); 11973 } 11974 } 11975 11976 /** 11977 * ------------------------------------------------------------------------ 11978 * Constants 11979 * ------------------------------------------------------------------------ 11980 */ 11981 11982 var NAME$2 = 'scrollspy'; 11983 var DATA_KEY$2 = 'bs.scrollspy'; 11984 var EVENT_KEY$2 = "." + DATA_KEY$2; 11985 var DATA_API_KEY$1 = '.data-api'; 11986 var Default$1 = { 11987 offset: 10, 11988 method: 'auto', 11989 target: '' 11990 }; 11991 var DefaultType$1 = { 11992 offset: 'number', 11993 method: 'string', 11994 target: '(string|element)' 11995 }; 11996 var EVENT_ACTIVATE = "activate" + EVENT_KEY$2; 11997 var EVENT_SCROLL = "scroll" + EVENT_KEY$2; 11998 var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$2 + DATA_API_KEY$1; 11999 var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'; 12000 var CLASS_NAME_ACTIVE$1 = 'active'; 12001 var SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]'; 12002 var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group'; 12003 var SELECTOR_NAV_LINKS = '.nav-link'; 12004 var SELECTOR_NAV_ITEMS = '.nav-item'; 12005 var SELECTOR_LIST_ITEMS = '.list-group-item'; 12006 var SELECTOR_LINK_ITEMS = SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS + ", ." + CLASS_NAME_DROPDOWN_ITEM; 12007 var SELECTOR_DROPDOWN$1 = '.dropdown'; 12008 var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle'; 12009 var METHOD_OFFSET = 'offset'; 12010 var METHOD_POSITION = 'position'; 12011 /** 12012 * ------------------------------------------------------------------------ 12013 * Class Definition 12014 * ------------------------------------------------------------------------ 12015 */ 12016 12017 var ScrollSpy = /*#__PURE__*/function (_BaseComponent) { 12018 _inheritsLoose(ScrollSpy, _BaseComponent); 12019 12020 function ScrollSpy(element, config) { 12021 var _this; 12022 12023 _this = _BaseComponent.call(this, element) || this; 12024 _this._scrollElement = _this._element.tagName === 'BODY' ? window : _this._element; 12025 _this._config = _this._getConfig(config); 12026 _this._offsets = []; 12027 _this._targets = []; 12028 _this._activeTarget = null; 12029 _this._scrollHeight = 0; 12030 EventHandler.on(_this._scrollElement, EVENT_SCROLL, function () { 12031 return _this._process(); 12032 }); 12033 12034 _this.refresh(); 12035 12036 _this._process(); 12037 12038 return _this; 12039 } // Getters 12040 12041 12042 var _proto = ScrollSpy.prototype; 12043 12044 // Public 12045 _proto.refresh = function refresh() { 12046 var _this2 = this; 12047 12048 var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION; 12049 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; 12050 var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0; 12051 this._offsets = []; 12052 this._targets = []; 12053 this._scrollHeight = this._getScrollHeight(); 12054 var targets = SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target); 12055 targets.map(function (element) { 12056 var targetSelector = getSelectorFromElement(element); 12057 var target = targetSelector ? SelectorEngine.findOne(targetSelector) : null; 12058 12059 if (target) { 12060 var targetBCR = target.getBoundingClientRect(); 12061 12062 if (targetBCR.width || targetBCR.height) { 12063 return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector]; 12064 } 12065 } 12066 12067 return null; 12068 }).filter(function (item) { 12069 return item; 12070 }).sort(function (a, b) { 12071 return a[0] - b[0]; 12072 }).forEach(function (item) { 12073 _this2._offsets.push(item[0]); 12074 12075 _this2._targets.push(item[1]); 12076 }); 12077 }; 12078 12079 _proto.dispose = function dispose() { 12080 EventHandler.off(this._scrollElement, EVENT_KEY$2); 12081 12082 _BaseComponent.prototype.dispose.call(this); 12083 } // Private 12084 ; 12085 12086 _proto._getConfig = function _getConfig(config) { 12087 config = Object.assign({}, Default$1, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {}); 12088 config.target = getElement(config.target) || document.documentElement; 12089 typeCheckConfig(NAME$2, config, DefaultType$1); 12090 return config; 12091 }; 12092 12093 _proto._getScrollTop = function _getScrollTop() { 12094 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; 12095 }; 12096 12097 _proto._getScrollHeight = function _getScrollHeight() { 12098 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 12099 }; 12100 12101 _proto._getOffsetHeight = function _getOffsetHeight() { 12102 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; 12103 }; 12104 12105 _proto._process = function _process() { 12106 var scrollTop = this._getScrollTop() + this._config.offset; 12107 12108 var scrollHeight = this._getScrollHeight(); 12109 12110 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); 12111 12112 if (this._scrollHeight !== scrollHeight) { 12113 this.refresh(); 12114 } 12115 12116 if (scrollTop >= maxScroll) { 12117 var target = this._targets[this._targets.length - 1]; 12118 12119 if (this._activeTarget !== target) { 12120 this._activate(target); 12121 } 12122 12123 return; 12124 } 12125 12126 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { 12127 this._activeTarget = null; 12128 12129 this._clear(); 12130 12131 return; 12132 } 12133 12134 for (var i = this._offsets.length; i--;) { 12135 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); 12136 12137 if (isActiveTarget) { 12138 this._activate(this._targets[i]); 12139 } 12140 } 12141 }; 12142 12143 _proto._activate = function _activate(target) { 12144 this._activeTarget = target; 12145 12146 this._clear(); 12147 12148 var queries = SELECTOR_LINK_ITEMS.split(',').map(function (selector) { 12149 return selector + "[data-bs-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; 12150 }); 12151 var link = SelectorEngine.findOne(queries.join(','), this._config.target); 12152 link.classList.add(CLASS_NAME_ACTIVE$1); 12153 12154 if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { 12155 SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1); 12156 } else { 12157 SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(function (listGroup) { 12158 // Set triggered links parents as active 12159 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor 12160 SelectorEngine.prev(listGroup, SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).forEach(function (item) { 12161 return item.classList.add(CLASS_NAME_ACTIVE$1); 12162 }); // Handle special case when .nav-link is inside .nav-item 12163 12164 SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) { 12165 SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) { 12166 return item.classList.add(CLASS_NAME_ACTIVE$1); 12167 }); 12168 }); 12169 }); 12170 } 12171 12172 EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, { 12173 relatedTarget: target 12174 }); 12175 }; 12176 12177 _proto._clear = function _clear() { 12178 SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target).filter(function (node) { 12179 return node.classList.contains(CLASS_NAME_ACTIVE$1); 12180 }).forEach(function (node) { 12181 return node.classList.remove(CLASS_NAME_ACTIVE$1); 12182 }); 12183 } // Static 12184 ; 12185 12186 ScrollSpy.jQueryInterface = function jQueryInterface(config) { 12187 return this.each(function () { 12188 var data = ScrollSpy.getOrCreateInstance(this, config); 12189 12190 if (typeof config !== 'string') { 12191 return; 12192 } 12193 12194 if (typeof data[config] === 'undefined') { 12195 throw new TypeError("No method named \"" + config + "\""); 12196 } 12197 12198 data[config](); 12199 }); 12200 }; 12201 12202 _createClass(ScrollSpy, null, [{ 12203 key: "Default", 12204 get: function get() { 12205 return Default$1; 12206 } 12207 }, { 12208 key: "NAME", 12209 get: function get() { 12210 return NAME$2; 12211 } 12212 }]); 12213 12214 return ScrollSpy; 12215 }(BaseComponent); 12216 /** 12217 * ------------------------------------------------------------------------ 12218 * Data Api implementation 12219 * ------------------------------------------------------------------------ 12220 */ 12221 12222 12223 EventHandler.on(window, EVENT_LOAD_DATA_API, function () { 12224 SelectorEngine.find(SELECTOR_DATA_SPY).forEach(function (spy) { 12225 return new ScrollSpy(spy); 12226 }); 12227 }); 12228 /** 12229 * ------------------------------------------------------------------------ 12230 * jQuery 12231 * ------------------------------------------------------------------------ 12232 * add .ScrollSpy to jQuery only if jQuery is present 12233 */ 12234 12235 defineJQueryPlugin(ScrollSpy); 12236 12237 window.bootstrap = window.bootstrap || {}; 12238 window.bootstrap.Scrollspy = ScrollSpy; 12239 12240 if (Joomla && Joomla.getOptions) { 12241 // Get the elements/configurations from the PHP 12242 var scrollspys = Joomla.getOptions('bootstrap.scrollspy'); // Initialise the elements 12243 12244 if (typeof scrollspys === 'object' && scrollspys !== null) { 12245 Object.keys(scrollspys).forEach(function (scrollspy) { 12246 var opt = scrollspys[scrollspy]; 12247 var options = { 12248 offset: opt.offset ? opt.offset : 10, 12249 method: opt.method ? opt.method : 'auto' 12250 }; 12251 12252 if (opt.target) { 12253 options.target = opt.target; 12254 } 12255 12256 var elements = Array.from(document.querySelectorAll(scrollspy)); 12257 12258 if (elements.length) { 12259 elements.map(function (el) { 12260 return new window.bootstrap.Scrollspy(el, options); 12261 }); 12262 } 12263 }); 12264 } 12265 } 12266 12267 /** 12268 * ------------------------------------------------------------------------ 12269 * Constants 12270 * ------------------------------------------------------------------------ 12271 */ 12272 12273 var NAME$1 = 'tab'; 12274 var DATA_KEY$1 = 'bs.tab'; 12275 var EVENT_KEY$1 = "." + DATA_KEY$1; 12276 var DATA_API_KEY = '.data-api'; 12277 var EVENT_HIDE$1 = "hide" + EVENT_KEY$1; 12278 var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$1; 12279 var EVENT_SHOW$1 = "show" + EVENT_KEY$1; 12280 var EVENT_SHOWN$1 = "shown" + EVENT_KEY$1; 12281 var EVENT_CLICK_DATA_API = "click" + EVENT_KEY$1 + DATA_API_KEY; 12282 var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'; 12283 var CLASS_NAME_ACTIVE = 'active'; 12284 var CLASS_NAME_FADE$1 = 'fade'; 12285 var CLASS_NAME_SHOW$1 = 'show'; 12286 var SELECTOR_DROPDOWN = '.dropdown'; 12287 var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'; 12288 var SELECTOR_ACTIVE = '.active'; 12289 var SELECTOR_ACTIVE_UL = ':scope > li > .active'; 12290 var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; 12291 var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; 12292 var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active'; 12293 /** 12294 * ------------------------------------------------------------------------ 12295 * Class Definition 12296 * ------------------------------------------------------------------------ 12297 */ 12298 12299 var Tab = /*#__PURE__*/function (_BaseComponent) { 12300 _inheritsLoose(Tab, _BaseComponent); 12301 12302 function Tab() { 12303 return _BaseComponent.apply(this, arguments) || this; 12304 } 12305 12306 var _proto = Tab.prototype; 12307 12308 // Public 12309 _proto.show = function show() { 12310 var _this = this; 12311 12312 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE)) { 12313 return; 12314 } 12315 12316 var previous; 12317 var target = getElementFromSelector(this._element); 12318 12319 var listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP); 12320 12321 if (listElement) { 12322 var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE; 12323 previous = SelectorEngine.find(itemSelector, listElement); 12324 previous = previous[previous.length - 1]; 12325 } 12326 12327 var hideEvent = previous ? EventHandler.trigger(previous, EVENT_HIDE$1, { 12328 relatedTarget: this._element 12329 }) : null; 12330 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, { 12331 relatedTarget: previous 12332 }); 12333 12334 if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) { 12335 return; 12336 } 12337 12338 this._activate(this._element, listElement); 12339 12340 var complete = function complete() { 12341 EventHandler.trigger(previous, EVENT_HIDDEN$1, { 12342 relatedTarget: _this._element 12343 }); 12344 EventHandler.trigger(_this._element, EVENT_SHOWN$1, { 12345 relatedTarget: previous 12346 }); 12347 }; 12348 12349 if (target) { 12350 this._activate(target, target.parentNode, complete); 12351 } else { 12352 complete(); 12353 } 12354 } // Private 12355 ; 12356 12357 _proto._activate = function _activate(element, container, callback) { 12358 var _this2 = this; 12359 12360 var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE); 12361 var active = activeElements[0]; 12362 var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$1); 12363 12364 var complete = function complete() { 12365 return _this2._transitionComplete(element, active, callback); 12366 }; 12367 12368 if (active && isTransitioning) { 12369 active.classList.remove(CLASS_NAME_SHOW$1); 12370 12371 this._queueCallback(complete, element, true); 12372 } else { 12373 complete(); 12374 } 12375 }; 12376 12377 _proto._transitionComplete = function _transitionComplete(element, active, callback) { 12378 if (active) { 12379 active.classList.remove(CLASS_NAME_ACTIVE); 12380 var dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode); 12381 12382 if (dropdownChild) { 12383 dropdownChild.classList.remove(CLASS_NAME_ACTIVE); 12384 } 12385 12386 if (active.getAttribute('role') === 'tab') { 12387 active.setAttribute('aria-selected', false); 12388 } 12389 } 12390 12391 element.classList.add(CLASS_NAME_ACTIVE); 12392 12393 if (element.getAttribute('role') === 'tab') { 12394 element.setAttribute('aria-selected', true); 12395 } 12396 12397 reflow(element); 12398 12399 if (element.classList.contains(CLASS_NAME_FADE$1)) { 12400 element.classList.add(CLASS_NAME_SHOW$1); 12401 } 12402 12403 var parent = element.parentNode; 12404 12405 if (parent && parent.nodeName === 'LI') { 12406 parent = parent.parentNode; 12407 } 12408 12409 if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) { 12410 var dropdownElement = element.closest(SELECTOR_DROPDOWN); 12411 12412 if (dropdownElement) { 12413 SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(function (dropdown) { 12414 return dropdown.classList.add(CLASS_NAME_ACTIVE); 12415 }); 12416 } 12417 12418 element.setAttribute('aria-expanded', true); 12419 } 12420 12421 if (callback) { 12422 callback(); 12423 } 12424 } // Static 12425 ; 12426 12427 Tab.jQueryInterface = function jQueryInterface(config) { 12428 return this.each(function () { 12429 var data = Tab.getOrCreateInstance(this); 12430 12431 if (typeof config === 'string') { 12432 if (typeof data[config] === 'undefined') { 12433 throw new TypeError("No method named \"" + config + "\""); 12434 } 12435 12436 data[config](); 12437 } 12438 }); 12439 }; 12440 12441 _createClass(Tab, null, [{ 12442 key: "NAME", 12443 get: // Getters 12444 function get() { 12445 return NAME$1; 12446 } 12447 }]); 12448 12449 return Tab; 12450 }(BaseComponent); 12451 /** 12452 * ------------------------------------------------------------------------ 12453 * Data Api implementation 12454 * ------------------------------------------------------------------------ 12455 */ 12456 12457 12458 EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { 12459 if (['A', 'AREA'].includes(this.tagName)) { 12460 event.preventDefault(); 12461 } 12462 12463 if (isDisabled(this)) { 12464 return; 12465 } 12466 12467 var data = Tab.getOrCreateInstance(this); 12468 data.show(); 12469 }); 12470 /** 12471 * ------------------------------------------------------------------------ 12472 * jQuery 12473 * ------------------------------------------------------------------------ 12474 * add .Tab to jQuery only if jQuery is present 12475 */ 12476 12477 defineJQueryPlugin(Tab); 12478 12479 window.Joomla = window.Joomla || {}; 12480 window.bootstrap = window.bootstrap || {}; 12481 window.bootstrap.Tab = Tab; 12482 /** 12483 * Initialise the Tabs interactivity 12484 * 12485 * @param {HTMLElement} el The element that will become an collapse 12486 * @param {object} options The options for this collapse 12487 */ 12488 12489 Joomla.initialiseTabs = function (el, options) { 12490 if (!(el instanceof Element) && options.isJoomla) { 12491 var tab = document.querySelector(el + "Content"); 12492 12493 if (tab) { 12494 var related = Array.from(tab.children); // Build the navigation 12495 12496 if (related.length) { 12497 related.forEach(function (element) { 12498 if (!element.classList.contains('tab-pane')) { 12499 return; 12500 } 12501 12502 var isActive = element.dataset.active !== ''; 12503 var ul = document.querySelector(el + "Tabs"); 12504 12505 if (ul) { 12506 var link = document.createElement('a'); 12507 link.href = "#" + element.dataset.id; 12508 link.classList.add('nav-link'); 12509 12510 if (isActive) { 12511 link.classList.add('active'); 12512 } 12513 12514 link.dataset.bsToggle = 'tab'; 12515 link.setAttribute('role', 'tab'); 12516 link.setAttribute('aria-controls', element.dataset.id); 12517 link.setAttribute('aria-selected', element.dataset.id); 12518 link.innerHTML = Joomla.sanitizeHtml(element.dataset.title); 12519 var li = document.createElement('li'); 12520 li.classList.add('nav-item'); 12521 li.setAttribute('role', 'presentation'); 12522 li.appendChild(link); 12523 ul.appendChild(li); // eslint-disable-next-line no-new 12524 12525 new window.bootstrap.Tab(li); 12526 } 12527 }); 12528 } 12529 } 12530 } else { 12531 Array.from(document.querySelectorAll(el + " a")).map(function (tab) { 12532 return new window.bootstrap.Tab(tab, options); 12533 }); 12534 } 12535 }; 12536 12537 if (Joomla && Joomla.getOptions) { 12538 // Get the elements/configurations from the PHP 12539 var tabs = Joomla.getOptions('bootstrap.tabs'); // Initialise the elements 12540 12541 if (typeof tabs === 'object' && tabs !== null) { 12542 Object.keys(tabs).map(function (tab) { 12543 return Joomla.initialiseTabs(tab, tabs[tab]); 12544 }); 12545 } 12546 } 12547 12548 /** 12549 * ------------------------------------------------------------------------ 12550 * Constants 12551 * ------------------------------------------------------------------------ 12552 */ 12553 12554 var NAME = 'toast'; 12555 var DATA_KEY = 'bs.toast'; 12556 var EVENT_KEY = "." + DATA_KEY; 12557 var EVENT_MOUSEOVER = "mouseover" + EVENT_KEY; 12558 var EVENT_MOUSEOUT = "mouseout" + EVENT_KEY; 12559 var EVENT_FOCUSIN = "focusin" + EVENT_KEY; 12560 var EVENT_FOCUSOUT = "focusout" + EVENT_KEY; 12561 var EVENT_HIDE = "hide" + EVENT_KEY; 12562 var EVENT_HIDDEN = "hidden" + EVENT_KEY; 12563 var EVENT_SHOW = "show" + EVENT_KEY; 12564 var EVENT_SHOWN = "shown" + EVENT_KEY; 12565 var CLASS_NAME_FADE = 'fade'; 12566 var CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility 12567 12568 var CLASS_NAME_SHOW = 'show'; 12569 var CLASS_NAME_SHOWING = 'showing'; 12570 var DefaultType = { 12571 animation: 'boolean', 12572 autohide: 'boolean', 12573 delay: 'number' 12574 }; 12575 var Default = { 12576 animation: true, 12577 autohide: true, 12578 delay: 5000 12579 }; 12580 /** 12581 * ------------------------------------------------------------------------ 12582 * Class Definition 12583 * ------------------------------------------------------------------------ 12584 */ 12585 12586 var Toast = /*#__PURE__*/function (_BaseComponent) { 12587 _inheritsLoose(Toast, _BaseComponent); 12588 12589 function Toast(element, config) { 12590 var _this; 12591 12592 _this = _BaseComponent.call(this, element) || this; 12593 _this._config = _this._getConfig(config); 12594 _this._timeout = null; 12595 _this._hasMouseInteraction = false; 12596 _this._hasKeyboardInteraction = false; 12597 12598 _this._setListeners(); 12599 12600 return _this; 12601 } // Getters 12602 12603 12604 var _proto = Toast.prototype; 12605 12606 // Public 12607 _proto.show = function show() { 12608 var _this2 = this; 12609 12610 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW); 12611 12612 if (showEvent.defaultPrevented) { 12613 return; 12614 } 12615 12616 this._clearTimeout(); 12617 12618 if (this._config.animation) { 12619 this._element.classList.add(CLASS_NAME_FADE); 12620 } 12621 12622 var complete = function complete() { 12623 _this2._element.classList.remove(CLASS_NAME_SHOWING); 12624 12625 EventHandler.trigger(_this2._element, EVENT_SHOWN); 12626 12627 _this2._maybeScheduleHide(); 12628 }; 12629 12630 this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated 12631 12632 12633 reflow(this._element); 12634 12635 this._element.classList.add(CLASS_NAME_SHOW); 12636 12637 this._element.classList.add(CLASS_NAME_SHOWING); 12638 12639 this._queueCallback(complete, this._element, this._config.animation); 12640 }; 12641 12642 _proto.hide = function hide() { 12643 var _this3 = this; 12644 12645 if (!this._element.classList.contains(CLASS_NAME_SHOW)) { 12646 return; 12647 } 12648 12649 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE); 12650 12651 if (hideEvent.defaultPrevented) { 12652 return; 12653 } 12654 12655 var complete = function complete() { 12656 _this3._element.classList.add(CLASS_NAME_HIDE); // @deprecated 12657 12658 12659 _this3._element.classList.remove(CLASS_NAME_SHOWING); 12660 12661 _this3._element.classList.remove(CLASS_NAME_SHOW); 12662 12663 EventHandler.trigger(_this3._element, EVENT_HIDDEN); 12664 }; 12665 12666 this._element.classList.add(CLASS_NAME_SHOWING); 12667 12668 this._queueCallback(complete, this._element, this._config.animation); 12669 }; 12670 12671 _proto.dispose = function dispose() { 12672 this._clearTimeout(); 12673 12674 if (this._element.classList.contains(CLASS_NAME_SHOW)) { 12675 this._element.classList.remove(CLASS_NAME_SHOW); 12676 } 12677 12678 _BaseComponent.prototype.dispose.call(this); 12679 } // Private 12680 ; 12681 12682 _proto._getConfig = function _getConfig(config) { 12683 config = Object.assign({}, Default, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {}); 12684 typeCheckConfig(NAME, config, this.constructor.DefaultType); 12685 return config; 12686 }; 12687 12688 _proto._maybeScheduleHide = function _maybeScheduleHide() { 12689 var _this4 = this; 12690 12691 if (!this._config.autohide) { 12692 return; 12693 } 12694 12695 if (this._hasMouseInteraction || this._hasKeyboardInteraction) { 12696 return; 12697 } 12698 12699 this._timeout = setTimeout(function () { 12700 _this4.hide(); 12701 }, this._config.delay); 12702 }; 12703 12704 _proto._onInteraction = function _onInteraction(event, isInteracting) { 12705 switch (event.type) { 12706 case 'mouseover': 12707 case 'mouseout': 12708 this._hasMouseInteraction = isInteracting; 12709 break; 12710 12711 case 'focusin': 12712 case 'focusout': 12713 this._hasKeyboardInteraction = isInteracting; 12714 break; 12715 } 12716 12717 if (isInteracting) { 12718 this._clearTimeout(); 12719 12720 return; 12721 } 12722 12723 var nextElement = event.relatedTarget; 12724 12725 if (this._element === nextElement || this._element.contains(nextElement)) { 12726 return; 12727 } 12728 12729 this._maybeScheduleHide(); 12730 }; 12731 12732 _proto._setListeners = function _setListeners() { 12733 var _this5 = this; 12734 12735 EventHandler.on(this._element, EVENT_MOUSEOVER, function (event) { 12736 return _this5._onInteraction(event, true); 12737 }); 12738 EventHandler.on(this._element, EVENT_MOUSEOUT, function (event) { 12739 return _this5._onInteraction(event, false); 12740 }); 12741 EventHandler.on(this._element, EVENT_FOCUSIN, function (event) { 12742 return _this5._onInteraction(event, true); 12743 }); 12744 EventHandler.on(this._element, EVENT_FOCUSOUT, function (event) { 12745 return _this5._onInteraction(event, false); 12746 }); 12747 }; 12748 12749 _proto._clearTimeout = function _clearTimeout() { 12750 clearTimeout(this._timeout); 12751 this._timeout = null; 12752 } // Static 12753 ; 12754 12755 Toast.jQueryInterface = function jQueryInterface(config) { 12756 return this.each(function () { 12757 var data = Toast.getOrCreateInstance(this, config); 12758 12759 if (typeof config === 'string') { 12760 if (typeof data[config] === 'undefined') { 12761 throw new TypeError("No method named \"" + config + "\""); 12762 } 12763 12764 data[config](this); 12765 } 12766 }); 12767 }; 12768 12769 _createClass(Toast, null, [{ 12770 key: "DefaultType", 12771 get: function get() { 12772 return DefaultType; 12773 } 12774 }, { 12775 key: "Default", 12776 get: function get() { 12777 return Default; 12778 } 12779 }, { 12780 key: "NAME", 12781 get: function get() { 12782 return NAME; 12783 } 12784 }]); 12785 12786 return Toast; 12787 }(BaseComponent); 12788 12789 enableDismissTrigger(Toast); 12790 /** 12791 * ------------------------------------------------------------------------ 12792 * jQuery 12793 * ------------------------------------------------------------------------ 12794 * add .Toast to jQuery only if jQuery is present 12795 */ 12796 12797 defineJQueryPlugin(Toast); 12798 12799 window.bootstrap = window.bootstrap || {}; 12800 window.bootstrap.Toast = Toast; 12801 12802 if (Joomla && Joomla.getOptions) { 12803 // Get the elements/configurations from the PHP 12804 var toasts = Joomla.getOptions('bootstrap.toast'); // Initialise the elements 12805 12806 if (typeof toasts === 'object' && toasts !== null) { 12807 Object.keys(toasts).forEach(function (toast) { 12808 var opt = toasts[toast]; 12809 var options = { 12810 animation: opt.animation ? opt.animation : true, 12811 autohide: opt.autohide ? opt.autohide : true, 12812 delay: opt.delay ? opt.delay : 5000 12813 }; 12814 var elements = Array.from(document.querySelectorAll(toast)); 12815 12816 if (elements.length) { 12817 elements.map(function (el) { 12818 return new window.bootstrap.Toast(el, options); 12819 }); 12820 } 12821 }); 12822 } 12823 } 12824 12825 exports.Alert = Alert; 12826 exports.Button = Button; 12827 exports.Carousel = Carousel; 12828 exports.Collapse = Collapse; 12829 exports.Dropdown = Dropdown; 12830 exports.Modal = Modal; 12831 exports.Offcanvas = Offcanvas; 12832 exports.Popover = Popover; 12833 exports.Scrollspy = ScrollSpy; 12834 exports.Tab = Tab; 12835 exports.Toast = Toast; 12836 12837 Object.defineProperty(exports, '__esModule', { value: true }); 12838 12839 return exports; 12840 12841 })({});
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |