diff --git a/.docker-compose.yml.swp b/.docker-compose.yml.swp
deleted file mode 100644
index bf23edd..0000000
Binary files a/.docker-compose.yml.swp and /dev/null differ
diff --git a/.idea/.gitignore b/.idea/.gitignore
old mode 100644
new mode 100755
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index 4eebc8d..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-MVCtemplate
\ No newline at end of file
diff --git a/.idea/Ecobuddy.iml b/.idea/Ecobuddy.iml
old mode 100644
new mode 100755
diff --git a/.idea/MVCtemplate.iml b/.idea/MVCtemplate.iml
deleted file mode 100644
index 5762f75..0000000
--- a/.idea/MVCtemplate.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml
old mode 100644
new mode 100755
index e671eb5..678a2c5
--- a/.idea/dataSources.xml
+++ b/.idea/dataSources.xml
@@ -1,12 +1,20 @@
-
+
sqlite.xerial
true
org.sqlite.JDBC
- jdbc:sqlite:$PROJECT_DIR$/ecobuddy.sqlite
+ jdbc:sqlite:$PROJECT_DIR$/Databases/ecobuddy.sqlite
$ProjectFileDir$
+
+
+ file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.45.1/org/xerial/sqlite-jdbc/3.45.1.0/sqlite-jdbc-3.45.1.0.jar
+
+
+ file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.45.1/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
old mode 100644
new mode 100755
diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
new file mode 100755
index 0000000..9f737c1
--- /dev/null
+++ b/.idea/jsLibraryMappings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
old mode 100644
new mode 100755
diff --git a/.idea/modules.xml b/.idea/modules.xml
old mode 100644
new mode 100755
index 7dd4e10..2d42445
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,8 +2,7 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/php.xml b/.idea/php.xml
old mode 100644
new mode 100755
index 41de6c9..0a7086f
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -10,5 +10,11 @@
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
old mode 100644
new mode 100755
diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml
new file mode 100644
index 0000000..c0e01ca
--- /dev/null
+++ b/.idea/sqldialects.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
old mode 100644
new mode 100755
diff --git a/.~lock.Assessment Brief Form 2024-25.docx# b/.~lock.Assessment Brief Form 2024-25.docx#
old mode 100644
new mode 100755
diff --git a/Assessment Brief Form 2024-25.docx b/Assessment Brief Form 2024-25.docx
old mode 100644
new mode 100755
diff --git a/ecobuddy.sqlite b/Databases/ecobuddy.sqlite
old mode 100644
new mode 100755
similarity index 99%
rename from ecobuddy.sqlite
rename to Databases/ecobuddy.sqlite
index 7c87632..f3dede0
Binary files a/ecobuddy.sqlite and b/Databases/ecobuddy.sqlite differ
diff --git a/MVCTemplate.zip b/MVCTemplate.zip
deleted file mode 100644
index d5db711..0000000
Binary files a/MVCTemplate.zip and /dev/null differ
diff --git a/Models/Database.php b/Models/Database.php
new file mode 100644
index 0000000..95c4175
--- /dev/null
+++ b/Models/Database.php
@@ -0,0 +1,35 @@
+_dbHandle;
+ }
+ public static function getInstance(): ?Database
+ {
+ if(self::$_dbInstance == null) {
+ self::$_dbInstance = new self();
+ }
+ return self::$_dbInstance;
+ }
+
+ private function __construct() {
+ try {
+ $this->_dbHandle = new PDO("sqlite:Databases/ecobuddy.sqlite");
+ }
+ catch (PDOException $e) {
+ echo $e->getMessage();
+ }
+ }
+ public function __destruct() {
+ $this->_dbHandle = null; // destroys the PDO handle when no longer needed
+ }
+}
\ No newline at end of file
diff --git a/Models/FacilityData.php b/Models/FacilityData.php
new file mode 100644
index 0000000..20875c7
--- /dev/null
+++ b/Models/FacilityData.php
@@ -0,0 +1,52 @@
+_id = $dbRow['_id'];
+ $this->_title = $dbRow['title'];
+ $this->_category = $dbRow['category'];
+ $this->_description = $dbRow['description'];
+ $this->_houseNumber = $dbRow['houseNumber'];
+ $this->_streetName = $dbRow['streetName'];
+ $this->_county = $dbRow['county'];
+ $this->_town = $dbRow['town'];
+ $this->_postcode = $dbRow['postcode'];
+ $this->_lng = $dbRow['lng'];
+ $this->_lat = $dbRow['lat'];
+ }
+
+ public function getId() {
+ return $this->_id;
+ }
+ public function getTitle() {
+ return $this->_title;
+ }
+ public function getCategory() {
+ return $this->_category;
+ }
+ public function getDescription() {
+ return $this->_description;
+ }
+ public function getHouseNumber() {
+ return $this->_houseNumber;
+ }
+ public function getStreetName() {
+ return $this->_streetName;
+ }
+ public function getCounty() {
+ return $this->_county;
+ }
+ public function getTown() {
+ return $this->_town;
+ }
+ public function getPostcode() {
+ return $this->_postcode;
+ }
+ public function getLng() {
+ return $this->_lng;
+ }
+ public function getLat() {
+ return $this->_lat;
+ }
+}
\ No newline at end of file
diff --git a/Models/FacilityDataSet.php b/Models/FacilityDataSet.php
new file mode 100644
index 0000000..01822a8
--- /dev/null
+++ b/Models/FacilityDataSet.php
@@ -0,0 +1,30 @@
+_dbInstance = Database::getInstance();
+ $this->_dbHandle = $this->_dbInstance->getDbConnection();
+ }
+
+ public function fetchAll(): array
+ {
+ $sqlQuery = 'SELECT * FROM ecoFacilities;';
+
+ $statement = $this->_dbHandle->prepare($sqlQuery); // prepare a PDO statement
+ $statement->execute(); // execute the PDO statement
+
+ $dataSet = [];
+ // loop through and read the results of the query and cast
+ // them into a matching object
+ while ($row = $statement->fetch()) {
+ $dataSet[] = new FacilityData($row);
+ }
+ return $dataSet;
+ }
+
+}
+
diff --git a/Models/Paginator.php b/Models/Paginator.php
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/Models/Paginator.php
@@ -0,0 +1 @@
+_username;
+ }
+ public function getUserId() {
+ return $this->_userId;
+ }
+ public function __construct() {
+ session_start();
+
+ $this->_username = "None";
+ $this->_loggedIn = false;
+ $this->_userId = "0";
+
+ if(isset($_SESSION['login'])) {
+ $this->_username = $_SESSION['login'];
+ $this->_userId = $_SESSION['uid'];
+ $this->_loggedIn = true;
+ }
+ }
+
+ public function init() {
+ $this->_username = "None";
+ $this->_userId = "0";
+ $this->_loggedIn = false;
+
+ if(isset($_SESSION['login'])) {
+ $this->_username = $_SESSION['login'];
+ $this->_userId = $_SESSION['uid'];
+ $this->_loggedIn = true;
+ }
+ }
+ public function Authenticate($username, $password): bool
+ {
+ $users = new UserDataSet();
+ $userDataSet = $users->checkUserCredentials($username, $password);
+ if(count($userDataSet) > 0) {
+ $_SESSION['login'] = $username;
+ $_SESSION['uid'] = $userDataSet[0]->getId();
+ $this->_loggedIn = true;
+ $this->_username = $username;
+ $this->_userId = $userDataSet[0]->getId();
+ return true;
+ }
+ else {
+ $this->_loggedIn = false;
+ return false;
+ }
+ }
+
+ public function logout() {
+ unset($_SESSION['login']);
+ unset($_SESSION['uid']);
+ $this->_loggedIn = false;
+ $this->_username = "None";
+ $this->_userId = "0";
+ session_destroy();
+ }
+
+ public function isLoggedIn(): bool
+ {
+ return $this->_loggedIn;
+ }
+ public function __destruct()
+ {
+
+ }
+
+
+}
diff --git a/Models/UserData.php b/Models/UserData.php
new file mode 100644
index 0000000..738e71b
--- /dev/null
+++ b/Models/UserData.php
@@ -0,0 +1,25 @@
+_id = $dbRow['_id'];
+ $this->_username = $dbRow['username'];
+ $this->_name = $dbRow['name'];
+ $this->_password = $dbRow['password'];
+ $this->_usertype = $dbRow['usertype'];
+ }
+
+ public function getId() {
+ return $this->_id;
+ }
+
+ public function getUsername() {
+ return $this->_username;
+ }
+
+ public function getName() {
+ return $this->_name;
+ }
+
+}
\ No newline at end of file
diff --git a/Models/UserDataSet.php b/Models/UserDataSet.php
new file mode 100644
index 0000000..43b528f
--- /dev/null
+++ b/Models/UserDataSet.php
@@ -0,0 +1,59 @@
+_dbInstance = Database::getInstance();
+ $this->_dbHandle = $this->_dbInstance->getDbConnection();
+ }
+
+ public function fetchAll(): array
+ {
+ $sqlQuery = 'SELECT * FROM ecoUser;';
+
+ $statement = $this->_dbHandle->prepare($sqlQuery); // prepare a PDO statement
+ $statement->execute(); // execute the PDO statement
+
+ $dataSet = [];
+ // loop through and read the results of the query and cast
+ // them into a matching object
+ while ($row = $statement->fetch()) {
+ $dataSet[] = new UserData($row);
+ }
+ return $dataSet;
+ }
+
+ /**
+ * @param $username
+ * @param $password
+ * @return array
+ */
+ public function checkUserCredentials($username, $password): array
+ {
+ $sqlQuery = 'SELECT * FROM ecoUser WHERE username = ? AND password = ?;';
+ $statement = $this->_dbHandle->prepare($sqlQuery);
+ $statement->bindParam(1, $username);
+ $statement->bindParam(2, $password);
+ $statement->execute();
+ $dataSet = [];
+ while ($row = $statement->fetch()) {
+ $dataSet[] = new UserData($row);
+ }
+ return $dataSet;
+ }
+ public function fetchUser($username): array
+ {
+ $sqlQuery = 'SELECT * FROM ecoUser WHERE username = ?';
+ $statement = $this->_dbHandle->prepare($sqlQuery);
+ $statement->execute([$username]);
+ $dataSet = [];
+ while ($row = $statement->fetch()) {
+ $dataSet[] = new UserData($row);
+ }
+ return $dataSet;
+ }
+
+}
\ No newline at end of file
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
diff --git a/Views/index.phtml b/Views/index.phtml
index 82b9c78..3c1f71a 100644
--- a/Views/index.phtml
+++ b/Views/index.phtml
@@ -1,11 +1,32 @@
-
Welcome to the web-site
+
-A template for web-site development using the Model-View-Controller design pattern and Bootstrap .
-The Views/template directory contains a header.phtl and a footer.phtml which should be included on every new page generated.
- To add additional pages just edit the file header.phtml to add the extra link and then add a new Controller (pageN.php) and a new View (pageN.phtml) , for each page required.
-The Model code files are placed in the Models directory.
-Do not change any of the css files in the css> directory!
+
+
+ Facility ID Title Category Description Address Postcode Lat/Long Contributor
+
+
+ facilityDataSet as $facilityData) {
+ echo ' ' . $facilityData->getId() .
+ ' ' . $facilityData->getTitle() .
+ ' ' . $facilityData->getCategory() .
+ ' ' . $facilityData->getDescription() .
+ ' ' . $facilityData->getHouseNumber() . " " . $facilityData->getStreetName() . " " . $facilityData->getCounty() . " " . $facilityData->getTown() .
+ ' ' . $facilityData->getPostcode() .
+ ' ' . $facilityData->getLatitude() . " " . $facilityData->getLongitude() .
+ ' ' . $facilityData->getContributor() .
+ ' ';
+ } ?>
+
+
-
+
+
\ No newline at end of file
diff --git a/Views/page1.phtml b/Views/page1.phtml
deleted file mode 100644
index 9eb54ee..0000000
--- a/Views/page1.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
Welcome to Page1
-
-
diff --git a/Views/page2.phtml b/Views/page2.phtml
deleted file mode 100644
index baea847..0000000
--- a/Views/page2.phtml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
Welcome to Page2
-
-
diff --git a/Views/template/footer.phtml b/Views/template/footer.phtml
index 3ecaf86..2c9c766 100644
--- a/Views/template/footer.phtml
+++ b/Views/template/footer.phtml
@@ -3,7 +3,8 @@
'click')
+ event = event.replace(stripNameRegex, '');
+ return customEvents[event] || event;
+ }
+ const EventHandler = {
+ on(element, event, handler, delegationFunction) {
+ addHandler(element, event, handler, delegationFunction, false);
+ },
+ one(element, event, handler, delegationFunction) {
+ addHandler(element, event, handler, delegationFunction, true);
+ },
+ off(element, originalTypeEvent, handler, delegationFunction) {
+ if (typeof originalTypeEvent !== 'string' || !element) {
+ return;
+ }
+ const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
+ const inNamespace = typeEvent !== originalTypeEvent;
+ const events = getElementEvents(element);
+ const storeElementEvent = events[typeEvent] || {};
+ const isNamespace = originalTypeEvent.startsWith('.');
+ if (typeof callable !== 'undefined') {
+ // Simplest case: handler is passed, remove that listener ONLY.
+ if (!Object.keys(storeElementEvent).length) {
+ return;
+ }
+ removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);
+ return;
+ }
+ if (isNamespace) {
+ for (const elementEvent of Object.keys(events)) {
+ removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
+ }
+ }
+ for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {
+ const handlerKey = keyHandlers.replace(stripUidRegex, '');
+ if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
+ removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
+ }
+ }
+ },
+ trigger(element, event, args) {
+ if (typeof event !== 'string' || !element) {
+ return null;
+ }
+ const $ = getjQuery();
+ const typeEvent = getTypeEvent(event);
+ const inNamespace = event !== typeEvent;
+ let jQueryEvent = null;
+ let bubbles = true;
+ let nativeDispatch = true;
+ let defaultPrevented = false;
+ if (inNamespace && $) {
+ jQueryEvent = $.Event(event, args);
+ $(element).trigger(jQueryEvent);
+ bubbles = !jQueryEvent.isPropagationStopped();
+ nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
+ defaultPrevented = jQueryEvent.isDefaultPrevented();
+ }
+ const evt = hydrateObj(new Event(event, {
+ bubbles,
+ cancelable: true
+ }), args);
+ if (defaultPrevented) {
+ evt.preventDefault();
+ }
+ if (nativeDispatch) {
+ element.dispatchEvent(evt);
+ }
+ if (evt.defaultPrevented && jQueryEvent) {
+ jQueryEvent.preventDefault();
+ }
+ return evt;
+ }
+ };
+ function hydrateObj(obj, meta = {}) {
+ for (const [key, value] of Object.entries(meta)) {
+ try {
+ obj[key] = value;
+ } catch (_unused) {
+ Object.defineProperty(obj, key, {
+ configurable: true,
+ get() {
+ return value;
+ }
+ });
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap dom/manipulator.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ function normalizeData(value) {
+ if (value === 'true') {
+ return true;
+ }
+ if (value === 'false') {
+ return false;
+ }
+ if (value === Number(value).toString()) {
+ return Number(value);
+ }
+ if (value === '' || value === 'null') {
+ return null;
+ }
+ if (typeof value !== 'string') {
+ return value;
+ }
+ try {
+ return JSON.parse(decodeURIComponent(value));
+ } catch (_unused) {
+ return value;
+ }
+ }
+ function normalizeDataKey(key) {
+ return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
+ }
+ const Manipulator = {
+ setDataAttribute(element, key, value) {
+ element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
+ },
+ removeDataAttribute(element, key) {
+ element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
+ },
+ getDataAttributes(element) {
+ if (!element) {
+ return {};
+ }
+ const attributes = {};
+ const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));
+ for (const key of bsKeys) {
+ let pureKey = key.replace(/^bs/, '');
+ pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
+ attributes[pureKey] = normalizeData(element.dataset[key]);
+ }
+ return attributes;
+ },
+ getDataAttribute(element, key) {
+ return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
+ }
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap util/config.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Class definition
+ */
+
+ class Config {
+ // Getters
+ static get Default() {
+ return {};
+ }
+ static get DefaultType() {
+ return {};
+ }
+ static get NAME() {
+ throw new Error('You have to implement the static method "NAME", for each component!');
+ }
+ _getConfig(config) {
+ config = this._mergeConfigObj(config);
+ config = this._configAfterMerge(config);
+ this._typeCheckConfig(config);
+ return config;
+ }
+ _configAfterMerge(config) {
+ return config;
+ }
+ _mergeConfigObj(config, element) {
+ const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse
+
+ return {
+ ...this.constructor.Default,
+ ...(typeof jsonConfig === 'object' ? jsonConfig : {}),
+ ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),
+ ...(typeof config === 'object' ? config : {})
+ };
+ }
+ _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {
+ for (const [property, expectedTypes] of Object.entries(configTypes)) {
+ const value = config[property];
+ const valueType = isElement(value) ? 'element' : toType(value);
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
+ }
+ }
+ }
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap base-component.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const VERSION = '5.3.3';
+
+ /**
+ * Class definition
+ */
+
+ class BaseComponent extends Config {
+ constructor(element, config) {
+ super();
+ element = getElement(element);
+ if (!element) {
+ return;
+ }
+ this._element = element;
+ this._config = this._getConfig(config);
+ Data.set(this._element, this.constructor.DATA_KEY, this);
}
- isCycling && this.cycle()
-
- return this
- }
-
-
- // CAROUSEL PLUGIN DEFINITION
- // ==========================
-
- var old = $.fn.carousel
-
- $.fn.carousel = function (option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.carousel')
- var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
- var action = typeof option == 'string' ? option : options.slide
-
- if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
- if (typeof option == 'number') data.to(option)
- else if (action) data[action]()
- else if (options.interval) data.pause().cycle()
- })
- }
-
- $.fn.carousel.Constructor = Carousel
-
-
- // CAROUSEL NO CONFLICT
- // ====================
-
- $.fn.carousel.noConflict = function () {
- $.fn.carousel = old
- return this
- }
-
-
- // CAROUSEL DATA-API
- // =================
-
- $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
- var $this = $(this), href
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- var options = $.extend({}, $target.data(), $this.data())
- var slideIndex = $this.attr('data-slide-to')
- if (slideIndex) options.interval = false
-
- $target.carousel(options)
-
- if (slideIndex = $this.attr('data-slide-to')) {
- $target.data('bs.carousel').to(slideIndex)
+ // Public
+ dispose() {
+ Data.remove(this._element, this.constructor.DATA_KEY);
+ EventHandler.off(this._element, this.constructor.EVENT_KEY);
+ for (const propertyName of Object.getOwnPropertyNames(this)) {
+ this[propertyName] = null;
+ }
+ }
+ _queueCallback(callback, element, isAnimated = true) {
+ executeAfterTransition(callback, element, isAnimated);
+ }
+ _getConfig(config) {
+ config = this._mergeConfigObj(config, this._element);
+ config = this._configAfterMerge(config);
+ this._typeCheckConfig(config);
+ return config;
}
- e.preventDefault()
- })
-
- $(window).on('load', function () {
- $('[data-ride="carousel"]').each(function () {
- var $carousel = $(this)
- $carousel.carousel($carousel.data())
- })
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: collapse.js v3.1.1
- * http://getbootstrap.com/javascript/#collapse
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // COLLAPSE PUBLIC CLASS DEFINITION
- // ================================
-
- var Collapse = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Collapse.DEFAULTS, options)
- this.transitioning = null
-
- if (this.options.parent) this.$parent = $(this.options.parent)
- if (this.options.toggle) this.toggle()
- }
-
- Collapse.DEFAULTS = {
- toggle: true
- }
-
- Collapse.prototype.dimension = function () {
- var hasWidth = this.$element.hasClass('width')
- return hasWidth ? 'width' : 'height'
- }
-
- Collapse.prototype.show = function () {
- if (this.transitioning || this.$element.hasClass('in')) return
-
- var startEvent = $.Event('show.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- var actives = this.$parent && this.$parent.find('> .panel > .in')
-
- if (actives && actives.length) {
- var hasData = actives.data('bs.collapse')
- if (hasData && hasData.transitioning) return
- actives.collapse('hide')
- hasData || actives.data('bs.collapse', null)
+ // Static
+ static getInstance(element) {
+ return Data.get(getElement(element), this.DATA_KEY);
}
-
- var dimension = this.dimension()
-
- this.$element
- .removeClass('collapse')
- .addClass('collapsing')
- [dimension](0)
-
- this.transitioning = 1
-
- var complete = function () {
- this.$element
- .removeClass('collapsing')
- .addClass('collapse in')
- [dimension]('auto')
- this.transitioning = 0
- this.$element.trigger('shown.bs.collapse')
+ static getOrCreateInstance(element, config = {}) {
+ return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
}
-
- if (!$.support.transition) return complete.call(this)
-
- var scrollSize = $.camelCase(['scroll', dimension].join('-'))
-
- this.$element
- .one($.support.transition.end, $.proxy(complete, this))
- .emulateTransitionEnd(350)
- [dimension](this.$element[0][scrollSize])
- }
-
- Collapse.prototype.hide = function () {
- if (this.transitioning || !this.$element.hasClass('in')) return
-
- var startEvent = $.Event('hide.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- var dimension = this.dimension()
-
- this.$element
- [dimension](this.$element[dimension]())
- [0].offsetHeight
-
- this.$element
- .addClass('collapsing')
- .removeClass('collapse')
- .removeClass('in')
-
- this.transitioning = 1
-
- var complete = function () {
- this.transitioning = 0
- this.$element
- .trigger('hidden.bs.collapse')
- .removeClass('collapsing')
- .addClass('collapse')
+ static get VERSION() {
+ return VERSION;
}
-
- if (!$.support.transition) return complete.call(this)
-
- this.$element
- [dimension](0)
- .one($.support.transition.end, $.proxy(complete, this))
- .emulateTransitionEnd(350)
- }
-
- Collapse.prototype.toggle = function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']()
- }
-
-
- // COLLAPSE PLUGIN DEFINITION
- // ==========================
-
- var old = $.fn.collapse
-
- $.fn.collapse = function (option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.collapse')
- var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data && options.toggle && option == 'show') option = !option
- if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.collapse.Constructor = Collapse
-
-
- // COLLAPSE NO CONFLICT
- // ====================
-
- $.fn.collapse.noConflict = function () {
- $.fn.collapse = old
- return this
- }
-
-
- // COLLAPSE DATA-API
- // =================
-
- $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
- var $this = $(this), href
- var target = $this.attr('data-target')
- || e.preventDefault()
- || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
- var $target = $(target)
- var data = $target.data('bs.collapse')
- var option = data ? 'toggle' : $this.data()
- var parent = $this.attr('data-parent')
- var $parent = parent && $(parent)
-
- if (!data || !data.transitioning) {
- if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
- $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+ static get DATA_KEY() {
+ return `bs.${this.NAME}`;
+ }
+ static get EVENT_KEY() {
+ return `.${this.DATA_KEY}`;
+ }
+ static eventName(name) {
+ return `${name}${this.EVENT_KEY}`;
}
-
- $target.collapse(option)
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: dropdown.js v3.1.1
- * http://getbootstrap.com/javascript/#dropdowns
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // DROPDOWN CLASS DEFINITION
- // =========================
-
- var backdrop = '.dropdown-backdrop'
- var toggle = '[data-toggle=dropdown]'
- var Dropdown = function (element) {
- $(element).on('click.bs.dropdown', this.toggle)
}
- Dropdown.prototype.toggle = function (e) {
- var $this = $(this)
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap dom/selector-engine.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
- if ($this.is('.disabled, :disabled')) return
+ const getSelector = element => {
+ let selector = element.getAttribute('data-bs-target');
+ if (!selector || selector === '#') {
+ let hrefAttribute = element.getAttribute('href');
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- clearMenus()
-
- if (!isActive) {
- if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
- // if mobile we use a backdrop because click events don't delegate
- $('
').insertAfter($(this)).on('click', clearMenus)
+ // The only valid content that could double as a selector are IDs or classes,
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
+ // `document.querySelector` will rightfully complain it is invalid.
+ // See https://github.com/twbs/bootstrap/issues/32273
+ if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
+ return null;
}
- var relatedTarget = { relatedTarget: this }
- $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
+ // Just in case some CMS puts out a full URL with the anchor appended
+ if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
+ hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
+ }
+ selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
+ }
+ return selector ? selector.split(',').map(sel => parseSelector(sel)).join(',') : null;
+ };
+ const SelectorEngine = {
+ find(selector, element = document.documentElement) {
+ return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
+ },
+ findOne(selector, element = document.documentElement) {
+ return Element.prototype.querySelector.call(element, selector);
+ },
+ children(element, selector) {
+ return [].concat(...element.children).filter(child => child.matches(selector));
+ },
+ parents(element, selector) {
+ const parents = [];
+ let ancestor = element.parentNode.closest(selector);
+ while (ancestor) {
+ parents.push(ancestor);
+ ancestor = ancestor.parentNode.closest(selector);
+ }
+ return parents;
+ },
+ prev(element, selector) {
+ let previous = element.previousElementSibling;
+ while (previous) {
+ if (previous.matches(selector)) {
+ return [previous];
+ }
+ previous = previous.previousElementSibling;
+ }
+ return [];
+ },
+ // TODO: this is now unused; remove later along with prev()
+ next(element, selector) {
+ let next = element.nextElementSibling;
+ while (next) {
+ if (next.matches(selector)) {
+ return [next];
+ }
+ next = next.nextElementSibling;
+ }
+ return [];
+ },
+ focusableChildren(element) {
+ const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
+ return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
+ },
+ getSelectorFromElement(element) {
+ const selector = getSelector(element);
+ if (selector) {
+ return SelectorEngine.findOne(selector) ? selector : null;
+ }
+ return null;
+ },
+ getElementFromSelector(element) {
+ const selector = getSelector(element);
+ return selector ? SelectorEngine.findOne(selector) : null;
+ },
+ getMultipleElementsFromSelector(element) {
+ const selector = getSelector(element);
+ return selector ? SelectorEngine.find(selector) : [];
+ }
+ };
- if (e.isDefaultPrevented()) return
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap util/component-functions.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
- $parent
- .toggleClass('open')
- .trigger('shown.bs.dropdown', relatedTarget)
+ const enableDismissTrigger = (component, method = 'hide') => {
+ const clickEvent = `click.dismiss${component.EVENT_KEY}`;
+ const name = component.NAME;
+ EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
+ if (['A', 'AREA'].includes(this.tagName)) {
+ event.preventDefault();
+ }
+ if (isDisabled(this)) {
+ return;
+ }
+ const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`);
+ const instance = component.getOrCreateInstance(target);
- $this.focus()
+ // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
+ instance[method]();
+ });
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap alert.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$f = 'alert';
+ const DATA_KEY$a = 'bs.alert';
+ const EVENT_KEY$b = `.${DATA_KEY$a}`;
+ const EVENT_CLOSE = `close${EVENT_KEY$b}`;
+ const EVENT_CLOSED = `closed${EVENT_KEY$b}`;
+ const CLASS_NAME_FADE$5 = 'fade';
+ const CLASS_NAME_SHOW$8 = 'show';
+
+ /**
+ * Class definition
+ */
+
+ class Alert extends BaseComponent {
+ // Getters
+ static get NAME() {
+ return NAME$f;
}
- return false
- }
-
- Dropdown.prototype.keydown = function (e) {
- if (!/(38|40|27)/.test(e.keyCode)) return
-
- var $this = $(this)
-
- e.preventDefault()
- e.stopPropagation()
-
- if ($this.is('.disabled, :disabled')) return
-
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- if (!isActive || (isActive && e.keyCode == 27)) {
- if (e.which == 27) $parent.find(toggle).focus()
- return $this.click()
+ // Public
+ close() {
+ const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
+ if (closeEvent.defaultPrevented) {
+ return;
+ }
+ this._element.classList.remove(CLASS_NAME_SHOW$8);
+ const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
+ this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
}
- var desc = ' li:not(.divider):visible a'
- var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
-
- if (!$items.length) return
-
- var index = $items.index($items.filter(':focus'))
-
- if (e.keyCode == 38 && index > 0) index-- // up
- if (e.keyCode == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
-
- $items.eq(index).focus()
- }
-
- function clearMenus(e) {
- $(backdrop).remove()
- $(toggle).each(function () {
- var $parent = getParent($(this))
- var relatedTarget = { relatedTarget: this }
- if (!$parent.hasClass('open')) return
- $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
- if (e.isDefaultPrevented()) return
- $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
- })
- }
-
- function getParent($this) {
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ // Private
+ _destroyElement() {
+ this._element.remove();
+ EventHandler.trigger(this._element, EVENT_CLOSED);
+ this.dispose();
}
- var $parent = selector && $(selector)
-
- return $parent && $parent.length ? $parent : $this.parent()
- }
-
-
- // DROPDOWN PLUGIN DEFINITION
- // ==========================
-
- var old = $.fn.dropdown
-
- $.fn.dropdown = function (option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.dropdown')
-
- if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- $.fn.dropdown.Constructor = Dropdown
-
-
- // DROPDOWN NO CONFLICT
- // ====================
-
- $.fn.dropdown.noConflict = function () {
- $.fn.dropdown = old
- return this
- }
-
-
- // APPLY TO STANDARD DROPDOWN ELEMENTS
- // ===================================
-
- $(document)
- .on('click.bs.dropdown.data-api', clearMenus)
- .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
- .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: modal.js v3.1.1
- * http://getbootstrap.com/javascript/#modals
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // MODAL CLASS DEFINITION
- // ======================
-
- var Modal = function (element, options) {
- this.options = options
- this.$element = $(element)
- this.$backdrop =
- this.isShown = null
-
- if (this.options.remote) {
- this.$element
- .find('.modal-content')
- .load(this.options.remote, $.proxy(function () {
- this.$element.trigger('loaded.bs.modal')
- }, this))
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Alert.getOrCreateInstance(this);
+ if (typeof config !== 'string') {
+ return;
+ }
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config](this);
+ });
}
}
- Modal.DEFAULTS = {
+ /**
+ * Data API implementation
+ */
+
+ enableDismissTrigger(Alert, 'close');
+
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Alert);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap button.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$e = 'button';
+ const DATA_KEY$9 = 'bs.button';
+ const EVENT_KEY$a = `.${DATA_KEY$9}`;
+ const DATA_API_KEY$6 = '.data-api';
+ const CLASS_NAME_ACTIVE$3 = 'active';
+ const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
+ const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;
+
+ /**
+ * Class definition
+ */
+
+ class Button extends BaseComponent {
+ // Getters
+ static get NAME() {
+ return NAME$e;
+ }
+
+ // Public
+ toggle() {
+ // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
+ this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));
+ }
+
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Button.getOrCreateInstance(this);
+ if (config === 'toggle') {
+ data[config]();
+ }
+ });
+ }
+ }
+
+ /**
+ * Data API implementation
+ */
+
+ EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {
+ event.preventDefault();
+ const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);
+ const data = Button.getOrCreateInstance(button);
+ data.toggle();
+ });
+
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Button);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap util/swipe.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$d = 'swipe';
+ const EVENT_KEY$9 = '.bs.swipe';
+ const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;
+ const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;
+ const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;
+ const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;
+ const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;
+ const POINTER_TYPE_TOUCH = 'touch';
+ const POINTER_TYPE_PEN = 'pen';
+ const CLASS_NAME_POINTER_EVENT = 'pointer-event';
+ const SWIPE_THRESHOLD = 40;
+ const Default$c = {
+ endCallback: null,
+ leftCallback: null,
+ rightCallback: null
+ };
+ const DefaultType$c = {
+ endCallback: '(function|null)',
+ leftCallback: '(function|null)',
+ rightCallback: '(function|null)'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class Swipe extends Config {
+ constructor(element, config) {
+ super();
+ this._element = element;
+ if (!element || !Swipe.isSupported()) {
+ return;
+ }
+ this._config = this._getConfig(config);
+ this._deltaX = 0;
+ this._supportPointerEvents = Boolean(window.PointerEvent);
+ this._initEvents();
+ }
+
+ // Getters
+ static get Default() {
+ return Default$c;
+ }
+ static get DefaultType() {
+ return DefaultType$c;
+ }
+ static get NAME() {
+ return NAME$d;
+ }
+
+ // Public
+ dispose() {
+ EventHandler.off(this._element, EVENT_KEY$9);
+ }
+
+ // Private
+ _start(event) {
+ if (!this._supportPointerEvents) {
+ this._deltaX = event.touches[0].clientX;
+ return;
+ }
+ if (this._eventIsPointerPenTouch(event)) {
+ this._deltaX = event.clientX;
+ }
+ }
+ _end(event) {
+ if (this._eventIsPointerPenTouch(event)) {
+ this._deltaX = event.clientX - this._deltaX;
+ }
+ this._handleSwipe();
+ execute(this._config.endCallback);
+ }
+ _move(event) {
+ this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX;
+ }
+ _handleSwipe() {
+ const absDeltaX = Math.abs(this._deltaX);
+ if (absDeltaX <= SWIPE_THRESHOLD) {
+ return;
+ }
+ const direction = absDeltaX / this._deltaX;
+ this._deltaX = 0;
+ if (!direction) {
+ return;
+ }
+ execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback);
+ }
+ _initEvents() {
+ if (this._supportPointerEvents) {
+ EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event));
+ EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event));
+ this._element.classList.add(CLASS_NAME_POINTER_EVENT);
+ } else {
+ EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event));
+ EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event));
+ EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event));
+ }
+ }
+ _eventIsPointerPenTouch(event) {
+ return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
+ }
+
+ // Static
+ static isSupported() {
+ return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
+ }
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap carousel.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$c = 'carousel';
+ const DATA_KEY$8 = 'bs.carousel';
+ const EVENT_KEY$8 = `.${DATA_KEY$8}`;
+ const DATA_API_KEY$5 = '.data-api';
+ const ARROW_LEFT_KEY$1 = 'ArrowLeft';
+ const ARROW_RIGHT_KEY$1 = 'ArrowRight';
+ const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
+
+ const ORDER_NEXT = 'next';
+ const ORDER_PREV = 'prev';
+ const DIRECTION_LEFT = 'left';
+ const DIRECTION_RIGHT = 'right';
+ const EVENT_SLIDE = `slide${EVENT_KEY$8}`;
+ const EVENT_SLID = `slid${EVENT_KEY$8}`;
+ const EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$8}`;
+ const EVENT_MOUSEENTER$1 = `mouseenter${EVENT_KEY$8}`;
+ const EVENT_MOUSELEAVE$1 = `mouseleave${EVENT_KEY$8}`;
+ const EVENT_DRAG_START = `dragstart${EVENT_KEY$8}`;
+ const EVENT_LOAD_DATA_API$3 = `load${EVENT_KEY$8}${DATA_API_KEY$5}`;
+ const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;
+ const CLASS_NAME_CAROUSEL = 'carousel';
+ const CLASS_NAME_ACTIVE$2 = 'active';
+ const CLASS_NAME_SLIDE = 'slide';
+ const CLASS_NAME_END = 'carousel-item-end';
+ const CLASS_NAME_START = 'carousel-item-start';
+ const CLASS_NAME_NEXT = 'carousel-item-next';
+ const CLASS_NAME_PREV = 'carousel-item-prev';
+ const SELECTOR_ACTIVE = '.active';
+ const SELECTOR_ITEM = '.carousel-item';
+ const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;
+ const SELECTOR_ITEM_IMG = '.carousel-item img';
+ const SELECTOR_INDICATORS = '.carousel-indicators';
+ const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
+ const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
+ const KEY_TO_DIRECTION = {
+ [ARROW_LEFT_KEY$1]: DIRECTION_RIGHT,
+ [ARROW_RIGHT_KEY$1]: DIRECTION_LEFT
+ };
+ const Default$b = {
+ interval: 5000,
+ keyboard: true,
+ pause: 'hover',
+ ride: false,
+ touch: true,
+ wrap: true
+ };
+ const DefaultType$b = {
+ interval: '(number|boolean)',
+ // TODO:v6 remove boolean support
+ keyboard: 'boolean',
+ pause: '(string|boolean)',
+ ride: '(boolean|string)',
+ touch: 'boolean',
+ wrap: 'boolean'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class Carousel extends BaseComponent {
+ constructor(element, config) {
+ super(element, config);
+ this._interval = null;
+ this._activeElement = null;
+ this._isSliding = false;
+ this.touchTimeout = null;
+ this._swipeHelper = null;
+ this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
+ this._addEventListeners();
+ if (this._config.ride === CLASS_NAME_CAROUSEL) {
+ this.cycle();
+ }
+ }
+
+ // Getters
+ static get Default() {
+ return Default$b;
+ }
+ static get DefaultType() {
+ return DefaultType$b;
+ }
+ static get NAME() {
+ return NAME$c;
+ }
+
+ // Public
+ next() {
+ this._slide(ORDER_NEXT);
+ }
+ nextWhenVisible() {
+ // FIXME TODO use `document.visibilityState`
+ // Don't call next when the page isn't visible
+ // or the carousel or its parent isn't visible
+ if (!document.hidden && isVisible(this._element)) {
+ this.next();
+ }
+ }
+ prev() {
+ this._slide(ORDER_PREV);
+ }
+ pause() {
+ if (this._isSliding) {
+ triggerTransitionEnd(this._element);
+ }
+ this._clearInterval();
+ }
+ cycle() {
+ this._clearInterval();
+ this._updateInterval();
+ this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);
+ }
+ _maybeEnableCycle() {
+ if (!this._config.ride) {
+ return;
+ }
+ if (this._isSliding) {
+ EventHandler.one(this._element, EVENT_SLID, () => this.cycle());
+ return;
+ }
+ this.cycle();
+ }
+ to(index) {
+ const items = this._getItems();
+ if (index > items.length - 1 || index < 0) {
+ return;
+ }
+ if (this._isSliding) {
+ EventHandler.one(this._element, EVENT_SLID, () => this.to(index));
+ return;
+ }
+ const activeIndex = this._getItemIndex(this._getActive());
+ if (activeIndex === index) {
+ return;
+ }
+ const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
+ this._slide(order, items[index]);
+ }
+ dispose() {
+ if (this._swipeHelper) {
+ this._swipeHelper.dispose();
+ }
+ super.dispose();
+ }
+
+ // Private
+ _configAfterMerge(config) {
+ config.defaultInterval = config.interval;
+ return config;
+ }
+ _addEventListeners() {
+ if (this._config.keyboard) {
+ EventHandler.on(this._element, EVENT_KEYDOWN$1, event => this._keydown(event));
+ }
+ if (this._config.pause === 'hover') {
+ EventHandler.on(this._element, EVENT_MOUSEENTER$1, () => this.pause());
+ EventHandler.on(this._element, EVENT_MOUSELEAVE$1, () => this._maybeEnableCycle());
+ }
+ if (this._config.touch && Swipe.isSupported()) {
+ this._addTouchEventListeners();
+ }
+ }
+ _addTouchEventListeners() {
+ for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {
+ EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());
+ }
+ const endCallBack = () => {
+ if (this._config.pause !== 'hover') {
+ return;
+ }
+
+ // If it's a touch-enabled device, mouseenter/leave are fired as
+ // part of the mouse compatibility events on first tap - the carousel
+ // would stop cycling until user tapped out of it;
+ // here, we listen for touchend, explicitly pause the carousel
+ // (as if it's the second time we tap on it, mouseenter compat event
+ // is NOT fired) and after a timeout (to allow for mouse compatibility
+ // events to fire) we explicitly restart cycling
+
+ this.pause();
+ if (this.touchTimeout) {
+ clearTimeout(this.touchTimeout);
+ }
+ this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
+ };
+ const swipeConfig = {
+ leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),
+ rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),
+ endCallback: endCallBack
+ };
+ this._swipeHelper = new Swipe(this._element, swipeConfig);
+ }
+ _keydown(event) {
+ if (/input|textarea/i.test(event.target.tagName)) {
+ return;
+ }
+ const direction = KEY_TO_DIRECTION[event.key];
+ if (direction) {
+ event.preventDefault();
+ this._slide(this._directionToOrder(direction));
+ }
+ }
+ _getItemIndex(element) {
+ return this._getItems().indexOf(element);
+ }
+ _setActiveIndicatorElement(index) {
+ if (!this._indicatorsElement) {
+ return;
+ }
+ const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
+ activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);
+ activeIndicator.removeAttribute('aria-current');
+ const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement);
+ if (newActiveIndicator) {
+ newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);
+ newActiveIndicator.setAttribute('aria-current', 'true');
+ }
+ }
+ _updateInterval() {
+ const element = this._activeElement || this._getActive();
+ if (!element) {
+ return;
+ }
+ const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
+ this._config.interval = elementInterval || this._config.defaultInterval;
+ }
+ _slide(order, element = null) {
+ if (this._isSliding) {
+ return;
+ }
+ const activeElement = this._getActive();
+ const isNext = order === ORDER_NEXT;
+ const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);
+ if (nextElement === activeElement) {
+ return;
+ }
+ const nextElementIndex = this._getItemIndex(nextElement);
+ const triggerEvent = eventName => {
+ return EventHandler.trigger(this._element, eventName, {
+ relatedTarget: nextElement,
+ direction: this._orderToDirection(order),
+ from: this._getItemIndex(activeElement),
+ to: nextElementIndex
+ });
+ };
+ const slideEvent = triggerEvent(EVENT_SLIDE);
+ if (slideEvent.defaultPrevented) {
+ return;
+ }
+ if (!activeElement || !nextElement) {
+ // Some weirdness is happening, so we bail
+ // TODO: change tests that use empty divs to avoid this check
+ return;
+ }
+ const isCycling = Boolean(this._interval);
+ this.pause();
+ this._isSliding = true;
+ this._setActiveIndicatorElement(nextElementIndex);
+ this._activeElement = nextElement;
+ const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
+ const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
+ nextElement.classList.add(orderClassName);
+ reflow(nextElement);
+ activeElement.classList.add(directionalClassName);
+ nextElement.classList.add(directionalClassName);
+ const completeCallBack = () => {
+ nextElement.classList.remove(directionalClassName, orderClassName);
+ nextElement.classList.add(CLASS_NAME_ACTIVE$2);
+ activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
+ this._isSliding = false;
+ triggerEvent(EVENT_SLID);
+ };
+ this._queueCallback(completeCallBack, activeElement, this._isAnimated());
+ if (isCycling) {
+ this.cycle();
+ }
+ }
+ _isAnimated() {
+ return this._element.classList.contains(CLASS_NAME_SLIDE);
+ }
+ _getActive() {
+ return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
+ }
+ _getItems() {
+ return SelectorEngine.find(SELECTOR_ITEM, this._element);
+ }
+ _clearInterval() {
+ if (this._interval) {
+ clearInterval(this._interval);
+ this._interval = null;
+ }
+ }
+ _directionToOrder(direction) {
+ if (isRTL()) {
+ return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
+ }
+ return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
+ }
+ _orderToDirection(order) {
+ if (isRTL()) {
+ return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
+ }
+ return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
+ }
+
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Carousel.getOrCreateInstance(this, config);
+ if (typeof config === 'number') {
+ data.to(config);
+ return;
+ }
+ if (typeof config === 'string') {
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config]();
+ }
+ });
+ }
+ }
+
+ /**
+ * Data API implementation
+ */
+
+ EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) {
+ const target = SelectorEngine.getElementFromSelector(this);
+ if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
+ return;
+ }
+ event.preventDefault();
+ const carousel = Carousel.getOrCreateInstance(target);
+ const slideIndex = this.getAttribute('data-bs-slide-to');
+ if (slideIndex) {
+ carousel.to(slideIndex);
+ carousel._maybeEnableCycle();
+ return;
+ }
+ if (Manipulator.getDataAttribute(this, 'slide') === 'next') {
+ carousel.next();
+ carousel._maybeEnableCycle();
+ return;
+ }
+ carousel.prev();
+ carousel._maybeEnableCycle();
+ });
+ EventHandler.on(window, EVENT_LOAD_DATA_API$3, () => {
+ const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
+ for (const carousel of carousels) {
+ Carousel.getOrCreateInstance(carousel);
+ }
+ });
+
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Carousel);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap collapse.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$b = 'collapse';
+ const DATA_KEY$7 = 'bs.collapse';
+ const EVENT_KEY$7 = `.${DATA_KEY$7}`;
+ const DATA_API_KEY$4 = '.data-api';
+ const EVENT_SHOW$6 = `show${EVENT_KEY$7}`;
+ const EVENT_SHOWN$6 = `shown${EVENT_KEY$7}`;
+ const EVENT_HIDE$6 = `hide${EVENT_KEY$7}`;
+ const EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`;
+ const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;
+ const CLASS_NAME_SHOW$7 = 'show';
+ const CLASS_NAME_COLLAPSE = 'collapse';
+ const CLASS_NAME_COLLAPSING = 'collapsing';
+ const CLASS_NAME_COLLAPSED = 'collapsed';
+ const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
+ const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
+ const WIDTH = 'width';
+ const HEIGHT = 'height';
+ const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
+ const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
+ const Default$a = {
+ parent: null,
+ toggle: true
+ };
+ const DefaultType$a = {
+ parent: '(null|element)',
+ toggle: 'boolean'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class Collapse extends BaseComponent {
+ constructor(element, config) {
+ super(element, config);
+ this._isTransitioning = false;
+ this._triggerArray = [];
+ const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
+ for (const elem of toggleList) {
+ const selector = SelectorEngine.getSelectorFromElement(elem);
+ const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);
+ if (selector !== null && filterElement.length) {
+ this._triggerArray.push(elem);
+ }
+ }
+ this._initializeChildren();
+ if (!this._config.parent) {
+ this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
+ }
+ if (this._config.toggle) {
+ this.toggle();
+ }
+ }
+
+ // Getters
+ static get Default() {
+ return Default$a;
+ }
+ static get DefaultType() {
+ return DefaultType$a;
+ }
+ static get NAME() {
+ return NAME$b;
+ }
+
+ // Public
+ toggle() {
+ if (this._isShown()) {
+ this.hide();
+ } else {
+ this.show();
+ }
+ }
+ show() {
+ if (this._isTransitioning || this._isShown()) {
+ return;
+ }
+ let activeChildren = [];
+
+ // find active children
+ if (this._config.parent) {
+ activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {
+ toggle: false
+ }));
+ }
+ if (activeChildren.length && activeChildren[0]._isTransitioning) {
+ return;
+ }
+ const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);
+ if (startEvent.defaultPrevented) {
+ return;
+ }
+ for (const activeInstance of activeChildren) {
+ activeInstance.hide();
+ }
+ const dimension = this._getDimension();
+ this._element.classList.remove(CLASS_NAME_COLLAPSE);
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
+ this._element.style[dimension] = 0;
+ this._addAriaAndCollapsedClass(this._triggerArray, true);
+ this._isTransitioning = true;
+ const complete = () => {
+ this._isTransitioning = false;
+ this._element.classList.remove(CLASS_NAME_COLLAPSING);
+ this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
+ this._element.style[dimension] = '';
+ EventHandler.trigger(this._element, EVENT_SHOWN$6);
+ };
+ const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
+ const scrollSize = `scroll${capitalizedDimension}`;
+ this._queueCallback(complete, this._element, true);
+ this._element.style[dimension] = `${this._element[scrollSize]}px`;
+ }
+ hide() {
+ if (this._isTransitioning || !this._isShown()) {
+ return;
+ }
+ const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6);
+ if (startEvent.defaultPrevented) {
+ return;
+ }
+ const dimension = this._getDimension();
+ this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
+ reflow(this._element);
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
+ for (const trigger of this._triggerArray) {
+ const element = SelectorEngine.getElementFromSelector(trigger);
+ if (element && !this._isShown(element)) {
+ this._addAriaAndCollapsedClass([trigger], false);
+ }
+ }
+ this._isTransitioning = true;
+ const complete = () => {
+ this._isTransitioning = false;
+ this._element.classList.remove(CLASS_NAME_COLLAPSING);
+ this._element.classList.add(CLASS_NAME_COLLAPSE);
+ EventHandler.trigger(this._element, EVENT_HIDDEN$6);
+ };
+ this._element.style[dimension] = '';
+ this._queueCallback(complete, this._element, true);
+ }
+ _isShown(element = this._element) {
+ return element.classList.contains(CLASS_NAME_SHOW$7);
+ }
+
+ // Private
+ _configAfterMerge(config) {
+ config.toggle = Boolean(config.toggle); // Coerce string values
+ config.parent = getElement(config.parent);
+ return config;
+ }
+ _getDimension() {
+ return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
+ }
+ _initializeChildren() {
+ if (!this._config.parent) {
+ return;
+ }
+ const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);
+ for (const element of children) {
+ const selected = SelectorEngine.getElementFromSelector(element);
+ if (selected) {
+ this._addAriaAndCollapsedClass([element], this._isShown(selected));
+ }
+ }
+ }
+ _getFirstLevelChildren(selector) {
+ const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
+ // remove children if greater depth
+ return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element));
+ }
+ _addAriaAndCollapsedClass(triggerArray, isOpen) {
+ if (!triggerArray.length) {
+ return;
+ }
+ for (const element of triggerArray) {
+ element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);
+ element.setAttribute('aria-expanded', isOpen);
+ }
+ }
+
+ // Static
+ static jQueryInterface(config) {
+ const _config = {};
+ if (typeof config === 'string' && /show|hide/.test(config)) {
+ _config.toggle = false;
+ }
+ return this.each(function () {
+ const data = Collapse.getOrCreateInstance(this, _config);
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config]();
+ }
+ });
+ }
+ }
+
+ /**
+ * Data API implementation
+ */
+
+ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {
+ // preventDefault only for
elements (which change the URL) not inside the collapsible element
+ if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
+ event.preventDefault();
+ }
+ for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {
+ Collapse.getOrCreateInstance(element, {
+ toggle: false
+ }).toggle();
+ }
+ });
+
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Collapse);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap dropdown.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$a = 'dropdown';
+ const DATA_KEY$6 = 'bs.dropdown';
+ const EVENT_KEY$6 = `.${DATA_KEY$6}`;
+ const DATA_API_KEY$3 = '.data-api';
+ const ESCAPE_KEY$2 = 'Escape';
+ const TAB_KEY$1 = 'Tab';
+ const ARROW_UP_KEY$1 = 'ArrowUp';
+ const ARROW_DOWN_KEY$1 = 'ArrowDown';
+ const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
+
+ const EVENT_HIDE$5 = `hide${EVENT_KEY$6}`;
+ const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$6}`;
+ const EVENT_SHOW$5 = `show${EVENT_KEY$6}`;
+ const EVENT_SHOWN$5 = `shown${EVENT_KEY$6}`;
+ const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
+ const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$6}${DATA_API_KEY$3}`;
+ const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$6}${DATA_API_KEY$3}`;
+ const CLASS_NAME_SHOW$6 = 'show';
+ const CLASS_NAME_DROPUP = 'dropup';
+ const CLASS_NAME_DROPEND = 'dropend';
+ const CLASS_NAME_DROPSTART = 'dropstart';
+ const CLASS_NAME_DROPUP_CENTER = 'dropup-center';
+ const CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';
+ const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)';
+ const SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`;
+ const SELECTOR_MENU = '.dropdown-menu';
+ const SELECTOR_NAVBAR = '.navbar';
+ const SELECTOR_NAVBAR_NAV = '.navbar-nav';
+ const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
+ const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';
+ const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';
+ const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
+ const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
+ const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
+ const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
+ const PLACEMENT_TOPCENTER = 'top';
+ const PLACEMENT_BOTTOMCENTER = 'bottom';
+ const Default$9 = {
+ autoClose: true,
+ boundary: 'clippingParents',
+ display: 'dynamic',
+ offset: [0, 2],
+ popperConfig: null,
+ reference: 'toggle'
+ };
+ const DefaultType$9 = {
+ autoClose: '(boolean|string)',
+ boundary: '(string|element)',
+ display: 'string',
+ offset: '(array|string|function)',
+ popperConfig: '(null|object|function)',
+ reference: '(string|element|object)'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class Dropdown extends BaseComponent {
+ constructor(element, config) {
+ super(element, config);
+ this._popper = null;
+ this._parent = this._element.parentNode; // dropdown wrapper
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
+ this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
+ this._inNavbar = this._detectNavbar();
+ }
+
+ // Getters
+ static get Default() {
+ return Default$9;
+ }
+ static get DefaultType() {
+ return DefaultType$9;
+ }
+ static get NAME() {
+ return NAME$a;
+ }
+
+ // Public
+ toggle() {
+ return this._isShown() ? this.hide() : this.show();
+ }
+ show() {
+ if (isDisabled(this._element) || this._isShown()) {
+ return;
+ }
+ const relatedTarget = {
+ relatedTarget: this._element
+ };
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget);
+ if (showEvent.defaultPrevented) {
+ return;
+ }
+ this._createPopper();
+
+ // If this is a touch-enabled device we add extra
+ // empty mouseover listeners to the body's immediate children;
+ // only needed because of broken event delegation on iOS
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
+ if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {
+ for (const element of [].concat(...document.body.children)) {
+ EventHandler.on(element, 'mouseover', noop);
+ }
+ }
+ this._element.focus();
+ this._element.setAttribute('aria-expanded', true);
+ this._menu.classList.add(CLASS_NAME_SHOW$6);
+ this._element.classList.add(CLASS_NAME_SHOW$6);
+ EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget);
+ }
+ hide() {
+ if (isDisabled(this._element) || !this._isShown()) {
+ return;
+ }
+ const relatedTarget = {
+ relatedTarget: this._element
+ };
+ this._completeHide(relatedTarget);
+ }
+ dispose() {
+ if (this._popper) {
+ this._popper.destroy();
+ }
+ super.dispose();
+ }
+ update() {
+ this._inNavbar = this._detectNavbar();
+ if (this._popper) {
+ this._popper.update();
+ }
+ }
+
+ // Private
+ _completeHide(relatedTarget) {
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget);
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
+
+ // If this is a touch-enabled device we remove the extra
+ // empty mouseover listeners we added for iOS support
+ if ('ontouchstart' in document.documentElement) {
+ for (const element of [].concat(...document.body.children)) {
+ EventHandler.off(element, 'mouseover', noop);
+ }
+ }
+ if (this._popper) {
+ this._popper.destroy();
+ }
+ this._menu.classList.remove(CLASS_NAME_SHOW$6);
+ this._element.classList.remove(CLASS_NAME_SHOW$6);
+ this._element.setAttribute('aria-expanded', 'false');
+ Manipulator.removeDataAttribute(this._menu, 'popper');
+ EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);
+ }
+ _getConfig(config) {
+ config = super._getConfig(config);
+ if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
+ // Popper virtual elements require a getBoundingClientRect method
+ throw new TypeError(`${NAME$a.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
+ }
+ return config;
+ }
+ _createPopper() {
+ if (typeof Popper__namespace === 'undefined') {
+ throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
+ }
+ let referenceElement = this._element;
+ if (this._config.reference === 'parent') {
+ referenceElement = this._parent;
+ } else if (isElement(this._config.reference)) {
+ referenceElement = getElement(this._config.reference);
+ } else if (typeof this._config.reference === 'object') {
+ referenceElement = this._config.reference;
+ }
+ const popperConfig = this._getPopperConfig();
+ this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
+ }
+ _isShown() {
+ return this._menu.classList.contains(CLASS_NAME_SHOW$6);
+ }
+ _getPlacement() {
+ const parentDropdown = this._parent;
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
+ return PLACEMENT_RIGHT;
+ }
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
+ return PLACEMENT_LEFT;
+ }
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {
+ return PLACEMENT_TOPCENTER;
+ }
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {
+ return PLACEMENT_BOTTOMCENTER;
+ }
+
+ // We need to trim the value because custom properties can also include spaces
+ const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
+ return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
+ }
+ return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
+ }
+ _detectNavbar() {
+ return this._element.closest(SELECTOR_NAVBAR) !== null;
+ }
+ _getOffset() {
+ const {
+ offset
+ } = this._config;
+ if (typeof offset === 'string') {
+ return offset.split(',').map(value => Number.parseInt(value, 10));
+ }
+ if (typeof offset === 'function') {
+ return popperData => offset(popperData, this._element);
+ }
+ return offset;
+ }
+ _getPopperConfig() {
+ const defaultBsPopperConfig = {
+ placement: this._getPlacement(),
+ modifiers: [{
+ name: 'preventOverflow',
+ options: {
+ boundary: this._config.boundary
+ }
+ }, {
+ name: 'offset',
+ options: {
+ offset: this._getOffset()
+ }
+ }]
+ };
+
+ // Disable Popper if we have a static display or Dropdown is in Navbar
+ if (this._inNavbar || this._config.display === 'static') {
+ Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
+ defaultBsPopperConfig.modifiers = [{
+ name: 'applyStyles',
+ enabled: false
+ }];
+ }
+ return {
+ ...defaultBsPopperConfig,
+ ...execute(this._config.popperConfig, [defaultBsPopperConfig])
+ };
+ }
+ _selectMenuItem({
+ key,
+ target
+ }) {
+ const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element));
+ if (!items.length) {
+ return;
+ }
+
+ // if target isn't included in items (e.g. when expanding the dropdown)
+ // allow cycling to get the last item in case key equals ARROW_UP_KEY
+ getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus();
+ }
+
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Dropdown.getOrCreateInstance(this, config);
+ if (typeof config !== 'string') {
+ return;
+ }
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config]();
+ });
+ }
+ static clearMenus(event) {
+ if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) {
+ return;
+ }
+ const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);
+ for (const toggle of openToggles) {
+ const context = Dropdown.getInstance(toggle);
+ if (!context || context._config.autoClose === false) {
+ continue;
+ }
+ const composedPath = event.composedPath();
+ const isMenuTarget = composedPath.includes(context._menu);
+ if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
+ continue;
+ }
+
+ // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
+ if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {
+ continue;
+ }
+ const relatedTarget = {
+ relatedTarget: context._element
+ };
+ if (event.type === 'click') {
+ relatedTarget.clickEvent = event;
+ }
+ context._completeHide(relatedTarget);
+ }
+ }
+ static dataApiKeydownHandler(event) {
+ // If not an UP | DOWN | ESCAPE key => not a dropdown command
+ // If input/textarea && if key is other than ESCAPE => not a dropdown command
+
+ const isInput = /input|textarea/i.test(event.target.tagName);
+ const isEscapeEvent = event.key === ESCAPE_KEY$2;
+ const isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key);
+ if (!isUpOrDownEvent && !isEscapeEvent) {
+ return;
+ }
+ if (isInput && !isEscapeEvent) {
+ return;
+ }
+ event.preventDefault();
+
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
+ const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
+ const instance = Dropdown.getOrCreateInstance(getToggleButton);
+ if (isUpOrDownEvent) {
+ event.stopPropagation();
+ instance.show();
+ instance._selectMenuItem(event);
+ return;
+ }
+ if (instance._isShown()) {
+ // else is escape and we check if it is shown
+ event.stopPropagation();
+ instance.hide();
+ getToggleButton.focus();
+ }
+ }
+ }
+
+ /**
+ * Data API implementation
+ */
+
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
+ EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
+ event.preventDefault();
+ Dropdown.getOrCreateInstance(this).toggle();
+ });
+
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Dropdown);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap util/backdrop.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$9 = 'backdrop';
+ const CLASS_NAME_FADE$4 = 'fade';
+ const CLASS_NAME_SHOW$5 = 'show';
+ const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;
+ const Default$8 = {
+ className: 'modal-backdrop',
+ clickCallback: null,
+ isAnimated: false,
+ isVisible: true,
+ // if false, we use the backdrop helper without adding any element to the dom
+ rootElement: 'body' // give the choice to place backdrop under different elements
+ };
+ const DefaultType$8 = {
+ className: 'string',
+ clickCallback: '(function|null)',
+ isAnimated: 'boolean',
+ isVisible: 'boolean',
+ rootElement: '(element|string)'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class Backdrop extends Config {
+ constructor(config) {
+ super();
+ this._config = this._getConfig(config);
+ this._isAppended = false;
+ this._element = null;
+ }
+
+ // Getters
+ static get Default() {
+ return Default$8;
+ }
+ static get DefaultType() {
+ return DefaultType$8;
+ }
+ static get NAME() {
+ return NAME$9;
+ }
+
+ // Public
+ show(callback) {
+ if (!this._config.isVisible) {
+ execute(callback);
+ return;
+ }
+ this._append();
+ const element = this._getElement();
+ if (this._config.isAnimated) {
+ reflow(element);
+ }
+ element.classList.add(CLASS_NAME_SHOW$5);
+ this._emulateAnimation(() => {
+ execute(callback);
+ });
+ }
+ hide(callback) {
+ if (!this._config.isVisible) {
+ execute(callback);
+ return;
+ }
+ this._getElement().classList.remove(CLASS_NAME_SHOW$5);
+ this._emulateAnimation(() => {
+ this.dispose();
+ execute(callback);
+ });
+ }
+ dispose() {
+ if (!this._isAppended) {
+ return;
+ }
+ EventHandler.off(this._element, EVENT_MOUSEDOWN);
+ this._element.remove();
+ this._isAppended = false;
+ }
+
+ // Private
+ _getElement() {
+ if (!this._element) {
+ const backdrop = document.createElement('div');
+ backdrop.className = this._config.className;
+ if (this._config.isAnimated) {
+ backdrop.classList.add(CLASS_NAME_FADE$4);
+ }
+ this._element = backdrop;
+ }
+ return this._element;
+ }
+ _configAfterMerge(config) {
+ // use getElement() with the default "body" to get a fresh Element on each instantiation
+ config.rootElement = getElement(config.rootElement);
+ return config;
+ }
+ _append() {
+ if (this._isAppended) {
+ return;
+ }
+ const element = this._getElement();
+ this._config.rootElement.append(element);
+ EventHandler.on(element, EVENT_MOUSEDOWN, () => {
+ execute(this._config.clickCallback);
+ });
+ this._isAppended = true;
+ }
+ _emulateAnimation(callback) {
+ executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
+ }
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap util/focustrap.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$8 = 'focustrap';
+ const DATA_KEY$5 = 'bs.focustrap';
+ const EVENT_KEY$5 = `.${DATA_KEY$5}`;
+ const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$5}`;
+ const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$5}`;
+ const TAB_KEY = 'Tab';
+ const TAB_NAV_FORWARD = 'forward';
+ const TAB_NAV_BACKWARD = 'backward';
+ const Default$7 = {
+ autofocus: true,
+ trapElement: null // The element to trap focus inside of
+ };
+ const DefaultType$7 = {
+ autofocus: 'boolean',
+ trapElement: 'element'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class FocusTrap extends Config {
+ constructor(config) {
+ super();
+ this._config = this._getConfig(config);
+ this._isActive = false;
+ this._lastTabNavDirection = null;
+ }
+
+ // Getters
+ static get Default() {
+ return Default$7;
+ }
+ static get DefaultType() {
+ return DefaultType$7;
+ }
+ static get NAME() {
+ return NAME$8;
+ }
+
+ // Public
+ activate() {
+ if (this._isActive) {
+ return;
+ }
+ if (this._config.autofocus) {
+ this._config.trapElement.focus();
+ }
+ EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop
+ EventHandler.on(document, EVENT_FOCUSIN$2, event => this._handleFocusin(event));
+ EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
+ this._isActive = true;
+ }
+ deactivate() {
+ if (!this._isActive) {
+ return;
+ }
+ this._isActive = false;
+ EventHandler.off(document, EVENT_KEY$5);
+ }
+
+ // Private
+ _handleFocusin(event) {
+ const {
+ trapElement
+ } = this._config;
+ if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {
+ return;
+ }
+ const elements = SelectorEngine.focusableChildren(trapElement);
+ if (elements.length === 0) {
+ trapElement.focus();
+ } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
+ elements[elements.length - 1].focus();
+ } else {
+ elements[0].focus();
+ }
+ }
+ _handleKeydown(event) {
+ if (event.key !== TAB_KEY) {
+ return;
+ }
+ this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
+ }
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap util/scrollBar.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
+ const SELECTOR_STICKY_CONTENT = '.sticky-top';
+ const PROPERTY_PADDING = 'padding-right';
+ const PROPERTY_MARGIN = 'margin-right';
+
+ /**
+ * Class definition
+ */
+
+ class ScrollBarHelper {
+ constructor() {
+ this._element = document.body;
+ }
+
+ // Public
+ getWidth() {
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
+ const documentWidth = document.documentElement.clientWidth;
+ return Math.abs(window.innerWidth - documentWidth);
+ }
+ hide() {
+ const width = this.getWidth();
+ this._disableOverFlow();
+ // give padding to element to balance the hidden scrollbar width
+ this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
+ // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
+ this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
+ this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
+ }
+ reset() {
+ this._resetElementAttributes(this._element, 'overflow');
+ this._resetElementAttributes(this._element, PROPERTY_PADDING);
+ this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
+ this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
+ }
+ isOverflowing() {
+ return this.getWidth() > 0;
+ }
+
+ // Private
+ _disableOverFlow() {
+ this._saveInitialAttribute(this._element, 'overflow');
+ this._element.style.overflow = 'hidden';
+ }
+ _setElementAttributes(selector, styleProperty, callback) {
+ const scrollbarWidth = this.getWidth();
+ const manipulationCallBack = element => {
+ if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
+ return;
+ }
+ this._saveInitialAttribute(element, styleProperty);
+ const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
+ element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
+ };
+ this._applyManipulationCallback(selector, manipulationCallBack);
+ }
+ _saveInitialAttribute(element, styleProperty) {
+ const actualValue = element.style.getPropertyValue(styleProperty);
+ if (actualValue) {
+ Manipulator.setDataAttribute(element, styleProperty, actualValue);
+ }
+ }
+ _resetElementAttributes(selector, styleProperty) {
+ const manipulationCallBack = element => {
+ const value = Manipulator.getDataAttribute(element, styleProperty);
+ // We only want to remove the property if the value is `null`; the value can also be zero
+ if (value === null) {
+ element.style.removeProperty(styleProperty);
+ return;
+ }
+ Manipulator.removeDataAttribute(element, styleProperty);
+ element.style.setProperty(styleProperty, value);
+ };
+ this._applyManipulationCallback(selector, manipulationCallBack);
+ }
+ _applyManipulationCallback(selector, callBack) {
+ if (isElement(selector)) {
+ callBack(selector);
+ return;
+ }
+ for (const sel of SelectorEngine.find(selector, this._element)) {
+ callBack(sel);
+ }
+ }
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap modal.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$7 = 'modal';
+ const DATA_KEY$4 = 'bs.modal';
+ const EVENT_KEY$4 = `.${DATA_KEY$4}`;
+ const DATA_API_KEY$2 = '.data-api';
+ const ESCAPE_KEY$1 = 'Escape';
+ const EVENT_HIDE$4 = `hide${EVENT_KEY$4}`;
+ const EVENT_HIDE_PREVENTED$1 = `hidePrevented${EVENT_KEY$4}`;
+ const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`;
+ const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;
+ const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;
+ const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;
+ const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;
+ const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;
+ const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;
+ const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;
+ const CLASS_NAME_OPEN = 'modal-open';
+ const CLASS_NAME_FADE$3 = 'fade';
+ const CLASS_NAME_SHOW$4 = 'show';
+ const CLASS_NAME_STATIC = 'modal-static';
+ const OPEN_SELECTOR$1 = '.modal.show';
+ const SELECTOR_DIALOG = '.modal-dialog';
+ const SELECTOR_MODAL_BODY = '.modal-body';
+ const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
+ const Default$6 = {
+ backdrop: true,
+ focus: true,
+ keyboard: true
+ };
+ const DefaultType$6 = {
+ backdrop: '(boolean|string)',
+ focus: 'boolean',
+ keyboard: 'boolean'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class Modal extends BaseComponent {
+ constructor(element, config) {
+ super(element, config);
+ this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
+ this._backdrop = this._initializeBackDrop();
+ this._focustrap = this._initializeFocusTrap();
+ this._isShown = false;
+ this._isTransitioning = false;
+ this._scrollBar = new ScrollBarHelper();
+ this._addEventListeners();
+ }
+
+ // Getters
+ static get Default() {
+ return Default$6;
+ }
+ static get DefaultType() {
+ return DefaultType$6;
+ }
+ static get NAME() {
+ return NAME$7;
+ }
+
+ // Public
+ toggle(relatedTarget) {
+ return this._isShown ? this.hide() : this.show(relatedTarget);
+ }
+ show(relatedTarget) {
+ if (this._isShown || this._isTransitioning) {
+ return;
+ }
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, {
+ relatedTarget
+ });
+ if (showEvent.defaultPrevented) {
+ return;
+ }
+ this._isShown = true;
+ this._isTransitioning = true;
+ this._scrollBar.hide();
+ document.body.classList.add(CLASS_NAME_OPEN);
+ this._adjustDialog();
+ this._backdrop.show(() => this._showElement(relatedTarget));
+ }
+ hide() {
+ if (!this._isShown || this._isTransitioning) {
+ return;
+ }
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
+ this._isShown = false;
+ this._isTransitioning = true;
+ this._focustrap.deactivate();
+ this._element.classList.remove(CLASS_NAME_SHOW$4);
+ this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
+ }
+ dispose() {
+ EventHandler.off(window, EVENT_KEY$4);
+ EventHandler.off(this._dialog, EVENT_KEY$4);
+ this._backdrop.dispose();
+ this._focustrap.deactivate();
+ super.dispose();
+ }
+ handleUpdate() {
+ this._adjustDialog();
+ }
+
+ // Private
+ _initializeBackDrop() {
+ return new Backdrop({
+ isVisible: Boolean(this._config.backdrop),
+ // 'static' option will be translated to true, and booleans will keep their value,
+ isAnimated: this._isAnimated()
+ });
+ }
+ _initializeFocusTrap() {
+ return new FocusTrap({
+ trapElement: this._element
+ });
+ }
+ _showElement(relatedTarget) {
+ // try to append dynamic modal
+ if (!document.body.contains(this._element)) {
+ document.body.append(this._element);
+ }
+ this._element.style.display = 'block';
+ this._element.removeAttribute('aria-hidden');
+ this._element.setAttribute('aria-modal', true);
+ this._element.setAttribute('role', 'dialog');
+ this._element.scrollTop = 0;
+ const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
+ if (modalBody) {
+ modalBody.scrollTop = 0;
+ }
+ reflow(this._element);
+ this._element.classList.add(CLASS_NAME_SHOW$4);
+ const transitionComplete = () => {
+ if (this._config.focus) {
+ this._focustrap.activate();
+ }
+ this._isTransitioning = false;
+ EventHandler.trigger(this._element, EVENT_SHOWN$4, {
+ relatedTarget
+ });
+ };
+ this._queueCallback(transitionComplete, this._dialog, this._isAnimated());
+ }
+ _addEventListeners() {
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
+ if (event.key !== ESCAPE_KEY$1) {
+ return;
+ }
+ if (this._config.keyboard) {
+ this.hide();
+ return;
+ }
+ this._triggerBackdropTransition();
+ });
+ EventHandler.on(window, EVENT_RESIZE$1, () => {
+ if (this._isShown && !this._isTransitioning) {
+ this._adjustDialog();
+ }
+ });
+ EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
+ // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
+ EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
+ if (this._element !== event.target || this._element !== event2.target) {
+ return;
+ }
+ if (this._config.backdrop === 'static') {
+ this._triggerBackdropTransition();
+ return;
+ }
+ if (this._config.backdrop) {
+ this.hide();
+ }
+ });
+ });
+ }
+ _hideModal() {
+ this._element.style.display = 'none';
+ this._element.setAttribute('aria-hidden', true);
+ this._element.removeAttribute('aria-modal');
+ this._element.removeAttribute('role');
+ this._isTransitioning = false;
+ this._backdrop.hide(() => {
+ document.body.classList.remove(CLASS_NAME_OPEN);
+ this._resetAdjustments();
+ this._scrollBar.reset();
+ EventHandler.trigger(this._element, EVENT_HIDDEN$4);
+ });
+ }
+ _isAnimated() {
+ return this._element.classList.contains(CLASS_NAME_FADE$3);
+ }
+ _triggerBackdropTransition() {
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1);
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
+ const initialOverflowY = this._element.style.overflowY;
+ // return if the following background transition hasn't yet completed
+ if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {
+ return;
+ }
+ if (!isModalOverflowing) {
+ this._element.style.overflowY = 'hidden';
+ }
+ this._element.classList.add(CLASS_NAME_STATIC);
+ this._queueCallback(() => {
+ this._element.classList.remove(CLASS_NAME_STATIC);
+ this._queueCallback(() => {
+ this._element.style.overflowY = initialOverflowY;
+ }, this._dialog);
+ }, this._dialog);
+ this._element.focus();
+ }
+
+ /**
+ * The following methods are used to handle overflowing modals
+ */
+
+ _adjustDialog() {
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
+ const scrollbarWidth = this._scrollBar.getWidth();
+ const isBodyOverflowing = scrollbarWidth > 0;
+ if (isBodyOverflowing && !isModalOverflowing) {
+ const property = isRTL() ? 'paddingLeft' : 'paddingRight';
+ this._element.style[property] = `${scrollbarWidth}px`;
+ }
+ if (!isBodyOverflowing && isModalOverflowing) {
+ const property = isRTL() ? 'paddingRight' : 'paddingLeft';
+ this._element.style[property] = `${scrollbarWidth}px`;
+ }
+ }
+ _resetAdjustments() {
+ this._element.style.paddingLeft = '';
+ this._element.style.paddingRight = '';
+ }
+
+ // Static
+ static jQueryInterface(config, relatedTarget) {
+ return this.each(function () {
+ const data = Modal.getOrCreateInstance(this, config);
+ if (typeof config !== 'string') {
+ return;
+ }
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config](relatedTarget);
+ });
+ }
+ }
+
+ /**
+ * Data API implementation
+ */
+
+ EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
+ const target = SelectorEngine.getElementFromSelector(this);
+ if (['A', 'AREA'].includes(this.tagName)) {
+ event.preventDefault();
+ }
+ EventHandler.one(target, EVENT_SHOW$4, showEvent => {
+ if (showEvent.defaultPrevented) {
+ // only register focus restorer if modal will actually get shown
+ return;
+ }
+ EventHandler.one(target, EVENT_HIDDEN$4, () => {
+ if (isVisible(this)) {
+ this.focus();
+ }
+ });
+ });
+
+ // avoid conflict when clicking modal toggler while another one is open
+ const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);
+ if (alreadyOpen) {
+ Modal.getInstance(alreadyOpen).hide();
+ }
+ const data = Modal.getOrCreateInstance(target);
+ data.toggle(this);
+ });
+ enableDismissTrigger(Modal);
+
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Modal);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap offcanvas.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME$6 = 'offcanvas';
+ const DATA_KEY$3 = 'bs.offcanvas';
+ const EVENT_KEY$3 = `.${DATA_KEY$3}`;
+ const DATA_API_KEY$1 = '.data-api';
+ const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$3}${DATA_API_KEY$1}`;
+ const ESCAPE_KEY = 'Escape';
+ const CLASS_NAME_SHOW$3 = 'show';
+ const CLASS_NAME_SHOWING$1 = 'showing';
+ const CLASS_NAME_HIDING = 'hiding';
+ const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
+ const OPEN_SELECTOR = '.offcanvas.show';
+ const EVENT_SHOW$3 = `show${EVENT_KEY$3}`;
+ const EVENT_SHOWN$3 = `shown${EVENT_KEY$3}`;
+ const EVENT_HIDE$3 = `hide${EVENT_KEY$3}`;
+ const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$3}`;
+ const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$3}`;
+ const EVENT_RESIZE = `resize${EVENT_KEY$3}`;
+ const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$3}${DATA_API_KEY$1}`;
+ const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$3}`;
+ const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
+ const Default$5 = {
backdrop: true,
keyboard: true,
- show: true
- }
+ scroll: false
+ };
+ const DefaultType$5 = {
+ backdrop: '(boolean|string)',
+ keyboard: 'boolean',
+ scroll: 'boolean'
+ };
- Modal.prototype.toggle = function (_relatedTarget) {
- return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
- }
+ /**
+ * Class definition
+ */
- Modal.prototype.show = function (_relatedTarget) {
- var that = this
- var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+ class Offcanvas extends BaseComponent {
+ constructor(element, config) {
+ super(element, config);
+ this._isShown = false;
+ this._backdrop = this._initializeBackDrop();
+ this._focustrap = this._initializeFocusTrap();
+ this._addEventListeners();
+ }
- this.$element.trigger(e)
+ // Getters
+ static get Default() {
+ return Default$5;
+ }
+ static get DefaultType() {
+ return DefaultType$5;
+ }
+ static get NAME() {
+ return NAME$6;
+ }
- if (this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = true
-
- this.escape()
-
- this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
-
- this.backdrop(function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(document.body) // don't move modals dom position
+ // Public
+ toggle(relatedTarget) {
+ return this._isShown ? this.hide() : this.show(relatedTarget);
+ }
+ show(relatedTarget) {
+ if (this._isShown) {
+ return;
}
-
- that.$element
- .show()
- .scrollTop(0)
-
- if (transition) {
- that.$element[0].offsetWidth // force reflow
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
+ relatedTarget
+ });
+ if (showEvent.defaultPrevented) {
+ return;
}
-
- that.$element
- .addClass('in')
- .attr('aria-hidden', false)
-
- that.enforceFocus()
-
- var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
-
- transition ?
- that.$element.find('.modal-dialog') // wait for modal to slide in
- .one($.support.transition.end, function () {
- that.$element.focus().trigger(e)
- })
- .emulateTransitionEnd(300) :
- that.$element.focus().trigger(e)
- })
- }
-
- Modal.prototype.hide = function (e) {
- if (e) e.preventDefault()
-
- e = $.Event('hide.bs.modal')
-
- this.$element.trigger(e)
-
- if (!this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = false
-
- this.escape()
-
- $(document).off('focusin.bs.modal')
-
- this.$element
- .removeClass('in')
- .attr('aria-hidden', true)
- .off('click.dismiss.bs.modal')
-
- $.support.transition && this.$element.hasClass('fade') ?
- this.$element
- .one($.support.transition.end, $.proxy(this.hideModal, this))
- .emulateTransitionEnd(300) :
- this.hideModal()
- }
-
- Modal.prototype.enforceFocus = function () {
- $(document)
- .off('focusin.bs.modal') // guard against infinite focus loop
- .on('focusin.bs.modal', $.proxy(function (e) {
- if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
- this.$element.focus()
+ this._isShown = true;
+ this._backdrop.show();
+ if (!this._config.scroll) {
+ new ScrollBarHelper().hide();
+ }
+ this._element.setAttribute('aria-modal', true);
+ this._element.setAttribute('role', 'dialog');
+ this._element.classList.add(CLASS_NAME_SHOWING$1);
+ const completeCallBack = () => {
+ if (!this._config.scroll || this._config.backdrop) {
+ this._focustrap.activate();
}
- }, this))
- }
+ this._element.classList.add(CLASS_NAME_SHOW$3);
+ this._element.classList.remove(CLASS_NAME_SHOWING$1);
+ EventHandler.trigger(this._element, EVENT_SHOWN$3, {
+ relatedTarget
+ });
+ };
+ this._queueCallback(completeCallBack, this._element, true);
+ }
+ hide() {
+ if (!this._isShown) {
+ return;
+ }
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
+ this._focustrap.deactivate();
+ this._element.blur();
+ this._isShown = false;
+ this._element.classList.add(CLASS_NAME_HIDING);
+ this._backdrop.hide();
+ const completeCallback = () => {
+ this._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING);
+ this._element.removeAttribute('aria-modal');
+ this._element.removeAttribute('role');
+ if (!this._config.scroll) {
+ new ScrollBarHelper().reset();
+ }
+ EventHandler.trigger(this._element, EVENT_HIDDEN$3);
+ };
+ this._queueCallback(completeCallback, this._element, true);
+ }
+ dispose() {
+ this._backdrop.dispose();
+ this._focustrap.deactivate();
+ super.dispose();
+ }
- Modal.prototype.escape = function () {
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
- e.which == 27 && this.hide()
- }, this))
- } else if (!this.isShown) {
- this.$element.off('keyup.dismiss.bs.modal')
+ // Private
+ _initializeBackDrop() {
+ const clickCallback = () => {
+ if (this._config.backdrop === 'static') {
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
+ return;
+ }
+ this.hide();
+ };
+
+ // 'static' option will be translated to true, and booleans will keep their value
+ const isVisible = Boolean(this._config.backdrop);
+ return new Backdrop({
+ className: CLASS_NAME_BACKDROP,
+ isVisible,
+ isAnimated: true,
+ rootElement: this._element.parentNode,
+ clickCallback: isVisible ? clickCallback : null
+ });
+ }
+ _initializeFocusTrap() {
+ return new FocusTrap({
+ trapElement: this._element
+ });
+ }
+ _addEventListeners() {
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
+ if (event.key !== ESCAPE_KEY) {
+ return;
+ }
+ if (this._config.keyboard) {
+ this.hide();
+ return;
+ }
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
+ });
+ }
+
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Offcanvas.getOrCreateInstance(this, config);
+ if (typeof config !== 'string') {
+ return;
+ }
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config](this);
+ });
}
}
- Modal.prototype.hideModal = function () {
- var that = this
- this.$element.hide()
- this.backdrop(function () {
- that.removeBackdrop()
- that.$element.trigger('hidden.bs.modal')
- })
- }
+ /**
+ * Data API implementation
+ */
- Modal.prototype.removeBackdrop = function () {
- this.$backdrop && this.$backdrop.remove()
- this.$backdrop = null
- }
-
- Modal.prototype.backdrop = function (callback) {
- var animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $('
')
- .appendTo(document.body)
-
- this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
- if (e.target !== e.currentTarget) return
- this.options.backdrop == 'static'
- ? this.$element[0].focus.call(this.$element[0])
- : this.hide.call(this)
- }, this))
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- if (!callback) return
-
- doAnimate ?
- this.$backdrop
- .one($.support.transition.end, callback)
- .emulateTransitionEnd(150) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- $.support.transition && this.$element.hasClass('fade') ?
- this.$backdrop
- .one($.support.transition.end, callback)
- .emulateTransitionEnd(150) :
- callback()
-
- } else if (callback) {
- callback()
+ EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
+ const target = SelectorEngine.getElementFromSelector(this);
+ if (['A', 'AREA'].includes(this.tagName)) {
+ event.preventDefault();
}
+ if (isDisabled(this)) {
+ return;
+ }
+ EventHandler.one(target, EVENT_HIDDEN$3, () => {
+ // focus on trigger when it is closed
+ if (isVisible(this)) {
+ this.focus();
+ }
+ });
+
+ // avoid conflict when clicking a toggler of an offcanvas, while another is open
+ const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
+ if (alreadyOpen && alreadyOpen !== target) {
+ Offcanvas.getInstance(alreadyOpen).hide();
+ }
+ const data = Offcanvas.getOrCreateInstance(target);
+ data.toggle(this);
+ });
+ EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {
+ for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {
+ Offcanvas.getOrCreateInstance(selector).show();
+ }
+ });
+ EventHandler.on(window, EVENT_RESIZE, () => {
+ for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {
+ if (getComputedStyle(element).position !== 'fixed') {
+ Offcanvas.getOrCreateInstance(element).hide();
+ }
+ }
+ });
+ enableDismissTrigger(Offcanvas);
+
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Offcanvas);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap util/sanitizer.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ // js-docs-start allow-list
+ const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
+ const DefaultAllowlist = {
+ // Global attributes allowed on any supplied element below.
+ '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
+ a: ['target', 'href', 'title', 'rel'],
+ area: [],
+ b: [],
+ br: [],
+ col: [],
+ code: [],
+ dd: [],
+ div: [],
+ dl: [],
+ dt: [],
+ em: [],
+ hr: [],
+ h1: [],
+ h2: [],
+ h3: [],
+ h4: [],
+ h5: [],
+ h6: [],
+ i: [],
+ img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
+ li: [],
+ ol: [],
+ p: [],
+ pre: [],
+ s: [],
+ small: [],
+ span: [],
+ sub: [],
+ sup: [],
+ strong: [],
+ u: [],
+ ul: []
+ };
+ // js-docs-end allow-list
+
+ const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
+
+ /**
+ * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
+ * contexts.
+ *
+ * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
+ */
+ // eslint-disable-next-line unicorn/better-regex
+ const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;
+ const allowedAttribute = (attribute, allowedAttributeList) => {
+ const attributeName = attribute.nodeName.toLowerCase();
+ if (allowedAttributeList.includes(attributeName)) {
+ if (uriAttributes.has(attributeName)) {
+ return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue));
+ }
+ return true;
+ }
+
+ // Check if a regular expression validates the attribute.
+ return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
+ };
+ function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
+ if (!unsafeHtml.length) {
+ return unsafeHtml;
+ }
+ if (sanitizeFunction && typeof sanitizeFunction === 'function') {
+ return sanitizeFunction(unsafeHtml);
+ }
+ const domParser = new window.DOMParser();
+ const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
+ const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
+ for (const element of elements) {
+ const elementName = element.nodeName.toLowerCase();
+ if (!Object.keys(allowList).includes(elementName)) {
+ element.remove();
+ continue;
+ }
+ const attributeList = [].concat(...element.attributes);
+ const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);
+ for (const attribute of attributeList) {
+ if (!allowedAttribute(attribute, allowedAttributes)) {
+ element.removeAttribute(attribute.nodeName);
+ }
+ }
+ }
+ return createdDocument.body.innerHTML;
}
-
- // MODAL PLUGIN DEFINITION
- // =======================
-
- var old = $.fn.modal
-
- $.fn.modal = function (option, _relatedTarget) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.modal')
- var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
- if (typeof option == 'string') data[option](_relatedTarget)
- else if (options.show) data.show(_relatedTarget)
- })
- }
-
- $.fn.modal.Constructor = Modal
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap util/template-factory.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
- // MODAL NO CONFLICT
- // =================
+ /**
+ * Constants
+ */
- $.fn.modal.noConflict = function () {
- $.fn.modal = old
- return this
- }
-
-
- // MODAL DATA-API
- // ==============
-
- $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
- var $this = $(this)
- var href = $this.attr('href')
- var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
- var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
-
- if ($this.is('a')) e.preventDefault()
-
- $target
- .modal(option, this)
- .one('hide', function () {
- $this.is(':visible') && $this.focus()
- })
- })
-
- $(document)
- .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
- .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: tooltip.js v3.1.1
- * http://getbootstrap.com/javascript/#tooltip
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TOOLTIP PUBLIC CLASS DEFINITION
- // ===============================
-
- var Tooltip = function (element, options) {
- this.type =
- this.options =
- this.enabled =
- this.timeout =
- this.hoverState =
- this.$element = null
-
- this.init('tooltip', element, options)
- }
-
- Tooltip.DEFAULTS = {
- animation: true,
- placement: 'top',
- selector: false,
- template: '',
- trigger: 'hover focus',
- title: '',
- delay: 0,
+ const NAME$5 = 'TemplateFactory';
+ const Default$4 = {
+ allowList: DefaultAllowlist,
+ content: {},
+ // { selector : text , selector2 : text2 , }
+ extraClass: '',
html: false,
- container: false
+ sanitize: true,
+ sanitizeFn: null,
+ template: '
'
+ };
+ const DefaultType$4 = {
+ allowList: 'object',
+ content: 'object',
+ extraClass: '(string|function)',
+ html: 'boolean',
+ sanitize: 'boolean',
+ sanitizeFn: '(null|function)',
+ template: 'string'
+ };
+ const DefaultContentType = {
+ entry: '(string|element|function|null)',
+ selector: '(string|element)'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class TemplateFactory extends Config {
+ constructor(config) {
+ super();
+ this._config = this._getConfig(config);
+ }
+
+ // Getters
+ static get Default() {
+ return Default$4;
+ }
+ static get DefaultType() {
+ return DefaultType$4;
+ }
+ static get NAME() {
+ return NAME$5;
+ }
+
+ // Public
+ getContent() {
+ return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean);
+ }
+ hasContent() {
+ return this.getContent().length > 0;
+ }
+ changeContent(content) {
+ this._checkContent(content);
+ this._config.content = {
+ ...this._config.content,
+ ...content
+ };
+ return this;
+ }
+ toHtml() {
+ const templateWrapper = document.createElement('div');
+ templateWrapper.innerHTML = this._maybeSanitize(this._config.template);
+ for (const [selector, text] of Object.entries(this._config.content)) {
+ this._setContent(templateWrapper, text, selector);
+ }
+ const template = templateWrapper.children[0];
+ const extraClass = this._resolvePossibleFunction(this._config.extraClass);
+ if (extraClass) {
+ template.classList.add(...extraClass.split(' '));
+ }
+ return template;
+ }
+
+ // Private
+ _typeCheckConfig(config) {
+ super._typeCheckConfig(config);
+ this._checkContent(config.content);
+ }
+ _checkContent(arg) {
+ for (const [selector, content] of Object.entries(arg)) {
+ super._typeCheckConfig({
+ selector,
+ entry: content
+ }, DefaultContentType);
+ }
+ }
+ _setContent(template, content, selector) {
+ const templateElement = SelectorEngine.findOne(selector, template);
+ if (!templateElement) {
+ return;
+ }
+ content = this._resolvePossibleFunction(content);
+ if (!content) {
+ templateElement.remove();
+ return;
+ }
+ if (isElement(content)) {
+ this._putElementInTemplate(getElement(content), templateElement);
+ return;
+ }
+ if (this._config.html) {
+ templateElement.innerHTML = this._maybeSanitize(content);
+ return;
+ }
+ templateElement.textContent = content;
+ }
+ _maybeSanitize(arg) {
+ return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
+ }
+ _resolvePossibleFunction(arg) {
+ return execute(arg, [this]);
+ }
+ _putElementInTemplate(element, templateElement) {
+ if (this._config.html) {
+ templateElement.innerHTML = '';
+ templateElement.append(element);
+ return;
+ }
+ templateElement.textContent = element.textContent;
+ }
}
- Tooltip.prototype.init = function (type, element, options) {
- this.enabled = true
- this.type = type
- this.$element = $(element)
- this.options = this.getOptions(options)
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap tooltip.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
- var triggers = this.options.trigger.split(' ')
- for (var i = triggers.length; i--;) {
- var trigger = triggers[i]
+ /**
+ * Constants
+ */
- if (trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (trigger != 'manual') {
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
+ const NAME$4 = 'tooltip';
+ const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
+ const CLASS_NAME_FADE$2 = 'fade';
+ const CLASS_NAME_MODAL = 'modal';
+ const CLASS_NAME_SHOW$2 = 'show';
+ const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
+ const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
+ const EVENT_MODAL_HIDE = 'hide.bs.modal';
+ const TRIGGER_HOVER = 'hover';
+ const TRIGGER_FOCUS = 'focus';
+ const TRIGGER_CLICK = 'click';
+ const TRIGGER_MANUAL = 'manual';
+ const EVENT_HIDE$2 = 'hide';
+ const EVENT_HIDDEN$2 = 'hidden';
+ const EVENT_SHOW$2 = 'show';
+ const EVENT_SHOWN$2 = 'shown';
+ const EVENT_INSERTED = 'inserted';
+ const EVENT_CLICK$1 = 'click';
+ const EVENT_FOCUSIN$1 = 'focusin';
+ const EVENT_FOCUSOUT$1 = 'focusout';
+ const EVENT_MOUSEENTER = 'mouseenter';
+ const EVENT_MOUSELEAVE = 'mouseleave';
+ const AttachmentMap = {
+ AUTO: 'auto',
+ TOP: 'top',
+ RIGHT: isRTL() ? 'left' : 'right',
+ BOTTOM: 'bottom',
+ LEFT: isRTL() ? 'right' : 'left'
+ };
+ const Default$3 = {
+ allowList: DefaultAllowlist,
+ animation: true,
+ boundary: 'clippingParents',
+ container: false,
+ customClass: '',
+ delay: 0,
+ fallbackPlacements: ['top', 'right', 'bottom', 'left'],
+ html: false,
+ offset: [0, 6],
+ placement: 'top',
+ popperConfig: null,
+ sanitize: true,
+ sanitizeFn: null,
+ selector: false,
+ template: '',
+ title: '',
+ trigger: 'hover focus'
+ };
+ const DefaultType$3 = {
+ allowList: 'object',
+ animation: 'boolean',
+ boundary: '(string|element)',
+ container: '(string|element|boolean)',
+ customClass: '(string|function)',
+ delay: '(number|object)',
+ fallbackPlacements: 'array',
+ html: 'boolean',
+ offset: '(array|string|function)',
+ placement: '(string|function)',
+ popperConfig: '(null|object|function)',
+ sanitize: 'boolean',
+ sanitizeFn: '(null|function)',
+ selector: '(string|boolean)',
+ template: 'string',
+ title: '(string|element|function)',
+ trigger: 'string'
+ };
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ /**
+ * Class definition
+ */
+
+ class Tooltip extends BaseComponent {
+ constructor(element, config) {
+ if (typeof Popper__namespace === 'undefined') {
+ throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
+ }
+ super(element, config);
+
+ // Private
+ this._isEnabled = true;
+ this._timeout = 0;
+ this._isHovered = null;
+ this._activeTrigger = {};
+ this._popper = null;
+ this._templateFactory = null;
+ this._newContent = null;
+
+ // Protected
+ this.tip = null;
+ this._setListeners();
+ if (!this._config.selector) {
+ this._fixTitle();
}
}
- this.options.selector ?
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
- this.fixTitle()
- }
+ // Getters
+ static get Default() {
+ return Default$3;
+ }
+ static get DefaultType() {
+ return DefaultType$3;
+ }
+ static get NAME() {
+ return NAME$4;
+ }
- Tooltip.prototype.getDefaults = function () {
- return Tooltip.DEFAULTS
- }
+ // Public
+ enable() {
+ this._isEnabled = true;
+ }
+ disable() {
+ this._isEnabled = false;
+ }
+ toggleEnabled() {
+ this._isEnabled = !this._isEnabled;
+ }
+ toggle() {
+ if (!this._isEnabled) {
+ return;
+ }
+ this._activeTrigger.click = !this._activeTrigger.click;
+ if (this._isShown()) {
+ this._leave();
+ return;
+ }
+ this._enter();
+ }
+ dispose() {
+ clearTimeout(this._timeout);
+ EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
+ if (this._element.getAttribute('data-bs-original-title')) {
+ this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
+ }
+ this._disposePopper();
+ super.dispose();
+ }
+ show() {
+ if (this._element.style.display === 'none') {
+ throw new Error('Please use show on visible elements');
+ }
+ if (!(this._isWithContent() && this._isEnabled)) {
+ return;
+ }
+ const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2));
+ const shadowRoot = findShadowRoot(this._element);
+ const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);
+ if (showEvent.defaultPrevented || !isInTheDom) {
+ return;
+ }
- Tooltip.prototype.getOptions = function (options) {
- options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+ // TODO: v6 remove this or make it optional
+ this._disposePopper();
+ const tip = this._getTipElement();
+ this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
+ const {
+ container
+ } = this._config;
+ if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
+ container.append(tip);
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));
+ }
+ this._popper = this._createPopper(tip);
+ tip.classList.add(CLASS_NAME_SHOW$2);
- if (options.delay && typeof options.delay == 'number') {
- options.delay = {
- show: options.delay,
- hide: options.delay
+ // If this is a touch-enabled device we add extra
+ // empty mouseover listeners to the body's immediate children;
+ // only needed because of broken event delegation on iOS
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
+ if ('ontouchstart' in document.documentElement) {
+ for (const element of [].concat(...document.body.children)) {
+ EventHandler.on(element, 'mouseover', noop);
+ }
+ }
+ const complete = () => {
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));
+ if (this._isHovered === false) {
+ this._leave();
+ }
+ this._isHovered = false;
+ };
+ this._queueCallback(complete, this.tip, this._isAnimated());
+ }
+ hide() {
+ if (!this._isShown()) {
+ return;
+ }
+ const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
+ const tip = this._getTipElement();
+ tip.classList.remove(CLASS_NAME_SHOW$2);
+
+ // If this is a touch-enabled device we remove the extra
+ // empty mouseover listeners we added for iOS support
+ if ('ontouchstart' in document.documentElement) {
+ for (const element of [].concat(...document.body.children)) {
+ EventHandler.off(element, 'mouseover', noop);
+ }
+ }
+ this._activeTrigger[TRIGGER_CLICK] = false;
+ this._activeTrigger[TRIGGER_FOCUS] = false;
+ this._activeTrigger[TRIGGER_HOVER] = false;
+ this._isHovered = null; // it is a trick to support manual triggering
+
+ const complete = () => {
+ if (this._isWithActiveTrigger()) {
+ return;
+ }
+ if (!this._isHovered) {
+ this._disposePopper();
+ }
+ this._element.removeAttribute('aria-describedby');
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2));
+ };
+ this._queueCallback(complete, this.tip, this._isAnimated());
+ }
+ update() {
+ if (this._popper) {
+ this._popper.update();
}
}
- return options
- }
-
- Tooltip.prototype.getDelegateOptions = function () {
- var options = {}
- var defaults = this.getDefaults()
-
- this._options && $.each(this._options, function (key, value) {
- if (defaults[key] != value) options[key] = value
- })
-
- return options
- }
-
- Tooltip.prototype.enter = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'in'
-
- if (!self.options.delay || !self.options.delay.show) return self.show()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'in') self.show()
- }, self.options.delay.show)
- }
-
- Tooltip.prototype.leave = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'out'
-
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'out') self.hide()
- }, self.options.delay.hide)
- }
-
- Tooltip.prototype.show = function () {
- var e = $.Event('show.bs.' + this.type)
-
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
- var that = this;
-
- var $tip = this.tip()
-
- this.setContent()
-
- if (this.options.animation) $tip.addClass('fade')
-
- var placement = typeof this.options.placement == 'function' ?
- this.options.placement.call(this, $tip[0], this.$element[0]) :
- this.options.placement
-
- var autoToken = /\s?auto?\s?/i
- var autoPlace = autoToken.test(placement)
- if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
-
- $tip
- .detach()
- .css({ top: 0, left: 0, display: 'block' })
- .addClass(placement)
-
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
-
- var pos = this.getPosition()
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (autoPlace) {
- var $parent = this.$element.parent()
-
- var orgPlacement = placement
- var docScroll = document.documentElement.scrollTop || document.body.scrollTop
- var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
- var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
- var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
-
- placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' :
- placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' :
- placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' :
- placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' :
- placement
-
- $tip
- .removeClass(orgPlacement)
- .addClass(placement)
+ // Protected
+ _isWithContent() {
+ return Boolean(this._getTitle());
+ }
+ _getTipElement() {
+ if (!this.tip) {
+ this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());
}
+ return this.tip;
+ }
+ _createTipElement(content) {
+ const tip = this._getTemplateFactory(content).toHtml();
- var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
-
- this.applyPlacement(calculatedOffset, placement)
- this.hoverState = null
-
- var complete = function() {
- that.$element.trigger('shown.bs.' + that.type)
+ // TODO: remove this check in v6
+ if (!tip) {
+ return null;
}
-
- $.support.transition && this.$tip.hasClass('fade') ?
- $tip
- .one($.support.transition.end, complete)
- .emulateTransitionEnd(150) :
- complete()
- }
- }
-
- Tooltip.prototype.applyPlacement = function (offset, placement) {
- var replace
- var $tip = this.tip()
- var width = $tip[0].offsetWidth
- var height = $tip[0].offsetHeight
-
- // manually read margins because getBoundingClientRect includes difference
- var marginTop = parseInt($tip.css('margin-top'), 10)
- var marginLeft = parseInt($tip.css('margin-left'), 10)
-
- // we must check for NaN for ie 8/9
- if (isNaN(marginTop)) marginTop = 0
- if (isNaN(marginLeft)) marginLeft = 0
-
- offset.top = offset.top + marginTop
- offset.left = offset.left + marginLeft
-
- // $.fn.offset doesn't round pixel values
- // so we use setOffset directly with our own function B-0
- $.offset.setOffset($tip[0], $.extend({
- using: function (props) {
- $tip.css({
- top: Math.round(props.top),
- left: Math.round(props.left)
- })
+ tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
+ // TODO: v6 the following can be achieved with CSS only
+ tip.classList.add(`bs-${this.constructor.NAME}-auto`);
+ const tipId = getUID(this.constructor.NAME).toString();
+ tip.setAttribute('id', tipId);
+ if (this._isAnimated()) {
+ tip.classList.add(CLASS_NAME_FADE$2);
}
- }, offset), 0)
-
- $tip.addClass('in')
-
- // check to see if placing tip in new offset caused the tip to resize itself
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (placement == 'top' && actualHeight != height) {
- replace = true
- offset.top = offset.top + height - actualHeight
+ return tip;
}
-
- if (/bottom|top/.test(placement)) {
- var delta = 0
-
- if (offset.left < 0) {
- delta = offset.left * -2
- offset.left = 0
-
- $tip.offset(offset)
-
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
+ setContent(content) {
+ this._newContent = content;
+ if (this._isShown()) {
+ this._disposePopper();
+ this.show();
}
-
- this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
- } else {
- this.replaceArrow(actualHeight - height, actualHeight, 'top')
}
-
- if (replace) $tip.offset(offset)
- }
-
- Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
- this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
- }
-
- Tooltip.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
-
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
- $tip.removeClass('fade in top bottom left right')
- }
-
- Tooltip.prototype.hide = function () {
- var that = this
- var $tip = this.tip()
- var e = $.Event('hide.bs.' + this.type)
-
- function complete() {
- if (that.hoverState != 'in') $tip.detach()
- that.$element.trigger('hidden.bs.' + that.type)
- }
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- $tip.removeClass('in')
-
- $.support.transition && this.$tip.hasClass('fade') ?
- $tip
- .one($.support.transition.end, complete)
- .emulateTransitionEnd(150) :
- complete()
-
- this.hoverState = null
-
- return this
- }
-
- Tooltip.prototype.fixTitle = function () {
- var $e = this.$element
- if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
- }
- }
-
- Tooltip.prototype.hasContent = function () {
- return this.getTitle()
- }
-
- Tooltip.prototype.getPosition = function () {
- var el = this.$element[0]
- return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
- width: el.offsetWidth,
- height: el.offsetHeight
- }, this.$element.offset())
- }
-
- Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
- }
-
- Tooltip.prototype.getTitle = function () {
- var title
- var $e = this.$element
- var o = this.options
-
- title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
-
- return title
- }
-
- Tooltip.prototype.tip = function () {
- return this.$tip = this.$tip || $(this.options.template)
- }
-
- Tooltip.prototype.arrow = function () {
- return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
- }
-
- Tooltip.prototype.validate = function () {
- if (!this.$element[0].parentNode) {
- this.hide()
- this.$element = null
- this.options = null
- }
- }
-
- Tooltip.prototype.enable = function () {
- this.enabled = true
- }
-
- Tooltip.prototype.disable = function () {
- this.enabled = false
- }
-
- Tooltip.prototype.toggleEnabled = function () {
- this.enabled = !this.enabled
- }
-
- Tooltip.prototype.toggle = function (e) {
- var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
- }
-
- Tooltip.prototype.destroy = function () {
- clearTimeout(this.timeout)
- this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
- }
-
-
- // TOOLTIP PLUGIN DEFINITION
- // =========================
-
- var old = $.fn.tooltip
-
- $.fn.tooltip = function (option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tooltip')
- var options = typeof option == 'object' && option
-
- if (!data && option == 'destroy') return
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tooltip.Constructor = Tooltip
-
-
- // TOOLTIP NO CONFLICT
- // ===================
-
- $.fn.tooltip.noConflict = function () {
- $.fn.tooltip = old
- return this
- }
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: popover.js v3.1.1
- * http://getbootstrap.com/javascript/#popovers
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // POPOVER PUBLIC CLASS DEFINITION
- // ===============================
-
- var Popover = function (element, options) {
- this.init('popover', element, options)
- }
-
- if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
-
- Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
- placement: 'right',
- trigger: 'click',
- content: '',
- template: ''
- })
-
-
- // NOTE: POPOVER EXTENDS tooltip.js
- // ================================
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
-
- Popover.prototype.constructor = Popover
-
- Popover.prototype.getDefaults = function () {
- return Popover.DEFAULTS
- }
-
- Popover.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
- var content = this.getContent()
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content')[ // we use append for html objects to maintain js events
- this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
- ](content)
-
- $tip.removeClass('fade top bottom left right in')
-
- // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
- // this manually by checking the contents.
- if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
- }
-
- Popover.prototype.hasContent = function () {
- return this.getTitle() || this.getContent()
- }
-
- Popover.prototype.getContent = function () {
- var $e = this.$element
- var o = this.options
-
- return $e.attr('data-content')
- || (typeof o.content == 'function' ?
- o.content.call($e[0]) :
- o.content)
- }
-
- Popover.prototype.arrow = function () {
- return this.$arrow = this.$arrow || this.tip().find('.arrow')
- }
-
- Popover.prototype.tip = function () {
- if (!this.$tip) this.$tip = $(this.options.template)
- return this.$tip
- }
-
-
- // POPOVER PLUGIN DEFINITION
- // =========================
-
- var old = $.fn.popover
-
- $.fn.popover = function (option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.popover')
- var options = typeof option == 'object' && option
-
- if (!data && option == 'destroy') return
- if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.popover.Constructor = Popover
-
-
- // POPOVER NO CONFLICT
- // ===================
-
- $.fn.popover.noConflict = function () {
- $.fn.popover = old
- return this
- }
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: scrollspy.js v3.1.1
- * http://getbootstrap.com/javascript/#scrollspy
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // SCROLLSPY CLASS DEFINITION
- // ==========================
-
- function ScrollSpy(element, options) {
- var href
- var process = $.proxy(this.process, this)
-
- this.$element = $(element).is('body') ? $(window) : $(element)
- this.$body = $('body')
- this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
- this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
- this.selector = (this.options.target
- || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- || '') + ' .nav li > a'
- this.offsets = $([])
- this.targets = $([])
- this.activeTarget = null
-
- this.refresh()
- this.process()
- }
-
- ScrollSpy.DEFAULTS = {
- offset: 10
- }
-
- ScrollSpy.prototype.refresh = function () {
- var offsetMethod = this.$element[0] == window ? 'offset' : 'position'
-
- this.offsets = $([])
- this.targets = $([])
-
- var self = this
- var $targets = this.$body
- .find(this.selector)
- .map(function () {
- var $el = $(this)
- var href = $el.data('target') || $el.attr('href')
- var $href = /^#./.test(href) && $(href)
-
- return ($href
- && $href.length
- && $href.is(':visible')
- && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
- })
- .sort(function (a, b) { return a[0] - b[0] })
- .each(function () {
- self.offsets.push(this[0])
- self.targets.push(this[1])
- })
- }
-
- ScrollSpy.prototype.process = function () {
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
- var maxScroll = scrollHeight - this.$scrollElement.height()
- var offsets = this.offsets
- var targets = this.targets
- var activeTarget = this.activeTarget
- var i
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets.last()[0]) && this.activate(i)
- }
-
- if (activeTarget && scrollTop <= offsets[0]) {
- return activeTarget != (i = targets[0]) && this.activate(i)
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
- && this.activate( targets[i] )
- }
- }
-
- ScrollSpy.prototype.activate = function (target) {
- this.activeTarget = target
-
- $(this.selector)
- .parentsUntil(this.options.target, '.active')
- .removeClass('active')
-
- var selector = this.selector +
- '[data-target="' + target + '"],' +
- this.selector + '[href="' + target + '"]'
-
- var active = $(selector)
- .parents('li')
- .addClass('active')
-
- if (active.parent('.dropdown-menu').length) {
- active = active
- .closest('li.dropdown')
- .addClass('active')
- }
-
- active.trigger('activate.bs.scrollspy')
- }
-
-
- // SCROLLSPY PLUGIN DEFINITION
- // ===========================
-
- var old = $.fn.scrollspy
-
- $.fn.scrollspy = function (option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.scrollspy')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.scrollspy.Constructor = ScrollSpy
-
-
- // SCROLLSPY NO CONFLICT
- // =====================
-
- $.fn.scrollspy.noConflict = function () {
- $.fn.scrollspy = old
- return this
- }
-
-
- // SCROLLSPY DATA-API
- // ==================
-
- $(window).on('load', function () {
- $('[data-spy="scroll"]').each(function () {
- var $spy = $(this)
- $spy.scrollspy($spy.data())
- })
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: tab.js v3.1.1
- * http://getbootstrap.com/javascript/#tabs
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TAB CLASS DEFINITION
- // ====================
-
- var Tab = function (element) {
- this.element = $(element)
- }
-
- Tab.prototype.show = function () {
- var $this = this.element
- var $ul = $this.closest('ul:not(.dropdown-menu)')
- var selector = $this.data('target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- if ($this.parent('li').hasClass('active')) return
-
- var previous = $ul.find('.active:last a')[0]
- var e = $.Event('show.bs.tab', {
- relatedTarget: previous
- })
-
- $this.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- var $target = $(selector)
-
- this.activate($this.parent('li'), $ul)
- this.activate($target, $target.parent(), function () {
- $this.trigger({
- type: 'shown.bs.tab',
- relatedTarget: previous
- })
- })
- }
-
- Tab.prototype.activate = function (element, container, callback) {
- var $active = container.find('> .active')
- var transition = callback
- && $.support.transition
- && $active.hasClass('fade')
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active')
-
- element.addClass('active')
-
- if (transition) {
- element[0].offsetWidth // reflow for transition
- element.addClass('in')
+ _getTemplateFactory(content) {
+ if (this._templateFactory) {
+ this._templateFactory.changeContent(content);
} else {
- element.removeClass('fade')
+ this._templateFactory = new TemplateFactory({
+ ...this._config,
+ // the `content` var has to be after `this._config`
+ // to override config.content in case of popover
+ content,
+ extraClass: this._resolvePossibleFunction(this._config.customClass)
+ });
}
-
- if (element.parent('.dropdown-menu')) {
- element.closest('li.dropdown').addClass('active')
- }
-
- callback && callback()
+ return this._templateFactory;
+ }
+ _getContentForTemplate() {
+ return {
+ [SELECTOR_TOOLTIP_INNER]: this._getTitle()
+ };
+ }
+ _getTitle() {
+ return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
}
- transition ?
- $active
- .one($.support.transition.end, next)
- .emulateTransitionEnd(150) :
- next()
+ // Private
+ _initializeOnDelegatedTarget(event) {
+ return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
+ }
+ _isAnimated() {
+ return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2);
+ }
+ _isShown() {
+ return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);
+ }
+ _createPopper(tip) {
+ const placement = execute(this._config.placement, [this, tip, this._element]);
+ const attachment = AttachmentMap[placement.toUpperCase()];
+ return Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
+ }
+ _getOffset() {
+ const {
+ offset
+ } = this._config;
+ if (typeof offset === 'string') {
+ return offset.split(',').map(value => Number.parseInt(value, 10));
+ }
+ if (typeof offset === 'function') {
+ return popperData => offset(popperData, this._element);
+ }
+ return offset;
+ }
+ _resolvePossibleFunction(arg) {
+ return execute(arg, [this._element]);
+ }
+ _getPopperConfig(attachment) {
+ const defaultBsPopperConfig = {
+ placement: attachment,
+ modifiers: [{
+ name: 'flip',
+ options: {
+ fallbackPlacements: this._config.fallbackPlacements
+ }
+ }, {
+ name: 'offset',
+ options: {
+ offset: this._getOffset()
+ }
+ }, {
+ name: 'preventOverflow',
+ options: {
+ boundary: this._config.boundary
+ }
+ }, {
+ name: 'arrow',
+ options: {
+ element: `.${this.constructor.NAME}-arrow`
+ }
+ }, {
+ name: 'preSetPlacement',
+ enabled: true,
+ phase: 'beforeMain',
+ fn: data => {
+ // Pre-set Popper's placement attribute in order to read the arrow sizes properly.
+ // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement
+ this._getTipElement().setAttribute('data-popper-placement', data.state.placement);
+ }
+ }]
+ };
+ return {
+ ...defaultBsPopperConfig,
+ ...execute(this._config.popperConfig, [defaultBsPopperConfig])
+ };
+ }
+ _setListeners() {
+ const triggers = this._config.trigger.split(' ');
+ for (const trigger of triggers) {
+ if (trigger === 'click') {
+ EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {
+ const context = this._initializeOnDelegatedTarget(event);
+ context.toggle();
+ });
+ } else if (trigger !== TRIGGER_MANUAL) {
+ const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);
+ const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);
+ EventHandler.on(this._element, eventIn, this._config.selector, event => {
+ const context = this._initializeOnDelegatedTarget(event);
+ context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
+ context._enter();
+ });
+ EventHandler.on(this._element, eventOut, this._config.selector, event => {
+ const context = this._initializeOnDelegatedTarget(event);
+ context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
+ context._leave();
+ });
+ }
+ }
+ this._hideModalHandler = () => {
+ if (this._element) {
+ this.hide();
+ }
+ };
+ EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
+ }
+ _fixTitle() {
+ const title = this._element.getAttribute('title');
+ if (!title) {
+ return;
+ }
+ if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
+ this._element.setAttribute('aria-label', title);
+ }
+ this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
+ this._element.removeAttribute('title');
+ }
+ _enter() {
+ if (this._isShown() || this._isHovered) {
+ this._isHovered = true;
+ return;
+ }
+ this._isHovered = true;
+ this._setTimeout(() => {
+ if (this._isHovered) {
+ this.show();
+ }
+ }, this._config.delay.show);
+ }
+ _leave() {
+ if (this._isWithActiveTrigger()) {
+ return;
+ }
+ this._isHovered = false;
+ this._setTimeout(() => {
+ if (!this._isHovered) {
+ this.hide();
+ }
+ }, this._config.delay.hide);
+ }
+ _setTimeout(handler, timeout) {
+ clearTimeout(this._timeout);
+ this._timeout = setTimeout(handler, timeout);
+ }
+ _isWithActiveTrigger() {
+ return Object.values(this._activeTrigger).includes(true);
+ }
+ _getConfig(config) {
+ const dataAttributes = Manipulator.getDataAttributes(this._element);
+ for (const dataAttribute of Object.keys(dataAttributes)) {
+ if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {
+ delete dataAttributes[dataAttribute];
+ }
+ }
+ config = {
+ ...dataAttributes,
+ ...(typeof config === 'object' && config ? config : {})
+ };
+ config = this._mergeConfigObj(config);
+ config = this._configAfterMerge(config);
+ this._typeCheckConfig(config);
+ return config;
+ }
+ _configAfterMerge(config) {
+ config.container = config.container === false ? document.body : getElement(config.container);
+ if (typeof config.delay === 'number') {
+ config.delay = {
+ show: config.delay,
+ hide: config.delay
+ };
+ }
+ if (typeof config.title === 'number') {
+ config.title = config.title.toString();
+ }
+ if (typeof config.content === 'number') {
+ config.content = config.content.toString();
+ }
+ return config;
+ }
+ _getDelegateConfig() {
+ const config = {};
+ for (const [key, value] of Object.entries(this._config)) {
+ if (this.constructor.Default[key] !== value) {
+ config[key] = value;
+ }
+ }
+ config.selector = false;
+ config.trigger = 'manual';
- $active.removeClass('in')
- }
+ // In the future can be replaced with:
+ // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
+ // `Object.fromEntries(keysWithDifferentValues)`
+ return config;
+ }
+ _disposePopper() {
+ if (this._popper) {
+ this._popper.destroy();
+ this._popper = null;
+ }
+ if (this.tip) {
+ this.tip.remove();
+ this.tip = null;
+ }
+ }
-
- // TAB PLUGIN DEFINITION
- // =====================
-
- var old = $.fn.tab
-
- $.fn.tab = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tab')
-
- if (!data) $this.data('bs.tab', (data = new Tab(this)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tab.Constructor = Tab
-
-
- // TAB NO CONFLICT
- // ===============
-
- $.fn.tab.noConflict = function () {
- $.fn.tab = old
- return this
- }
-
-
- // TAB DATA-API
- // ============
-
- $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
- e.preventDefault()
- $(this).tab('show')
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: affix.js v3.1.1
- * http://getbootstrap.com/javascript/#affix
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // AFFIX CLASS DEFINITION
- // ======================
-
- var Affix = function (element, options) {
- this.options = $.extend({}, Affix.DEFAULTS, options)
- this.$window = $(window)
- .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
-
- this.$element = $(element)
- this.affixed =
- this.unpin =
- this.pinnedOffset = null
-
- this.checkPosition()
- }
-
- Affix.RESET = 'affix affix-top affix-bottom'
-
- Affix.DEFAULTS = {
- offset: 0
- }
-
- Affix.prototype.getPinnedOffset = function () {
- if (this.pinnedOffset) return this.pinnedOffset
- this.$element.removeClass(Affix.RESET).addClass('affix')
- var scrollTop = this.$window.scrollTop()
- var position = this.$element.offset()
- return (this.pinnedOffset = position.top - scrollTop)
- }
-
- Affix.prototype.checkPositionWithEventLoop = function () {
- setTimeout($.proxy(this.checkPosition, this), 1)
- }
-
- Affix.prototype.checkPosition = function () {
- if (!this.$element.is(':visible')) return
-
- var scrollHeight = $(document).height()
- var scrollTop = this.$window.scrollTop()
- var position = this.$element.offset()
- var offset = this.options.offset
- var offsetTop = offset.top
- var offsetBottom = offset.bottom
-
- if (this.affixed == 'top') position.top += scrollTop
-
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
- if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
-
- var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
- offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
- offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
-
- if (this.affixed === affix) return
- if (this.unpin) this.$element.css('top', '')
-
- var affixType = 'affix' + (affix ? '-' + affix : '')
- var e = $.Event(affixType + '.bs.affix')
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- this.affixed = affix
- this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
-
- this.$element
- .removeClass(Affix.RESET)
- .addClass(affixType)
- .trigger($.Event(affixType.replace('affix', 'affixed')))
-
- if (affix == 'bottom') {
- this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Tooltip.getOrCreateInstance(this, config);
+ if (typeof config !== 'string') {
+ return;
+ }
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config]();
+ });
}
}
+ /**
+ * jQuery
+ */
- // AFFIX PLUGIN DEFINITION
- // =======================
+ defineJQueryPlugin(Tooltip);
- var old = $.fn.affix
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap popover.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
- $.fn.affix = function (option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.affix')
- var options = typeof option == 'object' && option
- if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
- if (typeof option == 'string') data[option]()
- })
+ /**
+ * Constants
+ */
+
+ const NAME$3 = 'popover';
+ const SELECTOR_TITLE = '.popover-header';
+ const SELECTOR_CONTENT = '.popover-body';
+ const Default$2 = {
+ ...Tooltip.Default,
+ content: '',
+ offset: [0, 8],
+ placement: 'right',
+ template: '',
+ trigger: 'click'
+ };
+ const DefaultType$2 = {
+ ...Tooltip.DefaultType,
+ content: '(null|string|element|function)'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class Popover extends Tooltip {
+ // Getters
+ static get Default() {
+ return Default$2;
+ }
+ static get DefaultType() {
+ return DefaultType$2;
+ }
+ static get NAME() {
+ return NAME$3;
+ }
+
+ // Overrides
+ _isWithContent() {
+ return this._getTitle() || this._getContent();
+ }
+
+ // Private
+ _getContentForTemplate() {
+ return {
+ [SELECTOR_TITLE]: this._getTitle(),
+ [SELECTOR_CONTENT]: this._getContent()
+ };
+ }
+ _getContent() {
+ return this._resolvePossibleFunction(this._config.content);
+ }
+
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Popover.getOrCreateInstance(this, config);
+ if (typeof config !== 'string') {
+ return;
+ }
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config]();
+ });
+ }
}
- $.fn.affix.Constructor = Affix
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Popover);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap scrollspy.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
- // AFFIX NO CONFLICT
- // =================
+ /**
+ * Constants
+ */
- $.fn.affix.noConflict = function () {
- $.fn.affix = old
- return this
+ const NAME$2 = 'scrollspy';
+ const DATA_KEY$2 = 'bs.scrollspy';
+ const EVENT_KEY$2 = `.${DATA_KEY$2}`;
+ const DATA_API_KEY = '.data-api';
+ const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;
+ const EVENT_CLICK = `click${EVENT_KEY$2}`;
+ const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$2}${DATA_API_KEY}`;
+ const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
+ const CLASS_NAME_ACTIVE$1 = 'active';
+ const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
+ const SELECTOR_TARGET_LINKS = '[href]';
+ const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
+ const SELECTOR_NAV_LINKS = '.nav-link';
+ const SELECTOR_NAV_ITEMS = '.nav-item';
+ const SELECTOR_LIST_ITEMS = '.list-group-item';
+ const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`;
+ const SELECTOR_DROPDOWN = '.dropdown';
+ const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
+ const Default$1 = {
+ offset: null,
+ // TODO: v6 @deprecated, keep it for backwards compatibility reasons
+ rootMargin: '0px 0px -25%',
+ smoothScroll: false,
+ target: null,
+ threshold: [0.1, 0.5, 1]
+ };
+ const DefaultType$1 = {
+ offset: '(number|null)',
+ // TODO v6 @deprecated, keep it for backwards compatibility reasons
+ rootMargin: 'string',
+ smoothScroll: 'boolean',
+ target: 'element',
+ threshold: 'array'
+ };
+
+ /**
+ * Class definition
+ */
+
+ class ScrollSpy extends BaseComponent {
+ constructor(element, config) {
+ super(element, config);
+
+ // this._element is the observablesContainer and config.target the menu links wrapper
+ this._targetLinks = new Map();
+ this._observableSections = new Map();
+ this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element;
+ this._activeTarget = null;
+ this._observer = null;
+ this._previousScrollData = {
+ visibleEntryTop: 0,
+ parentScrollTop: 0
+ };
+ this.refresh(); // initialize
+ }
+
+ // Getters
+ static get Default() {
+ return Default$1;
+ }
+ static get DefaultType() {
+ return DefaultType$1;
+ }
+ static get NAME() {
+ return NAME$2;
+ }
+
+ // Public
+ refresh() {
+ this._initializeTargetsAndObservables();
+ this._maybeEnableSmoothScroll();
+ if (this._observer) {
+ this._observer.disconnect();
+ } else {
+ this._observer = this._getNewObserver();
+ }
+ for (const section of this._observableSections.values()) {
+ this._observer.observe(section);
+ }
+ }
+ dispose() {
+ this._observer.disconnect();
+ super.dispose();
+ }
+
+ // Private
+ _configAfterMerge(config) {
+ // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
+ config.target = getElement(config.target) || document.body;
+
+ // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
+ config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
+ if (typeof config.threshold === 'string') {
+ config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));
+ }
+ return config;
+ }
+ _maybeEnableSmoothScroll() {
+ if (!this._config.smoothScroll) {
+ return;
+ }
+
+ // unregister any previous listeners
+ EventHandler.off(this._config.target, EVENT_CLICK);
+ EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {
+ const observableSection = this._observableSections.get(event.target.hash);
+ if (observableSection) {
+ event.preventDefault();
+ const root = this._rootElement || window;
+ const height = observableSection.offsetTop - this._element.offsetTop;
+ if (root.scrollTo) {
+ root.scrollTo({
+ top: height,
+ behavior: 'smooth'
+ });
+ return;
+ }
+
+ // Chrome 60 doesn't support `scrollTo`
+ root.scrollTop = height;
+ }
+ });
+ }
+ _getNewObserver() {
+ const options = {
+ root: this._rootElement,
+ threshold: this._config.threshold,
+ rootMargin: this._config.rootMargin
+ };
+ return new IntersectionObserver(entries => this._observerCallback(entries), options);
+ }
+
+ // The logic of selection
+ _observerCallback(entries) {
+ const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`);
+ const activate = entry => {
+ this._previousScrollData.visibleEntryTop = entry.target.offsetTop;
+ this._process(targetElement(entry));
+ };
+ const parentScrollTop = (this._rootElement || document.documentElement).scrollTop;
+ const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;
+ this._previousScrollData.parentScrollTop = parentScrollTop;
+ for (const entry of entries) {
+ if (!entry.isIntersecting) {
+ this._activeTarget = null;
+ this._clearActiveClass(targetElement(entry));
+ continue;
+ }
+ const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop;
+ // if we are scrolling down, pick the bigger offsetTop
+ if (userScrollsDown && entryIsLowerThanPrevious) {
+ activate(entry);
+ // if parent isn't scrolled, let's keep the first visible item, breaking the iteration
+ if (!parentScrollTop) {
+ return;
+ }
+ continue;
+ }
+
+ // if we are scrolling up, pick the smallest offsetTop
+ if (!userScrollsDown && !entryIsLowerThanPrevious) {
+ activate(entry);
+ }
+ }
+ }
+ _initializeTargetsAndObservables() {
+ this._targetLinks = new Map();
+ this._observableSections = new Map();
+ const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);
+ for (const anchor of targetLinks) {
+ // ensure that the anchor has an id and is not disabled
+ if (!anchor.hash || isDisabled(anchor)) {
+ continue;
+ }
+ const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element);
+
+ // ensure that the observableSection exists & is visible
+ if (isVisible(observableSection)) {
+ this._targetLinks.set(decodeURI(anchor.hash), anchor);
+ this._observableSections.set(anchor.hash, observableSection);
+ }
+ }
+ }
+ _process(target) {
+ if (this._activeTarget === target) {
+ return;
+ }
+ this._clearActiveClass(this._config.target);
+ this._activeTarget = target;
+ target.classList.add(CLASS_NAME_ACTIVE$1);
+ this._activateParents(target);
+ EventHandler.trigger(this._element, EVENT_ACTIVATE, {
+ relatedTarget: target
+ });
+ }
+ _activateParents(target) {
+ // Activate dropdown parents
+ if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
+ SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);
+ return;
+ }
+ for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {
+ // Set triggered links parents as active
+ // With both and markup a parent is the previous sibling of any nav ancestor
+ for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) {
+ item.classList.add(CLASS_NAME_ACTIVE$1);
+ }
+ }
+ }
+ _clearActiveClass(parent) {
+ parent.classList.remove(CLASS_NAME_ACTIVE$1);
+ const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE$1}`, parent);
+ for (const node of activeNodes) {
+ node.classList.remove(CLASS_NAME_ACTIVE$1);
+ }
+ }
+
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = ScrollSpy.getOrCreateInstance(this, config);
+ if (typeof config !== 'string') {
+ return;
+ }
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config]();
+ });
+ }
}
+ /**
+ * Data API implementation
+ */
- // AFFIX DATA-API
- // ==============
+ EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {
+ for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) {
+ ScrollSpy.getOrCreateInstance(spy);
+ }
+ });
- $(window).on('load', function () {
- $('[data-spy="affix"]').each(function () {
- var $spy = $(this)
- var data = $spy.data()
+ /**
+ * jQuery
+ */
- data.offset = data.offset || {}
+ defineJQueryPlugin(ScrollSpy);
- if (data.offsetBottom) data.offset.bottom = data.offsetBottom
- if (data.offsetTop) data.offset.top = data.offsetTop
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap tab.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
- $spy.affix(data)
- })
- })
-}(jQuery);
+ /**
+ * Constants
+ */
+
+ const NAME$1 = 'tab';
+ const DATA_KEY$1 = 'bs.tab';
+ const EVENT_KEY$1 = `.${DATA_KEY$1}`;
+ const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;
+ const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;
+ const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;
+ const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}`;
+ const EVENT_KEYDOWN = `keydown${EVENT_KEY$1}`;
+ const EVENT_LOAD_DATA_API = `load${EVENT_KEY$1}`;
+ const ARROW_LEFT_KEY = 'ArrowLeft';
+ const ARROW_RIGHT_KEY = 'ArrowRight';
+ const ARROW_UP_KEY = 'ArrowUp';
+ const ARROW_DOWN_KEY = 'ArrowDown';
+ const HOME_KEY = 'Home';
+ const END_KEY = 'End';
+ const CLASS_NAME_ACTIVE = 'active';
+ const CLASS_NAME_FADE$1 = 'fade';
+ const CLASS_NAME_SHOW$1 = 'show';
+ const CLASS_DROPDOWN = 'dropdown';
+ const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
+ const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
+ const NOT_SELECTOR_DROPDOWN_TOGGLE = `:not(${SELECTOR_DROPDOWN_TOGGLE})`;
+ const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
+ const SELECTOR_OUTER = '.nav-item, .list-group-item';
+ const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // TODO: could only be `tab` in v6
+ const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;
+ const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`;
+
+ /**
+ * Class definition
+ */
+
+ class Tab extends BaseComponent {
+ constructor(element) {
+ super(element);
+ this._parent = this._element.closest(SELECTOR_TAB_PANEL);
+ if (!this._parent) {
+ return;
+ // TODO: should throw exception in v6
+ // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
+ }
+
+ // Set up initial aria attributes
+ this._setInitialAttributes(this._parent, this._getChildren());
+ EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
+ }
+
+ // Getters
+ static get NAME() {
+ return NAME$1;
+ }
+
+ // Public
+ show() {
+ // Shows this elem and deactivate the active sibling if exists
+ const innerElem = this._element;
+ if (this._elemIsActive(innerElem)) {
+ return;
+ }
+
+ // Search for active tab on same parent to deactivate it
+ const active = this._getActiveElem();
+ const hideEvent = active ? EventHandler.trigger(active, EVENT_HIDE$1, {
+ relatedTarget: innerElem
+ }) : null;
+ const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW$1, {
+ relatedTarget: active
+ });
+ if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {
+ return;
+ }
+ this._deactivate(active, innerElem);
+ this._activate(innerElem, active);
+ }
+
+ // Private
+ _activate(element, relatedElem) {
+ if (!element) {
+ return;
+ }
+ element.classList.add(CLASS_NAME_ACTIVE);
+ this._activate(SelectorEngine.getElementFromSelector(element)); // Search and activate/show the proper section
+
+ const complete = () => {
+ if (element.getAttribute('role') !== 'tab') {
+ element.classList.add(CLASS_NAME_SHOW$1);
+ return;
+ }
+ element.removeAttribute('tabindex');
+ element.setAttribute('aria-selected', true);
+ this._toggleDropDown(element, true);
+ EventHandler.trigger(element, EVENT_SHOWN$1, {
+ relatedTarget: relatedElem
+ });
+ };
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
+ }
+ _deactivate(element, relatedElem) {
+ if (!element) {
+ return;
+ }
+ element.classList.remove(CLASS_NAME_ACTIVE);
+ element.blur();
+ this._deactivate(SelectorEngine.getElementFromSelector(element)); // Search and deactivate the shown section too
+
+ const complete = () => {
+ if (element.getAttribute('role') !== 'tab') {
+ element.classList.remove(CLASS_NAME_SHOW$1);
+ return;
+ }
+ element.setAttribute('aria-selected', false);
+ element.setAttribute('tabindex', '-1');
+ this._toggleDropDown(element, false);
+ EventHandler.trigger(element, EVENT_HIDDEN$1, {
+ relatedTarget: relatedElem
+ });
+ };
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
+ }
+ _keydown(event) {
+ if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key)) {
+ return;
+ }
+ event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page
+ event.preventDefault();
+ const children = this._getChildren().filter(element => !isDisabled(element));
+ let nextActiveElement;
+ if ([HOME_KEY, END_KEY].includes(event.key)) {
+ nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1];
+ } else {
+ const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
+ nextActiveElement = getNextActiveElement(children, event.target, isNext, true);
+ }
+ if (nextActiveElement) {
+ nextActiveElement.focus({
+ preventScroll: true
+ });
+ Tab.getOrCreateInstance(nextActiveElement).show();
+ }
+ }
+ _getChildren() {
+ // collection of inner elements
+ return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent);
+ }
+ _getActiveElem() {
+ return this._getChildren().find(child => this._elemIsActive(child)) || null;
+ }
+ _setInitialAttributes(parent, children) {
+ this._setAttributeIfNotExists(parent, 'role', 'tablist');
+ for (const child of children) {
+ this._setInitialAttributesOnChild(child);
+ }
+ }
+ _setInitialAttributesOnChild(child) {
+ child = this._getInnerElement(child);
+ const isActive = this._elemIsActive(child);
+ const outerElem = this._getOuterElement(child);
+ child.setAttribute('aria-selected', isActive);
+ if (outerElem !== child) {
+ this._setAttributeIfNotExists(outerElem, 'role', 'presentation');
+ }
+ if (!isActive) {
+ child.setAttribute('tabindex', '-1');
+ }
+ this._setAttributeIfNotExists(child, 'role', 'tab');
+
+ // set attributes to the related panel too
+ this._setInitialAttributesOnTargetPanel(child);
+ }
+ _setInitialAttributesOnTargetPanel(child) {
+ const target = SelectorEngine.getElementFromSelector(child);
+ if (!target) {
+ return;
+ }
+ this._setAttributeIfNotExists(target, 'role', 'tabpanel');
+ if (child.id) {
+ this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`);
+ }
+ }
+ _toggleDropDown(element, open) {
+ const outerElem = this._getOuterElement(element);
+ if (!outerElem.classList.contains(CLASS_DROPDOWN)) {
+ return;
+ }
+ const toggle = (selector, className) => {
+ const element = SelectorEngine.findOne(selector, outerElem);
+ if (element) {
+ element.classList.toggle(className, open);
+ }
+ };
+ toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
+ toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);
+ outerElem.setAttribute('aria-expanded', open);
+ }
+ _setAttributeIfNotExists(element, attribute, value) {
+ if (!element.hasAttribute(attribute)) {
+ element.setAttribute(attribute, value);
+ }
+ }
+ _elemIsActive(elem) {
+ return elem.classList.contains(CLASS_NAME_ACTIVE);
+ }
+
+ // Try to get the inner element (usually the .nav-link)
+ _getInnerElement(elem) {
+ return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem);
+ }
+
+ // Try to get the outer element (usually the .nav-item)
+ _getOuterElement(elem) {
+ return elem.closest(SELECTOR_OUTER) || elem;
+ }
+
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Tab.getOrCreateInstance(this);
+ if (typeof config !== 'string') {
+ return;
+ }
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config]();
+ });
+ }
+ }
+
+ /**
+ * Data API implementation
+ */
+
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ if (['A', 'AREA'].includes(this.tagName)) {
+ event.preventDefault();
+ }
+ if (isDisabled(this)) {
+ return;
+ }
+ Tab.getOrCreateInstance(this).show();
+ });
+
+ /**
+ * Initialize on focus
+ */
+ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
+ for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {
+ Tab.getOrCreateInstance(element);
+ }
+ });
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Tab);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap toast.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+
+ /**
+ * Constants
+ */
+
+ const NAME = 'toast';
+ const DATA_KEY = 'bs.toast';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
+ const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
+ const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
+ const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
+ const EVENT_SHOW = `show${EVENT_KEY}`;
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
+ const CLASS_NAME_FADE = 'fade';
+ const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
+ const CLASS_NAME_SHOW = 'show';
+ const CLASS_NAME_SHOWING = 'showing';
+ const DefaultType = {
+ animation: 'boolean',
+ autohide: 'boolean',
+ delay: 'number'
+ };
+ const Default = {
+ animation: true,
+ autohide: true,
+ delay: 5000
+ };
+
+ /**
+ * Class definition
+ */
+
+ class Toast extends BaseComponent {
+ constructor(element, config) {
+ super(element, config);
+ this._timeout = null;
+ this._hasMouseInteraction = false;
+ this._hasKeyboardInteraction = false;
+ this._setListeners();
+ }
+
+ // Getters
+ static get Default() {
+ return Default;
+ }
+ static get DefaultType() {
+ return DefaultType;
+ }
+ static get NAME() {
+ return NAME;
+ }
+
+ // Public
+ show() {
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
+ if (showEvent.defaultPrevented) {
+ return;
+ }
+ this._clearTimeout();
+ if (this._config.animation) {
+ this._element.classList.add(CLASS_NAME_FADE);
+ }
+ const complete = () => {
+ this._element.classList.remove(CLASS_NAME_SHOWING);
+ EventHandler.trigger(this._element, EVENT_SHOWN);
+ this._maybeScheduleHide();
+ };
+ this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
+ reflow(this._element);
+ this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING);
+ this._queueCallback(complete, this._element, this._config.animation);
+ }
+ hide() {
+ if (!this.isShown()) {
+ return;
+ }
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
+ const complete = () => {
+ this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
+ this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW);
+ EventHandler.trigger(this._element, EVENT_HIDDEN);
+ };
+ this._element.classList.add(CLASS_NAME_SHOWING);
+ this._queueCallback(complete, this._element, this._config.animation);
+ }
+ dispose() {
+ this._clearTimeout();
+ if (this.isShown()) {
+ this._element.classList.remove(CLASS_NAME_SHOW);
+ }
+ super.dispose();
+ }
+ isShown() {
+ return this._element.classList.contains(CLASS_NAME_SHOW);
+ }
+
+ // Private
+
+ _maybeScheduleHide() {
+ if (!this._config.autohide) {
+ return;
+ }
+ if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
+ return;
+ }
+ this._timeout = setTimeout(() => {
+ this.hide();
+ }, this._config.delay);
+ }
+ _onInteraction(event, isInteracting) {
+ switch (event.type) {
+ case 'mouseover':
+ case 'mouseout':
+ {
+ this._hasMouseInteraction = isInteracting;
+ break;
+ }
+ case 'focusin':
+ case 'focusout':
+ {
+ this._hasKeyboardInteraction = isInteracting;
+ break;
+ }
+ }
+ if (isInteracting) {
+ this._clearTimeout();
+ return;
+ }
+ const nextElement = event.relatedTarget;
+ if (this._element === nextElement || this._element.contains(nextElement)) {
+ return;
+ }
+ this._maybeScheduleHide();
+ }
+ _setListeners() {
+ EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
+ EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
+ EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
+ EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
+ }
+ _clearTimeout() {
+ clearTimeout(this._timeout);
+ this._timeout = null;
+ }
+
+ // Static
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Toast.getOrCreateInstance(this, config);
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
+ }
+ data[config](this);
+ }
+ });
+ }
+ }
+
+ /**
+ * Data API implementation
+ */
+
+ enableDismissTrigger(Toast);
+
+ /**
+ * jQuery
+ */
+
+ defineJQueryPlugin(Toast);
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap index.umd.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ const index_umd = {
+ Alert,
+ Button,
+ Carousel,
+ Collapse,
+ Dropdown,
+ Modal,
+ Offcanvas,
+ Popover,
+ ScrollSpy,
+ Tab,
+ Toast,
+ Tooltip
+ };
+
+ return index_umd;
+
+}));
+//# sourceMappingURL=bootstrap.js.map
diff --git a/js/bootstrap.min.js b/js/bootstrap.min.js
index b04a0e8..d5dc5ea 100644
--- a/js/bootstrap.min.js
+++ b/js/bootstrap.min.js
@@ -1,6 +1,7 @@
/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('
').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j ').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i
'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
\ No newline at end of file
+ * Bootstrap v5.3.3 (https://getbootstrap.com/)
+ * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s=new Map,n={set(t,e,i){s.has(t)||s.set(t,new Map);const n=s.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>s.has(t)&&s.get(t).get(e)||null,remove(t,e){if(!s.has(t))return;const i=s.get(t);i.delete(e),0===i.size&&s.delete(t)}},o="transitionend",r=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),a=t=>{t.dispatchEvent(new Event(o))},l=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>l(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(r(t)):null,h=t=>{if(!l(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},d=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),u=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u(t.parentNode):null},_=()=>{},g=t=>{t.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,m=[],p=()=>"rtl"===document.documentElement.dir,b=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of m)t()})),m.push(e)):e()},v=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,y=(t,e,i=!0)=>{if(!i)return void v(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const r=({target:i})=>{i===e&&(n=!0,e.removeEventListener(o,r),v(t))};e.addEventListener(o,r),setTimeout((()=>{n||a(e)}),s)},w=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},A=/[^.]*(?=\..*)\.|.*/,E=/\..*/,C=/::\d+$/,T={};let k=1;const $={mouseenter:"mouseover",mouseleave:"mouseout"},S=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"]);function L(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function O(t){const e=L(t);return t.uidEvent=e,T[e]=T[e]||{},T[e]}function I(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function D(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=M(t);return S.has(o)||(o=t),[s,n,o]}function N(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=D(e,i,s);if(e in $){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=O(t),c=l[a]||(l[a]={}),h=I(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=L(r,e.replace(A,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return F(n,{delegateTarget:r}),s.oneOff&&j.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return F(s,{delegateTarget:t}),i.oneOff&&j.off(t,s.type,e),e.apply(t,[s])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function P(t,e,i,s,n){const o=I(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function x(t,e,i,s){const n=e[i]||{};for(const[o,r]of Object.entries(n))o.includes(s)&&P(t,e,i,r.callable,r.delegationSelector)}function M(t){return t=t.replace(E,""),$[t]||t}const j={on(t,e,i,s){N(t,e,i,s,!1)},one(t,e,i,s){N(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=D(e,i,s),a=r!==e,l=O(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))x(t,l,i,e.slice(1));for(const[i,s]of Object.entries(c)){const n=i.replace(C,"");a&&!e.includes(n)||P(t,l,r,s.callable,s.delegationSelector)}}else{if(!Object.keys(c).length)return;P(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=f();let n=null,o=!0,r=!0,a=!1;e!==M(e)&&s&&(n=s.Event(e,i),s(t).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());const l=F(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function F(t,e={}){for(const[i,s]of Object.entries(e))try{t[i]=s}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}function z(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const B={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${H(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=z(t.dataset[s])}return e},getDataAttribute:(t,e)=>z(t.getAttribute(`data-bs-${H(e)}`))};class q{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=l(e)?B.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...l(e)?B.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[s,n]of Object.entries(e)){const e=t[s],o=l(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".`)}var i}}class W extends q{constructor(t,e){super(),(t=c(t))&&(this._element=t,this._config=this._getConfig(e),n.set(this._element,this.constructor.DATA_KEY,this))}dispose(){n.remove(this._element,this.constructor.DATA_KEY),j.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){y(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return n.get(c(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const R=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map((t=>r(t))).join(","):null},K={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!d(t)&&h(t)))},getSelectorFromElement(t){const e=R(t);return e&&K.findOne(e)?e:null},getElementFromSelector(t){const e=R(t);return e?K.findOne(e):null},getMultipleElementsFromSelector(t){const e=R(t);return e?K.find(e):[]}},V=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;j.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),d(this))return;const n=K.getElementFromSelector(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))},Q=".bs.alert",X=`close${Q}`,Y=`closed${Q}`;class U extends W{static get NAME(){return"alert"}close(){if(j.trigger(this._element,X).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),j.trigger(this._element,Y),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=U.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}V(U,"close"),b(U);const G='[data-bs-toggle="button"]';class J extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=J.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}j.on(document,"click.bs.button.data-api",G,(t=>{t.preventDefault();const e=t.target.closest(G);J.getOrCreateInstance(e).toggle()})),b(J);const Z=".bs.swipe",tt=`touchstart${Z}`,et=`touchmove${Z}`,it=`touchend${Z}`,st=`pointerdown${Z}`,nt=`pointerup${Z}`,ot={endCallback:null,leftCallback:null,rightCallback:null},rt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class at extends q{constructor(t,e){super(),this._element=t,t&&at.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return ot}static get DefaultType(){return rt}static get NAME(){return"swipe"}dispose(){j.off(this._element,Z)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),v(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&v(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(j.on(this._element,st,(t=>this._start(t))),j.on(this._element,nt,(t=>this._end(t))),this._element.classList.add("pointer-event")):(j.on(this._element,tt,(t=>this._start(t))),j.on(this._element,et,(t=>this._move(t))),j.on(this._element,it,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const lt=".bs.carousel",ct=".data-api",ht="next",dt="prev",ut="left",_t="right",gt=`slide${lt}`,ft=`slid${lt}`,mt=`keydown${lt}`,pt=`mouseenter${lt}`,bt=`mouseleave${lt}`,vt=`dragstart${lt}`,yt=`load${lt}${ct}`,wt=`click${lt}${ct}`,At="carousel",Et="active",Ct=".active",Tt=".carousel-item",kt=Ct+Tt,$t={ArrowLeft:_t,ArrowRight:ut},St={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Lt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ot extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=K.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===At&&this.cycle()}static get Default(){return St}static get DefaultType(){return Lt}static get NAME(){return"carousel"}next(){this._slide(ht)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(dt)}pause(){this._isSliding&&a(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?j.one(this._element,ft,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void j.one(this._element,ft,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?ht:dt;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&j.on(this._element,mt,(t=>this._keydown(t))),"hover"===this._config.pause&&(j.on(this._element,pt,(()=>this.pause())),j.on(this._element,bt,(()=>this._maybeEnableCycle()))),this._config.touch&&at.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of K.find(".carousel-item img",this._element))j.on(t,vt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(ut)),rightCallback:()=>this._slide(this._directionToOrder(_t)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new at(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=$t[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=K.findOne(Ct,this._indicatorsElement);e.classList.remove(Et),e.removeAttribute("aria-current");const i=K.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Et),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),s=t===ht,n=e||w(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),r=e=>j.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(gt).defaultPrevented)return;if(!i||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),g(n),i.classList.add(l),n.classList.add(l),this._queueCallback((()=>{n.classList.remove(l,c),n.classList.add(Et),i.classList.remove(Et,c,l),this._isSliding=!1,r(ft)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return K.findOne(kt,this._element)}_getItems(){return K.find(Tt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return p()?t===ut?dt:ht:t===ut?ht:dt}_orderToDirection(t){return p()?t===dt?ut:_t:t===dt?_t:ut}static jQueryInterface(t){return this.each((function(){const e=Ot.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}j.on(document,wt,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=K.getElementFromSelector(this);if(!e||!e.classList.contains(At))return;t.preventDefault();const i=Ot.getOrCreateInstance(e),s=this.getAttribute("data-bs-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===B.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),j.on(window,yt,(()=>{const t=K.find('[data-bs-ride="carousel"]');for(const e of t)Ot.getOrCreateInstance(e)})),b(Ot);const It=".bs.collapse",Dt=`show${It}`,Nt=`shown${It}`,Pt=`hide${It}`,xt=`hidden${It}`,Mt=`click${It}.data-api`,jt="show",Ft="collapse",zt="collapsing",Ht=`:scope .${Ft} .${Ft}`,Bt='[data-bs-toggle="collapse"]',qt={parent:null,toggle:!0},Wt={parent:"(null|element)",toggle:"boolean"};class Rt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=K.find(Bt);for(const t of i){const e=K.getSelectorFromElement(t),i=K.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return qt}static get DefaultType(){return Wt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Rt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(j.trigger(this._element,Dt).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Ft),this._element.classList.add(zt),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(Ft,jt),this._element.style[e]="",j.trigger(this._element,Nt)}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(j.trigger(this._element,Pt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(zt),this._element.classList.remove(Ft,jt);for(const t of this._triggerArray){const e=K.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(Ft),j.trigger(this._element,xt)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(jt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=c(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Bt);for(const e of t){const t=K.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=K.find(Ht,this._config.parent);return K.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Rt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}j.on(document,Mt,Bt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of K.getMultipleElementsFromSelector(this))Rt.getOrCreateInstance(t,{toggle:!1}).toggle()})),b(Rt);const Kt="dropdown",Vt=".bs.dropdown",Qt=".data-api",Xt="ArrowUp",Yt="ArrowDown",Ut=`hide${Vt}`,Gt=`hidden${Vt}`,Jt=`show${Vt}`,Zt=`shown${Vt}`,te=`click${Vt}${Qt}`,ee=`keydown${Vt}${Qt}`,ie=`keyup${Vt}${Qt}`,se="show",ne='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',oe=`${ne}.${se}`,re=".dropdown-menu",ae=p()?"top-end":"top-start",le=p()?"top-start":"top-end",ce=p()?"bottom-end":"bottom-start",he=p()?"bottom-start":"bottom-end",de=p()?"left-start":"right-start",ue=p()?"right-start":"left-start",_e={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ge={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class fe extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=K.next(this._element,re)[0]||K.prev(this._element,re)[0]||K.findOne(re,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return _e}static get DefaultType(){return ge}static get NAME(){return Kt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(d(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!j.trigger(this._element,Jt,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))j.on(t,"mouseover",_);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(se),this._element.classList.add(se),j.trigger(this._element,Zt,t)}}hide(){if(d(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!j.trigger(this._element,Ut,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))j.off(t,"mouseover",_);this._popper&&this._popper.destroy(),this._menu.classList.remove(se),this._element.classList.remove(se),this._element.setAttribute("aria-expanded","false"),B.removeDataAttribute(this._menu,"popper"),j.trigger(this._element,Gt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!l(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Kt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:l(this._config.reference)?t=c(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=i.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(se)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return de;if(t.classList.contains("dropstart"))return ue;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?le:ae:e?he:ce}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(B.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...v(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=K.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>h(t)));i.length&&w(i,e,t===Yt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=fe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=K.find(oe);for(const i of e){const e=fe.getInstance(i);if(!e||!1===e._config.autoClose)continue;const s=t.composedPath(),n=s.includes(e._menu);if(s.includes(e._element)||"inside"===e._config.autoClose&&!n||"outside"===e._config.autoClose&&n)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,s=[Xt,Yt].includes(t.key);if(!s&&!i)return;if(e&&!i)return;t.preventDefault();const n=this.matches(ne)?this:K.prev(this,ne)[0]||K.next(this,ne)[0]||K.findOne(ne,t.delegateTarget.parentNode),o=fe.getOrCreateInstance(n);if(s)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),n.focus())}}j.on(document,ee,ne,fe.dataApiKeydownHandler),j.on(document,ee,re,fe.dataApiKeydownHandler),j.on(document,te,fe.clearMenus),j.on(document,ie,fe.clearMenus),j.on(document,te,ne,(function(t){t.preventDefault(),fe.getOrCreateInstance(this).toggle()})),b(fe);const me="backdrop",pe="show",be=`mousedown.bs.${me}`,ve={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ye={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class we extends q{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ve}static get DefaultType(){return ye}static get NAME(){return me}show(t){if(!this._config.isVisible)return void v(t);this._append();const e=this._getElement();this._config.isAnimated&&g(e),e.classList.add(pe),this._emulateAnimation((()=>{v(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(pe),this._emulateAnimation((()=>{this.dispose(),v(t)}))):v(t)}dispose(){this._isAppended&&(j.off(this._element,be),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=c(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),j.on(t,be,(()=>{v(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){y(t,this._getElement(),this._config.isAnimated)}}const Ae=".bs.focustrap",Ee=`focusin${Ae}`,Ce=`keydown.tab${Ae}`,Te="backward",ke={autofocus:!0,trapElement:null},$e={autofocus:"boolean",trapElement:"element"};class Se extends q{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ke}static get DefaultType(){return $e}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),j.off(document,Ae),j.on(document,Ee,(t=>this._handleFocusin(t))),j.on(document,Ce,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,j.off(document,Ae))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=K.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Te?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Te:"forward")}}const Le=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Oe=".sticky-top",Ie="padding-right",De="margin-right";class Ne{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Ie,(e=>e+t)),this._setElementAttributes(Le,Ie,(e=>e+t)),this._setElementAttributes(Oe,De,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ie),this._resetElementAttributes(Le,Ie),this._resetElementAttributes(Oe,De)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&B.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=B.getDataAttribute(t,e);null!==i?(B.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(l(t))e(t);else for(const i of K.find(t,this._element))e(i)}}const Pe=".bs.modal",xe=`hide${Pe}`,Me=`hidePrevented${Pe}`,je=`hidden${Pe}`,Fe=`show${Pe}`,ze=`shown${Pe}`,He=`resize${Pe}`,Be=`click.dismiss${Pe}`,qe=`mousedown.dismiss${Pe}`,We=`keydown.dismiss${Pe}`,Re=`click${Pe}.data-api`,Ke="modal-open",Ve="show",Qe="modal-static",Xe={backdrop:!0,focus:!0,keyboard:!0},Ye={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ue extends W{constructor(t,e){super(t,e),this._dialog=K.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Ne,this._addEventListeners()}static get Default(){return Xe}static get DefaultType(){return Ye}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||j.trigger(this._element,Fe,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ke),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(j.trigger(this._element,xe).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ve),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){j.off(window,Pe),j.off(this._dialog,Pe),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new we({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Se({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=K.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),g(this._element),this._element.classList.add(Ve),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,j.trigger(this._element,ze,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){j.on(this._element,We,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),j.on(window,He,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),j.on(this._element,qe,(t=>{j.one(this._element,Be,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ke),this._resetAdjustments(),this._scrollBar.reset(),j.trigger(this._element,je)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(j.trigger(this._element,Me).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Qe)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Qe),this._queueCallback((()=>{this._element.classList.remove(Qe),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=p()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=p()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Ue.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}j.on(document,Re,'[data-bs-toggle="modal"]',(function(t){const e=K.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),j.one(e,Fe,(t=>{t.defaultPrevented||j.one(e,je,(()=>{h(this)&&this.focus()}))}));const i=K.findOne(".modal.show");i&&Ue.getInstance(i).hide(),Ue.getOrCreateInstance(e).toggle(this)})),V(Ue),b(Ue);const Ge=".bs.offcanvas",Je=".data-api",Ze=`load${Ge}${Je}`,ti="show",ei="showing",ii="hiding",si=".offcanvas.show",ni=`show${Ge}`,oi=`shown${Ge}`,ri=`hide${Ge}`,ai=`hidePrevented${Ge}`,li=`hidden${Ge}`,ci=`resize${Ge}`,hi=`click${Ge}${Je}`,di=`keydown.dismiss${Ge}`,ui={backdrop:!0,keyboard:!0,scroll:!1},_i={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class gi extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return ui}static get DefaultType(){return _i}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||j.trigger(this._element,ni,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Ne).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ei),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(ti),this._element.classList.remove(ei),j.trigger(this._element,oi,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(j.trigger(this._element,ri).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ii),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(ti,ii),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Ne).reset(),j.trigger(this._element,li)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new we({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():j.trigger(this._element,ai)}:null})}_initializeFocusTrap(){return new Se({trapElement:this._element})}_addEventListeners(){j.on(this._element,di,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():j.trigger(this._element,ai))}))}static jQueryInterface(t){return this.each((function(){const e=gi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}j.on(document,hi,'[data-bs-toggle="offcanvas"]',(function(t){const e=K.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this))return;j.one(e,li,(()=>{h(this)&&this.focus()}));const i=K.findOne(si);i&&i!==e&&gi.getInstance(i).hide(),gi.getOrCreateInstance(e).toggle(this)})),j.on(window,Ze,(()=>{for(const t of K.find(si))gi.getOrCreateInstance(t).show()})),j.on(window,ci,(()=>{for(const t of K.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&gi.getOrCreateInstance(t).hide()})),V(gi),b(gi);const fi={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},mi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),pi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,bi=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!mi.has(i)||Boolean(pi.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},vi={allowList:fi,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},yi={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},wi={entry:"(string|element|function|null)",selector:"(string|element)"};class Ai extends q{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return vi}static get DefaultType(){return yi}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},wi)}_setContent(t,e,i){const s=K.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?l(e)?this._putElementInTemplate(c(e),s):this._config.html?s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const t of n){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const s=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[i]||[]);for(const e of s)bi(e,n)||t.removeAttribute(e.nodeName)}return s.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return v(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Ei=new Set(["sanitize","allowList","sanitizeFn"]),Ci="fade",Ti="show",ki=".modal",$i="hide.bs.modal",Si="hover",Li="focus",Oi={AUTO:"auto",TOP:"top",RIGHT:p()?"left":"right",BOTTOM:"bottom",LEFT:p()?"right":"left"},Ii={allowList:fi,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Di={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Ni extends W{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Ii}static get DefaultType(){return Di}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),j.off(this._element.closest(ki),$i,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=j.trigger(this._element,this.constructor.eventName("show")),e=(u(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),j.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(Ti),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))j.on(t,"mouseover",_);this._queueCallback((()=>{j.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!j.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Ti),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))j.off(t,"mouseover",_);this._activeTrigger.click=!1,this._activeTrigger[Li]=!1,this._activeTrigger[Si]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),j.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Ci,Ti),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Ci),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ai({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ci)}_isShown(){return this.tip&&this.tip.classList.contains(Ti)}_createPopper(t){const e=v(this._config.placement,[this,t,this._element]),s=Oi[e.toUpperCase()];return i.createPopper(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return v(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...v(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)j.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Si?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===Si?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");j.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Li:Si]=!0,e._enter()})),j.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Li:Si]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},j.on(this._element.closest(ki),$i,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=B.getDataAttributes(this._element);for(const t of Object.keys(e))Ei.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:c(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=Ni.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Ni);const Pi={...Ni.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},xi={...Ni.DefaultType,content:"(null|string|element|function)"};class Mi extends Ni{static get Default(){return Pi}static get DefaultType(){return xi}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Mi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Mi);const ji=".bs.scrollspy",Fi=`activate${ji}`,zi=`click${ji}`,Hi=`load${ji}.data-api`,Bi="active",qi="[href]",Wi=".nav-link",Ri=`${Wi}, .nav-item > ${Wi}, .list-group-item`,Ki={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Vi={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Qi extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ki}static get DefaultType(){return Vi}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=c(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(j.off(this._config.target,zi),j.on(this._config.target,zi,qi,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},s=(this._rootElement||document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=K.find(qi,this._config.target);for(const e of t){if(!e.hash||d(e))continue;const t=K.findOne(decodeURI(e.hash),this._element);h(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Bi),this._activateParents(t),j.trigger(this._element,Fi,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))K.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Bi);else for(const e of K.parents(t,".nav, .list-group"))for(const t of K.prev(e,Ri))t.classList.add(Bi)}_clearActiveClass(t){t.classList.remove(Bi);const e=K.find(`${qi}.${Bi}`,t);for(const t of e)t.classList.remove(Bi)}static jQueryInterface(t){return this.each((function(){const e=Qi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}j.on(window,Hi,(()=>{for(const t of K.find('[data-bs-spy="scroll"]'))Qi.getOrCreateInstance(t)})),b(Qi);const Xi=".bs.tab",Yi=`hide${Xi}`,Ui=`hidden${Xi}`,Gi=`show${Xi}`,Ji=`shown${Xi}`,Zi=`click${Xi}`,ts=`keydown${Xi}`,es=`load${Xi}`,is="ArrowLeft",ss="ArrowRight",ns="ArrowUp",os="ArrowDown",rs="Home",as="End",ls="active",cs="fade",hs="show",ds=".dropdown-toggle",us=`:not(${ds})`,_s='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',gs=`.nav-link${us}, .list-group-item${us}, [role="tab"]${us}, ${_s}`,fs=`.${ls}[data-bs-toggle="tab"], .${ls}[data-bs-toggle="pill"], .${ls}[data-bs-toggle="list"]`;class ms extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),j.on(this._element,ts,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?j.trigger(e,Yi,{relatedTarget:t}):null;j.trigger(t,Gi,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(ls),this._activate(K.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),j.trigger(t,Ji,{relatedTarget:e})):t.classList.add(hs)}),t,t.classList.contains(cs)))}_deactivate(t,e){t&&(t.classList.remove(ls),t.blur(),this._deactivate(K.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),j.trigger(t,Ui,{relatedTarget:e})):t.classList.remove(hs)}),t,t.classList.contains(cs)))}_keydown(t){if(![is,ss,ns,os,rs,as].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!d(t)));let i;if([rs,as].includes(t.key))i=e[t.key===rs?0:e.length-1];else{const s=[ss,os].includes(t.key);i=w(e,t.target,s,!0)}i&&(i.focus({preventScroll:!0}),ms.getOrCreateInstance(i).show())}_getChildren(){return K.find(gs,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=K.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const s=(t,s)=>{const n=K.findOne(t,i);n&&n.classList.toggle(s,e)};s(ds,ls),s(".dropdown-menu",hs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(ls)}_getInnerElement(t){return t.matches(gs)?t:K.findOne(gs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=ms.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}j.on(document,Zi,_s,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this)||ms.getOrCreateInstance(this).show()})),j.on(window,es,(()=>{for(const t of K.find(fs))ms.getOrCreateInstance(t)})),b(ms);const ps=".bs.toast",bs=`mouseover${ps}`,vs=`mouseout${ps}`,ys=`focusin${ps}`,ws=`focusout${ps}`,As=`hide${ps}`,Es=`hidden${ps}`,Cs=`show${ps}`,Ts=`shown${ps}`,ks="hide",$s="show",Ss="showing",Ls={animation:"boolean",autohide:"boolean",delay:"number"},Os={animation:!0,autohide:!0,delay:5e3};class Is extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Os}static get DefaultType(){return Ls}static get NAME(){return"toast"}show(){j.trigger(this._element,Cs).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(ks),g(this._element),this._element.classList.add($s,Ss),this._queueCallback((()=>{this._element.classList.remove(Ss),j.trigger(this._element,Ts),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(j.trigger(this._element,As).defaultPrevented||(this._element.classList.add(Ss),this._queueCallback((()=>{this._element.classList.add(ks),this._element.classList.remove(Ss,$s),j.trigger(this._element,Es)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove($s),super.dispose()}isShown(){return this._element.classList.contains($s)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){j.on(this._element,bs,(t=>this._onInteraction(t,!0))),j.on(this._element,vs,(t=>this._onInteraction(t,!1))),j.on(this._element,ys,(t=>this._onInteraction(t,!0))),j.on(this._element,ws,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Is.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return V(Is),b(Is),{Alert:U,Button:J,Carousel:Ot,Collapse:Rt,Dropdown:fe,Modal:Ue,Offcanvas:gi,Popover:Mi,ScrollSpy:Qi,Tab:ms,Toast:Is,Tooltip:Ni}}));
+//# sourceMappingURL=bootstrap.min.js.map
\ No newline at end of file
diff --git a/logincontroller.php b/logincontroller.php
deleted file mode 100644
index 0a503a8..0000000
--- a/logincontroller.php
+++ /dev/null
@@ -1,33 +0,0 @@
- 0 then the username and password matched
-
-
- echo "You are logged in";
- $_SESSION["login"] = $username;
- }
- else
- {
- echo "Error in username and password";
- }
-}
-
-if (isset($_POST["logoutbutton"]))
-{
- echo "logout user";
- unset($_SESSION["login"]);
- session_destroy();
-}
diff --git a/page1.php b/page1.php
deleted file mode 100644
index c45d201..0000000
--- a/page1.php
+++ /dev/null
@@ -1,10 +0,0 @@
-pageTitle = 'Page1';
-//var_dump($_POST);
-
-require_once("logincontroller.php");
-
-
- require_once('Views/page1.phtml');
\ No newline at end of file
diff --git a/page2.php b/page2.php
deleted file mode 100644
index 99cb775..0000000
--- a/page2.php
+++ /dev/null
@@ -1,10 +0,0 @@
-pageTitle = 'Page2';
-//var_dump($_POST);
-
-require_once("logincontroller.php");
-
-
-require_once('Views/page2.phtml');