├── _config.yml ├── pic ├── pic0-1.jpg ├── pic0-2.jpg ├── pic0-3.jpg ├── pic0-4.jpg ├── pic0-5.jpg ├── pic0-nb.jpg ├── pic0-nbgf.jpg ├── pic375-1.jpg ├── pic375-2.jpg ├── picservlet-1.jpg ├── picservlet-2.jpg ├── pic0-nbgfConfig.jpg ├── pic-configure-rest.jpg ├── pic-jsonb-beanval-run.jpg └── pic-jsonb-beanval-test-resource.jpg ├── demos ├── jsonbbeanvaldemo │ ├── src │ │ └── main │ │ │ ├── webapp │ │ │ ├── js │ │ │ │ └── libs │ │ │ │ │ ├── twitter-bootstrap │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ │ │ ├── js │ │ │ │ │ │ ├── npm.js │ │ │ │ │ │ └── bootstrap.min.js │ │ │ │ │ └── css │ │ │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ │ │ ├── bootstrap-theme.min.css.map │ │ │ │ │ │ └── bootstrap-theme.css │ │ │ │ │ └── jquery │ │ │ │ │ └── core.js │ │ │ └── index.html │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── jsonbbeanvaldemo │ │ │ ├── config │ │ │ └── ApplicationConfig.java │ │ │ ├── dto │ │ │ └── Customer.java │ │ │ └── service │ │ │ └── CustomerControllerService.java │ ├── pom.xml │ └── nb-configuration.xml └── j1hol-sse-server │ ├── src │ └── main │ │ ├── java │ │ └── br │ │ │ └── com │ │ │ └── improving │ │ │ └── j1hol │ │ │ └── sse │ │ │ └── server │ │ │ ├── PatientHealthInfoApplication.java │ │ │ ├── PatientHealthInfoResource.java │ │ │ ├── PatientHealthInfoEmitter.java │ │ │ └── PatientHealthInfo.java │ │ └── webapp │ │ └── WEB-INF │ │ └── beans.xml │ ├── nb-configuration.xml │ └── pom.xml ├── exercisesolutions ├── hol-jsonb-beanval │ ├── src │ │ └── main │ │ │ ├── webapp │ │ │ └── index.html │ │ │ └── java │ │ │ └── org │ │ │ ├── j1hol │ │ │ ├── CustomerContainer.java │ │ │ ├── Customer.java │ │ │ └── JsonBBeanValPracticeService.java │ │ │ └── netbeans │ │ │ └── rest │ │ │ └── application │ │ │ └── config │ │ │ └── ApplicationConfig.java │ ├── nb-configuration.xml │ └── pom.xml └── j1hol-sse-client │ ├── src │ └── main │ │ ├── java │ │ └── br │ │ │ └── com │ │ │ └── improving │ │ │ └── j1hol │ │ │ └── sse │ │ │ └── client │ │ │ ├── PatientHealthMonitorApplication.java │ │ │ ├── PatientHealthMonitorResource.java │ │ │ ├── PatientHealthInfo.java │ │ │ ├── PatientHealthMonitor.java │ │ │ └── PatientHealthInfoCollector.java │ │ └── webapp │ │ └── WEB-INF │ │ └── beans.xml │ ├── nb-configuration.xml │ └── pom.xml ├── CONTRIBUTING.md ├── ed-http2.md ├── ex-servlet.md ├── LICENSE.txt ├── README.md ├── ex-jsonb-beanval.md └── ex-security.md /_config.yml: -------------------------------------------------------------------------------- 1 | plugins: 2 | - jemoji -------------------------------------------------------------------------------- /pic/pic0-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic0-1.jpg -------------------------------------------------------------------------------- /pic/pic0-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic0-2.jpg -------------------------------------------------------------------------------- /pic/pic0-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic0-3.jpg -------------------------------------------------------------------------------- /pic/pic0-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic0-4.jpg -------------------------------------------------------------------------------- /pic/pic0-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic0-5.jpg -------------------------------------------------------------------------------- /pic/pic0-nb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic0-nb.jpg -------------------------------------------------------------------------------- /pic/pic0-nbgf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic0-nbgf.jpg -------------------------------------------------------------------------------- /pic/pic375-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic375-1.jpg -------------------------------------------------------------------------------- /pic/pic375-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic375-2.jpg -------------------------------------------------------------------------------- /pic/picservlet-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/picservlet-1.jpg -------------------------------------------------------------------------------- /pic/picservlet-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/picservlet-2.jpg -------------------------------------------------------------------------------- /pic/pic0-nbgfConfig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic0-nbgfConfig.jpg -------------------------------------------------------------------------------- /pic/pic-configure-rest.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic-configure-rest.jpg -------------------------------------------------------------------------------- /pic/pic-jsonb-beanval-run.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic-jsonb-beanval-run.jpg -------------------------------------------------------------------------------- /pic/pic-jsonb-beanval-test-resource.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/pic/pic-jsonb-beanval-test-resource.jpg -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/j1-hol/HEAD/demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /exercisesolutions/hol-jsonb-beanval/src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Start Page 5 | 6 | 7 | 8 |

Hello World!

