diff --git a/build.gradle b/build.gradle index 07d2578..d27f4a0 100644 --- a/build.gradle +++ b/build.gradle @@ -20,9 +20,15 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' - runtimeOnly 'com.h2database:h2' + implementation 'org.jetbrains:annotations:24.0.0' + runtimeOnly 'com.h2database:h2' testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + testImplementation 'org.projectlombok:lombok:1.18.26' + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' + // implementation 'org.springframework.boot:spring-boot-starter-jdbc' } tasks.named('test') { diff --git a/src/main/java/landvibe/springintro/aop/TimeTraceAop.java b/src/main/java/landvibe/springintro/aop/TimeTraceAop.java new file mode 100644 index 0000000..12a35f3 --- /dev/null +++ b/src/main/java/landvibe/springintro/aop/TimeTraceAop.java @@ -0,0 +1,22 @@ +package landvibe.springintro.aop; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.springframework.stereotype.Component; +@Component +@Aspect +public class TimeTraceAop { + @Around("execution(* landvibe.springintro..*(..))") + public Object execute(ProceedingJoinPoint joinPoint) throws Throwable { + long start = System.currentTimeMillis(); + System.out.println("START : " + joinPoint.toString()); // 어떤 메소드를 call 했는 지 + try { + return joinPoint.proceed(); // 다음 메소드가 진행 + } finally { + long finish = System.currentTimeMillis(); + long timeMs = finish - start; + System.out.println("END : " + joinPoint.toString() + " " + timeMs + + "ms"); // 어떤 메소드를 call 했는지 + } + } +} \ No newline at end of file diff --git a/src/main/java/landvibe/springintro/item/config/ItemConfig.java b/src/main/java/landvibe/springintro/item/config/ItemConfig.java new file mode 100644 index 0000000..b46b666 --- /dev/null +++ b/src/main/java/landvibe/springintro/item/config/ItemConfig.java @@ -0,0 +1,30 @@ +package landvibe.springintro.item.config; +import landvibe.springintro.item.repository.ItemRepository; +import landvibe.springintro.item.service.ItemService; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +@Configuration +public class ItemConfig { + /* private final DataSource dataSource; + private final EntityManager em; + @Autowired + public ItemConfig(DataSource dataSource, EntityManager em) { + this.dataSource = dataSource; + this.em = em; + }*/ + private final ItemRepository itemRepository; + public ItemConfig(ItemRepository itemRepository) { + this.itemRepository = itemRepository; + } + @Bean + public ItemService itemService() { + return new ItemService(itemRepository); + } + /* @Bean + public ItemRepository itemRepository() { + // return new MemoryItemRepository(); + // return new JdbcItemRepository(dataSource); + // return new JdbcTemplateItemRepository(dataSource); + return new JpaItemRepository(em); + }*/ +} diff --git a/src/main/java/landvibe/springintro/item/controller/ItemController.java b/src/main/java/landvibe/springintro/item/controller/ItemController.java new file mode 100644 index 0000000..fbf6abd --- /dev/null +++ b/src/main/java/landvibe/springintro/item/controller/ItemController.java @@ -0,0 +1,41 @@ +package landvibe.springintro.item.controller; + +import landvibe.springintro.item.domain.Item; +import landvibe.springintro.item.dto.ItemCreateForm; +import landvibe.springintro.item.service.ItemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; + +import java.util.List; + +@Controller +public class ItemController { + private final ItemService service; + @Autowired + public ItemController(ItemService itemService) { + this.service = itemService; + } + @GetMapping("/items/new") + public String createForm(){ + return "items/createForm"; + } + @PostMapping("/items/new") + public String create(@ModelAttribute ItemCreateForm form) { + Item item = new Item(); + item.setName(form.getName()); + item.setPrice(form.getPrice()); + item.setCount(form.getCount()); + service.create(item); + return "redirect:/"; + } + @GetMapping("/items") + public String list(Model model){ + List items = service.findItems(); + model.addAttribute("items", items); + return "items/itemList"; + } +} diff --git a/src/main/java/landvibe/springintro/item/domain/Item.java b/src/main/java/landvibe/springintro/item/domain/Item.java new file mode 100644 index 0000000..19abc28 --- /dev/null +++ b/src/main/java/landvibe/springintro/item/domain/Item.java @@ -0,0 +1,20 @@ +package landvibe.springintro.item.domain; + +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +@Entity +public class Item { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + private String name; + private Integer price; + private Integer count; +} diff --git a/src/main/java/landvibe/springintro/item/dto/ItemCreateForm.java b/src/main/java/landvibe/springintro/item/dto/ItemCreateForm.java new file mode 100644 index 0000000..1cd7be2 --- /dev/null +++ b/src/main/java/landvibe/springintro/item/dto/ItemCreateForm.java @@ -0,0 +1,13 @@ +package landvibe.springintro.item.dto; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class ItemCreateForm { + private String name; + private Integer price; + private Integer count; + +} \ No newline at end of file diff --git a/src/main/java/landvibe/springintro/item/repository/ItemRepository.java b/src/main/java/landvibe/springintro/item/repository/ItemRepository.java new file mode 100644 index 0000000..746127c --- /dev/null +++ b/src/main/java/landvibe/springintro/item/repository/ItemRepository.java @@ -0,0 +1,14 @@ +package landvibe.springintro.item.repository; + +import landvibe.springintro.item.domain.Item; + +import java.util.List; +import java.util.Optional; + +public interface ItemRepository { + + Item save(Item item); + Optional findById(Long id); + Optional findByName(String name); + List findAll(); +} diff --git a/src/main/java/landvibe/springintro/item/repository/JdbcItemRepository.java b/src/main/java/landvibe/springintro/item/repository/JdbcItemRepository.java new file mode 100644 index 0000000..b89477d --- /dev/null +++ b/src/main/java/landvibe/springintro/item/repository/JdbcItemRepository.java @@ -0,0 +1,148 @@ +package landvibe.springintro.item.repository; +import landvibe.springintro.item.domain.Item; +import org.springframework.jdbc.datasource.DataSourceUtils; +import javax.sql.DataSource; +import java.sql.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +public class JdbcItemRepository implements ItemRepository { + private final DataSource dataSource; + public JdbcItemRepository(DataSource dataSource) { + this.dataSource = dataSource; + } + @Override + public Item save(Item item) { + String sql = "insert into item(name, price, count) values(?, ?, ?)"; + Connection conn = null; + PreparedStatement pstmt = null; + ResultSet rs = null; + try { + conn = getConnection(); + pstmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); + pstmt.setString(1, item.getName()); + pstmt.setInt(2, item.getPrice()); + pstmt.setInt(3, item.getCount()); + pstmt.executeUpdate(); + rs = pstmt.getGeneratedKeys(); + if (rs.next()) { + item.setId(rs.getLong(1)); + } else { + throw new SQLException("id 조회 실패"); + } + return item; + } catch (Exception e) { + throw new IllegalStateException(e); + } finally { + close(conn, pstmt, rs); + } + } + @Override + public Optional findById(Long id) { + String sql = "select * from item where id = ?"; + Connection conn = null; + PreparedStatement pstmt = null; + ResultSet rs = null; + try { + conn = getConnection(); + pstmt = conn.prepareStatement(sql); + pstmt.setLong(1, id); + rs = pstmt.executeQuery(); + if (rs.next()) { + Item item = new Item(); + item.setId(rs.getLong("id")); + item.setName(rs.getString("name")); + item.setCount(rs.getInt("count")); + item.setPrice(rs.getInt("price")); + return Optional.of(item); + } else { + return Optional.empty(); + } + } catch (Exception e) { + throw new IllegalStateException(e); + } finally { + close(conn, pstmt, rs); + } + } + @Override + public Optional findByName(String name) { + String sql = "select * from item where name = ?"; + Connection conn = null; + PreparedStatement pstmt = null; + ResultSet rs = null; + try { + conn = getConnection(); + pstmt = conn.prepareStatement(sql); + pstmt.setString(1, name); + rs = pstmt.executeQuery(); + if (rs.next()) { + Item item = new Item(); + item.setId(rs.getLong("id")); + item.setName(rs.getString("name")); + item.setCount(rs.getInt("count")); + item.setPrice(rs.getInt("price")); + return Optional.of(item); + } + return Optional.empty(); + } catch (Exception e) { + throw new IllegalStateException(e); + } finally { + close(conn, pstmt, rs); + } + } + @Override + public List findAll() { + String sql = "select * from item"; + Connection conn = null; + PreparedStatement pstmt = null; + ResultSet rs = null; + try { + conn = getConnection(); + pstmt = conn.prepareStatement(sql); + rs = pstmt.executeQuery(); + List items = new ArrayList<>(); + while (rs.next()) { + Item item = new Item(); + item.setId(rs.getLong("id")); + item.setName(rs.getString("name")); + item.setCount(rs.getInt("count")); + item.setPrice(rs.getInt("price")); + items.add(item); + } + return items; + } catch (Exception e) { + throw new IllegalStateException(e); + } finally { + close(conn, pstmt, rs); + } + } + private Connection getConnection() { + return DataSourceUtils.getConnection(dataSource); + } + private void close(Connection conn, PreparedStatement pstmt, ResultSet rs) { + try { + if (rs != null) { + rs.close(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + try { + if (pstmt != null) { + pstmt.close(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + try { + if (conn != null) { + close(conn); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + private void close(Connection conn) throws SQLException { + DataSourceUtils.releaseConnection(conn, dataSource); + } +} \ No newline at end of file diff --git a/src/main/java/landvibe/springintro/item/repository/JdbcTemplateItemRepository.java b/src/main/java/landvibe/springintro/item/repository/JdbcTemplateItemRepository.java new file mode 100644 index 0000000..c3f27a8 --- /dev/null +++ b/src/main/java/landvibe/springintro/item/repository/JdbcTemplateItemRepository.java @@ -0,0 +1,54 @@ +package landvibe.springintro.item.repository; +import landvibe.springintro.item.domain.Item; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.core.RowMapper; +import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; +import org.springframework.jdbc.core.simple.SimpleJdbcInsert; +import javax.sql.DataSource; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +public class JdbcTemplateItemRepository implements ItemRepository { + private final JdbcTemplate jdbcTemplate; + public JdbcTemplateItemRepository(DataSource dataSource) { + jdbcTemplate = new JdbcTemplate(dataSource); + } + @Override + public Item save(Item item) { + SimpleJdbcInsert jdbcInsert = new SimpleJdbcInsert(jdbcTemplate); + jdbcInsert.withTableName("item").usingGeneratedKeyColumns("id"); + Map parameters = new HashMap<>(); + parameters.put("name", item.getName()); + parameters.put("count", item.getCount()); + parameters.put("price", item.getPrice()); + Number key = jdbcInsert.executeAndReturnKey(new + MapSqlParameterSource(parameters)); + item.setId(key.longValue()); + return item; + } + @Override + public Optional findById(Long id) { + List result = jdbcTemplate.query("select * from item where id = ? ", rowMapper(), id); + return result.stream().findAny(); + } + @Override + public Optional findByName(String name) { + List result = jdbcTemplate.query("select * from item where name = ? ", rowMapper(), name); + return result.stream().findAny(); + } + @Override + public List findAll() { + return jdbcTemplate.query("select * from item", rowMapper()); + } + private RowMapper rowMapper() { + return (rs, rowNum) -> { + Item item = new Item(); + item.setId(rs.getLong("id")); + item.setName(rs.getString("name")); + item.setPrice(rs.getInt("price")); + item.setCount(rs.getInt("count")); + return item; + }; + } +} \ No newline at end of file diff --git a/src/main/java/landvibe/springintro/item/repository/JpaItemRepository.java b/src/main/java/landvibe/springintro/item/repository/JpaItemRepository.java new file mode 100644 index 0000000..e2230b2 --- /dev/null +++ b/src/main/java/landvibe/springintro/item/repository/JpaItemRepository.java @@ -0,0 +1,34 @@ +package landvibe.springintro.item.repository; +import jakarta.persistence.EntityManager; +import landvibe.springintro.item.domain.Item; +import java.util.List; +import java.util.Optional; +public class JpaItemRepository implements ItemRepository { + private final EntityManager em; + public JpaItemRepository(EntityManager em) { + this.em = em; + } + @Override + public Item save(Item item) { + em.persist(item); + return item; + } + @Override + public Optional findById(Long id) { + Item item = em.find(Item.class, id); + return Optional.ofNullable(item); + } + @Override + public Optional findByName(String name) { + return em.createQuery("select i from Item i where i.name = :name", + Item.class) + .setParameter("name", name) + .getResultStream() + .findAny(); + } + @Override + public List findAll() { + return em.createQuery("select i from Item i", Item.class) + .getResultList(); + } +} diff --git a/src/main/java/landvibe/springintro/item/repository/MemoryItemRepository.java b/src/main/java/landvibe/springintro/item/repository/MemoryItemRepository.java new file mode 100644 index 0000000..66bee40 --- /dev/null +++ b/src/main/java/landvibe/springintro/item/repository/MemoryItemRepository.java @@ -0,0 +1,37 @@ +package landvibe.springintro.item.repository; + +import landvibe.springintro.item.domain.Item; +import org.springframework.stereotype.Repository; + +import java.util.*; + + +public class MemoryItemRepository implements ItemRepository{ + + private static Map store = new HashMap<>(); + private static long sequence = 0L; + @Override + public Item save(Item item) { + item.setId(++sequence); + store.put(item.getId(), item); + return item; + } + @Override + public Optional findById(Long id) { + Item item = store.get(id); + return Optional.ofNullable(item); + } + @Override + public Optional findByName(String name) { + return store.values().stream() + .filter(item -> item.getName().equals(name)) + .findAny(); + } + @Override + public List findAll() { + return new ArrayList<>(store.values()); + } + public void clearStore() { + store.clear(); + } +} diff --git a/src/main/java/landvibe/springintro/item/repository/SpringDataJpaItemRepository.java b/src/main/java/landvibe/springintro/item/repository/SpringDataJpaItemRepository.java new file mode 100644 index 0000000..dccdf69 --- /dev/null +++ b/src/main/java/landvibe/springintro/item/repository/SpringDataJpaItemRepository.java @@ -0,0 +1,11 @@ +package landvibe.springintro.item.repository; + +import landvibe.springintro.item.domain.Item; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.Optional; + +public interface SpringDataJpaItemRepository extends JpaRepository, ItemRepository { + @Override + Optional findByName(String name); +} diff --git a/src/main/java/landvibe/springintro/item/service/ItemService.java b/src/main/java/landvibe/springintro/item/service/ItemService.java new file mode 100644 index 0000000..663918b --- /dev/null +++ b/src/main/java/landvibe/springintro/item/service/ItemService.java @@ -0,0 +1,42 @@ +package landvibe.springintro.item.service; +import jakarta.transaction.Transactional; +import landvibe.springintro.item.domain.Item; +import landvibe.springintro.item.repository.ItemRepository; +import landvibe.springintro.item.repository.MemoryItemRepository; +import org.springframework.stereotype.Service; + +import java.util.List; +@Transactional +public class ItemService { + private final ItemRepository repository; + public ItemService(ItemRepository repository) { + this.repository = repository; + } + /** + * 상품 등록 + */ + public Long create(Item item) { + long start = System.currentTimeMillis(); + try { + validateDuplicateItem(item.getName()); + repository.save(item); + return item.getId(); + } finally { + long end = System.currentTimeMillis(); + long timeMs = end - start; + System.out.println("create::timeMs = " + timeMs); + } + } + /** + * 상품 전체조회 + */ + public List findItems() { + return repository.findAll(); + } + private void validateDuplicateItem(String itemName) { + repository.findByName(itemName) + .ifPresent(i -> { + throw new IllegalArgumentException("이미 존재하는 상품입니다."); + }); + } +} \ No newline at end of file diff --git a/src/main/java/landvibe/springintro/member/config/MemberConfig.java b/src/main/java/landvibe/springintro/member/config/MemberConfig.java new file mode 100644 index 0000000..1375677 --- /dev/null +++ b/src/main/java/landvibe/springintro/member/config/MemberConfig.java @@ -0,0 +1,20 @@ +package landvibe.springintro.member.config; + +import landvibe.springintro.item.repository.ItemRepository; +import landvibe.springintro.item.service.ItemService; +import landvibe.springintro.member.repository.MemberRepository; +import landvibe.springintro.member.service.MemberService; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class MemberConfig { + private final MemberRepository memberRepository; + public MemberConfig(MemberRepository memberRepository) { + this.memberRepository = memberRepository; + } + @Bean + public MemberService memberService() { + return new MemberService(memberRepository); + } +} diff --git a/src/main/java/landvibe/springintro/member/controller/MemberController.java b/src/main/java/landvibe/springintro/member/controller/MemberController.java new file mode 100644 index 0000000..9a9aefd --- /dev/null +++ b/src/main/java/landvibe/springintro/member/controller/MemberController.java @@ -0,0 +1,44 @@ +package landvibe.springintro.member.controller; + +import landvibe.springintro.member.domain.Member; +import landvibe.springintro.member.dto.MemberCreateForm; +import landvibe.springintro.member.service.MemberService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; + +import java.util.List; + +@Controller +public class MemberController { + + private MemberService memberService; + + @Autowired + public MemberController(MemberService memberService) { + this.memberService = memberService; + } + + @GetMapping("/members/new") + public String createForm(){ + return "members/createMemberForm"; + } + @PostMapping("/members/new") + public String create(@ModelAttribute MemberCreateForm form) { + Member member = new Member(); + member.setId(form.getId()); + member.setName(form.getName()); + memberService.create(member); + return "redirect:/"; + } + + @GetMapping("/members") + public String member(Model model){ + List members = memberService.findAllMembers(); + model.addAttribute("members", members); + return "members/memberList"; + } +} diff --git a/src/main/java/landvibe/springintro/member/domain/Member.java b/src/main/java/landvibe/springintro/member/domain/Member.java new file mode 100644 index 0000000..fc9fad2 --- /dev/null +++ b/src/main/java/landvibe/springintro/member/domain/Member.java @@ -0,0 +1,18 @@ +package landvibe.springintro.member.domain; + +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import lombok.Getter; +import lombok.Setter; + +@Entity +@Getter +@Setter +public class Member { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + private String name; +} diff --git a/src/main/java/landvibe/springintro/member/dto/MemberCreateForm.java b/src/main/java/landvibe/springintro/member/dto/MemberCreateForm.java new file mode 100644 index 0000000..db81f02 --- /dev/null +++ b/src/main/java/landvibe/springintro/member/dto/MemberCreateForm.java @@ -0,0 +1,11 @@ +package landvibe.springintro.member.dto; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class MemberCreateForm { + private Long id; + private String name; +} diff --git a/src/main/java/landvibe/springintro/member/repository/MemberRepository.java b/src/main/java/landvibe/springintro/member/repository/MemberRepository.java new file mode 100644 index 0000000..e908686 --- /dev/null +++ b/src/main/java/landvibe/springintro/member/repository/MemberRepository.java @@ -0,0 +1,13 @@ +package landvibe.springintro.member.repository; + +import landvibe.springintro.item.domain.Item; +import landvibe.springintro.member.domain.Member; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import java.util.Optional; + +@Repository +public interface MemberRepository extends JpaRepository { + Optional findByName(String name); +} diff --git a/src/main/java/landvibe/springintro/member/service/MemberService.java b/src/main/java/landvibe/springintro/member/service/MemberService.java new file mode 100644 index 0000000..a391796 --- /dev/null +++ b/src/main/java/landvibe/springintro/member/service/MemberService.java @@ -0,0 +1,32 @@ +package landvibe.springintro.member.service; + +import landvibe.springintro.item.domain.Item; +import landvibe.springintro.item.repository.ItemRepository; +import landvibe.springintro.member.domain.Member; +import landvibe.springintro.member.repository.MemberRepository; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class MemberService { + private final MemberRepository memberRepository; + + public MemberService(MemberRepository memberRepository) { + this.memberRepository = memberRepository; + } + public Long create(Member member) { + validateDuplicateMember(member.getName()); + memberRepository.save(member); + return member.getId(); + } + public List findAllMembers() { + return memberRepository.findAll(); + } + private void validateDuplicateMember(String memberName) { + memberRepository.findByName(memberName) + .ifPresent(i -> { + throw new IllegalArgumentException("이미 존재하는 상품입니다."); + }); + } +} diff --git a/src/main/java/landvibe/springintro/viewController/HomeViewController.java b/src/main/java/landvibe/springintro/viewController/HomeViewController.java new file mode 100644 index 0000000..fb96112 --- /dev/null +++ b/src/main/java/landvibe/springintro/viewController/HomeViewController.java @@ -0,0 +1,11 @@ +package landvibe.springintro.viewController; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +@Controller +public class HomeViewController { + @GetMapping("/") + public String home() { + return "home"; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index e7c1e8f..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=springintro diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..0a7b409 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,16 @@ +spring: + jpa: + show-sql: true + properties: + hibernate: + format_sql: true + + defer-datasource-initialization: true + + datasource: + url: jdbc:h2:mem:testdb + username: sa + + h2: + console: + enabled: true \ No newline at end of file diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql new file mode 100644 index 0000000..c987e48 --- /dev/null +++ b/src/main/resources/data.sql @@ -0,0 +1,9 @@ +drop table if exists item CASCADE; +create table item +( + id bigint generated by default as identity, + name varchar(255), + price integer not null, + count integer not null, + primary key (id) +); diff --git a/src/main/resources/static/css/jumbotron-narrow.css b/src/main/resources/static/css/jumbotron-narrow.css index 10f8741..a1c981e 100755 --- a/src/main/resources/static/css/jumbotron-narrow.css +++ b/src/main/resources/static/css/jumbotron-narrow.css @@ -76,4 +76,4 @@ body { .jumbotron { border-bottom: 0; } -} +} \ No newline at end of file diff --git a/src/main/resources/static/js/bootstrap.bundle.js b/src/main/resources/static/js/bootstrap.bundle.js index f4f23ea..c81e242 100755 --- a/src/main/resources/static/js/bootstrap.bundle.js +++ b/src/main/resources/static/js/bootstrap.bundle.js @@ -5,8 +5,8 @@ */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) : - typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) : - (global = global || self, factory(global.bootstrap = {}, global.jQuery)); + typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) : + (global = global || self, factory(global.bootstrap = {}, global.jQuery)); }(this, function (exports, $) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; @@ -255,116 +255,116 @@ }; var Alert = - /*#__PURE__*/ - function () { - function Alert(element) { - this._element = element; - } // Getters + /*#__PURE__*/ + function () { + function Alert(element) { + this._element = element; + } // Getters - var _proto = Alert.prototype; + var _proto = Alert.prototype; - // Public - _proto.close = function close(element) { - var rootElement = this._element; + // Public + _proto.close = function close(element) { + var rootElement = this._element; - if (element) { - rootElement = this._getRootElement(element); - } + if (element) { + rootElement = this._getRootElement(element); + } - var customEvent = this._triggerCloseEvent(rootElement); + var customEvent = this._triggerCloseEvent(rootElement); - if (customEvent.isDefaultPrevented()) { - return; - } + if (customEvent.isDefaultPrevented()) { + return; + } - this._removeElement(rootElement); - }; + this._removeElement(rootElement); + }; - _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY); - this._element = null; - } // Private - ; + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY); + this._element = null; + } // Private + ; - _proto._getRootElement = function _getRootElement(element) { - var selector = Util.getSelectorFromElement(element); - var parent = false; + _proto._getRootElement = function _getRootElement(element) { + var selector = Util.getSelectorFromElement(element); + var parent = false; - if (selector) { - parent = document.querySelector(selector); - } + if (selector) { + parent = document.querySelector(selector); + } - if (!parent) { - parent = $(element).closest("." + ClassName.ALERT)[0]; - } + if (!parent) { + parent = $(element).closest("." + ClassName.ALERT)[0]; + } - return parent; - }; + return parent; + }; - _proto._triggerCloseEvent = function _triggerCloseEvent(element) { - var closeEvent = $.Event(Event.CLOSE); - $(element).trigger(closeEvent); - return closeEvent; - }; + _proto._triggerCloseEvent = function _triggerCloseEvent(element) { + var closeEvent = $.Event(Event.CLOSE); + $(element).trigger(closeEvent); + return closeEvent; + }; - _proto._removeElement = function _removeElement(element) { - var _this = this; + _proto._removeElement = function _removeElement(element) { + var _this = this; - $(element).removeClass(ClassName.SHOW); + $(element).removeClass(ClassName.SHOW); - if (!$(element).hasClass(ClassName.FADE)) { - this._destroyElement(element); + if (!$(element).hasClass(ClassName.FADE)) { + this._destroyElement(element); - return; - } + return; + } - var transitionDuration = Util.getTransitionDurationFromElement(element); - $(element).one(Util.TRANSITION_END, function (event) { - return _this._destroyElement(element, event); - }).emulateTransitionEnd(transitionDuration); - }; + var transitionDuration = Util.getTransitionDurationFromElement(element); + $(element).one(Util.TRANSITION_END, function (event) { + return _this._destroyElement(element, event); + }).emulateTransitionEnd(transitionDuration); + }; - _proto._destroyElement = function _destroyElement(element) { - $(element).detach().trigger(Event.CLOSED).remove(); - } // Static - ; + _proto._destroyElement = function _destroyElement(element) { + $(element).detach().trigger(Event.CLOSED).remove(); + } // Static + ; - Alert._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var $element = $(this); - var data = $element.data(DATA_KEY); + Alert._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var $element = $(this); + var data = $element.data(DATA_KEY); - if (!data) { - data = new Alert(this); - $element.data(DATA_KEY, data); - } + if (!data) { + data = new Alert(this); + $element.data(DATA_KEY, data); + } - if (config === 'close') { - data[config](this); - } - }); - }; + if (config === 'close') { + data[config](this); + } + }); + }; - Alert._handleDismiss = function _handleDismiss(alertInstance) { - return function (event) { - if (event) { - event.preventDefault(); - } + Alert._handleDismiss = function _handleDismiss(alertInstance) { + return function (event) { + if (event) { + event.preventDefault(); + } - alertInstance.close(this); - }; - }; + alertInstance.close(this); + }; + }; - _createClass(Alert, null, [{ - key: "VERSION", - get: function get() { - return VERSION; - } - }]); + _createClass(Alert, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }]); - return Alert; - }(); + return Alert; + }(); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -423,90 +423,90 @@ }; var Button = - /*#__PURE__*/ - function () { - function Button(element) { - this._element = element; - } // Getters - - - var _proto = Button.prototype; - - // Public - _proto.toggle = function toggle() { - var triggerChangeEvent = true; - var addAriaPressed = true; - var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0]; - - if (rootElement) { - var input = this._element.querySelector(Selector$1.INPUT); + /*#__PURE__*/ + function () { + function Button(element) { + this._element = element; + } // Getters + + + var _proto = Button.prototype; + + // Public + _proto.toggle = function toggle() { + var triggerChangeEvent = true; + var addAriaPressed = true; + var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0]; + + if (rootElement) { + var input = this._element.querySelector(Selector$1.INPUT); + + if (input) { + if (input.type === 'radio') { + if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) { + triggerChangeEvent = false; + } else { + var activeElement = rootElement.querySelector(Selector$1.ACTIVE); + + if (activeElement) { + $(activeElement).removeClass(ClassName$1.ACTIVE); + } + } + } - if (input) { - if (input.type === 'radio') { - if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) { - triggerChangeEvent = false; - } else { - var activeElement = rootElement.querySelector(Selector$1.ACTIVE); + if (triggerChangeEvent) { + if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { + return; + } - if (activeElement) { - $(activeElement).removeClass(ClassName$1.ACTIVE); + input.checked = !this._element.classList.contains(ClassName$1.ACTIVE); + $(input).trigger('change'); } - } - } - if (triggerChangeEvent) { - if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { - return; + input.focus(); + addAriaPressed = false; } - - input.checked = !this._element.classList.contains(ClassName$1.ACTIVE); - $(input).trigger('change'); } - input.focus(); - addAriaPressed = false; - } - } - - if (addAriaPressed) { - this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE)); - } + if (addAriaPressed) { + this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE)); + } - if (triggerChangeEvent) { - $(this._element).toggleClass(ClassName$1.ACTIVE); - } - }; + if (triggerChangeEvent) { + $(this._element).toggleClass(ClassName$1.ACTIVE); + } + }; - _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY$1); - this._element = null; - } // Static - ; + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY$1); + this._element = null; + } // Static + ; - Button._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$1); + Button._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$1); - if (!data) { - data = new Button(this); - $(this).data(DATA_KEY$1, data); - } + if (!data) { + data = new Button(this); + $(this).data(DATA_KEY$1, data); + } - if (config === 'toggle') { - data[config](); - } - }); - }; + if (config === 'toggle') { + data[config](); + } + }); + }; - _createClass(Button, null, [{ - key: "VERSION", - get: function get() { - return VERSION$1; - } - }]); + _createClass(Button, null, [{ + key: "VERSION", + get: function get() { + return VERSION$1; + } + }]); - return Button; - }(); + return Button; + }(); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -630,486 +630,486 @@ }; var Carousel = - /*#__PURE__*/ - function () { - function Carousel(element, config) { - this._items = null; - this._interval = null; - this._activeElement = null; - this._isPaused = false; - this._isSliding = false; - this.touchTimeout = null; - this.touchStartX = 0; - this.touchDeltaX = 0; - this._config = this._getConfig(config); - this._element = element; - this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS); - this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; - this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent); - - this._addEventListeners(); - } // Getters - - - var _proto = Carousel.prototype; - - // Public - _proto.next = function next() { - if (!this._isSliding) { - this._slide(Direction.NEXT); - } - }; + /*#__PURE__*/ + function () { + function Carousel(element, config) { + this._items = null; + this._interval = null; + this._activeElement = null; + this._isPaused = false; + this._isSliding = false; + this.touchTimeout = null; + this.touchStartX = 0; + this.touchDeltaX = 0; + this._config = this._getConfig(config); + this._element = element; + this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS); + this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; + this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent); + + this._addEventListeners(); + } // Getters + + + var _proto = Carousel.prototype; + + // Public + _proto.next = function next() { + if (!this._isSliding) { + this._slide(Direction.NEXT); + } + }; - _proto.nextWhenVisible = function nextWhenVisible() { - // Don't call next when the page isn't visible - // or the carousel or its parent isn't visible - if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') { - this.next(); - } - }; + _proto.nextWhenVisible = function nextWhenVisible() { + // Don't call next when the page isn't visible + // or the carousel or its parent isn't visible + if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') { + this.next(); + } + }; - _proto.prev = function prev() { - if (!this._isSliding) { - this._slide(Direction.PREV); - } - }; + _proto.prev = function prev() { + if (!this._isSliding) { + this._slide(Direction.PREV); + } + }; - _proto.pause = function pause(event) { - if (!event) { - this._isPaused = true; - } + _proto.pause = function pause(event) { + if (!event) { + this._isPaused = true; + } - if (this._element.querySelector(Selector$2.NEXT_PREV)) { - Util.triggerTransitionEnd(this._element); - this.cycle(true); - } + if (this._element.querySelector(Selector$2.NEXT_PREV)) { + Util.triggerTransitionEnd(this._element); + this.cycle(true); + } - clearInterval(this._interval); - this._interval = null; - }; + clearInterval(this._interval); + this._interval = null; + }; - _proto.cycle = function cycle(event) { - if (!event) { - this._isPaused = false; - } + _proto.cycle = function cycle(event) { + if (!event) { + this._isPaused = false; + } - if (this._interval) { - clearInterval(this._interval); - this._interval = null; - } + if (this._interval) { + clearInterval(this._interval); + this._interval = null; + } - if (this._config.interval && !this._isPaused) { - this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); - } - }; + if (this._config.interval && !this._isPaused) { + this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); + } + }; - _proto.to = function to(index) { - var _this = this; + _proto.to = function to(index) { + var _this = this; - this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); + this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); - var activeIndex = this._getItemIndex(this._activeElement); + var activeIndex = this._getItemIndex(this._activeElement); - if (index > this._items.length - 1 || index < 0) { - return; - } + if (index > this._items.length - 1 || index < 0) { + return; + } - if (this._isSliding) { - $(this._element).one(Event$2.SLID, function () { - return _this.to(index); - }); - return; - } + if (this._isSliding) { + $(this._element).one(Event$2.SLID, function () { + return _this.to(index); + }); + return; + } - if (activeIndex === index) { - this.pause(); - this.cycle(); - return; - } + if (activeIndex === index) { + this.pause(); + this.cycle(); + return; + } - var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; + var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; - this._slide(direction, this._items[index]); - }; + this._slide(direction, this._items[index]); + }; - _proto.dispose = function dispose() { - $(this._element).off(EVENT_KEY$2); - $.removeData(this._element, DATA_KEY$2); - this._items = null; - this._config = null; - this._element = null; - this._interval = null; - this._isPaused = null; - this._isSliding = null; - this._activeElement = null; - this._indicatorsElement = null; - } // Private - ; - - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default, config); - Util.typeCheckConfig(NAME$2, config, DefaultType); - return config; - }; + _proto.dispose = function dispose() { + $(this._element).off(EVENT_KEY$2); + $.removeData(this._element, DATA_KEY$2); + this._items = null; + this._config = null; + this._element = null; + this._interval = null; + this._isPaused = null; + this._isSliding = null; + this._activeElement = null; + this._indicatorsElement = null; + } // Private + ; + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default, config); + Util.typeCheckConfig(NAME$2, config, DefaultType); + return config; + }; - _proto._handleSwipe = function _handleSwipe() { - var absDeltax = Math.abs(this.touchDeltaX); + _proto._handleSwipe = function _handleSwipe() { + var absDeltax = Math.abs(this.touchDeltaX); - if (absDeltax <= SWIPE_THRESHOLD) { - return; - } + if (absDeltax <= SWIPE_THRESHOLD) { + return; + } - var direction = absDeltax / this.touchDeltaX; // swipe left + var direction = absDeltax / this.touchDeltaX; // swipe left - if (direction > 0) { - this.prev(); - } // swipe right + if (direction > 0) { + this.prev(); + } // swipe right - if (direction < 0) { - this.next(); - } - }; + if (direction < 0) { + this.next(); + } + }; - _proto._addEventListeners = function _addEventListeners() { - var _this2 = this; + _proto._addEventListeners = function _addEventListeners() { + var _this2 = this; - if (this._config.keyboard) { - $(this._element).on(Event$2.KEYDOWN, function (event) { - return _this2._keydown(event); - }); - } + if (this._config.keyboard) { + $(this._element).on(Event$2.KEYDOWN, function (event) { + return _this2._keydown(event); + }); + } - if (this._config.pause === 'hover') { - $(this._element).on(Event$2.MOUSEENTER, function (event) { - return _this2.pause(event); - }).on(Event$2.MOUSELEAVE, function (event) { - return _this2.cycle(event); - }); - } + if (this._config.pause === 'hover') { + $(this._element).on(Event$2.MOUSEENTER, function (event) { + return _this2.pause(event); + }).on(Event$2.MOUSELEAVE, function (event) { + return _this2.cycle(event); + }); + } - if (this._config.touch) { - this._addTouchEventListeners(); - } - }; + if (this._config.touch) { + this._addTouchEventListeners(); + } + }; - _proto._addTouchEventListeners = function _addTouchEventListeners() { - var _this3 = this; + _proto._addTouchEventListeners = function _addTouchEventListeners() { + var _this3 = this; - if (!this._touchSupported) { - return; - } + if (!this._touchSupported) { + return; + } - var start = function start(event) { - if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { - _this3.touchStartX = event.originalEvent.clientX; - } else if (!_this3._pointerEvent) { - _this3.touchStartX = event.originalEvent.touches[0].clientX; - } - }; + var start = function start(event) { + if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { + _this3.touchStartX = event.originalEvent.clientX; + } else if (!_this3._pointerEvent) { + _this3.touchStartX = event.originalEvent.touches[0].clientX; + } + }; - var move = function move(event) { - // ensure swiping with one touch and not pinching - if (event.originalEvent.touches && event.originalEvent.touches.length > 1) { - _this3.touchDeltaX = 0; - } else { - _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX; - } - }; + var move = function move(event) { + // ensure swiping with one touch and not pinching + if (event.originalEvent.touches && event.originalEvent.touches.length > 1) { + _this3.touchDeltaX = 0; + } else { + _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX; + } + }; - var end = function end(event) { - if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { - _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX; - } + var end = function end(event) { + if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { + _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX; + } - _this3._handleSwipe(); + _this3._handleSwipe(); - if (_this3._config.pause === 'hover') { - // 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 - _this3.pause(); + if (_this3._config.pause === 'hover') { + // 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 + _this3.pause(); - if (_this3.touchTimeout) { - clearTimeout(_this3.touchTimeout); - } + if (_this3.touchTimeout) { + clearTimeout(_this3.touchTimeout); + } - _this3.touchTimeout = setTimeout(function (event) { - return _this3.cycle(event); - }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval); - } - }; + _this3.touchTimeout = setTimeout(function (event) { + return _this3.cycle(event); + }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval); + } + }; - $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) { - return e.preventDefault(); - }); + $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) { + return e.preventDefault(); + }); - if (this._pointerEvent) { - $(this._element).on(Event$2.POINTERDOWN, function (event) { - return start(event); - }); - $(this._element).on(Event$2.POINTERUP, function (event) { - return end(event); - }); + if (this._pointerEvent) { + $(this._element).on(Event$2.POINTERDOWN, function (event) { + return start(event); + }); + $(this._element).on(Event$2.POINTERUP, function (event) { + return end(event); + }); - this._element.classList.add(ClassName$2.POINTER_EVENT); - } else { - $(this._element).on(Event$2.TOUCHSTART, function (event) { - return start(event); - }); - $(this._element).on(Event$2.TOUCHMOVE, function (event) { - return move(event); - }); - $(this._element).on(Event$2.TOUCHEND, function (event) { - return end(event); - }); - } - }; + this._element.classList.add(ClassName$2.POINTER_EVENT); + } else { + $(this._element).on(Event$2.TOUCHSTART, function (event) { + return start(event); + }); + $(this._element).on(Event$2.TOUCHMOVE, function (event) { + return move(event); + }); + $(this._element).on(Event$2.TOUCHEND, function (event) { + return end(event); + }); + } + }; - _proto._keydown = function _keydown(event) { - if (/input|textarea/i.test(event.target.tagName)) { - return; - } + _proto._keydown = function _keydown(event) { + if (/input|textarea/i.test(event.target.tagName)) { + return; + } - switch (event.which) { - case ARROW_LEFT_KEYCODE: - event.preventDefault(); - this.prev(); - break; + switch (event.which) { + case ARROW_LEFT_KEYCODE: + event.preventDefault(); + this.prev(); + break; - case ARROW_RIGHT_KEYCODE: - event.preventDefault(); - this.next(); - break; + case ARROW_RIGHT_KEYCODE: + event.preventDefault(); + this.next(); + break; - default: - } - }; + default: + } + }; - _proto._getItemIndex = function _getItemIndex(element) { - this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : []; - return this._items.indexOf(element); - }; + _proto._getItemIndex = function _getItemIndex(element) { + this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : []; + return this._items.indexOf(element); + }; - _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { - var isNextDirection = direction === Direction.NEXT; - var isPrevDirection = direction === Direction.PREV; + _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { + var isNextDirection = direction === Direction.NEXT; + var isPrevDirection = direction === Direction.PREV; - var activeIndex = this._getItemIndex(activeElement); + var activeIndex = this._getItemIndex(activeElement); - var lastItemIndex = this._items.length - 1; - var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; + var lastItemIndex = this._items.length - 1; + var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; - if (isGoingToWrap && !this._config.wrap) { - return activeElement; - } + if (isGoingToWrap && !this._config.wrap) { + return activeElement; + } - var delta = direction === Direction.PREV ? -1 : 1; - var itemIndex = (activeIndex + delta) % this._items.length; - return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; - }; + var delta = direction === Direction.PREV ? -1 : 1; + var itemIndex = (activeIndex + delta) % this._items.length; + return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; + }; - _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { - var targetIndex = this._getItemIndex(relatedTarget); + _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { + var targetIndex = this._getItemIndex(relatedTarget); - var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM)); + var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM)); - var slideEvent = $.Event(Event$2.SLIDE, { - relatedTarget: relatedTarget, - direction: eventDirectionName, - from: fromIndex, - to: targetIndex - }); - $(this._element).trigger(slideEvent); - return slideEvent; - }; + var slideEvent = $.Event(Event$2.SLIDE, { + relatedTarget: relatedTarget, + direction: eventDirectionName, + from: fromIndex, + to: targetIndex + }); + $(this._element).trigger(slideEvent); + return slideEvent; + }; - _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { - if (this._indicatorsElement) { - var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE)); - $(indicators).removeClass(ClassName$2.ACTIVE); + _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { + if (this._indicatorsElement) { + var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE)); + $(indicators).removeClass(ClassName$2.ACTIVE); - var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; + var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; - if (nextIndicator) { - $(nextIndicator).addClass(ClassName$2.ACTIVE); - } - } - }; + if (nextIndicator) { + $(nextIndicator).addClass(ClassName$2.ACTIVE); + } + } + }; - _proto._slide = function _slide(direction, element) { - var _this4 = this; + _proto._slide = function _slide(direction, element) { + var _this4 = this; - var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); + var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); - var activeElementIndex = this._getItemIndex(activeElement); + var activeElementIndex = this._getItemIndex(activeElement); - var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); + var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); - var nextElementIndex = this._getItemIndex(nextElement); + var nextElementIndex = this._getItemIndex(nextElement); - var isCycling = Boolean(this._interval); - var directionalClassName; - var orderClassName; - var eventDirectionName; + var isCycling = Boolean(this._interval); + var directionalClassName; + var orderClassName; + var eventDirectionName; - if (direction === Direction.NEXT) { - directionalClassName = ClassName$2.LEFT; - orderClassName = ClassName$2.NEXT; - eventDirectionName = Direction.LEFT; - } else { - directionalClassName = ClassName$2.RIGHT; - orderClassName = ClassName$2.PREV; - eventDirectionName = Direction.RIGHT; - } + if (direction === Direction.NEXT) { + directionalClassName = ClassName$2.LEFT; + orderClassName = ClassName$2.NEXT; + eventDirectionName = Direction.LEFT; + } else { + directionalClassName = ClassName$2.RIGHT; + orderClassName = ClassName$2.PREV; + eventDirectionName = Direction.RIGHT; + } - if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) { - this._isSliding = false; - return; - } + if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) { + this._isSliding = false; + return; + } - var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); + var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); - if (slideEvent.isDefaultPrevented()) { - return; - } + if (slideEvent.isDefaultPrevented()) { + return; + } - if (!activeElement || !nextElement) { - // Some weirdness is happening, so we bail - return; - } + if (!activeElement || !nextElement) { + // Some weirdness is happening, so we bail + return; + } - this._isSliding = true; + this._isSliding = true; - if (isCycling) { - this.pause(); - } + if (isCycling) { + this.pause(); + } - this._setActiveIndicatorElement(nextElement); + this._setActiveIndicatorElement(nextElement); - var slidEvent = $.Event(Event$2.SLID, { - relatedTarget: nextElement, - direction: eventDirectionName, - from: activeElementIndex, - to: nextElementIndex - }); + var slidEvent = $.Event(Event$2.SLID, { + relatedTarget: nextElement, + direction: eventDirectionName, + from: activeElementIndex, + to: nextElementIndex + }); - if ($(this._element).hasClass(ClassName$2.SLIDE)) { - $(nextElement).addClass(orderClassName); - Util.reflow(nextElement); - $(activeElement).addClass(directionalClassName); - $(nextElement).addClass(directionalClassName); - var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10); - - if (nextElementInterval) { - this._config.defaultInterval = this._config.defaultInterval || this._config.interval; - this._config.interval = nextElementInterval; - } else { - this._config.interval = this._config.defaultInterval || this._config.interval; - } + if ($(this._element).hasClass(ClassName$2.SLIDE)) { + $(nextElement).addClass(orderClassName); + Util.reflow(nextElement); + $(activeElement).addClass(directionalClassName); + $(nextElement).addClass(directionalClassName); + var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10); - var transitionDuration = Util.getTransitionDurationFromElement(activeElement); - $(activeElement).one(Util.TRANSITION_END, function () { - $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE); - $(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName); - _this4._isSliding = false; - setTimeout(function () { - return $(_this4._element).trigger(slidEvent); - }, 0); - }).emulateTransitionEnd(transitionDuration); - } else { - $(activeElement).removeClass(ClassName$2.ACTIVE); - $(nextElement).addClass(ClassName$2.ACTIVE); - this._isSliding = false; - $(this._element).trigger(slidEvent); - } + if (nextElementInterval) { + this._config.defaultInterval = this._config.defaultInterval || this._config.interval; + this._config.interval = nextElementInterval; + } else { + this._config.interval = this._config.defaultInterval || this._config.interval; + } - if (isCycling) { - this.cycle(); - } - } // Static - ; + var transitionDuration = Util.getTransitionDurationFromElement(activeElement); + $(activeElement).one(Util.TRANSITION_END, function () { + $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE); + $(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName); + _this4._isSliding = false; + setTimeout(function () { + return $(_this4._element).trigger(slidEvent); + }, 0); + }).emulateTransitionEnd(transitionDuration); + } else { + $(activeElement).removeClass(ClassName$2.ACTIVE); + $(nextElement).addClass(ClassName$2.ACTIVE); + this._isSliding = false; + $(this._element).trigger(slidEvent); + } - Carousel._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$2); + if (isCycling) { + this.cycle(); + } + } // Static + ; - var _config = _objectSpread({}, Default, $(this).data()); + Carousel._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$2); - if (typeof config === 'object') { - _config = _objectSpread({}, _config, config); - } + var _config = _objectSpread({}, Default, $(this).data()); - var action = typeof config === 'string' ? config : _config.slide; + if (typeof config === 'object') { + _config = _objectSpread({}, _config, config); + } - if (!data) { - data = new Carousel(this, _config); - $(this).data(DATA_KEY$2, data); - } + var action = typeof config === 'string' ? config : _config.slide; - if (typeof config === 'number') { - data.to(config); - } else if (typeof action === 'string') { - if (typeof data[action] === 'undefined') { - throw new TypeError("No method named \"" + action + "\""); - } + if (!data) { + data = new Carousel(this, _config); + $(this).data(DATA_KEY$2, data); + } - data[action](); - } else if (_config.interval && _config.ride) { - data.pause(); - data.cycle(); - } - }); - }; + if (typeof config === 'number') { + data.to(config); + } else if (typeof action === 'string') { + if (typeof data[action] === 'undefined') { + throw new TypeError("No method named \"" + action + "\""); + } + + data[action](); + } else if (_config.interval && _config.ride) { + data.pause(); + data.cycle(); + } + }); + }; - Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { - var selector = Util.getSelectorFromElement(this); + Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { + var selector = Util.getSelectorFromElement(this); - if (!selector) { - return; - } + if (!selector) { + return; + } - var target = $(selector)[0]; + var target = $(selector)[0]; - if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) { - return; - } + if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) { + return; + } - var config = _objectSpread({}, $(target).data(), $(this).data()); + var config = _objectSpread({}, $(target).data(), $(this).data()); - var slideIndex = this.getAttribute('data-slide-to'); + var slideIndex = this.getAttribute('data-slide-to'); - if (slideIndex) { - config.interval = false; - } + if (slideIndex) { + config.interval = false; + } - Carousel._jQueryInterface.call($(target), config); + Carousel._jQueryInterface.call($(target), config); - if (slideIndex) { - $(target).data(DATA_KEY$2).to(slideIndex); - } + if (slideIndex) { + $(target).data(DATA_KEY$2).to(slideIndex); + } - event.preventDefault(); - }; + event.preventDefault(); + }; - _createClass(Carousel, null, [{ - key: "VERSION", - get: function get() { - return VERSION$2; - } - }, { - key: "Default", - get: function get() { - return Default; - } - }]); + _createClass(Carousel, null, [{ + key: "VERSION", + get: function get() { + return VERSION$2; + } + }, { + key: "Default", + get: function get() { + return Default; + } + }]); - return Carousel; - }(); + return Carousel; + }(); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -1190,279 +1190,279 @@ }; var Collapse = - /*#__PURE__*/ - function () { - function Collapse(element, config) { - this._isTransitioning = false; - this._element = element; - this._config = this._getConfig(config); - this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); - var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE)); - - for (var i = 0, len = toggleList.length; i < len; i++) { - var elem = toggleList[i]; - var selector = Util.getSelectorFromElement(elem); - var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) { - return foundElem === element; - }); - - if (selector !== null && filterElement.length > 0) { - this._selector = selector; - - this._triggerArray.push(elem); - } - } + /*#__PURE__*/ + function () { + function Collapse(element, config) { + this._isTransitioning = false; + this._element = element; + this._config = this._getConfig(config); + this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); + var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE)); + + for (var i = 0, len = toggleList.length; i < len; i++) { + var elem = toggleList[i]; + var selector = Util.getSelectorFromElement(elem); + var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) { + return foundElem === element; + }); + + if (selector !== null && filterElement.length > 0) { + this._selector = selector; + + this._triggerArray.push(elem); + } + } - this._parent = this._config.parent ? this._getParent() : null; + this._parent = this._config.parent ? this._getParent() : null; - if (!this._config.parent) { - this._addAriaAndCollapsedClass(this._element, this._triggerArray); - } + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._element, this._triggerArray); + } - if (this._config.toggle) { - this.toggle(); - } - } // Getters + if (this._config.toggle) { + this.toggle(); + } + } // Getters - var _proto = Collapse.prototype; + var _proto = Collapse.prototype; - // Public - _proto.toggle = function toggle() { - if ($(this._element).hasClass(ClassName$3.SHOW)) { - this.hide(); - } else { - this.show(); - } - }; + // Public + _proto.toggle = function toggle() { + if ($(this._element).hasClass(ClassName$3.SHOW)) { + this.hide(); + } else { + this.show(); + } + }; - _proto.show = function show() { - var _this = this; + _proto.show = function show() { + var _this = this; - if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) { - return; - } + if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) { + return; + } - var actives; - var activesData; + var actives; + var activesData; - if (this._parent) { - actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) { - if (typeof _this._config.parent === 'string') { - return elem.getAttribute('data-parent') === _this._config.parent; - } + if (this._parent) { + actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) { + if (typeof _this._config.parent === 'string') { + return elem.getAttribute('data-parent') === _this._config.parent; + } - return elem.classList.contains(ClassName$3.COLLAPSE); - }); + return elem.classList.contains(ClassName$3.COLLAPSE); + }); - if (actives.length === 0) { - actives = null; - } - } + if (actives.length === 0) { + actives = null; + } + } - if (actives) { - activesData = $(actives).not(this._selector).data(DATA_KEY$3); + if (actives) { + activesData = $(actives).not(this._selector).data(DATA_KEY$3); - if (activesData && activesData._isTransitioning) { - return; - } - } + if (activesData && activesData._isTransitioning) { + return; + } + } - var startEvent = $.Event(Event$3.SHOW); - $(this._element).trigger(startEvent); + var startEvent = $.Event(Event$3.SHOW); + $(this._element).trigger(startEvent); - if (startEvent.isDefaultPrevented()) { - return; - } + if (startEvent.isDefaultPrevented()) { + return; + } - if (actives) { - Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide'); + if (actives) { + Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide'); - if (!activesData) { - $(actives).data(DATA_KEY$3, null); - } - } + if (!activesData) { + $(actives).data(DATA_KEY$3, null); + } + } - var dimension = this._getDimension(); + var dimension = this._getDimension(); - $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING); - this._element.style[dimension] = 0; + $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING); + this._element.style[dimension] = 0; - if (this._triggerArray.length) { - $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true); - } + if (this._triggerArray.length) { + $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true); + } - this.setTransitioning(true); + this.setTransitioning(true); - var complete = function complete() { - $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW); - _this._element.style[dimension] = ''; + var complete = function complete() { + $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW); + _this._element.style[dimension] = ''; - _this.setTransitioning(false); + _this.setTransitioning(false); - $(_this._element).trigger(Event$3.SHOWN); - }; + $(_this._element).trigger(Event$3.SHOWN); + }; - var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); - var scrollSize = "scroll" + capitalizedDimension; - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - this._element.style[dimension] = this._element[scrollSize] + "px"; - }; + var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); + var scrollSize = "scroll" + capitalizedDimension; + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + this._element.style[dimension] = this._element[scrollSize] + "px"; + }; - _proto.hide = function hide() { - var _this2 = this; + _proto.hide = function hide() { + var _this2 = this; - if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) { - return; - } + if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) { + return; + } - var startEvent = $.Event(Event$3.HIDE); - $(this._element).trigger(startEvent); + var startEvent = $.Event(Event$3.HIDE); + $(this._element).trigger(startEvent); - if (startEvent.isDefaultPrevented()) { - return; - } + if (startEvent.isDefaultPrevented()) { + return; + } - var dimension = this._getDimension(); + var dimension = this._getDimension(); - this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; - Util.reflow(this._element); - $(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW); - var triggerArrayLength = this._triggerArray.length; + this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; + Util.reflow(this._element); + $(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW); + var triggerArrayLength = this._triggerArray.length; - if (triggerArrayLength > 0) { - for (var i = 0; i < triggerArrayLength; i++) { - var trigger = this._triggerArray[i]; - var selector = Util.getSelectorFromElement(trigger); + if (triggerArrayLength > 0) { + for (var i = 0; i < triggerArrayLength; i++) { + var trigger = this._triggerArray[i]; + var selector = Util.getSelectorFromElement(trigger); - if (selector !== null) { - var $elem = $([].slice.call(document.querySelectorAll(selector))); + if (selector !== null) { + var $elem = $([].slice.call(document.querySelectorAll(selector))); - if (!$elem.hasClass(ClassName$3.SHOW)) { - $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false); + if (!$elem.hasClass(ClassName$3.SHOW)) { + $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false); + } + } } } - } - } - this.setTransitioning(true); + this.setTransitioning(true); - var complete = function complete() { - _this2.setTransitioning(false); + var complete = function complete() { + _this2.setTransitioning(false); - $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN); - }; + $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN); + }; - this._element.style[dimension] = ''; - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - }; + this._element.style[dimension] = ''; + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + }; - _proto.setTransitioning = function setTransitioning(isTransitioning) { - this._isTransitioning = isTransitioning; - }; + _proto.setTransitioning = function setTransitioning(isTransitioning) { + this._isTransitioning = isTransitioning; + }; - _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY$3); - this._config = null; - this._parent = null; - this._element = null; - this._triggerArray = null; - this._isTransitioning = null; - } // Private - ; - - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default$1, config); - config.toggle = Boolean(config.toggle); // Coerce string values - - Util.typeCheckConfig(NAME$3, config, DefaultType$1); - return config; - }; + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY$3); + this._config = null; + this._parent = null; + this._element = null; + this._triggerArray = null; + this._isTransitioning = null; + } // Private + ; + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default$1, config); + config.toggle = Boolean(config.toggle); // Coerce string values + + Util.typeCheckConfig(NAME$3, config, DefaultType$1); + return config; + }; - _proto._getDimension = function _getDimension() { - var hasWidth = $(this._element).hasClass(Dimension.WIDTH); - return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; - }; + _proto._getDimension = function _getDimension() { + var hasWidth = $(this._element).hasClass(Dimension.WIDTH); + return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; + }; - _proto._getParent = function _getParent() { - var _this3 = this; + _proto._getParent = function _getParent() { + var _this3 = this; - var parent; + var parent; - if (Util.isElement(this._config.parent)) { - parent = this._config.parent; // It's a jQuery object + if (Util.isElement(this._config.parent)) { + parent = this._config.parent; // It's a jQuery object - if (typeof this._config.parent.jquery !== 'undefined') { - parent = this._config.parent[0]; - } - } else { - parent = document.querySelector(this._config.parent); - } + if (typeof this._config.parent.jquery !== 'undefined') { + parent = this._config.parent[0]; + } + } else { + parent = document.querySelector(this._config.parent); + } - var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; - var children = [].slice.call(parent.querySelectorAll(selector)); - $(children).each(function (i, element) { - _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); - }); - return parent; - }; + var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; + var children = [].slice.call(parent.querySelectorAll(selector)); + $(children).each(function (i, element) { + _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); + }); + return parent; + }; - _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { - var isOpen = $(element).hasClass(ClassName$3.SHOW); + _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { + var isOpen = $(element).hasClass(ClassName$3.SHOW); - if (triggerArray.length) { - $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); - } - } // Static - ; + if (triggerArray.length) { + $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); + } + } // Static + ; - Collapse._getTargetFromElement = function _getTargetFromElement(element) { - var selector = Util.getSelectorFromElement(element); - return selector ? document.querySelector(selector) : null; - }; + Collapse._getTargetFromElement = function _getTargetFromElement(element) { + var selector = Util.getSelectorFromElement(element); + return selector ? document.querySelector(selector) : null; + }; - Collapse._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var $this = $(this); - var data = $this.data(DATA_KEY$3); + Collapse._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY$3); - var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {}); + var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {}); - if (!data && _config.toggle && /show|hide/.test(config)) { - _config.toggle = false; - } + if (!data && _config.toggle && /show|hide/.test(config)) { + _config.toggle = false; + } - if (!data) { - data = new Collapse(this, _config); - $this.data(DATA_KEY$3, data); - } + if (!data) { + data = new Collapse(this, _config); + $this.data(DATA_KEY$3, data); + } - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } - data[config](); - } - }); - }; + data[config](); + } + }); + }; - _createClass(Collapse, null, [{ - key: "VERSION", - get: function get() { - return VERSION$3; - } - }, { - key: "Default", - get: function get() { - return Default$1; - } - }]); + _createClass(Collapse, null, [{ + key: "VERSION", + get: function get() { + return VERSION$3; + } + }, { + key: "Default", + get: function get() { + return Default$1; + } + }]); - return Collapse; - }(); + return Collapse; + }(); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -1566,14 +1566,14 @@ var supportsMicroTasks = isBrowser && window.Promise; /** - * Create a debounced version of a method, that's asynchronously deferred - * but called in the minimum time possible. - * - * @method - * @memberof Popper.Utils - * @argument {Function} fn - * @returns {Function} - */ + * Create a debounced version of a method, that's asynchronously deferred + * but called in the minimum time possible. + * + * @method + * @memberof Popper.Utils + * @argument {Function} fn + * @returns {Function} + */ var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; /** @@ -3261,25 +3261,25 @@ var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; var mergeWithPrevious = false; return op - // This aggregates any `+` or `-` sign that aren't considered operators - // e.g.: 10 + +5 => [10, +, +5] - .reduce(function (a, b) { - if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { - a[a.length - 1] = b; - mergeWithPrevious = true; - return a; - } else if (mergeWithPrevious) { - a[a.length - 1] += b; - mergeWithPrevious = false; - return a; - } else { - return a.concat(b); - } - }, []) - // Here we convert the string values into number values (in px) - .map(function (str) { - return toValue(str, measurement, popperOffsets, referenceOffsets); - }); + // This aggregates any `+` or `-` sign that aren't considered operators + // e.g.: 10 + +5 => [10, +, +5] + .reduce(function (a, b) { + if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { + a[a.length - 1] = b; + mergeWithPrevious = true; + return a; + } else if (mergeWithPrevious) { + a[a.length - 1] += b; + mergeWithPrevious = false; + return a; + } else { + return a.concat(b); + } + }, []) + // Here we convert the string values into number values (in px) + .map(function (str) { + return toValue(str, measurement, popperOffsets, referenceOffsets); + }); }); // Loop trough the offsets arrays and execute the operations @@ -3925,135 +3925,135 @@ * @param {dataObject} data */ - // Utils - // Methods + // Utils + // Methods var Popper = function () { - /** - * Creates a new Popper.js instance. - * @class Popper - * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper - * @param {HTMLElement} popper - The HTML element used as the popper - * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) - * @return {Object} instance - The generated Popper.js instance - */ - function Popper(reference, popper) { - var _this = this; - - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - classCallCheck(this, Popper); - - this.scheduleUpdate = function () { - return requestAnimationFrame(_this.update); - }; + /** + * Creates a new Popper.js instance. + * @class Popper + * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper + * @param {HTMLElement} popper - The HTML element used as the popper + * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) + * @return {Object} instance - The generated Popper.js instance + */ + function Popper(reference, popper) { + var _this = this; - // make update() debounced, so that it only runs at most once-per-tick - this.update = debounce(this.update.bind(this)); + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + classCallCheck(this, Popper); - // with {} we create a new object with the options inside it - this.options = _extends({}, Popper.Defaults, options); + this.scheduleUpdate = function () { + return requestAnimationFrame(_this.update); + }; - // init state - this.state = { - isDestroyed: false, - isCreated: false, - scrollParents: [] - }; + // make update() debounced, so that it only runs at most once-per-tick + this.update = debounce(this.update.bind(this)); - // get reference and popper elements (allow jQuery wrappers) - this.reference = reference && reference.jquery ? reference[0] : reference; - this.popper = popper && popper.jquery ? popper[0] : popper; + // with {} we create a new object with the options inside it + this.options = _extends({}, Popper.Defaults, options); - // Deep merge modifiers options - this.options.modifiers = {}; - Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { - _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); - }); + // init state + this.state = { + isDestroyed: false, + isCreated: false, + scrollParents: [] + }; - // Refactoring modifiers' list (Object => Array) - this.modifiers = Object.keys(this.options.modifiers).map(function (name) { - return _extends({ - name: name - }, _this.options.modifiers[name]); - }) - // sort the modifiers by order - .sort(function (a, b) { - return a.order - b.order; - }); + // get reference and popper elements (allow jQuery wrappers) + this.reference = reference && reference.jquery ? reference[0] : reference; + this.popper = popper && popper.jquery ? popper[0] : popper; - // modifiers have the ability to execute arbitrary code when Popper.js get inited - // such code is executed in the same order of its modifier - // they could add new properties to their options configuration - // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! - this.modifiers.forEach(function (modifierOptions) { - if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { - modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); - } - }); + // Deep merge modifiers options + this.options.modifiers = {}; + Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { + _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); + }); - // fire the first update to position the popper in the right place - this.update(); + // Refactoring modifiers' list (Object => Array) + this.modifiers = Object.keys(this.options.modifiers).map(function (name) { + return _extends({ + name: name + }, _this.options.modifiers[name]); + }) + // sort the modifiers by order + .sort(function (a, b) { + return a.order - b.order; + }); + + // modifiers have the ability to execute arbitrary code when Popper.js get inited + // such code is executed in the same order of its modifier + // they could add new properties to their options configuration + // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! + this.modifiers.forEach(function (modifierOptions) { + if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { + modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); + } + }); - var eventsEnabled = this.options.eventsEnabled; - if (eventsEnabled) { - // setup event listeners, they will take care of update the position in specific situations - this.enableEventListeners(); - } + // fire the first update to position the popper in the right place + this.update(); - this.state.eventsEnabled = eventsEnabled; - } + var eventsEnabled = this.options.eventsEnabled; + if (eventsEnabled) { + // setup event listeners, they will take care of update the position in specific situations + this.enableEventListeners(); + } - // We can't use class properties because they don't get listed in the - // class prototype and break stuff like Sinon stubs + this.state.eventsEnabled = eventsEnabled; + } + // We can't use class properties because they don't get listed in the + // class prototype and break stuff like Sinon stubs - createClass(Popper, [{ - key: 'update', - value: function update$$1() { - return update.call(this); - } - }, { - key: 'destroy', - value: function destroy$$1() { - return destroy.call(this); - } - }, { - key: 'enableEventListeners', - value: function enableEventListeners$$1() { - return enableEventListeners.call(this); - } - }, { - key: 'disableEventListeners', - value: function disableEventListeners$$1() { - return disableEventListeners.call(this); - } - /** - * Schedules an update. It will run on the next UI update available. - * @method scheduleUpdate - * @memberof Popper - */ - - - /** - * Collection of utilities useful when writing custom modifiers. - * Starting from version 1.7, this method is available only if you - * include `popper-utils.js` before `popper.js`. - * - * **DEPRECATION**: This way to access PopperUtils is deprecated - * and will be removed in v2! Use the PopperUtils module directly instead. - * Due to the high instability of the methods contained in Utils, we can't - * guarantee them to follow semver. Use them at your own risk! - * @static - * @private - * @type {Object} - * @deprecated since version 1.8 - * @member Utils - * @memberof Popper - */ + createClass(Popper, [{ + key: 'update', + value: function update$$1() { + return update.call(this); + } + }, { + key: 'destroy', + value: function destroy$$1() { + return destroy.call(this); + } + }, { + key: 'enableEventListeners', + value: function enableEventListeners$$1() { + return enableEventListeners.call(this); + } + }, { + key: 'disableEventListeners', + value: function disableEventListeners$$1() { + return disableEventListeners.call(this); + } - }]); - return Popper; - }(); + /** + * Schedules an update. It will run on the next UI update available. + * @method scheduleUpdate + * @memberof Popper + */ + + + /** + * Collection of utilities useful when writing custom modifiers. + * Starting from version 1.7, this method is available only if you + * include `popper-utils.js` before `popper.js`. + * + * **DEPRECATION**: This way to access PopperUtils is deprecated + * and will be removed in v2! Use the PopperUtils module directly instead. + * Due to the high instability of the methods contained in Utils, we can't + * guarantee them to follow semver. Use them at your own risk! + * @static + * @private + * @type {Object} + * @deprecated since version 1.8 + * @member Utils + * @memberof Popper + */ + + }]); + return Popper; + }(); /** * The `referenceObject` is an object that provides an interface compatible with Popper.js @@ -4164,419 +4164,419 @@ }; var Dropdown = - /*#__PURE__*/ - function () { - function Dropdown(element, config) { - this._element = element; - this._popper = null; - this._config = this._getConfig(config); - this._menu = this._getMenuElement(); - this._inNavbar = this._detectNavbar(); + /*#__PURE__*/ + function () { + function Dropdown(element, config) { + this._element = element; + this._popper = null; + this._config = this._getConfig(config); + this._menu = this._getMenuElement(); + this._inNavbar = this._detectNavbar(); - this._addEventListeners(); - } // Getters + this._addEventListeners(); + } // Getters - var _proto = Dropdown.prototype; + var _proto = Dropdown.prototype; - // Public - _proto.toggle = function toggle() { - if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) { - return; - } + // Public + _proto.toggle = function toggle() { + if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) { + return; + } - var parent = Dropdown._getParentFromElement(this._element); + var parent = Dropdown._getParentFromElement(this._element); - var isActive = $(this._menu).hasClass(ClassName$4.SHOW); + var isActive = $(this._menu).hasClass(ClassName$4.SHOW); - Dropdown._clearMenus(); + Dropdown._clearMenus(); - if (isActive) { - return; - } + if (isActive) { + return; + } - var relatedTarget = { - relatedTarget: this._element - }; - var showEvent = $.Event(Event$4.SHOW, relatedTarget); - $(parent).trigger(showEvent); + var relatedTarget = { + relatedTarget: this._element + }; + var showEvent = $.Event(Event$4.SHOW, relatedTarget); + $(parent).trigger(showEvent); - if (showEvent.isDefaultPrevented()) { - return; - } // Disable totally Popper.js for Dropdown in Navbar + if (showEvent.isDefaultPrevented()) { + return; + } // Disable totally Popper.js for Dropdown in Navbar - if (!this._inNavbar) { - /** - * Check for Popper dependency - * Popper - https://popper.js.org - */ - if (typeof Popper === 'undefined') { - throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)'); - } + if (!this._inNavbar) { + /** + * Check for Popper dependency + * Popper - https://popper.js.org + */ + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)'); + } - var referenceElement = this._element; + var referenceElement = this._element; - if (this._config.reference === 'parent') { - referenceElement = parent; - } else if (Util.isElement(this._config.reference)) { - referenceElement = this._config.reference; // Check if it's jQuery element + if (this._config.reference === 'parent') { + referenceElement = parent; + } else if (Util.isElement(this._config.reference)) { + referenceElement = this._config.reference; // Check if it's jQuery element - if (typeof this._config.reference.jquery !== 'undefined') { - referenceElement = this._config.reference[0]; - } - } // If boundary is not `scrollParent`, then set position to `static` - // to allow the menu to "escape" the scroll parent's boundaries - // https://github.com/twbs/bootstrap/issues/24251 + if (typeof this._config.reference.jquery !== 'undefined') { + referenceElement = this._config.reference[0]; + } + } // If boundary is not `scrollParent`, then set position to `static` + // to allow the menu to "escape" the scroll parent's boundaries + // https://github.com/twbs/bootstrap/issues/24251 - if (this._config.boundary !== 'scrollParent') { - $(parent).addClass(ClassName$4.POSITION_STATIC); - } + if (this._config.boundary !== 'scrollParent') { + $(parent).addClass(ClassName$4.POSITION_STATIC); + } - this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); - } // 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 + this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); + } // 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 && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) { - $(document.body).children().on('mouseover', null, $.noop); - } + if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) { + $(document.body).children().on('mouseover', null, $.noop); + } - this._element.focus(); + this._element.focus(); - this._element.setAttribute('aria-expanded', true); + this._element.setAttribute('aria-expanded', true); - $(this._menu).toggleClass(ClassName$4.SHOW); - $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); - }; + $(this._menu).toggleClass(ClassName$4.SHOW); + $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); + }; - _proto.show = function show() { - if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) { - return; - } + _proto.show = function show() { + if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) { + return; + } - var relatedTarget = { - relatedTarget: this._element - }; - var showEvent = $.Event(Event$4.SHOW, relatedTarget); + var relatedTarget = { + relatedTarget: this._element + }; + var showEvent = $.Event(Event$4.SHOW, relatedTarget); - var parent = Dropdown._getParentFromElement(this._element); + var parent = Dropdown._getParentFromElement(this._element); - $(parent).trigger(showEvent); + $(parent).trigger(showEvent); - if (showEvent.isDefaultPrevented()) { - return; - } + if (showEvent.isDefaultPrevented()) { + return; + } - $(this._menu).toggleClass(ClassName$4.SHOW); - $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); - }; + $(this._menu).toggleClass(ClassName$4.SHOW); + $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); + }; - _proto.hide = function hide() { - if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) { - return; - } + _proto.hide = function hide() { + if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) { + return; + } - var relatedTarget = { - relatedTarget: this._element - }; - var hideEvent = $.Event(Event$4.HIDE, relatedTarget); + var relatedTarget = { + relatedTarget: this._element + }; + var hideEvent = $.Event(Event$4.HIDE, relatedTarget); - var parent = Dropdown._getParentFromElement(this._element); + var parent = Dropdown._getParentFromElement(this._element); - $(parent).trigger(hideEvent); + $(parent).trigger(hideEvent); - if (hideEvent.isDefaultPrevented()) { - return; - } + if (hideEvent.isDefaultPrevented()) { + return; + } - $(this._menu).toggleClass(ClassName$4.SHOW); - $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); - }; + $(this._menu).toggleClass(ClassName$4.SHOW); + $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); + }; - _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY$4); - $(this._element).off(EVENT_KEY$4); - this._element = null; - this._menu = null; + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY$4); + $(this._element).off(EVENT_KEY$4); + this._element = null; + this._menu = null; - if (this._popper !== null) { - this._popper.destroy(); + if (this._popper !== null) { + this._popper.destroy(); - this._popper = null; - } - }; + this._popper = null; + } + }; - _proto.update = function update() { - this._inNavbar = this._detectNavbar(); + _proto.update = function update() { + this._inNavbar = this._detectNavbar(); - if (this._popper !== null) { - this._popper.scheduleUpdate(); - } - } // Private - ; + if (this._popper !== null) { + this._popper.scheduleUpdate(); + } + } // Private + ; - _proto._addEventListeners = function _addEventListeners() { - var _this = this; + _proto._addEventListeners = function _addEventListeners() { + var _this = this; - $(this._element).on(Event$4.CLICK, function (event) { - event.preventDefault(); - event.stopPropagation(); + $(this._element).on(Event$4.CLICK, function (event) { + event.preventDefault(); + event.stopPropagation(); - _this.toggle(); - }); - }; + _this.toggle(); + }); + }; - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config); - Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType); - return config; - }; + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config); + Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType); + return config; + }; - _proto._getMenuElement = function _getMenuElement() { - if (!this._menu) { - var parent = Dropdown._getParentFromElement(this._element); + _proto._getMenuElement = function _getMenuElement() { + if (!this._menu) { + var parent = Dropdown._getParentFromElement(this._element); - if (parent) { - this._menu = parent.querySelector(Selector$4.MENU); - } - } + if (parent) { + this._menu = parent.querySelector(Selector$4.MENU); + } + } - return this._menu; - }; + return this._menu; + }; - _proto._getPlacement = function _getPlacement() { - var $parentDropdown = $(this._element.parentNode); - var placement = AttachmentMap.BOTTOM; // Handle dropup + _proto._getPlacement = function _getPlacement() { + var $parentDropdown = $(this._element.parentNode); + var placement = AttachmentMap.BOTTOM; // Handle dropup - if ($parentDropdown.hasClass(ClassName$4.DROPUP)) { - placement = AttachmentMap.TOP; + if ($parentDropdown.hasClass(ClassName$4.DROPUP)) { + placement = AttachmentMap.TOP; - if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { - placement = AttachmentMap.TOPEND; - } - } else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) { - placement = AttachmentMap.RIGHT; - } else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) { - placement = AttachmentMap.LEFT; - } else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { - placement = AttachmentMap.BOTTOMEND; - } + if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { + placement = AttachmentMap.TOPEND; + } + } else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) { + placement = AttachmentMap.RIGHT; + } else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) { + placement = AttachmentMap.LEFT; + } else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { + placement = AttachmentMap.BOTTOMEND; + } - return placement; - }; + return placement; + }; - _proto._detectNavbar = function _detectNavbar() { - return $(this._element).closest('.navbar').length > 0; - }; + _proto._detectNavbar = function _detectNavbar() { + return $(this._element).closest('.navbar').length > 0; + }; + + _proto._getOffset = function _getOffset() { + var _this2 = this; - _proto._getOffset = function _getOffset() { - var _this2 = this; + var offset = {}; - var offset = {}; + if (typeof this._config.offset === 'function') { + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); + return data; + }; + } else { + offset.offset = this._config.offset; + } - if (typeof this._config.offset === 'function') { - offset.fn = function (data) { - data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); - return data; + return offset; }; - } else { - offset.offset = this._config.offset; - } - return offset; - }; + _proto._getPopperConfig = function _getPopperConfig() { + var popperConfig = { + placement: this._getPlacement(), + modifiers: { + offset: this._getOffset(), + flip: { + enabled: this._config.flip + }, + preventOverflow: { + boundariesElement: this._config.boundary + } + } // Disable Popper.js if we have a static display - _proto._getPopperConfig = function _getPopperConfig() { - var popperConfig = { - placement: this._getPlacement(), - modifiers: { - offset: this._getOffset(), - flip: { - enabled: this._config.flip - }, - preventOverflow: { - boundariesElement: this._config.boundary + }; + + if (this._config.display === 'static') { + popperConfig.modifiers.applyStyle = { + enabled: false + }; } - } // Disable Popper.js if we have a static display - }; + return popperConfig; + } // Static + ; - if (this._config.display === 'static') { - popperConfig.modifiers.applyStyle = { - enabled: false - }; - } + Dropdown._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$4); - return popperConfig; - } // Static - ; + var _config = typeof config === 'object' ? config : null; - Dropdown._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$4); + if (!data) { + data = new Dropdown(this, _config); + $(this).data(DATA_KEY$4, data); + } - var _config = typeof config === 'object' ? config : null; + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } - if (!data) { - data = new Dropdown(this, _config); - $(this).data(DATA_KEY$4, data); - } + data[config](); + } + }); + }; - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); + Dropdown._clearMenus = function _clearMenus(event) { + if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { + return; } - data[config](); - } - }); - }; - - Dropdown._clearMenus = function _clearMenus(event) { - if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { - return; - } - - var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE)); + var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE)); - for (var i = 0, len = toggles.length; i < len; i++) { - var parent = Dropdown._getParentFromElement(toggles[i]); + for (var i = 0, len = toggles.length; i < len; i++) { + var parent = Dropdown._getParentFromElement(toggles[i]); - var context = $(toggles[i]).data(DATA_KEY$4); - var relatedTarget = { - relatedTarget: toggles[i] - }; + var context = $(toggles[i]).data(DATA_KEY$4); + var relatedTarget = { + relatedTarget: toggles[i] + }; - if (event && event.type === 'click') { - relatedTarget.clickEvent = event; - } + if (event && event.type === 'click') { + relatedTarget.clickEvent = event; + } - if (!context) { - continue; - } + if (!context) { + continue; + } - var dropdownMenu = context._menu; + var dropdownMenu = context._menu; - if (!$(parent).hasClass(ClassName$4.SHOW)) { - continue; - } + if (!$(parent).hasClass(ClassName$4.SHOW)) { + continue; + } - if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) { - continue; - } + if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) { + continue; + } - var hideEvent = $.Event(Event$4.HIDE, relatedTarget); - $(parent).trigger(hideEvent); + var hideEvent = $.Event(Event$4.HIDE, relatedTarget); + $(parent).trigger(hideEvent); - if (hideEvent.isDefaultPrevented()) { - continue; - } // If this is a touch-enabled device we remove the extra - // empty mouseover listeners we added for iOS support + if (hideEvent.isDefaultPrevented()) { + continue; + } // If this is a touch-enabled device we remove the extra + // empty mouseover listeners we added for iOS support - if ('ontouchstart' in document.documentElement) { - $(document.body).children().off('mouseover', null, $.noop); - } + if ('ontouchstart' in document.documentElement) { + $(document.body).children().off('mouseover', null, $.noop); + } - toggles[i].setAttribute('aria-expanded', 'false'); - $(dropdownMenu).removeClass(ClassName$4.SHOW); - $(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); - } - }; + toggles[i].setAttribute('aria-expanded', 'false'); + $(dropdownMenu).removeClass(ClassName$4.SHOW); + $(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); + } + }; - Dropdown._getParentFromElement = function _getParentFromElement(element) { - var parent; - var selector = Util.getSelectorFromElement(element); + Dropdown._getParentFromElement = function _getParentFromElement(element) { + var parent; + var selector = Util.getSelectorFromElement(element); - if (selector) { - parent = document.querySelector(selector); - } + if (selector) { + parent = document.querySelector(selector); + } - return parent || element.parentNode; - } // eslint-disable-next-line complexity - ; - - Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { - // If not input/textarea: - // - And not a key in REGEXP_KEYDOWN => not a dropdown command - // If input/textarea: - // - If space key => not a dropdown command - // - If key is other than escape - // - If key is not up or down => not a dropdown command - // - If trigger inside the menu => not a dropdown command - if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { - return; - } + return parent || element.parentNode; + } // eslint-disable-next-line complexity + ; + + Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { + // If not input/textarea: + // - And not a key in REGEXP_KEYDOWN => not a dropdown command + // If input/textarea: + // - If space key => not a dropdown command + // - If key is other than escape + // - If key is not up or down => not a dropdown command + // - If trigger inside the menu => not a dropdown command + if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { + return; + } - event.preventDefault(); - event.stopPropagation(); + event.preventDefault(); + event.stopPropagation(); - if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) { - return; - } + if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) { + return; + } - var parent = Dropdown._getParentFromElement(this); + var parent = Dropdown._getParentFromElement(this); - var isActive = $(parent).hasClass(ClassName$4.SHOW); + var isActive = $(parent).hasClass(ClassName$4.SHOW); - if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { - if (event.which === ESCAPE_KEYCODE) { - var toggle = parent.querySelector(Selector$4.DATA_TOGGLE); - $(toggle).trigger('focus'); - } + if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { + if (event.which === ESCAPE_KEYCODE) { + var toggle = parent.querySelector(Selector$4.DATA_TOGGLE); + $(toggle).trigger('focus'); + } - $(this).trigger('click'); - return; - } + $(this).trigger('click'); + return; + } - var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS)); + var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS)); - if (items.length === 0) { - return; - } + if (items.length === 0) { + return; + } - var index = items.indexOf(event.target); + var index = items.indexOf(event.target); - if (event.which === ARROW_UP_KEYCODE && index > 0) { - // Up - index--; - } + if (event.which === ARROW_UP_KEYCODE && index > 0) { + // Up + index--; + } - if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { - // Down - index++; - } + if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { + // Down + index++; + } - if (index < 0) { - index = 0; - } + if (index < 0) { + index = 0; + } - items[index].focus(); - }; + items[index].focus(); + }; - _createClass(Dropdown, null, [{ - key: "VERSION", - get: function get() { - return VERSION$4; - } - }, { - key: "Default", - get: function get() { - return Default$2; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType$2; - } - }]); + _createClass(Dropdown, null, [{ + key: "VERSION", + get: function get() { + return VERSION$4; + } + }, { + key: "Default", + get: function get() { + return Default$2; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType$2; + } + }]); - return Dropdown; - }(); + return Dropdown; + }(); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -4669,473 +4669,473 @@ }; var Modal = - /*#__PURE__*/ - function () { - function Modal(element, config) { - this._config = this._getConfig(config); - this._element = element; - this._dialog = element.querySelector(Selector$5.DIALOG); - this._backdrop = null; - this._isShown = false; - this._isBodyOverflowing = false; - this._ignoreBackdropClick = false; - this._isTransitioning = false; - this._scrollbarWidth = 0; - } // Getters - - - var _proto = Modal.prototype; - - // Public - _proto.toggle = function toggle(relatedTarget) { - return this._isShown ? this.hide() : this.show(relatedTarget); - }; + /*#__PURE__*/ + function () { + function Modal(element, config) { + this._config = this._getConfig(config); + this._element = element; + this._dialog = element.querySelector(Selector$5.DIALOG); + this._backdrop = null; + this._isShown = false; + this._isBodyOverflowing = false; + this._ignoreBackdropClick = false; + this._isTransitioning = false; + this._scrollbarWidth = 0; + } // Getters + + + var _proto = Modal.prototype; + + // Public + _proto.toggle = function toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget); + }; - _proto.show = function show(relatedTarget) { - var _this = this; + _proto.show = function show(relatedTarget) { + var _this = this; - if (this._isShown || this._isTransitioning) { - return; - } + if (this._isShown || this._isTransitioning) { + return; + } - if ($(this._element).hasClass(ClassName$5.FADE)) { - this._isTransitioning = true; - } + if ($(this._element).hasClass(ClassName$5.FADE)) { + this._isTransitioning = true; + } - var showEvent = $.Event(Event$5.SHOW, { - relatedTarget: relatedTarget - }); - $(this._element).trigger(showEvent); + var showEvent = $.Event(Event$5.SHOW, { + relatedTarget: relatedTarget + }); + $(this._element).trigger(showEvent); - if (this._isShown || showEvent.isDefaultPrevented()) { - return; - } + if (this._isShown || showEvent.isDefaultPrevented()) { + return; + } - this._isShown = true; + this._isShown = true; - this._checkScrollbar(); + this._checkScrollbar(); - this._setScrollbar(); + this._setScrollbar(); - this._adjustDialog(); + this._adjustDialog(); - this._setEscapeEvent(); + this._setEscapeEvent(); - this._setResizeEvent(); + this._setResizeEvent(); - $(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) { - return _this.hide(event); - }); - $(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () { - $(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) { - if ($(event.target).is(_this._element)) { - _this._ignoreBackdropClick = true; - } - }); - }); + $(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) { + return _this.hide(event); + }); + $(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () { + $(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) { + if ($(event.target).is(_this._element)) { + _this._ignoreBackdropClick = true; + } + }); + }); - this._showBackdrop(function () { - return _this._showElement(relatedTarget); - }); - }; + this._showBackdrop(function () { + return _this._showElement(relatedTarget); + }); + }; - _proto.hide = function hide(event) { - var _this2 = this; + _proto.hide = function hide(event) { + var _this2 = this; - if (event) { - event.preventDefault(); - } + if (event) { + event.preventDefault(); + } - if (!this._isShown || this._isTransitioning) { - return; - } + if (!this._isShown || this._isTransitioning) { + return; + } - var hideEvent = $.Event(Event$5.HIDE); - $(this._element).trigger(hideEvent); + var hideEvent = $.Event(Event$5.HIDE); + $(this._element).trigger(hideEvent); - if (!this._isShown || hideEvent.isDefaultPrevented()) { - return; - } + if (!this._isShown || hideEvent.isDefaultPrevented()) { + return; + } - this._isShown = false; - var transition = $(this._element).hasClass(ClassName$5.FADE); + this._isShown = false; + var transition = $(this._element).hasClass(ClassName$5.FADE); - if (transition) { - this._isTransitioning = true; - } + if (transition) { + this._isTransitioning = true; + } - this._setEscapeEvent(); + this._setEscapeEvent(); - this._setResizeEvent(); + this._setResizeEvent(); - $(document).off(Event$5.FOCUSIN); - $(this._element).removeClass(ClassName$5.SHOW); - $(this._element).off(Event$5.CLICK_DISMISS); - $(this._dialog).off(Event$5.MOUSEDOWN_DISMISS); + $(document).off(Event$5.FOCUSIN); + $(this._element).removeClass(ClassName$5.SHOW); + $(this._element).off(Event$5.CLICK_DISMISS); + $(this._dialog).off(Event$5.MOUSEDOWN_DISMISS); - if (transition) { - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $(this._element).one(Util.TRANSITION_END, function (event) { - return _this2._hideModal(event); - }).emulateTransitionEnd(transitionDuration); - } else { - this._hideModal(); - } - }; + if (transition) { + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $(this._element).one(Util.TRANSITION_END, function (event) { + return _this2._hideModal(event); + }).emulateTransitionEnd(transitionDuration); + } else { + this._hideModal(); + } + }; - _proto.dispose = function dispose() { - [window, this._element, this._dialog].forEach(function (htmlElement) { - return $(htmlElement).off(EVENT_KEY$5); - }); - /** - * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API` - * Do not move `document` in `htmlElements` array - * It will remove `Event.CLICK_DATA_API` event that should remain - */ + _proto.dispose = function dispose() { + [window, this._element, this._dialog].forEach(function (htmlElement) { + return $(htmlElement).off(EVENT_KEY$5); + }); + /** + * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API` + * Do not move `document` in `htmlElements` array + * It will remove `Event.CLICK_DATA_API` event that should remain + */ + + $(document).off(Event$5.FOCUSIN); + $.removeData(this._element, DATA_KEY$5); + this._config = null; + this._element = null; + this._dialog = null; + this._backdrop = null; + this._isShown = null; + this._isBodyOverflowing = null; + this._ignoreBackdropClick = null; + this._isTransitioning = null; + this._scrollbarWidth = null; + }; - $(document).off(Event$5.FOCUSIN); - $.removeData(this._element, DATA_KEY$5); - this._config = null; - this._element = null; - this._dialog = null; - this._backdrop = null; - this._isShown = null; - this._isBodyOverflowing = null; - this._ignoreBackdropClick = null; - this._isTransitioning = null; - this._scrollbarWidth = null; - }; + _proto.handleUpdate = function handleUpdate() { + this._adjustDialog(); + } // Private + ; - _proto.handleUpdate = function handleUpdate() { - this._adjustDialog(); - } // Private - ; + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default$3, config); + Util.typeCheckConfig(NAME$5, config, DefaultType$3); + return config; + }; - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default$3, config); - Util.typeCheckConfig(NAME$5, config, DefaultType$3); - return config; - }; + _proto._showElement = function _showElement(relatedTarget) { + var _this3 = this; - _proto._showElement = function _showElement(relatedTarget) { - var _this3 = this; + var transition = $(this._element).hasClass(ClassName$5.FADE); - var transition = $(this._element).hasClass(ClassName$5.FADE); + if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { + // Don't move modal's DOM position + document.body.appendChild(this._element); + } - if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { - // Don't move modal's DOM position - document.body.appendChild(this._element); - } + this._element.style.display = 'block'; - this._element.style.display = 'block'; + this._element.removeAttribute('aria-hidden'); - this._element.removeAttribute('aria-hidden'); + this._element.setAttribute('aria-modal', true); - this._element.setAttribute('aria-modal', true); + if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) { + this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0; + } else { + this._element.scrollTop = 0; + } - if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) { - this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0; - } else { - this._element.scrollTop = 0; - } + if (transition) { + Util.reflow(this._element); + } - if (transition) { - Util.reflow(this._element); - } + $(this._element).addClass(ClassName$5.SHOW); - $(this._element).addClass(ClassName$5.SHOW); + if (this._config.focus) { + this._enforceFocus(); + } - if (this._config.focus) { - this._enforceFocus(); - } + var shownEvent = $.Event(Event$5.SHOWN, { + relatedTarget: relatedTarget + }); - var shownEvent = $.Event(Event$5.SHOWN, { - relatedTarget: relatedTarget - }); + var transitionComplete = function transitionComplete() { + if (_this3._config.focus) { + _this3._element.focus(); + } - var transitionComplete = function transitionComplete() { - if (_this3._config.focus) { - _this3._element.focus(); - } + _this3._isTransitioning = false; + $(_this3._element).trigger(shownEvent); + }; - _this3._isTransitioning = false; - $(_this3._element).trigger(shownEvent); - }; + if (transition) { + var transitionDuration = Util.getTransitionDurationFromElement(this._dialog); + $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); + } else { + transitionComplete(); + } + }; - if (transition) { - var transitionDuration = Util.getTransitionDurationFromElement(this._dialog); - $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); - } else { - transitionComplete(); - } - }; + _proto._enforceFocus = function _enforceFocus() { + var _this4 = this; - _proto._enforceFocus = function _enforceFocus() { - var _this4 = this; + $(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop + .on(Event$5.FOCUSIN, function (event) { + if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) { + _this4._element.focus(); + } + }); + }; - $(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop - .on(Event$5.FOCUSIN, function (event) { - if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) { - _this4._element.focus(); - } - }); - }; + _proto._setEscapeEvent = function _setEscapeEvent() { + var _this5 = this; - _proto._setEscapeEvent = function _setEscapeEvent() { - var _this5 = this; + if (this._isShown && this._config.keyboard) { + $(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) { + if (event.which === ESCAPE_KEYCODE$1) { + event.preventDefault(); - if (this._isShown && this._config.keyboard) { - $(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) { - if (event.which === ESCAPE_KEYCODE$1) { - event.preventDefault(); + _this5.hide(); + } + }); + } else if (!this._isShown) { + $(this._element).off(Event$5.KEYDOWN_DISMISS); + } + }; + + _proto._setResizeEvent = function _setResizeEvent() { + var _this6 = this; - _this5.hide(); + if (this._isShown) { + $(window).on(Event$5.RESIZE, function (event) { + return _this6.handleUpdate(event); + }); + } else { + $(window).off(Event$5.RESIZE); } - }); - } else if (!this._isShown) { - $(this._element).off(Event$5.KEYDOWN_DISMISS); - } - }; + }; - _proto._setResizeEvent = function _setResizeEvent() { - var _this6 = this; + _proto._hideModal = function _hideModal() { + var _this7 = this; - if (this._isShown) { - $(window).on(Event$5.RESIZE, function (event) { - return _this6.handleUpdate(event); - }); - } else { - $(window).off(Event$5.RESIZE); - } - }; + this._element.style.display = 'none'; - _proto._hideModal = function _hideModal() { - var _this7 = this; + this._element.setAttribute('aria-hidden', true); - this._element.style.display = 'none'; + this._element.removeAttribute('aria-modal'); - this._element.setAttribute('aria-hidden', true); + this._isTransitioning = false; - this._element.removeAttribute('aria-modal'); + this._showBackdrop(function () { + $(document.body).removeClass(ClassName$5.OPEN); - this._isTransitioning = false; + _this7._resetAdjustments(); - this._showBackdrop(function () { - $(document.body).removeClass(ClassName$5.OPEN); + _this7._resetScrollbar(); - _this7._resetAdjustments(); + $(_this7._element).trigger(Event$5.HIDDEN); + }); + }; - _this7._resetScrollbar(); + _proto._removeBackdrop = function _removeBackdrop() { + if (this._backdrop) { + $(this._backdrop).remove(); + this._backdrop = null; + } + }; - $(_this7._element).trigger(Event$5.HIDDEN); - }); - }; + _proto._showBackdrop = function _showBackdrop(callback) { + var _this8 = this; - _proto._removeBackdrop = function _removeBackdrop() { - if (this._backdrop) { - $(this._backdrop).remove(); - this._backdrop = null; - } - }; + var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : ''; - _proto._showBackdrop = function _showBackdrop(callback) { - var _this8 = this; + if (this._isShown && this._config.backdrop) { + this._backdrop = document.createElement('div'); + this._backdrop.className = ClassName$5.BACKDROP; - var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : ''; + if (animate) { + this._backdrop.classList.add(animate); + } - if (this._isShown && this._config.backdrop) { - this._backdrop = document.createElement('div'); - this._backdrop.className = ClassName$5.BACKDROP; + $(this._backdrop).appendTo(document.body); + $(this._element).on(Event$5.CLICK_DISMISS, function (event) { + if (_this8._ignoreBackdropClick) { + _this8._ignoreBackdropClick = false; + return; + } - if (animate) { - this._backdrop.classList.add(animate); - } + if (event.target !== event.currentTarget) { + return; + } - $(this._backdrop).appendTo(document.body); - $(this._element).on(Event$5.CLICK_DISMISS, function (event) { - if (_this8._ignoreBackdropClick) { - _this8._ignoreBackdropClick = false; - return; - } + if (_this8._config.backdrop === 'static') { + _this8._element.focus(); + } else { + _this8.hide(); + } + }); - if (event.target !== event.currentTarget) { - return; - } + if (animate) { + Util.reflow(this._backdrop); + } - if (_this8._config.backdrop === 'static') { - _this8._element.focus(); - } else { - _this8.hide(); - } - }); + $(this._backdrop).addClass(ClassName$5.SHOW); - if (animate) { - Util.reflow(this._backdrop); - } + if (!callback) { + return; + } - $(this._backdrop).addClass(ClassName$5.SHOW); + if (!animate) { + callback(); + return; + } - if (!callback) { - return; - } + var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); + $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); + } else if (!this._isShown && this._backdrop) { + $(this._backdrop).removeClass(ClassName$5.SHOW); - if (!animate) { - callback(); - return; - } + var callbackRemove = function callbackRemove() { + _this8._removeBackdrop(); - var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); - $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); - } else if (!this._isShown && this._backdrop) { - $(this._backdrop).removeClass(ClassName$5.SHOW); + if (callback) { + callback(); + } + }; - var callbackRemove = function callbackRemove() { - _this8._removeBackdrop(); + if ($(this._element).hasClass(ClassName$5.FADE)) { + var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); - if (callback) { + $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); + } else { + callbackRemove(); + } + } else if (callback) { callback(); } - }; + } // ---------------------------------------------------------------------- + // the following methods are used to handle overflowing modals + // todo (fat): these should probably be refactored out of modal.js + // ---------------------------------------------------------------------- + ; - if ($(this._element).hasClass(ClassName$5.FADE)) { - var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); + _proto._adjustDialog = function _adjustDialog() { + var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; - $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); - } else { - callbackRemove(); - } - } else if (callback) { - callback(); - } - } // ---------------------------------------------------------------------- - // the following methods are used to handle overflowing modals - // todo (fat): these should probably be refactored out of modal.js - // ---------------------------------------------------------------------- - ; + if (!this._isBodyOverflowing && isModalOverflowing) { + this._element.style.paddingLeft = this._scrollbarWidth + "px"; + } - _proto._adjustDialog = function _adjustDialog() { - var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; + if (this._isBodyOverflowing && !isModalOverflowing) { + this._element.style.paddingRight = this._scrollbarWidth + "px"; + } + }; - if (!this._isBodyOverflowing && isModalOverflowing) { - this._element.style.paddingLeft = this._scrollbarWidth + "px"; - } + _proto._resetAdjustments = function _resetAdjustments() { + this._element.style.paddingLeft = ''; + this._element.style.paddingRight = ''; + }; - if (this._isBodyOverflowing && !isModalOverflowing) { - this._element.style.paddingRight = this._scrollbarWidth + "px"; - } - }; + _proto._checkScrollbar = function _checkScrollbar() { + var rect = document.body.getBoundingClientRect(); + this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; + this._scrollbarWidth = this._getScrollbarWidth(); + }; - _proto._resetAdjustments = function _resetAdjustments() { - this._element.style.paddingLeft = ''; - this._element.style.paddingRight = ''; - }; + _proto._setScrollbar = function _setScrollbar() { + var _this9 = this; + + if (this._isBodyOverflowing) { + // Note: DOMNode.style.paddingRight returns the actual value or '' if not set + // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set + var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); + var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding + + $(fixedContent).each(function (index, element) { + var actualPadding = element.style.paddingRight; + var calculatedPadding = $(element).css('padding-right'); + $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); + }); // Adjust sticky content margin + + $(stickyContent).each(function (index, element) { + var actualMargin = element.style.marginRight; + var calculatedMargin = $(element).css('margin-right'); + $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); + }); // Adjust body padding + + var actualPadding = document.body.style.paddingRight; + var calculatedPadding = $(document.body).css('padding-right'); + $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); + } - _proto._checkScrollbar = function _checkScrollbar() { - var rect = document.body.getBoundingClientRect(); - this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; - this._scrollbarWidth = this._getScrollbarWidth(); - }; + $(document.body).addClass(ClassName$5.OPEN); + }; - _proto._setScrollbar = function _setScrollbar() { - var _this9 = this; - - if (this._isBodyOverflowing) { - // Note: DOMNode.style.paddingRight returns the actual value or '' if not set - // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set - var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); - var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding - - $(fixedContent).each(function (index, element) { - var actualPadding = element.style.paddingRight; - var calculatedPadding = $(element).css('padding-right'); - $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); - }); // Adjust sticky content margin - - $(stickyContent).each(function (index, element) { - var actualMargin = element.style.marginRight; - var calculatedMargin = $(element).css('margin-right'); - $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); - }); // Adjust body padding - - var actualPadding = document.body.style.paddingRight; - var calculatedPadding = $(document.body).css('padding-right'); - $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); - } + _proto._resetScrollbar = function _resetScrollbar() { + // Restore fixed content padding + var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); + $(fixedContent).each(function (index, element) { + var padding = $(element).data('padding-right'); + $(element).removeData('padding-right'); + element.style.paddingRight = padding ? padding : ''; + }); // Restore sticky content + + var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT)); + $(elements).each(function (index, element) { + var margin = $(element).data('margin-right'); + + if (typeof margin !== 'undefined') { + $(element).css('margin-right', margin).removeData('margin-right'); + } + }); // Restore body padding - $(document.body).addClass(ClassName$5.OPEN); - }; + var padding = $(document.body).data('padding-right'); + $(document.body).removeData('padding-right'); + document.body.style.paddingRight = padding ? padding : ''; + }; - _proto._resetScrollbar = function _resetScrollbar() { - // Restore fixed content padding - var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); - $(fixedContent).each(function (index, element) { - var padding = $(element).data('padding-right'); - $(element).removeData('padding-right'); - element.style.paddingRight = padding ? padding : ''; - }); // Restore sticky content - - var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT)); - $(elements).each(function (index, element) { - var margin = $(element).data('margin-right'); - - if (typeof margin !== 'undefined') { - $(element).css('margin-right', margin).removeData('margin-right'); - } - }); // Restore body padding + _proto._getScrollbarWidth = function _getScrollbarWidth() { + // thx d.walsh + var scrollDiv = document.createElement('div'); + scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER; + document.body.appendChild(scrollDiv); + var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + } // Static + ; + + Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { + return this.each(function () { + var data = $(this).data(DATA_KEY$5); + + var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {}); + + if (!data) { + data = new Modal(this, _config); + $(this).data(DATA_KEY$5, data); + } - var padding = $(document.body).data('padding-right'); - $(document.body).removeData('padding-right'); - document.body.style.paddingRight = padding ? padding : ''; - }; + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } - _proto._getScrollbarWidth = function _getScrollbarWidth() { - // thx d.walsh - var scrollDiv = document.createElement('div'); - scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER; - document.body.appendChild(scrollDiv); - var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; - document.body.removeChild(scrollDiv); - return scrollbarWidth; - } // Static - ; - - Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { - return this.each(function () { - var data = $(this).data(DATA_KEY$5); - - var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {}); - - if (!data) { - data = new Modal(this, _config); - $(this).data(DATA_KEY$5, data); - } + data[config](relatedTarget); + } else if (_config.show) { + data.show(relatedTarget); + } + }); + }; - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); + _createClass(Modal, null, [{ + key: "VERSION", + get: function get() { + return VERSION$5; } + }, { + key: "Default", + get: function get() { + return Default$3; + } + }]); - data[config](relatedTarget); - } else if (_config.show) { - data.show(relatedTarget); - } - }); - }; - - _createClass(Modal, null, [{ - key: "VERSION", - get: function get() { - return VERSION$5; - } - }, { - key: "Default", - get: function get() { - return Default$3; - } - }]); - - return Modal; - }(); + return Modal; + }(); /** * ------------------------------------------------------------------------ * Data Api implementation @@ -5403,614 +5403,614 @@ }; var Tooltip = - /*#__PURE__*/ - function () { - function Tooltip(element, config) { - /** - * Check for Popper dependency - * Popper - https://popper.js.org - */ - if (typeof Popper === 'undefined') { - throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)'); - } // private - + /*#__PURE__*/ + function () { + function Tooltip(element, config) { + /** + * Check for Popper dependency + * Popper - https://popper.js.org + */ + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)'); + } // private - this._isEnabled = true; - this._timeout = 0; - this._hoverState = ''; - this._activeTrigger = {}; - this._popper = null; // Protected - this.element = element; - this.config = this._getConfig(config); - this.tip = null; + this._isEnabled = true; + this._timeout = 0; + this._hoverState = ''; + this._activeTrigger = {}; + this._popper = null; // Protected - this._setListeners(); - } // Getters + this.element = element; + this.config = this._getConfig(config); + this.tip = null; + this._setListeners(); + } // Getters - var _proto = Tooltip.prototype; - // Public - _proto.enable = function enable() { - this._isEnabled = true; - }; + var _proto = Tooltip.prototype; - _proto.disable = function disable() { - this._isEnabled = false; - }; + // Public + _proto.enable = function enable() { + this._isEnabled = true; + }; - _proto.toggleEnabled = function toggleEnabled() { - this._isEnabled = !this._isEnabled; - }; + _proto.disable = function disable() { + this._isEnabled = false; + }; - _proto.toggle = function toggle(event) { - if (!this._isEnabled) { - return; - } + _proto.toggleEnabled = function toggleEnabled() { + this._isEnabled = !this._isEnabled; + }; - if (event) { - var dataKey = this.constructor.DATA_KEY; - var context = $(event.currentTarget).data(dataKey); + _proto.toggle = function toggle(event) { + if (!this._isEnabled) { + return; + } - if (!context) { - context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $(event.currentTarget).data(dataKey, context); - } + if (event) { + var dataKey = this.constructor.DATA_KEY; + var context = $(event.currentTarget).data(dataKey); - context._activeTrigger.click = !context._activeTrigger.click; + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } - if (context._isWithActiveTrigger()) { - context._enter(null, context); - } else { - context._leave(null, context); - } - } else { - if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) { - this._leave(null, this); + context._activeTrigger.click = !context._activeTrigger.click; - return; - } + if (context._isWithActiveTrigger()) { + context._enter(null, context); + } else { + context._leave(null, context); + } + } else { + if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) { + this._leave(null, this); - this._enter(null, this); - } - }; + return; + } - _proto.dispose = function dispose() { - clearTimeout(this._timeout); - $.removeData(this.element, this.constructor.DATA_KEY); - $(this.element).off(this.constructor.EVENT_KEY); - $(this.element).closest('.modal').off('hide.bs.modal'); + this._enter(null, this); + } + }; - if (this.tip) { - $(this.tip).remove(); - } + _proto.dispose = function dispose() { + clearTimeout(this._timeout); + $.removeData(this.element, this.constructor.DATA_KEY); + $(this.element).off(this.constructor.EVENT_KEY); + $(this.element).closest('.modal').off('hide.bs.modal'); - this._isEnabled = null; - this._timeout = null; - this._hoverState = null; - this._activeTrigger = null; + if (this.tip) { + $(this.tip).remove(); + } - if (this._popper !== null) { - this._popper.destroy(); - } + this._isEnabled = null; + this._timeout = null; + this._hoverState = null; + this._activeTrigger = null; - this._popper = null; - this.element = null; - this.config = null; - this.tip = null; - }; + if (this._popper !== null) { + this._popper.destroy(); + } - _proto.show = function show() { - var _this = this; + this._popper = null; + this.element = null; + this.config = null; + this.tip = null; + }; - if ($(this.element).css('display') === 'none') { - throw new Error('Please use show on visible elements'); - } + _proto.show = function show() { + var _this = this; - var showEvent = $.Event(this.constructor.Event.SHOW); + if ($(this.element).css('display') === 'none') { + throw new Error('Please use show on visible elements'); + } - if (this.isWithContent() && this._isEnabled) { - $(this.element).trigger(showEvent); - var shadowRoot = Util.findShadowRoot(this.element); - var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element); + var showEvent = $.Event(this.constructor.Event.SHOW); - if (showEvent.isDefaultPrevented() || !isInTheDom) { - return; - } + if (this.isWithContent() && this._isEnabled) { + $(this.element).trigger(showEvent); + var shadowRoot = Util.findShadowRoot(this.element); + var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element); - var tip = this.getTipElement(); - var tipId = Util.getUID(this.constructor.NAME); - tip.setAttribute('id', tipId); - this.element.setAttribute('aria-describedby', tipId); - this.setContent(); + if (showEvent.isDefaultPrevented() || !isInTheDom) { + return; + } - if (this.config.animation) { - $(tip).addClass(ClassName$6.FADE); - } + var tip = this.getTipElement(); + var tipId = Util.getUID(this.constructor.NAME); + tip.setAttribute('id', tipId); + this.element.setAttribute('aria-describedby', tipId); + this.setContent(); - var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; + if (this.config.animation) { + $(tip).addClass(ClassName$6.FADE); + } - var attachment = this._getAttachment(placement); + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; - this.addAttachmentClass(attachment); + var attachment = this._getAttachment(placement); - var container = this._getContainer(); + this.addAttachmentClass(attachment); - $(tip).data(this.constructor.DATA_KEY, this); + var container = this._getContainer(); - if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) { - $(tip).appendTo(container); - } + $(tip).data(this.constructor.DATA_KEY, this); - $(this.element).trigger(this.constructor.Event.INSERTED); - this._popper = new Popper(this.element, tip, { - placement: attachment, - modifiers: { - offset: this._getOffset(), - flip: { - behavior: this.config.fallbackPlacement - }, - arrow: { - element: Selector$6.ARROW - }, - preventOverflow: { - boundariesElement: this.config.boundary + if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) { + $(tip).appendTo(container); } - }, - onCreate: function onCreate(data) { - if (data.originalPlacement !== data.placement) { - _this._handlePopperPlacementChange(data); + + $(this.element).trigger(this.constructor.Event.INSERTED); + this._popper = new Popper(this.element, tip, { + placement: attachment, + modifiers: { + offset: this._getOffset(), + flip: { + behavior: this.config.fallbackPlacement + }, + arrow: { + element: Selector$6.ARROW + }, + preventOverflow: { + boundariesElement: this.config.boundary + } + }, + onCreate: function onCreate(data) { + if (data.originalPlacement !== data.placement) { + _this._handlePopperPlacementChange(data); + } + }, + onUpdate: function onUpdate(data) { + return _this._handlePopperPlacementChange(data); + } + }); + $(tip).addClass(ClassName$6.SHOW); // 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) { + $(document.body).children().on('mouseover', null, $.noop); } - }, - onUpdate: function onUpdate(data) { - return _this._handlePopperPlacementChange(data); - } - }); - $(tip).addClass(ClassName$6.SHOW); // 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) { - $(document.body).children().on('mouseover', null, $.noop); - } - var complete = function complete() { - if (_this.config.animation) { - _this._fixTransition(); - } + var complete = function complete() { + if (_this.config.animation) { + _this._fixTransition(); + } + + var prevHoverState = _this._hoverState; + _this._hoverState = null; + $(_this.element).trigger(_this.constructor.Event.SHOWN); - var prevHoverState = _this._hoverState; - _this._hoverState = null; - $(_this.element).trigger(_this.constructor.Event.SHOWN); + if (prevHoverState === HoverState.OUT) { + _this._leave(null, _this); + } + }; - if (prevHoverState === HoverState.OUT) { - _this._leave(null, _this); + if ($(this.tip).hasClass(ClassName$6.FADE)) { + var transitionDuration = Util.getTransitionDurationFromElement(this.tip); + $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + } else { + complete(); + } } }; - if ($(this.tip).hasClass(ClassName$6.FADE)) { - var transitionDuration = Util.getTransitionDurationFromElement(this.tip); - $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - } else { - complete(); - } - } - }; + _proto.hide = function hide(callback) { + var _this2 = this; - _proto.hide = function hide(callback) { - var _this2 = this; + var tip = this.getTipElement(); + var hideEvent = $.Event(this.constructor.Event.HIDE); - var tip = this.getTipElement(); - var hideEvent = $.Event(this.constructor.Event.HIDE); + var complete = function complete() { + if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { + tip.parentNode.removeChild(tip); + } - var complete = function complete() { - if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { - tip.parentNode.removeChild(tip); - } + _this2._cleanTipClass(); - _this2._cleanTipClass(); + _this2.element.removeAttribute('aria-describedby'); - _this2.element.removeAttribute('aria-describedby'); + $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); - $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); + if (_this2._popper !== null) { + _this2._popper.destroy(); + } - if (_this2._popper !== null) { - _this2._popper.destroy(); - } + if (callback) { + callback(); + } + }; - if (callback) { - callback(); - } - }; + $(this.element).trigger(hideEvent); - $(this.element).trigger(hideEvent); + if (hideEvent.isDefaultPrevented()) { + return; + } - if (hideEvent.isDefaultPrevented()) { - return; - } + $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra + // empty mouseover listeners we added for iOS support - $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra - // empty mouseover listeners we added for iOS support + if ('ontouchstart' in document.documentElement) { + $(document.body).children().off('mouseover', null, $.noop); + } - if ('ontouchstart' in document.documentElement) { - $(document.body).children().off('mouseover', null, $.noop); - } + this._activeTrigger[Trigger.CLICK] = false; + this._activeTrigger[Trigger.FOCUS] = false; + this._activeTrigger[Trigger.HOVER] = false; - this._activeTrigger[Trigger.CLICK] = false; - this._activeTrigger[Trigger.FOCUS] = false; - this._activeTrigger[Trigger.HOVER] = false; + if ($(this.tip).hasClass(ClassName$6.FADE)) { + var transitionDuration = Util.getTransitionDurationFromElement(tip); + $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + } else { + complete(); + } - if ($(this.tip).hasClass(ClassName$6.FADE)) { - var transitionDuration = Util.getTransitionDurationFromElement(tip); - $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - } else { - complete(); - } + this._hoverState = ''; + }; - this._hoverState = ''; - }; + _proto.update = function update() { + if (this._popper !== null) { + this._popper.scheduleUpdate(); + } + } // Protected + ; - _proto.update = function update() { - if (this._popper !== null) { - this._popper.scheduleUpdate(); - } - } // Protected - ; + _proto.isWithContent = function isWithContent() { + return Boolean(this.getTitle()); + }; - _proto.isWithContent = function isWithContent() { - return Boolean(this.getTitle()); - }; + _proto.addAttachmentClass = function addAttachmentClass(attachment) { + $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); + }; - _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); - }; + _proto.getTipElement = function getTipElement() { + this.tip = this.tip || $(this.config.template)[0]; + return this.tip; + }; - _proto.getTipElement = function getTipElement() { - this.tip = this.tip || $(this.config.template)[0]; - return this.tip; - }; + _proto.setContent = function setContent() { + var tip = this.getTipElement(); + this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle()); + $(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW); + }; - _proto.setContent = function setContent() { - var tip = this.getTipElement(); - this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle()); - $(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW); - }; + _proto.setElementContent = function setElementContent($element, content) { + if (typeof content === 'object' && (content.nodeType || content.jquery)) { + // Content is a DOM node or a jQuery + if (this.config.html) { + if (!$(content).parent().is($element)) { + $element.empty().append(content); + } + } else { + $element.text($(content).text()); + } - _proto.setElementContent = function setElementContent($element, content) { - if (typeof content === 'object' && (content.nodeType || content.jquery)) { - // Content is a DOM node or a jQuery - if (this.config.html) { - if (!$(content).parent().is($element)) { - $element.empty().append(content); + return; } - } else { - $element.text($(content).text()); - } - return; - } + if (this.config.html) { + if (this.config.sanitize) { + content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn); + } - if (this.config.html) { - if (this.config.sanitize) { - content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn); - } + $element.html(content); + } else { + $element.text(content); + } + }; - $element.html(content); - } else { - $element.text(content); - } - }; + _proto.getTitle = function getTitle() { + var title = this.element.getAttribute('data-original-title'); - _proto.getTitle = function getTitle() { - var title = this.element.getAttribute('data-original-title'); + if (!title) { + title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; + } - if (!title) { - title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; - } + return title; + } // Private + ; - return title; - } // Private - ; + _proto._getOffset = function _getOffset() { + var _this3 = this; - _proto._getOffset = function _getOffset() { - var _this3 = this; + var offset = {}; - var offset = {}; + if (typeof this.config.offset === 'function') { + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {}); + return data; + }; + } else { + offset.offset = this.config.offset; + } - if (typeof this.config.offset === 'function') { - offset.fn = function (data) { - data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {}); - return data; + return offset; }; - } else { - offset.offset = this.config.offset; - } - return offset; - }; - - _proto._getContainer = function _getContainer() { - if (this.config.container === false) { - return document.body; - } - - if (Util.isElement(this.config.container)) { - return $(this.config.container); - } + _proto._getContainer = function _getContainer() { + if (this.config.container === false) { + return document.body; + } - return $(document).find(this.config.container); - }; + if (Util.isElement(this.config.container)) { + return $(this.config.container); + } - _proto._getAttachment = function _getAttachment(placement) { - return AttachmentMap$1[placement.toUpperCase()]; - }; + return $(document).find(this.config.container); + }; - _proto._setListeners = function _setListeners() { - var _this4 = this; + _proto._getAttachment = function _getAttachment(placement) { + return AttachmentMap$1[placement.toUpperCase()]; + }; - var triggers = this.config.trigger.split(' '); - triggers.forEach(function (trigger) { - if (trigger === 'click') { - $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { - return _this4.toggle(event); + _proto._setListeners = function _setListeners() { + var _this4 = this; + + var triggers = this.config.trigger.split(' '); + triggers.forEach(function (trigger) { + if (trigger === 'click') { + $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { + return _this4.toggle(event); + }); + } else if (trigger !== Trigger.MANUAL) { + var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; + var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; + $(_this4.element).on(eventIn, _this4.config.selector, function (event) { + return _this4._enter(event); + }).on(eventOut, _this4.config.selector, function (event) { + return _this4._leave(event); + }); + } }); - } else if (trigger !== Trigger.MANUAL) { - var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; - var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; - $(_this4.element).on(eventIn, _this4.config.selector, function (event) { - return _this4._enter(event); - }).on(eventOut, _this4.config.selector, function (event) { - return _this4._leave(event); + $(this.element).closest('.modal').on('hide.bs.modal', function () { + if (_this4.element) { + _this4.hide(); + } }); - } - }); - $(this.element).closest('.modal').on('hide.bs.modal', function () { - if (_this4.element) { - _this4.hide(); - } - }); - if (this.config.selector) { - this.config = _objectSpread({}, this.config, { - trigger: 'manual', - selector: '' - }); - } else { - this._fixTitle(); - } - }; + if (this.config.selector) { + this.config = _objectSpread({}, this.config, { + trigger: 'manual', + selector: '' + }); + } else { + this._fixTitle(); + } + }; - _proto._fixTitle = function _fixTitle() { - var titleType = typeof this.element.getAttribute('data-original-title'); + _proto._fixTitle = function _fixTitle() { + var titleType = typeof this.element.getAttribute('data-original-title'); - if (this.element.getAttribute('title') || titleType !== 'string') { - this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); - this.element.setAttribute('title', ''); - } - }; + if (this.element.getAttribute('title') || titleType !== 'string') { + this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); + this.element.setAttribute('title', ''); + } + }; - _proto._enter = function _enter(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || $(event.currentTarget).data(dataKey); + _proto._enter = function _enter(event, context) { + var dataKey = this.constructor.DATA_KEY; + context = context || $(event.currentTarget).data(dataKey); - if (!context) { - context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $(event.currentTarget).data(dataKey, context); - } + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } - if (event) { - context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; - } + if (event) { + context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; + } - if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) { - context._hoverState = HoverState.SHOW; - return; - } + if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) { + context._hoverState = HoverState.SHOW; + return; + } - clearTimeout(context._timeout); - context._hoverState = HoverState.SHOW; + clearTimeout(context._timeout); + context._hoverState = HoverState.SHOW; - if (!context.config.delay || !context.config.delay.show) { - context.show(); - return; - } + if (!context.config.delay || !context.config.delay.show) { + context.show(); + return; + } - context._timeout = setTimeout(function () { - if (context._hoverState === HoverState.SHOW) { - context.show(); - } - }, context.config.delay.show); - }; + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.SHOW) { + context.show(); + } + }, context.config.delay.show); + }; - _proto._leave = function _leave(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || $(event.currentTarget).data(dataKey); + _proto._leave = function _leave(event, context) { + var dataKey = this.constructor.DATA_KEY; + context = context || $(event.currentTarget).data(dataKey); - if (!context) { - context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $(event.currentTarget).data(dataKey, context); - } + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } - if (event) { - context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; - } + if (event) { + context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; + } - if (context._isWithActiveTrigger()) { - return; - } + if (context._isWithActiveTrigger()) { + return; + } - clearTimeout(context._timeout); - context._hoverState = HoverState.OUT; + clearTimeout(context._timeout); + context._hoverState = HoverState.OUT; - if (!context.config.delay || !context.config.delay.hide) { - context.hide(); - return; - } + if (!context.config.delay || !context.config.delay.hide) { + context.hide(); + return; + } - context._timeout = setTimeout(function () { - if (context._hoverState === HoverState.OUT) { - context.hide(); - } - }, context.config.delay.hide); - }; + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.OUT) { + context.hide(); + } + }, context.config.delay.hide); + }; - _proto._isWithActiveTrigger = function _isWithActiveTrigger() { - for (var trigger in this._activeTrigger) { - if (this._activeTrigger[trigger]) { - return true; - } - } + _proto._isWithActiveTrigger = function _isWithActiveTrigger() { + for (var trigger in this._activeTrigger) { + if (this._activeTrigger[trigger]) { + return true; + } + } - return false; - }; + return false; + }; - _proto._getConfig = function _getConfig(config) { - var dataAttributes = $(this.element).data(); - Object.keys(dataAttributes).forEach(function (dataAttr) { - if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) { - delete dataAttributes[dataAttr]; - } - }); - config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); + _proto._getConfig = function _getConfig(config) { + var dataAttributes = $(this.element).data(); + Object.keys(dataAttributes).forEach(function (dataAttr) { + if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) { + delete dataAttributes[dataAttr]; + } + }); + config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); - if (typeof config.delay === 'number') { - config.delay = { - show: config.delay, - hide: config.delay - }; - } + 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.title === 'number') { + config.title = config.title.toString(); + } - if (typeof config.content === 'number') { - config.content = config.content.toString(); - } + if (typeof config.content === 'number') { + config.content = config.content.toString(); + } - Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType); + Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType); - if (config.sanitize) { - config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn); - } + if (config.sanitize) { + config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn); + } - return config; - }; + return config; + }; - _proto._getDelegateConfig = function _getDelegateConfig() { - var config = {}; + _proto._getDelegateConfig = function _getDelegateConfig() { + var config = {}; - if (this.config) { - for (var key in this.config) { - if (this.constructor.Default[key] !== this.config[key]) { - config[key] = this.config[key]; + if (this.config) { + for (var key in this.config) { + if (this.constructor.Default[key] !== this.config[key]) { + config[key] = this.config[key]; + } + } } - } - } - return config; - }; + return config; + }; - _proto._cleanTipClass = function _cleanTipClass() { - var $tip = $(this.getTipElement()); - var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); + _proto._cleanTipClass = function _cleanTipClass() { + var $tip = $(this.getTipElement()); + var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); - if (tabClass !== null && tabClass.length) { - $tip.removeClass(tabClass.join('')); - } - }; + if (tabClass !== null && tabClass.length) { + $tip.removeClass(tabClass.join('')); + } + }; - _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) { - var popperInstance = popperData.instance; - this.tip = popperInstance.popper; + _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) { + var popperInstance = popperData.instance; + this.tip = popperInstance.popper; - this._cleanTipClass(); + this._cleanTipClass(); - this.addAttachmentClass(this._getAttachment(popperData.placement)); - }; + this.addAttachmentClass(this._getAttachment(popperData.placement)); + }; - _proto._fixTransition = function _fixTransition() { - var tip = this.getTipElement(); - var initConfigAnimation = this.config.animation; + _proto._fixTransition = function _fixTransition() { + var tip = this.getTipElement(); + var initConfigAnimation = this.config.animation; - if (tip.getAttribute('x-placement') !== null) { - return; - } + if (tip.getAttribute('x-placement') !== null) { + return; + } - $(tip).removeClass(ClassName$6.FADE); - this.config.animation = false; - this.hide(); - this.show(); - this.config.animation = initConfigAnimation; - } // Static - ; + $(tip).removeClass(ClassName$6.FADE); + this.config.animation = false; + this.hide(); + this.show(); + this.config.animation = initConfigAnimation; + } // Static + ; - Tooltip._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$6); + Tooltip._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$6); - var _config = typeof config === 'object' && config; + var _config = typeof config === 'object' && config; - if (!data && /dispose|hide/.test(config)) { - return; - } + if (!data && /dispose|hide/.test(config)) { + return; + } - if (!data) { - data = new Tooltip(this, _config); - $(this).data(DATA_KEY$6, data); - } + if (!data) { + data = new Tooltip(this, _config); + $(this).data(DATA_KEY$6, data); + } - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } - data[config](); - } - }); - }; + data[config](); + } + }); + }; - _createClass(Tooltip, null, [{ - key: "VERSION", - get: function get() { - return VERSION$6; - } - }, { - key: "Default", - get: function get() { - return Default$4; - } - }, { - key: "NAME", - get: function get() { - return NAME$6; - } - }, { - key: "DATA_KEY", - get: function get() { - return DATA_KEY$6; - } - }, { - key: "Event", - get: function get() { - return Event$6; - } - }, { - key: "EVENT_KEY", - get: function get() { - return EVENT_KEY$6; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType$4; - } - }]); + _createClass(Tooltip, null, [{ + key: "VERSION", + get: function get() { + return VERSION$6; + } + }, { + key: "Default", + get: function get() { + return Default$4; + } + }, { + key: "NAME", + get: function get() { + return NAME$6; + } + }, { + key: "DATA_KEY", + get: function get() { + return DATA_KEY$6; + } + }, { + key: "Event", + get: function get() { + return Event$6; + } + }, { + key: "EVENT_KEY", + get: function get() { + return EVENT_KEY$6; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType$4; + } + }]); - return Tooltip; - }(); + return Tooltip; + }(); /** * ------------------------------------------------------------------------ * jQuery @@ -6079,125 +6079,125 @@ }; var Popover = - /*#__PURE__*/ - function (_Tooltip) { - _inheritsLoose(Popover, _Tooltip); + /*#__PURE__*/ + function (_Tooltip) { + _inheritsLoose(Popover, _Tooltip); - function Popover() { - return _Tooltip.apply(this, arguments) || this; - } + function Popover() { + return _Tooltip.apply(this, arguments) || this; + } - var _proto = Popover.prototype; + var _proto = Popover.prototype; - // Overrides - _proto.isWithContent = function isWithContent() { - return this.getTitle() || this._getContent(); - }; + // Overrides + _proto.isWithContent = function isWithContent() { + return this.getTitle() || this._getContent(); + }; - _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment); - }; + _proto.addAttachmentClass = function addAttachmentClass(attachment) { + $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment); + }; - _proto.getTipElement = function getTipElement() { - this.tip = this.tip || $(this.config.template)[0]; - return this.tip; - }; + _proto.getTipElement = function getTipElement() { + this.tip = this.tip || $(this.config.template)[0]; + return this.tip; + }; - _proto.setContent = function setContent() { - var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events + _proto.setContent = function setContent() { + var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events - this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle()); + this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle()); - var content = this._getContent(); + var content = this._getContent(); - if (typeof content === 'function') { - content = content.call(this.element); - } + if (typeof content === 'function') { + content = content.call(this.element); + } - this.setElementContent($tip.find(Selector$7.CONTENT), content); - $tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW); - } // Private - ; + this.setElementContent($tip.find(Selector$7.CONTENT), content); + $tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW); + } // Private + ; - _proto._getContent = function _getContent() { - return this.element.getAttribute('data-content') || this.config.content; - }; + _proto._getContent = function _getContent() { + return this.element.getAttribute('data-content') || this.config.content; + }; - _proto._cleanTipClass = function _cleanTipClass() { - var $tip = $(this.getTipElement()); - var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1); + _proto._cleanTipClass = function _cleanTipClass() { + var $tip = $(this.getTipElement()); + var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1); - if (tabClass !== null && tabClass.length > 0) { - $tip.removeClass(tabClass.join('')); - } - } // Static - ; + if (tabClass !== null && tabClass.length > 0) { + $tip.removeClass(tabClass.join('')); + } + } // Static + ; - Popover._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$7); + Popover._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY$7); - var _config = typeof config === 'object' ? config : null; + var _config = typeof config === 'object' ? config : null; - if (!data && /dispose|hide/.test(config)) { - return; - } + if (!data && /dispose|hide/.test(config)) { + return; + } - if (!data) { - data = new Popover(this, _config); - $(this).data(DATA_KEY$7, data); - } + if (!data) { + data = new Popover(this, _config); + $(this).data(DATA_KEY$7, data); + } - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } - data[config](); - } - }); - }; + data[config](); + } + }); + }; - _createClass(Popover, null, [{ - key: "VERSION", - // Getters - get: function get() { - return VERSION$7; - } - }, { - key: "Default", - get: function get() { - return Default$5; - } - }, { - key: "NAME", - get: function get() { - return NAME$7; - } - }, { - key: "DATA_KEY", - get: function get() { - return DATA_KEY$7; - } - }, { - key: "Event", - get: function get() { - return Event$7; - } - }, { - key: "EVENT_KEY", - get: function get() { - return EVENT_KEY$7; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType$5; - } - }]); + _createClass(Popover, null, [{ + key: "VERSION", + // Getters + get: function get() { + return VERSION$7; + } + }, { + key: "Default", + get: function get() { + return Default$5; + } + }, { + key: "NAME", + get: function get() { + return NAME$7; + } + }, { + key: "DATA_KEY", + get: function get() { + return DATA_KEY$7; + } + }, { + key: "Event", + get: function get() { + return Event$7; + } + }, { + key: "EVENT_KEY", + get: function get() { + return EVENT_KEY$7; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType$5; + } + }]); - return Popover; - }(Tooltip); + return Popover; + }(Tooltip); /** * ------------------------------------------------------------------------ * jQuery @@ -6268,227 +6268,227 @@ }; var ScrollSpy = - /*#__PURE__*/ - function () { - function ScrollSpy(element, config) { - var _this = this; - - this._element = element; - this._scrollElement = element.tagName === 'BODY' ? window : element; - this._config = this._getConfig(config); - this._selector = this._config.target + " " + Selector$8.NAV_LINKS + "," + (this._config.target + " " + Selector$8.LIST_ITEMS + ",") + (this._config.target + " " + Selector$8.DROPDOWN_ITEMS); - this._offsets = []; - this._targets = []; - this._activeTarget = null; - this._scrollHeight = 0; - $(this._scrollElement).on(Event$8.SCROLL, function (event) { - return _this._process(event); - }); - this.refresh(); + /*#__PURE__*/ + function () { + function ScrollSpy(element, config) { + var _this = this; + + this._element = element; + this._scrollElement = element.tagName === 'BODY' ? window : element; + this._config = this._getConfig(config); + this._selector = this._config.target + " " + Selector$8.NAV_LINKS + "," + (this._config.target + " " + Selector$8.LIST_ITEMS + ",") + (this._config.target + " " + Selector$8.DROPDOWN_ITEMS); + this._offsets = []; + this._targets = []; + this._activeTarget = null; + this._scrollHeight = 0; + $(this._scrollElement).on(Event$8.SCROLL, function (event) { + return _this._process(event); + }); + this.refresh(); - this._process(); - } // Getters + this._process(); + } // Getters - var _proto = ScrollSpy.prototype; + var _proto = ScrollSpy.prototype; - // Public - _proto.refresh = function refresh() { - var _this2 = this; + // Public + _proto.refresh = function refresh() { + var _this2 = this; - var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; - var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; - var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; - this._offsets = []; - this._targets = []; - this._scrollHeight = this._getScrollHeight(); - var targets = [].slice.call(document.querySelectorAll(this._selector)); - targets.map(function (element) { - var target; - var targetSelector = Util.getSelectorFromElement(element); + var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; + var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; + var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; + this._offsets = []; + this._targets = []; + this._scrollHeight = this._getScrollHeight(); + var targets = [].slice.call(document.querySelectorAll(this._selector)); + targets.map(function (element) { + var target; + var targetSelector = Util.getSelectorFromElement(element); - if (targetSelector) { - target = document.querySelector(targetSelector); - } + if (targetSelector) { + target = document.querySelector(targetSelector); + } - if (target) { - var targetBCR = target.getBoundingClientRect(); + if (target) { + var targetBCR = target.getBoundingClientRect(); - if (targetBCR.width || targetBCR.height) { - // TODO (fat): remove sketch reliance on jQuery position/offset - return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; - } - } + if (targetBCR.width || targetBCR.height) { + // TODO (fat): remove sketch reliance on jQuery position/offset + return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; + } + } - return null; - }).filter(function (item) { - return item; - }).sort(function (a, b) { - return a[0] - b[0]; - }).forEach(function (item) { - _this2._offsets.push(item[0]); - - _this2._targets.push(item[1]); - }); - }; + return null; + }).filter(function (item) { + return item; + }).sort(function (a, b) { + return a[0] - b[0]; + }).forEach(function (item) { + _this2._offsets.push(item[0]); - _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY$8); - $(this._scrollElement).off(EVENT_KEY$8); - this._element = null; - this._scrollElement = null; - this._config = null; - this._selector = null; - this._offsets = null; - this._targets = null; - this._activeTarget = null; - this._scrollHeight = null; - } // Private - ; - - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {}); - - if (typeof config.target !== 'string') { - var id = $(config.target).attr('id'); - - if (!id) { - id = Util.getUID(NAME$8); - $(config.target).attr('id', id); - } + _this2._targets.push(item[1]); + }); + }; - config.target = "#" + id; - } + _proto.dispose = function dispose() { + $.removeData(this._element, DATA_KEY$8); + $(this._scrollElement).off(EVENT_KEY$8); + this._element = null; + this._scrollElement = null; + this._config = null; + this._selector = null; + this._offsets = null; + this._targets = null; + this._activeTarget = null; + this._scrollHeight = null; + } // Private + ; + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {}); + + if (typeof config.target !== 'string') { + var id = $(config.target).attr('id'); + + if (!id) { + id = Util.getUID(NAME$8); + $(config.target).attr('id', id); + } - Util.typeCheckConfig(NAME$8, config, DefaultType$6); - return config; - }; + config.target = "#" + id; + } - _proto._getScrollTop = function _getScrollTop() { - return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; - }; + Util.typeCheckConfig(NAME$8, config, DefaultType$6); + return config; + }; - _proto._getScrollHeight = function _getScrollHeight() { - return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); - }; + _proto._getScrollTop = function _getScrollTop() { + return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; + }; - _proto._getOffsetHeight = function _getOffsetHeight() { - return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; - }; + _proto._getScrollHeight = function _getScrollHeight() { + return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); + }; - _proto._process = function _process() { - var scrollTop = this._getScrollTop() + this._config.offset; + _proto._getOffsetHeight = function _getOffsetHeight() { + return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; + }; - var scrollHeight = this._getScrollHeight(); + _proto._process = function _process() { + var scrollTop = this._getScrollTop() + this._config.offset; - var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); + var scrollHeight = this._getScrollHeight(); - if (this._scrollHeight !== scrollHeight) { - this.refresh(); - } + var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); - if (scrollTop >= maxScroll) { - var target = this._targets[this._targets.length - 1]; + if (this._scrollHeight !== scrollHeight) { + this.refresh(); + } - if (this._activeTarget !== target) { - this._activate(target); - } + if (scrollTop >= maxScroll) { + var target = this._targets[this._targets.length - 1]; - return; - } + if (this._activeTarget !== target) { + this._activate(target); + } - if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { - this._activeTarget = null; + return; + } - this._clear(); + if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { + this._activeTarget = null; - return; - } + this._clear(); - var offsetLength = this._offsets.length; + return; + } - for (var i = offsetLength; i--;) { - var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); + var offsetLength = this._offsets.length; - if (isActiveTarget) { - this._activate(this._targets[i]); - } - } - }; + for (var i = offsetLength; i--;) { + var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); - _proto._activate = function _activate(target) { - this._activeTarget = target; + if (isActiveTarget) { + this._activate(this._targets[i]); + } + } + }; - this._clear(); + _proto._activate = function _activate(target) { + this._activeTarget = target; - var queries = this._selector.split(',').map(function (selector) { - return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; - }); + this._clear(); - var $link = $([].slice.call(document.querySelectorAll(queries.join(',')))); + var queries = this._selector.split(',').map(function (selector) { + return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; + }); - if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) { - $link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE); - $link.addClass(ClassName$8.ACTIVE); - } else { - // Set triggered link as active - $link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active - // With both
    and