9 | 10 | 11 | -------------------------------------------------------------------------------- /demos/j1hol-sse-server/src/main/java/br/com/improving/j1hol/sse/server/PatientHealthInfoApplication.java: -------------------------------------------------------------------------------- 1 | package br.com.improving.j1hol.sse.server; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | import javax.ws.rs.core.Application; 5 | 6 | @ApplicationPath("api") 7 | public class PatientHealthInfoApplication extends Application { 8 | } 9 | -------------------------------------------------------------------------------- /exercisesolutions/j1hol-sse-client/src/main/java/br/com/improving/j1hol/sse/client/PatientHealthMonitorApplication.java: -------------------------------------------------------------------------------- 1 | package br.com.improving.j1hol.sse.client; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | import javax.ws.rs.core.Application; 5 | 6 | @ApplicationPath("api") 7 | public class PatientHealthMonitorApplication extends Application { 8 | } 9 | -------------------------------------------------------------------------------- /demos/j1hol-sse-server/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /exercisesolutions/j1hol-sse-client/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /exercisesolutions/hol-jsonb-beanval/src/main/java/org/j1hol/CustomerContainer.java: -------------------------------------------------------------------------------- 1 | package org.j1hol; 2 | 3 | import java.util.List; 4 | import javax.validation.Valid; 5 | 6 | public class CustomerContainer { 7 | 8 | private List<@Valid Customer> customerList; 9 | 10 | public List getCustomerList() { 11 | return customerList; 12 | } 13 | 14 | public void setCustomerList(List customerList) { 15 | this.customerList = customerList; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/java/com/example/jsonbbeanvaldemo/config/ApplicationConfig.java: -------------------------------------------------------------------------------- 1 | package com.example.jsonbbeanvaldemo.config; 2 | 3 | import java.util.Set; 4 | import javax.ws.rs.core.Application; 5 | 6 | @javax.ws.rs.ApplicationPath("webresources") 7 | public class ApplicationConfig extends Application { 8 | 9 | @Override 10 | public Set> getClasses() { 11 | Set> resources = new java.util.HashSet<>(); 12 | addRestResourceClasses(resources); 13 | return resources; 14 | } 15 | 16 | /** 17 | * Do not modify addRestResourceClasses() method. 18 | * It is automatically populated with 19 | * all resources defined in the project. 20 | * If required, comment out calling this method in getClasses(). 21 | */ 22 | private void addRestResourceClasses(Set> resources) { 23 | resources.add(com.example.jsonbbeanvaldemo.service.CustomerControllerService.class); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /exercisesolutions/j1hol-sse-client/src/main/java/br/com/improving/j1hol/sse/client/PatientHealthMonitorResource.java: -------------------------------------------------------------------------------- 1 | package br.com.improving.j1hol.sse.client; 2 | 3 | import java.util.Optional; 4 | import javax.inject.Inject; 5 | import javax.inject.Singleton; 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.PathParam; 9 | import javax.ws.rs.Produces; 10 | import javax.ws.rs.core.MediaType; 11 | import javax.ws.rs.core.Response; 12 | import javax.ws.rs.core.Response.Status; 13 | 14 | @Path("health") 15 | @Singleton 16 | public class PatientHealthMonitorResource { 17 | @Inject 18 | private PatientHealthInfoCollector collector; 19 | 20 | @Path("{name}") 21 | @GET 22 | @Produces(MediaType.APPLICATION_JSON) 23 | public Response monitor(@PathParam("name") String name) { 24 | Optional monitor = collector.get(name); 25 | 26 | if (monitor.isPresent()) { 27 | return Response.ok(monitor.get()).build(); 28 | } 29 | 30 | return Response.status(Status.NOT_FOUND).build(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /exercisesolutions/hol-jsonb-beanval/src/main/java/org/netbeans/rest/application/config/ApplicationConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package org.netbeans.rest.application.config; 7 | 8 | import java.util.Set; 9 | import javax.ws.rs.core.Application; 10 | 11 | /** 12 | * 13 | * @author heffel 14 | */ 15 | @javax.ws.rs.ApplicationPath("webresources") 16 | public class ApplicationConfig extends Application { 17 | 18 | @Override 19 | public Set> getClasses() { 20 | Set> resources = new java.util.HashSet<>(); 21 | addRestResourceClasses(resources); 22 | return resources; 23 | } 24 | 25 | /** 26 | * Do not modify addRestResourceClasses() method. 27 | * It is automatically populated with 28 | * all resources defined in the project. 29 | * If required, comment out calling this method in getClasses(). 30 | */ 31 | private void addRestResourceClasses(Set> resources) { 32 | resources.add(org.j1hol.JsonBBeanValPracticeService.class); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /exercisesolutions/hol-jsonb-beanval/nb-configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 16 | 1.7-web 17 | gfv3ee6 18 | ide 19 | 20 | 21 | -------------------------------------------------------------------------------- /demos/j1hol-sse-server/src/main/java/br/com/improving/j1hol/sse/server/PatientHealthInfoResource.java: -------------------------------------------------------------------------------- 1 | package br.com.improving.j1hol.sse.server; 2 | 3 | import java.util.concurrent.atomic.AtomicLong; 4 | import javax.annotation.PostConstruct; 5 | import javax.enterprise.event.ObservesAsync; 6 | import javax.inject.Singleton; 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | import javax.ws.rs.Produces; 10 | import javax.ws.rs.core.Context; 11 | import javax.ws.rs.core.MediaType; 12 | import javax.ws.rs.sse.Sse; 13 | import javax.ws.rs.sse.SseBroadcaster; 14 | import javax.ws.rs.sse.SseEventSink; 15 | 16 | @Path("health") 17 | @Singleton 18 | public class PatientHealthInfoResource { 19 | private final AtomicLong messageId = new AtomicLong(); 20 | 21 | @Context 22 | private Sse sse; 23 | private volatile SseBroadcaster broadcaster; 24 | 25 | @PostConstruct 26 | public void init() { 27 | this.broadcaster = sse.newBroadcaster(); 28 | } 29 | 30 | @GET 31 | @Produces(MediaType.SERVER_SENT_EVENTS) 32 | public void register(@Context SseEventSink eventSink) { 33 | broadcaster.register(eventSink); 34 | } 35 | 36 | void on(@ObservesAsync PatientHealthInfo info) { 37 | broadcaster.broadcast(sse.newEventBuilder() 38 | .id(String.valueOf(messageId.getAndIncrement())) 39 | .mediaType(MediaType.APPLICATION_JSON_TYPE) 40 | .name(info.getName()) 41 | .data(PatientHealthInfo.class, info) 42 | .build()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /demos/j1hol-sse-server/nb-configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 16 | 1.7-web 17 | gfv3ee6 18 | true 19 | ide 20 | 21 | 22 | -------------------------------------------------------------------------------- /exercisesolutions/j1hol-sse-client/nb-configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 16 | 1.7-web 17 | gfv3ee6 18 | true 19 | ide 20 | 21 | 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 | # Source Code Submissions 6 | We welcome your contributions and look forward to collaborating with you. We can only accept source code repository 7 | submissions from users who have signed and returned the Oracle 8 | Contributor Agreement. You will find details and the agreement to sign at this OTN web page: 9 | [Oracle Contributor Agreement](http://www.oracle.com/technetwork/community/oca-486395.html). 10 | 11 | # Other Contributions 12 | For all project Submissions other than source code repository contributions, the following also applies: Oracle does 13 | not claim ownership of Your Submissions. However, in order to fulfill 14 | the purposes of this project, You must give Oracle and all Users 15 | the right to post, access, discuss, use, publish, disseminate, and refine 16 | Your Submissions. 17 | 18 | In legalese: *You hereby grant to Oracle and all 19 | Users a royalty-free, perpetual, irrevocable, worldwide, non-exclusive, 20 | and fully sub-licensable right and license, under Your intellectual 21 | property rights, to reproduce, modify, adapt, publish, translate, create 22 | derivative works from, distribute, perform, display, and use Your 23 | Submissions (in whole or part) and to incorporate or implement them in 24 | other works in any form, media, or technology now known or later 25 | developed, all subject to the obligation to retain any copyright notices 26 | included in Your Submissions. All Users, Oracle, and their 27 | sublicensees are responsible for any modifications they make to the 28 | Submissions of others.* 29 | 30 | Copyright © 2017 Oracle and/or its affiliates. All rights reserved. 31 | -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.example 6 | jsonbbeanvaledemo 7 | 1.0 8 | war 9 | 10 | jsonbbeanvaledemo 11 | 12 | 13 | 14 | javax 15 | javaee-web-api 16 | 8.0 17 | provided 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.7.0 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | org.apache.maven.plugins 34 | maven-war-plugin 35 | 3.1.0 36 | 37 | false 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/java/com/example/jsonbbeanvaldemo/dto/Customer.java: -------------------------------------------------------------------------------- 1 | package com.example.jsonbbeanvaldemo.dto; 2 | 3 | import java.time.LocalDate; 4 | import javax.validation.constraints.NotBlank; 5 | import javax.validation.constraints.PastOrPresent; 6 | 7 | public class Customer { 8 | 9 | private String salutation; 10 | 11 | @NotBlank(message = "first name must not be empty") 12 | private String firstName; 13 | private String middleName; 14 | 15 | @NotBlank(message = "last name must not be empty") 16 | private String lastName; 17 | 18 | @PastOrPresent(message = "Date of birth must be in the past") 19 | private LocalDate dateOfBirth; 20 | 21 | public String getSalutation() { 22 | return salutation; 23 | } 24 | 25 | public void setSalutation(String salutation) { 26 | this.salutation = salutation; 27 | } 28 | 29 | public String getFirstName() { 30 | return firstName; 31 | } 32 | 33 | public void setFirstName(String firstName) { 34 | this.firstName = firstName; 35 | } 36 | 37 | public String getMiddleName() { 38 | return middleName; 39 | } 40 | 41 | public void setMiddleName(String middleName) { 42 | this.middleName = middleName; 43 | } 44 | 45 | public String getLastName() { 46 | return lastName; 47 | } 48 | 49 | public void setLastName(String lastName) { 50 | this.lastName = lastName; 51 | } 52 | 53 | public LocalDate getDateOfBirth() { 54 | return dateOfBirth; 55 | } 56 | 57 | public void setDateOfBirth(LocalDate dateOfBirth) { 58 | this.dateOfBirth = dateOfBirth; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /ed-http2.md: -------------------------------------------------------------------------------- 1 | # Servlet 4.0 Exercise 2 | 3 | ## Introduction 4 | 5 | The main feature of the Servlet 4.0 API is to provide HTTP/2 support. In this exercise, we will see what it takes to HTTP/2 enable the simple Web application that we have developed in the previous exercise. 6 | 7 | Check the URL of the application, it connects in clear (i.e. using http) to the port 8080. Now adjust the url to use *https* instead of *http* and to connect to port *8181* instead of port *8080* and connect to that updated URL. 8 | 9 | Chrome will complain by saying that "*Your connection is not private*"; click on *ADVANCED* and then on *Procceed to locahost (unsafe)*. 10 | 11 | ![Your connection is not private](https://github.com/javaee/j1-hol/blob/master/pic/picservlet-2.jpg?raw=true) 12 | 13 | :warning: Chrome complains because GlassFish is using, by default, a self-signed certificate. So while the connection between the browser and GlassFish is crypted (TLS), it can't be trusted. In your application, you should use a certifacate that you can get from a trusted [Certificate Authority](https://en.wikipedia.org/wiki/Certificate_authority). For the sake of this exercise, we can ignore this warning. 14 | 15 | Login as *ed/ED*, you should see the 'main screen' and a small blue lightning at the top right corner. This is Chrome HTTP/2 indicator, blue means that the connection is server over HTTP/2. If you click on it, you will be able to details on the HTTP/2 connection (streams, frames, etc.). This is really all it takes to HTTP/2 enable an exisiting Servlet application, just deploy on a Servlet 4 container! 16 | 17 | ![Chorome HTTP/2 indicator"](https://github.com/javaee/j1-hol/blob/master/pic/picservlet-2.jpg?raw=true) 18 | 19 | -------------------------------------------------------------------------------- /ex-servlet.md: -------------------------------------------------------------------------------- 1 | # Servlet 4 and HTTP/2 Support Exercise 2 | 3 | ## Introduction 4 | 5 | The main feature of the Servlet 4.0 API is to provide HTTP/2 support. In this exercise, we will see what it takes to HTTP/2 enable the simple Web application that we have developed in the previous exercise. 6 | 7 | Check the URL of the application, it connects in clear (i.e. using http) to the port 8080. Now adjust the url to use *https* instead of *http* and to connect to port *8181* instead of port *8080* and connect to that updated URL. 8 | 9 | Chrome will complain by saying that "*Your connection is not private*"; click on *ADVANCED* and then on *Procceed to locahost (unsafe)*. 10 | 11 | ![Your connection is not private](https://github.com/javaee/j1-hol/blob/master/pic/picservlet-1.jpg?raw=true) 12 | 13 | :warning: Chrome complains because GlassFish is using, by default, a self-signed certificate. So while the connection between the browser and GlassFish is encrypted (TLS), it can't be trusted. In your application, you should use a certifacate that you can get from a trusted [Certificate Authority](https://en.wikipedia.org/wiki/Certificate_authority). For the sake of this exercise, we can ignore this warning. 14 | 15 | Login as *ed/ED*, you should see the main page of the application and a small blue lightning at the top right corner. This is Chrome HTTP/2 indicator; *blue* means that the connection is server over HTTP/2. Clicking on it will show details on the HTTP/2 connection (streams, frames, etc.). This is really all it takes to HTTP/2 enable an exisiting Servlet application, just deploy on a Servlet 4 container! 16 | 17 | ![Chorome HTTP/2 indicator"](https://github.com/javaee/j1-hol/blob/master/pic/picservlet-2.jpg?raw=true) 18 | 19 | ### Back to the [Exercices list](https://github.com/javaee/j1-hol#java-ee-8-hands-on-lab). 20 | 21 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 Oracle and/or its affiliates. All rights reserved. Use is 2 | subject to license terms. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of Oracle Corporation nor the names of its contributors 15 | may be used to endorse or promote products derived from this software 16 | without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | You acknowledge that this software is not designed, licensed or intended for 30 | use in the design, construction, operation or maintenance of any nuclear 31 | facility. 32 | -------------------------------------------------------------------------------- /exercisesolutions/hol-jsonb-beanval/src/main/java/org/j1hol/Customer.java: -------------------------------------------------------------------------------- 1 | package org.j1hol; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | import javax.validation.constraints.PositiveOrZero; 5 | 6 | public class Customer { 7 | 8 | private String salutation; 9 | 10 | @NotBlank(message = "first name must not be empty") 11 | private String firstName; 12 | private String middleName; 13 | 14 | @NotBlank(message = "last name must not be empty") 15 | private String lastName; 16 | 17 | @PositiveOrZero 18 | private Integer age; 19 | 20 | public Customer() { 21 | } 22 | 23 | public Customer(String salutation, String firstName, String middleName, String lastName, Integer age) { 24 | this.salutation = salutation; 25 | this.firstName = firstName; 26 | this.middleName = middleName; 27 | this.lastName = lastName; 28 | this.age = age; 29 | } 30 | 31 | public String getSalutation() { 32 | return salutation; 33 | } 34 | 35 | public void setSalutation(String salutation) { 36 | this.salutation = salutation; 37 | } 38 | 39 | public String getFirstName() { 40 | return firstName; 41 | } 42 | 43 | public void setFirstName(String firstName) { 44 | this.firstName = firstName; 45 | } 46 | 47 | public String getMiddleName() { 48 | return middleName; 49 | } 50 | 51 | public void setMiddleName(String middleName) { 52 | this.middleName = middleName; 53 | } 54 | 55 | public String getLastName() { 56 | return lastName; 57 | } 58 | 59 | public void setLastName(String lastName) { 60 | this.lastName = lastName; 61 | } 62 | 63 | public Integer getAge() { 64 | return age; 65 | } 66 | 67 | public void setAge(Integer age) { 68 | this.age = age; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /demos/j1hol-sse-server/src/main/java/br/com/improving/j1hol/sse/server/PatientHealthInfoEmitter.java: -------------------------------------------------------------------------------- 1 | package br.com.improving.j1hol.sse.server; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | import java.util.concurrent.Executors; 6 | import java.util.concurrent.ScheduledExecutorService; 7 | import java.util.concurrent.TimeUnit; 8 | import java.util.stream.IntStream; 9 | import javax.enterprise.context.ApplicationScoped; 10 | import javax.enterprise.context.Initialized; 11 | import javax.enterprise.event.Event; 12 | import javax.enterprise.event.Observes; 13 | import javax.inject.Inject; 14 | import javax.inject.Singleton; 15 | 16 | @Singleton 17 | public class PatientHealthInfoEmitter { 18 | private final List patients = Arrays.asList("Santos", "Heffelfinger", 19 | "Delabassee"); 20 | 21 | @Inject 22 | private Event event; 23 | 24 | // Don't do this at home; injecting a proper SES would require an EAR due to 25 | // JSR-236 not being part of the web profile 26 | private final ScheduledExecutorService executorService = 27 | Executors.newSingleThreadScheduledExecutor(); 28 | 29 | void init(@Observes @Initialized(ApplicationScoped.class) Object event) { 30 | executorService.scheduleAtFixedRate(() -> { 31 | collectPatientsHealthInfo(); 32 | }, 0, 1, TimeUnit.SECONDS); 33 | } 34 | 35 | void collectPatientsHealthInfo() { 36 | IntStream.range(0, patients.size()) 37 | .mapToObj(this::patientHealthInfo) 38 | .forEach(event::fireAsync); 39 | } 40 | 41 | private PatientHealthInfo patientHealthInfo(int index) { 42 | return new PatientHealthInfo(index, patients.get(index), 43 | Math.round(Math.random() * 40) + 100, 44 | Math.round(Math.random() * 40) + 60 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /exercisesolutions/j1hol-sse-client/src/main/java/br/com/improving/j1hol/sse/client/PatientHealthInfo.java: -------------------------------------------------------------------------------- 1 | package br.com.improving.j1hol.sse.client; 2 | 3 | import java.time.Instant; 4 | 5 | public class PatientHealthInfo { 6 | private long id; 7 | private String name; 8 | private Instant timestamp; 9 | private int systolicPressure; 10 | private int diastolicPressure; 11 | private int heartRate; 12 | 13 | public PatientHealthInfo() { 14 | } 15 | 16 | public long getId() { 17 | return id; 18 | } 19 | 20 | public void setId(long id) { 21 | this.id = id; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | 28 | public void setName(String name) { 29 | this.name = name; 30 | } 31 | 32 | public int getSystolicPressure() { 33 | return systolicPressure; 34 | } 35 | 36 | public void setSystolicPressure(int systolicPressure) { 37 | this.systolicPressure = systolicPressure; 38 | } 39 | 40 | public int getDiastolicPressure() { 41 | return diastolicPressure; 42 | } 43 | 44 | public void setDiastolicPressure(int diastolicPressure) { 45 | this.diastolicPressure = diastolicPressure; 46 | } 47 | 48 | public int getHeartRate() { 49 | return heartRate; 50 | } 51 | 52 | public void setHeartRate(int heartRate) { 53 | this.heartRate = heartRate; 54 | } 55 | 56 | public Instant getTimestamp() { 57 | return timestamp; 58 | } 59 | 60 | public void setTimestamp(Instant timestamp) { 61 | this.timestamp = timestamp; 62 | } 63 | 64 | @Override 65 | public String toString() { 66 | return "PatientHealthInfo{" + "id=" + id + ", name=" + name 67 | + ", timestamp=" + timestamp + ", systolicPressure=" 68 | + systolicPressure + ", diastolicPressure=" + diastolicPressure 69 | + ", heartRate=" + heartRate + '}'; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /exercisesolutions/hol-jsonb-beanval/src/main/java/org/j1hol/JsonBBeanValPracticeService.java: -------------------------------------------------------------------------------- 1 | package org.j1hol; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import java.util.Set; 6 | import javax.inject.Inject; 7 | import javax.json.bind.Jsonb; 8 | import javax.json.bind.JsonbBuilder; 9 | import javax.validation.ConstraintViolation; 10 | import javax.validation.Valid; 11 | import javax.validation.Validator; 12 | import javax.ws.rs.GET; 13 | import javax.ws.rs.Path; 14 | import javax.ws.rs.Produces; 15 | import javax.ws.rs.core.MediaType; 16 | import javax.ws.rs.core.Response; 17 | 18 | @Path("jsonbbeanval") 19 | public class JsonBBeanValPracticeService { 20 | 21 | private List<@Valid Customer> customerList; 22 | 23 | @Inject 24 | private Validator validator; 25 | 26 | @GET 27 | @Produces(MediaType.APPLICATION_JSON) 28 | public Response getJson() { 29 | Response response; 30 | populateCustomerList(); 31 | Jsonb jsonb = JsonbBuilder.create(); 32 | CustomerContainer customerContainer = new CustomerContainer(); 33 | 34 | customerContainer.setCustomerList(customerList); 35 | 36 | Set> constraintViolations = validator.validate(customerContainer); 37 | 38 | if (!constraintViolations.isEmpty()) { 39 | constraintViolations.forEach( 40 | constraintViolation -> System.out.println(constraintViolation.getMessage())); 41 | 42 | response = Response.serverError().build(); 43 | } else { 44 | String json = jsonb.toJson(customerList); 45 | response = Response.ok(json).build(); 46 | } 47 | 48 | return response; 49 | } 50 | 51 | private void populateCustomerList() { 52 | customerList = new ArrayList<>(); 53 | 54 | customerList.add(new Customer("Mrs", "Trisha", null, "Gee", 20)); 55 | customerList.add(new Customer("Dr", "James", null, "Gosling", 30)); 56 | customerList.add(new Customer("Mr", "Don", null, "Smith", 30)); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /exercisesolutions/j1hol-sse-client/src/main/java/br/com/improving/j1hol/sse/client/PatientHealthMonitor.java: -------------------------------------------------------------------------------- 1 | package br.com.improving.j1hol.sse.client; 2 | 3 | import java.time.Duration; 4 | import java.time.Instant; 5 | import java.util.Collection; 6 | import java.util.Comparator; 7 | 8 | public class PatientHealthMonitor { 9 | private final String name; 10 | private final Instant timestamp; 11 | private final Duration duration; 12 | private final String pressure; 13 | private final int heartRate; 14 | 15 | public PatientHealthMonitor(Collection infos) { 16 | // If empty, will throw an exception. That's expected 17 | PatientHealthInfo info = infos.stream().findAny().get(); 18 | name = info.getName(); 19 | timestamp = infos.stream() 20 | .map(PatientHealthInfo::getTimestamp) 21 | .max(Comparator.naturalOrder()).get(); 22 | duration = Duration.between(infos.stream() 23 | .map(PatientHealthInfo::getTimestamp) 24 | .min(Comparator.naturalOrder()).get(), 25 | timestamp); 26 | pressure = Math.round(infos.stream() 27 | .mapToInt(PatientHealthInfo::getSystolicPressure) 28 | .average().getAsDouble()) + " / " + 29 | Math.round(infos.stream() 30 | .mapToInt(PatientHealthInfo::getDiastolicPressure) 31 | .average().getAsDouble()); 32 | heartRate = Math.toIntExact(Math.round(infos.stream() 33 | .mapToInt(PatientHealthInfo::getHeartRate) 34 | .average().getAsDouble())); 35 | } 36 | 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | public Instant getTimestamp() { 42 | return timestamp; 43 | } 44 | 45 | public Duration getDuration() { 46 | return duration; 47 | } 48 | 49 | public String getPressure() { 50 | return pressure; 51 | } 52 | 53 | public int getHeartRate() { 54 | return heartRate; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/java/com/example/jsonbbeanvaldemo/service/CustomerControllerService.java: -------------------------------------------------------------------------------- 1 | package com.example.jsonbbeanvaldemo.service; 2 | 3 | import com.example.jsonbbeanvaldemo.dto.Customer; 4 | import java.util.Set; 5 | import java.util.logging.Level; 6 | import java.util.logging.Logger; 7 | import javax.inject.Inject; 8 | import javax.json.bind.Jsonb; 9 | import javax.json.bind.JsonbBuilder; 10 | import javax.validation.ConstraintViolation; 11 | import javax.validation.Validator; 12 | import javax.ws.rs.POST; 13 | import javax.ws.rs.Consumes; 14 | import javax.ws.rs.Path; 15 | import javax.ws.rs.core.MediaType; 16 | import javax.ws.rs.core.Response; 17 | 18 | @Path("/customercontroller") 19 | public class CustomerControllerService { 20 | 21 | private static final Logger LOG = Logger.getLogger(CustomerControllerService.class.getName()); 22 | 23 | @Inject 24 | private Validator validator; 25 | 26 | @POST 27 | @Consumes(MediaType.APPLICATION_JSON) 28 | public Response addCustomer(String customerJson) { 29 | LOG.log(Level.INFO, String.format("addCustomer() invoked with argument %s", customerJson)); 30 | Response response; 31 | 32 | Jsonb jsonb = JsonbBuilder.create(); 33 | 34 | Customer customer = jsonb.fromJson(customerJson, Customer.class); 35 | LOG.log(Level.INFO, "Customer object populated from JSON"); 36 | LOG.log(Level.INFO, String.format("%s %s %s %s %s", customer.getSalutation(), 37 | customer.getFirstName(), 38 | customer.getMiddleName(), 39 | customer.getLastName(), 40 | customer.getDateOfBirth())); 41 | 42 | Set> constraintViolations = validator.validate(customer); 43 | 44 | if (constraintViolations != null && !constraintViolations.isEmpty()) { 45 | constraintViolations.forEach( 46 | constraintViolation -> LOG.log(Level.SEVERE, constraintViolation.getMessage())); 47 | response = Response.serverError().build(); 48 | } else { 49 | response = Response.ok("{}").build(); 50 | } 51 | 52 | return response; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /exercisesolutions/j1hol-sse-client/src/main/java/br/com/improving/j1hol/sse/client/PatientHealthInfoCollector.java: -------------------------------------------------------------------------------- 1 | package br.com.improving.j1hol.sse.client; 2 | 3 | import java.util.ArrayList; 4 | import java.util.HashMap; 5 | import java.util.List; 6 | import java.util.Map; 7 | import java.util.Optional; 8 | import java.util.logging.Level; 9 | import java.util.logging.Logger; 10 | import javax.annotation.PostConstruct; 11 | import javax.inject.Singleton; 12 | import javax.ws.rs.client.Client; 13 | import javax.ws.rs.client.ClientBuilder; 14 | import javax.ws.rs.client.WebTarget; 15 | import javax.ws.rs.core.MediaType; 16 | import javax.ws.rs.sse.InboundSseEvent; 17 | import javax.ws.rs.sse.SseEventSource; 18 | 19 | @Singleton 20 | public class PatientHealthInfoCollector { 21 | private static final Logger LoGGER = Logger.getLogger(PatientHealthInfoCollector.class.getName()); 22 | 23 | private final Map> infosPerPatient 24 | = new HashMap<>(); 25 | 26 | @PostConstruct 27 | void init() { 28 | LoGGER.info("Starting"); 29 | Client client = ClientBuilder.newClient(); 30 | WebTarget target = client.target("http://127.0.0.1:8080/j1hol-sse-server/api/health/"); 31 | SseEventSource source = SseEventSource.target(target).build(); 32 | LoGGER.info("Connecting"); 33 | source.register(this::process, ex -> LoGGER.log(Level.SEVERE, "Error processing SSE", ex)); 34 | source.open(); 35 | LoGGER.info("Reading events"); 36 | } 37 | 38 | private void process(InboundSseEvent event) { 39 | final PatientHealthInfo info = event.readData(PatientHealthInfo.class, 40 | MediaType.APPLICATION_JSON_TYPE); 41 | infosPerPatient.computeIfAbsent(event.getName(), s -> new ArrayList<>()) 42 | .add(info); 43 | LoGGER.info(info.toString()); 44 | } 45 | 46 | public Optional get(String name) { 47 | LoGGER.log(Level.INFO, "Monitoring {0}", name); 48 | return Optional.ofNullable(infosPerPatient.get(name)) 49 | .filter(infos -> !infos.isEmpty()) 50 | .map(PatientHealthMonitor::new); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /demos/j1hol-sse-server/src/main/java/br/com/improving/j1hol/sse/server/PatientHealthInfo.java: -------------------------------------------------------------------------------- 1 | package br.com.improving.j1hol.sse.server; 2 | 3 | import java.time.Instant; 4 | 5 | public class PatientHealthInfo { 6 | private long id; 7 | private String name; 8 | private Instant timestamp; 9 | private int systolicPressure; 10 | private int diastolicPressure; 11 | private int heartRate; 12 | 13 | public PatientHealthInfo(long id, String name, long systolicPressure, long heartRate) { 14 | this.id = id; 15 | this.name = name; 16 | this.timestamp = Instant.now(); 17 | this.systolicPressure = Math.toIntExact(systolicPressure); 18 | this.diastolicPressure = this.systolicPressure - 30; 19 | this.heartRate = Math.toIntExact(heartRate); 20 | } 21 | 22 | public PatientHealthInfo() { 23 | } 24 | 25 | public long getId() { 26 | return id; 27 | } 28 | 29 | public void setId(long id) { 30 | this.id = id; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public void setName(String name) { 38 | this.name = name; 39 | } 40 | 41 | public int getSystolicPressure() { 42 | return systolicPressure; 43 | } 44 | 45 | public void setSystolicPressure(int systolicPressure) { 46 | this.systolicPressure = systolicPressure; 47 | } 48 | 49 | public int getDiastolicPressure() { 50 | return diastolicPressure; 51 | } 52 | 53 | public void setDiastolicPressure(int diastolicPressure) { 54 | this.diastolicPressure = diastolicPressure; 55 | } 56 | 57 | public int getHeartRate() { 58 | return heartRate; 59 | } 60 | 61 | public void setHeartRate(int heartRate) { 62 | this.heartRate = heartRate; 63 | } 64 | 65 | public Instant getTimestamp() { 66 | return timestamp; 67 | } 68 | 69 | public void setTimestamp(Instant timestamp) { 70 | this.timestamp = timestamp; 71 | } 72 | 73 | @Override 74 | public String toString() { 75 | return "PatientHealthInfo{" + "id=" + id + ", name=" + name 76 | + ", timestamp=" + timestamp + ", systolicPressure=" 77 | + systolicPressure + ", diastolicPressure=" + diastolicPressure 78 | + ", heartRate=" + heartRate + '}'; 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /exercisesolutions/hol-jsonb-beanval/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.j1holh 6 | hol-jsonb-beanval 7 | 1.0 8 | war 9 | 10 | hol-jsonb-beanval 11 | 12 | 13 | ${project.build.directory}/endorsed 14 | UTF-8 15 | 16 | 17 | 18 | 19 | javax 20 | javaee-web-api 21 | 8.0 22 | provided 23 | 24 | 25 | 26 | 27 | 28 | 29 | org.apache.maven.plugins 30 | maven-compiler-plugin 31 | 3.1 32 | 33 | 1.8 34 | 1.8 35 | 36 | ${endorsed.dir} 37 | 38 | 39 | 40 | 41 | org.apache.maven.plugins 42 | maven-war-plugin 43 | 2.3 44 | 45 | false 46 | 47 | 48 | 49 | org.apache.maven.plugins 50 | maven-dependency-plugin 51 | 2.6 52 | 53 | 54 | validate 55 | 56 | copy 57 | 58 | 59 | ${endorsed.dir} 60 | true 61 | 62 | 63 | javax 64 | javaee-endorsed-api 65 | 7.0 66 | jar 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /demos/j1hol-sse-server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | br.com.improving 6 | j1hol-sse-server 7 | 1.0.0-SNAPSHOT 8 | war 9 | 10 | j1hol-sse-server 11 | 12 | 13 | ${project.build.directory}/endorsed 14 | UTF-8 15 | 16 | 17 | 18 | 19 | javax.servlet 20 | javax.servlet-api 21 | 4.0.0 22 | provided 23 | 24 | 25 | 26 | javax.ws.rs 27 | javax.ws.rs-api 28 | 2.1 29 | provided 30 | 31 | 32 | 33 | javax.json 34 | javax.json-api 35 | 1.1 36 | provided 37 | 38 | 39 | 40 | javax.enterprise 41 | cdi-api 42 | 2.0 43 | provided 44 | 45 | 46 | 47 | javax.enterprise.concurrent 48 | javax.enterprise.concurrent-api 49 | 1.0-b06 50 | provided 51 | 52 | 53 | 54 | org.testng 55 | testng 56 | 6.8.1 57 | test 58 | 59 | 60 | 61 | 62 | 63 | 64 | org.apache.maven.plugins 65 | maven-compiler-plugin 66 | 3.1 67 | 68 | 1.8 69 | 1.8 70 | 71 | ${endorsed.dir} 72 | 73 | 74 | 75 | 76 | org.apache.maven.plugins 77 | maven-war-plugin 78 | 2.3 79 | 80 | false 81 | 82 | 83 | 84 | org.apache.maven.plugins 85 | maven-dependency-plugin 86 | 2.6 87 | 88 | 89 | validate 90 | 91 | copy 92 | 93 | 94 | ${endorsed.dir} 95 | true 96 | 97 | 98 | javax 99 | javaee-endorsed-api 100 | 7.0 101 | jar 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /exercisesolutions/j1hol-sse-client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | br.com.improving 6 | j1hol-sse-client 7 | 1.0.0-SNAPSHOT 8 | war 9 | 10 | j1hol-sse-client 11 | 12 | 13 | ${project.build.directory}/endorsed 14 | UTF-8 15 | 16 | 17 | 18 | 19 | javax.servlet 20 | javax.servlet-api 21 | 4.0.0 22 | provided 23 | 24 | 25 | 26 | javax.ws.rs 27 | javax.ws.rs-api 28 | 2.1 29 | provided 30 | 31 | 32 | 33 | javax.json 34 | javax.json-api 35 | 1.1 36 | provided 37 | 38 | 39 | 40 | javax.enterprise 41 | cdi-api 42 | 2.0 43 | provided 44 | 45 | 46 | 47 | javax.enterprise.concurrent 48 | javax.enterprise.concurrent-api 49 | 1.0-b06 50 | provided 51 | 52 | 53 | 54 | org.testng 55 | testng 56 | 6.8.1 57 | test 58 | 59 | 60 | 61 | 62 | 63 | 64 | org.apache.maven.plugins 65 | maven-compiler-plugin 66 | 3.1 67 | 68 | 1.8 69 | 1.8 70 | 71 | ${endorsed.dir} 72 | 73 | 74 | 75 | 76 | org.apache.maven.plugins 77 | maven-war-plugin 78 | 2.3 79 | 80 | false 81 | 82 | 83 | 84 | org.apache.maven.plugins 85 | maven-dependency-plugin 86 | 2.6 87 | 88 | 89 | validate 90 | 91 | copy 92 | 93 | 94 | ${endorsed.dir} 95 | true 96 | 97 | 98 | javax 99 | javaee-endorsed-api 100 | 7.0 101 | jar 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/nb-configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 45 | 1.7-web 46 | gfv3ee6 47 | true 48 | js/libs 49 | ide 50 | 51 | 52 | -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Customer Info 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 |
21 |
22 | 23 |
24 |

Enter Customer Information

25 |
26 |
27 |
28 | 36 |
37 |
38 | 39 | 40 |
41 |
42 | 43 | 44 |
45 |
46 | 47 | 48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 |
56 |
57 |
58 | 59 | 60 | 61 | 62 | 107 | 108 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Java EE 8 Hands On Lab 2 | 3 | ## Table of contents 4 | 5 | * [Initial setup](#initial-setup) 6 | * [Exercise 1 : JSON-B 1.0 and Bean Validation 2.0](ex-jsonb-beanval.md) 7 | * [Exercise 2 : Jakarta EE Security API](ex-security.md) 8 | * [Exercise 3 : Servlet 4 and HTTP/2 Support](ex-servlet.md) 9 | * [Exercise 4 : JAX-RS 2.1 and CDI 2.0]() 10 | * [Credits](#Credits) 11 | 12 | 13 | ## Initial setup 14 | 15 | During this "Bring Your Own Laptop" Lab, you will use NetBeans 8.2 and GlassFish 5, the open source Java EE reference implementation to test some of the new Java EE 8 APIs. 16 | 17 | GlassFish 5 is today the only Java EE 8 compatible application server. Over time, this will change as implementors will add support to Java EE 8 to their application servers. This lab will then also work on those application servers. 18 | 19 | ### Install Java SE 8 JDK 20 | 21 | :bulb: Java EE 8 requires Java SE 8 or above. For JavaOne, we will use the latest JDK 8 release. 22 | 23 | :warning: Java EE requires the JDK not just a JRE! 24 | 25 | :warning: GlassFish 5.0 is today only supported on Java SE 8; do not use Java SE 9! GlassFish 5.0.1 will add support Java SE 9. 26 | 27 | If you don't have a recent JDK 8 installed on your laptop, download and install [Java SE 8 Development Kit 8u144](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). 28 | 29 | 30 | ### Install GlassFish 31 | 32 | Download the [final version of GlassFish 5.0](http://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip). To install it, just unzip the archive into a target directory. Take a moment to note the directory where GlassFish 5 is installed as this path will be required in the next step. 33 | 34 | You can now start GlassFish 5... 35 | ``` 36 | cd glassfish5 37 | bin/asadmin start-domain domain1 38 | ``` 39 | 40 | After a few seconds, you should see the following... 41 | ``` 42 | Waiting for domain1 to start ...... 43 | Successfully started the domain : domain1 44 | domain Location: /Users/davidd/work/glassfish5/glassfish/domains/domain1 45 | Log File: /Users/davidd/work/glassfish5/glassfish/domains/domain1/logs/server.log 46 | Admin Port: 4848 47 | Command start-domain executed successfully. 48 | ``` 49 | 50 | You can now connect to the GlassFish Admin Console on [http://localhost:4848](http://localhost:4848). 51 | 52 | ### Install and configure NetBeans 53 | 54 | If you have NetBeans 8.2 with Java EE support already installed on your machine, you can go directly to the NetBeans configuration step. 55 | 56 | ### Install NetBeans 57 | 58 | Download [NetBeans 8.2](https://netbeans.org/downloads/), make sure to download the *"Java EE"* bundle (*"All"* will also work). You can now install and launch NetBeans. 59 | 60 | !["Download NetBeans"](pic/pic0-nb.jpg) 61 | 62 | ### Configure NetBeans 63 | 64 | NetBeans 8.2 comes with GlassFish 4.x (Java EE 7), we will now reconfigure NetBeans to use GlassFish 5 (Java EE 8) instead. 65 | 66 | In NetBeans, select *"Services"* tab, *"Servers"* and right click to select *"Add Server..."*; this will open an *"Add Server Instance"* window. Name your instance, ex. *"GlassFish 5"* and click *Next*. Now in the install location, enter the directory where you have installed GlassFish 5 (see previous step). If everything goes well, NetBeans will confirm that a GlassFish 5.0 installation was found, you can now click *"Next"* and *"Finish"* to accept the default values. 67 | 68 | !["Download NetBeans"](pic/pic0-nbgf.jpg) 69 | 70 | You should now see your *"GlassFish 5"* instance under *"Servers"*. Right click on it, you can now *"Start"* it if it is not started yet. After a few seconds you should see that GF5 is started in the NetBeans Output window at the bottom. 71 | 72 | You can also connect to the GF Admin console ([http://localhost:4848](http://localhost:4848)] to confirm that GF is up and running. 73 | 74 | :bulb: If the *"Start"* option is greyed, just wait a few seconds or select 75 | *"Refresh"* first. 76 | 77 | !["Start GF"](pic/pic0-1.jpg) 78 | 79 | :bulb: When running a project, NetBeans will ask you which server you want to deploy this project on; make sure to always select *"GlassFish 5"* or set it as the default server. 80 | 81 | :bulb: GlassFish comes with a bundled database (Java DB aka Derby). Given that we are not using it, you can disable it to save a few cycles. Just right click on your GlassFish 5 instance, select *"Properties"* and make sure to disable the *"Start Registered Derby Server"* option. For our tests, it is also preferable to disable the *"Preserve Sessions Across Redeployment"* feature. 82 | 83 | !["Configure GF"](pic/pic0-nbgfConfig.jpg) 84 | 85 | 86 | ### Clone the Lab GitHub repository 87 | 88 | The only thing you have to do is to clone the Lab GitHub repository on your machine. 89 | 90 | In NetBeans, choose *"Team", "Git", "Clone..."* 91 | 92 | !["Team", "Git", "Clone..."](pic/pic0-2.jpg) 93 | 94 | ... and enter the URL (https://github.com/javaee/j1-hol.git) of the Lab GitHub repository to clone as below, keep the other default values. 95 | 96 | !["Team", "Git", "Clone..."](pic/pic0-3.jpg) 97 | 98 | Select *"Open Sources in Favourites"* and *"Finish"*. You can check the clone operation in the "Output" windows, the cloned repository should also appear under the *"Favourites"* tab. 99 | 100 | !["Open Sources in Favourites"](pic/pic0-4.jpg) 101 | 102 | :bulb: Sometime when you will add code, NetBeans will complain (e.g. some "imports" are missing). Simply click on the yellow bulb on the left side of the code and NetBeans will, most of the time, provides you with suggestions on how to fix the issue. 103 | 104 | !["NetBeans trick"](pic/pic0-5.jpg) 105 | 106 | You are now all set to do the [first exercise](ex-jsonb-beanval.md)! 107 | 108 | 109 | ## Credits 110 | 111 | This Java EE 8 Hands-on-Lab has been developed by [David Delabassee](https://twitter.com/delabassee) (Java EE Evangelist, Oracle), [David Heffelfinger](https://twitter.com/ensode) (Principal Consultant, Ensode Technology, LLC) and [Michael Nascimento Santos](https://twitter.com/mr__m) (CEO, Improving) for JavaOne 2017. 112 | -------------------------------------------------------------------------------- /ex-jsonb-beanval.md: -------------------------------------------------------------------------------- 1 | # Bean Validation / JSON-B exercise 2 | 3 | ## Initial setup 4 | 5 | In this exercise, we will use [Bean Validation 2.0](http://beanvalidation.org/) to validate a collection of objects. We will also use [JSON-B](http://json-b.net/) to generate a JSON string from a collection of Java objects. 6 | 7 | Start a new Maven project and select *"Web Application"* and give it a meaningful name, ex. *"hol-jsonb-beanval"*, click *"Next"*. 8 | 9 | Select *"GlassFish"* as the application server and *"Java EE7 Web"*, we will update the Java EE API version later. Validate and you should now have an empty project. 10 | 11 | Select the project's *pom.xml*, under *"Project Files"*. Now you can update the project to use Java EE 8 APIs but just updating the version number of the *javaee-web-api* dependency. 12 | 13 | ```xml 14 | 15 | javax 16 | javaee-web-api 17 | 8.0 18 | provided 19 | 20 | ``` 21 | 22 | Additionally, set up the project to use Java 8 23 | 24 | ```xml 25 | 26 | org.apache.maven.plugins 27 | maven-compiler-plugin 28 | 3.1 29 | 30 | 1.8 31 | 1.8 32 | 33 | ${endorsed.dir} 34 | 35 | 36 | 37 | ``` 38 | 39 | :bulb: This Lab is only using APIs from the Java EE 8 Profile which is a subset of the Full platform. 40 | 41 | ## Create a JAX-RS Web service 42 | 43 | Right click on the project, select *"New"* and *"Java Class"*, enter an appropriate class name, eg. *"JsonBBeanValPracticeService"*. Make sure to specify a package where you code will reside, eg. *"org.j1hol"* then *"finish"*. 44 | 45 | Annotate your class with the `@Path` annotation, specifying an appropriate path for our web service, eg. `@Path("jsonbbeanval")`. 46 | 47 | :bulb: Add all missing imports by hitting `CTRL+SHIFT+I`. 48 | 49 | NetBeans will warn that REST is not configured, click on the class name and hit `Alt+Enter`, then select "Configure REST using Java EE 6 Specification". 50 | 51 | ![Configure REST](pic/pic-configure-rest.jpg) 52 | 53 | Add a public method named `getJson()` to your class, the method should be public, take no arguments, and return `javax.ws.rs.core.Response` 54 | 55 | Annotate your method with the `@GET` annotation to have the method respond to HTTP GET requests. 56 | 57 | Annotate your method with the `@Produces` annotation, specifying `MediaType.APPLICATION_JSON` as the value attribute of the annotation. 58 | 59 | At this point your method should look like this: 60 | 61 | ```java 62 | @GET 63 | @Produces(MediaType.APPLICATION_JSON) 64 | public Response getJson() { 65 | } 66 | ``` 67 | Add a `Customer` class to your project (Right click on the project, select *"New"* | "*Java Class*"). This class will be used as a Data Transfer Object (DTO), its contents should look as follows (copy/paste into your class): 68 | 69 | ```java 70 | package org.j1hol; 71 | 72 | import javax.validation.constraints.NotBlank; 73 | import javax.validation.constraints.PositiveOrZero; 74 | 75 | public class Customer { 76 | 77 | private String salutation; 78 | 79 | @NotBlank(message = "first name must not be empty") 80 | private String firstName; 81 | private String middleName; 82 | 83 | @NotBlank(message = "last name must not be empty") 84 | private String lastName; 85 | 86 | @PositiveOrZero 87 | private Integer age; 88 | 89 | public Customer() { 90 | } 91 | 92 | public Customer(String salutation, String firstName, String middleName, String lastName, Integer age) { 93 | this.salutation = salutation; 94 | this.firstName = firstName; 95 | this.middleName = middleName; 96 | this.lastName = lastName; 97 | this.age = age; 98 | } 99 | 100 | public String getSalutation() { 101 | return salutation; 102 | } 103 | 104 | public void setSalutation(String salutation) { 105 | this.salutation = salutation; 106 | } 107 | 108 | public String getFirstName() { 109 | return firstName; 110 | } 111 | 112 | public void setFirstName(String firstName) { 113 | this.firstName = firstName; 114 | } 115 | 116 | public String getMiddleName() { 117 | return middleName; 118 | } 119 | 120 | public void setMiddleName(String middleName) { 121 | this.middleName = middleName; 122 | } 123 | 124 | public String getLastName() { 125 | return lastName; 126 | } 127 | 128 | public void setLastName(String lastName) { 129 | this.lastName = lastName; 130 | } 131 | 132 | public Integer getAge() { 133 | return age; 134 | } 135 | 136 | public void setAge(Integer age) { 137 | this.age = age; 138 | } 139 | 140 | } 141 | ``` 142 | :bulb: Notice the Bean Validation annotations on the class. 143 | 144 | Add a private variable of type `List` to your web service class (`JsonBBeanValPracticeService`), using generics, specify that the list will accept only instances of the `Customer` class we just created, annotate the type of the parameterized type with Bean Validation's `@Valid` annotation. 145 | 146 | ```java 147 | private List<@Valid Customer> customerList; 148 | ``` 149 | 150 | Add a private method to populate the List of customers, as follows: 151 | 152 | ```java 153 | private void populateCustomerList() { 154 | customerList = new ArrayList<>(); 155 | 156 | customerList.add(new Customer("Mrs", "Trisha", null, "Gee", 20)); 157 | customerList.add(new Customer("Dr", "James", null, "Gosling", 30)); 158 | customerList.add(new Customer("Mr", "Don", null, "Smith", -10)); 159 | } 160 | 161 | ``` 162 | 163 | :bulb: Notice the third element on the list has an invalid age, which should trigger a validation error. 164 | 165 | Add an invocation to the `populateCustomerList()` method to the `getJson()` method. 166 | 167 | ```java 168 | @GET 169 | @Produces(MediaType.APPLICATION_JSON) 170 | public Response getJson() { 171 | populateCustomerList(); 172 | } 173 | ``` 174 | 175 | Inject an instance of `javax.validation.Validator` to your web service class. 176 | 177 | ```java 178 | @Inject 179 | private Validator validator; 180 | ``` 181 | 182 | :bulb: NetBeans will warn about an unsatisfied injection point, this warning can be safely ignored. 183 | 184 | Add a local variable of type `javax.ws.rs.core.Response` to your `getJson()` method. 185 | 186 | ```java 187 | Response response; 188 | ``` 189 | 190 | Add code to validate all elements on the list by invoking the `validate()` method on the injected `Validator`. 191 | 192 | ```java 193 | Set>> constraintViolations = validator.validate(customerList); 194 | ``` 195 | Check to see if there are any constraint violations, if so, iterate through them and send the corresponding error messages to the GlassFish log, then set the value of the Response variable so that it indicates a server error. 196 | 197 | ```java 198 | if (!constraintViolations.isEmpty()) { 199 | constraintViolations.forEach( 200 | constraintViolation -> System.out.println(constraintViolation.getMessage())); 201 | 202 | response = Response.serverError().build(); 203 | } 204 | ``` 205 | 206 | Add a local variable of type `javax.json.bind.Jsonb` to the `getJson()` method, initialize it by invoking the `create()` method on `javax.json.bind.JsonbBuilder`. 207 | 208 | ```java 209 | Jsonb jsonb = JsonbBuilder.create(); 210 | ``` 211 | 212 | If there are no constraint violations, add an `else` statement to the conditional above, inside it, build a JSON string from the Customer list using the JSON-B API, then build a "success" response that sends the generated JSON string to the client. 213 | 214 | ```java 215 | else { 216 | String json = jsonb.toJson(customerList); 217 | response = Response.ok(json).build(); 218 | } 219 | ``` 220 | Return your `Response` variable from your `getJson()` method. 221 | 222 | ```java 223 | return response; 224 | ``` 225 | 226 | Deploy your project by right clicking on it and selecting *"Run"* 227 | 228 | ![Deploy project](pic/pic-jsonb-beanval-run.jpg) 229 | 230 | :bulb: A "Hello World" page will pop up in the browser, this page is automatically generated by NetBeans and can be safely ignored. 231 | 232 | Test your web service by expanding *"RESTful Web Services | JsonBBeanValPracticeService | HTTP Methods | getJson(): Response"*, then right click *"Test Resource URI"* 233 | 234 | ![Test resource](pic/pic-jsonb-beanval-test-resource.jpg) 235 | 236 | Did you get the result you were expecting? Why or why not? 237 | 238 | One "gotcha" of validating collections using Bean Validation is tht they can't be validated directly, they need to be a property of a bean in order to be validated, therefore, we have a a bit more work before our customer list can be validated properly. 239 | 240 | Create a class called `CustomerContainer`, this class should have a single property of type `List<@Valid Customer>`. 241 | 242 | ```java 243 | package org.j1hol; 244 | 245 | import java.util.List; 246 | import javax.validation.Valid; 247 | 248 | public class CustomerContainer { 249 | 250 | private List<@Valid Customer> customerList; 251 | 252 | public List getCustomerList() { 253 | return customerList; 254 | } 255 | 256 | public void setCustomerList(List customerList) { 257 | this.customerList = customerList; 258 | } 259 | 260 | } 261 | ``` 262 | 263 | Create an instance of `CustomerContainer` in the `getJson()` method of your web service class, then set the `customerList` property of `CustomerContainer` to the list of customers in the web service class. 264 | 265 | ```java 266 | CustomerContainer customerContainer = new CustomerContainer(); 267 | customerContainer.setCustomerList(customerList); 268 | ``` 269 | 270 | Modify the call to validator.validate() so that it validates `CustomerContainer`. 271 | 272 | i.e change this line: 273 | 274 | ```java 275 | Set>> constraintViolations = validator.validate(customerList); 276 | ``` 277 | 278 | to 279 | 280 | ```java 281 | Set> constraintViolations = validator.validate(customerContainer); 282 | ``` 283 | 284 | Verify that validation now fails. 285 | 286 | Change the age of the third element on the list to a positive number, test your web service and verify that validation passes. 287 | 288 | ### Back to the [Exercises list](https://github.com/javaee/j1-hol#java-ee-8-hands-on-lab). 289 | -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/jquery/core.js: -------------------------------------------------------------------------------- 1 | /* global Symbol */ 2 | // Defining this global in .eslintrc.json would create a danger of using the global 3 | // unguarded in another place, it seems safer to define global only for this module 4 | 5 | define( [ 6 | "./var/arr", 7 | "./var/document", 8 | "./var/getProto", 9 | "./var/slice", 10 | "./var/concat", 11 | "./var/push", 12 | "./var/indexOf", 13 | "./var/class2type", 14 | "./var/toString", 15 | "./var/hasOwn", 16 | "./var/fnToString", 17 | "./var/ObjectFunctionString", 18 | "./var/support", 19 | "./core/DOMEval" 20 | ], function( arr, document, getProto, slice, concat, push, indexOf, 21 | class2type, toString, hasOwn, fnToString, ObjectFunctionString, 22 | support, DOMEval ) { 23 | 24 | "use strict"; 25 | 26 | var 27 | version = "3.2.1", 28 | 29 | // Define a local copy of jQuery 30 | jQuery = function( selector, context ) { 31 | 32 | // The jQuery object is actually just the init constructor 'enhanced' 33 | // Need init if jQuery is called (just allow error to be thrown if not included) 34 | return new jQuery.fn.init( selector, context ); 35 | }, 36 | 37 | // Support: Android <=4.0 only 38 | // Make sure we trim BOM and NBSP 39 | rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, 40 | 41 | // Matches dashed string for camelizing 42 | rmsPrefix = /^-ms-/, 43 | rdashAlpha = /-([a-z])/g, 44 | 45 | // Used by jQuery.camelCase as callback to replace() 46 | fcamelCase = function( all, letter ) { 47 | return letter.toUpperCase(); 48 | }; 49 | 50 | jQuery.fn = jQuery.prototype = { 51 | 52 | // The current version of jQuery being used 53 | jquery: version, 54 | 55 | constructor: jQuery, 56 | 57 | // The default length of a jQuery object is 0 58 | length: 0, 59 | 60 | toArray: function() { 61 | return slice.call( this ); 62 | }, 63 | 64 | // Get the Nth element in the matched element set OR 65 | // Get the whole matched element set as a clean array 66 | get: function( num ) { 67 | 68 | // Return all the elements in a clean array 69 | if ( num == null ) { 70 | return slice.call( this ); 71 | } 72 | 73 | // Return just the one element from the set 74 | return num < 0 ? this[ num + this.length ] : this[ num ]; 75 | }, 76 | 77 | // Take an array of elements and push it onto the stack 78 | // (returning the new matched element set) 79 | pushStack: function( elems ) { 80 | 81 | // Build a new jQuery matched element set 82 | var ret = jQuery.merge( this.constructor(), elems ); 83 | 84 | // Add the old object onto the stack (as a reference) 85 | ret.prevObject = this; 86 | 87 | // Return the newly-formed element set 88 | return ret; 89 | }, 90 | 91 | // Execute a callback for every element in the matched set. 92 | each: function( callback ) { 93 | return jQuery.each( this, callback ); 94 | }, 95 | 96 | map: function( callback ) { 97 | return this.pushStack( jQuery.map( this, function( elem, i ) { 98 | return callback.call( elem, i, elem ); 99 | } ) ); 100 | }, 101 | 102 | slice: function() { 103 | return this.pushStack( slice.apply( this, arguments ) ); 104 | }, 105 | 106 | first: function() { 107 | return this.eq( 0 ); 108 | }, 109 | 110 | last: function() { 111 | return this.eq( -1 ); 112 | }, 113 | 114 | eq: function( i ) { 115 | var len = this.length, 116 | j = +i + ( i < 0 ? len : 0 ); 117 | return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); 118 | }, 119 | 120 | end: function() { 121 | return this.prevObject || this.constructor(); 122 | }, 123 | 124 | // For internal use only. 125 | // Behaves like an Array's method, not like a jQuery method. 126 | push: push, 127 | sort: arr.sort, 128 | splice: arr.splice 129 | }; 130 | 131 | jQuery.extend = jQuery.fn.extend = function() { 132 | var options, name, src, copy, copyIsArray, clone, 133 | target = arguments[ 0 ] || {}, 134 | i = 1, 135 | length = arguments.length, 136 | deep = false; 137 | 138 | // Handle a deep copy situation 139 | if ( typeof target === "boolean" ) { 140 | deep = target; 141 | 142 | // Skip the boolean and the target 143 | target = arguments[ i ] || {}; 144 | i++; 145 | } 146 | 147 | // Handle case when target is a string or something (possible in deep copy) 148 | if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { 149 | target = {}; 150 | } 151 | 152 | // Extend jQuery itself if only one argument is passed 153 | if ( i === length ) { 154 | target = this; 155 | i--; 156 | } 157 | 158 | for ( ; i < length; i++ ) { 159 | 160 | // Only deal with non-null/undefined values 161 | if ( ( options = arguments[ i ] ) != null ) { 162 | 163 | // Extend the base object 164 | for ( name in options ) { 165 | src = target[ name ]; 166 | copy = options[ name ]; 167 | 168 | // Prevent never-ending loop 169 | if ( target === copy ) { 170 | continue; 171 | } 172 | 173 | // Recurse if we're merging plain objects or arrays 174 | if ( deep && copy && ( jQuery.isPlainObject( copy ) || 175 | ( copyIsArray = Array.isArray( copy ) ) ) ) { 176 | 177 | if ( copyIsArray ) { 178 | copyIsArray = false; 179 | clone = src && Array.isArray( src ) ? src : []; 180 | 181 | } else { 182 | clone = src && jQuery.isPlainObject( src ) ? src : {}; 183 | } 184 | 185 | // Never move original objects, clone them 186 | target[ name ] = jQuery.extend( deep, clone, copy ); 187 | 188 | // Don't bring in undefined values 189 | } else if ( copy !== undefined ) { 190 | target[ name ] = copy; 191 | } 192 | } 193 | } 194 | } 195 | 196 | // Return the modified object 197 | return target; 198 | }; 199 | 200 | jQuery.extend( { 201 | 202 | // Unique for each copy of jQuery on the page 203 | expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 204 | 205 | // Assume jQuery is ready without the ready module 206 | isReady: true, 207 | 208 | error: function( msg ) { 209 | throw new Error( msg ); 210 | }, 211 | 212 | noop: function() {}, 213 | 214 | isFunction: function( obj ) { 215 | return jQuery.type( obj ) === "function"; 216 | }, 217 | 218 | isWindow: function( obj ) { 219 | return obj != null && obj === obj.window; 220 | }, 221 | 222 | isNumeric: function( obj ) { 223 | 224 | // As of jQuery 3.0, isNumeric is limited to 225 | // strings and numbers (primitives or objects) 226 | // that can be coerced to finite numbers (gh-2662) 227 | var type = jQuery.type( obj ); 228 | return ( type === "number" || type === "string" ) && 229 | 230 | // parseFloat NaNs numeric-cast false positives ("") 231 | // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 232 | // subtraction forces infinities to NaN 233 | !isNaN( obj - parseFloat( obj ) ); 234 | }, 235 | 236 | isPlainObject: function( obj ) { 237 | var proto, Ctor; 238 | 239 | // Detect obvious negatives 240 | // Use toString instead of jQuery.type to catch host objects 241 | if ( !obj || toString.call( obj ) !== "[object Object]" ) { 242 | return false; 243 | } 244 | 245 | proto = getProto( obj ); 246 | 247 | // Objects with no prototype (e.g., `Object.create( null )`) are plain 248 | if ( !proto ) { 249 | return true; 250 | } 251 | 252 | // Objects with prototype are plain iff they were constructed by a global Object function 253 | Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; 254 | return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; 255 | }, 256 | 257 | isEmptyObject: function( obj ) { 258 | 259 | /* eslint-disable no-unused-vars */ 260 | // See https://github.com/eslint/eslint/issues/6125 261 | var name; 262 | 263 | for ( name in obj ) { 264 | return false; 265 | } 266 | return true; 267 | }, 268 | 269 | type: function( obj ) { 270 | if ( obj == null ) { 271 | return obj + ""; 272 | } 273 | 274 | // Support: Android <=2.3 only (functionish RegExp) 275 | return typeof obj === "object" || typeof obj === "function" ? 276 | class2type[ toString.call( obj ) ] || "object" : 277 | typeof obj; 278 | }, 279 | 280 | // Evaluates a script in a global context 281 | globalEval: function( code ) { 282 | DOMEval( code ); 283 | }, 284 | 285 | // Convert dashed to camelCase; used by the css and data modules 286 | // Support: IE <=9 - 11, Edge 12 - 13 287 | // Microsoft forgot to hump their vendor prefix (#9572) 288 | camelCase: function( string ) { 289 | return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 290 | }, 291 | 292 | each: function( obj, callback ) { 293 | var length, i = 0; 294 | 295 | if ( isArrayLike( obj ) ) { 296 | length = obj.length; 297 | for ( ; i < length; i++ ) { 298 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 299 | break; 300 | } 301 | } 302 | } else { 303 | for ( i in obj ) { 304 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 305 | break; 306 | } 307 | } 308 | } 309 | 310 | return obj; 311 | }, 312 | 313 | // Support: Android <=4.0 only 314 | trim: function( text ) { 315 | return text == null ? 316 | "" : 317 | ( text + "" ).replace( rtrim, "" ); 318 | }, 319 | 320 | // results is for internal usage only 321 | makeArray: function( arr, results ) { 322 | var ret = results || []; 323 | 324 | if ( arr != null ) { 325 | if ( isArrayLike( Object( arr ) ) ) { 326 | jQuery.merge( ret, 327 | typeof arr === "string" ? 328 | [ arr ] : arr 329 | ); 330 | } else { 331 | push.call( ret, arr ); 332 | } 333 | } 334 | 335 | return ret; 336 | }, 337 | 338 | inArray: function( elem, arr, i ) { 339 | return arr == null ? -1 : indexOf.call( arr, elem, i ); 340 | }, 341 | 342 | // Support: Android <=4.0 only, PhantomJS 1 only 343 | // push.apply(_, arraylike) throws on ancient WebKit 344 | merge: function( first, second ) { 345 | var len = +second.length, 346 | j = 0, 347 | i = first.length; 348 | 349 | for ( ; j < len; j++ ) { 350 | first[ i++ ] = second[ j ]; 351 | } 352 | 353 | first.length = i; 354 | 355 | return first; 356 | }, 357 | 358 | grep: function( elems, callback, invert ) { 359 | var callbackInverse, 360 | matches = [], 361 | i = 0, 362 | length = elems.length, 363 | callbackExpect = !invert; 364 | 365 | // Go through the array, only saving the items 366 | // that pass the validator function 367 | for ( ; i < length; i++ ) { 368 | callbackInverse = !callback( elems[ i ], i ); 369 | if ( callbackInverse !== callbackExpect ) { 370 | matches.push( elems[ i ] ); 371 | } 372 | } 373 | 374 | return matches; 375 | }, 376 | 377 | // arg is for internal usage only 378 | map: function( elems, callback, arg ) { 379 | var length, value, 380 | i = 0, 381 | ret = []; 382 | 383 | // Go through the array, translating each of the items to their new values 384 | if ( isArrayLike( elems ) ) { 385 | length = elems.length; 386 | for ( ; i < length; i++ ) { 387 | value = callback( elems[ i ], i, arg ); 388 | 389 | if ( value != null ) { 390 | ret.push( value ); 391 | } 392 | } 393 | 394 | // Go through every key on the object, 395 | } else { 396 | for ( i in elems ) { 397 | value = callback( elems[ i ], i, arg ); 398 | 399 | if ( value != null ) { 400 | ret.push( value ); 401 | } 402 | } 403 | } 404 | 405 | // Flatten any nested arrays 406 | return concat.apply( [], ret ); 407 | }, 408 | 409 | // A global GUID counter for objects 410 | guid: 1, 411 | 412 | // Bind a function to a context, optionally partially applying any 413 | // arguments. 414 | proxy: function( fn, context ) { 415 | var tmp, args, proxy; 416 | 417 | if ( typeof context === "string" ) { 418 | tmp = fn[ context ]; 419 | context = fn; 420 | fn = tmp; 421 | } 422 | 423 | // Quick check to determine if target is callable, in the spec 424 | // this throws a TypeError, but we will just return undefined. 425 | if ( !jQuery.isFunction( fn ) ) { 426 | return undefined; 427 | } 428 | 429 | // Simulated bind 430 | args = slice.call( arguments, 2 ); 431 | proxy = function() { 432 | return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); 433 | }; 434 | 435 | // Set the guid of unique handler to the same of original handler, so it can be removed 436 | proxy.guid = fn.guid = fn.guid || jQuery.guid++; 437 | 438 | return proxy; 439 | }, 440 | 441 | now: Date.now, 442 | 443 | // jQuery.support is not used in Core but other projects attach their 444 | // properties to it so it needs to exist. 445 | support: support 446 | } ); 447 | 448 | if ( typeof Symbol === "function" ) { 449 | jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; 450 | } 451 | 452 | // Populate the class2type map 453 | jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 454 | function( i, name ) { 455 | class2type[ "[object " + name + "]" ] = name.toLowerCase(); 456 | } ); 457 | 458 | function isArrayLike( obj ) { 459 | 460 | // Support: real iOS 8.2 only (not reproducible in simulator) 461 | // `in` check used to prevent JIT error (gh-2145) 462 | // hasOwn isn't used here due to false negatives 463 | // regarding Nodelist length in IE 464 | var length = !!obj && "length" in obj && obj.length, 465 | type = jQuery.type( obj ); 466 | 467 | if ( type === "function" || jQuery.isWindow( obj ) ) { 468 | return false; 469 | } 470 | 471 | return type === "array" || length === 0 || 472 | typeof length === "number" && length > 0 && ( length - 1 ) in obj; 473 | } 474 | 475 | return jQuery; 476 | } ); 477 | -------------------------------------------------------------------------------- /ex-security.md: -------------------------------------------------------------------------------- 1 | # Java EE Security API exercise 2 | 3 | ## Initial setup 4 | 5 | In this exercise, we will use the new [Java EE Security API (JSR 375)](https://jcp.org/aboutJava/communityprocess/final/jsr375/index.html) to secure a Web application. 6 | 7 | Start a new Maven project and select *"Web Application"* and give it a meaningful name, ex. *"hol-security"*, click *"Next"*. 8 | 9 | Select *"GlassFish"* as the application server and *"Java EE7 Web"*, we will update the Java EE API version later. Validate and you should now have an empty project. 10 | 11 | Select the project's *pom.xml*, under *"Project Files"*. Now you can update the project to use Java EE 8 APIs but just updating the version number of the ** dependency. 12 | 13 | ```xml 14 | 15 | javax 16 | javaee-api 17 | 8.0 18 | provided 19 | 20 | ``` 21 | 22 | :bulb: This Lab is only using APIs from the Java EE 8 Profile which is a subset of the Full platform. 23 | 24 | 25 | ## Create the Web application 26 | 27 | We will now create a Servlet-based Web application that we will then secure using the new Java EE Security API. 28 | 29 | Right click on the project, select *"new"* and *"servlet"*. 30 | Make sure to specify a package where you code will reside, eg. *"org.j1hol"* and click *"next"* then *"finish"*. 31 | 32 | :bulb: We need to make sure to enable CDI. For that, we need to create an empty beans.xml in the WEB-INF directory. Beans.xml can also be used to customise the CDI container; when it's empty, it's just a marker file that tell the application server that CDI is used. 33 | 34 | In the project, locate the WEB-INF directory under "Web Pages" and right click to create an empty file called beans.xml 35 | 36 | :bulb: Even tough the file looks empty, it's not as it's size is 1 byte. That means that GlassFish will parse it so it has to be a valid XML file. Just add ** to make sure that it is indeed a valid XML file. So instead of an empty file, we have have created a valid empty xml file! 37 | 38 | 39 | Navigate to the servlet source that has just been created and locate the *processRequest* method. 40 | 41 | Update it as follow 42 | 43 | ```java 44 | protected void processRequest(HttpServletRequest request, HttpServletResponse response) 45 | throws ServletException, IOException { 46 | response.setContentType("text/html;charset=UTF-8"); 47 | try (PrintWriter out = response.getWriter()) { 48 | out.println(""); 49 | out.println("
"); 51 | out.println("Java EE 8 HoL
"); 52 | out.println(request.getAuthType()); 53 | out.println("
"); 54 | } 55 | } 56 | ``` 57 | 58 | Now right click and select *"Run File"*. This action will compile and deploy our Web Application to GlassFish 5, NetBeans will then launch the browser to test it. 59 | 60 | If it works, you will simply see the text produced by the processRequest method "Java EE HoL". 61 | 62 | :bulb: When testing your application, always make sure to connect to the servlet and not to the *index.html* that NetBeans also creates! 63 | 64 | ## Secure the Web application 65 | 66 | We now have a simple CDI enabled Servlet 4.0 basic application that we will secure using the Java EE Security API. 67 | 68 | :warning: To demonstrate the concept, we will use [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication), a simple mechanism where the browser sends the user name and the password as unencrypted base64 encoded text to the server. This is **clearly not a secure approach and it shouldn't be used for any serious application:bangbang:** 69 | 70 | In a pre Java EE 8 application, we would have to rely on application servers specific feature to configure this (ex. XML file, Admin Console, etc). In Java EE 8, it is simple and portable as the Java EE Security API introduces annotations to cope with different authentications mechanisms: [@BasicAuthenticationMechanismDefinition](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/authentication/mechanism/http/BasicAuthenticationMechanismDefinition.html), [@FormAuthenticationMechanismDefinition](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/authentication/mechanism/http/FormAuthenticationMechanismDefinition.html), [CustomFormAuthenticationMechanismDefinition](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/authentication/mechanism/http/CustomFormAuthenticationMechanismDefinition.html). 71 | 72 | In the servlet class source, you should have the following annotation 73 | 74 | ```java 75 | @WebServlet(name = "NewServlet", urlPatterns = {"/test"}) 76 | ``` 77 | :arrow_right: We are specifying to GlassFish Web container that this class is a servlet and that its url is *"/test"* (under the the context of the Web application). 78 | 79 | You can now add the following annotations: 80 | ```java 81 | @DeclareRoles({"foo", "bar"}) 82 | ``` 83 | :arrow_right: This annotation specific that our application will work with 2 types of user roles: foo & bar. 84 | 85 | ```java 86 | @ServletSecurity(@HttpConstraint(rolesAllowed = "foo")) 87 | ``` 88 | :arrow_right: This annotation specify security constraints to be enforced by the Servlet container on HTTP protocol messages, i.e. only user of role *"foo"* will be allowed. 89 | 90 | ```java 91 | @BasicAuthenticationMechanismDefinition(realmName="HOL-basic" ) 92 | ``` 93 | :arrow_right: This annotation specify to the container that it should use the HTTP basic access authentication mechanism, it will be made available as an CDI enabled bean. The *realmName* pass in parameter will be used in the *WWW-Authenticate* header. 94 | 95 | ```java 96 | @EmbeddedIdentityStoreDefinition({ 97 | @Credentials(callerName = "david", password = "david", groups = {"foo"}), 98 | @Credentials(callerName = "ed", password = "ed", groups = {"bar",}), 99 | @Credentials(callerName = "michael", password = "michael", groups = {"foo"})} 100 | ) 101 | ``` 102 | 103 | :arrow_right: This annotation is used to specify which IdentityStore to use, in this case, we will use the Embedded Identity Store which require to directly specify our users. 104 | 105 | :warning: In the interest of time, we will take a shortcut and use the most basic IdentityStore to store our users: EmbeddedIdentityStore. This identity store allows you to store users details (username, password and groups) in your code in clear! *This is highly unsecure and not something you should do for any applications:bangbang:* 106 | Since EmbeddedIdentityStore is unsecure it was decided to not include it in the specification. Technically, the EmbeddedIdentityStore is provided by Soteria, the JSR 375 Reference Implementation so it is also available as part of GlassFish 5. 107 | 108 | To compile your code, you need to add the Soteria dependency to your pom.xml 109 | 110 | ```xml 111 | 112 | org.glassfish.soteria 113 | javax.security.enterprise 114 | 1.0 115 | provided 116 | 117 | ``` 118 | 119 | Now you can test the application, *david* and *michael* should be able to log in the application while *ed* should be rejected (HTTP Status 403 - Forbidden) as he doesn't have the approrpiate *"foo"* role. This error page is obviously customizable but that is beyond the scope of this exercise. 120 | 121 | ![403 Forbidden](https://raw.githubusercontent.com/javaee/j1-hol/master/pic/pic375-2.jpg) 122 | 123 | :bulb: To avoid caching issue, just start Chrome in Incognito mode each time you want to test authentication. 124 | 125 | # Secure the application using a custom IdentityStore 126 | 127 | In the previous step, you saw that it was possible to easily secure a web application in a portable way! 128 | To illustrate the concepts, we have used an *EmbeddedIdentityStore* which, by design, is not secure. The Java EE Security API defines IndentityStore that are designed to cope with modern applications, namely the **LdapIdentityStore** and the **DatabaseIdentityStore** which be used to (securely!) store users information respectvely in a LDAP and in a database. These stores can be configured using the [@LdapIdentityStoreDefinition](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/identitystore/LdapIdentityStoreDefinition.html) and the [@DatabaseIdentityStoreDefinition](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/identitystore/DatabaseIdentityStoreDefinition.html) annotations. 129 | 130 | The Java EE Security API can be extended. In this exercise, we will evolve our application to use a custom [IndentityStore](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/identitystore/IdentityStore.html) instead of the *EmbeddedIdentityStore*. In the interest of time, the [IndentityStore](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/identitystore/IdentityStore.html) we will focus on how to validate a user and not how to retreive his/her details from a secure store. 131 | 132 | In the servlet class, remove or comment the *@EmbeddedIdentityStoreDefinition* annotation. Now create a java class named **TestIdentityStore.java**. As this class will implement an IndentiyStore, it has to implement the [IndentityStore](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/identitystore/IdentityStore.html) interface. Also make sure the class has the *Application* scope by annotating it with [@ApplicationScoped](https://javaee.github.io/javaee-spec/javadocs/javax/enterprise/context/ApplicationScoped.html) as below. 133 | 134 | ```java 135 | @ApplicationScoped 136 | public class TestIdentityStore implements IdentityStore { 137 | ... 138 | ``` 139 | NetBeans will complain that some imports are missing, fix those. 140 | 141 | ![NetBeans helps to fix the imports..."](https://raw.githubusercontent.com/javaee/j1-hol/master/pic/pic375-1.jpg) 142 | 143 | ```java 144 | import javax.enterprise.context.ApplicationScoped; 145 | import javax.security.enterprise.identitystore.IdentityStore; 146 | ``` 147 | 148 | We need to implement the [validate](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/identitystore/IdentityStore.html#validate-javax.security.enterprise.credential.Credential-) method. This method will receive a [credential](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/credential/Credential.html) object for the user trying to access the application and will validate the user against his/her details stored somewhere. For this exercise, we will simply store those details in an in-memory map, which again is not very secure! In a real application, your custom *IdentityStore* would fetch the user information from a secure store. 149 | 150 | Add this code to create and populate the map that will hold our users. 151 | 152 | ```java 153 | private static final Map unsecureStore = new HashMap<>(); 154 | 155 | public TestIdentityStore() { 156 | // Don't do this at home, highly unsecure! 157 | unsecureStore.put("david", "DAVID"); 158 | unsecureStore.put("ed", "ED"); 159 | unsecureStore.put("lisa", "LISA"); 160 | unsecureStore.put("michael", "MICHAEL"); 161 | } 162 | ``` 163 | :bulb:A IdentityStore can store user details, role information or both. In our exercise, we are taking another shortcut as the profile is simply based on the user name; i.e. the default profile is *"foo"* unless the user name contains *"a"*, in this case her/his profile is *"bar"*. 164 | 165 | 166 | Implement the [validate](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/identitystore/CredentialValidationResult.html) method as follow. 167 | 168 | 169 | ```java 170 | public CredentialValidationResult validate(UsernamePasswordCredential usernamePasswordCredential) { 171 | 172 | String caller = usernamePasswordCredential.getCaller(); 173 | String pwd = usernamePasswordCredential.getPasswordAsString(); 174 | 175 | // just for the exercise, assign the role based on the user name 176 | String role = "foo"; 177 | if ( caller.contains("a") ) { 178 | role = "bar"; 179 | } // else foo! 180 | 181 | if (usernamePasswordCredential.compareTo(caller,unsecureStore.get(caller))) { 182 | // return a VALID result with the caller and the set of groups s/he belongs to. 183 | return new CredentialValidationResult(caller, new HashSet<>(asList(role))); 184 | } 185 | return INVALID_RESULT; 186 | 187 | } 188 | ``` 189 | 190 | This method simply takes the credentials object, get the caller (the user) from this object,and compare the password from the crendential object against the password of that user in the map. Based on the user, it also assign him/her a role. 191 | 192 | Once all the imports are fixed, run and test the application. Ed should be the only one allowed to log in as he his the only one with the *"foo"* role. Make sure to open an incognito Chrome windows to test this. 193 | 194 | ## Conclusion 195 | 196 | In this exercise, we have secured our Web application using the Basic Authentication, one of the authentication mechanisms provided out-of-the-box by the Security API for EE. Under the hood, it uses the 197 | [HttpAuthenticationMechanism](https://javaee.github.io/javaee-spec/javadocs/javax/security/enterprise/authentication/mechanism/http/HttpAuthenticationMechanism.html), a new interface introduced by the Security API. This interface is used to define authentication mechanism for Servlet applications, to define a mechanism that obtains a caller's credentials in some way, using the HTTP protocol. Implementations are expected and encouraged to delegate the actual credential validation and/or retrieval of the caller name with optional groups to an IdentityStore. That is how the authentication mechanism that we have used do and as you saw, we have used the Basic Authentication and we were able to easily switch from one the EmbeddedIdentityStore to our custom IdentityStore. 198 | 199 | To learn more about the Security API, you can check at your leisure 200 | * How to [write a custom authentication mechanism](https://github.com/javaee/security-soteria/tree/master/test/app-custom) 201 | * How to [use the SecurityContext](https://github.com/javaee/security-soteria/tree/master/test/app-securitycontext) 202 | * [Java EE Security API specification](https://jcp.org/aboutJava/communityprocess/final/jsr375/index.html) 203 | 204 | ### Back to the [Exercices list](https://github.com/javaee/j1-hol#java-ee-8-hands-on-lab). 205 | -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/css/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} 6 | /*# sourceMappingURL=bootstrap-theme.min.css.map */ -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/css/bootstrap-theme.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAgBN,aEtEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAiBN,aEvEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAkBN,UExEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,gBAAA,gBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,iBAAA,iBAEE,iBAAA,QACA,aAAA,QAMA,mBAAA,0BAAA,yBAAA,0BAAA,yBAAA,yBAAA,oBAAA,2BAAA,0BAAA,2BAAA,0BAAA,0BAAA,6BAAA,oCAAA,mCAAA,oCAAA,mCAAA,mCAME,iBAAA,QACA,iBAAA,KAmBN,aEzEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAoBN,YE1EI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,kBAAA,kBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,mBAAA,mBAEE,iBAAA,QACA,aAAA,QAMA,qBAAA,4BAAA,2BAAA,4BAAA,2BAAA,2BAAA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,+BAAA,sCAAA,qCAAA,sCAAA,qCAAA,qCAME,iBAAA,QACA,iBAAA,KA2BN,eAAA,WClCE,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBD2CV,0BAAA,0BE3FI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GF0FF,kBAAA,SAEF,yBAAA,+BAAA,+BEhGI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GFgGF,kBAAA,SASF,gBE7GI,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SH+HA,cAAA,ICjEA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBD6DV,sCAAA,oCE7GI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBD0EV,cAAA,iBAEE,YAAA,EAAA,IAAA,EAAA,sBAIF,gBEhII,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SHkJA,cAAA,IAHF,sCAAA,oCEhII,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBDgFV,8BAAA,iCAYI,YAAA,EAAA,KAAA,EAAA,gBAKJ,qBAAA,kBAAA,mBAGE,cAAA,EAqBF,yBAfI,mDAAA,yDAAA,yDAGE,MAAA,KE7JF,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,UFqKJ,OACE,YAAA,EAAA,IAAA,EAAA,qBC3HA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBDsIV,eEtLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAKF,YEvLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAMF,eExLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAOF,cEzLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAeF,UEjMI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFuMJ,cE3MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFwMJ,sBE5MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyMJ,mBE7MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0MJ,sBE9MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2MJ,qBE/MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF+MJ,sBElLI,iBAAA,yKACA,iBAAA,oKACA,iBAAA,iKFyLJ,YACE,cAAA,IC9KA,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBDgLV,wBAAA,8BAAA,8BAGE,YAAA,EAAA,KAAA,EAAA,QEnOE,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFiOF,aAAA,QALF,+BAAA,qCAAA,qCAQI,YAAA,KAUJ,OCnME,mBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,EAAA,IAAA,IAAA,gBD4MV,8BE5PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyPJ,8BE7PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/css/bootstrap-theme.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | .btn-default, 7 | .btn-primary, 8 | .btn-success, 9 | .btn-info, 10 | .btn-warning, 11 | .btn-danger { 12 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); 13 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 14 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 15 | } 16 | .btn-default:active, 17 | .btn-primary:active, 18 | .btn-success:active, 19 | .btn-info:active, 20 | .btn-warning:active, 21 | .btn-danger:active, 22 | .btn-default.active, 23 | .btn-primary.active, 24 | .btn-success.active, 25 | .btn-info.active, 26 | .btn-warning.active, 27 | .btn-danger.active { 28 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 29 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 30 | } 31 | .btn-default.disabled, 32 | .btn-primary.disabled, 33 | .btn-success.disabled, 34 | .btn-info.disabled, 35 | .btn-warning.disabled, 36 | .btn-danger.disabled, 37 | .btn-default[disabled], 38 | .btn-primary[disabled], 39 | .btn-success[disabled], 40 | .btn-info[disabled], 41 | .btn-warning[disabled], 42 | .btn-danger[disabled], 43 | fieldset[disabled] .btn-default, 44 | fieldset[disabled] .btn-primary, 45 | fieldset[disabled] .btn-success, 46 | fieldset[disabled] .btn-info, 47 | fieldset[disabled] .btn-warning, 48 | fieldset[disabled] .btn-danger { 49 | -webkit-box-shadow: none; 50 | box-shadow: none; 51 | } 52 | .btn-default .badge, 53 | .btn-primary .badge, 54 | .btn-success .badge, 55 | .btn-info .badge, 56 | .btn-warning .badge, 57 | .btn-danger .badge { 58 | text-shadow: none; 59 | } 60 | .btn:active, 61 | .btn.active { 62 | background-image: none; 63 | } 64 | .btn-default { 65 | text-shadow: 0 1px 0 #fff; 66 | background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); 67 | background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); 68 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); 69 | background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); 70 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); 71 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 72 | background-repeat: repeat-x; 73 | border-color: #dbdbdb; 74 | border-color: #ccc; 75 | } 76 | .btn-default:hover, 77 | .btn-default:focus { 78 | background-color: #e0e0e0; 79 | background-position: 0 -15px; 80 | } 81 | .btn-default:active, 82 | .btn-default.active { 83 | background-color: #e0e0e0; 84 | border-color: #dbdbdb; 85 | } 86 | .btn-default.disabled, 87 | .btn-default[disabled], 88 | fieldset[disabled] .btn-default, 89 | .btn-default.disabled:hover, 90 | .btn-default[disabled]:hover, 91 | fieldset[disabled] .btn-default:hover, 92 | .btn-default.disabled:focus, 93 | .btn-default[disabled]:focus, 94 | fieldset[disabled] .btn-default:focus, 95 | .btn-default.disabled.focus, 96 | .btn-default[disabled].focus, 97 | fieldset[disabled] .btn-default.focus, 98 | .btn-default.disabled:active, 99 | .btn-default[disabled]:active, 100 | fieldset[disabled] .btn-default:active, 101 | .btn-default.disabled.active, 102 | .btn-default[disabled].active, 103 | fieldset[disabled] .btn-default.active { 104 | background-color: #e0e0e0; 105 | background-image: none; 106 | } 107 | .btn-primary { 108 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); 109 | background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); 110 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); 111 | background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); 112 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); 113 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 114 | background-repeat: repeat-x; 115 | border-color: #245580; 116 | } 117 | .btn-primary:hover, 118 | .btn-primary:focus { 119 | background-color: #265a88; 120 | background-position: 0 -15px; 121 | } 122 | .btn-primary:active, 123 | .btn-primary.active { 124 | background-color: #265a88; 125 | border-color: #245580; 126 | } 127 | .btn-primary.disabled, 128 | .btn-primary[disabled], 129 | fieldset[disabled] .btn-primary, 130 | .btn-primary.disabled:hover, 131 | .btn-primary[disabled]:hover, 132 | fieldset[disabled] .btn-primary:hover, 133 | .btn-primary.disabled:focus, 134 | .btn-primary[disabled]:focus, 135 | fieldset[disabled] .btn-primary:focus, 136 | .btn-primary.disabled.focus, 137 | .btn-primary[disabled].focus, 138 | fieldset[disabled] .btn-primary.focus, 139 | .btn-primary.disabled:active, 140 | .btn-primary[disabled]:active, 141 | fieldset[disabled] .btn-primary:active, 142 | .btn-primary.disabled.active, 143 | .btn-primary[disabled].active, 144 | fieldset[disabled] .btn-primary.active { 145 | background-color: #265a88; 146 | background-image: none; 147 | } 148 | .btn-success { 149 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); 150 | background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); 151 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); 152 | background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); 153 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); 154 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 155 | background-repeat: repeat-x; 156 | border-color: #3e8f3e; 157 | } 158 | .btn-success:hover, 159 | .btn-success:focus { 160 | background-color: #419641; 161 | background-position: 0 -15px; 162 | } 163 | .btn-success:active, 164 | .btn-success.active { 165 | background-color: #419641; 166 | border-color: #3e8f3e; 167 | } 168 | .btn-success.disabled, 169 | .btn-success[disabled], 170 | fieldset[disabled] .btn-success, 171 | .btn-success.disabled:hover, 172 | .btn-success[disabled]:hover, 173 | fieldset[disabled] .btn-success:hover, 174 | .btn-success.disabled:focus, 175 | .btn-success[disabled]:focus, 176 | fieldset[disabled] .btn-success:focus, 177 | .btn-success.disabled.focus, 178 | .btn-success[disabled].focus, 179 | fieldset[disabled] .btn-success.focus, 180 | .btn-success.disabled:active, 181 | .btn-success[disabled]:active, 182 | fieldset[disabled] .btn-success:active, 183 | .btn-success.disabled.active, 184 | .btn-success[disabled].active, 185 | fieldset[disabled] .btn-success.active { 186 | background-color: #419641; 187 | background-image: none; 188 | } 189 | .btn-info { 190 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 191 | background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 192 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); 193 | background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); 194 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); 195 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 196 | background-repeat: repeat-x; 197 | border-color: #28a4c9; 198 | } 199 | .btn-info:hover, 200 | .btn-info:focus { 201 | background-color: #2aabd2; 202 | background-position: 0 -15px; 203 | } 204 | .btn-info:active, 205 | .btn-info.active { 206 | background-color: #2aabd2; 207 | border-color: #28a4c9; 208 | } 209 | .btn-info.disabled, 210 | .btn-info[disabled], 211 | fieldset[disabled] .btn-info, 212 | .btn-info.disabled:hover, 213 | .btn-info[disabled]:hover, 214 | fieldset[disabled] .btn-info:hover, 215 | .btn-info.disabled:focus, 216 | .btn-info[disabled]:focus, 217 | fieldset[disabled] .btn-info:focus, 218 | .btn-info.disabled.focus, 219 | .btn-info[disabled].focus, 220 | fieldset[disabled] .btn-info.focus, 221 | .btn-info.disabled:active, 222 | .btn-info[disabled]:active, 223 | fieldset[disabled] .btn-info:active, 224 | .btn-info.disabled.active, 225 | .btn-info[disabled].active, 226 | fieldset[disabled] .btn-info.active { 227 | background-color: #2aabd2; 228 | background-image: none; 229 | } 230 | .btn-warning { 231 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 232 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 233 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); 234 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); 235 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); 236 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 237 | background-repeat: repeat-x; 238 | border-color: #e38d13; 239 | } 240 | .btn-warning:hover, 241 | .btn-warning:focus { 242 | background-color: #eb9316; 243 | background-position: 0 -15px; 244 | } 245 | .btn-warning:active, 246 | .btn-warning.active { 247 | background-color: #eb9316; 248 | border-color: #e38d13; 249 | } 250 | .btn-warning.disabled, 251 | .btn-warning[disabled], 252 | fieldset[disabled] .btn-warning, 253 | .btn-warning.disabled:hover, 254 | .btn-warning[disabled]:hover, 255 | fieldset[disabled] .btn-warning:hover, 256 | .btn-warning.disabled:focus, 257 | .btn-warning[disabled]:focus, 258 | fieldset[disabled] .btn-warning:focus, 259 | .btn-warning.disabled.focus, 260 | .btn-warning[disabled].focus, 261 | fieldset[disabled] .btn-warning.focus, 262 | .btn-warning.disabled:active, 263 | .btn-warning[disabled]:active, 264 | fieldset[disabled] .btn-warning:active, 265 | .btn-warning.disabled.active, 266 | .btn-warning[disabled].active, 267 | fieldset[disabled] .btn-warning.active { 268 | background-color: #eb9316; 269 | background-image: none; 270 | } 271 | .btn-danger { 272 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 273 | background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 274 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); 275 | background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); 276 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); 277 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 278 | background-repeat: repeat-x; 279 | border-color: #b92c28; 280 | } 281 | .btn-danger:hover, 282 | .btn-danger:focus { 283 | background-color: #c12e2a; 284 | background-position: 0 -15px; 285 | } 286 | .btn-danger:active, 287 | .btn-danger.active { 288 | background-color: #c12e2a; 289 | border-color: #b92c28; 290 | } 291 | .btn-danger.disabled, 292 | .btn-danger[disabled], 293 | fieldset[disabled] .btn-danger, 294 | .btn-danger.disabled:hover, 295 | .btn-danger[disabled]:hover, 296 | fieldset[disabled] .btn-danger:hover, 297 | .btn-danger.disabled:focus, 298 | .btn-danger[disabled]:focus, 299 | fieldset[disabled] .btn-danger:focus, 300 | .btn-danger.disabled.focus, 301 | .btn-danger[disabled].focus, 302 | fieldset[disabled] .btn-danger.focus, 303 | .btn-danger.disabled:active, 304 | .btn-danger[disabled]:active, 305 | fieldset[disabled] .btn-danger:active, 306 | .btn-danger.disabled.active, 307 | .btn-danger[disabled].active, 308 | fieldset[disabled] .btn-danger.active { 309 | background-color: #c12e2a; 310 | background-image: none; 311 | } 312 | .thumbnail, 313 | .img-thumbnail { 314 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 315 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 316 | } 317 | .dropdown-menu > li > a:hover, 318 | .dropdown-menu > li > a:focus { 319 | background-color: #e8e8e8; 320 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 321 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 322 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 323 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 324 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 325 | background-repeat: repeat-x; 326 | } 327 | .dropdown-menu > .active > a, 328 | .dropdown-menu > .active > a:hover, 329 | .dropdown-menu > .active > a:focus { 330 | background-color: #2e6da4; 331 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 332 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 333 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 334 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 335 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 336 | background-repeat: repeat-x; 337 | } 338 | .navbar-default { 339 | background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); 340 | background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); 341 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); 342 | background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); 343 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); 344 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 345 | background-repeat: repeat-x; 346 | border-radius: 4px; 347 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 348 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 349 | } 350 | .navbar-default .navbar-nav > .open > a, 351 | .navbar-default .navbar-nav > .active > a { 352 | background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 353 | background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 354 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); 355 | background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); 356 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); 357 | background-repeat: repeat-x; 358 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 359 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 360 | } 361 | .navbar-brand, 362 | .navbar-nav > li > a { 363 | text-shadow: 0 1px 0 rgba(255, 255, 255, .25); 364 | } 365 | .navbar-inverse { 366 | background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); 367 | background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); 368 | background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); 369 | background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); 370 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); 371 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 372 | background-repeat: repeat-x; 373 | border-radius: 4px; 374 | } 375 | .navbar-inverse .navbar-nav > .open > a, 376 | .navbar-inverse .navbar-nav > .active > a { 377 | background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); 378 | background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); 379 | background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); 380 | background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); 381 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); 382 | background-repeat: repeat-x; 383 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 384 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 385 | } 386 | .navbar-inverse .navbar-brand, 387 | .navbar-inverse .navbar-nav > li > a { 388 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); 389 | } 390 | .navbar-static-top, 391 | .navbar-fixed-top, 392 | .navbar-fixed-bottom { 393 | border-radius: 0; 394 | } 395 | @media (max-width: 767px) { 396 | .navbar .navbar-nav .open .dropdown-menu > .active > a, 397 | .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, 398 | .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { 399 | color: #fff; 400 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 401 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 402 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 403 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 404 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 405 | background-repeat: repeat-x; 406 | } 407 | } 408 | .alert { 409 | text-shadow: 0 1px 0 rgba(255, 255, 255, .2); 410 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 411 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 412 | } 413 | .alert-success { 414 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 415 | background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 416 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); 417 | background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); 418 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); 419 | background-repeat: repeat-x; 420 | border-color: #b2dba1; 421 | } 422 | .alert-info { 423 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 424 | background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 425 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); 426 | background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); 427 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); 428 | background-repeat: repeat-x; 429 | border-color: #9acfea; 430 | } 431 | .alert-warning { 432 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 433 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 434 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); 435 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); 436 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); 437 | background-repeat: repeat-x; 438 | border-color: #f5e79e; 439 | } 440 | .alert-danger { 441 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 442 | background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 443 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); 444 | background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); 445 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); 446 | background-repeat: repeat-x; 447 | border-color: #dca7a7; 448 | } 449 | .progress { 450 | background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 451 | background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 452 | background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); 453 | background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); 454 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); 455 | background-repeat: repeat-x; 456 | } 457 | .progress-bar { 458 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); 459 | background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); 460 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); 461 | background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); 462 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); 463 | background-repeat: repeat-x; 464 | } 465 | .progress-bar-success { 466 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); 467 | background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); 468 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); 469 | background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); 470 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); 471 | background-repeat: repeat-x; 472 | } 473 | .progress-bar-info { 474 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 475 | background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 476 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); 477 | background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); 478 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); 479 | background-repeat: repeat-x; 480 | } 481 | .progress-bar-warning { 482 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 483 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 484 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); 485 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); 486 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); 487 | background-repeat: repeat-x; 488 | } 489 | .progress-bar-danger { 490 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); 491 | background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); 492 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); 493 | background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); 494 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); 495 | background-repeat: repeat-x; 496 | } 497 | .progress-bar-striped { 498 | background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); 499 | background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); 500 | background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); 501 | } 502 | .list-group { 503 | border-radius: 4px; 504 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 505 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 506 | } 507 | .list-group-item.active, 508 | .list-group-item.active:hover, 509 | .list-group-item.active:focus { 510 | text-shadow: 0 -1px 0 #286090; 511 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); 512 | background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); 513 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); 514 | background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); 515 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); 516 | background-repeat: repeat-x; 517 | border-color: #2b669a; 518 | } 519 | .list-group-item.active .badge, 520 | .list-group-item.active:hover .badge, 521 | .list-group-item.active:focus .badge { 522 | text-shadow: none; 523 | } 524 | .panel { 525 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 526 | box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 527 | } 528 | .panel-default > .panel-heading { 529 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 530 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 531 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 532 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 533 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 534 | background-repeat: repeat-x; 535 | } 536 | .panel-primary > .panel-heading { 537 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 538 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 539 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 540 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 541 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 542 | background-repeat: repeat-x; 543 | } 544 | .panel-success > .panel-heading { 545 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 546 | background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 547 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); 548 | background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); 549 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); 550 | background-repeat: repeat-x; 551 | } 552 | .panel-info > .panel-heading { 553 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 554 | background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 555 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); 556 | background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); 557 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); 558 | background-repeat: repeat-x; 559 | } 560 | .panel-warning > .panel-heading { 561 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 562 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 563 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); 564 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); 565 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); 566 | background-repeat: repeat-x; 567 | } 568 | .panel-danger > .panel-heading { 569 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 570 | background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 571 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); 572 | background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); 573 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); 574 | background-repeat: repeat-x; 575 | } 576 | .well { 577 | background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 578 | background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 579 | background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); 580 | background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); 581 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); 582 | background-repeat: repeat-x; 583 | border-color: #dcdcdc; 584 | -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 585 | box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 586 | } 587 | /*# sourceMappingURL=bootstrap-theme.css.map */ 588 | -------------------------------------------------------------------------------- /demos/jsonbbeanvaldemo/src/main/webapp/js/libs/twitter-bootstrap/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); --------------------------------------------------------------------------------