diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index f8102bca6..000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -# Not actually used by the devcontainer, but it is used by gitpod -ARG VARIANT=17-bullseye -FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT} -ARG NODE_VERSION="none" -RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi -ARG USER=vscode -VOLUME /home/$USER/.m2 -VOLUME /home/$USER/.gradle -ARG JAVA_VERSION=17.0.7-ms -RUN sudo mkdir /home/$USER/.m2 /home/$USER/.gradle && sudo chown $USER:$USER /home/$USER/.m2 /home/$USER/.gradle -RUN bash -lc '. /usr/local/sdkman/bin/sdkman-init.sh && sdk install java $JAVA_VERSION && sdk use java $JAVA_VERSION' \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 3aa67afc1..000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "Java", - "image": "mcr.microsoft.com/devcontainers/base:ubuntu", - "features": { - "ghcr.io/devcontainers/features/java:1": { - "version": "21-oracle", - "jdkDistro": "oracle" - }, - "ghcr.io/devcontainers/features/azure-cli:1": {}, - "ghcr.io/devcontainers/features/docker-in-docker:2": {}, - "ghcr.io/devcontainers/features/github-cli:1": {} - }, - - "customizations": { - "vscode": { - "settings": {}, - "extensions": [ - "redhat.vscode-xml", - "visualstudioexptteam.vscodeintellicode", - "vscjava.vscode-java-pack" - ] - } - }, - "remoteUser": "vscode" -} diff --git a/.editorconfig b/.editorconfig index 4e509a427..8d67bc7a5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,15 +10,3 @@ indent_style = space [*.{java,xml}] indent_size = 4 trim_trailing_whitespace = true -indent_style = tab -tab_width = 4 - -[{pom,wro}.xml] -indent_size = 2 -indent_style = space - -[*.{html,sql,less}] -indent_size = 2 - -[*.gradle] -indent_size = 2 diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 8a09fad07..000000000 --- a/.gitattributes +++ /dev/null @@ -1,6 +0,0 @@ -/mvnw text eol=lf -*.cmd text eol=crlf -*.java text eol=lf - -/gradlew text eol=lf -*.bat text eol=crlf diff --git a/.github/dco.yml b/.github/dco.yml deleted file mode 100644 index 37e411e1b..000000000 --- a/.github/dco.yml +++ /dev/null @@ -1,2 +0,0 @@ -require: - members: false \ No newline at end of file diff --git a/.github/workflows/deploy-and-test-cluster.yml b/.github/workflows/deploy-and-test-cluster.yml deleted file mode 100644 index 7353a604b..000000000 --- a/.github/workflows/deploy-and-test-cluster.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Deploy and Test Cluster - -on: - push: - branches: [main] - paths: - - 'k8s/**' - pull_request: - branches: [main] - paths: - - 'k8s/**' - -jobs: - deploy-and-test-cluster: - runs-on: ubuntu-latest - steps: - - name: Check out the repository - uses: actions/checkout@v2 - - - name: Create k8s Kind Cluster - uses: helm/kind-action@v1 - - - name: Deploy application - run: | - kubectl apply -f k8s/ - - - name: Wait for Pods to be ready - run: | - kubectl wait --for=condition=ready pod -l app=demo-db --timeout=180s - kubectl wait --for=condition=ready pod -l app=petclinic --timeout=180s - diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml deleted file mode 100644 index c24c121b1..000000000 --- a/.github/workflows/gradle-build.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will build a Java project with Gradle, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle - -name: Java CI with Gradle - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{matrix.java}} - uses: actions/setup-java@v4 - with: - java-version: ${{matrix.java}} - distribution: 'adopt' - cache: maven - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 - - name: Build with Gradle - run: ./gradlew build diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml deleted file mode 100644 index a1ec4dab7..000000000 --- a/.github/workflows/maven-build.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven - -name: Java CI with Maven - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '17' ] - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{matrix.java}} - uses: actions/setup-java@v4 - with: - java-version: ${{matrix.java}} - distribution: 'adopt' - cache: maven - - name: Build with Maven Wrapper - run: ./mvnw -B verify diff --git a/.gitignore b/.gitignore index 76cb65ff3..b00af803d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,48 +1,8 @@ -HELP.md -pom.xml.bak -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ -.gradle -build/ -!gradle/wrapper/gradle-wrapper.jar -!**/src/main/**/build/ -!**/src/test/**/build/ - -### STS ### -.attach_pid* -.apt_generated +target/* +.settings/* .classpath -.factorypath .project -.settings -.springBeans -.sts4-cache -bin/ -!**/src/main/**/bin/ -!**/src/test/**/bin/ - -### IntelliJ IDEA ### .idea -*.iws *.iml -*.ipr -out/ -!**/src/main/**/out/ -!**/src/test/**/out/ - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ - -### VS Code ### -.vscode/ - -### CSS ### +/target _site/ -*.css -!petclinic.css diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 8b3bb7259..000000000 --- a/.gitpod.yml +++ /dev/null @@ -1,9 +0,0 @@ -image: - file: ./.devcontainer/Dockerfile -tasks: - - before: sudo usermod -a -G sdkman gitpod && sudo usermod -a -G nvm gitpod && sudo chown -R gitpod /usr/local/sdkman /usr/local/share/nvm - - init: ./mvnw install -vscode: - extensions: - - vscjava.vscode-java-pack - - redhat.vscode-xml \ No newline at end of file diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 000000000..c6feb8bb6 Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index c0bcafe98..25cc8af3c 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,3 +1 @@ -wrapperVersion=3.3.4 -distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip +distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..c0f28cfa4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,2 @@ +language: java +jdk: oraclejdk8 diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index ff7737963..000000000 --- a/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index a1c65baff..000000000 --- a/README.md +++ /dev/null @@ -1,171 +0,0 @@ -# Spring PetClinic Sample Application [![Build Status](https://github.com/spring-projects/spring-petclinic/actions/workflows/maven-build.yml/badge.svg)](https://github.com/spring-projects/spring-petclinic/actions/workflows/maven-build.yml)[![Build Status](https://github.com/spring-projects/spring-petclinic/actions/workflows/gradle-build.yml/badge.svg)](https://github.com/spring-projects/spring-petclinic/actions/workflows/gradle-build.yml) - -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/spring-projects/spring-petclinic) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=7517918) - -## Understanding the Spring Petclinic application with a few diagrams - -See the presentation here: -[Spring Petclinic Sample Application (legacy slides)](https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application?slide=20) - -> **Note:** These slides refer to a legacy, pre–Spring Boot version of Petclinic and may not reflect the current Spring Boot–based implementation. -> For up-to-date information, please refer to this repository and its documentation. - - -## Run Petclinic locally - -Spring Petclinic is a [Spring Boot](https://spring.io/guides/gs/spring-boot) application built using [Maven](https://spring.io/guides/gs/maven/) or [Gradle](https://spring.io/guides/gs/gradle/). -Java 17 or later is required for the build, and the application can run with Java 17 or newer: - -```bash -git clone https://github.com/spring-projects/spring-petclinic.git -cd spring-petclinic -./mvnw package -java -jar target/*.jar -``` - -(On Windows, or if your shell doesn't expand the glob, you might need to specify the JAR file name explicitly on the command line at the end there.) - -You can then access the Petclinic at . - -petclinic-screenshot - -Or you can run it from Maven directly using the Spring Boot Maven plugin. If you do this, it will pick up changes that you make in the project immediately (changes to Java source files require a compile as well - most people use an IDE for this): - -```bash -./mvnw spring-boot:run -``` - -> NOTE: If you prefer to use Gradle, you can build the app using `./gradlew build` and look for the jar file in `build/libs`. - -## Building a Container - -There is no `Dockerfile` in this project. You can build a container image (if you have a docker daemon) using the Spring Boot build plugin: - -```bash -./mvnw spring-boot:build-image -``` - -## In case you find a bug/suggested improvement for Spring Petclinic - -Our issue tracker is available [here](https://github.com/spring-projects/spring-petclinic/issues). - -## Database configuration - -In its default configuration, Petclinic uses an in-memory database (H2) which -gets populated at startup with data. The h2 console is exposed at `http://localhost:8080/h2-console`, -and it is possible to inspect the content of the database using the `jdbc:h2:mem:` URL. The UUID is printed at startup to the console. - -A similar setup is provided for MySQL and PostgreSQL if a persistent database configuration is needed. Note that whenever the database type changes, the app needs to run with a different profile: `spring.profiles.active=mysql` for MySQL or `spring.profiles.active=postgres` for PostgreSQL. See the [Spring Boot documentation](https://docs.spring.io/spring-boot/how-to/properties-and-configuration.html#howto.properties-and-configuration.set-active-spring-profiles) for more detail on how to set the active profile. - -You can start MySQL or PostgreSQL locally with whatever installer works for your OS or use docker: - -```bash -docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:9.5 -``` - -or - -```bash -docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:18.1 -``` - -Further documentation is provided for [MySQL](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt) -and [PostgreSQL](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt). - -Instead of vanilla `docker` you can also use the provided `docker-compose.yml` file to start the database containers. Each one has a service named after the Spring profile: - -```bash -docker compose up mysql -``` - -or - -```bash -docker compose up postgres -``` - -## Test Applications - -At development time we recommend you use the test applications set up as `main()` methods in `PetClinicIntegrationTests` (using the default H2 database and also adding Spring Boot Devtools), `MySqlTestApplication` and `PostgresIntegrationTests`. These are set up so that you can run the apps in your IDE to get fast feedback and also run the same classes as integration tests against the respective database. The MySql integration tests use Testcontainers to start the database in a Docker container, and the Postgres tests use Docker Compose to do the same thing. - -## Compiling the CSS - -There is a `petclinic.css` in `src/main/resources/static/resources/css`. It was generated from the `petclinic.scss` source, combined with the [Bootstrap](https://getbootstrap.com/) library. If you make changes to the `scss`, or upgrade Bootstrap, you will need to re-compile the CSS resources using the Maven profile "css", i.e. `./mvnw package -P css`. There is no build profile for Gradle to compile the CSS. - -## Working with Petclinic in your IDE - -### Prerequisites - -The following items should be installed in your system: - -- Java 25 or newer (full JDK, not a JRE) -- [Git command line tool](https://help.github.com/articles/set-up-git) -- Your preferred IDE - - Eclipse with the m2e plugin. Note: when m2e is available, there is an m2 icon in `Help -> About` dialog. If m2e is - not there, follow the install process [here](https://www.eclipse.org/m2e/) - - [Spring Tools Suite](https://spring.io/tools) (STS) - - [IntelliJ IDEA](https://www.jetbrains.com/idea/) - - [VS Code](https://code.visualstudio.com) - -### Steps - -1. On the command line run: - - ```bash - git clone https://github.com/spring-projects/spring-petclinic.git - ``` - -1. Inside Eclipse or STS: - - Open the project via `File -> Import -> Maven -> Existing Maven project`, then select the root directory of the cloned repo. - - Then either build on the command line `./mvnw generate-resources` or use the Eclipse launcher (right-click on project and `Run As -> Maven install`) to generate the CSS. Run the application's main method by right-clicking on it and choosing `Run As -> Java Application`. - -1. Inside IntelliJ IDEA: - - In the main menu, choose `File -> Open` and select the Petclinic [pom.xml](pom.xml). Click on the `Open` button. - - - CSS files are generated from the Maven build. You can build them on the command line `./mvnw generate-resources` or right-click on the `spring-petclinic` project then `Maven -> Generates sources and Update Folders`. - - - A run configuration named `PetClinicApplication` should have been created for you if you're using a recent Ultimate version. Otherwise, run the application by right-clicking on the `PetClinicApplication` main class and choosing `Run 'PetClinicApplication'`. - -1. Navigate to the Petclinic - - Visit [http://localhost:8080](http://localhost:8080) in your browser. - -## Looking for something in particular? - -|Spring Boot Configuration | Class or Java property files | -|--------------------------|---| -|The Main Class | [PetClinicApplication](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java) | -|Properties Files | [application.properties](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources) | -|Caching | [CacheConfiguration](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/java/org/springframework/samples/petclinic/system/CacheConfiguration.java) | - -## Interesting Spring Petclinic branches and forks - -The Spring Petclinic "main" branch in the [spring-projects](https://github.com/spring-projects/spring-petclinic) -GitHub org is the "canonical" implementation based on Spring Boot and Thymeleaf. There are -[quite a few forks](https://spring-petclinic.github.io/docs/forks.html) in the GitHub org -[spring-petclinic](https://github.com/spring-petclinic). If you are interested in using a different technology stack to implement the Pet Clinic, please join the community there. - -## Interaction with other open-source projects - -One of the best parts about working on the Spring Petclinic application is that we have the opportunity to work in direct contact with many Open Source projects. We found bugs/suggested improvements on various topics such as Spring, Spring Data, Bean Validation and even Eclipse! In many cases, they've been fixed/implemented in just a few days. -Here is a list of them: - -| Name | Issue | -|------|-------| -| Spring JDBC: simplify usage of NamedParameterJdbcTemplate | [SPR-10256](https://github.com/spring-projects/spring-framework/issues/14889) and [SPR-10257](https://github.com/spring-projects/spring-framework/issues/14890) | -| Bean Validation / Hibernate Validator: simplify Maven dependencies and backward compatibility |[HV-790](https://hibernate.atlassian.net/browse/HV-790) and [HV-792](https://hibernate.atlassian.net/browse/HV-792) | -| Spring Data: provide more flexibility when working with JPQL queries | [DATAJPA-292](https://github.com/spring-projects/spring-data-jpa/issues/704) | - -## Contributing - -The [issue tracker](https://github.com/spring-projects/spring-petclinic/issues) is the preferred channel for bug reports, feature requests and submitting pull requests. - -For pull requests, editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at . All commits must include a __Signed-off-by__ trailer at the end of each commit message to indicate that the contributor agrees to the Developer Certificate of Origin. -For additional details, please refer to the blog post [Hello DCO, Goodbye CLA: Simplifying Contributions to Spring](https://spring.io/blog/2025/01/06/hello-dco-goodbye-cla-simplifying-contributions-to-spring). - -## License - -The Spring PetClinic sample application is released under version 2.0 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0). diff --git a/build.gradle b/build.gradle deleted file mode 100644 index e7540a9f5..000000000 --- a/build.gradle +++ /dev/null @@ -1,88 +0,0 @@ -plugins { - id 'java' - id 'checkstyle' - id 'org.springframework.boot' version '4.0.0' - id 'io.spring.dependency-management' version '1.1.7' - id 'org.graalvm.buildtools.native' version '0.11.1' - id 'org.cyclonedx.bom' version '3.0.2' - id 'io.spring.javaformat' version '0.0.47' - id "io.spring.nohttp" version "0.0.11" -} - -gradle.startParameter.excludedTaskNames += [ "checkFormatAot", "checkFormatAotTest" ] - -group = 'org.springframework.samples' -version = '4.0.0-SNAPSHOT' - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(17) - } -} - -repositories { - mavenCentral() -} - -ext.checkstyleVersion = "12.1.2" -ext.springJavaformatCheckstyleVersion = "0.0.47" -ext.webjarsLocatorLiteVersion = "1.1.2" -ext.webjarsFontawesomeVersion = "4.7.0" -ext.webjarsBootstrapVersion = "5.3.8" - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-cache' - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' - implementation 'org.springframework.boot:spring-boot-starter-webmvc' - implementation 'org.springframework.boot:spring-boot-starter-validation' - implementation 'javax.cache:cache-api' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api' - runtimeOnly 'org.springframework.boot:spring-boot-starter-actuator' - runtimeOnly "org.webjars:webjars-locator-lite:${webjarsLocatorLiteVersion}" - runtimeOnly "org.webjars.npm:bootstrap:${webjarsBootstrapVersion}" - runtimeOnly "org.webjars.npm:font-awesome:${webjarsFontawesomeVersion}" - runtimeOnly 'com.github.ben-manes.caffeine:caffeine' - runtimeOnly 'com.h2database:h2' - runtimeOnly 'com.mysql:mysql-connector-j' - runtimeOnly 'org.postgresql:postgresql' - developmentOnly 'org.springframework.boot:spring-boot-devtools' - testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test' - testImplementation 'org.springframework.boot:spring-boot-starter-restclient-test' - testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test' - testImplementation 'org.springframework.boot:spring-boot-testcontainers' - testImplementation 'org.springframework.boot:spring-boot-docker-compose' - testImplementation 'org.testcontainers:testcontainers-junit-jupiter' - testImplementation 'org.testcontainers:testcontainers-mysql' - checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${springJavaformatCheckstyleVersion}" - checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}" -} - -tasks.named('test') { - useJUnitPlatform() -} - -checkstyle { - configDirectory = project.file('src/checkstyle') - configFile = file('src/checkstyle/nohttp-checkstyle.xml') -} - -checkstyleNohttp { - configDirectory = project.file('src/checkstyle') - configFile = file('src/checkstyle/nohttp-checkstyle.xml') -} - -tasks.named("formatMain").configure { dependsOn("checkstyleMain") } -tasks.named("formatMain").configure { dependsOn("checkstyleNohttp") } - -tasks.named("formatTest").configure { dependsOn("checkstyleTest") } -tasks.named("formatTest").configure { dependsOn("checkstyleNohttp") } - -checkstyleAot.enabled = false -checkstyleAotTest.enabled = false - -checkFormatAot.enabled = false -checkFormatAotTest.enabled = false - -formatAot.enabled = false -formatAotTest.enabled = false diff --git a/docker-compose.yml b/docker-compose.yml index b2313a1e6..1631ec9fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,21 +1,9 @@ -services: - mysql: - image: mysql:9.5 - ports: - - "3306:3306" - environment: - - MYSQL_ROOT_PASSWORD= - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_USER=petclinic - - MYSQL_PASSWORD=petclinic - - MYSQL_DATABASE=petclinic - volumes: - - "./conf.d:/etc/mysql/conf.d:ro" - postgres: - image: postgres:18.1 - ports: - - "5432:5432" - environment: - - POSTGRES_PASSWORD=petclinic - - POSTGRES_USER=petclinic - - POSTGRES_DB=petclinic +mysql: + image: mysql + ports: + - "3306:3306" + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_DATABASE=test + volumes: + - "./conf.d:/etc/mysql/conf.d:ro" \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index f8e1ee312..000000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 23449a2b5..000000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew deleted file mode 100755 index adff685a0..000000000 --- a/gradlew +++ /dev/null @@ -1,248 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index c4bdd3ab8..000000000 --- a/gradlew.bat +++ /dev/null @@ -1,93 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/k8s/db.yml b/k8s/db.yml deleted file mode 100644 index 5c6e0f9e2..000000000 --- a/k8s/db.yml +++ /dev/null @@ -1,73 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - name: demo-db -type: servicebinding.io/postgresql -stringData: - type: "postgresql" - provider: "postgresql" - host: "demo-db" - port: "5432" - database: "petclinic" - username: "user" - password: "pass" - ---- -apiVersion: v1 -kind: Service -metadata: - name: demo-db -spec: - ports: - - port: 5432 - selector: - app: demo-db - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: demo-db - labels: - app: demo-db -spec: - selector: - matchLabels: - app: demo-db - template: - metadata: - labels: - app: demo-db - spec: - containers: - - image: postgres:18.1 - name: postgresql - env: - - name: POSTGRES_USER - valueFrom: - secretKeyRef: - name: demo-db - key: username - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: demo-db - key: password - - name: POSTGRES_DB - valueFrom: - secretKeyRef: - name: demo-db - key: database - ports: - - containerPort: 5432 - name: postgresql - livenessProbe: - tcpSocket: - port: postgresql - readinessProbe: - tcpSocket: - port: postgresql - startupProbe: - tcpSocket: - port: postgresql diff --git a/k8s/petclinic.yml b/k8s/petclinic.yml deleted file mode 100644 index a5677cd06..000000000 --- a/k8s/petclinic.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: petclinic -spec: - type: NodePort - ports: - - port: 80 - targetPort: 8080 - selector: - app: petclinic - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: petclinic - labels: - app: petclinic -spec: - replicas: 1 - selector: - matchLabels: - app: petclinic - template: - metadata: - labels: - app: petclinic - spec: - containers: - - name: workload - image: dsyer/petclinic - env: - - name: SPRING_PROFILES_ACTIVE - value: postgres - - name: SERVICE_BINDING_ROOT - value: /bindings - - name: SPRING_APPLICATION_JSON - value: | - { - "management.endpoint.health.probes.add-additional-paths": true - } - ports: - - name: http - containerPort: 8080 - livenessProbe: - httpGet: - path: /livez - port: http - readinessProbe: - httpGet: - path: /readyz - port: http - volumeMounts: - - mountPath: /bindings/secret - name: binding - readOnly: true - volumes: - - name: binding - projected: - sources: - - secret: - name: demo-db diff --git a/mvnw b/mvnw index 33c353fae..fc7efd17d 100755 --- a/mvnw +++ b/mvnw @@ -8,7 +8,7 @@ # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # -# https://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an @@ -19,277 +19,216 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.4 +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir # # Optional ENV vars # ----------------- -# JAVA_HOME - location of a JDK home dir, required when download maven via java source -# MVNW_REPOURL - repo url base for downloading maven distribution -# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files # ---------------------------------------------------------------------------- -set -euf -[ "${MVNW_VERBOSE-}" != debug ] || set -x +if [ -z "$MAVEN_SKIP_RC" ] ; then -# OS specific support. -native_path() { printf %s\\n "$1"; } -case "$(uname)" in -CYGWIN* | MINGW*) - [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" - native_path() { cygpath --path --windows "$1"; } - ;; + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # + # Look for the Apple JDKs first to preserve the existing behaviour, and then look + # for the new JDKs provided by Oracle. + # + if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then + # + # Apple JDKs + # + export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home + fi + + if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then + # + # Apple JDKs + # + export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home + fi + + if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then + # + # Oracle JDKs + # + export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home + fi + + if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then + # + # Apple JDKs + # + export JAVA_HOME=`/usr/libexec/java_home` + fi + ;; esac -# set JAVACMD and JAVACCMD -set_java_home() { - # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched - if [ -n "${JAVA_HOME-}" ]; then - if [ -x "$JAVA_HOME/jre/sh/java" ]; then +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Migwn, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" - JAVACCMD="$JAVA_HOME/jre/sh/javac" else JAVACMD="$JAVA_HOME/bin/java" - JAVACCMD="$JAVA_HOME/bin/javac" - - if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then - echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 - echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 - return 1 - fi fi else - JAVACMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v java - )" || : - JAVACCMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v javac - )" || : - - if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then - echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 - return 1 - fi + JAVACMD="`which java`" fi -} +fi -# hash string like Java String::hashCode -hash_string() { - str="${1:-}" h=0 - while [ -n "$str" ]; do - char="${str%"${str#?}"}" - h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) - str="${str#?}" - done - printf %x\\n $h -} - -verbose() { :; } -[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } - -die() { - printf %s\\n "$1" >&2 +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 exit 1 -} - -trim() { - # MWRAPPER-139: - # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. - # Needed for removing poorly interpreted newline sequences when running in more - # exotic environments such as mingw bash on Windows. - printf "%s" "${1}" | tr -d '[:space:]' -} - -scriptDir="$(dirname "$0")" -scriptName="$(basename "$0")" - -# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties -while IFS="=" read -r key value; do - case "${key-}" in - distributionUrl) distributionUrl=$(trim "${value-}") ;; - distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; - esac -done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties" -[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" - -case "${distributionUrl##*/}" in -maven-mvnd-*bin.*) - MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ - case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in - *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; - :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; - :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; - :Linux*x86_64*) distributionPlatform=linux-amd64 ;; - *) - echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 - distributionPlatform=linux-amd64 - ;; - esac - distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" - ;; -maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; -*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; -esac - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" -distributionUrlName="${distributionUrl##*/}" -distributionUrlNameMain="${distributionUrlName%.*}" -distributionUrlNameMain="${distributionUrlNameMain%-bin}" -MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" -MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" - -exec_maven() { - unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : - exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" -} - -if [ -d "$MAVEN_HOME" ]; then - verbose "found existing MAVEN_HOME at $MAVEN_HOME" - exec_maven "$@" fi -case "${distributionUrl-}" in -*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; -*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; -esac - -# prepare tmp dir -if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then - clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } - trap clean HUP INT TERM EXIT -else - die "cannot create temp dir" +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." fi -mkdir -p -- "${MAVEN_HOME%/*}" +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher -# Download and Install Apache Maven -verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -verbose "Downloading from: $distributionUrl" -verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -# select .zip or .tar.gz -if ! command -v unzip >/dev/null; then - distributionUrl="${distributionUrl%.zip}.tar.gz" - distributionUrlName="${distributionUrl##*/}" +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` fi -# verbose opt -__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' -[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v - -# normalize http auth -case "${MVNW_PASSWORD:+has-password}" in -'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; -has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; -esac - -if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then - verbose "Found wget ... using wget" - wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" -elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then - verbose "Found curl ... using curl" - curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" -elif set_java_home; then - verbose "Falling back to use Java to download" - javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" - targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" - cat >"$javaSource" <<-END - public class Downloader extends java.net.Authenticator - { - protected java.net.PasswordAuthentication getPasswordAuthentication() - { - return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); - } - public static void main( String[] args ) throws Exception - { - setDefault( new Downloader() ); - java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); - } - } - END - # For Cygwin/MinGW, switch paths to Windows format before running javac and java - verbose " - Compiling Downloader.java ..." - "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" - verbose " - Running Downloader.java ..." - "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" -fi - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -if [ -n "${distributionSha256Sum-}" ]; then - distributionSha256Result=false - if [ "$MVN_CMD" = mvnd.sh ]; then - echo "Checksum validation is not supported for maven-mvnd." >&2 - echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - elif command -v sha256sum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then - distributionSha256Result=true - fi - elif command -v shasum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then - distributionSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 - echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - fi - if [ $distributionSha256Result = false ]; then - echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 - echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 - exit 1 - fi -fi - -# unzip and move -if command -v unzip >/dev/null; then - unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" -else - tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" -fi - -# Find the actual extracted directory name (handles snapshots where filename != directory name) -actualDistributionDir="" - -# First try the expected directory name (for regular distributions) -if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then - if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then - actualDistributionDir="$distributionUrlNameMain" - fi -fi - -# If not found, search for any directory with the Maven executable (for snapshots) -if [ -z "$actualDistributionDir" ]; then - # enable globbing to iterate over items - set +f - for dir in "$TMP_DOWNLOAD_DIR"/*; do - if [ -d "$dir" ]; then - if [ -f "$dir/bin/$MVN_CMD" ]; then - actualDistributionDir="$(basename "$dir")" - break - fi +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + local basedir=$(pwd) + local wdir=$(pwd) + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break fi + wdir=$(cd "$wdir/.."; pwd) done - set -f -fi + echo "${basedir}" +} -if [ -z "$actualDistributionDir" ]; then - verbose "Contents of $TMP_DOWNLOAD_DIR:" - verbose "$(ls -la "$TMP_DOWNLOAD_DIR")" - die "Could not find Maven distribution directory in extracted archive" -fi +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} -verbose "Found extracted Maven distribution directory: $actualDistributionDir" -printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url" -mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)} +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CMD_LINE_ARGS -clean || : -exec_maven "$@" diff --git a/mvnw.cmd b/mvnw.cmd index bba35af22..0d49a2de0 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -1,189 +1,145 @@ -<# : batch portion -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +set MAVEN_CMD_LINE_ARGS=%MAVEN_CONFIG% %* + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.4 -@REM -@REM Optional ENV vars -@REM MVNW_REPOURL - repo url base for downloading maven distribution -@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output -@REM ---------------------------------------------------------------------------- - -@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) -@SET __MVNW_CMD__= -@SET __MVNW_ERROR__= -@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% -@SET PSModulePath= -@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( - IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) -) -@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% -@SET __MVNW_PSMODULEP_SAVE= -@SET __MVNW_ARG0_NAME__= -@SET MVNW_USERNAME= -@SET MVNW_PASSWORD= -@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*) -@echo Cannot start maven from wrapper >&2 && exit /b 1 -@GOTO :EOF -: end batch / begin powershell #> - -$ErrorActionPreference = "Stop" -if ($env:MVNW_VERBOSE -eq "true") { - $VerbosePreference = "Continue" -} - -# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties -$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl -if (!$distributionUrl) { - Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" -} - -switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { - "maven-mvnd-*" { - $USE_MVND = $true - $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" - $MVN_CMD = "mvnd.cmd" - break - } - default { - $USE_MVND = $false - $MVN_CMD = $script -replace '^mvnw','mvn' - break - } -} - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -if ($env:MVNW_REPOURL) { - $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } - $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" -} -$distributionUrlName = $distributionUrl -replace '^.*/','' -$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' - -$MAVEN_M2_PATH = "$HOME/.m2" -if ($env:MAVEN_USER_HOME) { - $MAVEN_M2_PATH = "$env:MAVEN_USER_HOME" -} - -if (-not (Test-Path -Path $MAVEN_M2_PATH)) { - New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null -} - -$MAVEN_WRAPPER_DISTS = $null -if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) { - $MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists" -} else { - $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists" -} - -$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain" -$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' -$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" - -if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { - Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" - Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" - exit $? -} - -if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { - Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" -} - -# prepare tmp dir -$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile -$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" -$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null -trap { - if ($TMP_DOWNLOAD_DIR.Exists) { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } - } -} - -New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null - -# Download and Install Apache Maven -Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -Write-Verbose "Downloading from: $distributionUrl" -Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -$webclient = New-Object System.Net.WebClient -if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { - $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) -} -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum -if ($distributionSha256Sum) { - if ($USE_MVND) { - Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." - } - Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash - if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { - Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." - } -} - -# unzip and move -Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null - -# Find the actual extracted directory name (handles snapshots where filename != directory name) -$actualDistributionDir = "" - -# First try the expected directory name (for regular distributions) -$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain" -$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD" -if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) { - $actualDistributionDir = $distributionUrlNameMain -} - -# If not found, search for any directory with the Maven executable (for snapshots) -if (!$actualDistributionDir) { - Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object { - $testPath = Join-Path $_.FullName "bin/$MVN_CMD" - if (Test-Path -Path $testPath -PathType Leaf) { - $actualDistributionDir = $_.Name - } - } -} - -if (!$actualDistributionDir) { - Write-Error "Could not find Maven distribution directory in extracted archive" -} - -Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir" -Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null -try { - Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null -} catch { - if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { - Write-Error "fail to move MAVEN_HOME" - } -} finally { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } -} - -Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" +set WRAPPER_JAR=""%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS% +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml index ae930ae5c..6fdc4d17e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,45 +1,37 @@ - + 4.0.0 + org.springframework.samples + spring-petclinic + 1.5.1 + org.springframework.boot spring-boot-starter-parent - 4.0.0 + 1.5.4.RELEASE - org.springframework.samples - spring-petclinic - 4.0.0-SNAPSHOT petclinic + - 17 + 1.8 UTF-8 UTF-8 - - 2024-11-28T14:37:52Z - 1.1.2 - 5.3.8 - 4.7.0 + 3.3.6 + 1.11.4 + 2.2.4 + 1.8.0 + 3.0.6.RELEASE + + 2.7 - 12.1.2 - 0.8.14 - 0.3.4 - 1.0.0 - 3.6.0 - 0.0.11 - 0.0.47 - - - Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0 - - - @@ -54,182 +46,79 @@ org.springframework.boot spring-boot-starter-data-jpa + + org.springframework.boot + spring-boot-starter-web + org.springframework.boot spring-boot-starter-thymeleaf + + + nz.net.ultraq.thymeleaf + thymeleaf-layout-dialect + + org.springframework.boot - spring-boot-starter-validation - - - org.springframework.boot - spring-boot-starter-webmvc + spring-boot-starter-test + test + + + org.hsqldb + hsqldb + runtime + + + mysql + mysql-connector-java + runtime + + + javax.cache cache-api - jakarta.xml.bind - jakarta.xml.bind-api + org.ehcache + ehcache + - com.h2database - h2 - runtime - - - com.github.ben-manes.caffeine - caffeine - runtime - - - com.mysql - mysql-connector-j - runtime - - - org.postgresql - postgresql - runtime + org.webjars + webjars-locator org.webjars - webjars-locator-lite - ${webjars-locator.version} - runtime + jquery + ${webjars-jquery.version} - org.webjars.npm + org.webjars + jquery-ui + ${webjars-jquery-ui.version} + + + org.webjars bootstrap ${webjars-bootstrap.version} - runtime - - - org.webjars.npm - font-awesome - ${webjars-font-awesome.version} - runtime + org.springframework.boot spring-boot-devtools - true - - - - org.springframework.boot - spring-boot-starter-data-jpa-test - test - - - org.springframework.boot - spring-boot-starter-restclient-test - test - - - org.springframework.boot - spring-boot-starter-webmvc-test - test - - - org.springframework.boot - spring-boot-testcontainers - test - - - org.springframework.boot - spring-boot-docker-compose - test - - - org.testcontainers - testcontainers-junit-jupiter - test - - - org.testcontainers - testcontainers-mysql - test + runtime - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-java - - enforce - - - - - This build requires at least Java ${java.version}, update your JVM, and run the build again - ${java.version} - - - - - - - - io.spring.javaformat - spring-javaformat-maven-plugin - ${spring-format.version} - - - - validate - - validate - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - ${maven-checkstyle.version} - - - com.puppycrawl.tools - checkstyle - ${checkstyle.version} - - - io.spring.nohttp - nohttp-checkstyle - ${nohttp-checkstyle.version} - - - - - nohttp-checkstyle-validation - - check - - validate - - src/checkstyle/nohttp-checkstyle.xml - ${basedir} - **/* - **/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class - config_loc=${basedir}/src/checkstyle/ - - - - - - org.graalvm.buildtools - native-maven-plugin - org.springframework.boot spring-boot-maven-plugin @@ -244,168 +133,104 @@ ${project.build.sourceEncoding} ${project.reporting.outputEncoding} - ${java.version} - ${java.version} + ${maven.compiler.source} + ${maven.compiler.target} - org.jacoco - jacoco-maven-plugin - ${jacoco.version} + org.codehaus.mojo + cobertura-maven-plugin + ${cobertura.version} + + + - prepare-agent + clean + check - - report - - report - - prepare-package - - + - io.github.git-commit-id - git-commit-id-maven-plugin + pl.project13.maven + git-commit-id-plugin + + + + revision + + + + true + yyyy-MM-dd'T'HH:mm:ssZ + true + ${project.build.outputDirectory}/git.properties + false - false - + - - org.cyclonedx - cyclonedx-maven-plugin + ro.isdc.wro4j + wro4j-maven-plugin + ${wro4j.version} + + + generate-resources + + run + + + + + ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory + ${project.build.directory}/classes/static/resources/css + ${basedir}/src/main/wro/wro.xml + ${basedir}/src/main/wro/wro.properties + ${basedir}/src/main/less + + + + org.webjars + bootstrap + ${webjars-bootstrap.version} + + - - - css - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - - unpack - - - generate-resources - - - - org.webjars.npm - bootstrap - ${webjars-bootstrap.version} - - - ${project.build.directory}/webjars - - - - - - com.gitlab.haynes - libsass-maven-plugin - ${libsass.version} - - ${basedir}/src/main/scss/ - ${basedir}/src/main/resources/static/resources/css/ - ${project.build.directory}/webjars/META-INF/resources/webjars/bootstrap/${webjars-bootstrap.version}/scss/ - - - - - - compile - - generate-resources - - - - - - - - m2e - - - m2e.version - - - - - - - - org.eclipse.m2e - lifecycle-mapping - ${lifecycle-mapping} - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - [1,) - - check - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - [1,) - - build-info - - - - - - - - - io.spring.javaformat - spring-javaformat-maven-plugin - [0,) - - validate - - - - - - - - - - - - - - - + + + + + org.codehaus.mojo + cobertura-maven-plugin + ${cobertura.version} + + + html + + + + + + + + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + + + diff --git a/readme.md b/readme.md new file mode 100644 index 000000000..3f4c376ec --- /dev/null +++ b/readme.md @@ -0,0 +1,119 @@ +# Spring PetClinic Sample Application [![Build Status](https://travis-ci.org/spring-projects/spring-petclinic.png?branch=master)](https://travis-ci.org/spring-projects/spring-petclinic/) + +## Understanding the Spring Petclinic application with a few diagrams +See the presentation here + +## Running petclinic locally +``` + git clone https://github.com/spring-projects/spring-petclinic.git + cd spring-petclinic + ./mvnw spring-boot:run +``` + +You can then access petclinic here: http://localhost:8080/ + +petclinic-screenshot + +## In case you find a bug/suggested improvement for Spring Petclinic +Our issue tracker is available here: https://github.com/spring-projects/spring-petclinic/issues + + +## Database configuration + +In its default configuration, Petclinic uses an in-memory database (HSQLDB) which +gets populated at startup with data. A similar setup is provided for MySql in case a persistent database configuration is needed. +Note that whenever the database type is changed, the data-access.properties file needs to be updated and the mysql-connector-java artifact from the pom.xml needs to be uncommented. + +You could start a MySql database with docker: + +``` +docker run -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8 +``` + +## Working with Petclinic in Eclipse/STS + +### prerequisites +The following items should be installed in your system: +* Maven 3 (http://www.sonatype.com/books/mvnref-book/reference/installation.html) +* git command line tool (https://help.github.com/articles/set-up-git) +* Eclipse with the m2e plugin (m2e is installed by default when using the STS (http://www.springsource.org/sts) distribution of Eclipse) + +Note: when m2e is available, there is an m2 icon in Help -> About dialog. +If m2e is not there, just follow the install process here: http://eclipse.org/m2e/download/ + + +### Steps: + +1) In the command line +``` +git clone https://github.com/spring-projects/spring-petclinic.git +``` +2) Inside Eclipse +``` +File -> Import -> Maven -> Existing Maven project +``` + + +## Looking for something in particular? + +|Spring Boot Configuration | Class or Java property files | +|--------------------------|---| +|The Main Class | [PetClinicApplication](https://github.com/spring-projects/spring-petclinic/blob/master/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java) | +|Properties Files | [application.properties](https://github.com/spring-projects/spring-petclinic/blob/master/src/main/resources) | +|Caching | [CacheConfig](https://github.com/spring-projects/spring-petclinic/blob/master/src/main/java/org/springframework/samples/petclinic/system/CacheConfig.java) | + +## Interesting Spring Petclinic branches and forks + +The Spring Petclinic master branch in the main +[spring-projects](https://github.com/spring-projects/spring-petclinic) +GitHub org is the "canonical" implementation, currently based on +Spring Boot and Thymeleaf. There are quite a few forks in a special +GitHub org [spring-petclinic](https://github.com/spring-petclinic). If +you have a special interest in a different technology stack that could +be used to implement the Pet Clinic then please join the community +there. + +| Link | Main technologies | +|------------------------------------|-------------------| +| [spring-framework-petclinic][] | Spring Framework XML configuration, JSP pages, 3 persistence layers: JDBC, JPA and Spring Data JPA | +| [javaconfig branch][] | Same frameworks as the [spring-framework-petclinic][] but with Java Configuration instead of XML | +| [spring-petclinic-angularjs][] | AngularJS 1.x, Spring Boot and Spring Data JPA | +| [spring-petclinic-angular][] | Angular 4 front-end of the Petclinic REST API [spring-petclinic-rest][] | +| [spring-petclinic-microservices][] | Distributed version of Spring Petclinic built with Spring Cloud | +| [spring-petclinic-reactjs][] | ReactJS (with TypeScript) and Spring Boot | +| [spring-petclinic-graphql][] | GraphQL version based on React Appolo, TypeScript and GraphQL Spring boot starter | +| [spring-petclinic-kotlin][] | Kotlin version of [spring-petclinic][] | +| [spring-petclinic-rest][] | Backend REST API | + + +## Interaction with other open source projects + +One of the best parts about working on the Spring Petclinic application is that we have the opportunity to work in direct contact with many Open Source projects. We found some bugs/suggested improvements on various topics such as Spring, Spring Data, Bean Validation and even Eclipse! In many cases, they've been fixed/implemented in just a few days. +Here is a list of them: + +| Name | Issue | +|------|-------| +| Spring JDBC: simplify usage of NamedParameterJdbcTemplate | [SPR-10256](https://jira.springsource.org/browse/SPR-10256) and [SPR-10257](https://jira.springsource.org/browse/SPR-10257) | +| Bean Validation / Hibernate Validator: simplify Maven dependencies and backward compatibility |[HV-790](https://hibernate.atlassian.net/browse/HV-790) and [HV-792](https://hibernate.atlassian.net/browse/HV-792) | +| Spring Data: provide more flexibility when working with JPQL queries | [DATAJPA-292](https://jira.springsource.org/browse/DATAJPA-292) | + + +# Contributing + +The [issue tracker](https://github.com/spring-projects/spring-petclinic/issues) is the preferred channel for bug reports, features requests and submitting pull requests. + +For pull requests, editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at . If you have not previously done so, please fill out and submit the https://cla.pivotal.io/sign/spring[Contributor License Agreement]. + +# License + +The Spring PetClinic sample application is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0). + +[spring-petclinic]: https://github.com/spring-projects/spring-petclinic +[spring-framework-petclinic]: https://github.com/spring-petclinic/spring-framework-petclinic +[spring-petclinic-angularjs]: https://github.com/spring-petclinic/spring-petclinic-angularjs +[javaconfig branch]: https://github.com/spring-petclinic/spring-framework-petclinic/tree/javaconfig +[spring-petclinic-angular]: https://github.com/spring-petclinic/spring-petclinic-angular +[spring-petclinic-microservices]: https://github.com/spring-petclinic/spring-petclinic-microservices +[spring-petclinic-reactjs]: https://github.com/spring-petclinic/spring-petclinic-reactjs +[spring-petclinic-graphql]: https://github.com/spring-petclinic/spring-petclinic-graphql +[spring-petclinic-kotlin]: https://github.com/spring-petclinic/spring-petclinic-kotlin diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index e60ee14fa..000000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-petclinic' diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100755 index 000000000..d84ed7c2d --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,13 @@ +# Required metadata +sonar.projectKey=java-sonar-runner-simple +sonar.projectName=Simple Java project analyzed with the SonarQube Runner +sonar.projectVersion=1.0 + +# Comma-separated paths to directories with sources (required) +sonar.sources=src + +# Language +sonar.language=java + +# Encoding of the source files +sonar.sourceEncoding=UTF-8 \ No newline at end of file diff --git a/src/checkstyle/nohttp-checkstyle-suppressions.xml b/src/checkstyle/nohttp-checkstyle-suppressions.xml deleted file mode 100644 index f00599bb2..000000000 --- a/src/checkstyle/nohttp-checkstyle-suppressions.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/src/checkstyle/nohttp-checkstyle.xml b/src/checkstyle/nohttp-checkstyle.xml deleted file mode 100644 index f886411e6..000000000 --- a/src/checkstyle/nohttp-checkstyle.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java b/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java index fa0630995..224c326c7 100644 --- a/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java +++ b/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,19 +18,18 @@ package org.springframework.samples.petclinic; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ImportRuntimeHints; /** * PetClinic Spring Boot Application. - * + * * @author Dave Syer + * */ @SpringBootApplication -@ImportRuntimeHints(PetClinicRuntimeHints.class) public class PetClinicApplication { - public static void main(String[] args) { - SpringApplication.run(PetClinicApplication.class, args); - } + public static void main(String[] args) throws Exception { + SpringApplication.run(PetClinicApplication.class, args); + } } diff --git a/src/main/java/org/springframework/samples/petclinic/PetClinicRuntimeHints.java b/src/main/java/org/springframework/samples/petclinic/PetClinicRuntimeHints.java deleted file mode 100644 index 4999f4c3c..000000000 --- a/src/main/java/org/springframework/samples/petclinic/PetClinicRuntimeHints.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.samples.petclinic; - -import org.springframework.aot.hint.RuntimeHints; -import org.springframework.aot.hint.RuntimeHintsRegistrar; -import org.springframework.samples.petclinic.model.BaseEntity; -import org.springframework.samples.petclinic.model.Person; -import org.springframework.samples.petclinic.vet.Vet; - -public class PetClinicRuntimeHints implements RuntimeHintsRegistrar { - - @Override - public void registerHints(RuntimeHints hints, ClassLoader classLoader) { - hints.resources().registerPattern("db/*"); // https://github.com/spring-projects/spring-boot/issues/32654 - hints.resources().registerPattern("messages/*"); - hints.resources().registerPattern("mysql-default-conf"); - hints.serialization().registerType(BaseEntity.class); - hints.serialization().registerType(Person.class); - hints.serialization().registerType(Vet.class); - } - -} diff --git a/src/main/java/org/springframework/samples/petclinic/model/BaseEntity.java b/src/main/java/org/springframework/samples/petclinic/model/BaseEntity.java index 6babed56d..86cc21092 100644 --- a/src/main/java/org/springframework/samples/petclinic/model/BaseEntity.java +++ b/src/main/java/org/springframework/samples/petclinic/model/BaseEntity.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,10 +17,10 @@ package org.springframework.samples.petclinic.model; import java.io.Serializable; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.GenerationType; -import jakarta.persistence.Id; -import jakarta.persistence.MappedSuperclass; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.MappedSuperclass; /** * Simple JavaBean domain object with an id property. Used as a base class for objects @@ -31,21 +31,20 @@ import jakarta.persistence.MappedSuperclass; */ @MappedSuperclass public class BaseEntity implements Serializable { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Integer id; + public Integer getId() { + return id; + } - public Integer getId() { - return id; - } + public void setId(Integer id) { + this.id = id; + } - public void setId(Integer id) { - this.id = id; - } - - public boolean isNew() { - return this.id == null; - } + public boolean isNew() { + return this.id == null; + } } diff --git a/src/main/java/org/springframework/samples/petclinic/model/NamedEntity.java b/src/main/java/org/springframework/samples/petclinic/model/NamedEntity.java index 61e882a95..d66c97ae7 100644 --- a/src/main/java/org/springframework/samples/petclinic/model/NamedEntity.java +++ b/src/main/java/org/springframework/samples/petclinic/model/NamedEntity.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,37 +15,34 @@ */ package org.springframework.samples.petclinic.model; -import jakarta.persistence.Column; -import jakarta.persistence.MappedSuperclass; -import jakarta.validation.constraints.NotBlank; +import javax.persistence.Column; +import javax.persistence.MappedSuperclass; + /** - * Simple JavaBean domain object adds a name property to BaseEntity. Used as - * a base class for objects needing these properties. + * Simple JavaBean domain object adds a name property to BaseEntity. Used as a base class for objects + * needing these properties. * * @author Ken Krebs * @author Juergen Hoeller - * @author Wick Dynex */ @MappedSuperclass public class NamedEntity extends BaseEntity { - @Column - @NotBlank - private String name; + @Column(name = "name") + private String name; - public String getName() { - return this.name; - } + public String getName() { + return this.name; + } - public void setName(String name) { - this.name = name; - } + public void setName(String name) { + this.name = name; + } - @Override - public String toString() { - String name = this.getName(); - return (name != null) ? name : ""; - } + @Override + public String toString() { + return this.getName(); + } } diff --git a/src/main/java/org/springframework/samples/petclinic/model/Person.java b/src/main/java/org/springframework/samples/petclinic/model/Person.java index 30b5829d8..4cb7481e0 100644 --- a/src/main/java/org/springframework/samples/petclinic/model/Person.java +++ b/src/main/java/org/springframework/samples/petclinic/model/Person.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,9 +15,10 @@ */ package org.springframework.samples.petclinic.model; -import jakarta.persistence.Column; -import jakarta.persistence.MappedSuperclass; -import jakarta.validation.constraints.NotBlank; +import javax.persistence.Column; +import javax.persistence.MappedSuperclass; + +import org.hibernate.validator.constraints.NotEmpty; /** * Simple JavaBean domain object representing an person. @@ -27,28 +28,28 @@ import jakarta.validation.constraints.NotBlank; @MappedSuperclass public class Person extends BaseEntity { - @Column - @NotBlank - private String firstName; + @Column(name = "first_name") + @NotEmpty + private String firstName; - @Column - @NotBlank - private String lastName; + @Column(name = "last_name") + @NotEmpty + private String lastName; - public String getFirstName() { - return this.firstName; - } + public String getFirstName() { + return this.firstName; + } - public void setFirstName(String firstName) { - this.firstName = firstName; - } + public void setFirstName(String firstName) { + this.firstName = firstName; + } - public String getLastName() { - return this.lastName; - } + public String getLastName() { + return this.lastName; + } - public void setLastName(String lastName) { - this.lastName = lastName; - } + public void setLastName(String lastName) { + this.lastName = lastName; + } } diff --git a/src/main/java/org/springframework/samples/petclinic/model/package-info.java b/src/main/java/org/springframework/samples/petclinic/model/package-info.java index e8982c3d4..78294d130 100644 --- a/src/main/java/org/springframework/samples/petclinic/model/package-info.java +++ b/src/main/java/org/springframework/samples/petclinic/model/package-info.java @@ -1,20 +1,5 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * The classes in this package represent utilities used by the domain. */ package org.springframework.samples.petclinic.model; + diff --git a/src/main/java/org/springframework/samples/petclinic/owner/Owner.java b/src/main/java/org/springframework/samples/petclinic/owner/Owner.java index 480a7a690..f6fcae7ac 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/Owner.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/Owner.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,23 +16,23 @@ package org.springframework.samples.petclinic.owner; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; import java.util.List; -import java.util.Objects; +import java.util.Set; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.validation.constraints.Digits; + +import org.hibernate.validator.constraints.NotEmpty; +import org.springframework.beans.support.MutableSortDefinition; +import org.springframework.beans.support.PropertyComparator; import org.springframework.core.style.ToStringCreator; import org.springframework.samples.petclinic.model.Person; -import org.springframework.util.Assert; - -import jakarta.persistence.CascadeType; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.FetchType; -import jakarta.persistence.JoinColumn; -import jakarta.persistence.OneToMany; -import jakarta.persistence.OrderBy; -import jakarta.persistence.Table; -import jakarta.validation.constraints.Pattern; -import jakarta.validation.constraints.NotBlank; /** * Simple JavaBean domain object representing an owner. @@ -41,136 +41,116 @@ import jakarta.validation.constraints.NotBlank; * @author Juergen Hoeller * @author Sam Brannen * @author Michael Isvy - * @author Oliver Drotbohm - * @author Wick Dynex */ @Entity @Table(name = "owners") public class Owner extends Person { + @Column(name = "address") + @NotEmpty + private String address; - @Column - @NotBlank - private String address; + @Column(name = "city") + @NotEmpty + private String city; - @Column - @NotBlank - private String city; + @Column(name = "telephone") + @NotEmpty + @Digits(fraction = 0, integer = 10) + private String telephone; - @Column - @NotBlank - @Pattern(regexp = "\\d{10}", message = "{telephone.invalid}") - private String telephone; + @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") + private Set pets; - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "owner_id") - @OrderBy("name") - private final List pets = new ArrayList<>(); - public String getAddress() { - return this.address; - } + public String getAddress() { + return this.address; + } - public void setAddress(String address) { - this.address = address; - } + public void setAddress(String address) { + this.address = address; + } - public String getCity() { - return this.city; - } + public String getCity() { + return this.city; + } - public void setCity(String city) { - this.city = city; - } + public void setCity(String city) { + this.city = city; + } - public String getTelephone() { - return this.telephone; - } + public String getTelephone() { + return this.telephone; + } - public void setTelephone(String telephone) { - this.telephone = telephone; - } + public void setTelephone(String telephone) { + this.telephone = telephone; + } - public List getPets() { - return this.pets; - } + protected Set getPetsInternal() { + if (this.pets == null) { + this.pets = new HashSet<>(); + } + return this.pets; + } - public void addPet(Pet pet) { - if (pet.isNew()) { - getPets().add(pet); - } - } + protected void setPetsInternal(Set pets) { + this.pets = pets; + } - /** - * Return the Pet with the given name, or null if none found for this Owner. - * @param name to test - * @return the Pet with the given name, or null if no such Pet exists for this Owner - */ - public Pet getPet(String name) { - return getPet(name, false); - } + public List getPets() { + List sortedPets = new ArrayList<>(getPetsInternal()); + PropertyComparator.sort(sortedPets, new MutableSortDefinition("name", true, true)); + return Collections.unmodifiableList(sortedPets); + } - /** - * Return the Pet with the given id, or null if none found for this Owner. - * @param id to test - * @return the Pet with the given id, or null if no such Pet exists for this Owner - */ - public Pet getPet(Integer id) { - for (Pet pet : getPets()) { - if (!pet.isNew()) { - Integer compId = pet.getId(); - if (Objects.equals(compId, id)) { - return pet; - } - } - } - return null; - } + public void addPet(Pet pet) { + if (pet.isNew()) { + getPetsInternal().add(pet); + } + pet.setOwner(this); + } - /** - * Return the Pet with the given name, or null if none found for this Owner. - * @param name to test - * @param ignoreNew whether to ignore new pets (pets that are not saved yet) - * @return the Pet with the given name, or null if no such Pet exists for this Owner - */ - public Pet getPet(String name, boolean ignoreNew) { - for (Pet pet : getPets()) { - String compName = pet.getName(); - if (compName != null && compName.equalsIgnoreCase(name)) { - if (!ignoreNew || !pet.isNew()) { - return pet; - } - } - } - return null; - } + /** + * Return the Pet with the given name, or null if none found for this Owner. + * + * @param name to test + * @return true if pet name is already in use + */ + public Pet getPet(String name) { + return getPet(name, false); + } - @Override - public String toString() { - return new ToStringCreator(this).append("id", this.getId()) - .append("new", this.isNew()) - .append("lastName", this.getLastName()) - .append("firstName", this.getFirstName()) - .append("address", this.address) - .append("city", this.city) - .append("telephone", this.telephone) - .toString(); - } + /** + * Return the Pet with the given name, or null if none found for this Owner. + * + * @param name to test + * @return true if pet name is already in use + */ + public Pet getPet(String name, boolean ignoreNew) { + name = name.toLowerCase(); + for (Pet pet : getPetsInternal()) { + if (!ignoreNew || !pet.isNew()) { + String compName = pet.getName(); + compName = compName.toLowerCase(); + if (compName.equals(name)) { + return pet; + } + } + } + return null; + } - /** - * Adds the given {@link Visit} to the {@link Pet} with the given identifier. - * @param petId the identifier of the {@link Pet}, must not be {@literal null}. - * @param visit the visit to add, must not be {@literal null}. - */ - public void addVisit(Integer petId, Visit visit) { - - Assert.notNull(petId, "Pet identifier must not be null!"); - Assert.notNull(visit, "Visit must not be null!"); - - Pet pet = getPet(petId); - - Assert.notNull(pet, "Invalid Pet identifier!"); - - pet.addVisit(visit); - } + @Override + public String toString() { + return new ToStringCreator(this) + .append("id", this.getId()) + .append("new", this.isNew()) + .append("lastName", this.getLastName()) + .append("firstName", this.getFirstName()) + .append("address", this.address) + .append("city", this.city) + .append("telephone", this.telephone) + .toString(); + } } diff --git a/src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java b/src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java index 199ca3611..d914ed745 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,162 +15,121 @@ */ package org.springframework.samples.petclinic.owner; -import java.util.List; -import java.util.Objects; -import java.util.Optional; - -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.InitBinder; -import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; -import jakarta.validation.Valid; - -import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import javax.validation.Valid; +import java.util.Collection; +import java.util.Map; /** * @author Juergen Hoeller * @author Ken Krebs * @author Arjen Poutsma * @author Michael Isvy - * @author Wick Dynex */ @Controller class OwnerController { - private static final String VIEWS_OWNER_CREATE_OR_UPDATE_FORM = "owners/createOrUpdateOwnerForm"; + private static final String VIEWS_OWNER_CREATE_OR_UPDATE_FORM = "owners/createOrUpdateOwnerForm"; + private final OwnerRepository owners; - private final OwnerRepository owners; - public OwnerController(OwnerRepository owners) { - this.owners = owners; - } + @Autowired + public OwnerController(OwnerRepository clinicService) { + this.owners = clinicService; + } - @InitBinder - public void setAllowedFields(WebDataBinder dataBinder) { - dataBinder.setDisallowedFields("id"); - } + @InitBinder + public void setAllowedFields(WebDataBinder dataBinder) { + dataBinder.setDisallowedFields("id"); + } - @ModelAttribute("owner") - public Owner findOwner(@PathVariable(name = "ownerId", required = false) Integer ownerId) { - return ownerId == null ? new Owner() - : this.owners.findById(ownerId) - .orElseThrow(() -> new IllegalArgumentException("Owner not found with id: " + ownerId - + ". Please ensure the ID is correct " + "and the owner exists in the database.")); - } + @GetMapping("/owners/new") + public String initCreationForm(Map model) { + Owner owner = new Owner(); + model.put("owner", owner); + return VIEWS_OWNER_CREATE_OR_UPDATE_FORM; + } - @GetMapping("/owners/new") - public String initCreationForm() { - return VIEWS_OWNER_CREATE_OR_UPDATE_FORM; - } + @PostMapping("/owners/new") + public String processCreationForm(@Valid Owner owner, BindingResult result) { + if (result.hasErrors()) { + return VIEWS_OWNER_CREATE_OR_UPDATE_FORM; + } else { + this.owners.save(owner); + return "redirect:/owners/" + owner.getId(); + } + } - @PostMapping("/owners/new") - public String processCreationForm(@Valid Owner owner, BindingResult result, RedirectAttributes redirectAttributes) { - if (result.hasErrors()) { - redirectAttributes.addFlashAttribute("error", "There was an error in creating the owner."); - return VIEWS_OWNER_CREATE_OR_UPDATE_FORM; - } + @GetMapping("/owners/find") + public String initFindForm(Map model) { + model.put("owner", new Owner()); + return "owners/findOwners"; + } - this.owners.save(owner); - redirectAttributes.addFlashAttribute("message", "New Owner Created"); - return "redirect:/owners/" + owner.getId(); - } + @GetMapping("/owners") + public String processFindForm(Owner owner, BindingResult result, Map model) { - @GetMapping("/owners/find") - public String initFindForm() { - return "owners/findOwners"; - } + // allow parameterless GET request for /owners to return all records + if (owner.getLastName() == null) { + owner.setLastName(""); // empty string signifies broadest possible search + } - @GetMapping("/owners") - public String processFindForm(@RequestParam(defaultValue = "1") int page, Owner owner, BindingResult result, - Model model) { - // allow parameterless GET request for /owners to return all records - String lastName = owner.getLastName(); - if (lastName == null) { - lastName = ""; // empty string signifies broadest possible search - } + // find owners by last name + Collection results = this.owners.findByLastName(owner.getLastName()); + if (results.isEmpty()) { + // no owners found + result.rejectValue("lastName", "notFound", "not found"); + return "owners/findOwners"; + } else if (results.size() == 1) { + // 1 owner found + owner = results.iterator().next(); + return "redirect:/owners/" + owner.getId(); + } else { + // multiple owners found + model.put("selections", results); + return "owners/ownersList"; + } + } - // find owners by last name - Page ownersResults = findPaginatedForOwnersLastName(page, lastName); - if (ownersResults.isEmpty()) { - // no owners found - result.rejectValue("lastName", "notFound", "not found"); - return "owners/findOwners"; - } + @GetMapping("/owners/{ownerId}/edit") + public String initUpdateOwnerForm(@PathVariable("ownerId") int ownerId, Model model) { + Owner owner = this.owners.findById(ownerId); + model.addAttribute(owner); + return VIEWS_OWNER_CREATE_OR_UPDATE_FORM; + } - if (ownersResults.getTotalElements() == 1) { - // 1 owner found - owner = ownersResults.iterator().next(); - return "redirect:/owners/" + owner.getId(); - } + @PostMapping("/owners/{ownerId}/edit") + public String processUpdateOwnerForm(@Valid Owner owner, BindingResult result, @PathVariable("ownerId") int ownerId) { + if (result.hasErrors()) { + return VIEWS_OWNER_CREATE_OR_UPDATE_FORM; + } else { + owner.setId(ownerId); + this.owners.save(owner); + return "redirect:/owners/{ownerId}"; + } + } - // multiple owners found - return addPaginationModel(page, model, ownersResults); - } - - private String addPaginationModel(int page, Model model, Page paginated) { - List listOwners = paginated.getContent(); - model.addAttribute("currentPage", page); - model.addAttribute("totalPages", paginated.getTotalPages()); - model.addAttribute("totalItems", paginated.getTotalElements()); - model.addAttribute("listOwners", listOwners); - return "owners/ownersList"; - } - - private Page findPaginatedForOwnersLastName(int page, String lastname) { - int pageSize = 5; - Pageable pageable = PageRequest.of(page - 1, pageSize); - return owners.findByLastNameStartingWith(lastname, pageable); - } - - @GetMapping("/owners/{ownerId}/edit") - public String initUpdateOwnerForm() { - return VIEWS_OWNER_CREATE_OR_UPDATE_FORM; - } - - @PostMapping("/owners/{ownerId}/edit") - public String processUpdateOwnerForm(@Valid Owner owner, BindingResult result, @PathVariable("ownerId") int ownerId, - RedirectAttributes redirectAttributes) { - if (result.hasErrors()) { - redirectAttributes.addFlashAttribute("error", "There was an error in updating the owner."); - return VIEWS_OWNER_CREATE_OR_UPDATE_FORM; - } - - if (!Objects.equals(owner.getId(), ownerId)) { - result.rejectValue("id", "mismatch", "The owner ID in the form does not match the URL."); - redirectAttributes.addFlashAttribute("error", "Owner ID mismatch. Please try again."); - return "redirect:/owners/{ownerId}/edit"; - } - - owner.setId(ownerId); - this.owners.save(owner); - redirectAttributes.addFlashAttribute("message", "Owner Values Updated"); - return "redirect:/owners/{ownerId}"; - } - - /** - * Custom handler for displaying an owner. - * @param ownerId the ID of the owner to display - * @return a ModelMap with the model attributes for the view - */ - @GetMapping("/owners/{ownerId}") - public ModelAndView showOwner(@PathVariable("ownerId") int ownerId) { - ModelAndView mav = new ModelAndView("owners/ownerDetails"); - Optional optionalOwner = this.owners.findById(ownerId); - Owner owner = optionalOwner.orElseThrow(() -> new IllegalArgumentException( - "Owner not found with id: " + ownerId + ". Please ensure the ID is correct ")); - mav.addObject(owner); - return mav; - } + /** + * Custom handler for displaying an owner. + * + * @param ownerId the ID of the owner to display + * @return a ModelMap with the model attributes for the view + */ + @GetMapping("/owners/{ownerId}") + public ModelAndView showOwner(@PathVariable("ownerId") int ownerId) { + ModelAndView mav = new ModelAndView("owners/ownerDetails"); + mav.addObject(this.owners.findById(ownerId)); + return mav; + } } diff --git a/src/main/java/org/springframework/samples/petclinic/owner/OwnerRepository.java b/src/main/java/org/springframework/samples/petclinic/owner/OwnerRepository.java index d2b3dde40..068f5245d 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/OwnerRepository.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/OwnerRepository.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,48 +15,49 @@ */ package org.springframework.samples.petclinic.owner; -import java.util.Optional; +import java.util.Collection; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.Repository; +import org.springframework.data.repository.query.Param; +import org.springframework.transaction.annotation.Transactional; /** - * Repository class for Owner domain objects. All method names are compliant - * with Spring Data naming conventions so this interface can easily be extended for Spring - * Data. See: - * https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.query-methods.query-creation + * Repository class for Owner domain objects All method names are compliant with Spring Data naming + * conventions so this interface can easily be extended for Spring Data See here: http://static.springsource.org/spring-data/jpa/docs/current/reference/html/jpa.repositories.html#jpa.query-methods.query-creation * * @author Ken Krebs * @author Juergen Hoeller * @author Sam Brannen * @author Michael Isvy - * @author Wick Dynex */ -public interface OwnerRepository extends JpaRepository { +public interface OwnerRepository extends Repository { - /** - * Retrieve {@link Owner}s from the data store by last name, returning all owners - * whose last name starts with the given name. - * @param lastName Value to search for - * @return a Collection of matching {@link Owner}s (or an empty Collection if none - * found) - */ - Page findByLastNameStartingWith(String lastName, Pageable pageable); + /** + * Retrieve {@link Owner}s from the data store by last name, returning all owners + * whose last name starts with the given name. + * @param lastName Value to search for + * @return a Collection of matching {@link Owner}s (or an empty Collection if none + * found) + */ + @Query("SELECT DISTINCT owner FROM Owner owner left join fetch owner.pets WHERE owner.lastName LIKE :lastName%") + @Transactional(readOnly = true) + Collection findByLastName(@Param("lastName") String lastName); + + /** + * Retrieve an {@link Owner} from the data store by id. + * @param id the id to search for + * @return the {@link Owner} if found + */ + @Query("SELECT owner FROM Owner owner left join fetch owner.pets WHERE owner.id =:id") + @Transactional(readOnly = true) + Owner findById(@Param("id") Integer id); + + /** + * Save an {@link Owner} to the data store, either inserting or updating it. + * @param owner the {@link Owner} to save + */ + void save(Owner owner); - /** - * Retrieve an {@link Owner} from the data store by id. - *

- * This method returns an {@link Optional} containing the {@link Owner} if found. If - * no {@link Owner} is found with the provided id, it will return an empty - * {@link Optional}. - *

- * @param id the id to search for - * @return an {@link Optional} containing the {@link Owner} if found, or an empty - * {@link Optional} if not found. - * @throws IllegalArgumentException if the id is null (assuming null is not a valid - * input for id) - */ - Optional findById(Integer id); } diff --git a/src/main/java/org/springframework/samples/petclinic/owner/Pet.java b/src/main/java/org/springframework/samples/petclinic/owner/Pet.java old mode 100644 new mode 100755 index 4f8409ef2..5e226a180 --- a/src/main/java/org/springframework/samples/petclinic/owner/Pet.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/Pet.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,23 +15,30 @@ */ package org.springframework.samples.petclinic.owner; -import java.time.LocalDate; -import java.util.Collection; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.HashSet; import java.util.LinkedHashSet; +import java.util.List; import java.util.Set; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.springframework.beans.support.MutableSortDefinition; +import org.springframework.beans.support.PropertyComparator; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.samples.petclinic.model.NamedEntity; - -import jakarta.persistence.CascadeType; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.FetchType; -import jakarta.persistence.JoinColumn; -import jakarta.persistence.ManyToOne; -import jakarta.persistence.OneToMany; -import jakarta.persistence.OrderBy; -import jakarta.persistence.Table; +import org.springframework.samples.petclinic.visit.Visit; /** * Simple business object representing a pet. @@ -39,47 +46,72 @@ import jakarta.persistence.Table; * @author Ken Krebs * @author Juergen Hoeller * @author Sam Brannen - * @author Wick Dynex */ @Entity @Table(name = "pets") public class Pet extends NamedEntity { - @Column - @DateTimeFormat(pattern = "yyyy-MM-dd") - private LocalDate birthDate; + @Column(name = "birth_date") + @Temporal(TemporalType.DATE) + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date birthDate; - @ManyToOne - @JoinColumn(name = "type_id") - private PetType type; + @ManyToOne + @JoinColumn(name = "type_id") + private PetType type; - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "pet_id") - @OrderBy("date ASC") - private final Set visits = new LinkedHashSet<>(); + @ManyToOne + @JoinColumn(name = "owner_id") + private Owner owner; - public void setBirthDate(LocalDate birthDate) { - this.birthDate = birthDate; - } + @OneToMany(cascade = CascadeType.ALL, mappedBy = "petId", fetch = FetchType.EAGER) + private Set visits = new LinkedHashSet<>(); - public LocalDate getBirthDate() { - return this.birthDate; - } + public void setBirthDate(Date birthDate) { + this.birthDate = birthDate; + } - public PetType getType() { - return this.type; - } + public Date getBirthDate() { + return this.birthDate; + } - public void setType(PetType type) { - this.type = type; - } + public PetType getType() { + return this.type; + } - public Collection getVisits() { - return this.visits; - } + public void setType(PetType type) { + this.type = type; + } - public void addVisit(Visit visit) { - getVisits().add(visit); - } + public Owner getOwner() { + return this.owner; + } + + protected void setOwner(Owner owner) { + this.owner = owner; + } + + protected Set getVisitsInternal() { + if (this.visits == null) { + this.visits = new HashSet<>(); + } + return this.visits; + } + + protected void setVisitsInternal(Set visits) { + this.visits = visits; + } + + public List getVisits() { + List sortedVisits = new ArrayList<>(getVisitsInternal()); + PropertyComparator.sort(sortedVisits, + new MutableSortDefinition("date", false, false)); + return Collections.unmodifiableList(sortedVisits); + } + + public void addVisit(Visit visit) { + getVisitsInternal().add(visit); + visit.setPetId(this.getId()); + } } diff --git a/src/main/java/org/springframework/samples/petclinic/owner/PetController.java b/src/main/java/org/springframework/samples/petclinic/owner/PetController.java index 8398e4f13..9c52e0309 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/PetController.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/PetController.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,167 +15,97 @@ */ package org.springframework.samples.petclinic.owner; -import java.time.LocalDate; -import java.util.Collection; -import java.util.Objects; -import java.util.Optional; - +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; -import org.springframework.util.Assert; import org.springframework.util.StringUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.WebDataBinder; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.InitBinder; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.*; -import jakarta.validation.Valid; - -import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import javax.validation.Valid; +import java.util.Collection; /** * @author Juergen Hoeller * @author Ken Krebs * @author Arjen Poutsma - * @author Wick Dynex */ @Controller @RequestMapping("/owners/{ownerId}") class PetController { - private static final String VIEWS_PETS_CREATE_OR_UPDATE_FORM = "pets/createOrUpdatePetForm"; + private static final String VIEWS_PETS_CREATE_OR_UPDATE_FORM = "pets/createOrUpdatePetForm"; + private final PetRepository pets; + private final OwnerRepository owners; - private final OwnerRepository owners; + @Autowired + public PetController(PetRepository pets, OwnerRepository owners) { + this.pets = pets; + this.owners = owners; + } - private final PetTypeRepository types; + @ModelAttribute("types") + public Collection populatePetTypes() { + return this.pets.findPetTypes(); + } - public PetController(OwnerRepository owners, PetTypeRepository types) { - this.owners = owners; - this.types = types; - } + @ModelAttribute("owner") + public Owner findOwner(@PathVariable("ownerId") int ownerId) { + return this.owners.findById(ownerId); + } - @ModelAttribute("types") - public Collection populatePetTypes() { - return this.types.findPetTypes(); - } + @InitBinder("owner") + public void initOwnerBinder(WebDataBinder dataBinder) { + dataBinder.setDisallowedFields("id"); + } - @ModelAttribute("owner") - public Owner findOwner(@PathVariable("ownerId") int ownerId) { - Optional optionalOwner = this.owners.findById(ownerId); - Owner owner = optionalOwner.orElseThrow(() -> new IllegalArgumentException( - "Owner not found with id: " + ownerId + ". Please ensure the ID is correct ")); - return owner; - } + @InitBinder("pet") + public void initPetBinder(WebDataBinder dataBinder) { + dataBinder.setValidator(new PetValidator()); + } - @ModelAttribute("pet") - public Pet findPet(@PathVariable("ownerId") int ownerId, - @PathVariable(name = "petId", required = false) Integer petId) { + @GetMapping("/pets/new") + public String initCreationForm(Owner owner, ModelMap model) { + Pet pet = new Pet(); + owner.addPet(pet); + model.put("pet", pet); + return VIEWS_PETS_CREATE_OR_UPDATE_FORM; + } - if (petId == null) { - return new Pet(); - } + @PostMapping("/pets/new") + public String processCreationForm(Owner owner, @Valid Pet pet, BindingResult result, ModelMap model) { + if (StringUtils.hasLength(pet.getName()) && pet.isNew() && owner.getPet(pet.getName(), true) != null){ + result.rejectValue("name", "duplicate", "already exists"); + } + owner.addPet(pet); + if (result.hasErrors()) { + model.put("pet", pet); + return VIEWS_PETS_CREATE_OR_UPDATE_FORM; + } else { + this.pets.save(pet); + return "redirect:/owners/{ownerId}"; + } + } - Optional optionalOwner = this.owners.findById(ownerId); - Owner owner = optionalOwner.orElseThrow(() -> new IllegalArgumentException( - "Owner not found with id: " + ownerId + ". Please ensure the ID is correct ")); - return owner.getPet(petId); - } + @GetMapping("/pets/{petId}/edit") + public String initUpdateForm(@PathVariable("petId") int petId, ModelMap model) { + Pet pet = this.pets.findById(petId); + model.put("pet", pet); + return VIEWS_PETS_CREATE_OR_UPDATE_FORM; + } - @InitBinder("owner") - public void initOwnerBinder(WebDataBinder dataBinder) { - dataBinder.setDisallowedFields("id"); - } - - @InitBinder("pet") - public void initPetBinder(WebDataBinder dataBinder) { - dataBinder.setValidator(new PetValidator()); - } - - @GetMapping("/pets/new") - public String initCreationForm(Owner owner, ModelMap model) { - Pet pet = new Pet(); - owner.addPet(pet); - return VIEWS_PETS_CREATE_OR_UPDATE_FORM; - } - - @PostMapping("/pets/new") - public String processCreationForm(Owner owner, @Valid Pet pet, BindingResult result, - RedirectAttributes redirectAttributes) { - - if (StringUtils.hasText(pet.getName()) && pet.isNew() && owner.getPet(pet.getName(), true) != null) - result.rejectValue("name", "duplicate", "already exists"); - - LocalDate currentDate = LocalDate.now(); - if (pet.getBirthDate() != null && pet.getBirthDate().isAfter(currentDate)) { - result.rejectValue("birthDate", "typeMismatch.birthDate"); - } - - if (result.hasErrors()) { - return VIEWS_PETS_CREATE_OR_UPDATE_FORM; - } - - owner.addPet(pet); - this.owners.save(owner); - redirectAttributes.addFlashAttribute("message", "New Pet has been Added"); - return "redirect:/owners/{ownerId}"; - } - - @GetMapping("/pets/{petId}/edit") - public String initUpdateForm() { - return VIEWS_PETS_CREATE_OR_UPDATE_FORM; - } - - @PostMapping("/pets/{petId}/edit") - public String processUpdateForm(Owner owner, @Valid Pet pet, BindingResult result, - RedirectAttributes redirectAttributes) { - - String petName = pet.getName(); - - // checking if the pet name already exists for the owner - if (StringUtils.hasText(petName)) { - Pet existingPet = owner.getPet(petName, false); - if (existingPet != null && !Objects.equals(existingPet.getId(), pet.getId())) { - result.rejectValue("name", "duplicate", "already exists"); - } - } - - LocalDate currentDate = LocalDate.now(); - if (pet.getBirthDate() != null && pet.getBirthDate().isAfter(currentDate)) { - result.rejectValue("birthDate", "typeMismatch.birthDate"); - } - - if (result.hasErrors()) { - return VIEWS_PETS_CREATE_OR_UPDATE_FORM; - } - - updatePetDetails(owner, pet); - redirectAttributes.addFlashAttribute("message", "Pet details has been edited"); - return "redirect:/owners/{ownerId}"; - } - - /** - * Updates the pet details if it exists or adds a new pet to the owner. - * @param owner The owner of the pet - * @param pet The pet with updated details - */ - private void updatePetDetails(Owner owner, Pet pet) { - Integer id = pet.getId(); - Assert.state(id != null, "'pet.getId()' must not be null"); - Pet existingPet = owner.getPet(id); - if (existingPet != null) { - // Update existing pet's properties - existingPet.setName(pet.getName()); - existingPet.setBirthDate(pet.getBirthDate()); - existingPet.setType(pet.getType()); - } - else { - owner.addPet(pet); - } - this.owners.save(owner); - } + @PostMapping("/pets/{petId}/edit") + public String processUpdateForm(@Valid Pet pet, BindingResult result, Owner owner, ModelMap model) { + if (result.hasErrors()) { + pet.setOwner(owner); + model.put("pet", pet); + return VIEWS_PETS_CREATE_OR_UPDATE_FORM; + } else { + owner.addPet(pet); + this.pets.save(pet); + return "redirect:/owners/{ownerId}"; + } + } } diff --git a/src/main/java/org/springframework/samples/petclinic/owner/PetRepository.java b/src/main/java/org/springframework/samples/petclinic/owner/PetRepository.java new file mode 100644 index 000000000..b0ec5db23 --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/owner/PetRepository.java @@ -0,0 +1,58 @@ +/* + * Copyright 2002-2013 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.owner; + +import java.util.List; + +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.Repository; +import org.springframework.transaction.annotation.Transactional; + +/** + * Repository class for Pet domain objects All method names are compliant with Spring Data naming + * conventions so this interface can easily be extended for Spring Data See here: http://static.springsource.org/spring-data/jpa/docs/current/reference/html/jpa.repositories.html#jpa.query-methods.query-creation + * + * @author Ken Krebs + * @author Juergen Hoeller + * @author Sam Brannen + * @author Michael Isvy + */ +public interface PetRepository extends Repository { + + /** + * Retrieve all {@link PetType}s from the data store. + * @return a Collection of {@link PetType}s. + */ + @Query("SELECT ptype FROM PetType ptype ORDER BY ptype.name") + @Transactional(readOnly = true) + List findPetTypes(); + + /** + * Retrieve a {@link Pet} from the data store by id. + * @param id the id to search for + * @return the {@link Pet} if found + */ + @Transactional(readOnly = true) + Pet findById(Integer id); + + /** + * Save a {@link Pet} to the data store, either inserting or updating it. + * @param pet the {@link Pet} to save + */ + void save(Pet pet); + +} + diff --git a/src/main/java/org/springframework/samples/petclinic/owner/PetType.java b/src/main/java/org/springframework/samples/petclinic/owner/PetType.java index e7d63d1aa..ac827b310 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/PetType.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/PetType.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,13 +15,14 @@ */ package org.springframework.samples.petclinic.owner; +import javax.persistence.Entity; +import javax.persistence.Table; + import org.springframework.samples.petclinic.model.NamedEntity; -import jakarta.persistence.Entity; -import jakarta.persistence.Table; - /** - * @author Juergen Hoeller Can be Cat, Dog, Hamster... + * @author Juergen Hoeller + * Can be Cat, Dog, Hamster... */ @Entity @Table(name = "types") diff --git a/src/main/java/org/springframework/samples/petclinic/owner/PetTypeFormatter.java b/src/main/java/org/springframework/samples/petclinic/owner/PetTypeFormatter.java index b62751c97..78451ca28 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/PetTypeFormatter.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/PetTypeFormatter.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,19 +15,21 @@ */ package org.springframework.samples.petclinic.owner; -import org.springframework.format.Formatter; -import org.springframework.stereotype.Component; import java.text.ParseException; import java.util.Collection; import java.util.Locale; -import java.util.Objects; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.Formatter; +import org.springframework.stereotype.Component; /** - * Instructs Spring MVC on how to parse and print elements of type 'PetType'. Starting - * from Spring 3.0, Formatters have come as an improvement in comparison to legacy - * PropertyEditors. See the following links for more details: - The Spring ref doc: - * https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#format + * Instructs Spring MVC on how to parse and print elements of type 'PetType'. Starting from Spring 3.0, Formatters have + * come as an improvement in comparison to legacy PropertyEditors. See the following links for more details: - The + * Spring ref doc: http://static.springsource.org/spring/docs/current/spring-framework-reference/html/validation.html#format-Formatter-SPI + * - A nice blog entry from Gordon Dickens: http://gordondickens.com/wordpress/2010/09/30/using-spring-3-0-custom-type-converter/ + *

* * @author Mark Fisher * @author Juergen Hoeller @@ -36,27 +38,28 @@ import java.util.Objects; @Component public class PetTypeFormatter implements Formatter { - private final PetTypeRepository types; + private final PetRepository pets; - public PetTypeFormatter(PetTypeRepository types) { - this.types = types; - } - @Override - public String print(PetType petType, Locale locale) { - String name = petType.getName(); - return (name != null) ? name : ""; - } + @Autowired + public PetTypeFormatter(PetRepository pets) { + this.pets = pets; + } - @Override - public PetType parse(String text, Locale locale) throws ParseException { - Collection findPetTypes = this.types.findPetTypes(); - for (PetType type : findPetTypes) { - if (Objects.equals(type.getName(), text)) { - return type; - } - } - throw new ParseException("type not found: " + text, 0); - } + @Override + public String print(PetType petType, Locale locale) { + return petType.getName(); + } + + @Override + public PetType parse(String text, Locale locale) throws ParseException { + Collection findPetTypes = this.pets.findPetTypes(); + for (PetType type : findPetTypes) { + if (type.getName().equals(text)) { + return type; + } + } + throw new ParseException("type not found: " + text, 0); + } } diff --git a/src/main/java/org/springframework/samples/petclinic/owner/PetTypeRepository.java b/src/main/java/org/springframework/samples/petclinic/owner/PetTypeRepository.java deleted file mode 100644 index 0b0d7bbd0..000000000 --- a/src/main/java/org/springframework/samples/petclinic/owner/PetTypeRepository.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.samples.petclinic.owner; - -import java.util.List; - -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; - -/** - * Repository class for PetType domain objects. - * - * @author Patrick Baumgartner - */ - -public interface PetTypeRepository extends JpaRepository { - - /** - * Retrieve all {@link PetType}s from the data store. - * @return a Collection of {@link PetType}s. - */ - @Query("SELECT ptype FROM PetType ptype ORDER BY ptype.name") - List findPetTypes(); - -} diff --git a/src/main/java/org/springframework/samples/petclinic/owner/PetValidator.java b/src/main/java/org/springframework/samples/petclinic/owner/PetValidator.java index dfe5304d5..1a3d92e9e 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/PetValidator.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/PetValidator.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,8 +22,7 @@ import org.springframework.validation.Validator; /** * Validator for Pet forms. *

- * We're not using Bean Validation annotations here because it is easier to define such - * validation rule in Java. + * We're not using Bean Validation annotations here because it is easier to define such validation rule in Java. *

* * @author Ken Krebs @@ -31,34 +30,35 @@ import org.springframework.validation.Validator; */ public class PetValidator implements Validator { - private static final String REQUIRED = "required"; + private static final String REQUIRED = "required"; - @Override - public void validate(Object obj, Errors errors) { - Pet pet = (Pet) obj; - String name = pet.getName(); - // name validation - if (!StringUtils.hasText(name)) { - errors.rejectValue("name", REQUIRED, REQUIRED); - } + @Override + public void validate(Object obj, Errors errors) { + Pet pet = (Pet) obj; + String name = pet.getName(); + // name validation + if (!StringUtils.hasLength(name)) { + errors.rejectValue("name", REQUIRED, REQUIRED); + } - // type validation - if (pet.isNew() && pet.getType() == null) { - errors.rejectValue("type", REQUIRED, REQUIRED); - } + // type validation + if (pet.isNew() && pet.getType() == null) { + errors.rejectValue("type", REQUIRED, REQUIRED); + } - // birth date validation - if (pet.getBirthDate() == null) { - errors.rejectValue("birthDate", REQUIRED, REQUIRED); - } - } + // birth date validation + if (pet.getBirthDate() == null) { + errors.rejectValue("birthDate", REQUIRED, REQUIRED); + } + } + + /** + * This Validator validates *just* Pet instances + */ + @Override + public boolean supports(Class clazz) { + return Pet.class.isAssignableFrom(clazz); + } - /** - * This Validator validates *just* Pet instances - */ - @Override - public boolean supports(Class clazz) { - return Pet.class.isAssignableFrom(clazz); - } } diff --git a/src/main/java/org/springframework/samples/petclinic/owner/Visit.java b/src/main/java/org/springframework/samples/petclinic/owner/Visit.java deleted file mode 100644 index 085cd2849..000000000 --- a/src/main/java/org/springframework/samples/petclinic/owner/Visit.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.samples.petclinic.owner; - -import java.time.LocalDate; - -import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.samples.petclinic.model.BaseEntity; - -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.Table; -import jakarta.validation.constraints.NotBlank; - -/** - * Simple JavaBean domain object representing a visit. - * - * @author Ken Krebs - * @author Dave Syer - */ -@Entity -@Table(name = "visits") -public class Visit extends BaseEntity { - - @Column(name = "visit_date") - @DateTimeFormat(pattern = "yyyy-MM-dd") - private LocalDate date; - - @NotBlank - private String description; - - /** - * Creates a new instance of Visit for the current date - */ - public Visit() { - this.date = LocalDate.now(); - } - - public LocalDate getDate() { - return this.date; - } - - public void setDate(LocalDate date) { - this.date = date; - } - - public String getDescription() { - return this.description; - } - - public void setDescription(String description) { - this.description = description; - } - -} diff --git a/src/main/java/org/springframework/samples/petclinic/owner/VisitController.java b/src/main/java/org/springframework/samples/petclinic/owner/VisitController.java index cc3e3ce1a..d7afed12e 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/VisitController.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/VisitController.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,20 +15,16 @@ */ package org.springframework.samples.petclinic.owner; -import java.util.Map; -import java.util.Optional; - +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.samples.petclinic.visit.Visit; +import org.springframework.samples.petclinic.visit.VisitRepository; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.bind.WebDataBinder; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.InitBinder; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.*; -import jakarta.validation.Valid; -import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import javax.validation.Valid; +import java.util.Map; /** * @author Juergen Hoeller @@ -36,69 +32,59 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes; * @author Arjen Poutsma * @author Michael Isvy * @author Dave Syer - * @author Wick Dynex */ @Controller class VisitController { - private final OwnerRepository owners; + private final VisitRepository visits; + private final PetRepository pets; - public VisitController(OwnerRepository owners) { - this.owners = owners; - } - @InitBinder - public void setAllowedFields(WebDataBinder dataBinder) { - dataBinder.setDisallowedFields("id"); - } + @Autowired + public VisitController(VisitRepository visits, PetRepository pets) { + this.visits = visits; + this.pets = pets; + } - /** - * Called before each and every @RequestMapping annotated method. 2 goals: - Make sure - * we always have fresh data - Since we do not use the session scope, make sure that - * Pet object always has an id (Even though id is not part of the form fields) - * @param petId - * @return Pet - */ - @ModelAttribute("visit") - public Visit loadPetWithVisit(@PathVariable("ownerId") int ownerId, @PathVariable("petId") int petId, - Map model) { - Optional optionalOwner = owners.findById(ownerId); - Owner owner = optionalOwner.orElseThrow(() -> new IllegalArgumentException( - "Owner not found with id: " + ownerId + ". Please ensure the ID is correct ")); + @InitBinder + public void setAllowedFields(WebDataBinder dataBinder) { + dataBinder.setDisallowedFields("id"); + } - Pet pet = owner.getPet(petId); - if (pet == null) { - throw new IllegalArgumentException( - "Pet with id " + petId + " not found for owner with id " + ownerId + "."); - } - model.put("pet", pet); - model.put("owner", owner); + /** + * Called before each and every @RequestMapping annotated method. + * 2 goals: + * - Make sure we always have fresh data + * - Since we do not use the session scope, make sure that Pet object always has an id + * (Even though id is not part of the form fields) + * + * @param petId + * @return Pet + */ + @ModelAttribute("visit") + public Visit loadPetWithVisit(@PathVariable("petId") int petId, Map model) { + Pet pet = this.pets.findById(petId); + model.put("pet", pet); + Visit visit = new Visit(); + pet.addVisit(visit); + return visit; + } - Visit visit = new Visit(); - pet.addVisit(visit); - return visit; - } + // Spring MVC calls method loadPetWithVisit(...) before initNewVisitForm is called + @GetMapping("/owners/*/pets/{petId}/visits/new") + public String initNewVisitForm(@PathVariable("petId") int petId, Map model) { + return "pets/createOrUpdateVisitForm"; + } - // Spring MVC calls method loadPetWithVisit(...) before initNewVisitForm is - // called - @GetMapping("/owners/{ownerId}/pets/{petId}/visits/new") - public String initNewVisitForm() { - return "pets/createOrUpdateVisitForm"; - } - - // Spring MVC calls method loadPetWithVisit(...) before processNewVisitForm is - // called - @PostMapping("/owners/{ownerId}/pets/{petId}/visits/new") - public String processNewVisitForm(@ModelAttribute Owner owner, @PathVariable int petId, @Valid Visit visit, - BindingResult result, RedirectAttributes redirectAttributes) { - if (result.hasErrors()) { - return "pets/createOrUpdateVisitForm"; - } - - owner.addVisit(petId, visit); - this.owners.save(owner); - redirectAttributes.addFlashAttribute("message", "Your visit has been booked"); - return "redirect:/owners/{ownerId}"; - } + // Spring MVC calls method loadPetWithVisit(...) before processNewVisitForm is called + @PostMapping("/owners/{ownerId}/pets/{petId}/visits/new") + public String processNewVisitForm(@Valid Visit visit, BindingResult result) { + if (result.hasErrors()) { + return "pets/createOrUpdateVisitForm"; + } else { + this.visits.save(visit); + return "redirect:/owners/{ownerId}"; + } + } } diff --git a/src/main/java/org/springframework/samples/petclinic/owner/package-info.java b/src/main/java/org/springframework/samples/petclinic/owner/package-info.java deleted file mode 100644 index 9e2a3a4ec..000000000 --- a/src/main/java/org/springframework/samples/petclinic/owner/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.samples.petclinic.owner; diff --git a/src/main/java/org/springframework/samples/petclinic/package-info.java b/src/main/java/org/springframework/samples/petclinic/package-info.java deleted file mode 100644 index 8c54417d9..000000000 --- a/src/main/java/org/springframework/samples/petclinic/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.samples.petclinic; diff --git a/src/main/java/org/springframework/samples/petclinic/system/CacheConfig.java b/src/main/java/org/springframework/samples/petclinic/system/CacheConfig.java new file mode 100755 index 000000000..13e194c35 --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/system/CacheConfig.java @@ -0,0 +1,32 @@ +package org.springframework.samples.petclinic.system; + +import javax.cache.configuration.Configuration; +import javax.cache.configuration.MutableConfiguration; + +import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Profile; + +/** + * Cache could be disabled in unit test. + */ +@org.springframework.context.annotation.Configuration +@EnableCaching +@Profile("production") +class CacheConfig { + + @Bean + public JCacheManagerCustomizer cacheManagerCustomizer() { + return cm -> { + Configuration cacheConfiguration = createCacheConfiguration(); + cm.createCache("vets", cacheConfiguration); + }; + } + + private Configuration createCacheConfiguration() { + // Create a cache using infinite heap. A real application will want to use an + // implementation dependent configuration that will better fit your needs + return new MutableConfiguration<>().setStatisticsEnabled(true); + } +} diff --git a/src/main/java/org/springframework/samples/petclinic/system/CacheConfiguration.java b/src/main/java/org/springframework/samples/petclinic/system/CacheConfiguration.java deleted file mode 100644 index 13cb74301..000000000 --- a/src/main/java/org/springframework/samples/petclinic/system/CacheConfiguration.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.samples.petclinic.system; - -import org.springframework.boot.cache.autoconfigure.JCacheManagerCustomizer; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import javax.cache.configuration.MutableConfiguration; - -/** - * Cache configuration intended for caches providing the JCache API. This configuration - * creates the used cache for the application and enables statistics that become - * accessible via JMX. - */ -@Configuration(proxyBeanMethods = false) -@EnableCaching -class CacheConfiguration { - - @Bean - public JCacheManagerCustomizer petclinicCacheConfigurationCustomizer() { - return cm -> cm.createCache("vets", cacheConfiguration()); - } - - /** - * Create a simple configuration that enable statistics via the JCache programmatic - * configuration API. - *

- * Within the configuration object that is provided by the JCache API standard, there - * is only a very limited set of configuration options. The really relevant - * configuration options (like the size limit) must be set via a configuration - * mechanism that is provided by the selected JCache implementation. - */ - private javax.cache.configuration.Configuration cacheConfiguration() { - return new MutableConfiguration<>().setStatisticsEnabled(true); - } - -} diff --git a/src/main/java/org/springframework/samples/petclinic/system/CrashController.java b/src/main/java/org/springframework/samples/petclinic/system/CrashController.java index 0081a560b..c18c04dd8 100644 --- a/src/main/java/org/springframework/samples/petclinic/system/CrashController.java +++ b/src/main/java/org/springframework/samples/petclinic/system/CrashController.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,8 @@ package org.springframework.samples.petclinic.system; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; /** * Controller used to showcase what happens when an exception is thrown @@ -28,10 +30,10 @@ import org.springframework.web.bind.annotation.GetMapping; @Controller class CrashController { - @GetMapping("/oups") - public String triggerException() { - throw new RuntimeException( - "Expected: controller used to showcase what " + "happens when an exception is thrown"); - } + @GetMapping("/oups") + public String triggerException() { + throw new RuntimeException( + "Expected: controller used to showcase what " + "happens when an exception is thrown"); + } } diff --git a/src/main/java/org/springframework/samples/petclinic/system/WebConfiguration.java b/src/main/java/org/springframework/samples/petclinic/system/WebConfiguration.java deleted file mode 100644 index 1ef32e4dc..000000000 --- a/src/main/java/org/springframework/samples/petclinic/system/WebConfiguration.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.springframework.samples.petclinic.system; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.LocaleResolver; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; -import org.springframework.web.servlet.i18n.SessionLocaleResolver; - -import java.util.Locale; - -/** - * Configures internationalization (i18n) support for the application. - * - *

- * Handles loading language-specific messages, tracking the user's language, and allowing - * language changes via the URL parameter (e.g., ?lang=de). - *

- * - * @author Anuj Ashok Potdar - */ -@Configuration -@SuppressWarnings("unused") -public class WebConfiguration implements WebMvcConfigurer { - - /** - * Uses session storage to remember the user’s language setting across requests. - * Defaults to English if nothing is specified. - * @return session-based {@link LocaleResolver} - */ - @Bean - public LocaleResolver localeResolver() { - SessionLocaleResolver resolver = new SessionLocaleResolver(); - resolver.setDefaultLocale(Locale.ENGLISH); - return resolver; - } - - /** - * Allows the app to switch languages using a URL parameter like - * ?lang=es. - * @return a {@link LocaleChangeInterceptor} that handles the change - */ - @Bean - public LocaleChangeInterceptor localeChangeInterceptor() { - LocaleChangeInterceptor interceptor = new LocaleChangeInterceptor(); - interceptor.setParamName("lang"); - return interceptor; - } - - /** - * Registers the locale change interceptor so it can run on each request. - * @param registry where interceptors are added - */ - @Override - public void addInterceptors(InterceptorRegistry registry) { - registry.addInterceptor(localeChangeInterceptor()); - } - -} diff --git a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java index d77a35ea8..00430a790 100644 --- a/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java +++ b/src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java @@ -1,30 +1,14 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.samples.petclinic.system; + import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @Controller class WelcomeController { - @GetMapping("/") - public String welcome() { - return "welcome"; - } - + @GetMapping("/") + public String welcome() { + return "welcome"; + } } diff --git a/src/main/java/org/springframework/samples/petclinic/system/package-info.java b/src/main/java/org/springframework/samples/petclinic/system/package-info.java deleted file mode 100644 index 7d1468177..000000000 --- a/src/main/java/org/springframework/samples/petclinic/system/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.samples.petclinic.system; diff --git a/src/main/java/org/springframework/samples/petclinic/vet/Specialty.java b/src/main/java/org/springframework/samples/petclinic/vet/Specialty.java index 184bf5e6b..5691c2434 100644 --- a/src/main/java/org/springframework/samples/petclinic/vet/Specialty.java +++ b/src/main/java/org/springframework/samples/petclinic/vet/Specialty.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,10 +15,12 @@ */ package org.springframework.samples.petclinic.vet; -import org.springframework.samples.petclinic.model.NamedEntity; +import java.io.Serializable; -import jakarta.persistence.Entity; -import jakarta.persistence.Table; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.springframework.samples.petclinic.model.NamedEntity; /** * Models a {@link Vet Vet's} specialty (for example, dentistry). @@ -27,6 +29,6 @@ import jakarta.persistence.Table; */ @Entity @Table(name = "specialties") -public class Specialty extends NamedEntity { +public class Specialty extends NamedEntity implements Serializable { } diff --git a/src/main/java/org/springframework/samples/petclinic/vet/Vet.java b/src/main/java/org/springframework/samples/petclinic/vet/Vet.java index fb2bd71ee..43aecc41e 100644 --- a/src/main/java/org/springframework/samples/petclinic/vet/Vet.java +++ b/src/main/java/org/springframework/samples/petclinic/vet/Vet.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,23 +15,24 @@ */ package org.springframework.samples.petclinic.vet; -import java.util.Comparator; +import java.util.ArrayList; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; -import java.util.stream.Collectors; -import org.springframework.samples.petclinic.model.NamedEntity; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; +import javax.persistence.ManyToMany; +import javax.persistence.Table; +import javax.xml.bind.annotation.XmlElement; + +import org.springframework.beans.support.MutableSortDefinition; +import org.springframework.beans.support.PropertyComparator; import org.springframework.samples.petclinic.model.Person; -import jakarta.persistence.Entity; -import jakarta.persistence.FetchType; -import jakarta.persistence.JoinColumn; -import jakarta.persistence.JoinTable; -import jakarta.persistence.ManyToMany; -import jakarta.persistence.Table; -import jakarta.xml.bind.annotation.XmlElement; - /** * Simple JavaBean domain object representing a veterinarian. * @@ -44,31 +45,35 @@ import jakarta.xml.bind.annotation.XmlElement; @Table(name = "vets") public class Vet extends Person { - @ManyToMany(fetch = FetchType.EAGER) - @JoinTable(name = "vet_specialties", joinColumns = @JoinColumn(name = "vet_id"), - inverseJoinColumns = @JoinColumn(name = "specialty_id")) - private Set specialties; + @ManyToMany(fetch = FetchType.EAGER) + @JoinTable(name = "vet_specialties", joinColumns = @JoinColumn(name = "vet_id"), inverseJoinColumns = @JoinColumn(name = "specialty_id")) + private Set specialties; - protected Set getSpecialtiesInternal() { - if (this.specialties == null) { - this.specialties = new HashSet<>(); - } - return this.specialties; - } + protected Set getSpecialtiesInternal() { + if (this.specialties == null) { + this.specialties = new HashSet<>(); + } + return this.specialties; + } - @XmlElement - public List getSpecialties() { - return getSpecialtiesInternal().stream() - .sorted(Comparator.comparing(NamedEntity::getName)) - .collect(Collectors.toList()); - } + protected void setSpecialtiesInternal(Set specialties) { + this.specialties = specialties; + } - public int getNrOfSpecialties() { - return getSpecialtiesInternal().size(); - } + @XmlElement + public List getSpecialties() { + List sortedSpecs = new ArrayList<>(getSpecialtiesInternal()); + PropertyComparator.sort(sortedSpecs, + new MutableSortDefinition("name", true, true)); + return Collections.unmodifiableList(sortedSpecs); + } - public void addSpecialty(Specialty specialty) { - getSpecialtiesInternal().add(specialty); - } + public int getNrOfSpecialties() { + return getSpecialtiesInternal().size(); + } + + public void addSpecialty(Specialty specialty) { + getSpecialtiesInternal().add(specialty); + } } diff --git a/src/main/java/org/springframework/samples/petclinic/vet/VetController.java b/src/main/java/org/springframework/samples/petclinic/vet/VetController.java index 89ad9bc41..7ce8374ec 100644 --- a/src/main/java/org/springframework/samples/petclinic/vet/VetController.java +++ b/src/main/java/org/springframework/samples/petclinic/vet/VetController.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,17 +15,13 @@ */ package org.springframework.samples.petclinic.vet; -import java.util.List; - -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import java.util.Map; + /** * @author Juergen Hoeller * @author Mark Fisher @@ -35,44 +31,30 @@ import org.springframework.web.bind.annotation.ResponseBody; @Controller class VetController { - private final VetRepository vetRepository; + private final VetRepository vets; - public VetController(VetRepository vetRepository) { - this.vetRepository = vetRepository; - } + @Autowired + public VetController(VetRepository clinicService) { + this.vets = clinicService; + } - @GetMapping("/vets.html") - public String showVetList(@RequestParam(defaultValue = "1") int page, Model model) { - // Here we are returning an object of type 'Vets' rather than a collection of Vet - // objects so it is simpler for Object-Xml mapping - Vets vets = new Vets(); - Page paginated = findPaginated(page); - vets.getVetList().addAll(paginated.toList()); - return addPaginationModel(page, paginated, model); - } + @GetMapping("/vets.html") + public String showVetList(Map model) { + // Here we are returning an object of type 'Vets' rather than a collection of Vet + // objects so it is simpler for Object-Xml mapping + Vets vets = new Vets(); + vets.getVetList().addAll(this.vets.findAll()); + model.put("vets", vets); + return "vets/vetList"; + } - private String addPaginationModel(int page, Page paginated, Model model) { - List listVets = paginated.getContent(); - model.addAttribute("currentPage", page); - model.addAttribute("totalPages", paginated.getTotalPages()); - model.addAttribute("totalItems", paginated.getTotalElements()); - model.addAttribute("listVets", listVets); - return "vets/vetList"; - } - - private Page findPaginated(int page) { - int pageSize = 5; - Pageable pageable = PageRequest.of(page - 1, pageSize); - return vetRepository.findAll(pageable); - } - - @GetMapping({ "/vets" }) - public @ResponseBody Vets showResourcesVetList() { - // Here we are returning an object of type 'Vets' rather than a collection of Vet - // objects so it is simpler for JSon/Object mapping - Vets vets = new Vets(); - vets.getVetList().addAll(this.vetRepository.findAll()); - return vets; - } + @GetMapping({ "/vets.json", "/vets.xml" }) + public @ResponseBody Vets showResourcesVetList() { + // Here we are returning an object of type 'Vets' rather than a collection of Vet + // objects so it is simpler for JSon/Object mapping + Vets vets = new Vets(); + vets.getVetList().addAll(this.vets.findAll()); + return vets; + } } diff --git a/src/main/java/org/springframework/samples/petclinic/vet/VetRepository.java b/src/main/java/org/springframework/samples/petclinic/vet/VetRepository.java index dbf68d029..20863ce76 100644 --- a/src/main/java/org/springframework/samples/petclinic/vet/VetRepository.java +++ b/src/main/java/org/springframework/samples/petclinic/vet/VetRepository.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,20 +15,16 @@ */ package org.springframework.samples.petclinic.vet; +import java.util.Collection; + import org.springframework.cache.annotation.Cacheable; import org.springframework.dao.DataAccessException; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.data.repository.Repository; import org.springframework.transaction.annotation.Transactional; -import java.util.Collection; - /** - * Repository class for Vet domain objects All method names are compliant - * with Spring Data naming conventions so this interface can easily be extended for Spring - * Data. See: - * https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.query-methods.query-creation + * Repository class for Vet domain objects All method names are compliant with Spring Data naming + * conventions so this interface can easily be extended for Spring Data See here: http://static.springsource.org/spring-data/jpa/docs/current/reference/html/jpa.repositories.html#jpa.query-methods.query-creation * * @author Ken Krebs * @author Juergen Hoeller @@ -37,22 +33,14 @@ import java.util.Collection; */ public interface VetRepository extends Repository { - /** - * Retrieve all Vets from the data store. - * @return a Collection of Vets - */ - @Transactional(readOnly = true) - @Cacheable("vets") - Collection findAll() throws DataAccessException; + /** + * Retrieve all Vets from the data store. + * + * @return a Collection of Vets + */ + @Transactional(readOnly = true) + @Cacheable("vets") + Collection findAll() throws DataAccessException; - /** - * Retrieve all Vets from data store in Pages - * @param pageable - * @return - * @throws DataAccessException - */ - @Transactional(readOnly = true) - @Cacheable("vets") - Page findAll(Pageable pageable) throws DataAccessException; } diff --git a/src/main/java/org/springframework/samples/petclinic/vet/Vets.java b/src/main/java/org/springframework/samples/petclinic/vet/Vets.java index 634cad773..f5b24c3fc 100644 --- a/src/main/java/org/springframework/samples/petclinic/vet/Vets.java +++ b/src/main/java/org/springframework/samples/petclinic/vet/Vets.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,26 +18,26 @@ package org.springframework.samples.petclinic.vet; import java.util.ArrayList; import java.util.List; -import jakarta.xml.bind.annotation.XmlElement; -import jakarta.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; /** - * Simple domain object representing a list of veterinarians. Mostly here to be used for - * the 'vets' {@link org.springframework.web.servlet.view.xml.MarshallingView}. + * Simple domain object representing a list of veterinarians. Mostly here to be used for the 'vets' {@link + * org.springframework.web.servlet.view.xml.MarshallingView}. * * @author Arjen Poutsma */ @XmlRootElement public class Vets { - private List vets; + private List vets; - @XmlElement - public List getVetList() { - if (vets == null) { - vets = new ArrayList<>(); - } - return vets; - } + @XmlElement + public List getVetList() { + if (vets == null) { + vets = new ArrayList<>(); + } + return vets; + } } diff --git a/src/main/java/org/springframework/samples/petclinic/vet/package-info.java b/src/main/java/org/springframework/samples/petclinic/vet/package-info.java deleted file mode 100644 index 544db4c7c..000000000 --- a/src/main/java/org/springframework/samples/petclinic/vet/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.samples.petclinic.vet; diff --git a/src/main/java/org/springframework/samples/petclinic/visit/Visit.java b/src/main/java/org/springframework/samples/petclinic/visit/Visit.java new file mode 100755 index 000000000..f83d1463c --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/visit/Visit.java @@ -0,0 +1,91 @@ +/* + * Copyright 2002-2013 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.visit; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.hibernate.validator.constraints.NotEmpty; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.samples.petclinic.model.BaseEntity; + +/** + * Simple JavaBean domain object representing a visit. + * + * @author Ken Krebs + * @author Dave Syer + */ +@Entity +@Table(name = "visits") +public class Visit extends BaseEntity { + + @Column(name = "visit_date") + @Temporal(TemporalType.TIMESTAMP) + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date date; + + @NotEmpty + @Column(name = "description") + private String description; + + + @Column(name = "pet_id") + private Integer petId; + + + /** + * Creates a new instance of Visit for the current date + */ + public Visit() { + this.date = new Date(); + } + + + public Date getDate() { + return this.date; + } + + + public void setDate(Date date) { + this.date = date; + } + + + public String getDescription() { + return this.description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public Integer getPetId() { + return this.petId; + } + + + public void setPetId(Integer petId) { + this.petId = petId; + } + +} diff --git a/src/main/java/org/springframework/samples/petclinic/visit/VisitRepository.java b/src/main/java/org/springframework/samples/petclinic/visit/VisitRepository.java new file mode 100644 index 000000000..c7853d170 --- /dev/null +++ b/src/main/java/org/springframework/samples/petclinic/visit/VisitRepository.java @@ -0,0 +1,45 @@ +/* + * Copyright 2002-2013 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.samples.petclinic.visit; + +import java.util.List; + +import org.springframework.dao.DataAccessException; +import org.springframework.data.repository.Repository; +import org.springframework.samples.petclinic.model.BaseEntity; + +/** + * Repository class for Visit domain objects All method names are compliant with Spring Data naming + * conventions so this interface can easily be extended for Spring Data See here: http://static.springsource.org/spring-data/jpa/docs/current/reference/html/jpa.repositories.html#jpa.query-methods.query-creation + * + * @author Ken Krebs + * @author Juergen Hoeller + * @author Sam Brannen + * @author Michael Isvy + */ +public interface VisitRepository extends Repository { + + /** + * Save a Visit to the data store, either inserting or updating it. + * + * @param visit the Visit to save + * @see BaseEntity#isNew + */ + void save(Visit visit) throws DataAccessException; + + List findByPetId(Integer petId); + +} diff --git a/src/main/scss/header.scss b/src/main/less/header.less similarity index 100% rename from src/main/scss/header.scss rename to src/main/less/header.less diff --git a/src/main/less/petclinic.less b/src/main/less/petclinic.less new file mode 100644 index 000000000..32d15a5f2 --- /dev/null +++ b/src/main/less/petclinic.less @@ -0,0 +1,239 @@ +/* + * Copyright 2016 the original author or authors. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@icon-font-path: "../../webjars/bootstrap/fonts/"; + +@spring-green: #6db33f; +@spring-dark-green: #5fa134; +@spring-brown: #34302D; +@spring-grey: #838789; +@spring-light-grey: #f1f1f1; + +@body-bg: @spring-light-grey; +@text-color: @spring-brown; +@link-color: @spring-dark-green; +@link-hover-color: @spring-dark-green; + +@navbar-default-link-color: @spring-light-grey; +@navbar-default-link-active-color: @spring-light-grey; +@navbar-default-link-hover-color: @spring-light-grey; +@navbar-default-link-hover-bg: @spring-green; +@navbar-default-toggle-icon-bar-bg: @spring-light-grey; +@navbar-default-toggle-hover-bg: transparent; +@navbar-default-link-active-bg: @spring-green; + +@border-radius-base: 0; +@border-radius-large: 0; +@border-radius-small: 0; + +@btn-default-color: @spring-light-grey; +@btn-default-bg: @spring-brown; +@btn-default-border: @spring-green; + +@nav-tabs-active-link-hover-color: @spring-light-grey; +@nav-tabs-active-link-hover-bg: @spring-brown; +@nav-tabs-active-link-hover-border-color: @spring-brown; +@nav-tabs-border-color: @spring-brown; + +@pagination-active-bg: @spring-brown; +@pagination-active-border: @spring-green; +@table-border-color: @spring-brown; + +.table > thead > tr > th { + background-color: lighten(@spring-brown, 3%); + color: @spring-light-grey; +} + +.table-filter { + background-color: @spring-brown; + padding: 9px 12px; +} + +.nav > li > a { + color: @spring-grey; +} + +.btn-default { + border-width: 2px; + transition: border 0.15s; + -webkit-transition: border 0.15s; + -moz-transition: border 0.15s; + -o-transition: border 0.15s; + -ms-transition: border 0.15s; + + &:hover, + &:focus, + &:active, + &.active, + .open .dropdown-toggle& { + background-color: @spring-brown; + border-color: @spring-brown; + } +} + + +.container .text-muted { + margin: 20px 0; +} + +code { + font-size: 80%; +} + +.xd-container { + margin-top: 40px; + margin-bottom: 100px; + padding-left: 5px; + padding-right: 5px; +} + +h1 { + margin-bottom: 15px +} + +.index-page--subtitle { + font-size: 16px; + line-height: 24px; + margin: 0 0 30px; +} + +.form-horizontal button.btn-inverse { + margin-left: 32px; +} + +#job-params-modal .modal-dialog { + width: 90%; + margin-left:auto; + margin-right:auto; +} + +[ng-cloak].splash { + display: block !important; +} +[ng-cloak] { + display: none; +} + +.splash { + background: @spring-green; + color: @spring-brown; + display: none; +} + +.error-page { + margin-top: 100px; + text-align: center; +} + +.error-page .error-title { + font-size: 24px; + line-height: 24px; + margin: 30px 0 0; +} + +table td { + vertical-align: middle; +} + +table td .progress { + margin-bottom: 0; +} + +table td.action-column { + width: 1px; +} + +.help-block { + color: lighten(@text-color, 50%); // lighten the text some for contrast +} + +.xd-containers { + font-size: 15px; +} + +.cluster-view > table td { + vertical-align: top; +} + +.cluster-view .label, .cluster-view .column-block { + display: block; +} + +.cluster-view .input-group-addon { + width: 0%; +} + +.cluster-view { + margin-bottom: 0; +} + +.deployment-status-deployed { + .label-success; +} + +.deployment-status-incomplete { + .label-warning; +} + +.deployment-status-failed { + .label-danger; +} + +.deployment-status-deploying { + .label-info +} +.deployment-status-na { +} + +.container-details-table th { + background-color: lighten(@spring-brown, 3%); + color: @spring-light-grey; +} + +.status-help-content-table td { + color: @spring-brown; +} + +.alert-success { + .alert-variant(fade(@alert-success-bg, 70%); @alert-success-border; @alert-success-text); +} +.alert-info { + .alert-variant(fade(@alert-info-bg, 70%); @alert-info-border; @alert-info-text); +} +.alert-warning { + .alert-variant(fade(@alert-warning-bg, 70%); @alert-warning-border; @alert-warning-text); +} +.alert-danger { + .alert-variant(fade(@alert-danger-bg, 70%); @alert-danger-border; @alert-danger-text); +} + +.myspinner { + animation-name: spinner; + animation-duration: 2s; + animation-iteration-count: infinite; + animation-timing-function: linear; + + -webkit-transform-origin: 49% 50%; + -webkit-animation-name: spinner; + -webkit-animation-duration: 2s; + -webkit-animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; +} + +hr { + border-top: 1px dotted @spring-brown; +} + +@import "typography.less"; +@import "header.less"; +@import "responsive.less"; diff --git a/src/main/scss/responsive.scss b/src/main/less/responsive.less similarity index 98% rename from src/main/scss/responsive.scss rename to src/main/less/responsive.less index 96a720cbd..8f3b21545 100644 --- a/src/main/scss/responsive.scss +++ b/src/main/less/responsive.less @@ -3,7 +3,7 @@ position:absolute; z-index: 9999; left:0px; - top:0px; + top:0px; } .navbar a.navbar-brand { diff --git a/src/main/scss/typography.scss b/src/main/less/typography.less similarity index 100% rename from src/main/scss/typography.scss rename to src/main/less/typography.less diff --git a/src/main/resources/application-mysql.properties b/src/main/resources/application-mysql.properties index e23dfa605..fd561fa90 100644 --- a/src/main/resources/application-mysql.properties +++ b/src/main/resources/application-mysql.properties @@ -1,7 +1,7 @@ # database init, supports mysql too database=mysql -spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/petclinic} -spring.datasource.username=${MYSQL_USER:petclinic} -spring.datasource.password=${MYSQL_PASS:petclinic} -# SQL is written to be idempotent so this is safe -spring.sql.init.mode=always +spring.datasource.url=jdbc:mysql://localhost/test +spring.datasource.username=root +spring.datasource.password=root + # Uncomment this the first time the app runs +# spring.datasource.initialize=true \ No newline at end of file diff --git a/src/main/resources/application-postgres.properties b/src/main/resources/application-postgres.properties deleted file mode 100644 index b265d7e5b..000000000 --- a/src/main/resources/application-postgres.properties +++ /dev/null @@ -1,7 +0,0 @@ -# database init, supports postgres too -database=postgres -spring.datasource.url=${POSTGRES_URL:jdbc:postgresql://localhost/petclinic} -spring.datasource.username=${POSTGRES_USER:petclinic} -spring.datasource.password=${POSTGRES_PASS:petclinic} -# SQL is written to be idempotent so this is safe -spring.sql.init.mode=always diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 630c1145a..fb07c6c50 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,26 +1,26 @@ # database init, supports mysql too -database=h2 -spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql -spring.sql.init.data-locations=classpath*:db/${database}/data.sql +database=hsqldb +spring.datasource.schema=classpath*:db/${database}/schema.sql +spring.datasource.data=classpath*:db/${database}/data.sql # Web spring.thymeleaf.mode=HTML # JPA spring.jpa.hibernate.ddl-auto=none -spring.jpa.open-in-view=false -spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategySnakeCaseImpl # Internationalization spring.messages.basename=messages/messages -# Actuator -management.endpoints.web.exposure.include=* +# Actuator / Management +management.contextPath=/manage +# Spring Boot 1.5 makes actuator secure by default +management.security.enabled=false # Logging logging.level.org.springframework=INFO # logging.level.org.springframework.web=DEBUG # logging.level.org.springframework.context.annotation=TRACE -# Maximum time static resources should be cached -spring.web.resources.cache.cachecontrol.max-age=12h +# Active Spring profiles +spring.profiles.active=production diff --git a/src/main/resources/db/h2/data.sql b/src/main/resources/db/h2/data.sql deleted file mode 100644 index f232b1361..000000000 --- a/src/main/resources/db/h2/data.sql +++ /dev/null @@ -1,53 +0,0 @@ -INSERT INTO vets VALUES (default, 'James', 'Carter'); -INSERT INTO vets VALUES (default, 'Helen', 'Leary'); -INSERT INTO vets VALUES (default, 'Linda', 'Douglas'); -INSERT INTO vets VALUES (default, 'Rafael', 'Ortega'); -INSERT INTO vets VALUES (default, 'Henry', 'Stevens'); -INSERT INTO vets VALUES (default, 'Sharon', 'Jenkins'); - -INSERT INTO specialties VALUES (default, 'radiology'); -INSERT INTO specialties VALUES (default, 'surgery'); -INSERT INTO specialties VALUES (default, 'dentistry'); - -INSERT INTO vet_specialties VALUES (2, 1); -INSERT INTO vet_specialties VALUES (3, 2); -INSERT INTO vet_specialties VALUES (3, 3); -INSERT INTO vet_specialties VALUES (4, 2); -INSERT INTO vet_specialties VALUES (5, 1); - -INSERT INTO types VALUES (default, 'cat'); -INSERT INTO types VALUES (default, 'dog'); -INSERT INTO types VALUES (default, 'lizard'); -INSERT INTO types VALUES (default, 'snake'); -INSERT INTO types VALUES (default, 'bird'); -INSERT INTO types VALUES (default, 'hamster'); - -INSERT INTO owners VALUES (default, 'George', 'Franklin', '110 W. Liberty St.', 'Madison', '6085551023'); -INSERT INTO owners VALUES (default, 'Betty', 'Davis', '638 Cardinal Ave.', 'Sun Prairie', '6085551749'); -INSERT INTO owners VALUES (default, 'Eduardo', 'Rodriquez', '2693 Commerce St.', 'McFarland', '6085558763'); -INSERT INTO owners VALUES (default, 'Harold', 'Davis', '563 Friendly St.', 'Windsor', '6085553198'); -INSERT INTO owners VALUES (default, 'Peter', 'McTavish', '2387 S. Fair Way', 'Madison', '6085552765'); -INSERT INTO owners VALUES (default, 'Jean', 'Coleman', '105 N. Lake St.', 'Monona', '6085552654'); -INSERT INTO owners VALUES (default, 'Jeff', 'Black', '1450 Oak Blvd.', 'Monona', '6085555387'); -INSERT INTO owners VALUES (default, 'Maria', 'Escobito', '345 Maple St.', 'Madison', '6085557683'); -INSERT INTO owners VALUES (default, 'David', 'Schroeder', '2749 Blackhawk Trail', 'Madison', '6085559435'); -INSERT INTO owners VALUES (default, 'Carlos', 'Estaban', '2335 Independence La.', 'Waunakee', '6085555487'); - -INSERT INTO pets VALUES (default, 'Leo', '2010-09-07', 1, 1); -INSERT INTO pets VALUES (default, 'Basil', '2012-08-06', 6, 2); -INSERT INTO pets VALUES (default, 'Rosy', '2011-04-17', 2, 3); -INSERT INTO pets VALUES (default, 'Jewel', '2010-03-07', 2, 3); -INSERT INTO pets VALUES (default, 'Iggy', '2010-11-30', 3, 4); -INSERT INTO pets VALUES (default, 'George', '2010-01-20', 4, 5); -INSERT INTO pets VALUES (default, 'Samantha', '2012-09-04', 1, 6); -INSERT INTO pets VALUES (default, 'Max', '2012-09-04', 1, 6); -INSERT INTO pets VALUES (default, 'Lucky', '2011-08-06', 5, 7); -INSERT INTO pets VALUES (default, 'Mulligan', '2007-02-24', 2, 8); -INSERT INTO pets VALUES (default, 'Freddy', '2010-03-09', 5, 9); -INSERT INTO pets VALUES (default, 'Lucky', '2010-06-24', 2, 10); -INSERT INTO pets VALUES (default, 'Sly', '2012-06-08', 1, 10); - -INSERT INTO visits VALUES (default, 7, '2013-01-01', 'rabies shot'); -INSERT INTO visits VALUES (default, 8, '2013-01-02', 'rabies shot'); -INSERT INTO visits VALUES (default, 8, '2013-01-03', 'neutered'); -INSERT INTO visits VALUES (default, 7, '2013-01-04', 'spayed'); diff --git a/src/main/resources/db/h2/schema.sql b/src/main/resources/db/h2/schema.sql deleted file mode 100644 index 4a6c322cb..000000000 --- a/src/main/resources/db/h2/schema.sql +++ /dev/null @@ -1,64 +0,0 @@ -DROP TABLE vet_specialties IF EXISTS; -DROP TABLE vets IF EXISTS; -DROP TABLE specialties IF EXISTS; -DROP TABLE visits IF EXISTS; -DROP TABLE pets IF EXISTS; -DROP TABLE types IF EXISTS; -DROP TABLE owners IF EXISTS; - - -CREATE TABLE vets ( - id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - first_name VARCHAR(30), - last_name VARCHAR(30) -); -CREATE INDEX vets_last_name ON vets (last_name); - -CREATE TABLE specialties ( - id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - name VARCHAR(80) -); -CREATE INDEX specialties_name ON specialties (name); - -CREATE TABLE vet_specialties ( - vet_id INTEGER NOT NULL, - specialty_id INTEGER NOT NULL -); -ALTER TABLE vet_specialties ADD CONSTRAINT fk_vet_specialties_vets FOREIGN KEY (vet_id) REFERENCES vets (id); -ALTER TABLE vet_specialties ADD CONSTRAINT fk_vet_specialties_specialties FOREIGN KEY (specialty_id) REFERENCES specialties (id); - -CREATE TABLE types ( - id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - name VARCHAR(80) -); -CREATE INDEX types_name ON types (name); - -CREATE TABLE owners ( - id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - first_name VARCHAR(30), - last_name VARCHAR_IGNORECASE(30), - address VARCHAR(255), - city VARCHAR(80), - telephone VARCHAR(20) -); -CREATE INDEX owners_last_name ON owners (last_name); - -CREATE TABLE pets ( - id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - name VARCHAR(30), - birth_date DATE, - type_id INTEGER NOT NULL, - owner_id INTEGER -); -ALTER TABLE pets ADD CONSTRAINT fk_pets_owners FOREIGN KEY (owner_id) REFERENCES owners (id); -ALTER TABLE pets ADD CONSTRAINT fk_pets_types FOREIGN KEY (type_id) REFERENCES types (id); -CREATE INDEX pets_name ON pets (name); - -CREATE TABLE visits ( - id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - pet_id INTEGER, - visit_date DATE, - description VARCHAR(255) -); -ALTER TABLE visits ADD CONSTRAINT fk_visits_pets FOREIGN KEY (pet_id) REFERENCES pets (id); -CREATE INDEX visits_pet_id ON visits (pet_id); diff --git a/src/main/resources/db/hsqldb/schema.sql b/src/main/resources/db/hsqldb/schema.sql index 5d6760a4b..f3c6947b7 100644 --- a/src/main/resources/db/hsqldb/schema.sql +++ b/src/main/resources/db/hsqldb/schema.sql @@ -48,7 +48,7 @@ CREATE TABLE pets ( name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, - owner_id INTEGER + owner_id INTEGER NOT NULL ); ALTER TABLE pets ADD CONSTRAINT fk_pets_owners FOREIGN KEY (owner_id) REFERENCES owners (id); ALTER TABLE pets ADD CONSTRAINT fk_pets_types FOREIGN KEY (type_id) REFERENCES types (id); @@ -56,7 +56,7 @@ CREATE INDEX pets_name ON pets (name); CREATE TABLE visits ( id INTEGER IDENTITY PRIMARY KEY, - pet_id INTEGER, + pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) ); diff --git a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt b/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt index 8b39c07a4..6733a9337 100644 --- a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt +++ b/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt @@ -9,28 +9,9 @@ -------------------------------------------------------------------------------- 1) Download and install the MySQL database (e.g., MySQL Community Server 5.1.x), - which can be found here: https://dev.mysql.com/downloads/. Or run the + which can be found here: http://dev.mysql.com/downloads/. Or run the "docker-compose.yml" from the root of the project (if you have docker installed - locally): + locally). - $ docker-compose up - ... - mysql_1_eedb4818d817 | MySQL init process done. Ready for start up. - ... - -2) (Once only) create the PetClinic database and user by executing the "db/mysql/user.sql" - scripts. You can connect to the database running in the docker container using - `mysql -u root -h localhost --protocol tcp`, but you don't need to run the script there - because the petclinic user is already set up if you use the provided `docker-compose.yml`. - -3) Run the app with `spring.profiles.active=mysql` (e.g. as a System property via the command - line, but any way that sets that property in a Spring Boot app should work). For example use - - mvn spring-boot:run -Dspring-boot.run.profiles=mysql - - To activate the profile on the command line. - -N.B. the "petclinic" database has to exist for the app to work with the JDBC URL value -as it is configured by default. This condition is taken care of automatically by the -docker-compose configuration provided, or by the `user.sql` script if you run that as -root. +2) Create the PetClinic database and user by executing the "db/mysql/{schema,data}.sql" + scripts (or set "spring.datasource.initialize=true" the first time you run the app). diff --git a/src/main/resources/db/mysql/schema.sql b/src/main/resources/db/mysql/schema.sql index 2591a516d..6a9825983 100644 --- a/src/main/resources/db/mysql/schema.sql +++ b/src/main/resources/db/mysql/schema.sql @@ -1,3 +1,13 @@ +CREATE DATABASE IF NOT EXISTS petclinic; + +ALTER DATABASE petclinic + DEFAULT CHARACTER SET utf8 + DEFAULT COLLATE utf8_general_ci; + +GRANT ALL PRIVILEGES ON petclinic.* TO pc@localhost IDENTIFIED BY 'pc'; + +USE petclinic; + CREATE TABLE IF NOT EXISTS vets ( id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(30), @@ -40,7 +50,7 @@ CREATE TABLE IF NOT EXISTS pets ( name VARCHAR(30), birth_date DATE, type_id INT(4) UNSIGNED NOT NULL, - owner_id INT(4) UNSIGNED, + owner_id INT(4) UNSIGNED NOT NULL, INDEX(name), FOREIGN KEY (owner_id) REFERENCES owners(id), FOREIGN KEY (type_id) REFERENCES types(id) @@ -48,7 +58,7 @@ CREATE TABLE IF NOT EXISTS pets ( CREATE TABLE IF NOT EXISTS visits ( id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - pet_id INT(4) UNSIGNED, + pet_id INT(4) UNSIGNED NOT NULL, visit_date DATE, description VARCHAR(255), FOREIGN KEY (pet_id) REFERENCES pets(id) diff --git a/src/main/resources/db/mysql/user.sql b/src/main/resources/db/mysql/user.sql deleted file mode 100644 index 4cdf825e3..000000000 --- a/src/main/resources/db/mysql/user.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE DATABASE IF NOT EXISTS petclinic; - -ALTER DATABASE petclinic - DEFAULT CHARACTER SET utf8 - DEFAULT COLLATE utf8_general_ci; - -CREATE USER IF NOT EXISTS 'petclinic'@'%' IDENTIFIED BY 'petclinic'; - -GRANT ALL PRIVILEGES ON petclinic.* TO 'petclinic'@'%'; - -FLUSH PRIVILEGES; diff --git a/src/main/resources/db/postgres/data.sql b/src/main/resources/db/postgres/data.sql deleted file mode 100644 index 5b53366ac..000000000 --- a/src/main/resources/db/postgres/data.sql +++ /dev/null @@ -1,53 +0,0 @@ -INSERT INTO vets (first_name, last_name) SELECT 'James', 'Carter' WHERE NOT EXISTS (SELECT * FROM vets WHERE id=1); -INSERT INTO vets (first_name, last_name) SELECT 'Helen', 'Leary' WHERE NOT EXISTS (SELECT * FROM vets WHERE id=2); -INSERT INTO vets (first_name, last_name) SELECT 'Linda', 'Douglas' WHERE NOT EXISTS (SELECT * FROM vets WHERE id=3); -INSERT INTO vets (first_name, last_name) SELECT 'Rafael', 'Ortega' WHERE NOT EXISTS (SELECT * FROM vets WHERE id=4); -INSERT INTO vets (first_name, last_name) SELECT 'Henry', 'Stevens' WHERE NOT EXISTS (SELECT * FROM vets WHERE id=5); -INSERT INTO vets (first_name, last_name) SELECT 'Sharon', 'Jenkins' WHERE NOT EXISTS (SELECT * FROM vets WHERE id=6); - -INSERT INTO specialties (name) SELECT 'radiology' WHERE NOT EXISTS (SELECT * FROM specialties WHERE name='radiology'); -INSERT INTO specialties (name) SELECT 'surgery' WHERE NOT EXISTS (SELECT * FROM specialties WHERE name='surgery'); -INSERT INTO specialties (name) SELECT 'dentistry' WHERE NOT EXISTS (SELECT * FROM specialties WHERE name='dentistry'); - -INSERT INTO vet_specialties VALUES (2, 1) ON CONFLICT (vet_id, specialty_id) DO NOTHING; -INSERT INTO vet_specialties VALUES (3, 2) ON CONFLICT (vet_id, specialty_id) DO NOTHING; -INSERT INTO vet_specialties VALUES (3, 3) ON CONFLICT (vet_id, specialty_id) DO NOTHING; -INSERT INTO vet_specialties VALUES (4, 2) ON CONFLICT (vet_id, specialty_id) DO NOTHING; -INSERT INTO vet_specialties VALUES (5, 1) ON CONFLICT (vet_id, specialty_id) DO NOTHING; - -INSERT INTO types (name) SELECT 'cat' WHERE NOT EXISTS (SELECT * FROM types WHERE name='cat'); -INSERT INTO types (name) SELECT 'dog' WHERE NOT EXISTS (SELECT * FROM types WHERE name='dog'); -INSERT INTO types (name) SELECT 'lizard' WHERE NOT EXISTS (SELECT * FROM types WHERE name='lizard'); -INSERT INTO types (name) SELECT 'snake' WHERE NOT EXISTS (SELECT * FROM types WHERE name='snake'); -INSERT INTO types (name) SELECT 'bird' WHERE NOT EXISTS (SELECT * FROM types WHERE name='bird'); -INSERT INTO types (name) SELECT 'hamster' WHERE NOT EXISTS (SELECT * FROM types WHERE name='hamster'); - -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'George', 'Franklin', '110 W. Liberty St.', 'Madison', '6085551023' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=1); -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'Betty', 'Davis', '638 Cardinal Ave.', 'Sun Prairie', '6085551749' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=2); -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'Eduardo', 'Rodriquez', '2693 Commerce St.', 'McFarland', '6085558763' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=3); -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'Harold', 'Davis', '563 Friendly St.', 'Windsor', '6085553198' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=4); -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'Peter', 'McTavish', '2387 S. Fair Way', 'Madison', '6085552765' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=5); -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'Jean', 'Coleman', '105 N. Lake St.', 'Monona', '6085552654' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=6); -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'Jeff', 'Black', '1450 Oak Blvd.', 'Monona', '6085555387' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=7); -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'Maria', 'Escobito', '345 Maple St.', 'Madison', '6085557683' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=8); -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'David', 'Schroeder', '2749 Blackhawk Trail', 'Madison', '6085559435' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=9); -INSERT INTO owners (first_name, last_name, address, city, telephone) SELECT 'Carlos', 'Estaban', '2335 Independence La.', 'Waunakee', '6085555487' WHERE NOT EXISTS (SELECT * FROM owners WHERE id=10); - -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Leo', '2000-09-07', 1, 1 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=1); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Basil', '2002-08-06', 6, 2 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=2); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Rosy', '2001-04-17', 2, 3 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=3); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Jewel', '2000-03-07', 2, 3 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=4); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Iggy', '2000-11-30', 3, 4 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=5); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'George', '2000-01-20', 4, 5 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=6); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Samantha', '1995-09-04', 1, 6 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=7); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Max', '1995-09-04', 1, 6 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=8); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Lucky', '1999-08-06', 5, 7 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=9); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Mulligan', '1997-02-24', 2, 8 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=10); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Freddy', '2000-03-09', 5, 9 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=11); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Lucky', '2000-06-24', 2, 10 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=12); -INSERT INTO pets (name, birth_date, type_id, owner_id) SELECT 'Sly', '2002-06-08', 1, 10 WHERE NOT EXISTS (SELECT * FROM pets WHERE id=13); - -INSERT INTO visits (pet_id, visit_date, description) SELECT 7, '2010-03-04', 'rabies shot' WHERE NOT EXISTS (SELECT * FROM visits WHERE id=1); -INSERT INTO visits (pet_id, visit_date, description) SELECT 8, '2011-03-04', 'rabies shot' WHERE NOT EXISTS (SELECT * FROM visits WHERE id=2); -INSERT INTO visits (pet_id, visit_date, description) SELECT 8, '2009-06-04', 'neutered' WHERE NOT EXISTS (SELECT * FROM visits WHERE id=3); -INSERT INTO visits (pet_id, visit_date, description) SELECT 7, '2008-09-04', 'spayed' WHERE NOT EXISTS (SELECT * FROM visits WHERE id=4); diff --git a/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt b/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt deleted file mode 100644 index a998749f0..000000000 --- a/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt +++ /dev/null @@ -1,19 +0,0 @@ -=============================================================================== -=== Spring PetClinic sample application - PostgreSQL Configuration === -=============================================================================== - --------------------------------------------------------------------------------- - -1) Run the "docker-compose.yml" from the root of the project: - - $ docker-compose up - ... - spring-petclinic-postgres-1 | The files belonging to this database system will be owned by user "postgres". - ... - -2) Run the app with `spring.profiles.active=postgres` (e.g. as a System property via the command - line, but any way that sets that property in a Spring Boot app should work). For example use - - mvn spring-boot:run -Dspring-boot.run.profiles=postgres - - To activate the profile on the command line. diff --git a/src/main/resources/db/postgres/schema.sql b/src/main/resources/db/postgres/schema.sql deleted file mode 100644 index 1bd582dc2..000000000 --- a/src/main/resources/db/postgres/schema.sql +++ /dev/null @@ -1,52 +0,0 @@ -CREATE TABLE IF NOT EXISTS vets ( - id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - first_name TEXT, - last_name TEXT -); -CREATE INDEX ON vets (last_name); - -CREATE TABLE IF NOT EXISTS specialties ( - id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - name TEXT -); -CREATE INDEX ON specialties (name); - -CREATE TABLE IF NOT EXISTS vet_specialties ( - vet_id INT NOT NULL REFERENCES vets (id), - specialty_id INT NOT NULL REFERENCES specialties (id), - UNIQUE (vet_id, specialty_id) -); - -CREATE TABLE IF NOT EXISTS types ( - id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - name TEXT -); -CREATE INDEX ON types (name); - -CREATE TABLE IF NOT EXISTS owners ( - id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - first_name TEXT, - last_name TEXT, - address TEXT, - city TEXT, - telephone TEXT -); -CREATE INDEX ON owners (last_name); - -CREATE TABLE IF NOT EXISTS pets ( - id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - name TEXT, - birth_date DATE, - type_id INT NOT NULL REFERENCES types (id), - owner_id INT REFERENCES owners (id) -); -CREATE INDEX ON pets (name); -CREATE INDEX ON pets (owner_id); - -CREATE TABLE IF NOT EXISTS visits ( - id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, - pet_id INT REFERENCES pets (id), - visit_date DATE, - description TEXT -); -CREATE INDEX ON visits (pet_id); diff --git a/src/main/resources/messages/messages.properties b/src/main/resources/messages/messages.properties index 193565895..173417a10 100644 --- a/src/main/resources/messages/messages.properties +++ b/src/main/resources/messages/messages.properties @@ -6,46 +6,3 @@ nonNumeric=must be all numeric duplicateFormSubmission=Duplicate form submission is not allowed typeMismatch.date=invalid date typeMismatch.birthDate=invalid date -owner=Owner -firstName=First Name -lastName=Last Name -address=Address -city=City -telephone=Telephone -owners=Owners -addOwner=Add Owner -findOwner=Find Owner -findOwners=Find Owners -updateOwner=Update Owner -vets=Veterinarians -name=Name -specialties=Specialties -none=none -pages=pages -first=First -next=Next -previous=Previous -last=Last -somethingHappened=Something happened... -pets=Pets -home=Home -error=Error -telephone.invalid=Telephone must be a 10-digit number -layoutTitle=PetClinic :: a Spring Framework demonstration -pet=Pet -birthDate=Birth Date -type=Type -previousVisits=Previous Visits -date=Date -description=Description -new=New -addVisit=Add Visit -editPet=Edit Pet -ownerInformation=Owner Information -visitDate=Visit Date -editOwner=Edit Owner -addNewPet=Add New Pet -petsAndVisits=Pets and Visits -error.404=The requested page was not found. -error.500=An internal server error occurred. -error.general=An unexpected error occurred. diff --git a/src/main/resources/messages/messages_de.properties b/src/main/resources/messages/messages_de.properties index 89a08eaad..124bee48b 100644 --- a/src/main/resources/messages/messages_de.properties +++ b/src/main/resources/messages/messages_de.properties @@ -4,48 +4,5 @@ notFound=wurde nicht gefunden duplicate=ist bereits vergeben nonNumeric=darf nur numerisch sein duplicateFormSubmission=Wiederholtes Absenden des Formulars ist nicht erlaubt -typeMismatch.date=ung�ltiges Datum -typeMismatch.birthDate=ung�ltiges Datum -owner=Besitzer -firstName=Vorname -lastName=Nachname -address=Adresse -city=Stadt -telephone=Telefon -owners=Besitzer -addOwner=Besitzer hinzufügen -findOwner=Besitzer finden -findOwners=Besitzer suchen -updateOwner=Besitzer aktualisieren -vets=Tierärzte -name=Name -specialties=Fachgebiete -none=keine -pages=Seiten -first=Erste -next=Nächste -previous=Vorherige -last=Letzte -somethingHappened=Etwas ist passiert... -pets=Haustiere -home=Startseite -error=Fehler -telephone.invalid=Telefonnummer muss aus 10 Ziffern bestehen -layoutTitle=PetClinic :: eine Demonstration des Spring Frameworks -pet=Haustier -birthDate=Geburtsdatum -type=Typ -previousVisits=Frühere Besuche -date=Datum -description=Beschreibung -new=Neu -addVisit=Besuch hinzufügen -editPet=Haustier bearbeiten -ownerInformation=Besitzerinformationen -visitDate=Besuchsdatum -editOwner=Besitzer bearbeiten -addNewPet=Neues Haustier hinzufügen -petsAndVisits=Haustiere und Besuche -error.404=Die angeforderte Seite wurde nicht gefunden. -error.500=Ein interner Serverfehler ist aufgetreten. -error.general=Ein unerwarteter Fehler ist aufgetreten. +typeMismatch.date=ungltiges Datum +typeMismatch.birthDate=ungltiges Datum diff --git a/src/main/resources/messages/messages_es.properties b/src/main/resources/messages/messages_es.properties deleted file mode 100644 index 911d7337f..000000000 --- a/src/main/resources/messages/messages_es.properties +++ /dev/null @@ -1,51 +0,0 @@ -welcome=Bienvenido -required=Es requerido -notFound=No ha sido encontrado -duplicate=Ya se encuentra en uso -nonNumeric=Sólo debe contener numeros -duplicateFormSubmission=No se permite el envío de formularios duplicados -typeMismatch.date=Fecha invalida -typeMismatch.birthDate=Fecha invalida -owner=Propietario -firstName=Nombre -lastName=Apellido -address=Dirección -city=Ciudad -telephone=Teléfono -owners=Propietarios -addOwner=Añadir propietario -findOwner=Buscar propietario -findOwners=Buscar propietarios -updateOwner=Actualizar propietario -vets=Veterinarios -name=Nombre -specialties=Especialidades -none=ninguno -pages=páginas -first=Primero -next=Siguiente -previous=Anterior -last=Último -somethingHappened=Algo pasó... -pets=Mascotas -home=Inicio -error=Error -telephone.invalid=El número de teléfono debe tener 10 dígitos -layoutTitle=PetClinic :: una demostración de Spring Framework -pet=Mascota -birthDate=Fecha de nacimiento -type=Tipo -previousVisits=Visitas anteriores -date=Fecha -description=Descripción -new=Nuevo -addVisit=Agregar visita -editPet=Editar mascota -ownerInformation=Información del propietario -visitDate=Fecha de visita -editOwner=Editar propietario -addNewPet=Agregar nueva mascota -petsAndVisits=Mascotas y visitas -error.404=La página solicitada no fue encontrada. -error.500=Ocurrió un error interno del servidor. -error.general=Ocurrió un error inesperado. diff --git a/src/main/resources/messages/messages_fa.properties b/src/main/resources/messages/messages_fa.properties deleted file mode 100644 index 6d0994a92..000000000 --- a/src/main/resources/messages/messages_fa.properties +++ /dev/null @@ -1,51 +0,0 @@ -welcome=خوش آمدید -required=الزامی -notFound=یافت نشد -duplicate=قبلا استفاده شده -nonNumeric=باید عددی باشد -duplicateFormSubmission=ارسال تکراری فرم مجاز نیست -typeMismatch.date=تاریخ نامعتبر -typeMismatch.birthDate=تاریخ تولد نامعتبر -owner=مالک -firstName=نام -lastName=نام خانوادگی -address=آدرس -city=شهر -telephone=تلفن -owners=مالکان -addOwner=افزودن مالک -findOwner=یافتن مالک -findOwners=یافتن مالکان -updateOwner=ویرایش مالک -vets=دامپزشکان -name=نام -specialties=تخصص‌ها -none=هیچ‌کدام -pages=صفحات -first=اول -next=بعدی -previous=قبلی -last=آخر -somethingHappened=مشکلی پیش آمد... -pets=حیوانات خانگی -home=خانه -error=خطا -telephone.invalid=شماره تلفن باید ۱۰ رقمی باشد -layoutTitle=PetClinic :: یک نمایش از Spring Framework -pet=حیوان خانگی -birthDate=تاریخ تولد -type=نوع -previousVisits=ویزیت‌های قبلی -date=تاریخ -description=توضیحات -new=جدید -addVisit=افزودن ویزیت -editPet=ویرایش حیوان خانگی -ownerInformation=اطلاعات مالک -visitDate=تاریخ ویزیت -editOwner=ویرایش مالک -addNewPet=افزودن حیوان خانگی جدید -petsAndVisits=حیوانات و ویزیت‌ها -error.404=صفحه درخواستی پیدا نشد. -error.500=خطای داخلی سرور رخ داد. -error.general=خطای غیرمنتظره‌ای رخ داد. diff --git a/src/main/resources/messages/messages_ko.properties b/src/main/resources/messages/messages_ko.properties deleted file mode 100644 index 6e2f4880a..000000000 --- a/src/main/resources/messages/messages_ko.properties +++ /dev/null @@ -1,51 +0,0 @@ -welcome=환영합니다 -required=입력이 필요합니다 -notFound=찾을 수 없습니다 -duplicate=이미 존재합니다 -nonNumeric=모두 숫자로 입력해야 합니다 -duplicateFormSubmission=중복 제출은 허용되지 않습니다 -typeMismatch.date=잘못된 날짜입니다 -typeMismatch.birthDate=잘못된 날짜입니다 -owner=소유자 -firstName=이름 -lastName=성 -address=주소 -city=도시 -telephone=전화번호 -owners=소유자 목록 -addOwner=소유자 추가 -findOwner=소유자 찾기 -findOwners=소유자들 찾기 -updateOwner=소유자 수정 -vets=수의사 -name=이름 -specialties=전문 분야 -none=없음 -pages=페이지 -first=첫 번째 -next=다음 -previous=이전 -last=마지막 -somethingHappened=문제가 발생했습니다... -pets=반려동물 -home=홈 -error=오류 -telephone.invalid=전화번호는 10자리 숫자여야 합니다 -layoutTitle=PetClinic :: Spring Framework 데모 -pet=반려동물 -birthDate=생년월일 -type=종류 -previousVisits=이전 방문 -date=날짜 -description=설명 -new=새로운 -addVisit=방문 추가 -editPet=반려동물 수정 -ownerInformation=소유자 정보 -visitDate=방문 날짜 -editOwner=소유자 수정 -addNewPet=새 반려동물 추가 -petsAndVisits=반려동물 및 방문 -error.404=요청하신 페이지를 찾을 수 없습니다. -error.500=서버 내부 오류가 발생했습니다. -error.general=알 수 없는 오류가 발생했습니다. diff --git a/src/main/resources/messages/messages_pt.properties b/src/main/resources/messages/messages_pt.properties deleted file mode 100644 index 7eea4b9d1..000000000 --- a/src/main/resources/messages/messages_pt.properties +++ /dev/null @@ -1,51 +0,0 @@ -welcome=Bem-vindo -required=E necessario -notFound=Nao foi encontrado -duplicate=Ja esta em uso -nonNumeric=Deve ser tudo numerico -duplicateFormSubmission=O envio duplicado de formulario nao e permitido -typeMismatch.date=Data invalida -typeMismatch.birthDate=Data de nascimento invalida -owner=Proprietário -firstName=Primeiro Nome -lastName=Sobrenome -address=Endereço -city=Cidade -telephone=Telefone -owners=Proprietários -addOwner=Adicionar proprietário -findOwner=Encontrar proprietário -findOwners=Encontrar proprietários -updateOwner=Atualizar proprietário -vets=Veterinários -name=Nome -specialties=Especialidades -none=nenhum -pages=páginas -first=Primeiro -next=Próximo -previous=Anterior -last=Último -somethingHappened=Algo aconteceu... -pets=Animais de estimação -home=Início -error=Erro -telephone.invalid=O número de telefone deve conter 10 dígitos -layoutTitle=PetClinic :: uma demonstração do Spring Framework -pet=Animal de estimação -birthDate=Data de nascimento -type=Tipo -previousVisits=Visitas anteriores -date=Data -description=Descrição -new=Novo -addVisit=Adicionar visita -editPet=Editar animal -ownerInformation=Informações do proprietário -visitDate=Data da visita -editOwner=Editar proprietário -addNewPet=Adicionar novo animal -petsAndVisits=Animais e visitas -error.404=A página solicitada não foi encontrada. -error.500=Ocorreu um erro interno no servidor. -error.general=Ocorreu um erro inesperado. diff --git a/src/main/resources/messages/messages_ru.properties b/src/main/resources/messages/messages_ru.properties deleted file mode 100644 index f06d2cb6c..000000000 --- a/src/main/resources/messages/messages_ru.properties +++ /dev/null @@ -1,51 +0,0 @@ -welcome=Добро пожаловать -required=необходимо -notFound=не найдено -duplicate=уже используется -nonNumeric=должно быть все числовое значение -duplicateFormSubmission=Дублирование формы не допускается -typeMismatch.date=неправильная даные -typeMismatch.birthDate=неправильная дата -owner=Владелец -firstName=Имя -lastName=Фамилия -address=Адрес -city=Город -telephone=Телефон -owners=Владельцы -addOwner=Добавить владельца -findOwner=Найти владельца -findOwners=Найти владельцев -updateOwner=Обновить владельца -vets=Ветеринары -name=Имя -specialties=Специальности -none=нет -pages=страницы -first=Первый -next=Следующий -previous=Предыдущий -last=Последний -somethingHappened=Что-то пошло не так... -pets=Питомцы -home=Главная -error=Ошибка -telephone.invalid=Телефон должен содержать 10 цифр -layoutTitle=PetClinic :: демонстрация Spring Framework -pet=Питомец -birthDate=Дата рождения -type=Тип -previousVisits=Предыдущие визиты -date=Дата -description=Описание -new=Новый -addVisit=Добавить визит -editPet=Редактировать питомца -ownerInformation=Информация о владельце -visitDate=Дата визита -editOwner=Редактировать владельца -addNewPet=Добавить нового питомца -petsAndVisits=Питомцы и визиты -error.404=Запрашиваемая страница не найдена. -error.500=Произошла внутренняя ошибка сервера. -error.general=Произошла непредвиденная ошибка. diff --git a/src/main/resources/messages/messages_tr.properties b/src/main/resources/messages/messages_tr.properties deleted file mode 100644 index 2c806f9e6..000000000 --- a/src/main/resources/messages/messages_tr.properties +++ /dev/null @@ -1,51 +0,0 @@ -welcome=hoş geldiniz -required=gerekli -notFound=bulunamadı -duplicate=zaten kullanılıyor -nonNumeric=sadece sayısal olmalıdır -duplicateFormSubmission=Formun tekrar gönderilmesine izin verilmez -typeMismatch.date=geçersiz tarih -typeMismatch.birthDate=geçersiz tarih -owner=Sahip -firstName=Ad -lastName=Soyad -address=Adres -city=Şehir -telephone=Telefon -owners=Sahipler -addOwner=Sahip Ekle -findOwner=Sahip Bul -findOwners=Sahipleri Bul -updateOwner=Sahip Güncelle -vets=Veterinerler -name=İsim -specialties=Uzmanlıklar -none=yok -pages=sayfalar -first=İlk -next=Sonraki -previous=Önceki -last=Son -somethingHappened=Bir şey oldu... -pets=Evcil Hayvanlar -home=Ana Sayfa -error=Hata -telephone.invalid=Telefon numarası 10 basamaklı olmalıdır -layoutTitle=PetClinic :: bir Spring Framework demosu -pet=Evcil Hayvan -birthDate=Doğum Tarihi -type=Tür -previousVisits=Önceki Ziyaretler -date=Tarih -description=Açıklama -new=Yeni -addVisit=Ziyaret Ekle -editPet=Evcil Hayvanı Düzenle -ownerInformation=Sahip Bilgileri -visitDate=Ziyaret Tarihi -editOwner=Sahibi Düzenle -addNewPet=Yeni Evcil Hayvan Ekle -petsAndVisits=Evcil Hayvanlar ve Ziyaretler -error.404=İstenen sayfa bulunamadı. -error.500=Sunucuda dahili bir hata oluştu. -error.general=Beklenmeyen bir hata oluştu. diff --git a/src/main/resources/static/resources/css/petclinic.css b/src/main/resources/static/resources/css/petclinic.css deleted file mode 100644 index 4b701b13b..000000000 --- a/src/main/resources/static/resources/css/petclinic.css +++ /dev/null @@ -1,9532 +0,0 @@ -/* - * Copyright 2016 the original author or authors. - * - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/*! - * Bootstrap v5.3.8 (https://getbootstrap.com/) - * Copyright 2011-2025 The Bootstrap Authors - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */ -:root, -[data-bs-theme="light"] { - --bs-blue: #0d6efd; - --bs-indigo: #6610f2; - --bs-purple: #6f42c1; - --bs-pink: #d63384; - --bs-red: #dc3545; - --bs-orange: #fd7e14; - --bs-yellow: #ffc107; - --bs-green: #198754; - --bs-teal: #20c997; - --bs-cyan: #0dcaf0; - --bs-black: #000; - --bs-white: #fff; - --bs-gray: #6c757d; - --bs-gray-dark: #343a40; - --bs-gray-100: #f8f9fa; - --bs-gray-200: #e9ecef; - --bs-gray-300: #dee2e6; - --bs-gray-400: #ced4da; - --bs-gray-500: #adb5bd; - --bs-gray-600: #6c757d; - --bs-gray-700: #495057; - --bs-gray-800: #343a40; - --bs-gray-900: #212529; - --bs-primary: #0d6efd; - --bs-secondary: #6c757d; - --bs-success: #198754; - --bs-info: #0dcaf0; - --bs-warning: #ffc107; - --bs-danger: #dc3545; - --bs-light: #f8f9fa; - --bs-dark: #212529; - --bs-primary-rgb: 13, 110, 253; - --bs-secondary-rgb: 108, 117, 125; - --bs-success-rgb: 25, 135, 84; - --bs-info-rgb: 13, 202, 240; - --bs-warning-rgb: 255, 193, 7; - --bs-danger-rgb: 220, 53, 69; - --bs-light-rgb: 248, 249, 250; - --bs-dark-rgb: 33, 37, 41; - --bs-primary-text-emphasis: #052c65; - --bs-secondary-text-emphasis: #2b2f32; - --bs-success-text-emphasis: #0a3622; - --bs-info-text-emphasis: #055160; - --bs-warning-text-emphasis: #664d03; - --bs-danger-text-emphasis: #58151c; - --bs-light-text-emphasis: #495057; - --bs-dark-text-emphasis: #495057; - --bs-primary-bg-subtle: #cfe2ff; - --bs-secondary-bg-subtle: #e2e3e5; - --bs-success-bg-subtle: #d1e7dd; - --bs-info-bg-subtle: #cff4fc; - --bs-warning-bg-subtle: #fff3cd; - --bs-danger-bg-subtle: #f8d7da; - --bs-light-bg-subtle: #fcfcfd; - --bs-dark-bg-subtle: #ced4da; - --bs-primary-border-subtle: #9ec5fe; - --bs-secondary-border-subtle: #c4c8cb; - --bs-success-border-subtle: #a3cfbb; - --bs-info-border-subtle: #9eeaf9; - --bs-warning-border-subtle: #ffe69c; - --bs-danger-border-subtle: #f1aeb5; - --bs-light-border-subtle: #e9ecef; - --bs-dark-border-subtle: #adb5bd; - --bs-white-rgb: 255, 255, 255; - --bs-black-rgb: 0, 0, 0; - --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); - --bs-body-font-family: var(--bs-font-sans-serif); - --bs-body-font-size: 1rem; - --bs-body-font-weight: 400; - --bs-body-line-height: 1.5; - --bs-body-color: #212529; - --bs-body-color-rgb: 33, 37, 41; - --bs-body-bg: #fff; - --bs-body-bg-rgb: 255, 255, 255; - --bs-emphasis-color: #000; - --bs-emphasis-color-rgb: 0, 0, 0; - --bs-secondary-color: rgba(33, 37, 41, 0.75); - --bs-secondary-color-rgb: 33, 37, 41; - --bs-secondary-bg: #e9ecef; - --bs-secondary-bg-rgb: 233, 236, 239; - --bs-tertiary-color: rgba(33, 37, 41, 0.5); - --bs-tertiary-color-rgb: 33, 37, 41; - --bs-tertiary-bg: #f8f9fa; - --bs-tertiary-bg-rgb: 248, 249, 250; - --bs-heading-color: inherit; - --bs-link-color: #0d6efd; - --bs-link-color-rgb: 13, 110, 253; - --bs-link-decoration: underline; - --bs-link-hover-color: #0a58ca; - --bs-link-hover-color-rgb: 10, 88, 202; - --bs-code-color: #d63384; - --bs-highlight-color: #212529; - --bs-highlight-bg: #fff3cd; - --bs-border-width: 1px; - --bs-border-style: solid; - --bs-border-color: #dee2e6; - --bs-border-color-translucent: rgba(0, 0, 0, 0.175); - --bs-border-radius: 0.375rem; - --bs-border-radius-sm: 0.25rem; - --bs-border-radius-lg: 0.5rem; - --bs-border-radius-xl: 1rem; - --bs-border-radius-xxl: 2rem; - --bs-border-radius-2xl: var(--bs-border-radius-xxl); - --bs-border-radius-pill: 50rem; - --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); - --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); - --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175); - --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075); - --bs-focus-ring-width: 0.25rem; - --bs-focus-ring-opacity: 0.25; - --bs-focus-ring-color: rgba(13, 110, 253, 0.25); - --bs-form-valid-color: #198754; - --bs-form-valid-border-color: #198754; - --bs-form-invalid-color: #dc3545; - --bs-form-invalid-border-color: #dc3545; } - -[data-bs-theme="dark"] { - color-scheme: dark; - --bs-body-color: #dee2e6; - --bs-body-color-rgb: 222, 226, 230; - --bs-body-bg: #212529; - --bs-body-bg-rgb: 33, 37, 41; - --bs-emphasis-color: #fff; - --bs-emphasis-color-rgb: 255, 255, 255; - --bs-secondary-color: rgba(222, 226, 230, 0.75); - --bs-secondary-color-rgb: 222, 226, 230; - --bs-secondary-bg: #343a40; - --bs-secondary-bg-rgb: 52, 58, 64; - --bs-tertiary-color: rgba(222, 226, 230, 0.5); - --bs-tertiary-color-rgb: 222, 226, 230; - --bs-tertiary-bg: #2b3035; - --bs-tertiary-bg-rgb: 43, 48, 53; - --bs-primary-text-emphasis: #6ea8fe; - --bs-secondary-text-emphasis: #a7acb1; - --bs-success-text-emphasis: #75b798; - --bs-info-text-emphasis: #6edff6; - --bs-warning-text-emphasis: #ffda6a; - --bs-danger-text-emphasis: #ea868f; - --bs-light-text-emphasis: #f8f9fa; - --bs-dark-text-emphasis: #dee2e6; - --bs-primary-bg-subtle: #031633; - --bs-secondary-bg-subtle: #161719; - --bs-success-bg-subtle: #051b11; - --bs-info-bg-subtle: #032830; - --bs-warning-bg-subtle: #332701; - --bs-danger-bg-subtle: #2c0b0e; - --bs-light-bg-subtle: #343a40; - --bs-dark-bg-subtle: #1a1d20; - --bs-primary-border-subtle: #084298; - --bs-secondary-border-subtle: #41464b; - --bs-success-border-subtle: #0f5132; - --bs-info-border-subtle: #087990; - --bs-warning-border-subtle: #997404; - --bs-danger-border-subtle: #842029; - --bs-light-border-subtle: #495057; - --bs-dark-border-subtle: #343a40; - --bs-heading-color: inherit; - --bs-link-color: #6ea8fe; - --bs-link-hover-color: #8bb9fe; - --bs-link-color-rgb: 110, 168, 254; - --bs-link-hover-color-rgb: 139, 185, 254; - --bs-code-color: #e685b5; - --bs-highlight-color: #dee2e6; - --bs-highlight-bg: #664d03; - --bs-border-color: #495057; - --bs-border-color-translucent: rgba(255, 255, 255, 0.15); - --bs-form-valid-color: #75b798; - --bs-form-valid-border-color: #75b798; - --bs-form-invalid-color: #ea868f; - --bs-form-invalid-border-color: #ea868f; } - -*, -*::before, -*::after { - box-sizing: border-box; } - -@media (prefers-reduced-motion: no-preference) { - :root { - scroll-behavior: smooth; } } - -body { - margin: 0; - font-family: var(--bs-body-font-family); - font-size: var(--bs-body-font-size); - font-weight: var(--bs-body-font-weight); - line-height: var(--bs-body-line-height); - color: var(--bs-body-color); - text-align: var(--bs-body-text-align); - background-color: var(--bs-body-bg); - -webkit-text-size-adjust: 100%; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } - -hr { - margin: 1rem 0; - color: inherit; - border: 0; - border-top: var(--bs-border-width) solid; - opacity: 0.25; } - -h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 { - margin-top: 0; - margin-bottom: 0.5rem; - font-weight: 500; - line-height: 1.2; - color: var(--bs-heading-color); } - -h1, .h1 { - font-size: calc(1.375rem + 1.5vw); } - @media (min-width: 1200px) { - h1, .h1 { - font-size: 2.5rem; } } -h2, .h2 { - font-size: calc(1.325rem + 0.9vw); } - @media (min-width: 1200px) { - h2, .h2 { - font-size: 2rem; } } -h3, .h3 { - font-size: calc(1.3rem + 0.6vw); } - @media (min-width: 1200px) { - h3, .h3 { - font-size: 1.75rem; } } -h4, .h4 { - font-size: calc(1.275rem + 0.3vw); } - @media (min-width: 1200px) { - h4, .h4 { - font-size: 1.5rem; } } -h5, .h5 { - font-size: 1.25rem; } - -h6, .h6 { - font-size: 1rem; } - -p { - margin-top: 0; - margin-bottom: 1rem; } - -abbr[title] { - text-decoration: underline dotted; - cursor: help; - text-decoration-skip-ink: none; } - -address { - margin-bottom: 1rem; - font-style: normal; - line-height: inherit; } - -ol, -ul { - padding-left: 2rem; } - -ol, -ul, -dl { - margin-top: 0; - margin-bottom: 1rem; } - -ol ol, -ul ul, -ol ul, -ul ol { - margin-bottom: 0; } - -dt { - font-weight: 700; } - -dd { - margin-bottom: .5rem; - margin-left: 0; } - -blockquote { - margin: 0 0 1rem; } - -b, -strong { - font-weight: bolder; } - -small, .small { - font-size: 0.875em; } - -mark, .mark { - padding: 0.1875em; - color: var(--bs-highlight-color); - background-color: var(--bs-highlight-bg); } - -sub, -sup { - position: relative; - font-size: 0.75em; - line-height: 0; - vertical-align: baseline; } - -sub { - bottom: -.25em; } - -sup { - top: -.5em; } - -a { - color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1)); - text-decoration: underline; } - a:hover { - --bs-link-color-rgb: var(--bs-link-hover-color-rgb); } - -a:not([href]):not([class]), a:not([href]):not([class]):hover { - color: inherit; - text-decoration: none; } - -pre, -code, -kbd, -samp { - font-family: var(--bs-font-monospace); - font-size: 1em; } - -pre { - display: block; - margin-top: 0; - margin-bottom: 1rem; - overflow: auto; - font-size: 0.875em; } - pre code { - font-size: inherit; - color: inherit; - word-break: normal; } - -code { - font-size: 0.875em; - color: var(--bs-code-color); - word-wrap: break-word; } - a > code { - color: inherit; } - -kbd { - padding: 0.1875rem 0.375rem; - font-size: 0.875em; - color: var(--bs-body-bg); - background-color: var(--bs-body-color); - border-radius: 0.25rem; } - kbd kbd { - padding: 0; - font-size: 1em; } - -figure { - margin: 0 0 1rem; } - -img, -svg { - vertical-align: middle; } - -table { - caption-side: bottom; - border-collapse: collapse; } - -caption { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - color: var(--bs-secondary-color); - text-align: left; } - -th { - text-align: inherit; - text-align: -webkit-match-parent; } - -thead, -tbody, -tfoot, -tr, -td, -th { - border-color: inherit; - border-style: solid; - border-width: 0; } - -label { - display: inline-block; } - -button { - border-radius: 0; } - -button:focus:not(:focus-visible) { - outline: 0; } - -input, -button, -select, -optgroup, -textarea { - margin: 0; - font-family: inherit; - font-size: inherit; - line-height: inherit; } - -button, -select { - text-transform: none; } - -[role="button"] { - cursor: pointer; } - -select { - word-wrap: normal; } - select:disabled { - opacity: 1; } - -[list]:not([type="date"]):not([type="datetime-local"]):not([type="month"]):not([type="week"]):not([type="time"])::-webkit-calendar-picker-indicator { - display: none !important; } - -button, -[type="button"], -[type="reset"], -[type="submit"] { - -webkit-appearance: button; } - button:not(:disabled), - [type="button"]:not(:disabled), - [type="reset"]:not(:disabled), - [type="submit"]:not(:disabled) { - cursor: pointer; } - -::-moz-focus-inner { - padding: 0; - border-style: none; } - -textarea { - resize: vertical; } - -fieldset { - min-width: 0; - padding: 0; - margin: 0; - border: 0; } - -legend { - float: left; - width: 100%; - padding: 0; - margin-bottom: 0.5rem; - line-height: inherit; - font-size: calc(1.275rem + 0.3vw); } - @media (min-width: 1200px) { - legend { - font-size: 1.5rem; } } - legend + * { - clear: left; } - -::-webkit-datetime-edit-fields-wrapper, -::-webkit-datetime-edit-text, -::-webkit-datetime-edit-minute, -::-webkit-datetime-edit-hour-field, -::-webkit-datetime-edit-day-field, -::-webkit-datetime-edit-month-field, -::-webkit-datetime-edit-year-field { - padding: 0; } - -::-webkit-inner-spin-button { - height: auto; } - -[type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; } - [type="search"]::-webkit-search-cancel-button { - cursor: pointer; - filter: grayscale(1); } - -/* rtl:raw: -[type="tel"], -[type="url"], -[type="email"], -[type="number"] { - direction: ltr; -} -*/ -::-webkit-search-decoration { - -webkit-appearance: none; } - -::-webkit-color-swatch-wrapper { - padding: 0; } - -::file-selector-button { - font: inherit; - -webkit-appearance: button; } - -output { - display: inline-block; } - -iframe { - border: 0; } - -summary { - display: list-item; - cursor: pointer; } - -progress { - vertical-align: baseline; } - -[hidden] { - display: none !important; } - -.lead { - font-size: 1.25rem; - font-weight: 300; } - -.display-1 { - font-weight: 300; - line-height: 1.2; - font-size: calc(1.625rem + 4.5vw); } - @media (min-width: 1200px) { - .display-1 { - font-size: 5rem; } } -.display-2 { - font-weight: 300; - line-height: 1.2; - font-size: calc(1.575rem + 3.9vw); } - @media (min-width: 1200px) { - .display-2 { - font-size: 4.5rem; } } -.display-3 { - font-weight: 300; - line-height: 1.2; - font-size: calc(1.525rem + 3.3vw); } - @media (min-width: 1200px) { - .display-3 { - font-size: 4rem; } } -.display-4 { - font-weight: 300; - line-height: 1.2; - font-size: calc(1.475rem + 2.7vw); } - @media (min-width: 1200px) { - .display-4 { - font-size: 3.5rem; } } -.display-5 { - font-weight: 300; - line-height: 1.2; - font-size: calc(1.425rem + 2.1vw); } - @media (min-width: 1200px) { - .display-5 { - font-size: 3rem; } } -.display-6 { - font-weight: 300; - line-height: 1.2; - font-size: calc(1.375rem + 1.5vw); } - @media (min-width: 1200px) { - .display-6 { - font-size: 2.5rem; } } -.list-unstyled { - padding-left: 0; - list-style: none; } - -.list-inline { - padding-left: 0; - list-style: none; } - -.list-inline-item { - display: inline-block; } - .list-inline-item:not(:last-child) { - margin-right: 0.5rem; } - -.initialism { - font-size: 0.875em; - text-transform: uppercase; } - -.blockquote { - margin-bottom: 1rem; - font-size: 1.25rem; } - .blockquote > :last-child { - margin-bottom: 0; } - -.blockquote-footer { - margin-top: -1rem; - margin-bottom: 1rem; - font-size: 0.875em; - color: #6c757d; } - .blockquote-footer::before { - content: "\2014\00A0"; } - -.img-fluid { - max-width: 100%; - height: auto; } - -.img-thumbnail { - padding: 0.25rem; - background-color: var(--bs-body-bg); - border: var(--bs-border-width) solid var(--bs-border-color); - border-radius: var(--bs-border-radius); - max-width: 100%; - height: auto; } - -.figure { - display: inline-block; } - -.figure-img { - margin-bottom: 0.5rem; - line-height: 1; } - -.figure-caption { - font-size: 0.875em; - color: var(--bs-secondary-color); } - -.container, -.container-fluid, -.container-xxl, -.container-xl, -.container-lg, -.container-md, -.container-sm { - --bs-gutter-x: 1.5rem; - --bs-gutter-y: 0; - width: 100%; - padding-right: calc(var(--bs-gutter-x) * .5); - padding-left: calc(var(--bs-gutter-x) * .5); - margin-right: auto; - margin-left: auto; } - -@media (min-width: 576px) { - .container-sm, .container { - max-width: 540px; } } - -@media (min-width: 768px) { - .container-md, .container-sm, .container { - max-width: 720px; } } - -@media (min-width: 992px) { - .container-lg, .container-md, .container-sm, .container { - max-width: 960px; } } - -@media (min-width: 1200px) { - .container-xl, .container-lg, .container-md, .container-sm, .container { - max-width: 1140px; } } - -@media (min-width: 1400px) { - .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container { - max-width: 1320px; } } - -:root { - --bs-breakpoint-xs: 0; - --bs-breakpoint-sm: 576px; - --bs-breakpoint-md: 768px; - --bs-breakpoint-lg: 992px; - --bs-breakpoint-xl: 1200px; - --bs-breakpoint-xxl: 1400px; } - -.row { - --bs-gutter-x: 1.5rem; - --bs-gutter-y: 0; - display: flex; - flex-wrap: wrap; - margin-top: calc(-1 * var(--bs-gutter-y)); - margin-right: calc(-.5 * var(--bs-gutter-x)); - margin-left: calc(-.5 * var(--bs-gutter-x)); } - .row > * { - flex-shrink: 0; - width: 100%; - max-width: 100%; - padding-right: calc(var(--bs-gutter-x) * .5); - padding-left: calc(var(--bs-gutter-x) * .5); - margin-top: var(--bs-gutter-y); } - -.col { - flex: 1 0 0; } - -.row-cols-auto > * { - flex: 0 0 auto; - width: auto; } - -.row-cols-1 > * { - flex: 0 0 auto; - width: 100%; } - -.row-cols-2 > * { - flex: 0 0 auto; - width: 50%; } - -.row-cols-3 > * { - flex: 0 0 auto; - width: 33.33333%; } - -.row-cols-4 > * { - flex: 0 0 auto; - width: 25%; } - -.row-cols-5 > * { - flex: 0 0 auto; - width: 20%; } - -.row-cols-6 > * { - flex: 0 0 auto; - width: 16.66667%; } - -.col-auto { - flex: 0 0 auto; - width: auto; } - -.col-1 { - flex: 0 0 auto; - width: 8.33333%; } - -.col-2 { - flex: 0 0 auto; - width: 16.66667%; } - -.col-3 { - flex: 0 0 auto; - width: 25%; } - -.col-4 { - flex: 0 0 auto; - width: 33.33333%; } - -.col-5 { - flex: 0 0 auto; - width: 41.66667%; } - -.col-6 { - flex: 0 0 auto; - width: 50%; } - -.col-7 { - flex: 0 0 auto; - width: 58.33333%; } - -.col-8 { - flex: 0 0 auto; - width: 66.66667%; } - -.col-9 { - flex: 0 0 auto; - width: 75%; } - -.col-10 { - flex: 0 0 auto; - width: 83.33333%; } - -.col-11 { - flex: 0 0 auto; - width: 91.66667%; } - -.col-12 { - flex: 0 0 auto; - width: 100%; } - -.offset-1 { - margin-left: 8.33333%; } - -.offset-2 { - margin-left: 16.66667%; } - -.offset-3 { - margin-left: 25%; } - -.offset-4 { - margin-left: 33.33333%; } - -.offset-5 { - margin-left: 41.66667%; } - -.offset-6 { - margin-left: 50%; } - -.offset-7 { - margin-left: 58.33333%; } - -.offset-8 { - margin-left: 66.66667%; } - -.offset-9 { - margin-left: 75%; } - -.offset-10 { - margin-left: 83.33333%; } - -.offset-11 { - margin-left: 91.66667%; } - -.g-0, -.gx-0 { - --bs-gutter-x: 0; } - -.g-0, -.gy-0 { - --bs-gutter-y: 0; } - -.g-1, -.gx-1 { - --bs-gutter-x: 0.25rem; } - -.g-1, -.gy-1 { - --bs-gutter-y: 0.25rem; } - -.g-2, -.gx-2 { - --bs-gutter-x: 0.5rem; } - -.g-2, -.gy-2 { - --bs-gutter-y: 0.5rem; } - -.g-3, -.gx-3 { - --bs-gutter-x: 1rem; } - -.g-3, -.gy-3 { - --bs-gutter-y: 1rem; } - -.g-4, -.gx-4 { - --bs-gutter-x: 1.5rem; } - -.g-4, -.gy-4 { - --bs-gutter-y: 1.5rem; } - -.g-5, -.gx-5 { - --bs-gutter-x: 3rem; } - -.g-5, -.gy-5 { - --bs-gutter-y: 3rem; } - -@media (min-width: 576px) { - .col-sm { - flex: 1 0 0; } - .row-cols-sm-auto > * { - flex: 0 0 auto; - width: auto; } - .row-cols-sm-1 > * { - flex: 0 0 auto; - width: 100%; } - .row-cols-sm-2 > * { - flex: 0 0 auto; - width: 50%; } - .row-cols-sm-3 > * { - flex: 0 0 auto; - width: 33.33333%; } - .row-cols-sm-4 > * { - flex: 0 0 auto; - width: 25%; } - .row-cols-sm-5 > * { - flex: 0 0 auto; - width: 20%; } - .row-cols-sm-6 > * { - flex: 0 0 auto; - width: 16.66667%; } - .col-sm-auto { - flex: 0 0 auto; - width: auto; } - .col-sm-1 { - flex: 0 0 auto; - width: 8.33333%; } - .col-sm-2 { - flex: 0 0 auto; - width: 16.66667%; } - .col-sm-3 { - flex: 0 0 auto; - width: 25%; } - .col-sm-4 { - flex: 0 0 auto; - width: 33.33333%; } - .col-sm-5 { - flex: 0 0 auto; - width: 41.66667%; } - .col-sm-6 { - flex: 0 0 auto; - width: 50%; } - .col-sm-7 { - flex: 0 0 auto; - width: 58.33333%; } - .col-sm-8 { - flex: 0 0 auto; - width: 66.66667%; } - .col-sm-9 { - flex: 0 0 auto; - width: 75%; } - .col-sm-10 { - flex: 0 0 auto; - width: 83.33333%; } - .col-sm-11 { - flex: 0 0 auto; - width: 91.66667%; } - .col-sm-12 { - flex: 0 0 auto; - width: 100%; } - .offset-sm-0 { - margin-left: 0; } - .offset-sm-1 { - margin-left: 8.33333%; } - .offset-sm-2 { - margin-left: 16.66667%; } - .offset-sm-3 { - margin-left: 25%; } - .offset-sm-4 { - margin-left: 33.33333%; } - .offset-sm-5 { - margin-left: 41.66667%; } - .offset-sm-6 { - margin-left: 50%; } - .offset-sm-7 { - margin-left: 58.33333%; } - .offset-sm-8 { - margin-left: 66.66667%; } - .offset-sm-9 { - margin-left: 75%; } - .offset-sm-10 { - margin-left: 83.33333%; } - .offset-sm-11 { - margin-left: 91.66667%; } - .g-sm-0, - .gx-sm-0 { - --bs-gutter-x: 0; } - .g-sm-0, - .gy-sm-0 { - --bs-gutter-y: 0; } - .g-sm-1, - .gx-sm-1 { - --bs-gutter-x: 0.25rem; } - .g-sm-1, - .gy-sm-1 { - --bs-gutter-y: 0.25rem; } - .g-sm-2, - .gx-sm-2 { - --bs-gutter-x: 0.5rem; } - .g-sm-2, - .gy-sm-2 { - --bs-gutter-y: 0.5rem; } - .g-sm-3, - .gx-sm-3 { - --bs-gutter-x: 1rem; } - .g-sm-3, - .gy-sm-3 { - --bs-gutter-y: 1rem; } - .g-sm-4, - .gx-sm-4 { - --bs-gutter-x: 1.5rem; } - .g-sm-4, - .gy-sm-4 { - --bs-gutter-y: 1.5rem; } - .g-sm-5, - .gx-sm-5 { - --bs-gutter-x: 3rem; } - .g-sm-5, - .gy-sm-5 { - --bs-gutter-y: 3rem; } } - -@media (min-width: 768px) { - .col-md { - flex: 1 0 0; } - .row-cols-md-auto > * { - flex: 0 0 auto; - width: auto; } - .row-cols-md-1 > * { - flex: 0 0 auto; - width: 100%; } - .row-cols-md-2 > * { - flex: 0 0 auto; - width: 50%; } - .row-cols-md-3 > * { - flex: 0 0 auto; - width: 33.33333%; } - .row-cols-md-4 > * { - flex: 0 0 auto; - width: 25%; } - .row-cols-md-5 > * { - flex: 0 0 auto; - width: 20%; } - .row-cols-md-6 > * { - flex: 0 0 auto; - width: 16.66667%; } - .col-md-auto { - flex: 0 0 auto; - width: auto; } - .col-md-1 { - flex: 0 0 auto; - width: 8.33333%; } - .col-md-2 { - flex: 0 0 auto; - width: 16.66667%; } - .col-md-3 { - flex: 0 0 auto; - width: 25%; } - .col-md-4 { - flex: 0 0 auto; - width: 33.33333%; } - .col-md-5 { - flex: 0 0 auto; - width: 41.66667%; } - .col-md-6 { - flex: 0 0 auto; - width: 50%; } - .col-md-7 { - flex: 0 0 auto; - width: 58.33333%; } - .col-md-8 { - flex: 0 0 auto; - width: 66.66667%; } - .col-md-9 { - flex: 0 0 auto; - width: 75%; } - .col-md-10 { - flex: 0 0 auto; - width: 83.33333%; } - .col-md-11 { - flex: 0 0 auto; - width: 91.66667%; } - .col-md-12 { - flex: 0 0 auto; - width: 100%; } - .offset-md-0 { - margin-left: 0; } - .offset-md-1 { - margin-left: 8.33333%; } - .offset-md-2 { - margin-left: 16.66667%; } - .offset-md-3 { - margin-left: 25%; } - .offset-md-4 { - margin-left: 33.33333%; } - .offset-md-5 { - margin-left: 41.66667%; } - .offset-md-6 { - margin-left: 50%; } - .offset-md-7 { - margin-left: 58.33333%; } - .offset-md-8 { - margin-left: 66.66667%; } - .offset-md-9 { - margin-left: 75%; } - .offset-md-10 { - margin-left: 83.33333%; } - .offset-md-11 { - margin-left: 91.66667%; } - .g-md-0, - .gx-md-0 { - --bs-gutter-x: 0; } - .g-md-0, - .gy-md-0 { - --bs-gutter-y: 0; } - .g-md-1, - .gx-md-1 { - --bs-gutter-x: 0.25rem; } - .g-md-1, - .gy-md-1 { - --bs-gutter-y: 0.25rem; } - .g-md-2, - .gx-md-2 { - --bs-gutter-x: 0.5rem; } - .g-md-2, - .gy-md-2 { - --bs-gutter-y: 0.5rem; } - .g-md-3, - .gx-md-3 { - --bs-gutter-x: 1rem; } - .g-md-3, - .gy-md-3 { - --bs-gutter-y: 1rem; } - .g-md-4, - .gx-md-4 { - --bs-gutter-x: 1.5rem; } - .g-md-4, - .gy-md-4 { - --bs-gutter-y: 1.5rem; } - .g-md-5, - .gx-md-5 { - --bs-gutter-x: 3rem; } - .g-md-5, - .gy-md-5 { - --bs-gutter-y: 3rem; } } - -@media (min-width: 992px) { - .col-lg { - flex: 1 0 0; } - .row-cols-lg-auto > * { - flex: 0 0 auto; - width: auto; } - .row-cols-lg-1 > * { - flex: 0 0 auto; - width: 100%; } - .row-cols-lg-2 > * { - flex: 0 0 auto; - width: 50%; } - .row-cols-lg-3 > * { - flex: 0 0 auto; - width: 33.33333%; } - .row-cols-lg-4 > * { - flex: 0 0 auto; - width: 25%; } - .row-cols-lg-5 > * { - flex: 0 0 auto; - width: 20%; } - .row-cols-lg-6 > * { - flex: 0 0 auto; - width: 16.66667%; } - .col-lg-auto { - flex: 0 0 auto; - width: auto; } - .col-lg-1 { - flex: 0 0 auto; - width: 8.33333%; } - .col-lg-2 { - flex: 0 0 auto; - width: 16.66667%; } - .col-lg-3 { - flex: 0 0 auto; - width: 25%; } - .col-lg-4 { - flex: 0 0 auto; - width: 33.33333%; } - .col-lg-5 { - flex: 0 0 auto; - width: 41.66667%; } - .col-lg-6 { - flex: 0 0 auto; - width: 50%; } - .col-lg-7 { - flex: 0 0 auto; - width: 58.33333%; } - .col-lg-8 { - flex: 0 0 auto; - width: 66.66667%; } - .col-lg-9 { - flex: 0 0 auto; - width: 75%; } - .col-lg-10 { - flex: 0 0 auto; - width: 83.33333%; } - .col-lg-11 { - flex: 0 0 auto; - width: 91.66667%; } - .col-lg-12 { - flex: 0 0 auto; - width: 100%; } - .offset-lg-0 { - margin-left: 0; } - .offset-lg-1 { - margin-left: 8.33333%; } - .offset-lg-2 { - margin-left: 16.66667%; } - .offset-lg-3 { - margin-left: 25%; } - .offset-lg-4 { - margin-left: 33.33333%; } - .offset-lg-5 { - margin-left: 41.66667%; } - .offset-lg-6 { - margin-left: 50%; } - .offset-lg-7 { - margin-left: 58.33333%; } - .offset-lg-8 { - margin-left: 66.66667%; } - .offset-lg-9 { - margin-left: 75%; } - .offset-lg-10 { - margin-left: 83.33333%; } - .offset-lg-11 { - margin-left: 91.66667%; } - .g-lg-0, - .gx-lg-0 { - --bs-gutter-x: 0; } - .g-lg-0, - .gy-lg-0 { - --bs-gutter-y: 0; } - .g-lg-1, - .gx-lg-1 { - --bs-gutter-x: 0.25rem; } - .g-lg-1, - .gy-lg-1 { - --bs-gutter-y: 0.25rem; } - .g-lg-2, - .gx-lg-2 { - --bs-gutter-x: 0.5rem; } - .g-lg-2, - .gy-lg-2 { - --bs-gutter-y: 0.5rem; } - .g-lg-3, - .gx-lg-3 { - --bs-gutter-x: 1rem; } - .g-lg-3, - .gy-lg-3 { - --bs-gutter-y: 1rem; } - .g-lg-4, - .gx-lg-4 { - --bs-gutter-x: 1.5rem; } - .g-lg-4, - .gy-lg-4 { - --bs-gutter-y: 1.5rem; } - .g-lg-5, - .gx-lg-5 { - --bs-gutter-x: 3rem; } - .g-lg-5, - .gy-lg-5 { - --bs-gutter-y: 3rem; } } - -@media (min-width: 1200px) { - .col-xl { - flex: 1 0 0; } - .row-cols-xl-auto > * { - flex: 0 0 auto; - width: auto; } - .row-cols-xl-1 > * { - flex: 0 0 auto; - width: 100%; } - .row-cols-xl-2 > * { - flex: 0 0 auto; - width: 50%; } - .row-cols-xl-3 > * { - flex: 0 0 auto; - width: 33.33333%; } - .row-cols-xl-4 > * { - flex: 0 0 auto; - width: 25%; } - .row-cols-xl-5 > * { - flex: 0 0 auto; - width: 20%; } - .row-cols-xl-6 > * { - flex: 0 0 auto; - width: 16.66667%; } - .col-xl-auto { - flex: 0 0 auto; - width: auto; } - .col-xl-1 { - flex: 0 0 auto; - width: 8.33333%; } - .col-xl-2 { - flex: 0 0 auto; - width: 16.66667%; } - .col-xl-3 { - flex: 0 0 auto; - width: 25%; } - .col-xl-4 { - flex: 0 0 auto; - width: 33.33333%; } - .col-xl-5 { - flex: 0 0 auto; - width: 41.66667%; } - .col-xl-6 { - flex: 0 0 auto; - width: 50%; } - .col-xl-7 { - flex: 0 0 auto; - width: 58.33333%; } - .col-xl-8 { - flex: 0 0 auto; - width: 66.66667%; } - .col-xl-9 { - flex: 0 0 auto; - width: 75%; } - .col-xl-10 { - flex: 0 0 auto; - width: 83.33333%; } - .col-xl-11 { - flex: 0 0 auto; - width: 91.66667%; } - .col-xl-12 { - flex: 0 0 auto; - width: 100%; } - .offset-xl-0 { - margin-left: 0; } - .offset-xl-1 { - margin-left: 8.33333%; } - .offset-xl-2 { - margin-left: 16.66667%; } - .offset-xl-3 { - margin-left: 25%; } - .offset-xl-4 { - margin-left: 33.33333%; } - .offset-xl-5 { - margin-left: 41.66667%; } - .offset-xl-6 { - margin-left: 50%; } - .offset-xl-7 { - margin-left: 58.33333%; } - .offset-xl-8 { - margin-left: 66.66667%; } - .offset-xl-9 { - margin-left: 75%; } - .offset-xl-10 { - margin-left: 83.33333%; } - .offset-xl-11 { - margin-left: 91.66667%; } - .g-xl-0, - .gx-xl-0 { - --bs-gutter-x: 0; } - .g-xl-0, - .gy-xl-0 { - --bs-gutter-y: 0; } - .g-xl-1, - .gx-xl-1 { - --bs-gutter-x: 0.25rem; } - .g-xl-1, - .gy-xl-1 { - --bs-gutter-y: 0.25rem; } - .g-xl-2, - .gx-xl-2 { - --bs-gutter-x: 0.5rem; } - .g-xl-2, - .gy-xl-2 { - --bs-gutter-y: 0.5rem; } - .g-xl-3, - .gx-xl-3 { - --bs-gutter-x: 1rem; } - .g-xl-3, - .gy-xl-3 { - --bs-gutter-y: 1rem; } - .g-xl-4, - .gx-xl-4 { - --bs-gutter-x: 1.5rem; } - .g-xl-4, - .gy-xl-4 { - --bs-gutter-y: 1.5rem; } - .g-xl-5, - .gx-xl-5 { - --bs-gutter-x: 3rem; } - .g-xl-5, - .gy-xl-5 { - --bs-gutter-y: 3rem; } } - -@media (min-width: 1400px) { - .col-xxl { - flex: 1 0 0; } - .row-cols-xxl-auto > * { - flex: 0 0 auto; - width: auto; } - .row-cols-xxl-1 > * { - flex: 0 0 auto; - width: 100%; } - .row-cols-xxl-2 > * { - flex: 0 0 auto; - width: 50%; } - .row-cols-xxl-3 > * { - flex: 0 0 auto; - width: 33.33333%; } - .row-cols-xxl-4 > * { - flex: 0 0 auto; - width: 25%; } - .row-cols-xxl-5 > * { - flex: 0 0 auto; - width: 20%; } - .row-cols-xxl-6 > * { - flex: 0 0 auto; - width: 16.66667%; } - .col-xxl-auto { - flex: 0 0 auto; - width: auto; } - .col-xxl-1 { - flex: 0 0 auto; - width: 8.33333%; } - .col-xxl-2 { - flex: 0 0 auto; - width: 16.66667%; } - .col-xxl-3 { - flex: 0 0 auto; - width: 25%; } - .col-xxl-4 { - flex: 0 0 auto; - width: 33.33333%; } - .col-xxl-5 { - flex: 0 0 auto; - width: 41.66667%; } - .col-xxl-6 { - flex: 0 0 auto; - width: 50%; } - .col-xxl-7 { - flex: 0 0 auto; - width: 58.33333%; } - .col-xxl-8 { - flex: 0 0 auto; - width: 66.66667%; } - .col-xxl-9 { - flex: 0 0 auto; - width: 75%; } - .col-xxl-10 { - flex: 0 0 auto; - width: 83.33333%; } - .col-xxl-11 { - flex: 0 0 auto; - width: 91.66667%; } - .col-xxl-12 { - flex: 0 0 auto; - width: 100%; } - .offset-xxl-0 { - margin-left: 0; } - .offset-xxl-1 { - margin-left: 8.33333%; } - .offset-xxl-2 { - margin-left: 16.66667%; } - .offset-xxl-3 { - margin-left: 25%; } - .offset-xxl-4 { - margin-left: 33.33333%; } - .offset-xxl-5 { - margin-left: 41.66667%; } - .offset-xxl-6 { - margin-left: 50%; } - .offset-xxl-7 { - margin-left: 58.33333%; } - .offset-xxl-8 { - margin-left: 66.66667%; } - .offset-xxl-9 { - margin-left: 75%; } - .offset-xxl-10 { - margin-left: 83.33333%; } - .offset-xxl-11 { - margin-left: 91.66667%; } - .g-xxl-0, - .gx-xxl-0 { - --bs-gutter-x: 0; } - .g-xxl-0, - .gy-xxl-0 { - --bs-gutter-y: 0; } - .g-xxl-1, - .gx-xxl-1 { - --bs-gutter-x: 0.25rem; } - .g-xxl-1, - .gy-xxl-1 { - --bs-gutter-y: 0.25rem; } - .g-xxl-2, - .gx-xxl-2 { - --bs-gutter-x: 0.5rem; } - .g-xxl-2, - .gy-xxl-2 { - --bs-gutter-y: 0.5rem; } - .g-xxl-3, - .gx-xxl-3 { - --bs-gutter-x: 1rem; } - .g-xxl-3, - .gy-xxl-3 { - --bs-gutter-y: 1rem; } - .g-xxl-4, - .gx-xxl-4 { - --bs-gutter-x: 1.5rem; } - .g-xxl-4, - .gy-xxl-4 { - --bs-gutter-y: 1.5rem; } - .g-xxl-5, - .gx-xxl-5 { - --bs-gutter-x: 3rem; } - .g-xxl-5, - .gy-xxl-5 { - --bs-gutter-y: 3rem; } } - -.table { - --bs-table-color-type: initial; - --bs-table-bg-type: initial; - --bs-table-color-state: initial; - --bs-table-bg-state: initial; - --bs-table-color: var(--bs-emphasis-color); - --bs-table-bg: var(--bs-body-bg); - --bs-table-border-color: var(--bs-border-color); - --bs-table-accent-bg: transparent; - --bs-table-striped-color: var(--bs-emphasis-color); - --bs-table-striped-bg: rgba(var(--bs-emphasis-color-rgb), 0.05); - --bs-table-active-color: var(--bs-emphasis-color); - --bs-table-active-bg: rgba(var(--bs-emphasis-color-rgb), 0.1); - --bs-table-hover-color: var(--bs-emphasis-color); - --bs-table-hover-bg: rgba(var(--bs-emphasis-color-rgb), 0.075); - width: 100%; - margin-bottom: 1rem; - vertical-align: top; - border-color: var(--bs-table-border-color); } - .table > :not(caption) > * > * { - padding: 0.5rem 0.5rem; - color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color))); - background-color: var(--bs-table-bg); - border-bottom-width: var(--bs-border-width); - box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg))); } - .table > tbody { - vertical-align: inherit; } - .table > thead { - vertical-align: bottom; } - -.table-group-divider { - border-top: calc(var(--bs-border-width) * 2) solid currentcolor; } - -.caption-top { - caption-side: top; } - -.table-sm > :not(caption) > * > * { - padding: 0.25rem 0.25rem; } - -.table-bordered > :not(caption) > * { - border-width: var(--bs-border-width) 0; } - .table-bordered > :not(caption) > * > * { - border-width: 0 var(--bs-border-width); } - -.table-borderless > :not(caption) > * > * { - border-bottom-width: 0; } - -.table-borderless > :not(:first-child) { - border-top-width: 0; } - -.table-striped > tbody > tr:nth-of-type(odd) > * { - --bs-table-color-type: var(--bs-table-striped-color); - --bs-table-bg-type: var(--bs-table-striped-bg); } - -.table-striped-columns > :not(caption) > tr > :nth-child(even) { - --bs-table-color-type: var(--bs-table-striped-color); - --bs-table-bg-type: var(--bs-table-striped-bg); } - -.table-active { - --bs-table-color-state: var(--bs-table-active-color); - --bs-table-bg-state: var(--bs-table-active-bg); } - -.table-hover > tbody > tr:hover > * { - --bs-table-color-state: var(--bs-table-hover-color); - --bs-table-bg-state: var(--bs-table-hover-bg); } - -.table-primary { - --bs-table-color: #000; - --bs-table-bg: #cfe2ff; - --bs-table-border-color: #a6b5cc; - --bs-table-striped-bg: #c5d7f2; - --bs-table-striped-color: #000; - --bs-table-active-bg: #bacbe6; - --bs-table-active-color: #000; - --bs-table-hover-bg: #bfd1ec; - --bs-table-hover-color: #000; - color: var(--bs-table-color); - border-color: var(--bs-table-border-color); } - -.table-secondary { - --bs-table-color: #000; - --bs-table-bg: #e2e3e5; - --bs-table-border-color: #b5b6b7; - --bs-table-striped-bg: #d7d8da; - --bs-table-striped-color: #000; - --bs-table-active-bg: #cbccce; - --bs-table-active-color: #000; - --bs-table-hover-bg: #d1d2d4; - --bs-table-hover-color: #000; - color: var(--bs-table-color); - border-color: var(--bs-table-border-color); } - -.table-success { - --bs-table-color: #000; - --bs-table-bg: #d1e7dd; - --bs-table-border-color: #a7b9b1; - --bs-table-striped-bg: #c7dbd2; - --bs-table-striped-color: #000; - --bs-table-active-bg: #bcd0c7; - --bs-table-active-color: #000; - --bs-table-hover-bg: #c1d6cc; - --bs-table-hover-color: #000; - color: var(--bs-table-color); - border-color: var(--bs-table-border-color); } - -.table-info { - --bs-table-color: #000; - --bs-table-bg: #cff4fc; - --bs-table-border-color: #a6c3ca; - --bs-table-striped-bg: #c5e8ef; - --bs-table-striped-color: #000; - --bs-table-active-bg: #badce3; - --bs-table-active-color: #000; - --bs-table-hover-bg: #bfe2e9; - --bs-table-hover-color: #000; - color: var(--bs-table-color); - border-color: var(--bs-table-border-color); } - -.table-warning { - --bs-table-color: #000; - --bs-table-bg: #fff3cd; - --bs-table-border-color: #ccc2a4; - --bs-table-striped-bg: #f2e7c3; - --bs-table-striped-color: #000; - --bs-table-active-bg: #e6dbb9; - --bs-table-active-color: #000; - --bs-table-hover-bg: #ece1be; - --bs-table-hover-color: #000; - color: var(--bs-table-color); - border-color: var(--bs-table-border-color); } - -.table-danger { - --bs-table-color: #000; - --bs-table-bg: #f8d7da; - --bs-table-border-color: #c6acae; - --bs-table-striped-bg: #eccccf; - --bs-table-striped-color: #000; - --bs-table-active-bg: #dfc2c4; - --bs-table-active-color: #000; - --bs-table-hover-bg: #e5c7ca; - --bs-table-hover-color: #000; - color: var(--bs-table-color); - border-color: var(--bs-table-border-color); } - -.table-light { - --bs-table-color: #000; - --bs-table-bg: #f8f9fa; - --bs-table-border-color: #c6c7c8; - --bs-table-striped-bg: #ecedee; - --bs-table-striped-color: #000; - --bs-table-active-bg: #dfe0e1; - --bs-table-active-color: #000; - --bs-table-hover-bg: #e5e6e7; - --bs-table-hover-color: #000; - color: var(--bs-table-color); - border-color: var(--bs-table-border-color); } - -.table-dark { - --bs-table-color: #fff; - --bs-table-bg: #212529; - --bs-table-border-color: #4d5154; - --bs-table-striped-bg: #2c3034; - --bs-table-striped-color: #fff; - --bs-table-active-bg: #373b3e; - --bs-table-active-color: #fff; - --bs-table-hover-bg: #323539; - --bs-table-hover-color: #fff; - color: var(--bs-table-color); - border-color: var(--bs-table-border-color); } - -.table-responsive { - overflow-x: auto; - -webkit-overflow-scrolling: touch; } - -@media (max-width: 575.98px) { - .table-responsive-sm { - overflow-x: auto; - -webkit-overflow-scrolling: touch; } } - -@media (max-width: 767.98px) { - .table-responsive-md { - overflow-x: auto; - -webkit-overflow-scrolling: touch; } } - -@media (max-width: 991.98px) { - .table-responsive-lg { - overflow-x: auto; - -webkit-overflow-scrolling: touch; } } - -@media (max-width: 1199.98px) { - .table-responsive-xl { - overflow-x: auto; - -webkit-overflow-scrolling: touch; } } - -@media (max-width: 1399.98px) { - .table-responsive-xxl { - overflow-x: auto; - -webkit-overflow-scrolling: touch; } } - -.form-label { - margin-bottom: 0.5rem; } - -.col-form-label { - padding-top: calc(0.375rem + var(--bs-border-width)); - padding-bottom: calc(0.375rem + var(--bs-border-width)); - margin-bottom: 0; - font-size: inherit; - line-height: 1.5; } - -.col-form-label-lg { - padding-top: calc(0.5rem + var(--bs-border-width)); - padding-bottom: calc(0.5rem + var(--bs-border-width)); - font-size: 1.25rem; } - -.col-form-label-sm { - padding-top: calc(0.25rem + var(--bs-border-width)); - padding-bottom: calc(0.25rem + var(--bs-border-width)); - font-size: 0.875rem; } - -.form-text { - margin-top: 0.25rem; - font-size: 0.875em; - color: var(--bs-secondary-color); } - -.form-control { - display: block; - width: 100%; - padding: 0.375rem 0.75rem; - font-size: 1rem; - font-weight: 400; - line-height: 1.5; - color: var(--bs-body-color); - appearance: none; - background-color: var(--bs-body-bg); - background-clip: padding-box; - border: var(--bs-border-width) solid var(--bs-border-color); - border-radius: var(--bs-border-radius); - transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .form-control { - transition: none; } } - .form-control[type="file"] { - overflow: hidden; } - .form-control[type="file"]:not(:disabled):not([readonly]) { - cursor: pointer; } - .form-control:focus { - color: var(--bs-body-color); - background-color: var(--bs-body-bg); - border-color: #86b7fe; - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); } - .form-control::-webkit-date-and-time-value { - min-width: 85px; - height: 1.5em; - margin: 0; } - .form-control::-webkit-datetime-edit { - display: block; - padding: 0; } - .form-control::placeholder { - color: var(--bs-secondary-color); - opacity: 1; } - .form-control:disabled { - background-color: var(--bs-secondary-bg); - opacity: 1; } - .form-control::file-selector-button { - padding: 0.375rem 0.75rem; - margin: -0.375rem -0.75rem; - margin-inline-end: 0.75rem; - color: var(--bs-body-color); - background-color: var(--bs-tertiary-bg); - pointer-events: none; - border-color: inherit; - border-style: solid; - border-width: 0; - border-inline-end-width: var(--bs-border-width); - border-radius: 0; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .form-control::file-selector-button { - transition: none; } } - .form-control:hover:not(:disabled):not([readonly])::file-selector-button { - background-color: var(--bs-secondary-bg); } - -.form-control-plaintext { - display: block; - width: 100%; - padding: 0.375rem 0; - margin-bottom: 0; - line-height: 1.5; - color: var(--bs-body-color); - background-color: transparent; - border: solid transparent; - border-width: var(--bs-border-width) 0; } - .form-control-plaintext:focus { - outline: 0; } - .form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg { - padding-right: 0; - padding-left: 0; } - -.form-control-sm { - min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - border-radius: var(--bs-border-radius-sm); } - .form-control-sm::file-selector-button { - padding: 0.25rem 0.5rem; - margin: -0.25rem -0.5rem; - margin-inline-end: 0.5rem; } - -.form-control-lg { - min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2)); - padding: 0.5rem 1rem; - font-size: 1.25rem; - border-radius: var(--bs-border-radius-lg); } - .form-control-lg::file-selector-button { - padding: 0.5rem 1rem; - margin: -0.5rem -1rem; - margin-inline-end: 1rem; } - -textarea.form-control { - min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); } - -textarea.form-control-sm { - min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); } - -textarea.form-control-lg { - min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2)); } - -.form-control-color { - width: 3rem; - height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); - padding: 0.375rem; } - .form-control-color:not(:disabled):not([readonly]) { - cursor: pointer; } - .form-control-color::-moz-color-swatch { - border: 0 !important; - border-radius: var(--bs-border-radius); } - .form-control-color::-webkit-color-swatch { - border: 0 !important; - border-radius: var(--bs-border-radius); } - .form-control-color.form-control-sm { - height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); } - .form-control-color.form-control-lg { - height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2)); } - -.form-select { - --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); - display: block; - width: 100%; - padding: 0.375rem 2.25rem 0.375rem 0.75rem; - font-size: 1rem; - font-weight: 400; - line-height: 1.5; - color: var(--bs-body-color); - appearance: none; - background-color: var(--bs-body-bg); - background-image: var(--bs-form-select-bg-img), var(--bs-form-select-bg-icon, none); - background-repeat: no-repeat; - background-position: right 0.75rem center; - background-size: 16px 12px; - border: var(--bs-border-width) solid var(--bs-border-color); - border-radius: var(--bs-border-radius); - transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .form-select { - transition: none; } } - .form-select:focus { - border-color: #86b7fe; - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); } - .form-select[multiple], .form-select[size]:not([size="1"]) { - padding-right: 0.75rem; - background-image: none; } - .form-select:disabled { - background-color: var(--bs-secondary-bg); } - .form-select:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 var(--bs-body-color); } - -.form-select-sm { - padding-top: 0.25rem; - padding-bottom: 0.25rem; - padding-left: 0.5rem; - font-size: 0.875rem; - border-radius: var(--bs-border-radius-sm); } - -.form-select-lg { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - padding-left: 1rem; - font-size: 1.25rem; - border-radius: var(--bs-border-radius-lg); } - -[data-bs-theme="dark"] .form-select { - --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); } - -.form-check { - display: block; - min-height: 1.5rem; - padding-left: 1.5em; - margin-bottom: 0.125rem; } - .form-check .form-check-input { - float: left; - margin-left: -1.5em; } - -.form-check-reverse { - padding-right: 1.5em; - padding-left: 0; - text-align: right; } - .form-check-reverse .form-check-input { - float: right; - margin-right: -1.5em; - margin-left: 0; } - -.form-check-input { - --bs-form-check-bg: var(--bs-body-bg); - flex-shrink: 0; - width: 1em; - height: 1em; - margin-top: 0.25em; - vertical-align: top; - appearance: none; - background-color: var(--bs-form-check-bg); - background-image: var(--bs-form-check-bg-image); - background-repeat: no-repeat; - background-position: center; - background-size: contain; - border: var(--bs-border-width) solid var(--bs-border-color); - print-color-adjust: exact; } - .form-check-input[type="checkbox"] { - border-radius: 0.25em; } - .form-check-input[type="radio"] { - border-radius: 50%; } - .form-check-input:active { - filter: brightness(90%); } - .form-check-input:focus { - border-color: #86b7fe; - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); } - .form-check-input:checked { - background-color: #0d6efd; - border-color: #0d6efd; } - .form-check-input:checked[type="checkbox"] { - --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); } - .form-check-input:checked[type="radio"] { - --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); } - .form-check-input[type="checkbox"]:indeterminate { - background-color: #0d6efd; - border-color: #0d6efd; - --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); } - .form-check-input:disabled { - pointer-events: none; - filter: none; - opacity: 0.5; } - .form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label { - cursor: default; - opacity: 0.5; } - -.form-switch { - padding-left: 2.5em; } - .form-switch .form-check-input { - --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); - width: 2em; - margin-left: -2.5em; - background-image: var(--bs-form-switch-bg); - background-position: left center; - border-radius: 2em; - transition: background-position 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .form-switch .form-check-input { - transition: none; } } - .form-switch .form-check-input:focus { - --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e"); } - .form-switch .form-check-input:checked { - background-position: right center; - --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); } - .form-switch.form-check-reverse { - padding-right: 2.5em; - padding-left: 0; } - .form-switch.form-check-reverse .form-check-input { - margin-right: -2.5em; - margin-left: 0; } - -.form-check-inline { - display: inline-block; - margin-right: 1rem; } - -.btn-check { - position: absolute; - clip: rect(0, 0, 0, 0); - pointer-events: none; } - .btn-check[disabled] + .btn, .btn-check:disabled + .btn { - pointer-events: none; - filter: none; - opacity: 0.65; } - -[data-bs-theme="dark"] .form-switch .form-check-input:not(:checked):not(:focus) { - --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.25%29'/%3e%3c/svg%3e"); } - -.form-range { - width: 100%; - height: 1.5rem; - padding: 0; - appearance: none; - background-color: transparent; } - .form-range:focus { - outline: 0; } - .form-range:focus::-webkit-slider-thumb { - box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); } - .form-range:focus::-moz-range-thumb { - box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); } - .form-range::-moz-focus-outer { - border: 0; } - .form-range::-webkit-slider-thumb { - width: 1rem; - height: 1rem; - margin-top: -0.25rem; - appearance: none; - background-color: #0d6efd; - border: 0; - border-radius: 1rem; - transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .form-range::-webkit-slider-thumb { - transition: none; } } - .form-range::-webkit-slider-thumb:active { - background-color: #b6d4fe; } - .form-range::-webkit-slider-runnable-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: var(--bs-secondary-bg); - border-color: transparent; - border-radius: 1rem; } - .form-range::-moz-range-thumb { - width: 1rem; - height: 1rem; - appearance: none; - background-color: #0d6efd; - border: 0; - border-radius: 1rem; - transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .form-range::-moz-range-thumb { - transition: none; } } - .form-range::-moz-range-thumb:active { - background-color: #b6d4fe; } - .form-range::-moz-range-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: var(--bs-secondary-bg); - border-color: transparent; - border-radius: 1rem; } - .form-range:disabled { - pointer-events: none; } - .form-range:disabled::-webkit-slider-thumb { - background-color: var(--bs-secondary-color); } - .form-range:disabled::-moz-range-thumb { - background-color: var(--bs-secondary-color); } - -.form-floating { - position: relative; } - .form-floating > .form-control, - .form-floating > .form-control-plaintext, - .form-floating > .form-select { - height: calc(3.5rem + calc(var(--bs-border-width) * 2)); - min-height: calc(3.5rem + calc(var(--bs-border-width) * 2)); - line-height: 1.25; } - .form-floating > label { - position: absolute; - top: 0; - left: 0; - z-index: 2; - max-width: 100%; - height: 100%; - padding: 1rem 0.75rem; - overflow: hidden; - color: rgba(var(--bs-body-color-rgb), 0.65); - text-align: start; - text-overflow: ellipsis; - white-space: nowrap; - pointer-events: none; - border: var(--bs-border-width) solid transparent; - transform-origin: 0 0; - transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .form-floating > label { - transition: none; } } - .form-floating > .form-control, - .form-floating > .form-control-plaintext { - padding: 1rem 0.75rem; } - .form-floating > .form-control::placeholder, - .form-floating > .form-control-plaintext::placeholder { - color: transparent; } - .form-floating > .form-control:focus, .form-floating > .form-control:not(:placeholder-shown), - .form-floating > .form-control-plaintext:focus, - .form-floating > .form-control-plaintext:not(:placeholder-shown) { - padding-top: 1.625rem; - padding-bottom: 0.625rem; } - .form-floating > .form-control:-webkit-autofill, - .form-floating > .form-control-plaintext:-webkit-autofill { - padding-top: 1.625rem; - padding-bottom: 0.625rem; } - .form-floating > .form-select { - padding-top: 1.625rem; - padding-bottom: 0.625rem; - padding-left: 0.75rem; } - .form-floating > .form-control:focus ~ label, - .form-floating > .form-control:not(:placeholder-shown) ~ label, - .form-floating > .form-control-plaintext ~ label, - .form-floating > .form-select ~ label { - transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); } - .form-floating > .form-control:-webkit-autofill ~ label { - transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); } - .form-floating > textarea:focus ~ label::after, - .form-floating > textarea:not(:placeholder-shown) ~ label::after { - position: absolute; - inset: 1rem 0.375rem; - z-index: -1; - height: 1.5em; - content: ""; - background-color: var(--bs-body-bg); - border-radius: var(--bs-border-radius); } - .form-floating > textarea:disabled ~ label::after { - background-color: var(--bs-secondary-bg); } - .form-floating > .form-control-plaintext ~ label { - border-width: var(--bs-border-width) 0; } - .form-floating > :disabled ~ label, - .form-floating > .form-control:disabled ~ label { - color: #6c757d; } - -.input-group { - position: relative; - display: flex; - flex-wrap: wrap; - align-items: stretch; - width: 100%; } - .input-group > .form-control, - .input-group > .form-select, - .input-group > .form-floating { - position: relative; - flex: 1 1 auto; - width: 1%; - min-width: 0; } - .input-group > .form-control:focus, - .input-group > .form-select:focus, - .input-group > .form-floating:focus-within { - z-index: 5; } - .input-group .btn { - position: relative; - z-index: 2; } - .input-group .btn:focus { - z-index: 5; } - -.input-group-text { - display: flex; - align-items: center; - padding: 0.375rem 0.75rem; - font-size: 1rem; - font-weight: 400; - line-height: 1.5; - color: var(--bs-body-color); - text-align: center; - white-space: nowrap; - background-color: var(--bs-tertiary-bg); - border: var(--bs-border-width) solid var(--bs-border-color); - border-radius: var(--bs-border-radius); } - -.input-group-lg > .form-control, -.input-group-lg > .form-select, -.input-group-lg > .input-group-text, -.input-group-lg > .btn { - padding: 0.5rem 1rem; - font-size: 1.25rem; - border-radius: var(--bs-border-radius-lg); } - -.input-group-sm > .form-control, -.input-group-sm > .form-select, -.input-group-sm > .input-group-text, -.input-group-sm > .btn { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - border-radius: var(--bs-border-radius-sm); } - -.input-group-lg > .form-select, -.input-group-sm > .form-select { - padding-right: 3rem; } - -.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), -.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n + 3), -.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-control, -.input-group:not(.has-validation) > .form-floating:not(:last-child) > .form-select { - border-top-right-radius: 0; - border-bottom-right-radius: 0; } - -.input-group.has-validation > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), -.input-group.has-validation > .dropdown-toggle:nth-last-child(n + 4), -.input-group.has-validation > .form-floating:nth-last-child(n + 3) > .form-control, -.input-group.has-validation > .form-floating:nth-last-child(n + 3) > .form-select { - border-top-right-radius: 0; - border-bottom-right-radius: 0; } - -.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { - margin-left: calc(-1 * var(--bs-border-width)); - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - -.input-group > .form-floating:not(:first-child) > .form-control, -.input-group > .form-floating:not(:first-child) > .form-select { - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - -.valid-feedback { - display: none; - width: 100%; - margin-top: 0.25rem; - font-size: 0.875em; - color: var(--bs-form-valid-color); } - -.valid-tooltip { - position: absolute; - top: 100%; - z-index: 5; - display: none; - max-width: 100%; - padding: 0.25rem 0.5rem; - margin-top: .1rem; - font-size: 0.875rem; - color: #fff; - background-color: var(--bs-success); - border-radius: var(--bs-border-radius); } - -.was-validated :valid ~ .valid-feedback, -.was-validated :valid ~ .valid-tooltip, -.is-valid ~ .valid-feedback, -.is-valid ~ .valid-tooltip { - display: block; } - -.was-validated .form-control:valid, .form-control.is-valid { - border-color: var(--bs-form-valid-border-color); - padding-right: calc(1.5em + 0.75rem); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1'/%3e%3c/svg%3e"); - background-repeat: no-repeat; - background-position: right calc(0.375em + 0.1875rem) center; - background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } - .was-validated .form-control:valid:focus, .form-control.is-valid:focus { - border-color: var(--bs-form-valid-border-color); - box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25); } - -.was-validated textarea.form-control:valid, textarea.form-control.is-valid { - padding-right: calc(1.5em + 0.75rem); - background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); } - -.was-validated .form-select:valid, .form-select.is-valid { - border-color: var(--bs-form-valid-border-color); } - .was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size="1"], .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size="1"] { - --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1'/%3e%3c/svg%3e"); - padding-right: 4.125rem; - background-position: right 0.75rem center, center right 2.25rem; - background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } - .was-validated .form-select:valid:focus, .form-select.is-valid:focus { - border-color: var(--bs-form-valid-border-color); - box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25); } - -.was-validated .form-control-color:valid, .form-control-color.is-valid { - width: calc(3rem + calc(1.5em + 0.75rem)); } - -.was-validated .form-check-input:valid, .form-check-input.is-valid { - border-color: var(--bs-form-valid-border-color); } - .was-validated .form-check-input:valid:checked, .form-check-input.is-valid:checked { - background-color: var(--bs-form-valid-color); } - .was-validated .form-check-input:valid:focus, .form-check-input.is-valid:focus { - box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25); } - .was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label { - color: var(--bs-form-valid-color); } - -.form-check-inline .form-check-input ~ .valid-feedback { - margin-left: .5em; } - -.was-validated .input-group > .form-control:not(:focus):valid, .input-group > .form-control:not(:focus).is-valid, .was-validated .input-group > .form-select:not(:focus):valid, -.input-group > .form-select:not(:focus).is-valid, .was-validated .input-group > .form-floating:not(:focus-within):valid, -.input-group > .form-floating:not(:focus-within).is-valid { - z-index: 3; } - -.invalid-feedback { - display: none; - width: 100%; - margin-top: 0.25rem; - font-size: 0.875em; - color: var(--bs-form-invalid-color); } - -.invalid-tooltip { - position: absolute; - top: 100%; - z-index: 5; - display: none; - max-width: 100%; - padding: 0.25rem 0.5rem; - margin-top: .1rem; - font-size: 0.875rem; - color: #fff; - background-color: var(--bs-danger); - border-radius: var(--bs-border-radius); } - -.was-validated :invalid ~ .invalid-feedback, -.was-validated :invalid ~ .invalid-tooltip, -.is-invalid ~ .invalid-feedback, -.is-invalid ~ .invalid-tooltip { - display: block; } - -.was-validated .form-control:invalid, .form-control.is-invalid { - border-color: var(--bs-form-invalid-border-color); - padding-right: calc(1.5em + 0.75rem); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); - background-repeat: no-repeat; - background-position: right calc(0.375em + 0.1875rem) center; - background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } - .was-validated .form-control:invalid:focus, .form-control.is-invalid:focus { - border-color: var(--bs-form-invalid-border-color); - box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25); } - -.was-validated textarea.form-control:invalid, textarea.form-control.is-invalid { - padding-right: calc(1.5em + 0.75rem); - background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); } - -.was-validated .form-select:invalid, .form-select.is-invalid { - border-color: var(--bs-form-invalid-border-color); } - .was-validated .form-select:invalid:not([multiple]):not([size]), .was-validated .form-select:invalid:not([multiple])[size="1"], .form-select.is-invalid:not([multiple]):not([size]), .form-select.is-invalid:not([multiple])[size="1"] { - --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); - padding-right: 4.125rem; - background-position: right 0.75rem center, center right 2.25rem; - background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } - .was-validated .form-select:invalid:focus, .form-select.is-invalid:focus { - border-color: var(--bs-form-invalid-border-color); - box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25); } - -.was-validated .form-control-color:invalid, .form-control-color.is-invalid { - width: calc(3rem + calc(1.5em + 0.75rem)); } - -.was-validated .form-check-input:invalid, .form-check-input.is-invalid { - border-color: var(--bs-form-invalid-border-color); } - .was-validated .form-check-input:invalid:checked, .form-check-input.is-invalid:checked { - background-color: var(--bs-form-invalid-color); } - .was-validated .form-check-input:invalid:focus, .form-check-input.is-invalid:focus { - box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25); } - .was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label { - color: var(--bs-form-invalid-color); } - -.form-check-inline .form-check-input ~ .invalid-feedback { - margin-left: .5em; } - -.was-validated .input-group > .form-control:not(:focus):invalid, .input-group > .form-control:not(:focus).is-invalid, .was-validated .input-group > .form-select:not(:focus):invalid, -.input-group > .form-select:not(:focus).is-invalid, .was-validated .input-group > .form-floating:not(:focus-within):invalid, -.input-group > .form-floating:not(:focus-within).is-invalid { - z-index: 4; } - -.btn { - --bs-btn-padding-x: 0.75rem; - --bs-btn-padding-y: 0.375rem; - --bs-btn-font-family: ; - --bs-btn-font-size: 1rem; - --bs-btn-font-weight: 400; - --bs-btn-line-height: 1.5; - --bs-btn-color: var(--bs-body-color); - --bs-btn-bg: transparent; - --bs-btn-border-width: var(--bs-border-width); - --bs-btn-border-color: transparent; - --bs-btn-border-radius: var(--bs-border-radius); - --bs-btn-hover-border-color: transparent; - --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); - --bs-btn-disabled-opacity: 0.65; - --bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5); - display: inline-block; - padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x); - font-family: var(--bs-btn-font-family); - font-size: var(--bs-btn-font-size); - font-weight: var(--bs-btn-font-weight); - line-height: var(--bs-btn-line-height); - color: var(--bs-btn-color); - text-align: center; - text-decoration: none; - vertical-align: middle; - cursor: pointer; - user-select: none; - border: var(--bs-btn-border-width) solid var(--bs-btn-border-color); - border-radius: var(--bs-btn-border-radius); - background-color: var(--bs-btn-bg); - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .btn { - transition: none; } } - .btn:hover { - color: var(--bs-btn-hover-color); - background-color: var(--bs-btn-hover-bg); - border-color: var(--bs-btn-hover-border-color); } - .btn-check + .btn:hover { - color: var(--bs-btn-color); - background-color: var(--bs-btn-bg); - border-color: var(--bs-btn-border-color); } - .btn:focus-visible { - color: var(--bs-btn-hover-color); - background-color: var(--bs-btn-hover-bg); - border-color: var(--bs-btn-hover-border-color); - outline: 0; - box-shadow: var(--bs-btn-focus-box-shadow); } - .btn-check:focus-visible + .btn { - border-color: var(--bs-btn-hover-border-color); - outline: 0; - box-shadow: var(--bs-btn-focus-box-shadow); } - .btn-check:checked + .btn, :not(.btn-check) + .btn:active, .btn:first-child:active, .btn.active, .btn.show { - color: var(--bs-btn-active-color); - background-color: var(--bs-btn-active-bg); - border-color: var(--bs-btn-active-border-color); } - .btn-check:checked + .btn:focus-visible, :not(.btn-check) + .btn:active:focus-visible, .btn:first-child:active:focus-visible, .btn.active:focus-visible, .btn.show:focus-visible { - box-shadow: var(--bs-btn-focus-box-shadow); } - .btn-check:checked:focus-visible + .btn { - box-shadow: var(--bs-btn-focus-box-shadow); } - .btn:disabled, .btn.disabled, fieldset:disabled .btn { - color: var(--bs-btn-disabled-color); - pointer-events: none; - background-color: var(--bs-btn-disabled-bg); - border-color: var(--bs-btn-disabled-border-color); - opacity: var(--bs-btn-disabled-opacity); } - -.btn-primary { - --bs-btn-color: #fff; - --bs-btn-bg: #0d6efd; - --bs-btn-border-color: #0d6efd; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #0b5ed7; - --bs-btn-hover-border-color: #0a58ca; - --bs-btn-focus-shadow-rgb: 49, 132, 253; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #0a58ca; - --bs-btn-active-border-color: #0a53be; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #fff; - --bs-btn-disabled-bg: #0d6efd; - --bs-btn-disabled-border-color: #0d6efd; } - -.btn-secondary { - --bs-btn-color: #fff; - --bs-btn-bg: #6c757d; - --bs-btn-border-color: #6c757d; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #5c636a; - --bs-btn-hover-border-color: #565e64; - --bs-btn-focus-shadow-rgb: 130, 138, 145; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #565e64; - --bs-btn-active-border-color: #51585e; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #fff; - --bs-btn-disabled-bg: #6c757d; - --bs-btn-disabled-border-color: #6c757d; } - -.btn-success { - --bs-btn-color: #fff; - --bs-btn-bg: #198754; - --bs-btn-border-color: #198754; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #157347; - --bs-btn-hover-border-color: #146c43; - --bs-btn-focus-shadow-rgb: 60, 153, 110; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #146c43; - --bs-btn-active-border-color: #13653f; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #fff; - --bs-btn-disabled-bg: #198754; - --bs-btn-disabled-border-color: #198754; } - -.btn-info { - --bs-btn-color: #000; - --bs-btn-bg: #0dcaf0; - --bs-btn-border-color: #0dcaf0; - --bs-btn-hover-color: #000; - --bs-btn-hover-bg: #31d2f2; - --bs-btn-hover-border-color: #25cff2; - --bs-btn-focus-shadow-rgb: 11, 172, 204; - --bs-btn-active-color: #000; - --bs-btn-active-bg: #3dd5f3; - --bs-btn-active-border-color: #25cff2; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #000; - --bs-btn-disabled-bg: #0dcaf0; - --bs-btn-disabled-border-color: #0dcaf0; } - -.btn-warning { - --bs-btn-color: #000; - --bs-btn-bg: #ffc107; - --bs-btn-border-color: #ffc107; - --bs-btn-hover-color: #000; - --bs-btn-hover-bg: #ffca2c; - --bs-btn-hover-border-color: #ffc720; - --bs-btn-focus-shadow-rgb: 217, 164, 6; - --bs-btn-active-color: #000; - --bs-btn-active-bg: #ffcd39; - --bs-btn-active-border-color: #ffc720; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #000; - --bs-btn-disabled-bg: #ffc107; - --bs-btn-disabled-border-color: #ffc107; } - -.btn-danger { - --bs-btn-color: #fff; - --bs-btn-bg: #dc3545; - --bs-btn-border-color: #dc3545; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #bb2d3b; - --bs-btn-hover-border-color: #b02a37; - --bs-btn-focus-shadow-rgb: 225, 83, 97; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #b02a37; - --bs-btn-active-border-color: #a52834; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #fff; - --bs-btn-disabled-bg: #dc3545; - --bs-btn-disabled-border-color: #dc3545; } - -.btn-light { - --bs-btn-color: #000; - --bs-btn-bg: #f8f9fa; - --bs-btn-border-color: #f8f9fa; - --bs-btn-hover-color: #000; - --bs-btn-hover-bg: #d3d4d5; - --bs-btn-hover-border-color: #c6c7c8; - --bs-btn-focus-shadow-rgb: 211, 212, 213; - --bs-btn-active-color: #000; - --bs-btn-active-bg: #c6c7c8; - --bs-btn-active-border-color: #babbbc; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #000; - --bs-btn-disabled-bg: #f8f9fa; - --bs-btn-disabled-border-color: #f8f9fa; } - -.btn-dark { - --bs-btn-color: #fff; - --bs-btn-bg: #212529; - --bs-btn-border-color: #212529; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #424649; - --bs-btn-hover-border-color: #373b3e; - --bs-btn-focus-shadow-rgb: 66, 70, 73; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #4d5154; - --bs-btn-active-border-color: #373b3e; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #fff; - --bs-btn-disabled-bg: #212529; - --bs-btn-disabled-border-color: #212529; } - -.btn-outline-primary { - --bs-btn-color: #0d6efd; - --bs-btn-border-color: #0d6efd; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #0d6efd; - --bs-btn-hover-border-color: #0d6efd; - --bs-btn-focus-shadow-rgb: 13, 110, 253; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #0d6efd; - --bs-btn-active-border-color: #0d6efd; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #0d6efd; - --bs-btn-disabled-bg: transparent; - --bs-btn-disabled-border-color: #0d6efd; - --bs-gradient: none; } - -.btn-outline-secondary { - --bs-btn-color: #6c757d; - --bs-btn-border-color: #6c757d; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #6c757d; - --bs-btn-hover-border-color: #6c757d; - --bs-btn-focus-shadow-rgb: 108, 117, 125; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #6c757d; - --bs-btn-active-border-color: #6c757d; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #6c757d; - --bs-btn-disabled-bg: transparent; - --bs-btn-disabled-border-color: #6c757d; - --bs-gradient: none; } - -.btn-outline-success { - --bs-btn-color: #198754; - --bs-btn-border-color: #198754; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #198754; - --bs-btn-hover-border-color: #198754; - --bs-btn-focus-shadow-rgb: 25, 135, 84; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #198754; - --bs-btn-active-border-color: #198754; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #198754; - --bs-btn-disabled-bg: transparent; - --bs-btn-disabled-border-color: #198754; - --bs-gradient: none; } - -.btn-outline-info { - --bs-btn-color: #0dcaf0; - --bs-btn-border-color: #0dcaf0; - --bs-btn-hover-color: #000; - --bs-btn-hover-bg: #0dcaf0; - --bs-btn-hover-border-color: #0dcaf0; - --bs-btn-focus-shadow-rgb: 13, 202, 240; - --bs-btn-active-color: #000; - --bs-btn-active-bg: #0dcaf0; - --bs-btn-active-border-color: #0dcaf0; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #0dcaf0; - --bs-btn-disabled-bg: transparent; - --bs-btn-disabled-border-color: #0dcaf0; - --bs-gradient: none; } - -.btn-outline-warning { - --bs-btn-color: #ffc107; - --bs-btn-border-color: #ffc107; - --bs-btn-hover-color: #000; - --bs-btn-hover-bg: #ffc107; - --bs-btn-hover-border-color: #ffc107; - --bs-btn-focus-shadow-rgb: 255, 193, 7; - --bs-btn-active-color: #000; - --bs-btn-active-bg: #ffc107; - --bs-btn-active-border-color: #ffc107; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #ffc107; - --bs-btn-disabled-bg: transparent; - --bs-btn-disabled-border-color: #ffc107; - --bs-gradient: none; } - -.btn-outline-danger { - --bs-btn-color: #dc3545; - --bs-btn-border-color: #dc3545; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #dc3545; - --bs-btn-hover-border-color: #dc3545; - --bs-btn-focus-shadow-rgb: 220, 53, 69; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #dc3545; - --bs-btn-active-border-color: #dc3545; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #dc3545; - --bs-btn-disabled-bg: transparent; - --bs-btn-disabled-border-color: #dc3545; - --bs-gradient: none; } - -.btn-outline-light { - --bs-btn-color: #f8f9fa; - --bs-btn-border-color: #f8f9fa; - --bs-btn-hover-color: #000; - --bs-btn-hover-bg: #f8f9fa; - --bs-btn-hover-border-color: #f8f9fa; - --bs-btn-focus-shadow-rgb: 248, 249, 250; - --bs-btn-active-color: #000; - --bs-btn-active-bg: #f8f9fa; - --bs-btn-active-border-color: #f8f9fa; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #f8f9fa; - --bs-btn-disabled-bg: transparent; - --bs-btn-disabled-border-color: #f8f9fa; - --bs-gradient: none; } - -.btn-outline-dark { - --bs-btn-color: #212529; - --bs-btn-border-color: #212529; - --bs-btn-hover-color: #fff; - --bs-btn-hover-bg: #212529; - --bs-btn-hover-border-color: #212529; - --bs-btn-focus-shadow-rgb: 33, 37, 41; - --bs-btn-active-color: #fff; - --bs-btn-active-bg: #212529; - --bs-btn-active-border-color: #212529; - --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - --bs-btn-disabled-color: #212529; - --bs-btn-disabled-bg: transparent; - --bs-btn-disabled-border-color: #212529; - --bs-gradient: none; } - -.btn-link { - --bs-btn-font-weight: 400; - --bs-btn-color: var(--bs-link-color); - --bs-btn-bg: transparent; - --bs-btn-border-color: transparent; - --bs-btn-hover-color: var(--bs-link-hover-color); - --bs-btn-hover-border-color: transparent; - --bs-btn-active-color: var(--bs-link-hover-color); - --bs-btn-active-border-color: transparent; - --bs-btn-disabled-color: #6c757d; - --bs-btn-disabled-border-color: transparent; - --bs-btn-box-shadow: 0 0 0 #000; - --bs-btn-focus-shadow-rgb: 49, 132, 253; - text-decoration: underline; } - .btn-link:focus-visible { - color: var(--bs-btn-color); } - .btn-link:hover { - color: var(--bs-btn-hover-color); } - -.btn-lg, .btn-group-lg > .btn { - --bs-btn-padding-y: 0.5rem; - --bs-btn-padding-x: 1rem; - --bs-btn-font-size: 1.25rem; - --bs-btn-border-radius: var(--bs-border-radius-lg); } - -.btn-sm, .btn-group-sm > .btn { - --bs-btn-padding-y: 0.25rem; - --bs-btn-padding-x: 0.5rem; - --bs-btn-font-size: 0.875rem; - --bs-btn-border-radius: var(--bs-border-radius-sm); } - -.fade { - transition: opacity 0.15s linear; } - @media (prefers-reduced-motion: reduce) { - .fade { - transition: none; } } - .fade:not(.show) { - opacity: 0; } - -.collapse:not(.show) { - display: none; } - -.collapsing { - height: 0; - overflow: hidden; - transition: height 0.35s ease; } - @media (prefers-reduced-motion: reduce) { - .collapsing { - transition: none; } } - .collapsing.collapse-horizontal { - width: 0; - height: auto; - transition: width 0.35s ease; } - @media (prefers-reduced-motion: reduce) { - .collapsing.collapse-horizontal { - transition: none; } } -.dropup, -.dropend, -.dropdown, -.dropstart, -.dropup-center, -.dropdown-center { - position: relative; } - -.dropdown-toggle { - white-space: nowrap; } - .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid; - border-right: 0.3em solid transparent; - border-bottom: 0; - border-left: 0.3em solid transparent; } - .dropdown-toggle:empty::after { - margin-left: 0; } - -.dropdown-menu { - --bs-dropdown-zindex: 1000; - --bs-dropdown-min-width: 10rem; - --bs-dropdown-padding-x: 0; - --bs-dropdown-padding-y: 0.5rem; - --bs-dropdown-spacer: 0.125rem; - --bs-dropdown-font-size: 1rem; - --bs-dropdown-color: var(--bs-body-color); - --bs-dropdown-bg: var(--bs-body-bg); - --bs-dropdown-border-color: var(--bs-border-color-translucent); - --bs-dropdown-border-radius: var(--bs-border-radius); - --bs-dropdown-border-width: var(--bs-border-width); - --bs-dropdown-inner-border-radius: calc(var(--bs-border-radius) - var(--bs-border-width)); - --bs-dropdown-divider-bg: var(--bs-border-color-translucent); - --bs-dropdown-divider-margin-y: 0.5rem; - --bs-dropdown-box-shadow: var(--bs-box-shadow); - --bs-dropdown-link-color: var(--bs-body-color); - --bs-dropdown-link-hover-color: var(--bs-body-color); - --bs-dropdown-link-hover-bg: var(--bs-tertiary-bg); - --bs-dropdown-link-active-color: #fff; - --bs-dropdown-link-active-bg: #0d6efd; - --bs-dropdown-link-disabled-color: var(--bs-tertiary-color); - --bs-dropdown-item-padding-x: 1rem; - --bs-dropdown-item-padding-y: 0.25rem; - --bs-dropdown-header-color: #6c757d; - --bs-dropdown-header-padding-x: 1rem; - --bs-dropdown-header-padding-y: 0.5rem; - position: absolute; - z-index: var(--bs-dropdown-zindex); - display: none; - min-width: var(--bs-dropdown-min-width); - padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x); - margin: 0; - font-size: var(--bs-dropdown-font-size); - color: var(--bs-dropdown-color); - text-align: left; - list-style: none; - background-color: var(--bs-dropdown-bg); - background-clip: padding-box; - border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color); - border-radius: var(--bs-dropdown-border-radius); } - .dropdown-menu[data-bs-popper] { - top: 100%; - left: 0; - margin-top: var(--bs-dropdown-spacer); } - -.dropdown-menu-start { - --bs-position: start; } - .dropdown-menu-start[data-bs-popper] { - right: auto; - left: 0; } - -.dropdown-menu-end { - --bs-position: end; } - .dropdown-menu-end[data-bs-popper] { - right: 0; - left: auto; } - -@media (min-width: 576px) { - .dropdown-menu-sm-start { - --bs-position: start; } - .dropdown-menu-sm-start[data-bs-popper] { - right: auto; - left: 0; } - .dropdown-menu-sm-end { - --bs-position: end; } - .dropdown-menu-sm-end[data-bs-popper] { - right: 0; - left: auto; } } - -@media (min-width: 768px) { - .dropdown-menu-md-start { - --bs-position: start; } - .dropdown-menu-md-start[data-bs-popper] { - right: auto; - left: 0; } - .dropdown-menu-md-end { - --bs-position: end; } - .dropdown-menu-md-end[data-bs-popper] { - right: 0; - left: auto; } } - -@media (min-width: 992px) { - .dropdown-menu-lg-start { - --bs-position: start; } - .dropdown-menu-lg-start[data-bs-popper] { - right: auto; - left: 0; } - .dropdown-menu-lg-end { - --bs-position: end; } - .dropdown-menu-lg-end[data-bs-popper] { - right: 0; - left: auto; } } - -@media (min-width: 1200px) { - .dropdown-menu-xl-start { - --bs-position: start; } - .dropdown-menu-xl-start[data-bs-popper] { - right: auto; - left: 0; } - .dropdown-menu-xl-end { - --bs-position: end; } - .dropdown-menu-xl-end[data-bs-popper] { - right: 0; - left: auto; } } - -@media (min-width: 1400px) { - .dropdown-menu-xxl-start { - --bs-position: start; } - .dropdown-menu-xxl-start[data-bs-popper] { - right: auto; - left: 0; } - .dropdown-menu-xxl-end { - --bs-position: end; } - .dropdown-menu-xxl-end[data-bs-popper] { - right: 0; - left: auto; } } - -.dropup .dropdown-menu[data-bs-popper] { - top: auto; - bottom: 100%; - margin-top: 0; - margin-bottom: var(--bs-dropdown-spacer); } - -.dropup .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0; - border-right: 0.3em solid transparent; - border-bottom: 0.3em solid; - border-left: 0.3em solid transparent; } - -.dropup .dropdown-toggle:empty::after { - margin-left: 0; } - -.dropend .dropdown-menu[data-bs-popper] { - top: 0; - right: auto; - left: 100%; - margin-top: 0; - margin-left: var(--bs-dropdown-spacer); } - -.dropend .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid transparent; - border-right: 0; - border-bottom: 0.3em solid transparent; - border-left: 0.3em solid; } - -.dropend .dropdown-toggle:empty::after { - margin-left: 0; } - -.dropend .dropdown-toggle::after { - vertical-align: 0; } - -.dropstart .dropdown-menu[data-bs-popper] { - top: 0; - right: 100%; - left: auto; - margin-top: 0; - margin-right: var(--bs-dropdown-spacer); } - -.dropstart .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; } - -.dropstart .dropdown-toggle::after { - display: none; } - -.dropstart .dropdown-toggle::before { - display: inline-block; - margin-right: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid transparent; - border-right: 0.3em solid; - border-bottom: 0.3em solid transparent; } - -.dropstart .dropdown-toggle:empty::after { - margin-left: 0; } - -.dropstart .dropdown-toggle::before { - vertical-align: 0; } - -.dropdown-divider { - height: 0; - margin: var(--bs-dropdown-divider-margin-y) 0; - overflow: hidden; - border-top: 1px solid var(--bs-dropdown-divider-bg); - opacity: 1; } - -.dropdown-item { - display: block; - width: 100%; - padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); - clear: both; - font-weight: 400; - color: var(--bs-dropdown-link-color); - text-align: inherit; - text-decoration: none; - white-space: nowrap; - background-color: transparent; - border: 0; - border-radius: var(--bs-dropdown-item-border-radius, 0); } - .dropdown-item:hover, .dropdown-item:focus { - color: var(--bs-dropdown-link-hover-color); - background-color: var(--bs-dropdown-link-hover-bg); } - .dropdown-item.active, .dropdown-item:active { - color: var(--bs-dropdown-link-active-color); - text-decoration: none; - background-color: var(--bs-dropdown-link-active-bg); } - .dropdown-item.disabled, .dropdown-item:disabled { - color: var(--bs-dropdown-link-disabled-color); - pointer-events: none; - background-color: transparent; } - -.dropdown-menu.show { - display: block; } - -.dropdown-header { - display: block; - padding: var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x); - margin-bottom: 0; - font-size: 0.875rem; - color: var(--bs-dropdown-header-color); - white-space: nowrap; } - -.dropdown-item-text { - display: block; - padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); - color: var(--bs-dropdown-link-color); } - -.dropdown-menu-dark { - --bs-dropdown-color: #dee2e6; - --bs-dropdown-bg: #343a40; - --bs-dropdown-border-color: var(--bs-border-color-translucent); - --bs-dropdown-box-shadow: ; - --bs-dropdown-link-color: #dee2e6; - --bs-dropdown-link-hover-color: #fff; - --bs-dropdown-divider-bg: var(--bs-border-color-translucent); - --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.15); - --bs-dropdown-link-active-color: #fff; - --bs-dropdown-link-active-bg: #0d6efd; - --bs-dropdown-link-disabled-color: #adb5bd; - --bs-dropdown-header-color: #adb5bd; } - -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-flex; - vertical-align: middle; } - .btn-group > .btn, - .btn-group-vertical > .btn { - position: relative; - flex: 1 1 auto; } - .btn-group > .btn-check:checked + .btn, - .btn-group > .btn-check:focus + .btn, - .btn-group > .btn:hover, - .btn-group > .btn:focus, - .btn-group > .btn:active, - .btn-group > .btn.active, - .btn-group-vertical > .btn-check:checked + .btn, - .btn-group-vertical > .btn-check:focus + .btn, - .btn-group-vertical > .btn:hover, - .btn-group-vertical > .btn:focus, - .btn-group-vertical > .btn:active, - .btn-group-vertical > .btn.active { - z-index: 1; } - -.btn-toolbar { - display: flex; - flex-wrap: wrap; - justify-content: flex-start; } - .btn-toolbar .input-group { - width: auto; } - -.btn-group { - border-radius: var(--bs-border-radius); } - .btn-group > :not(.btn-check:first-child) + .btn, - .btn-group > .btn-group:not(:first-child) { - margin-left: calc(-1 * var(--bs-border-width)); } - .btn-group > .btn:not(:last-child):not(.dropdown-toggle), - .btn-group > .btn.dropdown-toggle-split:first-child, - .btn-group > .btn-group:not(:last-child) > .btn { - border-top-right-radius: 0; - border-bottom-right-radius: 0; } - .btn-group > .btn:nth-child(n + 3), - .btn-group > :not(.btn-check) + .btn, - .btn-group > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - -.dropdown-toggle-split { - padding-right: 0.5625rem; - padding-left: 0.5625rem; } - .dropdown-toggle-split::after, .dropup .dropdown-toggle-split::after, .dropend .dropdown-toggle-split::after { - margin-left: 0; } - .dropstart .dropdown-toggle-split::before { - margin-right: 0; } - -.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split { - padding-right: 0.375rem; - padding-left: 0.375rem; } - -.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split { - padding-right: 0.75rem; - padding-left: 0.75rem; } - -.btn-group-vertical { - flex-direction: column; - align-items: flex-start; - justify-content: center; } - .btn-group-vertical > .btn, - .btn-group-vertical > .btn-group { - width: 100%; } - .btn-group-vertical > .btn:not(:first-child), - .btn-group-vertical > .btn-group:not(:first-child) { - margin-top: calc(-1 * var(--bs-border-width)); } - .btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), - .btn-group-vertical > .btn-group:not(:last-child) > .btn { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; } - .btn-group-vertical > .btn:nth-child(n + 3), - .btn-group-vertical > :not(.btn-check) + .btn, - .btn-group-vertical > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-top-right-radius: 0; } - -.nav { - --bs-nav-link-padding-x: 1rem; - --bs-nav-link-padding-y: 0.5rem; - --bs-nav-link-font-weight: ; - --bs-nav-link-color: var(--bs-link-color); - --bs-nav-link-hover-color: var(--bs-link-hover-color); - --bs-nav-link-disabled-color: var(--bs-secondary-color); - display: flex; - flex-wrap: wrap; - padding-left: 0; - margin-bottom: 0; - list-style: none; } - -.nav-link { - display: block; - padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); - font-size: var(--bs-nav-link-font-size); - font-weight: var(--bs-nav-link-font-weight); - color: var(--bs-nav-link-color); - text-decoration: none; - background: none; - border: 0; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .nav-link { - transition: none; } } - .nav-link:hover, .nav-link:focus { - color: var(--bs-nav-link-hover-color); } - .nav-link:focus-visible { - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); } - .nav-link.disabled, .nav-link:disabled { - color: var(--bs-nav-link-disabled-color); - pointer-events: none; - cursor: default; } - -.nav-tabs { - --bs-nav-tabs-border-width: var(--bs-border-width); - --bs-nav-tabs-border-color: var(--bs-border-color); - --bs-nav-tabs-border-radius: var(--bs-border-radius); - --bs-nav-tabs-link-hover-border-color: var(--bs-secondary-bg) var(--bs-secondary-bg) var(--bs-border-color); - --bs-nav-tabs-link-active-color: var(--bs-emphasis-color); - --bs-nav-tabs-link-active-bg: var(--bs-body-bg); - --bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg); - border-bottom: var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color); } - .nav-tabs .nav-link { - margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width)); - border: var(--bs-nav-tabs-border-width) solid transparent; - border-top-left-radius: var(--bs-nav-tabs-border-radius); - border-top-right-radius: var(--bs-nav-tabs-border-radius); } - .nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus { - isolation: isolate; - border-color: var(--bs-nav-tabs-link-hover-border-color); } - .nav-tabs .nav-link.active, - .nav-tabs .nav-item.show .nav-link { - color: var(--bs-nav-tabs-link-active-color); - background-color: var(--bs-nav-tabs-link-active-bg); - border-color: var(--bs-nav-tabs-link-active-border-color); } - .nav-tabs .dropdown-menu { - margin-top: calc(-1 * var(--bs-nav-tabs-border-width)); - border-top-left-radius: 0; - border-top-right-radius: 0; } - -.nav-pills { - --bs-nav-pills-border-radius: var(--bs-border-radius); - --bs-nav-pills-link-active-color: #fff; - --bs-nav-pills-link-active-bg: #0d6efd; } - .nav-pills .nav-link { - border-radius: var(--bs-nav-pills-border-radius); } - .nav-pills .nav-link.active, - .nav-pills .show > .nav-link { - color: var(--bs-nav-pills-link-active-color); - background-color: var(--bs-nav-pills-link-active-bg); } - -.nav-underline { - --bs-nav-underline-gap: 1rem; - --bs-nav-underline-border-width: 0.125rem; - --bs-nav-underline-link-active-color: var(--bs-emphasis-color); - gap: var(--bs-nav-underline-gap); } - .nav-underline .nav-link { - padding-right: 0; - padding-left: 0; - border-bottom: var(--bs-nav-underline-border-width) solid transparent; } - .nav-underline .nav-link:hover, .nav-underline .nav-link:focus { - border-bottom-color: currentcolor; } - .nav-underline .nav-link.active, - .nav-underline .show > .nav-link { - font-weight: 700; - color: var(--bs-nav-underline-link-active-color); - border-bottom-color: currentcolor; } - -.nav-fill > .nav-link, -.nav-fill .nav-item { - flex: 1 1 auto; - text-align: center; } - -.nav-justified > .nav-link, -.nav-justified .nav-item { - flex-grow: 1; - flex-basis: 0; - text-align: center; } - -.nav-fill .nav-item .nav-link, -.nav-justified .nav-item .nav-link { - width: 100%; } - -.tab-content > .tab-pane { - display: none; } - -.tab-content > .active { - display: block; } - -.navbar { - --bs-navbar-padding-x: 0; - --bs-navbar-padding-y: 0.5rem; - --bs-navbar-color: rgba(var(--bs-emphasis-color-rgb), 0.65); - --bs-navbar-hover-color: rgba(var(--bs-emphasis-color-rgb), 0.8); - --bs-navbar-disabled-color: rgba(var(--bs-emphasis-color-rgb), 0.3); - --bs-navbar-active-color: rgba(var(--bs-emphasis-color-rgb), 1); - --bs-navbar-brand-padding-y: 0.3125rem; - --bs-navbar-brand-margin-end: 1rem; - --bs-navbar-brand-font-size: 1.25rem; - --bs-navbar-brand-color: rgba(var(--bs-emphasis-color-rgb), 1); - --bs-navbar-brand-hover-color: rgba(var(--bs-emphasis-color-rgb), 1); - --bs-navbar-nav-link-padding-x: 0.5rem; - --bs-navbar-toggler-padding-y: 0.25rem; - --bs-navbar-toggler-padding-x: 0.75rem; - --bs-navbar-toggler-font-size: 1.25rem; - --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); - --bs-navbar-toggler-border-color: rgba(var(--bs-emphasis-color-rgb), 0.15); - --bs-navbar-toggler-border-radius: var(--bs-border-radius); - --bs-navbar-toggler-focus-width: 0.25rem; - --bs-navbar-toggler-transition: box-shadow 0.15s ease-in-out; - position: relative; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: space-between; - padding: var(--bs-navbar-padding-y) var(--bs-navbar-padding-x); } - .navbar > .container, - .navbar > .container-fluid, - .navbar > .container-sm, - .navbar > .container-md, - .navbar > .container-lg, - .navbar > .container-xl, - .navbar > .container-xxl { - display: flex; - flex-wrap: inherit; - align-items: center; - justify-content: space-between; } - -.navbar-brand { - padding-top: var(--bs-navbar-brand-padding-y); - padding-bottom: var(--bs-navbar-brand-padding-y); - margin-right: var(--bs-navbar-brand-margin-end); - font-size: var(--bs-navbar-brand-font-size); - color: var(--bs-navbar-brand-color); - text-decoration: none; - white-space: nowrap; } - .navbar-brand:hover, .navbar-brand:focus { - color: var(--bs-navbar-brand-hover-color); } - -.navbar-nav { - --bs-nav-link-padding-x: 0; - --bs-nav-link-padding-y: 0.5rem; - --bs-nav-link-font-weight: ; - --bs-nav-link-color: var(--bs-navbar-color); - --bs-nav-link-hover-color: var(--bs-navbar-hover-color); - --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color); - display: flex; - flex-direction: column; - padding-left: 0; - margin-bottom: 0; - list-style: none; } - .navbar-nav .nav-link.active, .navbar-nav .nav-link.show { - color: var(--bs-navbar-active-color); } - .navbar-nav .dropdown-menu { - position: static; } - -.navbar-text { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - color: var(--bs-navbar-color); } - .navbar-text a, - .navbar-text a:hover, - .navbar-text a:focus { - color: var(--bs-navbar-active-color); } - -.navbar-collapse { - flex-grow: 1; - flex-basis: 100%; - align-items: center; } - -.navbar-toggler { - padding: var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x); - font-size: var(--bs-navbar-toggler-font-size); - line-height: 1; - color: var(--bs-navbar-color); - background-color: transparent; - border: var(--bs-border-width) solid var(--bs-navbar-toggler-border-color); - border-radius: var(--bs-navbar-toggler-border-radius); - transition: var(--bs-navbar-toggler-transition); } - @media (prefers-reduced-motion: reduce) { - .navbar-toggler { - transition: none; } } - .navbar-toggler:hover { - text-decoration: none; } - .navbar-toggler:focus { - text-decoration: none; - outline: 0; - box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); } - -.navbar-toggler-icon { - display: inline-block; - width: 1.5em; - height: 1.5em; - vertical-align: middle; - background-image: var(--bs-navbar-toggler-icon-bg); - background-repeat: no-repeat; - background-position: center; - background-size: 100%; } - -.navbar-nav-scroll { - max-height: var(--bs-scroll-height, 75vh); - overflow-y: auto; } - -@media (min-width: 576px) { - .navbar-expand-sm { - flex-wrap: nowrap; - justify-content: flex-start; } - .navbar-expand-sm .navbar-nav { - flex-direction: row; } - .navbar-expand-sm .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand-sm .navbar-nav .nav-link { - padding-right: var(--bs-navbar-nav-link-padding-x); - padding-left: var(--bs-navbar-nav-link-padding-x); } - .navbar-expand-sm .navbar-nav-scroll { - overflow: visible; } - .navbar-expand-sm .navbar-collapse { - display: flex !important; - flex-basis: auto; } - .navbar-expand-sm .navbar-toggler { - display: none; } - .navbar-expand-sm .offcanvas { - position: static; - z-index: auto; - flex-grow: 1; - width: auto !important; - height: auto !important; - visibility: visible !important; - background-color: transparent !important; - border: 0 !important; - transform: none !important; - transition: none; } - .navbar-expand-sm .offcanvas .offcanvas-header { - display: none; } - .navbar-expand-sm .offcanvas .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; } } - -@media (min-width: 768px) { - .navbar-expand-md { - flex-wrap: nowrap; - justify-content: flex-start; } - .navbar-expand-md .navbar-nav { - flex-direction: row; } - .navbar-expand-md .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand-md .navbar-nav .nav-link { - padding-right: var(--bs-navbar-nav-link-padding-x); - padding-left: var(--bs-navbar-nav-link-padding-x); } - .navbar-expand-md .navbar-nav-scroll { - overflow: visible; } - .navbar-expand-md .navbar-collapse { - display: flex !important; - flex-basis: auto; } - .navbar-expand-md .navbar-toggler { - display: none; } - .navbar-expand-md .offcanvas { - position: static; - z-index: auto; - flex-grow: 1; - width: auto !important; - height: auto !important; - visibility: visible !important; - background-color: transparent !important; - border: 0 !important; - transform: none !important; - transition: none; } - .navbar-expand-md .offcanvas .offcanvas-header { - display: none; } - .navbar-expand-md .offcanvas .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; } } - -@media (min-width: 992px) { - .navbar-expand-lg { - flex-wrap: nowrap; - justify-content: flex-start; } - .navbar-expand-lg .navbar-nav { - flex-direction: row; } - .navbar-expand-lg .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand-lg .navbar-nav .nav-link { - padding-right: var(--bs-navbar-nav-link-padding-x); - padding-left: var(--bs-navbar-nav-link-padding-x); } - .navbar-expand-lg .navbar-nav-scroll { - overflow: visible; } - .navbar-expand-lg .navbar-collapse { - display: flex !important; - flex-basis: auto; } - .navbar-expand-lg .navbar-toggler { - display: none; } - .navbar-expand-lg .offcanvas { - position: static; - z-index: auto; - flex-grow: 1; - width: auto !important; - height: auto !important; - visibility: visible !important; - background-color: transparent !important; - border: 0 !important; - transform: none !important; - transition: none; } - .navbar-expand-lg .offcanvas .offcanvas-header { - display: none; } - .navbar-expand-lg .offcanvas .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; } } - -@media (min-width: 1200px) { - .navbar-expand-xl { - flex-wrap: nowrap; - justify-content: flex-start; } - .navbar-expand-xl .navbar-nav { - flex-direction: row; } - .navbar-expand-xl .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand-xl .navbar-nav .nav-link { - padding-right: var(--bs-navbar-nav-link-padding-x); - padding-left: var(--bs-navbar-nav-link-padding-x); } - .navbar-expand-xl .navbar-nav-scroll { - overflow: visible; } - .navbar-expand-xl .navbar-collapse { - display: flex !important; - flex-basis: auto; } - .navbar-expand-xl .navbar-toggler { - display: none; } - .navbar-expand-xl .offcanvas { - position: static; - z-index: auto; - flex-grow: 1; - width: auto !important; - height: auto !important; - visibility: visible !important; - background-color: transparent !important; - border: 0 !important; - transform: none !important; - transition: none; } - .navbar-expand-xl .offcanvas .offcanvas-header { - display: none; } - .navbar-expand-xl .offcanvas .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; } } - -@media (min-width: 1400px) { - .navbar-expand-xxl { - flex-wrap: nowrap; - justify-content: flex-start; } - .navbar-expand-xxl .navbar-nav { - flex-direction: row; } - .navbar-expand-xxl .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand-xxl .navbar-nav .nav-link { - padding-right: var(--bs-navbar-nav-link-padding-x); - padding-left: var(--bs-navbar-nav-link-padding-x); } - .navbar-expand-xxl .navbar-nav-scroll { - overflow: visible; } - .navbar-expand-xxl .navbar-collapse { - display: flex !important; - flex-basis: auto; } - .navbar-expand-xxl .navbar-toggler { - display: none; } - .navbar-expand-xxl .offcanvas { - position: static; - z-index: auto; - flex-grow: 1; - width: auto !important; - height: auto !important; - visibility: visible !important; - background-color: transparent !important; - border: 0 !important; - transform: none !important; - transition: none; } - .navbar-expand-xxl .offcanvas .offcanvas-header { - display: none; } - .navbar-expand-xxl .offcanvas .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; } } - -.navbar-expand { - flex-wrap: nowrap; - justify-content: flex-start; } - .navbar-expand .navbar-nav { - flex-direction: row; } - .navbar-expand .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand .navbar-nav .nav-link { - padding-right: var(--bs-navbar-nav-link-padding-x); - padding-left: var(--bs-navbar-nav-link-padding-x); } - .navbar-expand .navbar-nav-scroll { - overflow: visible; } - .navbar-expand .navbar-collapse { - display: flex !important; - flex-basis: auto; } - .navbar-expand .navbar-toggler { - display: none; } - .navbar-expand .offcanvas { - position: static; - z-index: auto; - flex-grow: 1; - width: auto !important; - height: auto !important; - visibility: visible !important; - background-color: transparent !important; - border: 0 !important; - transform: none !important; - transition: none; } - .navbar-expand .offcanvas .offcanvas-header { - display: none; } - .navbar-expand .offcanvas .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; } - -.navbar-dark, -.navbar[data-bs-theme="dark"] { - --bs-navbar-color: rgba(255, 255, 255, 0.55); - --bs-navbar-hover-color: rgba(255, 255, 255, 0.75); - --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25); - --bs-navbar-active-color: #fff; - --bs-navbar-brand-color: #fff; - --bs-navbar-brand-hover-color: #fff; - --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.1); - --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); } - -[data-bs-theme="dark"] .navbar-toggler-icon { - --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); } - -.card { - --bs-card-spacer-y: 1rem; - --bs-card-spacer-x: 1rem; - --bs-card-title-spacer-y: 0.5rem; - --bs-card-title-color: ; - --bs-card-subtitle-color: ; - --bs-card-border-width: var(--bs-border-width); - --bs-card-border-color: var(--bs-border-color-translucent); - --bs-card-border-radius: var(--bs-border-radius); - --bs-card-box-shadow: ; - --bs-card-inner-border-radius: calc(var(--bs-border-radius) - (var(--bs-border-width))); - --bs-card-cap-padding-y: 0.5rem; - --bs-card-cap-padding-x: 1rem; - --bs-card-cap-bg: rgba(var(--bs-body-color-rgb), 0.03); - --bs-card-cap-color: ; - --bs-card-height: ; - --bs-card-color: ; - --bs-card-bg: var(--bs-body-bg); - --bs-card-img-overlay-padding: 1rem; - --bs-card-group-margin: 0.75rem; - position: relative; - display: flex; - flex-direction: column; - min-width: 0; - height: var(--bs-card-height); - color: var(--bs-body-color); - word-wrap: break-word; - background-color: var(--bs-card-bg); - background-clip: border-box; - border: var(--bs-card-border-width) solid var(--bs-card-border-color); - border-radius: var(--bs-card-border-radius); } - .card > hr { - margin-right: 0; - margin-left: 0; } - .card > .list-group { - border-top: inherit; - border-bottom: inherit; } - .card > .list-group:first-child { - border-top-width: 0; - border-top-left-radius: var(--bs-card-inner-border-radius); - border-top-right-radius: var(--bs-card-inner-border-radius); } - .card > .list-group:last-child { - border-bottom-width: 0; - border-bottom-right-radius: var(--bs-card-inner-border-radius); - border-bottom-left-radius: var(--bs-card-inner-border-radius); } - .card > .card-header + .list-group, - .card > .list-group + .card-footer { - border-top: 0; } - -.card-body { - flex: 1 1 auto; - padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); - color: var(--bs-card-color); } - -.card-title { - margin-bottom: var(--bs-card-title-spacer-y); - color: var(--bs-card-title-color); } - -.card-subtitle { - margin-top: calc(-.5 * var(--bs-card-title-spacer-y)); - margin-bottom: 0; - color: var(--bs-card-subtitle-color); } - -.card-text:last-child { - margin-bottom: 0; } - -.card-link + .card-link { - margin-left: var(--bs-card-spacer-x); } - -.card-header { - padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); - margin-bottom: 0; - color: var(--bs-card-cap-color); - background-color: var(--bs-card-cap-bg); - border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); } - .card-header:first-child { - border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; } - -.card-footer { - padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); - color: var(--bs-card-cap-color); - background-color: var(--bs-card-cap-bg); - border-top: var(--bs-card-border-width) solid var(--bs-card-border-color); } - .card-footer:last-child { - border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius); } - -.card-header-tabs { - margin-right: calc(-.5 * var(--bs-card-cap-padding-x)); - margin-bottom: calc(-1 * var(--bs-card-cap-padding-y)); - margin-left: calc(-.5 * var(--bs-card-cap-padding-x)); - border-bottom: 0; } - .card-header-tabs .nav-link.active { - background-color: var(--bs-card-bg); - border-bottom-color: var(--bs-card-bg); } - -.card-header-pills { - margin-right: calc(-.5 * var(--bs-card-cap-padding-x)); - margin-left: calc(-.5 * var(--bs-card-cap-padding-x)); } - -.card-img-overlay { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - padding: var(--bs-card-img-overlay-padding); - border-radius: var(--bs-card-inner-border-radius); } - -.card-img, -.card-img-top, -.card-img-bottom { - width: 100%; } - -.card-img, -.card-img-top { - border-top-left-radius: var(--bs-card-inner-border-radius); - border-top-right-radius: var(--bs-card-inner-border-radius); } - -.card-img, -.card-img-bottom { - border-bottom-right-radius: var(--bs-card-inner-border-radius); - border-bottom-left-radius: var(--bs-card-inner-border-radius); } - -.card-group > .card { - margin-bottom: var(--bs-card-group-margin); } - -@media (min-width: 576px) { - .card-group { - display: flex; - flex-flow: row wrap; } - .card-group > .card { - flex: 1 0 0; - margin-bottom: 0; } - .card-group > .card + .card { - margin-left: 0; - border-left: 0; } - .card-group > .card:not(:last-child) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; } - .card-group > .card:not(:last-child) > .card-img-top, - .card-group > .card:not(:last-child) > .card-header { - border-top-right-radius: 0; } - .card-group > .card:not(:last-child) > .card-img-bottom, - .card-group > .card:not(:last-child) > .card-footer { - border-bottom-right-radius: 0; } - .card-group > .card:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - .card-group > .card:not(:first-child) > .card-img-top, - .card-group > .card:not(:first-child) > .card-header { - border-top-left-radius: 0; } - .card-group > .card:not(:first-child) > .card-img-bottom, - .card-group > .card:not(:first-child) > .card-footer { - border-bottom-left-radius: 0; } } - -.accordion { - --bs-accordion-color: var(--bs-body-color); - --bs-accordion-bg: var(--bs-body-bg); - --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease; - --bs-accordion-border-color: var(--bs-border-color); - --bs-accordion-border-width: var(--bs-border-width); - --bs-accordion-border-radius: var(--bs-border-radius); - --bs-accordion-inner-border-radius: calc(var(--bs-border-radius) - (var(--bs-border-width))); - --bs-accordion-btn-padding-x: 1.25rem; - --bs-accordion-btn-padding-y: 1rem; - --bs-accordion-btn-color: var(--bs-body-color); - --bs-accordion-btn-bg: var(--bs-accordion-bg); - --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); - --bs-accordion-btn-icon-width: 1.25rem; - --bs-accordion-btn-icon-transform: rotate(-180deg); - --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; - --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23052c65' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); - --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); - --bs-accordion-body-padding-x: 1.25rem; - --bs-accordion-body-padding-y: 1rem; - --bs-accordion-active-color: var(--bs-primary-text-emphasis); - --bs-accordion-active-bg: var(--bs-primary-bg-subtle); } - -.accordion-button { - position: relative; - display: flex; - align-items: center; - width: 100%; - padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x); - font-size: 1rem; - color: var(--bs-accordion-btn-color); - text-align: left; - background-color: var(--bs-accordion-btn-bg); - border: 0; - border-radius: 0; - overflow-anchor: none; - transition: var(--bs-accordion-transition); } - @media (prefers-reduced-motion: reduce) { - .accordion-button { - transition: none; } } - .accordion-button:not(.collapsed) { - color: var(--bs-accordion-active-color); - background-color: var(--bs-accordion-active-bg); - box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color); } - .accordion-button:not(.collapsed)::after { - background-image: var(--bs-accordion-btn-active-icon); - transform: var(--bs-accordion-btn-icon-transform); } - .accordion-button::after { - flex-shrink: 0; - width: var(--bs-accordion-btn-icon-width); - height: var(--bs-accordion-btn-icon-width); - margin-left: auto; - content: ""; - background-image: var(--bs-accordion-btn-icon); - background-repeat: no-repeat; - background-size: var(--bs-accordion-btn-icon-width); - transition: var(--bs-accordion-btn-icon-transition); } - @media (prefers-reduced-motion: reduce) { - .accordion-button::after { - transition: none; } } - .accordion-button:hover { - z-index: 2; } - .accordion-button:focus { - z-index: 3; - outline: 0; - box-shadow: var(--bs-accordion-btn-focus-box-shadow); } - -.accordion-header { - margin-bottom: 0; } - -.accordion-item { - color: var(--bs-accordion-color); - background-color: var(--bs-accordion-bg); - border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color); } - .accordion-item:first-of-type { - border-top-left-radius: var(--bs-accordion-border-radius); - border-top-right-radius: var(--bs-accordion-border-radius); } - .accordion-item:first-of-type > .accordion-header .accordion-button { - border-top-left-radius: var(--bs-accordion-inner-border-radius); - border-top-right-radius: var(--bs-accordion-inner-border-radius); } - .accordion-item:not(:first-of-type) { - border-top: 0; } - .accordion-item:last-of-type { - border-bottom-right-radius: var(--bs-accordion-border-radius); - border-bottom-left-radius: var(--bs-accordion-border-radius); } - .accordion-item:last-of-type > .accordion-header .accordion-button.collapsed { - border-bottom-right-radius: var(--bs-accordion-inner-border-radius); - border-bottom-left-radius: var(--bs-accordion-inner-border-radius); } - .accordion-item:last-of-type > .accordion-collapse { - border-bottom-right-radius: var(--bs-accordion-border-radius); - border-bottom-left-radius: var(--bs-accordion-border-radius); } - -.accordion-body { - padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); } - -.accordion-flush > .accordion-item { - border-right: 0; - border-left: 0; - border-radius: 0; } - .accordion-flush > .accordion-item:first-child { - border-top: 0; } - .accordion-flush > .accordion-item:last-child { - border-bottom: 0; } - .accordion-flush > .accordion-item > .accordion-collapse, - .accordion-flush > .accordion-item > .accordion-header .accordion-button, - .accordion-flush > .accordion-item > .accordion-header .accordion-button.collapsed { - border-radius: 0; } - -[data-bs-theme="dark"] .accordion-button::after { - --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236ea8fe'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e"); - --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236ea8fe'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e"); } - -.breadcrumb { - --bs-breadcrumb-padding-x: 0; - --bs-breadcrumb-padding-y: 0; - --bs-breadcrumb-margin-bottom: 1rem; - --bs-breadcrumb-bg: ; - --bs-breadcrumb-border-radius: ; - --bs-breadcrumb-divider-color: var(--bs-secondary-color); - --bs-breadcrumb-item-padding-x: 0.5rem; - --bs-breadcrumb-item-active-color: var(--bs-secondary-color); - display: flex; - flex-wrap: wrap; - padding: var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x); - margin-bottom: var(--bs-breadcrumb-margin-bottom); - font-size: var(--bs-breadcrumb-font-size); - list-style: none; - background-color: var(--bs-breadcrumb-bg); - border-radius: var(--bs-breadcrumb-border-radius); } - -.breadcrumb-item + .breadcrumb-item { - padding-left: var(--bs-breadcrumb-item-padding-x); } - .breadcrumb-item + .breadcrumb-item::before { - float: left; - padding-right: var(--bs-breadcrumb-item-padding-x); - color: var(--bs-breadcrumb-divider-color); - content: var(--bs-breadcrumb-divider, "/") /* rtl: var(--bs-breadcrumb-divider, "/") */; } - -.breadcrumb-item.active { - color: var(--bs-breadcrumb-item-active-color); } - -.pagination { - --bs-pagination-padding-x: 0.75rem; - --bs-pagination-padding-y: 0.375rem; - --bs-pagination-font-size: 1rem; - --bs-pagination-color: var(--bs-link-color); - --bs-pagination-bg: var(--bs-body-bg); - --bs-pagination-border-width: var(--bs-border-width); - --bs-pagination-border-color: var(--bs-border-color); - --bs-pagination-border-radius: var(--bs-border-radius); - --bs-pagination-hover-color: var(--bs-link-hover-color); - --bs-pagination-hover-bg: var(--bs-tertiary-bg); - --bs-pagination-hover-border-color: var(--bs-border-color); - --bs-pagination-focus-color: var(--bs-link-hover-color); - --bs-pagination-focus-bg: var(--bs-secondary-bg); - --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); - --bs-pagination-active-color: #fff; - --bs-pagination-active-bg: #0d6efd; - --bs-pagination-active-border-color: #0d6efd; - --bs-pagination-disabled-color: var(--bs-secondary-color); - --bs-pagination-disabled-bg: var(--bs-secondary-bg); - --bs-pagination-disabled-border-color: var(--bs-border-color); - display: flex; - padding-left: 0; - list-style: none; } - -.page-link { - position: relative; - display: block; - padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); - font-size: var(--bs-pagination-font-size); - color: var(--bs-pagination-color); - text-decoration: none; - background-color: var(--bs-pagination-bg); - border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color); - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .page-link { - transition: none; } } - .page-link:hover { - z-index: 2; - color: var(--bs-pagination-hover-color); - background-color: var(--bs-pagination-hover-bg); - border-color: var(--bs-pagination-hover-border-color); } - .page-link:focus { - z-index: 3; - color: var(--bs-pagination-focus-color); - background-color: var(--bs-pagination-focus-bg); - outline: 0; - box-shadow: var(--bs-pagination-focus-box-shadow); } - .page-link.active, .active > .page-link { - z-index: 3; - color: var(--bs-pagination-active-color); - background-color: var(--bs-pagination-active-bg); - border-color: var(--bs-pagination-active-border-color); } - .page-link.disabled, .disabled > .page-link { - color: var(--bs-pagination-disabled-color); - pointer-events: none; - background-color: var(--bs-pagination-disabled-bg); - border-color: var(--bs-pagination-disabled-border-color); } - -.page-item:not(:first-child) .page-link { - margin-left: calc(-1 * var(--bs-border-width)); } - -.page-item:first-child .page-link { - border-top-left-radius: var(--bs-pagination-border-radius); - border-bottom-left-radius: var(--bs-pagination-border-radius); } - -.page-item:last-child .page-link { - border-top-right-radius: var(--bs-pagination-border-radius); - border-bottom-right-radius: var(--bs-pagination-border-radius); } - -.pagination-lg { - --bs-pagination-padding-x: 1.5rem; - --bs-pagination-padding-y: 0.75rem; - --bs-pagination-font-size: 1.25rem; - --bs-pagination-border-radius: var(--bs-border-radius-lg); } - -.pagination-sm { - --bs-pagination-padding-x: 0.5rem; - --bs-pagination-padding-y: 0.25rem; - --bs-pagination-font-size: 0.875rem; - --bs-pagination-border-radius: var(--bs-border-radius-sm); } - -.badge { - --bs-badge-padding-x: 0.65em; - --bs-badge-padding-y: 0.35em; - --bs-badge-font-size: 0.75em; - --bs-badge-font-weight: 700; - --bs-badge-color: #fff; - --bs-badge-border-radius: var(--bs-border-radius); - display: inline-block; - padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x); - font-size: var(--bs-badge-font-size); - font-weight: var(--bs-badge-font-weight); - line-height: 1; - color: var(--bs-badge-color); - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: var(--bs-badge-border-radius); } - .badge:empty { - display: none; } - -.btn .badge { - position: relative; - top: -1px; } - -.alert { - --bs-alert-bg: transparent; - --bs-alert-padding-x: 1rem; - --bs-alert-padding-y: 1rem; - --bs-alert-margin-bottom: 1rem; - --bs-alert-color: inherit; - --bs-alert-border-color: transparent; - --bs-alert-border: var(--bs-border-width) solid var(--bs-alert-border-color); - --bs-alert-border-radius: var(--bs-border-radius); - --bs-alert-link-color: inherit; - position: relative; - padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x); - margin-bottom: var(--bs-alert-margin-bottom); - color: var(--bs-alert-color); - background-color: var(--bs-alert-bg); - border: var(--bs-alert-border); - border-radius: var(--bs-alert-border-radius); } - -.alert-heading { - color: inherit; } - -.alert-link { - font-weight: 700; - color: var(--bs-alert-link-color); } - -.alert-dismissible { - padding-right: 3rem; } - .alert-dismissible .btn-close { - position: absolute; - top: 0; - right: 0; - z-index: 2; - padding: 1.25rem 1rem; } - -.alert-primary { - --bs-alert-color: var(--bs-primary-text-emphasis); - --bs-alert-bg: var(--bs-primary-bg-subtle); - --bs-alert-border-color: var(--bs-primary-border-subtle); - --bs-alert-link-color: var(--bs-primary-text-emphasis); } - -.alert-secondary { - --bs-alert-color: var(--bs-secondary-text-emphasis); - --bs-alert-bg: var(--bs-secondary-bg-subtle); - --bs-alert-border-color: var(--bs-secondary-border-subtle); - --bs-alert-link-color: var(--bs-secondary-text-emphasis); } - -.alert-success { - --bs-alert-color: var(--bs-success-text-emphasis); - --bs-alert-bg: var(--bs-success-bg-subtle); - --bs-alert-border-color: var(--bs-success-border-subtle); - --bs-alert-link-color: var(--bs-success-text-emphasis); } - -.alert-info { - --bs-alert-color: var(--bs-info-text-emphasis); - --bs-alert-bg: var(--bs-info-bg-subtle); - --bs-alert-border-color: var(--bs-info-border-subtle); - --bs-alert-link-color: var(--bs-info-text-emphasis); } - -.alert-warning { - --bs-alert-color: var(--bs-warning-text-emphasis); - --bs-alert-bg: var(--bs-warning-bg-subtle); - --bs-alert-border-color: var(--bs-warning-border-subtle); - --bs-alert-link-color: var(--bs-warning-text-emphasis); } - -.alert-danger { - --bs-alert-color: var(--bs-danger-text-emphasis); - --bs-alert-bg: var(--bs-danger-bg-subtle); - --bs-alert-border-color: var(--bs-danger-border-subtle); - --bs-alert-link-color: var(--bs-danger-text-emphasis); } - -.alert-light { - --bs-alert-color: var(--bs-light-text-emphasis); - --bs-alert-bg: var(--bs-light-bg-subtle); - --bs-alert-border-color: var(--bs-light-border-subtle); - --bs-alert-link-color: var(--bs-light-text-emphasis); } - -.alert-dark { - --bs-alert-color: var(--bs-dark-text-emphasis); - --bs-alert-bg: var(--bs-dark-bg-subtle); - --bs-alert-border-color: var(--bs-dark-border-subtle); - --bs-alert-link-color: var(--bs-dark-text-emphasis); } - -@keyframes progress-bar-stripes { - 0% { - background-position-x: var(--bs-progress-height); } } - -.progress, -.progress-stacked { - --bs-progress-height: 1rem; - --bs-progress-font-size: 0.75rem; - --bs-progress-bg: var(--bs-secondary-bg); - --bs-progress-border-radius: var(--bs-border-radius); - --bs-progress-box-shadow: var(--bs-box-shadow-inset); - --bs-progress-bar-color: #fff; - --bs-progress-bar-bg: #0d6efd; - --bs-progress-bar-transition: width 0.6s ease; - display: flex; - height: var(--bs-progress-height); - overflow: hidden; - font-size: var(--bs-progress-font-size); - background-color: var(--bs-progress-bg); - border-radius: var(--bs-progress-border-radius); } - -.progress-bar { - display: flex; - flex-direction: column; - justify-content: center; - overflow: hidden; - color: var(--bs-progress-bar-color); - text-align: center; - white-space: nowrap; - background-color: var(--bs-progress-bar-bg); - transition: var(--bs-progress-bar-transition); } - @media (prefers-reduced-motion: reduce) { - .progress-bar { - transition: none; } } -.progress-bar-striped { - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: var(--bs-progress-height) var(--bs-progress-height); } - -.progress-stacked > .progress { - overflow: visible; } - -.progress-stacked > .progress > .progress-bar { - width: 100%; } - -.progress-bar-animated { - animation: 1s linear infinite progress-bar-stripes; } - @media (prefers-reduced-motion: reduce) { - .progress-bar-animated { - animation: none; } } -.list-group { - --bs-list-group-color: var(--bs-body-color); - --bs-list-group-bg: var(--bs-body-bg); - --bs-list-group-border-color: var(--bs-border-color); - --bs-list-group-border-width: var(--bs-border-width); - --bs-list-group-border-radius: var(--bs-border-radius); - --bs-list-group-item-padding-x: 1rem; - --bs-list-group-item-padding-y: 0.5rem; - --bs-list-group-action-color: var(--bs-secondary-color); - --bs-list-group-action-hover-color: var(--bs-emphasis-color); - --bs-list-group-action-hover-bg: var(--bs-tertiary-bg); - --bs-list-group-action-active-color: var(--bs-body-color); - --bs-list-group-action-active-bg: var(--bs-secondary-bg); - --bs-list-group-disabled-color: var(--bs-secondary-color); - --bs-list-group-disabled-bg: var(--bs-body-bg); - --bs-list-group-active-color: #fff; - --bs-list-group-active-bg: #0d6efd; - --bs-list-group-active-border-color: #0d6efd; - display: flex; - flex-direction: column; - padding-left: 0; - margin-bottom: 0; - border-radius: var(--bs-list-group-border-radius); } - -.list-group-numbered { - list-style-type: none; - counter-reset: section; } - .list-group-numbered > .list-group-item::before { - content: counters(section, ".") ". "; - counter-increment: section; } - -.list-group-item { - position: relative; - display: block; - padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x); - color: var(--bs-list-group-color); - text-decoration: none; - background-color: var(--bs-list-group-bg); - border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color); } - .list-group-item:first-child { - border-top-left-radius: inherit; - border-top-right-radius: inherit; } - .list-group-item:last-child { - border-bottom-right-radius: inherit; - border-bottom-left-radius: inherit; } - .list-group-item.disabled, .list-group-item:disabled { - color: var(--bs-list-group-disabled-color); - pointer-events: none; - background-color: var(--bs-list-group-disabled-bg); } - .list-group-item.active { - z-index: 2; - color: var(--bs-list-group-active-color); - background-color: var(--bs-list-group-active-bg); - border-color: var(--bs-list-group-active-border-color); } - .list-group-item + .list-group-item { - border-top-width: 0; } - .list-group-item + .list-group-item.active { - margin-top: calc(-1 * var(--bs-list-group-border-width)); - border-top-width: var(--bs-list-group-border-width); } - -.list-group-item-action { - width: 100%; - color: var(--bs-list-group-action-color); - text-align: inherit; } - .list-group-item-action:not(.active):hover, .list-group-item-action:not(.active):focus { - z-index: 1; - color: var(--bs-list-group-action-hover-color); - text-decoration: none; - background-color: var(--bs-list-group-action-hover-bg); } - .list-group-item-action:not(.active):active { - color: var(--bs-list-group-action-active-color); - background-color: var(--bs-list-group-action-active-bg); } - -.list-group-horizontal { - flex-direction: row; } - .list-group-horizontal > .list-group-item:first-child:not(:last-child) { - border-bottom-left-radius: var(--bs-list-group-border-radius); - border-top-right-radius: 0; } - .list-group-horizontal > .list-group-item:last-child:not(:first-child) { - border-top-right-radius: var(--bs-list-group-border-radius); - border-bottom-left-radius: 0; } - .list-group-horizontal > .list-group-item.active { - margin-top: 0; } - .list-group-horizontal > .list-group-item + .list-group-item { - border-top-width: var(--bs-list-group-border-width); - border-left-width: 0; } - .list-group-horizontal > .list-group-item + .list-group-item.active { - margin-left: calc(-1 * var(--bs-list-group-border-width)); - border-left-width: var(--bs-list-group-border-width); } - -@media (min-width: 576px) { - .list-group-horizontal-sm { - flex-direction: row; } - .list-group-horizontal-sm > .list-group-item:first-child:not(:last-child) { - border-bottom-left-radius: var(--bs-list-group-border-radius); - border-top-right-radius: 0; } - .list-group-horizontal-sm > .list-group-item:last-child:not(:first-child) { - border-top-right-radius: var(--bs-list-group-border-radius); - border-bottom-left-radius: 0; } - .list-group-horizontal-sm > .list-group-item.active { - margin-top: 0; } - .list-group-horizontal-sm > .list-group-item + .list-group-item { - border-top-width: var(--bs-list-group-border-width); - border-left-width: 0; } - .list-group-horizontal-sm > .list-group-item + .list-group-item.active { - margin-left: calc(-1 * var(--bs-list-group-border-width)); - border-left-width: var(--bs-list-group-border-width); } } - -@media (min-width: 768px) { - .list-group-horizontal-md { - flex-direction: row; } - .list-group-horizontal-md > .list-group-item:first-child:not(:last-child) { - border-bottom-left-radius: var(--bs-list-group-border-radius); - border-top-right-radius: 0; } - .list-group-horizontal-md > .list-group-item:last-child:not(:first-child) { - border-top-right-radius: var(--bs-list-group-border-radius); - border-bottom-left-radius: 0; } - .list-group-horizontal-md > .list-group-item.active { - margin-top: 0; } - .list-group-horizontal-md > .list-group-item + .list-group-item { - border-top-width: var(--bs-list-group-border-width); - border-left-width: 0; } - .list-group-horizontal-md > .list-group-item + .list-group-item.active { - margin-left: calc(-1 * var(--bs-list-group-border-width)); - border-left-width: var(--bs-list-group-border-width); } } - -@media (min-width: 992px) { - .list-group-horizontal-lg { - flex-direction: row; } - .list-group-horizontal-lg > .list-group-item:first-child:not(:last-child) { - border-bottom-left-radius: var(--bs-list-group-border-radius); - border-top-right-radius: 0; } - .list-group-horizontal-lg > .list-group-item:last-child:not(:first-child) { - border-top-right-radius: var(--bs-list-group-border-radius); - border-bottom-left-radius: 0; } - .list-group-horizontal-lg > .list-group-item.active { - margin-top: 0; } - .list-group-horizontal-lg > .list-group-item + .list-group-item { - border-top-width: var(--bs-list-group-border-width); - border-left-width: 0; } - .list-group-horizontal-lg > .list-group-item + .list-group-item.active { - margin-left: calc(-1 * var(--bs-list-group-border-width)); - border-left-width: var(--bs-list-group-border-width); } } - -@media (min-width: 1200px) { - .list-group-horizontal-xl { - flex-direction: row; } - .list-group-horizontal-xl > .list-group-item:first-child:not(:last-child) { - border-bottom-left-radius: var(--bs-list-group-border-radius); - border-top-right-radius: 0; } - .list-group-horizontal-xl > .list-group-item:last-child:not(:first-child) { - border-top-right-radius: var(--bs-list-group-border-radius); - border-bottom-left-radius: 0; } - .list-group-horizontal-xl > .list-group-item.active { - margin-top: 0; } - .list-group-horizontal-xl > .list-group-item + .list-group-item { - border-top-width: var(--bs-list-group-border-width); - border-left-width: 0; } - .list-group-horizontal-xl > .list-group-item + .list-group-item.active { - margin-left: calc(-1 * var(--bs-list-group-border-width)); - border-left-width: var(--bs-list-group-border-width); } } - -@media (min-width: 1400px) { - .list-group-horizontal-xxl { - flex-direction: row; } - .list-group-horizontal-xxl > .list-group-item:first-child:not(:last-child) { - border-bottom-left-radius: var(--bs-list-group-border-radius); - border-top-right-radius: 0; } - .list-group-horizontal-xxl > .list-group-item:last-child:not(:first-child) { - border-top-right-radius: var(--bs-list-group-border-radius); - border-bottom-left-radius: 0; } - .list-group-horizontal-xxl > .list-group-item.active { - margin-top: 0; } - .list-group-horizontal-xxl > .list-group-item + .list-group-item { - border-top-width: var(--bs-list-group-border-width); - border-left-width: 0; } - .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { - margin-left: calc(-1 * var(--bs-list-group-border-width)); - border-left-width: var(--bs-list-group-border-width); } } - -.list-group-flush { - border-radius: 0; } - .list-group-flush > .list-group-item { - border-width: 0 0 var(--bs-list-group-border-width); } - .list-group-flush > .list-group-item:last-child { - border-bottom-width: 0; } - -.list-group-item-primary { - --bs-list-group-color: var(--bs-primary-text-emphasis); - --bs-list-group-bg: var(--bs-primary-bg-subtle); - --bs-list-group-border-color: var(--bs-primary-border-subtle); - --bs-list-group-action-hover-color: var(--bs-emphasis-color); - --bs-list-group-action-hover-bg: var(--bs-primary-border-subtle); - --bs-list-group-action-active-color: var(--bs-emphasis-color); - --bs-list-group-action-active-bg: var(--bs-primary-border-subtle); - --bs-list-group-active-color: var(--bs-primary-bg-subtle); - --bs-list-group-active-bg: var(--bs-primary-text-emphasis); - --bs-list-group-active-border-color: var(--bs-primary-text-emphasis); } - -.list-group-item-secondary { - --bs-list-group-color: var(--bs-secondary-text-emphasis); - --bs-list-group-bg: var(--bs-secondary-bg-subtle); - --bs-list-group-border-color: var(--bs-secondary-border-subtle); - --bs-list-group-action-hover-color: var(--bs-emphasis-color); - --bs-list-group-action-hover-bg: var(--bs-secondary-border-subtle); - --bs-list-group-action-active-color: var(--bs-emphasis-color); - --bs-list-group-action-active-bg: var(--bs-secondary-border-subtle); - --bs-list-group-active-color: var(--bs-secondary-bg-subtle); - --bs-list-group-active-bg: var(--bs-secondary-text-emphasis); - --bs-list-group-active-border-color: var(--bs-secondary-text-emphasis); } - -.list-group-item-success { - --bs-list-group-color: var(--bs-success-text-emphasis); - --bs-list-group-bg: var(--bs-success-bg-subtle); - --bs-list-group-border-color: var(--bs-success-border-subtle); - --bs-list-group-action-hover-color: var(--bs-emphasis-color); - --bs-list-group-action-hover-bg: var(--bs-success-border-subtle); - --bs-list-group-action-active-color: var(--bs-emphasis-color); - --bs-list-group-action-active-bg: var(--bs-success-border-subtle); - --bs-list-group-active-color: var(--bs-success-bg-subtle); - --bs-list-group-active-bg: var(--bs-success-text-emphasis); - --bs-list-group-active-border-color: var(--bs-success-text-emphasis); } - -.list-group-item-info { - --bs-list-group-color: var(--bs-info-text-emphasis); - --bs-list-group-bg: var(--bs-info-bg-subtle); - --bs-list-group-border-color: var(--bs-info-border-subtle); - --bs-list-group-action-hover-color: var(--bs-emphasis-color); - --bs-list-group-action-hover-bg: var(--bs-info-border-subtle); - --bs-list-group-action-active-color: var(--bs-emphasis-color); - --bs-list-group-action-active-bg: var(--bs-info-border-subtle); - --bs-list-group-active-color: var(--bs-info-bg-subtle); - --bs-list-group-active-bg: var(--bs-info-text-emphasis); - --bs-list-group-active-border-color: var(--bs-info-text-emphasis); } - -.list-group-item-warning { - --bs-list-group-color: var(--bs-warning-text-emphasis); - --bs-list-group-bg: var(--bs-warning-bg-subtle); - --bs-list-group-border-color: var(--bs-warning-border-subtle); - --bs-list-group-action-hover-color: var(--bs-emphasis-color); - --bs-list-group-action-hover-bg: var(--bs-warning-border-subtle); - --bs-list-group-action-active-color: var(--bs-emphasis-color); - --bs-list-group-action-active-bg: var(--bs-warning-border-subtle); - --bs-list-group-active-color: var(--bs-warning-bg-subtle); - --bs-list-group-active-bg: var(--bs-warning-text-emphasis); - --bs-list-group-active-border-color: var(--bs-warning-text-emphasis); } - -.list-group-item-danger { - --bs-list-group-color: var(--bs-danger-text-emphasis); - --bs-list-group-bg: var(--bs-danger-bg-subtle); - --bs-list-group-border-color: var(--bs-danger-border-subtle); - --bs-list-group-action-hover-color: var(--bs-emphasis-color); - --bs-list-group-action-hover-bg: var(--bs-danger-border-subtle); - --bs-list-group-action-active-color: var(--bs-emphasis-color); - --bs-list-group-action-active-bg: var(--bs-danger-border-subtle); - --bs-list-group-active-color: var(--bs-danger-bg-subtle); - --bs-list-group-active-bg: var(--bs-danger-text-emphasis); - --bs-list-group-active-border-color: var(--bs-danger-text-emphasis); } - -.list-group-item-light { - --bs-list-group-color: var(--bs-light-text-emphasis); - --bs-list-group-bg: var(--bs-light-bg-subtle); - --bs-list-group-border-color: var(--bs-light-border-subtle); - --bs-list-group-action-hover-color: var(--bs-emphasis-color); - --bs-list-group-action-hover-bg: var(--bs-light-border-subtle); - --bs-list-group-action-active-color: var(--bs-emphasis-color); - --bs-list-group-action-active-bg: var(--bs-light-border-subtle); - --bs-list-group-active-color: var(--bs-light-bg-subtle); - --bs-list-group-active-bg: var(--bs-light-text-emphasis); - --bs-list-group-active-border-color: var(--bs-light-text-emphasis); } - -.list-group-item-dark { - --bs-list-group-color: var(--bs-dark-text-emphasis); - --bs-list-group-bg: var(--bs-dark-bg-subtle); - --bs-list-group-border-color: var(--bs-dark-border-subtle); - --bs-list-group-action-hover-color: var(--bs-emphasis-color); - --bs-list-group-action-hover-bg: var(--bs-dark-border-subtle); - --bs-list-group-action-active-color: var(--bs-emphasis-color); - --bs-list-group-action-active-bg: var(--bs-dark-border-subtle); - --bs-list-group-active-color: var(--bs-dark-bg-subtle); - --bs-list-group-active-bg: var(--bs-dark-text-emphasis); - --bs-list-group-active-border-color: var(--bs-dark-text-emphasis); } - -.btn-close { - --bs-btn-close-color: #000; - --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e"); - --bs-btn-close-opacity: 0.5; - --bs-btn-close-hover-opacity: 0.75; - --bs-btn-close-focus-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); - --bs-btn-close-focus-opacity: 1; - --bs-btn-close-disabled-opacity: 0.25; - box-sizing: content-box; - width: 1em; - height: 1em; - padding: 0.25em 0.25em; - color: var(--bs-btn-close-color); - background: transparent var(--bs-btn-close-bg) center/1em auto no-repeat; - filter: var(--bs-btn-close-filter); - border: 0; - border-radius: 0.375rem; - opacity: var(--bs-btn-close-opacity); } - .btn-close:hover { - color: var(--bs-btn-close-color); - text-decoration: none; - opacity: var(--bs-btn-close-hover-opacity); } - .btn-close:focus { - outline: 0; - box-shadow: var(--bs-btn-close-focus-shadow); - opacity: var(--bs-btn-close-focus-opacity); } - .btn-close:disabled, .btn-close.disabled { - pointer-events: none; - user-select: none; - opacity: var(--bs-btn-close-disabled-opacity); } - -.btn-close-white { - --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%); } - -:root, -[data-bs-theme="light"] { - --bs-btn-close-filter: ; } - -[data-bs-theme="dark"] { - --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%); } - -.toast { - --bs-toast-zindex: 1090; - --bs-toast-padding-x: 0.75rem; - --bs-toast-padding-y: 0.5rem; - --bs-toast-spacing: 1.5rem; - --bs-toast-max-width: 350px; - --bs-toast-font-size: 0.875rem; - --bs-toast-color: ; - --bs-toast-bg: rgba(var(--bs-body-bg-rgb), 0.85); - --bs-toast-border-width: var(--bs-border-width); - --bs-toast-border-color: var(--bs-border-color-translucent); - --bs-toast-border-radius: var(--bs-border-radius); - --bs-toast-box-shadow: var(--bs-box-shadow); - --bs-toast-header-color: var(--bs-secondary-color); - --bs-toast-header-bg: rgba(var(--bs-body-bg-rgb), 0.85); - --bs-toast-header-border-color: var(--bs-border-color-translucent); - width: var(--bs-toast-max-width); - max-width: 100%; - font-size: var(--bs-toast-font-size); - color: var(--bs-toast-color); - pointer-events: auto; - background-color: var(--bs-toast-bg); - background-clip: padding-box; - border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); - box-shadow: var(--bs-toast-box-shadow); - border-radius: var(--bs-toast-border-radius); } - .toast.showing { - opacity: 0; } - .toast:not(.show) { - display: none; } - -.toast-container { - --bs-toast-zindex: 1090; - position: absolute; - z-index: var(--bs-toast-zindex); - width: max-content; - max-width: 100%; - pointer-events: none; } - .toast-container > :not(:last-child) { - margin-bottom: var(--bs-toast-spacing); } - -.toast-header { - display: flex; - align-items: center; - padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); - color: var(--bs-toast-header-color); - background-color: var(--bs-toast-header-bg); - background-clip: padding-box; - border-bottom: var(--bs-toast-border-width) solid var(--bs-toast-header-border-color); - border-top-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); - border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width)); } - .toast-header .btn-close { - margin-right: calc(-.5 * var(--bs-toast-padding-x)); - margin-left: var(--bs-toast-padding-x); } - -.toast-body { - padding: var(--bs-toast-padding-x); - word-wrap: break-word; } - -.modal { - --bs-modal-zindex: 1055; - --bs-modal-width: 500px; - --bs-modal-padding: 1rem; - --bs-modal-margin: 0.5rem; - --bs-modal-color: var(--bs-body-color); - --bs-modal-bg: var(--bs-body-bg); - --bs-modal-border-color: var(--bs-border-color-translucent); - --bs-modal-border-width: var(--bs-border-width); - --bs-modal-border-radius: var(--bs-border-radius-lg); - --bs-modal-box-shadow: var(--bs-box-shadow-sm); - --bs-modal-inner-border-radius: calc(var(--bs-border-radius-lg) - (var(--bs-border-width))); - --bs-modal-header-padding-x: 1rem; - --bs-modal-header-padding-y: 1rem; - --bs-modal-header-padding: 1rem 1rem; - --bs-modal-header-border-color: var(--bs-border-color); - --bs-modal-header-border-width: var(--bs-border-width); - --bs-modal-title-line-height: 1.5; - --bs-modal-footer-gap: 0.5rem; - --bs-modal-footer-bg: ; - --bs-modal-footer-border-color: var(--bs-border-color); - --bs-modal-footer-border-width: var(--bs-border-width); - position: fixed; - top: 0; - left: 0; - z-index: var(--bs-modal-zindex); - display: none; - width: 100%; - height: 100%; - overflow-x: hidden; - overflow-y: auto; - outline: 0; } - -.modal-dialog { - position: relative; - width: auto; - margin: var(--bs-modal-margin); - pointer-events: none; } - .modal.fade .modal-dialog { - transform: translate(0, -50px); - transition: transform 0.3s ease-out; } - @media (prefers-reduced-motion: reduce) { - .modal.fade .modal-dialog { - transition: none; } } - .modal.show .modal-dialog { - transform: none; } - .modal.modal-static .modal-dialog { - transform: scale(1.02); } - -.modal-dialog-scrollable { - height: calc(100% - var(--bs-modal-margin) * 2); } - .modal-dialog-scrollable .modal-content { - max-height: 100%; - overflow: hidden; } - .modal-dialog-scrollable .modal-body { - overflow-y: auto; } - -.modal-dialog-centered { - display: flex; - align-items: center; - min-height: calc(100% - var(--bs-modal-margin) * 2); } - -.modal-content { - position: relative; - display: flex; - flex-direction: column; - width: 100%; - color: var(--bs-modal-color); - pointer-events: auto; - background-color: var(--bs-modal-bg); - background-clip: padding-box; - border: var(--bs-modal-border-width) solid var(--bs-modal-border-color); - border-radius: var(--bs-modal-border-radius); - outline: 0; } - -.modal-backdrop { - --bs-backdrop-zindex: 1050; - --bs-backdrop-bg: #000; - --bs-backdrop-opacity: 0.5; - position: fixed; - top: 0; - left: 0; - z-index: var(--bs-backdrop-zindex); - width: 100vw; - height: 100vh; - background-color: var(--bs-backdrop-bg); } - .modal-backdrop.fade { - opacity: 0; } - .modal-backdrop.show { - opacity: var(--bs-backdrop-opacity); } - -.modal-header { - display: flex; - flex-shrink: 0; - align-items: center; - padding: var(--bs-modal-header-padding); - border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); - border-top-left-radius: var(--bs-modal-inner-border-radius); - border-top-right-radius: var(--bs-modal-inner-border-radius); } - .modal-header .btn-close { - padding: calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5); - margin-top: calc(-.5 * var(--bs-modal-header-padding-y)); - margin-right: calc(-.5 * var(--bs-modal-header-padding-x)); - margin-bottom: calc(-.5 * var(--bs-modal-header-padding-y)); - margin-left: auto; } - -.modal-title { - margin-bottom: 0; - line-height: var(--bs-modal-title-line-height); } - -.modal-body { - position: relative; - flex: 1 1 auto; - padding: var(--bs-modal-padding); } - -.modal-footer { - display: flex; - flex-shrink: 0; - flex-wrap: wrap; - align-items: center; - justify-content: flex-end; - padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5); - background-color: var(--bs-modal-footer-bg); - border-top: var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color); - border-bottom-right-radius: var(--bs-modal-inner-border-radius); - border-bottom-left-radius: var(--bs-modal-inner-border-radius); } - .modal-footer > * { - margin: calc(var(--bs-modal-footer-gap) * .5); } - -@media (min-width: 576px) { - .modal { - --bs-modal-margin: 1.75rem; - --bs-modal-box-shadow: var(--bs-box-shadow); } - .modal-dialog { - max-width: var(--bs-modal-width); - margin-right: auto; - margin-left: auto; } - .modal-sm { - --bs-modal-width: 300px; } } - -@media (min-width: 992px) { - .modal-lg, - .modal-xl { - --bs-modal-width: 800px; } } - -@media (min-width: 1200px) { - .modal-xl { - --bs-modal-width: 1140px; } } - -.modal-fullscreen { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; } - .modal-fullscreen .modal-content { - height: 100%; - border: 0; - border-radius: 0; } - .modal-fullscreen .modal-header, - .modal-fullscreen .modal-footer { - border-radius: 0; } - .modal-fullscreen .modal-body { - overflow-y: auto; } - -@media (max-width: 575.98px) { - .modal-fullscreen-sm-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; } - .modal-fullscreen-sm-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; } - .modal-fullscreen-sm-down .modal-header, - .modal-fullscreen-sm-down .modal-footer { - border-radius: 0; } - .modal-fullscreen-sm-down .modal-body { - overflow-y: auto; } } - -@media (max-width: 767.98px) { - .modal-fullscreen-md-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; } - .modal-fullscreen-md-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; } - .modal-fullscreen-md-down .modal-header, - .modal-fullscreen-md-down .modal-footer { - border-radius: 0; } - .modal-fullscreen-md-down .modal-body { - overflow-y: auto; } } - -@media (max-width: 991.98px) { - .modal-fullscreen-lg-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; } - .modal-fullscreen-lg-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; } - .modal-fullscreen-lg-down .modal-header, - .modal-fullscreen-lg-down .modal-footer { - border-radius: 0; } - .modal-fullscreen-lg-down .modal-body { - overflow-y: auto; } } - -@media (max-width: 1199.98px) { - .modal-fullscreen-xl-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; } - .modal-fullscreen-xl-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; } - .modal-fullscreen-xl-down .modal-header, - .modal-fullscreen-xl-down .modal-footer { - border-radius: 0; } - .modal-fullscreen-xl-down .modal-body { - overflow-y: auto; } } - -@media (max-width: 1399.98px) { - .modal-fullscreen-xxl-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; } - .modal-fullscreen-xxl-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; } - .modal-fullscreen-xxl-down .modal-header, - .modal-fullscreen-xxl-down .modal-footer { - border-radius: 0; } - .modal-fullscreen-xxl-down .modal-body { - overflow-y: auto; } } - -.tooltip { - --bs-tooltip-zindex: 1080; - --bs-tooltip-max-width: 200px; - --bs-tooltip-padding-x: 0.5rem; - --bs-tooltip-padding-y: 0.25rem; - --bs-tooltip-margin: ; - --bs-tooltip-font-size: 0.875rem; - --bs-tooltip-color: var(--bs-body-bg); - --bs-tooltip-bg: var(--bs-emphasis-color); - --bs-tooltip-border-radius: var(--bs-border-radius); - --bs-tooltip-opacity: 0.9; - --bs-tooltip-arrow-width: 0.8rem; - --bs-tooltip-arrow-height: 0.4rem; - z-index: var(--bs-tooltip-zindex); - display: block; - margin: var(--bs-tooltip-margin); - font-family: var(--bs-font-sans-serif); - font-style: normal; - font-weight: 400; - line-height: 1.5; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - white-space: normal; - word-spacing: normal; - line-break: auto; - font-size: var(--bs-tooltip-font-size); - word-wrap: break-word; - opacity: 0; } - .tooltip.show { - opacity: var(--bs-tooltip-opacity); } - .tooltip .tooltip-arrow { - display: block; - width: var(--bs-tooltip-arrow-width); - height: var(--bs-tooltip-arrow-height); } - .tooltip .tooltip-arrow::before { - position: absolute; - content: ""; - border-color: transparent; - border-style: solid; } - -.bs-tooltip-top .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow { - bottom: calc(-1 * var(--bs-tooltip-arrow-height)); } - .bs-tooltip-top .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before { - top: -1px; - border-width: var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0; - border-top-color: var(--bs-tooltip-bg); } - -/* rtl:begin:ignore */ -.bs-tooltip-end .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow { - left: calc(-1 * var(--bs-tooltip-arrow-height)); - width: var(--bs-tooltip-arrow-height); - height: var(--bs-tooltip-arrow-width); } - .bs-tooltip-end .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before { - right: -1px; - border-width: calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0; - border-right-color: var(--bs-tooltip-bg); } - -/* rtl:end:ignore */ -.bs-tooltip-bottom .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow { - top: calc(-1 * var(--bs-tooltip-arrow-height)); } - .bs-tooltip-bottom .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before { - bottom: -1px; - border-width: 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height); - border-bottom-color: var(--bs-tooltip-bg); } - -/* rtl:begin:ignore */ -.bs-tooltip-start .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow { - right: calc(-1 * var(--bs-tooltip-arrow-height)); - width: var(--bs-tooltip-arrow-height); - height: var(--bs-tooltip-arrow-width); } - .bs-tooltip-start .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before { - left: -1px; - border-width: calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height); - border-left-color: var(--bs-tooltip-bg); } - -/* rtl:end:ignore */ -.tooltip-inner { - max-width: var(--bs-tooltip-max-width); - padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); - color: var(--bs-tooltip-color); - text-align: center; - background-color: var(--bs-tooltip-bg); - border-radius: var(--bs-tooltip-border-radius); } - -.popover { - --bs-popover-zindex: 1070; - --bs-popover-max-width: 276px; - --bs-popover-font-size: 0.875rem; - --bs-popover-bg: var(--bs-body-bg); - --bs-popover-border-width: var(--bs-border-width); - --bs-popover-border-color: var(--bs-border-color-translucent); - --bs-popover-border-radius: var(--bs-border-radius-lg); - --bs-popover-inner-border-radius: calc(var(--bs-border-radius-lg) - var(--bs-border-width)); - --bs-popover-box-shadow: var(--bs-box-shadow); - --bs-popover-header-padding-x: 1rem; - --bs-popover-header-padding-y: 0.5rem; - --bs-popover-header-font-size: 1rem; - --bs-popover-header-color: inherit; - --bs-popover-header-bg: var(--bs-secondary-bg); - --bs-popover-body-padding-x: 1rem; - --bs-popover-body-padding-y: 1rem; - --bs-popover-body-color: var(--bs-body-color); - --bs-popover-arrow-width: 1rem; - --bs-popover-arrow-height: 0.5rem; - --bs-popover-arrow-border: var(--bs-popover-border-color); - z-index: var(--bs-popover-zindex); - display: block; - max-width: var(--bs-popover-max-width); - font-family: var(--bs-font-sans-serif); - font-style: normal; - font-weight: 400; - line-height: 1.5; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - white-space: normal; - word-spacing: normal; - line-break: auto; - font-size: var(--bs-popover-font-size); - word-wrap: break-word; - background-color: var(--bs-popover-bg); - background-clip: padding-box; - border: var(--bs-popover-border-width) solid var(--bs-popover-border-color); - border-radius: var(--bs-popover-border-radius); } - .popover .popover-arrow { - display: block; - width: var(--bs-popover-arrow-width); - height: var(--bs-popover-arrow-height); } - .popover .popover-arrow::before, .popover .popover-arrow::after { - position: absolute; - display: block; - content: ""; - border-color: transparent; - border-style: solid; - border-width: 0; } - -.bs-popover-top > .popover-arrow, .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow { - bottom: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); } - .bs-popover-top > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::before, .bs-popover-top > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after { - border-width: var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0; } - .bs-popover-top > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::before { - bottom: 0; - border-top-color: var(--bs-popover-arrow-border); } - .bs-popover-top > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after { - bottom: var(--bs-popover-border-width); - border-top-color: var(--bs-popover-bg); } - -/* rtl:begin:ignore */ -.bs-popover-end > .popover-arrow, .bs-popover-auto[data-popper-placement^="right"] > .popover-arrow { - left: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); - width: var(--bs-popover-arrow-height); - height: var(--bs-popover-arrow-width); } - .bs-popover-end > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::before, .bs-popover-end > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::after { - border-width: calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0; } - .bs-popover-end > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::before { - left: 0; - border-right-color: var(--bs-popover-arrow-border); } - .bs-popover-end > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::after { - left: var(--bs-popover-border-width); - border-right-color: var(--bs-popover-bg); } - -/* rtl:end:ignore */ -.bs-popover-bottom > .popover-arrow, .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow { - top: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); } - .bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::before, .bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after { - border-width: 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height); } - .bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::before { - top: 0; - border-bottom-color: var(--bs-popover-arrow-border); } - .bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after { - top: var(--bs-popover-border-width); - border-bottom-color: var(--bs-popover-bg); } - -.bs-popover-bottom .popover-header::before, .bs-popover-auto[data-popper-placement^="bottom"] .popover-header::before { - position: absolute; - top: 0; - left: 50%; - display: block; - width: var(--bs-popover-arrow-width); - margin-left: calc(-.5 * var(--bs-popover-arrow-width)); - content: ""; - border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-header-bg); } - -/* rtl:begin:ignore */ -.bs-popover-start > .popover-arrow, .bs-popover-auto[data-popper-placement^="left"] > .popover-arrow { - right: calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width)); - width: var(--bs-popover-arrow-height); - height: var(--bs-popover-arrow-width); } - .bs-popover-start > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::before, .bs-popover-start > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::after { - border-width: calc(var(--bs-popover-arrow-width) * .5) 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height); } - .bs-popover-start > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::before { - right: 0; - border-left-color: var(--bs-popover-arrow-border); } - .bs-popover-start > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::after { - right: var(--bs-popover-border-width); - border-left-color: var(--bs-popover-bg); } - -/* rtl:end:ignore */ -.popover-header { - padding: var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x); - margin-bottom: 0; - font-size: var(--bs-popover-header-font-size); - color: var(--bs-popover-header-color); - background-color: var(--bs-popover-header-bg); - border-bottom: var(--bs-popover-border-width) solid var(--bs-popover-border-color); - border-top-left-radius: var(--bs-popover-inner-border-radius); - border-top-right-radius: var(--bs-popover-inner-border-radius); } - .popover-header:empty { - display: none; } - -.popover-body { - padding: var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x); - color: var(--bs-popover-body-color); } - -.carousel { - position: relative; } - -.carousel.pointer-event { - touch-action: pan-y; } - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; } - .carousel-inner::after { - display: block; - clear: both; - content: ""; } - -.carousel-item { - position: relative; - display: none; - float: left; - width: 100%; - margin-right: -100%; - backface-visibility: hidden; - transition: transform 0.6s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .carousel-item { - transition: none; } } -.carousel-item.active, -.carousel-item-next, -.carousel-item-prev { - display: block; } - -.carousel-item-next:not(.carousel-item-start), -.active.carousel-item-end { - transform: translateX(100%); } - -.carousel-item-prev:not(.carousel-item-end), -.active.carousel-item-start { - transform: translateX(-100%); } - -.carousel-fade .carousel-item { - opacity: 0; - transition-property: opacity; - transform: none; } - -.carousel-fade .carousel-item.active, -.carousel-fade .carousel-item-next.carousel-item-start, -.carousel-fade .carousel-item-prev.carousel-item-end { - z-index: 1; - opacity: 1; } - -.carousel-fade .active.carousel-item-start, -.carousel-fade .active.carousel-item-end { - z-index: 0; - opacity: 0; - transition: opacity 0s 0.6s; } - @media (prefers-reduced-motion: reduce) { - .carousel-fade .active.carousel-item-start, - .carousel-fade .active.carousel-item-end { - transition: none; } } -.carousel-control-prev, -.carousel-control-next { - position: absolute; - top: 0; - bottom: 0; - z-index: 1; - display: flex; - align-items: center; - justify-content: center; - width: 15%; - padding: 0; - color: #fff; - text-align: center; - background: none; - filter: var(--bs-carousel-control-icon-filter); - border: 0; - opacity: 0.5; - transition: opacity 0.15s ease; } - @media (prefers-reduced-motion: reduce) { - .carousel-control-prev, - .carousel-control-next { - transition: none; } } - .carousel-control-prev:hover, .carousel-control-prev:focus, - .carousel-control-next:hover, - .carousel-control-next:focus { - color: #fff; - text-decoration: none; - outline: 0; - opacity: 0.9; } - -.carousel-control-prev { - left: 0; } - -.carousel-control-next { - right: 0; } - -.carousel-control-prev-icon, -.carousel-control-next-icon { - display: inline-block; - width: 2rem; - height: 2rem; - background-repeat: no-repeat; - background-position: 50%; - background-size: 100% 100%; } - -.carousel-control-prev-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e") /*rtl:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e")*/; } - -.carousel-control-next-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e") /*rtl:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e")*/; } - -.carousel-indicators { - position: absolute; - right: 0; - bottom: 0; - left: 0; - z-index: 2; - display: flex; - justify-content: center; - padding: 0; - margin-right: 15%; - margin-bottom: 1rem; - margin-left: 15%; } - .carousel-indicators [data-bs-target] { - box-sizing: content-box; - flex: 0 1 auto; - width: 30px; - height: 3px; - padding: 0; - margin-right: 3px; - margin-left: 3px; - text-indent: -999px; - cursor: pointer; - background-color: var(--bs-carousel-indicator-active-bg); - background-clip: padding-box; - border: 0; - border-top: 10px solid transparent; - border-bottom: 10px solid transparent; - opacity: 0.5; - transition: opacity 0.6s ease; } - @media (prefers-reduced-motion: reduce) { - .carousel-indicators [data-bs-target] { - transition: none; } } - .carousel-indicators .active { - opacity: 1; } - -.carousel-caption { - position: absolute; - right: 15%; - bottom: 1.25rem; - left: 15%; - padding-top: 1.25rem; - padding-bottom: 1.25rem; - color: var(--bs-carousel-caption-color); - text-align: center; } - -.carousel-dark { - --bs-carousel-indicator-active-bg: #000; - --bs-carousel-caption-color: #000; - --bs-carousel-control-icon-filter: invert(1) grayscale(100); } - -:root, -[data-bs-theme="light"] { - --bs-carousel-indicator-active-bg: #fff; - --bs-carousel-caption-color: #fff; - --bs-carousel-control-icon-filter: ; } - -[data-bs-theme="dark"] { - --bs-carousel-indicator-active-bg: #000; - --bs-carousel-caption-color: #000; - --bs-carousel-control-icon-filter: invert(1) grayscale(100); } - -.spinner-grow, -.spinner-border { - display: inline-block; - flex-shrink: 0; - width: var(--bs-spinner-width); - height: var(--bs-spinner-height); - vertical-align: var(--bs-spinner-vertical-align); - border-radius: 50%; - animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name); } - -@keyframes spinner-border { - to { - transform: rotate(360deg) /* rtl:ignore */; } } - -.spinner-border { - --bs-spinner-width: 2rem; - --bs-spinner-height: 2rem; - --bs-spinner-vertical-align: -0.125em; - --bs-spinner-border-width: 0.25em; - --bs-spinner-animation-speed: 0.75s; - --bs-spinner-animation-name: spinner-border; - border: var(--bs-spinner-border-width) solid currentcolor; - border-right-color: transparent; } - -.spinner-border-sm { - --bs-spinner-width: 1rem; - --bs-spinner-height: 1rem; - --bs-spinner-border-width: 0.2em; } - -@keyframes spinner-grow { - 0% { - transform: scale(0); } - 50% { - opacity: 1; - transform: none; } } - -.spinner-grow { - --bs-spinner-width: 2rem; - --bs-spinner-height: 2rem; - --bs-spinner-vertical-align: -0.125em; - --bs-spinner-animation-speed: 0.75s; - --bs-spinner-animation-name: spinner-grow; - background-color: currentcolor; - opacity: 0; } - -.spinner-grow-sm { - --bs-spinner-width: 1rem; - --bs-spinner-height: 1rem; } - -@media (prefers-reduced-motion: reduce) { - .spinner-border, - .spinner-grow { - --bs-spinner-animation-speed: 1.5s; } } - -.offcanvas, .offcanvas-xxl, .offcanvas-xl, .offcanvas-lg, .offcanvas-md, .offcanvas-sm { - --bs-offcanvas-zindex: 1045; - --bs-offcanvas-width: 400px; - --bs-offcanvas-height: 30vh; - --bs-offcanvas-padding-x: 1rem; - --bs-offcanvas-padding-y: 1rem; - --bs-offcanvas-color: var(--bs-body-color); - --bs-offcanvas-bg: var(--bs-body-bg); - --bs-offcanvas-border-width: var(--bs-border-width); - --bs-offcanvas-border-color: var(--bs-border-color-translucent); - --bs-offcanvas-box-shadow: var(--bs-box-shadow-sm); - --bs-offcanvas-transition: transform 0.3s ease-in-out; - --bs-offcanvas-title-line-height: 1.5; } - -@media (max-width: 575.98px) { - .offcanvas-sm { - position: fixed; - bottom: 0; - z-index: var(--bs-offcanvas-zindex); - display: flex; - flex-direction: column; - max-width: 100%; - color: var(--bs-offcanvas-color); - visibility: hidden; - background-color: var(--bs-offcanvas-bg); - background-clip: padding-box; - outline: 0; - transition: var(--bs-offcanvas-transition); } } - @media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { - .offcanvas-sm { - transition: none; } } -@media (max-width: 575.98px) { - .offcanvas-sm.offcanvas-start { - top: 0; - left: 0; - width: var(--bs-offcanvas-width); - border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(-100%); } - .offcanvas-sm.offcanvas-end { - top: 0; - right: 0; - width: var(--bs-offcanvas-width); - border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(100%); } - .offcanvas-sm.offcanvas-top { - top: 0; - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(-100%); } - .offcanvas-sm.offcanvas-bottom { - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(100%); } - .offcanvas-sm.showing, .offcanvas-sm.show:not(.hiding) { - transform: none; } - .offcanvas-sm.showing, .offcanvas-sm.hiding, .offcanvas-sm.show { - visibility: visible; } } - -@media (min-width: 576px) { - .offcanvas-sm { - --bs-offcanvas-height: auto; - --bs-offcanvas-border-width: 0; - background-color: transparent !important; } - .offcanvas-sm .offcanvas-header { - display: none; } - .offcanvas-sm .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; - background-color: transparent !important; } } - -@media (max-width: 767.98px) { - .offcanvas-md { - position: fixed; - bottom: 0; - z-index: var(--bs-offcanvas-zindex); - display: flex; - flex-direction: column; - max-width: 100%; - color: var(--bs-offcanvas-color); - visibility: hidden; - background-color: var(--bs-offcanvas-bg); - background-clip: padding-box; - outline: 0; - transition: var(--bs-offcanvas-transition); } } - @media (max-width: 767.98px) and (prefers-reduced-motion: reduce) { - .offcanvas-md { - transition: none; } } -@media (max-width: 767.98px) { - .offcanvas-md.offcanvas-start { - top: 0; - left: 0; - width: var(--bs-offcanvas-width); - border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(-100%); } - .offcanvas-md.offcanvas-end { - top: 0; - right: 0; - width: var(--bs-offcanvas-width); - border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(100%); } - .offcanvas-md.offcanvas-top { - top: 0; - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(-100%); } - .offcanvas-md.offcanvas-bottom { - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(100%); } - .offcanvas-md.showing, .offcanvas-md.show:not(.hiding) { - transform: none; } - .offcanvas-md.showing, .offcanvas-md.hiding, .offcanvas-md.show { - visibility: visible; } } - -@media (min-width: 768px) { - .offcanvas-md { - --bs-offcanvas-height: auto; - --bs-offcanvas-border-width: 0; - background-color: transparent !important; } - .offcanvas-md .offcanvas-header { - display: none; } - .offcanvas-md .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; - background-color: transparent !important; } } - -@media (max-width: 991.98px) { - .offcanvas-lg { - position: fixed; - bottom: 0; - z-index: var(--bs-offcanvas-zindex); - display: flex; - flex-direction: column; - max-width: 100%; - color: var(--bs-offcanvas-color); - visibility: hidden; - background-color: var(--bs-offcanvas-bg); - background-clip: padding-box; - outline: 0; - transition: var(--bs-offcanvas-transition); } } - @media (max-width: 991.98px) and (prefers-reduced-motion: reduce) { - .offcanvas-lg { - transition: none; } } -@media (max-width: 991.98px) { - .offcanvas-lg.offcanvas-start { - top: 0; - left: 0; - width: var(--bs-offcanvas-width); - border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(-100%); } - .offcanvas-lg.offcanvas-end { - top: 0; - right: 0; - width: var(--bs-offcanvas-width); - border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(100%); } - .offcanvas-lg.offcanvas-top { - top: 0; - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(-100%); } - .offcanvas-lg.offcanvas-bottom { - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(100%); } - .offcanvas-lg.showing, .offcanvas-lg.show:not(.hiding) { - transform: none; } - .offcanvas-lg.showing, .offcanvas-lg.hiding, .offcanvas-lg.show { - visibility: visible; } } - -@media (min-width: 992px) { - .offcanvas-lg { - --bs-offcanvas-height: auto; - --bs-offcanvas-border-width: 0; - background-color: transparent !important; } - .offcanvas-lg .offcanvas-header { - display: none; } - .offcanvas-lg .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; - background-color: transparent !important; } } - -@media (max-width: 1199.98px) { - .offcanvas-xl { - position: fixed; - bottom: 0; - z-index: var(--bs-offcanvas-zindex); - display: flex; - flex-direction: column; - max-width: 100%; - color: var(--bs-offcanvas-color); - visibility: hidden; - background-color: var(--bs-offcanvas-bg); - background-clip: padding-box; - outline: 0; - transition: var(--bs-offcanvas-transition); } } - @media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) { - .offcanvas-xl { - transition: none; } } -@media (max-width: 1199.98px) { - .offcanvas-xl.offcanvas-start { - top: 0; - left: 0; - width: var(--bs-offcanvas-width); - border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(-100%); } - .offcanvas-xl.offcanvas-end { - top: 0; - right: 0; - width: var(--bs-offcanvas-width); - border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(100%); } - .offcanvas-xl.offcanvas-top { - top: 0; - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(-100%); } - .offcanvas-xl.offcanvas-bottom { - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(100%); } - .offcanvas-xl.showing, .offcanvas-xl.show:not(.hiding) { - transform: none; } - .offcanvas-xl.showing, .offcanvas-xl.hiding, .offcanvas-xl.show { - visibility: visible; } } - -@media (min-width: 1200px) { - .offcanvas-xl { - --bs-offcanvas-height: auto; - --bs-offcanvas-border-width: 0; - background-color: transparent !important; } - .offcanvas-xl .offcanvas-header { - display: none; } - .offcanvas-xl .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; - background-color: transparent !important; } } - -@media (max-width: 1399.98px) { - .offcanvas-xxl { - position: fixed; - bottom: 0; - z-index: var(--bs-offcanvas-zindex); - display: flex; - flex-direction: column; - max-width: 100%; - color: var(--bs-offcanvas-color); - visibility: hidden; - background-color: var(--bs-offcanvas-bg); - background-clip: padding-box; - outline: 0; - transition: var(--bs-offcanvas-transition); } } - @media (max-width: 1399.98px) and (prefers-reduced-motion: reduce) { - .offcanvas-xxl { - transition: none; } } -@media (max-width: 1399.98px) { - .offcanvas-xxl.offcanvas-start { - top: 0; - left: 0; - width: var(--bs-offcanvas-width); - border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(-100%); } - .offcanvas-xxl.offcanvas-end { - top: 0; - right: 0; - width: var(--bs-offcanvas-width); - border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(100%); } - .offcanvas-xxl.offcanvas-top { - top: 0; - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(-100%); } - .offcanvas-xxl.offcanvas-bottom { - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(100%); } - .offcanvas-xxl.showing, .offcanvas-xxl.show:not(.hiding) { - transform: none; } - .offcanvas-xxl.showing, .offcanvas-xxl.hiding, .offcanvas-xxl.show { - visibility: visible; } } - -@media (min-width: 1400px) { - .offcanvas-xxl { - --bs-offcanvas-height: auto; - --bs-offcanvas-border-width: 0; - background-color: transparent !important; } - .offcanvas-xxl .offcanvas-header { - display: none; } - .offcanvas-xxl .offcanvas-body { - display: flex; - flex-grow: 0; - padding: 0; - overflow-y: visible; - background-color: transparent !important; } } - -.offcanvas { - position: fixed; - bottom: 0; - z-index: var(--bs-offcanvas-zindex); - display: flex; - flex-direction: column; - max-width: 100%; - color: var(--bs-offcanvas-color); - visibility: hidden; - background-color: var(--bs-offcanvas-bg); - background-clip: padding-box; - outline: 0; - transition: var(--bs-offcanvas-transition); } - @media (prefers-reduced-motion: reduce) { - .offcanvas { - transition: none; } } - .offcanvas.offcanvas-start { - top: 0; - left: 0; - width: var(--bs-offcanvas-width); - border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(-100%); } - .offcanvas.offcanvas-end { - top: 0; - right: 0; - width: var(--bs-offcanvas-width); - border-left: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateX(100%); } - .offcanvas.offcanvas-top { - top: 0; - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-bottom: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(-100%); } - .offcanvas.offcanvas-bottom { - right: 0; - left: 0; - height: var(--bs-offcanvas-height); - max-height: 100%; - border-top: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color); - transform: translateY(100%); } - .offcanvas.showing, .offcanvas.show:not(.hiding) { - transform: none; } - .offcanvas.showing, .offcanvas.hiding, .offcanvas.show { - visibility: visible; } - -.offcanvas-backdrop { - position: fixed; - top: 0; - left: 0; - z-index: 1040; - width: 100vw; - height: 100vh; - background-color: #000; } - .offcanvas-backdrop.fade { - opacity: 0; } - .offcanvas-backdrop.show { - opacity: 0.5; } - -.offcanvas-header { - display: flex; - align-items: center; - padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); } - .offcanvas-header .btn-close { - padding: calc(var(--bs-offcanvas-padding-y) * .5) calc(var(--bs-offcanvas-padding-x) * .5); - margin-top: calc(-.5 * var(--bs-offcanvas-padding-y)); - margin-right: calc(-.5 * var(--bs-offcanvas-padding-x)); - margin-bottom: calc(-.5 * var(--bs-offcanvas-padding-y)); - margin-left: auto; } - -.offcanvas-title { - margin-bottom: 0; - line-height: var(--bs-offcanvas-title-line-height); } - -.offcanvas-body { - flex-grow: 1; - padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); - overflow-y: auto; } - -.placeholder { - display: inline-block; - min-height: 1em; - vertical-align: middle; - cursor: wait; - background-color: currentcolor; - opacity: 0.5; } - .placeholder.btn::before { - display: inline-block; - content: ""; } - -.placeholder-xs { - min-height: .6em; } - -.placeholder-sm { - min-height: .8em; } - -.placeholder-lg { - min-height: 1.2em; } - -.placeholder-glow .placeholder { - animation: placeholder-glow 2s ease-in-out infinite; } - -@keyframes placeholder-glow { - 50% { - opacity: 0.2; } } - -.placeholder-wave { - mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%); - mask-size: 200% 100%; - animation: placeholder-wave 2s linear infinite; } - -@keyframes placeholder-wave { - 100% { - mask-position: -200% 0%; } } - -.clearfix::after { - display: block; - clear: both; - content: ""; } - -.text-bg-primary { - color: #fff !important; - background-color: RGBA(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important; } - -.text-bg-secondary { - color: #fff !important; - background-color: RGBA(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important; } - -.text-bg-success { - color: #fff !important; - background-color: RGBA(var(--bs-success-rgb), var(--bs-bg-opacity, 1)) !important; } - -.text-bg-info { - color: #000 !important; - background-color: RGBA(var(--bs-info-rgb), var(--bs-bg-opacity, 1)) !important; } - -.text-bg-warning { - color: #000 !important; - background-color: RGBA(var(--bs-warning-rgb), var(--bs-bg-opacity, 1)) !important; } - -.text-bg-danger { - color: #fff !important; - background-color: RGBA(var(--bs-danger-rgb), var(--bs-bg-opacity, 1)) !important; } - -.text-bg-light { - color: #000 !important; - background-color: RGBA(var(--bs-light-rgb), var(--bs-bg-opacity, 1)) !important; } - -.text-bg-dark { - color: #fff !important; - background-color: RGBA(var(--bs-dark-rgb), var(--bs-bg-opacity, 1)) !important; } - -.link-primary { - color: RGBA(var(--bs-primary-rgb), var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(var(--bs-primary-rgb), var(--bs-link-underline-opacity, 1)) !important; } - .link-primary:hover, .link-primary:focus { - color: RGBA(10, 88, 202, var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(10, 88, 202, var(--bs-link-underline-opacity, 1)) !important; } - -.link-secondary { - color: RGBA(var(--bs-secondary-rgb), var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(var(--bs-secondary-rgb), var(--bs-link-underline-opacity, 1)) !important; } - .link-secondary:hover, .link-secondary:focus { - color: RGBA(86, 94, 100, var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(86, 94, 100, var(--bs-link-underline-opacity, 1)) !important; } - -.link-success { - color: RGBA(var(--bs-success-rgb), var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(var(--bs-success-rgb), var(--bs-link-underline-opacity, 1)) !important; } - .link-success:hover, .link-success:focus { - color: RGBA(20, 108, 67, var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(20, 108, 67, var(--bs-link-underline-opacity, 1)) !important; } - -.link-info { - color: RGBA(var(--bs-info-rgb), var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(var(--bs-info-rgb), var(--bs-link-underline-opacity, 1)) !important; } - .link-info:hover, .link-info:focus { - color: RGBA(61, 213, 243, var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(61, 213, 243, var(--bs-link-underline-opacity, 1)) !important; } - -.link-warning { - color: RGBA(var(--bs-warning-rgb), var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(var(--bs-warning-rgb), var(--bs-link-underline-opacity, 1)) !important; } - .link-warning:hover, .link-warning:focus { - color: RGBA(255, 205, 57, var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(255, 205, 57, var(--bs-link-underline-opacity, 1)) !important; } - -.link-danger { - color: RGBA(var(--bs-danger-rgb), var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(var(--bs-danger-rgb), var(--bs-link-underline-opacity, 1)) !important; } - .link-danger:hover, .link-danger:focus { - color: RGBA(176, 42, 55, var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(176, 42, 55, var(--bs-link-underline-opacity, 1)) !important; } - -.link-light { - color: RGBA(var(--bs-light-rgb), var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(var(--bs-light-rgb), var(--bs-link-underline-opacity, 1)) !important; } - .link-light:hover, .link-light:focus { - color: RGBA(249, 250, 251, var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(249, 250, 251, var(--bs-link-underline-opacity, 1)) !important; } - -.link-dark { - color: RGBA(var(--bs-dark-rgb), var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(var(--bs-dark-rgb), var(--bs-link-underline-opacity, 1)) !important; } - .link-dark:hover, .link-dark:focus { - color: RGBA(26, 30, 33, var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(26, 30, 33, var(--bs-link-underline-opacity, 1)) !important; } - -.link-body-emphasis { - color: RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 1)) !important; - text-decoration-color: RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 1)) !important; } - .link-body-emphasis:hover, .link-body-emphasis:focus { - color: RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-opacity, 0.75)) !important; - text-decoration-color: RGBA(var(--bs-emphasis-color-rgb), var(--bs-link-underline-opacity, 0.75)) !important; } - -.focus-ring:focus { - outline: 0; - box-shadow: var(--bs-focus-ring-x, 0) var(--bs-focus-ring-y, 0) var(--bs-focus-ring-blur, 0) var(--bs-focus-ring-width) var(--bs-focus-ring-color); } - -.icon-link { - display: inline-flex; - gap: 0.375rem; - align-items: center; - text-decoration-color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 0.5)); - text-underline-offset: 0.25em; - backface-visibility: hidden; } - .icon-link > .bi { - flex-shrink: 0; - width: 1em; - height: 1em; - fill: currentcolor; - transition: 0.2s ease-in-out transform; } - @media (prefers-reduced-motion: reduce) { - .icon-link > .bi { - transition: none; } } -.icon-link-hover:hover > .bi, .icon-link-hover:focus-visible > .bi { - transform: var(--bs-icon-link-transform, translate3d(0.25em, 0, 0)); } - -.ratio { - position: relative; - width: 100%; } - .ratio::before { - display: block; - padding-top: var(--bs-aspect-ratio); - content: ""; } - .ratio > * { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; } - -.ratio-1x1 { - --bs-aspect-ratio: 100%; } - -.ratio-4x3 { - --bs-aspect-ratio: calc(3 / 4 * 100%); } - -.ratio-16x9 { - --bs-aspect-ratio: calc(9 / 16 * 100%); } - -.ratio-21x9 { - --bs-aspect-ratio: calc(9 / 21 * 100%); } - -.fixed-top { - position: fixed; - top: 0; - right: 0; - left: 0; - z-index: 1030; } - -.fixed-bottom { - position: fixed; - right: 0; - bottom: 0; - left: 0; - z-index: 1030; } - -.sticky-top { - position: sticky; - top: 0; - z-index: 1020; } - -.sticky-bottom { - position: sticky; - bottom: 0; - z-index: 1020; } - -@media (min-width: 576px) { - .sticky-sm-top { - position: sticky; - top: 0; - z-index: 1020; } - .sticky-sm-bottom { - position: sticky; - bottom: 0; - z-index: 1020; } } - -@media (min-width: 768px) { - .sticky-md-top { - position: sticky; - top: 0; - z-index: 1020; } - .sticky-md-bottom { - position: sticky; - bottom: 0; - z-index: 1020; } } - -@media (min-width: 992px) { - .sticky-lg-top { - position: sticky; - top: 0; - z-index: 1020; } - .sticky-lg-bottom { - position: sticky; - bottom: 0; - z-index: 1020; } } - -@media (min-width: 1200px) { - .sticky-xl-top { - position: sticky; - top: 0; - z-index: 1020; } - .sticky-xl-bottom { - position: sticky; - bottom: 0; - z-index: 1020; } } - -@media (min-width: 1400px) { - .sticky-xxl-top { - position: sticky; - top: 0; - z-index: 1020; } - .sticky-xxl-bottom { - position: sticky; - bottom: 0; - z-index: 1020; } } - -.hstack { - display: flex; - flex-direction: row; - align-items: center; - align-self: stretch; } - -.vstack { - display: flex; - flex: 1 1 auto; - flex-direction: column; - align-self: stretch; } - -.visually-hidden, -.visually-hidden-focusable:not(:focus):not(:focus-within) { - width: 1px !important; - height: 1px !important; - padding: 0 !important; - margin: -1px !important; - overflow: hidden !important; - clip: rect(0, 0, 0, 0) !important; - white-space: nowrap !important; - border: 0 !important; } - .visually-hidden:not(caption), - .visually-hidden-focusable:not(:focus):not(:focus-within):not(caption) { - position: absolute !important; } - .visually-hidden *, - .visually-hidden-focusable:not(:focus):not(:focus-within) * { - overflow: hidden !important; } - -.stretched-link::after { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1; - content: ""; } - -.text-truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; } - -.vr { - display: inline-block; - align-self: stretch; - width: var(--bs-border-width); - min-height: 1em; - background-color: currentcolor; - opacity: 0.25; } - -.align-baseline { - vertical-align: baseline !important; } - -.align-top { - vertical-align: top !important; } - -.align-middle { - vertical-align: middle !important; } - -.align-bottom { - vertical-align: bottom !important; } - -.align-text-bottom { - vertical-align: text-bottom !important; } - -.align-text-top { - vertical-align: text-top !important; } - -.float-start { - float: left !important; } - -.float-end { - float: right !important; } - -.float-none { - float: none !important; } - -.object-fit-contain { - object-fit: contain !important; } - -.object-fit-cover { - object-fit: cover !important; } - -.object-fit-fill { - object-fit: fill !important; } - -.object-fit-scale { - object-fit: scale-down !important; } - -.object-fit-none { - object-fit: none !important; } - -.opacity-0 { - opacity: 0 !important; } - -.opacity-25 { - opacity: 0.25 !important; } - -.opacity-50 { - opacity: 0.5 !important; } - -.opacity-75 { - opacity: 0.75 !important; } - -.opacity-100 { - opacity: 1 !important; } - -.overflow-auto { - overflow: auto !important; } - -.overflow-hidden { - overflow: hidden !important; } - -.overflow-visible { - overflow: visible !important; } - -.overflow-scroll { - overflow: scroll !important; } - -.overflow-x-auto { - overflow-x: auto !important; } - -.overflow-x-hidden { - overflow-x: hidden !important; } - -.overflow-x-visible { - overflow-x: visible !important; } - -.overflow-x-scroll { - overflow-x: scroll !important; } - -.overflow-y-auto { - overflow-y: auto !important; } - -.overflow-y-hidden { - overflow-y: hidden !important; } - -.overflow-y-visible { - overflow-y: visible !important; } - -.overflow-y-scroll { - overflow-y: scroll !important; } - -.d-inline { - display: inline !important; } - -.d-inline-block { - display: inline-block !important; } - -.d-block { - display: block !important; } - -.d-grid { - display: grid !important; } - -.d-inline-grid { - display: inline-grid !important; } - -.d-table { - display: table !important; } - -.d-table-row { - display: table-row !important; } - -.d-table-cell { - display: table-cell !important; } - -.d-flex { - display: flex !important; } - -.d-inline-flex { - display: inline-flex !important; } - -.d-none { - display: none !important; } - -.shadow { - box-shadow: var(--bs-box-shadow) !important; } - -.shadow-sm { - box-shadow: var(--bs-box-shadow-sm) !important; } - -.shadow-lg { - box-shadow: var(--bs-box-shadow-lg) !important; } - -.shadow-none { - box-shadow: none !important; } - -.focus-ring-primary { - --bs-focus-ring-color: rgba(var(--bs-primary-rgb), var(--bs-focus-ring-opacity)); } - -.focus-ring-secondary { - --bs-focus-ring-color: rgba(var(--bs-secondary-rgb), var(--bs-focus-ring-opacity)); } - -.focus-ring-success { - --bs-focus-ring-color: rgba(var(--bs-success-rgb), var(--bs-focus-ring-opacity)); } - -.focus-ring-info { - --bs-focus-ring-color: rgba(var(--bs-info-rgb), var(--bs-focus-ring-opacity)); } - -.focus-ring-warning { - --bs-focus-ring-color: rgba(var(--bs-warning-rgb), var(--bs-focus-ring-opacity)); } - -.focus-ring-danger { - --bs-focus-ring-color: rgba(var(--bs-danger-rgb), var(--bs-focus-ring-opacity)); } - -.focus-ring-light { - --bs-focus-ring-color: rgba(var(--bs-light-rgb), var(--bs-focus-ring-opacity)); } - -.focus-ring-dark { - --bs-focus-ring-color: rgba(var(--bs-dark-rgb), var(--bs-focus-ring-opacity)); } - -.position-static { - position: static !important; } - -.position-relative { - position: relative !important; } - -.position-absolute { - position: absolute !important; } - -.position-fixed { - position: fixed !important; } - -.position-sticky { - position: sticky !important; } - -.top-0 { - top: 0 !important; } - -.top-50 { - top: 50% !important; } - -.top-100 { - top: 100% !important; } - -.bottom-0 { - bottom: 0 !important; } - -.bottom-50 { - bottom: 50% !important; } - -.bottom-100 { - bottom: 100% !important; } - -.start-0 { - left: 0 !important; } - -.start-50 { - left: 50% !important; } - -.start-100 { - left: 100% !important; } - -.end-0 { - right: 0 !important; } - -.end-50 { - right: 50% !important; } - -.end-100 { - right: 100% !important; } - -.translate-middle { - transform: translate(-50%, -50%) !important; } - -.translate-middle-x { - transform: translateX(-50%) !important; } - -.translate-middle-y { - transform: translateY(-50%) !important; } - -.border { - border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; } - -.border-0 { - border: 0 !important; } - -.border-top { - border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; } - -.border-top-0 { - border-top: 0 !important; } - -.border-end { - border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; } - -.border-end-0 { - border-right: 0 !important; } - -.border-bottom { - border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; } - -.border-bottom-0 { - border-bottom: 0 !important; } - -.border-start { - border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; } - -.border-start-0 { - border-left: 0 !important; } - -.border-primary { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-primary-rgb), var(--bs-border-opacity)) !important; } - -.border-secondary { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-secondary-rgb), var(--bs-border-opacity)) !important; } - -.border-success { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-success-rgb), var(--bs-border-opacity)) !important; } - -.border-info { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-info-rgb), var(--bs-border-opacity)) !important; } - -.border-warning { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-warning-rgb), var(--bs-border-opacity)) !important; } - -.border-danger { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-danger-rgb), var(--bs-border-opacity)) !important; } - -.border-light { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-light-rgb), var(--bs-border-opacity)) !important; } - -.border-dark { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-dark-rgb), var(--bs-border-opacity)) !important; } - -.border-black { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-black-rgb), var(--bs-border-opacity)) !important; } - -.border-white { - --bs-border-opacity: 1; - border-color: rgba(var(--bs-white-rgb), var(--bs-border-opacity)) !important; } - -.border-primary-subtle { - border-color: var(--bs-primary-border-subtle) !important; } - -.border-secondary-subtle { - border-color: var(--bs-secondary-border-subtle) !important; } - -.border-success-subtle { - border-color: var(--bs-success-border-subtle) !important; } - -.border-info-subtle { - border-color: var(--bs-info-border-subtle) !important; } - -.border-warning-subtle { - border-color: var(--bs-warning-border-subtle) !important; } - -.border-danger-subtle { - border-color: var(--bs-danger-border-subtle) !important; } - -.border-light-subtle { - border-color: var(--bs-light-border-subtle) !important; } - -.border-dark-subtle { - border-color: var(--bs-dark-border-subtle) !important; } - -.border-1 { - border-width: 1px !important; } - -.border-2 { - border-width: 2px !important; } - -.border-3 { - border-width: 3px !important; } - -.border-4 { - border-width: 4px !important; } - -.border-5 { - border-width: 5px !important; } - -.border-opacity-10 { - --bs-border-opacity: 0.1; } - -.border-opacity-25 { - --bs-border-opacity: 0.25; } - -.border-opacity-50 { - --bs-border-opacity: 0.5; } - -.border-opacity-75 { - --bs-border-opacity: 0.75; } - -.border-opacity-100 { - --bs-border-opacity: 1; } - -.w-25 { - width: 25% !important; } - -.w-50 { - width: 50% !important; } - -.w-75 { - width: 75% !important; } - -.w-100 { - width: 100% !important; } - -.w-auto { - width: auto !important; } - -.mw-100 { - max-width: 100% !important; } - -.vw-100 { - width: 100vw !important; } - -.min-vw-100 { - min-width: 100vw !important; } - -.h-25 { - height: 25% !important; } - -.h-50 { - height: 50% !important; } - -.h-75 { - height: 75% !important; } - -.h-100 { - height: 100% !important; } - -.h-auto { - height: auto !important; } - -.mh-100 { - max-height: 100% !important; } - -.vh-100 { - height: 100vh !important; } - -.min-vh-100 { - min-height: 100vh !important; } - -.flex-fill { - flex: 1 1 auto !important; } - -.flex-row { - flex-direction: row !important; } - -.flex-column { - flex-direction: column !important; } - -.flex-row-reverse { - flex-direction: row-reverse !important; } - -.flex-column-reverse { - flex-direction: column-reverse !important; } - -.flex-grow-0 { - flex-grow: 0 !important; } - -.flex-grow-1 { - flex-grow: 1 !important; } - -.flex-shrink-0 { - flex-shrink: 0 !important; } - -.flex-shrink-1 { - flex-shrink: 1 !important; } - -.flex-wrap { - flex-wrap: wrap !important; } - -.flex-nowrap { - flex-wrap: nowrap !important; } - -.flex-wrap-reverse { - flex-wrap: wrap-reverse !important; } - -.justify-content-start { - justify-content: flex-start !important; } - -.justify-content-end { - justify-content: flex-end !important; } - -.justify-content-center { - justify-content: center !important; } - -.justify-content-between { - justify-content: space-between !important; } - -.justify-content-around { - justify-content: space-around !important; } - -.justify-content-evenly { - justify-content: space-evenly !important; } - -.align-items-start { - align-items: flex-start !important; } - -.align-items-end { - align-items: flex-end !important; } - -.align-items-center { - align-items: center !important; } - -.align-items-baseline { - align-items: baseline !important; } - -.align-items-stretch { - align-items: stretch !important; } - -.align-content-start { - align-content: flex-start !important; } - -.align-content-end { - align-content: flex-end !important; } - -.align-content-center { - align-content: center !important; } - -.align-content-between { - align-content: space-between !important; } - -.align-content-around { - align-content: space-around !important; } - -.align-content-stretch { - align-content: stretch !important; } - -.align-self-auto { - align-self: auto !important; } - -.align-self-start { - align-self: flex-start !important; } - -.align-self-end { - align-self: flex-end !important; } - -.align-self-center { - align-self: center !important; } - -.align-self-baseline { - align-self: baseline !important; } - -.align-self-stretch { - align-self: stretch !important; } - -.order-first { - order: -1 !important; } - -.order-0 { - order: 0 !important; } - -.order-1 { - order: 1 !important; } - -.order-2 { - order: 2 !important; } - -.order-3 { - order: 3 !important; } - -.order-4 { - order: 4 !important; } - -.order-5 { - order: 5 !important; } - -.order-last { - order: 6 !important; } - -.m-0 { - margin: 0 !important; } - -.m-1 { - margin: 0.25rem !important; } - -.m-2 { - margin: 0.5rem !important; } - -.m-3 { - margin: 1rem !important; } - -.m-4 { - margin: 1.5rem !important; } - -.m-5 { - margin: 3rem !important; } - -.m-auto { - margin: auto !important; } - -.mx-0 { - margin-right: 0 !important; - margin-left: 0 !important; } - -.mx-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; } - -.mx-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; } - -.mx-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; } - -.mx-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; } - -.mx-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; } - -.mx-auto { - margin-right: auto !important; - margin-left: auto !important; } - -.my-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; } - -.my-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; } - -.my-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; } - -.my-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; } - -.my-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; } - -.my-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; } - -.my-auto { - margin-top: auto !important; - margin-bottom: auto !important; } - -.mt-0 { - margin-top: 0 !important; } - -.mt-1 { - margin-top: 0.25rem !important; } - -.mt-2 { - margin-top: 0.5rem !important; } - -.mt-3 { - margin-top: 1rem !important; } - -.mt-4 { - margin-top: 1.5rem !important; } - -.mt-5 { - margin-top: 3rem !important; } - -.mt-auto { - margin-top: auto !important; } - -.me-0 { - margin-right: 0 !important; } - -.me-1 { - margin-right: 0.25rem !important; } - -.me-2 { - margin-right: 0.5rem !important; } - -.me-3 { - margin-right: 1rem !important; } - -.me-4 { - margin-right: 1.5rem !important; } - -.me-5 { - margin-right: 3rem !important; } - -.me-auto { - margin-right: auto !important; } - -.mb-0 { - margin-bottom: 0 !important; } - -.mb-1 { - margin-bottom: 0.25rem !important; } - -.mb-2 { - margin-bottom: 0.5rem !important; } - -.mb-3 { - margin-bottom: 1rem !important; } - -.mb-4 { - margin-bottom: 1.5rem !important; } - -.mb-5 { - margin-bottom: 3rem !important; } - -.mb-auto { - margin-bottom: auto !important; } - -.ms-0 { - margin-left: 0 !important; } - -.ms-1 { - margin-left: 0.25rem !important; } - -.ms-2 { - margin-left: 0.5rem !important; } - -.ms-3 { - margin-left: 1rem !important; } - -.ms-4 { - margin-left: 1.5rem !important; } - -.ms-5 { - margin-left: 3rem !important; } - -.ms-auto { - margin-left: auto !important; } - -.p-0 { - padding: 0 !important; } - -.p-1 { - padding: 0.25rem !important; } - -.p-2 { - padding: 0.5rem !important; } - -.p-3 { - padding: 1rem !important; } - -.p-4 { - padding: 1.5rem !important; } - -.p-5 { - padding: 3rem !important; } - -.px-0 { - padding-right: 0 !important; - padding-left: 0 !important; } - -.px-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; } - -.px-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; } - -.px-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; } - -.px-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; } - -.px-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; } - -.py-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; } - -.py-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; } - -.py-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; } - -.py-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; } - -.py-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; } - -.py-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; } - -.pt-0 { - padding-top: 0 !important; } - -.pt-1 { - padding-top: 0.25rem !important; } - -.pt-2 { - padding-top: 0.5rem !important; } - -.pt-3 { - padding-top: 1rem !important; } - -.pt-4 { - padding-top: 1.5rem !important; } - -.pt-5 { - padding-top: 3rem !important; } - -.pe-0 { - padding-right: 0 !important; } - -.pe-1 { - padding-right: 0.25rem !important; } - -.pe-2 { - padding-right: 0.5rem !important; } - -.pe-3 { - padding-right: 1rem !important; } - -.pe-4 { - padding-right: 1.5rem !important; } - -.pe-5 { - padding-right: 3rem !important; } - -.pb-0 { - padding-bottom: 0 !important; } - -.pb-1 { - padding-bottom: 0.25rem !important; } - -.pb-2 { - padding-bottom: 0.5rem !important; } - -.pb-3 { - padding-bottom: 1rem !important; } - -.pb-4 { - padding-bottom: 1.5rem !important; } - -.pb-5 { - padding-bottom: 3rem !important; } - -.ps-0 { - padding-left: 0 !important; } - -.ps-1 { - padding-left: 0.25rem !important; } - -.ps-2 { - padding-left: 0.5rem !important; } - -.ps-3 { - padding-left: 1rem !important; } - -.ps-4 { - padding-left: 1.5rem !important; } - -.ps-5 { - padding-left: 3rem !important; } - -.gap-0 { - gap: 0 !important; } - -.gap-1 { - gap: 0.25rem !important; } - -.gap-2 { - gap: 0.5rem !important; } - -.gap-3 { - gap: 1rem !important; } - -.gap-4 { - gap: 1.5rem !important; } - -.gap-5 { - gap: 3rem !important; } - -.row-gap-0 { - row-gap: 0 !important; } - -.row-gap-1 { - row-gap: 0.25rem !important; } - -.row-gap-2 { - row-gap: 0.5rem !important; } - -.row-gap-3 { - row-gap: 1rem !important; } - -.row-gap-4 { - row-gap: 1.5rem !important; } - -.row-gap-5 { - row-gap: 3rem !important; } - -.column-gap-0 { - column-gap: 0 !important; } - -.column-gap-1 { - column-gap: 0.25rem !important; } - -.column-gap-2 { - column-gap: 0.5rem !important; } - -.column-gap-3 { - column-gap: 1rem !important; } - -.column-gap-4 { - column-gap: 1.5rem !important; } - -.column-gap-5 { - column-gap: 3rem !important; } - -.font-monospace { - font-family: var(--bs-font-monospace) !important; } - -.fs-1 { - font-size: calc(1.375rem + 1.5vw) !important; } - -.fs-2 { - font-size: calc(1.325rem + 0.9vw) !important; } - -.fs-3 { - font-size: calc(1.3rem + 0.6vw) !important; } - -.fs-4 { - font-size: calc(1.275rem + 0.3vw) !important; } - -.fs-5 { - font-size: 1.25rem !important; } - -.fs-6 { - font-size: 1rem !important; } - -.fst-italic { - font-style: italic !important; } - -.fst-normal { - font-style: normal !important; } - -.fw-lighter { - font-weight: lighter !important; } - -.fw-light { - font-weight: 300 !important; } - -.fw-normal { - font-weight: 400 !important; } - -.fw-medium { - font-weight: 500 !important; } - -.fw-semibold { - font-weight: 600 !important; } - -.fw-bold { - font-weight: 700 !important; } - -.fw-bolder { - font-weight: bolder !important; } - -.lh-1 { - line-height: 1 !important; } - -.lh-sm { - line-height: 1.25 !important; } - -.lh-base { - line-height: 1.5 !important; } - -.lh-lg { - line-height: 2 !important; } - -.text-start { - text-align: left !important; } - -.text-end { - text-align: right !important; } - -.text-center { - text-align: center !important; } - -.text-decoration-none { - text-decoration: none !important; } - -.text-decoration-underline { - text-decoration: underline !important; } - -.text-decoration-line-through { - text-decoration: line-through !important; } - -.text-lowercase { - text-transform: lowercase !important; } - -.text-uppercase { - text-transform: uppercase !important; } - -.text-capitalize { - text-transform: capitalize !important; } - -.text-wrap { - white-space: normal !important; } - -.text-nowrap { - white-space: nowrap !important; } - -/* rtl:begin:remove */ -.text-break { - word-wrap: break-word !important; - word-break: break-word !important; } - -/* rtl:end:remove */ -.text-primary { - --bs-text-opacity: 1; - color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important; } - -.text-secondary { - --bs-text-opacity: 1; - color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important; } - -.text-success { - --bs-text-opacity: 1; - color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important; } - -.text-info { - --bs-text-opacity: 1; - color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important; } - -.text-warning { - --bs-text-opacity: 1; - color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important; } - -.text-danger { - --bs-text-opacity: 1; - color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important; } - -.text-light { - --bs-text-opacity: 1; - color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important; } - -.text-dark { - --bs-text-opacity: 1; - color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important; } - -.text-black { - --bs-text-opacity: 1; - color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important; } - -.text-white { - --bs-text-opacity: 1; - color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; } - -.text-body { - --bs-text-opacity: 1; - color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important; } - -.text-muted { - --bs-text-opacity: 1; - color: var(--bs-secondary-color) !important; } - -.text-black-50 { - --bs-text-opacity: 1; - color: rgba(0, 0, 0, 0.5) !important; } - -.text-white-50 { - --bs-text-opacity: 1; - color: rgba(255, 255, 255, 0.5) !important; } - -.text-body-secondary { - --bs-text-opacity: 1; - color: var(--bs-secondary-color) !important; } - -.text-body-tertiary { - --bs-text-opacity: 1; - color: var(--bs-tertiary-color) !important; } - -.text-body-emphasis { - --bs-text-opacity: 1; - color: var(--bs-emphasis-color) !important; } - -.text-reset { - --bs-text-opacity: 1; - color: inherit !important; } - -.text-opacity-25 { - --bs-text-opacity: 0.25; } - -.text-opacity-50 { - --bs-text-opacity: 0.5; } - -.text-opacity-75 { - --bs-text-opacity: 0.75; } - -.text-opacity-100 { - --bs-text-opacity: 1; } - -.text-primary-emphasis { - color: var(--bs-primary-text-emphasis) !important; } - -.text-secondary-emphasis { - color: var(--bs-secondary-text-emphasis) !important; } - -.text-success-emphasis { - color: var(--bs-success-text-emphasis) !important; } - -.text-info-emphasis { - color: var(--bs-info-text-emphasis) !important; } - -.text-warning-emphasis { - color: var(--bs-warning-text-emphasis) !important; } - -.text-danger-emphasis { - color: var(--bs-danger-text-emphasis) !important; } - -.text-light-emphasis { - color: var(--bs-light-text-emphasis) !important; } - -.text-dark-emphasis { - color: var(--bs-dark-text-emphasis) !important; } - -.link-opacity-10 { - --bs-link-opacity: 0.1; } - -.link-opacity-10-hover:hover { - --bs-link-opacity: 0.1; } - -.link-opacity-25 { - --bs-link-opacity: 0.25; } - -.link-opacity-25-hover:hover { - --bs-link-opacity: 0.25; } - -.link-opacity-50 { - --bs-link-opacity: 0.5; } - -.link-opacity-50-hover:hover { - --bs-link-opacity: 0.5; } - -.link-opacity-75 { - --bs-link-opacity: 0.75; } - -.link-opacity-75-hover:hover { - --bs-link-opacity: 0.75; } - -.link-opacity-100 { - --bs-link-opacity: 1; } - -.link-opacity-100-hover:hover { - --bs-link-opacity: 1; } - -.link-offset-1 { - text-underline-offset: 0.125em !important; } - -.link-offset-1-hover:hover { - text-underline-offset: 0.125em !important; } - -.link-offset-2 { - text-underline-offset: 0.25em !important; } - -.link-offset-2-hover:hover { - text-underline-offset: 0.25em !important; } - -.link-offset-3 { - text-underline-offset: 0.375em !important; } - -.link-offset-3-hover:hover { - text-underline-offset: 0.375em !important; } - -.link-underline-primary { - --bs-link-underline-opacity: 1; - text-decoration-color: rgba(var(--bs-primary-rgb), var(--bs-link-underline-opacity)) !important; } - -.link-underline-secondary { - --bs-link-underline-opacity: 1; - text-decoration-color: rgba(var(--bs-secondary-rgb), var(--bs-link-underline-opacity)) !important; } - -.link-underline-success { - --bs-link-underline-opacity: 1; - text-decoration-color: rgba(var(--bs-success-rgb), var(--bs-link-underline-opacity)) !important; } - -.link-underline-info { - --bs-link-underline-opacity: 1; - text-decoration-color: rgba(var(--bs-info-rgb), var(--bs-link-underline-opacity)) !important; } - -.link-underline-warning { - --bs-link-underline-opacity: 1; - text-decoration-color: rgba(var(--bs-warning-rgb), var(--bs-link-underline-opacity)) !important; } - -.link-underline-danger { - --bs-link-underline-opacity: 1; - text-decoration-color: rgba(var(--bs-danger-rgb), var(--bs-link-underline-opacity)) !important; } - -.link-underline-light { - --bs-link-underline-opacity: 1; - text-decoration-color: rgba(var(--bs-light-rgb), var(--bs-link-underline-opacity)) !important; } - -.link-underline-dark { - --bs-link-underline-opacity: 1; - text-decoration-color: rgba(var(--bs-dark-rgb), var(--bs-link-underline-opacity)) !important; } - -.link-underline { - --bs-link-underline-opacity: 1; - text-decoration-color: rgba(var(--bs-link-color-rgb), var(--bs-link-underline-opacity, 1)) !important; } - -.link-underline-opacity-0 { - --bs-link-underline-opacity: 0; } - -.link-underline-opacity-0-hover:hover { - --bs-link-underline-opacity: 0; } - -.link-underline-opacity-10 { - --bs-link-underline-opacity: 0.1; } - -.link-underline-opacity-10-hover:hover { - --bs-link-underline-opacity: 0.1; } - -.link-underline-opacity-25 { - --bs-link-underline-opacity: 0.25; } - -.link-underline-opacity-25-hover:hover { - --bs-link-underline-opacity: 0.25; } - -.link-underline-opacity-50 { - --bs-link-underline-opacity: 0.5; } - -.link-underline-opacity-50-hover:hover { - --bs-link-underline-opacity: 0.5; } - -.link-underline-opacity-75 { - --bs-link-underline-opacity: 0.75; } - -.link-underline-opacity-75-hover:hover { - --bs-link-underline-opacity: 0.75; } - -.link-underline-opacity-100 { - --bs-link-underline-opacity: 1; } - -.link-underline-opacity-100-hover:hover { - --bs-link-underline-opacity: 1; } - -.bg-primary { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important; } - -.bg-secondary { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important; } - -.bg-success { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important; } - -.bg-info { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important; } - -.bg-warning { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important; } - -.bg-danger { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important; } - -.bg-light { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important; } - -.bg-dark { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important; } - -.bg-black { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important; } - -.bg-white { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important; } - -.bg-body { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important; } - -.bg-transparent { - --bs-bg-opacity: 1; - background-color: transparent !important; } - -.bg-body-secondary { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-secondary-bg-rgb), var(--bs-bg-opacity)) !important; } - -.bg-body-tertiary { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-tertiary-bg-rgb), var(--bs-bg-opacity)) !important; } - -.bg-opacity-10 { - --bs-bg-opacity: 0.1; } - -.bg-opacity-25 { - --bs-bg-opacity: 0.25; } - -.bg-opacity-50 { - --bs-bg-opacity: 0.5; } - -.bg-opacity-75 { - --bs-bg-opacity: 0.75; } - -.bg-opacity-100 { - --bs-bg-opacity: 1; } - -.bg-primary-subtle { - background-color: var(--bs-primary-bg-subtle) !important; } - -.bg-secondary-subtle { - background-color: var(--bs-secondary-bg-subtle) !important; } - -.bg-success-subtle { - background-color: var(--bs-success-bg-subtle) !important; } - -.bg-info-subtle { - background-color: var(--bs-info-bg-subtle) !important; } - -.bg-warning-subtle { - background-color: var(--bs-warning-bg-subtle) !important; } - -.bg-danger-subtle { - background-color: var(--bs-danger-bg-subtle) !important; } - -.bg-light-subtle { - background-color: var(--bs-light-bg-subtle) !important; } - -.bg-dark-subtle { - background-color: var(--bs-dark-bg-subtle) !important; } - -.bg-gradient { - background-image: var(--bs-gradient) !important; } - -.user-select-all { - user-select: all !important; } - -.user-select-auto { - user-select: auto !important; } - -.user-select-none { - user-select: none !important; } - -.pe-none { - pointer-events: none !important; } - -.pe-auto { - pointer-events: auto !important; } - -.rounded { - border-radius: var(--bs-border-radius) !important; } - -.rounded-0 { - border-radius: 0 !important; } - -.rounded-1 { - border-radius: var(--bs-border-radius-sm) !important; } - -.rounded-2 { - border-radius: var(--bs-border-radius) !important; } - -.rounded-3 { - border-radius: var(--bs-border-radius-lg) !important; } - -.rounded-4 { - border-radius: var(--bs-border-radius-xl) !important; } - -.rounded-5 { - border-radius: var(--bs-border-radius-xxl) !important; } - -.rounded-circle { - border-radius: 50% !important; } - -.rounded-pill { - border-radius: var(--bs-border-radius-pill) !important; } - -.rounded-top { - border-top-left-radius: var(--bs-border-radius) !important; - border-top-right-radius: var(--bs-border-radius) !important; } - -.rounded-top-0 { - border-top-left-radius: 0 !important; - border-top-right-radius: 0 !important; } - -.rounded-top-1 { - border-top-left-radius: var(--bs-border-radius-sm) !important; - border-top-right-radius: var(--bs-border-radius-sm) !important; } - -.rounded-top-2 { - border-top-left-radius: var(--bs-border-radius) !important; - border-top-right-radius: var(--bs-border-radius) !important; } - -.rounded-top-3 { - border-top-left-radius: var(--bs-border-radius-lg) !important; - border-top-right-radius: var(--bs-border-radius-lg) !important; } - -.rounded-top-4 { - border-top-left-radius: var(--bs-border-radius-xl) !important; - border-top-right-radius: var(--bs-border-radius-xl) !important; } - -.rounded-top-5 { - border-top-left-radius: var(--bs-border-radius-xxl) !important; - border-top-right-radius: var(--bs-border-radius-xxl) !important; } - -.rounded-top-circle { - border-top-left-radius: 50% !important; - border-top-right-radius: 50% !important; } - -.rounded-top-pill { - border-top-left-radius: var(--bs-border-radius-pill) !important; - border-top-right-radius: var(--bs-border-radius-pill) !important; } - -.rounded-end { - border-top-right-radius: var(--bs-border-radius) !important; - border-bottom-right-radius: var(--bs-border-radius) !important; } - -.rounded-end-0 { - border-top-right-radius: 0 !important; - border-bottom-right-radius: 0 !important; } - -.rounded-end-1 { - border-top-right-radius: var(--bs-border-radius-sm) !important; - border-bottom-right-radius: var(--bs-border-radius-sm) !important; } - -.rounded-end-2 { - border-top-right-radius: var(--bs-border-radius) !important; - border-bottom-right-radius: var(--bs-border-radius) !important; } - -.rounded-end-3 { - border-top-right-radius: var(--bs-border-radius-lg) !important; - border-bottom-right-radius: var(--bs-border-radius-lg) !important; } - -.rounded-end-4 { - border-top-right-radius: var(--bs-border-radius-xl) !important; - border-bottom-right-radius: var(--bs-border-radius-xl) !important; } - -.rounded-end-5 { - border-top-right-radius: var(--bs-border-radius-xxl) !important; - border-bottom-right-radius: var(--bs-border-radius-xxl) !important; } - -.rounded-end-circle { - border-top-right-radius: 50% !important; - border-bottom-right-radius: 50% !important; } - -.rounded-end-pill { - border-top-right-radius: var(--bs-border-radius-pill) !important; - border-bottom-right-radius: var(--bs-border-radius-pill) !important; } - -.rounded-bottom { - border-bottom-right-radius: var(--bs-border-radius) !important; - border-bottom-left-radius: var(--bs-border-radius) !important; } - -.rounded-bottom-0 { - border-bottom-right-radius: 0 !important; - border-bottom-left-radius: 0 !important; } - -.rounded-bottom-1 { - border-bottom-right-radius: var(--bs-border-radius-sm) !important; - border-bottom-left-radius: var(--bs-border-radius-sm) !important; } - -.rounded-bottom-2 { - border-bottom-right-radius: var(--bs-border-radius) !important; - border-bottom-left-radius: var(--bs-border-radius) !important; } - -.rounded-bottom-3 { - border-bottom-right-radius: var(--bs-border-radius-lg) !important; - border-bottom-left-radius: var(--bs-border-radius-lg) !important; } - -.rounded-bottom-4 { - border-bottom-right-radius: var(--bs-border-radius-xl) !important; - border-bottom-left-radius: var(--bs-border-radius-xl) !important; } - -.rounded-bottom-5 { - border-bottom-right-radius: var(--bs-border-radius-xxl) !important; - border-bottom-left-radius: var(--bs-border-radius-xxl) !important; } - -.rounded-bottom-circle { - border-bottom-right-radius: 50% !important; - border-bottom-left-radius: 50% !important; } - -.rounded-bottom-pill { - border-bottom-right-radius: var(--bs-border-radius-pill) !important; - border-bottom-left-radius: var(--bs-border-radius-pill) !important; } - -.rounded-start { - border-bottom-left-radius: var(--bs-border-radius) !important; - border-top-left-radius: var(--bs-border-radius) !important; } - -.rounded-start-0 { - border-bottom-left-radius: 0 !important; - border-top-left-radius: 0 !important; } - -.rounded-start-1 { - border-bottom-left-radius: var(--bs-border-radius-sm) !important; - border-top-left-radius: var(--bs-border-radius-sm) !important; } - -.rounded-start-2 { - border-bottom-left-radius: var(--bs-border-radius) !important; - border-top-left-radius: var(--bs-border-radius) !important; } - -.rounded-start-3 { - border-bottom-left-radius: var(--bs-border-radius-lg) !important; - border-top-left-radius: var(--bs-border-radius-lg) !important; } - -.rounded-start-4 { - border-bottom-left-radius: var(--bs-border-radius-xl) !important; - border-top-left-radius: var(--bs-border-radius-xl) !important; } - -.rounded-start-5 { - border-bottom-left-radius: var(--bs-border-radius-xxl) !important; - border-top-left-radius: var(--bs-border-radius-xxl) !important; } - -.rounded-start-circle { - border-bottom-left-radius: 50% !important; - border-top-left-radius: 50% !important; } - -.rounded-start-pill { - border-bottom-left-radius: var(--bs-border-radius-pill) !important; - border-top-left-radius: var(--bs-border-radius-pill) !important; } - -.visible { - visibility: visible !important; } - -.invisible { - visibility: hidden !important; } - -.z-n1 { - z-index: -1 !important; } - -.z-0 { - z-index: 0 !important; } - -.z-1 { - z-index: 1 !important; } - -.z-2 { - z-index: 2 !important; } - -.z-3 { - z-index: 3 !important; } - -@media (min-width: 576px) { - .float-sm-start { - float: left !important; } - .float-sm-end { - float: right !important; } - .float-sm-none { - float: none !important; } - .object-fit-sm-contain { - object-fit: contain !important; } - .object-fit-sm-cover { - object-fit: cover !important; } - .object-fit-sm-fill { - object-fit: fill !important; } - .object-fit-sm-scale { - object-fit: scale-down !important; } - .object-fit-sm-none { - object-fit: none !important; } - .d-sm-inline { - display: inline !important; } - .d-sm-inline-block { - display: inline-block !important; } - .d-sm-block { - display: block !important; } - .d-sm-grid { - display: grid !important; } - .d-sm-inline-grid { - display: inline-grid !important; } - .d-sm-table { - display: table !important; } - .d-sm-table-row { - display: table-row !important; } - .d-sm-table-cell { - display: table-cell !important; } - .d-sm-flex { - display: flex !important; } - .d-sm-inline-flex { - display: inline-flex !important; } - .d-sm-none { - display: none !important; } - .flex-sm-fill { - flex: 1 1 auto !important; } - .flex-sm-row { - flex-direction: row !important; } - .flex-sm-column { - flex-direction: column !important; } - .flex-sm-row-reverse { - flex-direction: row-reverse !important; } - .flex-sm-column-reverse { - flex-direction: column-reverse !important; } - .flex-sm-grow-0 { - flex-grow: 0 !important; } - .flex-sm-grow-1 { - flex-grow: 1 !important; } - .flex-sm-shrink-0 { - flex-shrink: 0 !important; } - .flex-sm-shrink-1 { - flex-shrink: 1 !important; } - .flex-sm-wrap { - flex-wrap: wrap !important; } - .flex-sm-nowrap { - flex-wrap: nowrap !important; } - .flex-sm-wrap-reverse { - flex-wrap: wrap-reverse !important; } - .justify-content-sm-start { - justify-content: flex-start !important; } - .justify-content-sm-end { - justify-content: flex-end !important; } - .justify-content-sm-center { - justify-content: center !important; } - .justify-content-sm-between { - justify-content: space-between !important; } - .justify-content-sm-around { - justify-content: space-around !important; } - .justify-content-sm-evenly { - justify-content: space-evenly !important; } - .align-items-sm-start { - align-items: flex-start !important; } - .align-items-sm-end { - align-items: flex-end !important; } - .align-items-sm-center { - align-items: center !important; } - .align-items-sm-baseline { - align-items: baseline !important; } - .align-items-sm-stretch { - align-items: stretch !important; } - .align-content-sm-start { - align-content: flex-start !important; } - .align-content-sm-end { - align-content: flex-end !important; } - .align-content-sm-center { - align-content: center !important; } - .align-content-sm-between { - align-content: space-between !important; } - .align-content-sm-around { - align-content: space-around !important; } - .align-content-sm-stretch { - align-content: stretch !important; } - .align-self-sm-auto { - align-self: auto !important; } - .align-self-sm-start { - align-self: flex-start !important; } - .align-self-sm-end { - align-self: flex-end !important; } - .align-self-sm-center { - align-self: center !important; } - .align-self-sm-baseline { - align-self: baseline !important; } - .align-self-sm-stretch { - align-self: stretch !important; } - .order-sm-first { - order: -1 !important; } - .order-sm-0 { - order: 0 !important; } - .order-sm-1 { - order: 1 !important; } - .order-sm-2 { - order: 2 !important; } - .order-sm-3 { - order: 3 !important; } - .order-sm-4 { - order: 4 !important; } - .order-sm-5 { - order: 5 !important; } - .order-sm-last { - order: 6 !important; } - .m-sm-0 { - margin: 0 !important; } - .m-sm-1 { - margin: 0.25rem !important; } - .m-sm-2 { - margin: 0.5rem !important; } - .m-sm-3 { - margin: 1rem !important; } - .m-sm-4 { - margin: 1.5rem !important; } - .m-sm-5 { - margin: 3rem !important; } - .m-sm-auto { - margin: auto !important; } - .mx-sm-0 { - margin-right: 0 !important; - margin-left: 0 !important; } - .mx-sm-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; } - .mx-sm-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; } - .mx-sm-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; } - .mx-sm-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; } - .mx-sm-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; } - .mx-sm-auto { - margin-right: auto !important; - margin-left: auto !important; } - .my-sm-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; } - .my-sm-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; } - .my-sm-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; } - .my-sm-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; } - .my-sm-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; } - .my-sm-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; } - .my-sm-auto { - margin-top: auto !important; - margin-bottom: auto !important; } - .mt-sm-0 { - margin-top: 0 !important; } - .mt-sm-1 { - margin-top: 0.25rem !important; } - .mt-sm-2 { - margin-top: 0.5rem !important; } - .mt-sm-3 { - margin-top: 1rem !important; } - .mt-sm-4 { - margin-top: 1.5rem !important; } - .mt-sm-5 { - margin-top: 3rem !important; } - .mt-sm-auto { - margin-top: auto !important; } - .me-sm-0 { - margin-right: 0 !important; } - .me-sm-1 { - margin-right: 0.25rem !important; } - .me-sm-2 { - margin-right: 0.5rem !important; } - .me-sm-3 { - margin-right: 1rem !important; } - .me-sm-4 { - margin-right: 1.5rem !important; } - .me-sm-5 { - margin-right: 3rem !important; } - .me-sm-auto { - margin-right: auto !important; } - .mb-sm-0 { - margin-bottom: 0 !important; } - .mb-sm-1 { - margin-bottom: 0.25rem !important; } - .mb-sm-2 { - margin-bottom: 0.5rem !important; } - .mb-sm-3 { - margin-bottom: 1rem !important; } - .mb-sm-4 { - margin-bottom: 1.5rem !important; } - .mb-sm-5 { - margin-bottom: 3rem !important; } - .mb-sm-auto { - margin-bottom: auto !important; } - .ms-sm-0 { - margin-left: 0 !important; } - .ms-sm-1 { - margin-left: 0.25rem !important; } - .ms-sm-2 { - margin-left: 0.5rem !important; } - .ms-sm-3 { - margin-left: 1rem !important; } - .ms-sm-4 { - margin-left: 1.5rem !important; } - .ms-sm-5 { - margin-left: 3rem !important; } - .ms-sm-auto { - margin-left: auto !important; } - .p-sm-0 { - padding: 0 !important; } - .p-sm-1 { - padding: 0.25rem !important; } - .p-sm-2 { - padding: 0.5rem !important; } - .p-sm-3 { - padding: 1rem !important; } - .p-sm-4 { - padding: 1.5rem !important; } - .p-sm-5 { - padding: 3rem !important; } - .px-sm-0 { - padding-right: 0 !important; - padding-left: 0 !important; } - .px-sm-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; } - .px-sm-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; } - .px-sm-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; } - .px-sm-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; } - .px-sm-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; } - .py-sm-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; } - .py-sm-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; } - .py-sm-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; } - .py-sm-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; } - .py-sm-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; } - .py-sm-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; } - .pt-sm-0 { - padding-top: 0 !important; } - .pt-sm-1 { - padding-top: 0.25rem !important; } - .pt-sm-2 { - padding-top: 0.5rem !important; } - .pt-sm-3 { - padding-top: 1rem !important; } - .pt-sm-4 { - padding-top: 1.5rem !important; } - .pt-sm-5 { - padding-top: 3rem !important; } - .pe-sm-0 { - padding-right: 0 !important; } - .pe-sm-1 { - padding-right: 0.25rem !important; } - .pe-sm-2 { - padding-right: 0.5rem !important; } - .pe-sm-3 { - padding-right: 1rem !important; } - .pe-sm-4 { - padding-right: 1.5rem !important; } - .pe-sm-5 { - padding-right: 3rem !important; } - .pb-sm-0 { - padding-bottom: 0 !important; } - .pb-sm-1 { - padding-bottom: 0.25rem !important; } - .pb-sm-2 { - padding-bottom: 0.5rem !important; } - .pb-sm-3 { - padding-bottom: 1rem !important; } - .pb-sm-4 { - padding-bottom: 1.5rem !important; } - .pb-sm-5 { - padding-bottom: 3rem !important; } - .ps-sm-0 { - padding-left: 0 !important; } - .ps-sm-1 { - padding-left: 0.25rem !important; } - .ps-sm-2 { - padding-left: 0.5rem !important; } - .ps-sm-3 { - padding-left: 1rem !important; } - .ps-sm-4 { - padding-left: 1.5rem !important; } - .ps-sm-5 { - padding-left: 3rem !important; } - .gap-sm-0 { - gap: 0 !important; } - .gap-sm-1 { - gap: 0.25rem !important; } - .gap-sm-2 { - gap: 0.5rem !important; } - .gap-sm-3 { - gap: 1rem !important; } - .gap-sm-4 { - gap: 1.5rem !important; } - .gap-sm-5 { - gap: 3rem !important; } - .row-gap-sm-0 { - row-gap: 0 !important; } - .row-gap-sm-1 { - row-gap: 0.25rem !important; } - .row-gap-sm-2 { - row-gap: 0.5rem !important; } - .row-gap-sm-3 { - row-gap: 1rem !important; } - .row-gap-sm-4 { - row-gap: 1.5rem !important; } - .row-gap-sm-5 { - row-gap: 3rem !important; } - .column-gap-sm-0 { - column-gap: 0 !important; } - .column-gap-sm-1 { - column-gap: 0.25rem !important; } - .column-gap-sm-2 { - column-gap: 0.5rem !important; } - .column-gap-sm-3 { - column-gap: 1rem !important; } - .column-gap-sm-4 { - column-gap: 1.5rem !important; } - .column-gap-sm-5 { - column-gap: 3rem !important; } - .text-sm-start { - text-align: left !important; } - .text-sm-end { - text-align: right !important; } - .text-sm-center { - text-align: center !important; } } - -@media (min-width: 768px) { - .float-md-start { - float: left !important; } - .float-md-end { - float: right !important; } - .float-md-none { - float: none !important; } - .object-fit-md-contain { - object-fit: contain !important; } - .object-fit-md-cover { - object-fit: cover !important; } - .object-fit-md-fill { - object-fit: fill !important; } - .object-fit-md-scale { - object-fit: scale-down !important; } - .object-fit-md-none { - object-fit: none !important; } - .d-md-inline { - display: inline !important; } - .d-md-inline-block { - display: inline-block !important; } - .d-md-block { - display: block !important; } - .d-md-grid { - display: grid !important; } - .d-md-inline-grid { - display: inline-grid !important; } - .d-md-table { - display: table !important; } - .d-md-table-row { - display: table-row !important; } - .d-md-table-cell { - display: table-cell !important; } - .d-md-flex { - display: flex !important; } - .d-md-inline-flex { - display: inline-flex !important; } - .d-md-none { - display: none !important; } - .flex-md-fill { - flex: 1 1 auto !important; } - .flex-md-row { - flex-direction: row !important; } - .flex-md-column { - flex-direction: column !important; } - .flex-md-row-reverse { - flex-direction: row-reverse !important; } - .flex-md-column-reverse { - flex-direction: column-reverse !important; } - .flex-md-grow-0 { - flex-grow: 0 !important; } - .flex-md-grow-1 { - flex-grow: 1 !important; } - .flex-md-shrink-0 { - flex-shrink: 0 !important; } - .flex-md-shrink-1 { - flex-shrink: 1 !important; } - .flex-md-wrap { - flex-wrap: wrap !important; } - .flex-md-nowrap { - flex-wrap: nowrap !important; } - .flex-md-wrap-reverse { - flex-wrap: wrap-reverse !important; } - .justify-content-md-start { - justify-content: flex-start !important; } - .justify-content-md-end { - justify-content: flex-end !important; } - .justify-content-md-center { - justify-content: center !important; } - .justify-content-md-between { - justify-content: space-between !important; } - .justify-content-md-around { - justify-content: space-around !important; } - .justify-content-md-evenly { - justify-content: space-evenly !important; } - .align-items-md-start { - align-items: flex-start !important; } - .align-items-md-end { - align-items: flex-end !important; } - .align-items-md-center { - align-items: center !important; } - .align-items-md-baseline { - align-items: baseline !important; } - .align-items-md-stretch { - align-items: stretch !important; } - .align-content-md-start { - align-content: flex-start !important; } - .align-content-md-end { - align-content: flex-end !important; } - .align-content-md-center { - align-content: center !important; } - .align-content-md-between { - align-content: space-between !important; } - .align-content-md-around { - align-content: space-around !important; } - .align-content-md-stretch { - align-content: stretch !important; } - .align-self-md-auto { - align-self: auto !important; } - .align-self-md-start { - align-self: flex-start !important; } - .align-self-md-end { - align-self: flex-end !important; } - .align-self-md-center { - align-self: center !important; } - .align-self-md-baseline { - align-self: baseline !important; } - .align-self-md-stretch { - align-self: stretch !important; } - .order-md-first { - order: -1 !important; } - .order-md-0 { - order: 0 !important; } - .order-md-1 { - order: 1 !important; } - .order-md-2 { - order: 2 !important; } - .order-md-3 { - order: 3 !important; } - .order-md-4 { - order: 4 !important; } - .order-md-5 { - order: 5 !important; } - .order-md-last { - order: 6 !important; } - .m-md-0 { - margin: 0 !important; } - .m-md-1 { - margin: 0.25rem !important; } - .m-md-2 { - margin: 0.5rem !important; } - .m-md-3 { - margin: 1rem !important; } - .m-md-4 { - margin: 1.5rem !important; } - .m-md-5 { - margin: 3rem !important; } - .m-md-auto { - margin: auto !important; } - .mx-md-0 { - margin-right: 0 !important; - margin-left: 0 !important; } - .mx-md-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; } - .mx-md-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; } - .mx-md-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; } - .mx-md-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; } - .mx-md-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; } - .mx-md-auto { - margin-right: auto !important; - margin-left: auto !important; } - .my-md-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; } - .my-md-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; } - .my-md-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; } - .my-md-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; } - .my-md-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; } - .my-md-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; } - .my-md-auto { - margin-top: auto !important; - margin-bottom: auto !important; } - .mt-md-0 { - margin-top: 0 !important; } - .mt-md-1 { - margin-top: 0.25rem !important; } - .mt-md-2 { - margin-top: 0.5rem !important; } - .mt-md-3 { - margin-top: 1rem !important; } - .mt-md-4 { - margin-top: 1.5rem !important; } - .mt-md-5 { - margin-top: 3rem !important; } - .mt-md-auto { - margin-top: auto !important; } - .me-md-0 { - margin-right: 0 !important; } - .me-md-1 { - margin-right: 0.25rem !important; } - .me-md-2 { - margin-right: 0.5rem !important; } - .me-md-3 { - margin-right: 1rem !important; } - .me-md-4 { - margin-right: 1.5rem !important; } - .me-md-5 { - margin-right: 3rem !important; } - .me-md-auto { - margin-right: auto !important; } - .mb-md-0 { - margin-bottom: 0 !important; } - .mb-md-1 { - margin-bottom: 0.25rem !important; } - .mb-md-2 { - margin-bottom: 0.5rem !important; } - .mb-md-3 { - margin-bottom: 1rem !important; } - .mb-md-4 { - margin-bottom: 1.5rem !important; } - .mb-md-5 { - margin-bottom: 3rem !important; } - .mb-md-auto { - margin-bottom: auto !important; } - .ms-md-0 { - margin-left: 0 !important; } - .ms-md-1 { - margin-left: 0.25rem !important; } - .ms-md-2 { - margin-left: 0.5rem !important; } - .ms-md-3 { - margin-left: 1rem !important; } - .ms-md-4 { - margin-left: 1.5rem !important; } - .ms-md-5 { - margin-left: 3rem !important; } - .ms-md-auto { - margin-left: auto !important; } - .p-md-0 { - padding: 0 !important; } - .p-md-1 { - padding: 0.25rem !important; } - .p-md-2 { - padding: 0.5rem !important; } - .p-md-3 { - padding: 1rem !important; } - .p-md-4 { - padding: 1.5rem !important; } - .p-md-5 { - padding: 3rem !important; } - .px-md-0 { - padding-right: 0 !important; - padding-left: 0 !important; } - .px-md-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; } - .px-md-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; } - .px-md-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; } - .px-md-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; } - .px-md-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; } - .py-md-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; } - .py-md-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; } - .py-md-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; } - .py-md-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; } - .py-md-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; } - .py-md-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; } - .pt-md-0 { - padding-top: 0 !important; } - .pt-md-1 { - padding-top: 0.25rem !important; } - .pt-md-2 { - padding-top: 0.5rem !important; } - .pt-md-3 { - padding-top: 1rem !important; } - .pt-md-4 { - padding-top: 1.5rem !important; } - .pt-md-5 { - padding-top: 3rem !important; } - .pe-md-0 { - padding-right: 0 !important; } - .pe-md-1 { - padding-right: 0.25rem !important; } - .pe-md-2 { - padding-right: 0.5rem !important; } - .pe-md-3 { - padding-right: 1rem !important; } - .pe-md-4 { - padding-right: 1.5rem !important; } - .pe-md-5 { - padding-right: 3rem !important; } - .pb-md-0 { - padding-bottom: 0 !important; } - .pb-md-1 { - padding-bottom: 0.25rem !important; } - .pb-md-2 { - padding-bottom: 0.5rem !important; } - .pb-md-3 { - padding-bottom: 1rem !important; } - .pb-md-4 { - padding-bottom: 1.5rem !important; } - .pb-md-5 { - padding-bottom: 3rem !important; } - .ps-md-0 { - padding-left: 0 !important; } - .ps-md-1 { - padding-left: 0.25rem !important; } - .ps-md-2 { - padding-left: 0.5rem !important; } - .ps-md-3 { - padding-left: 1rem !important; } - .ps-md-4 { - padding-left: 1.5rem !important; } - .ps-md-5 { - padding-left: 3rem !important; } - .gap-md-0 { - gap: 0 !important; } - .gap-md-1 { - gap: 0.25rem !important; } - .gap-md-2 { - gap: 0.5rem !important; } - .gap-md-3 { - gap: 1rem !important; } - .gap-md-4 { - gap: 1.5rem !important; } - .gap-md-5 { - gap: 3rem !important; } - .row-gap-md-0 { - row-gap: 0 !important; } - .row-gap-md-1 { - row-gap: 0.25rem !important; } - .row-gap-md-2 { - row-gap: 0.5rem !important; } - .row-gap-md-3 { - row-gap: 1rem !important; } - .row-gap-md-4 { - row-gap: 1.5rem !important; } - .row-gap-md-5 { - row-gap: 3rem !important; } - .column-gap-md-0 { - column-gap: 0 !important; } - .column-gap-md-1 { - column-gap: 0.25rem !important; } - .column-gap-md-2 { - column-gap: 0.5rem !important; } - .column-gap-md-3 { - column-gap: 1rem !important; } - .column-gap-md-4 { - column-gap: 1.5rem !important; } - .column-gap-md-5 { - column-gap: 3rem !important; } - .text-md-start { - text-align: left !important; } - .text-md-end { - text-align: right !important; } - .text-md-center { - text-align: center !important; } } - -@media (min-width: 992px) { - .float-lg-start { - float: left !important; } - .float-lg-end { - float: right !important; } - .float-lg-none { - float: none !important; } - .object-fit-lg-contain { - object-fit: contain !important; } - .object-fit-lg-cover { - object-fit: cover !important; } - .object-fit-lg-fill { - object-fit: fill !important; } - .object-fit-lg-scale { - object-fit: scale-down !important; } - .object-fit-lg-none { - object-fit: none !important; } - .d-lg-inline { - display: inline !important; } - .d-lg-inline-block { - display: inline-block !important; } - .d-lg-block { - display: block !important; } - .d-lg-grid { - display: grid !important; } - .d-lg-inline-grid { - display: inline-grid !important; } - .d-lg-table { - display: table !important; } - .d-lg-table-row { - display: table-row !important; } - .d-lg-table-cell { - display: table-cell !important; } - .d-lg-flex { - display: flex !important; } - .d-lg-inline-flex { - display: inline-flex !important; } - .d-lg-none { - display: none !important; } - .flex-lg-fill { - flex: 1 1 auto !important; } - .flex-lg-row { - flex-direction: row !important; } - .flex-lg-column { - flex-direction: column !important; } - .flex-lg-row-reverse { - flex-direction: row-reverse !important; } - .flex-lg-column-reverse { - flex-direction: column-reverse !important; } - .flex-lg-grow-0 { - flex-grow: 0 !important; } - .flex-lg-grow-1 { - flex-grow: 1 !important; } - .flex-lg-shrink-0 { - flex-shrink: 0 !important; } - .flex-lg-shrink-1 { - flex-shrink: 1 !important; } - .flex-lg-wrap { - flex-wrap: wrap !important; } - .flex-lg-nowrap { - flex-wrap: nowrap !important; } - .flex-lg-wrap-reverse { - flex-wrap: wrap-reverse !important; } - .justify-content-lg-start { - justify-content: flex-start !important; } - .justify-content-lg-end { - justify-content: flex-end !important; } - .justify-content-lg-center { - justify-content: center !important; } - .justify-content-lg-between { - justify-content: space-between !important; } - .justify-content-lg-around { - justify-content: space-around !important; } - .justify-content-lg-evenly { - justify-content: space-evenly !important; } - .align-items-lg-start { - align-items: flex-start !important; } - .align-items-lg-end { - align-items: flex-end !important; } - .align-items-lg-center { - align-items: center !important; } - .align-items-lg-baseline { - align-items: baseline !important; } - .align-items-lg-stretch { - align-items: stretch !important; } - .align-content-lg-start { - align-content: flex-start !important; } - .align-content-lg-end { - align-content: flex-end !important; } - .align-content-lg-center { - align-content: center !important; } - .align-content-lg-between { - align-content: space-between !important; } - .align-content-lg-around { - align-content: space-around !important; } - .align-content-lg-stretch { - align-content: stretch !important; } - .align-self-lg-auto { - align-self: auto !important; } - .align-self-lg-start { - align-self: flex-start !important; } - .align-self-lg-end { - align-self: flex-end !important; } - .align-self-lg-center { - align-self: center !important; } - .align-self-lg-baseline { - align-self: baseline !important; } - .align-self-lg-stretch { - align-self: stretch !important; } - .order-lg-first { - order: -1 !important; } - .order-lg-0 { - order: 0 !important; } - .order-lg-1 { - order: 1 !important; } - .order-lg-2 { - order: 2 !important; } - .order-lg-3 { - order: 3 !important; } - .order-lg-4 { - order: 4 !important; } - .order-lg-5 { - order: 5 !important; } - .order-lg-last { - order: 6 !important; } - .m-lg-0 { - margin: 0 !important; } - .m-lg-1 { - margin: 0.25rem !important; } - .m-lg-2 { - margin: 0.5rem !important; } - .m-lg-3 { - margin: 1rem !important; } - .m-lg-4 { - margin: 1.5rem !important; } - .m-lg-5 { - margin: 3rem !important; } - .m-lg-auto { - margin: auto !important; } - .mx-lg-0 { - margin-right: 0 !important; - margin-left: 0 !important; } - .mx-lg-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; } - .mx-lg-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; } - .mx-lg-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; } - .mx-lg-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; } - .mx-lg-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; } - .mx-lg-auto { - margin-right: auto !important; - margin-left: auto !important; } - .my-lg-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; } - .my-lg-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; } - .my-lg-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; } - .my-lg-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; } - .my-lg-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; } - .my-lg-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; } - .my-lg-auto { - margin-top: auto !important; - margin-bottom: auto !important; } - .mt-lg-0 { - margin-top: 0 !important; } - .mt-lg-1 { - margin-top: 0.25rem !important; } - .mt-lg-2 { - margin-top: 0.5rem !important; } - .mt-lg-3 { - margin-top: 1rem !important; } - .mt-lg-4 { - margin-top: 1.5rem !important; } - .mt-lg-5 { - margin-top: 3rem !important; } - .mt-lg-auto { - margin-top: auto !important; } - .me-lg-0 { - margin-right: 0 !important; } - .me-lg-1 { - margin-right: 0.25rem !important; } - .me-lg-2 { - margin-right: 0.5rem !important; } - .me-lg-3 { - margin-right: 1rem !important; } - .me-lg-4 { - margin-right: 1.5rem !important; } - .me-lg-5 { - margin-right: 3rem !important; } - .me-lg-auto { - margin-right: auto !important; } - .mb-lg-0 { - margin-bottom: 0 !important; } - .mb-lg-1 { - margin-bottom: 0.25rem !important; } - .mb-lg-2 { - margin-bottom: 0.5rem !important; } - .mb-lg-3 { - margin-bottom: 1rem !important; } - .mb-lg-4 { - margin-bottom: 1.5rem !important; } - .mb-lg-5 { - margin-bottom: 3rem !important; } - .mb-lg-auto { - margin-bottom: auto !important; } - .ms-lg-0 { - margin-left: 0 !important; } - .ms-lg-1 { - margin-left: 0.25rem !important; } - .ms-lg-2 { - margin-left: 0.5rem !important; } - .ms-lg-3 { - margin-left: 1rem !important; } - .ms-lg-4 { - margin-left: 1.5rem !important; } - .ms-lg-5 { - margin-left: 3rem !important; } - .ms-lg-auto { - margin-left: auto !important; } - .p-lg-0 { - padding: 0 !important; } - .p-lg-1 { - padding: 0.25rem !important; } - .p-lg-2 { - padding: 0.5rem !important; } - .p-lg-3 { - padding: 1rem !important; } - .p-lg-4 { - padding: 1.5rem !important; } - .p-lg-5 { - padding: 3rem !important; } - .px-lg-0 { - padding-right: 0 !important; - padding-left: 0 !important; } - .px-lg-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; } - .px-lg-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; } - .px-lg-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; } - .px-lg-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; } - .px-lg-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; } - .py-lg-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; } - .py-lg-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; } - .py-lg-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; } - .py-lg-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; } - .py-lg-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; } - .py-lg-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; } - .pt-lg-0 { - padding-top: 0 !important; } - .pt-lg-1 { - padding-top: 0.25rem !important; } - .pt-lg-2 { - padding-top: 0.5rem !important; } - .pt-lg-3 { - padding-top: 1rem !important; } - .pt-lg-4 { - padding-top: 1.5rem !important; } - .pt-lg-5 { - padding-top: 3rem !important; } - .pe-lg-0 { - padding-right: 0 !important; } - .pe-lg-1 { - padding-right: 0.25rem !important; } - .pe-lg-2 { - padding-right: 0.5rem !important; } - .pe-lg-3 { - padding-right: 1rem !important; } - .pe-lg-4 { - padding-right: 1.5rem !important; } - .pe-lg-5 { - padding-right: 3rem !important; } - .pb-lg-0 { - padding-bottom: 0 !important; } - .pb-lg-1 { - padding-bottom: 0.25rem !important; } - .pb-lg-2 { - padding-bottom: 0.5rem !important; } - .pb-lg-3 { - padding-bottom: 1rem !important; } - .pb-lg-4 { - padding-bottom: 1.5rem !important; } - .pb-lg-5 { - padding-bottom: 3rem !important; } - .ps-lg-0 { - padding-left: 0 !important; } - .ps-lg-1 { - padding-left: 0.25rem !important; } - .ps-lg-2 { - padding-left: 0.5rem !important; } - .ps-lg-3 { - padding-left: 1rem !important; } - .ps-lg-4 { - padding-left: 1.5rem !important; } - .ps-lg-5 { - padding-left: 3rem !important; } - .gap-lg-0 { - gap: 0 !important; } - .gap-lg-1 { - gap: 0.25rem !important; } - .gap-lg-2 { - gap: 0.5rem !important; } - .gap-lg-3 { - gap: 1rem !important; } - .gap-lg-4 { - gap: 1.5rem !important; } - .gap-lg-5 { - gap: 3rem !important; } - .row-gap-lg-0 { - row-gap: 0 !important; } - .row-gap-lg-1 { - row-gap: 0.25rem !important; } - .row-gap-lg-2 { - row-gap: 0.5rem !important; } - .row-gap-lg-3 { - row-gap: 1rem !important; } - .row-gap-lg-4 { - row-gap: 1.5rem !important; } - .row-gap-lg-5 { - row-gap: 3rem !important; } - .column-gap-lg-0 { - column-gap: 0 !important; } - .column-gap-lg-1 { - column-gap: 0.25rem !important; } - .column-gap-lg-2 { - column-gap: 0.5rem !important; } - .column-gap-lg-3 { - column-gap: 1rem !important; } - .column-gap-lg-4 { - column-gap: 1.5rem !important; } - .column-gap-lg-5 { - column-gap: 3rem !important; } - .text-lg-start { - text-align: left !important; } - .text-lg-end { - text-align: right !important; } - .text-lg-center { - text-align: center !important; } } - -@media (min-width: 1200px) { - .float-xl-start { - float: left !important; } - .float-xl-end { - float: right !important; } - .float-xl-none { - float: none !important; } - .object-fit-xl-contain { - object-fit: contain !important; } - .object-fit-xl-cover { - object-fit: cover !important; } - .object-fit-xl-fill { - object-fit: fill !important; } - .object-fit-xl-scale { - object-fit: scale-down !important; } - .object-fit-xl-none { - object-fit: none !important; } - .d-xl-inline { - display: inline !important; } - .d-xl-inline-block { - display: inline-block !important; } - .d-xl-block { - display: block !important; } - .d-xl-grid { - display: grid !important; } - .d-xl-inline-grid { - display: inline-grid !important; } - .d-xl-table { - display: table !important; } - .d-xl-table-row { - display: table-row !important; } - .d-xl-table-cell { - display: table-cell !important; } - .d-xl-flex { - display: flex !important; } - .d-xl-inline-flex { - display: inline-flex !important; } - .d-xl-none { - display: none !important; } - .flex-xl-fill { - flex: 1 1 auto !important; } - .flex-xl-row { - flex-direction: row !important; } - .flex-xl-column { - flex-direction: column !important; } - .flex-xl-row-reverse { - flex-direction: row-reverse !important; } - .flex-xl-column-reverse { - flex-direction: column-reverse !important; } - .flex-xl-grow-0 { - flex-grow: 0 !important; } - .flex-xl-grow-1 { - flex-grow: 1 !important; } - .flex-xl-shrink-0 { - flex-shrink: 0 !important; } - .flex-xl-shrink-1 { - flex-shrink: 1 !important; } - .flex-xl-wrap { - flex-wrap: wrap !important; } - .flex-xl-nowrap { - flex-wrap: nowrap !important; } - .flex-xl-wrap-reverse { - flex-wrap: wrap-reverse !important; } - .justify-content-xl-start { - justify-content: flex-start !important; } - .justify-content-xl-end { - justify-content: flex-end !important; } - .justify-content-xl-center { - justify-content: center !important; } - .justify-content-xl-between { - justify-content: space-between !important; } - .justify-content-xl-around { - justify-content: space-around !important; } - .justify-content-xl-evenly { - justify-content: space-evenly !important; } - .align-items-xl-start { - align-items: flex-start !important; } - .align-items-xl-end { - align-items: flex-end !important; } - .align-items-xl-center { - align-items: center !important; } - .align-items-xl-baseline { - align-items: baseline !important; } - .align-items-xl-stretch { - align-items: stretch !important; } - .align-content-xl-start { - align-content: flex-start !important; } - .align-content-xl-end { - align-content: flex-end !important; } - .align-content-xl-center { - align-content: center !important; } - .align-content-xl-between { - align-content: space-between !important; } - .align-content-xl-around { - align-content: space-around !important; } - .align-content-xl-stretch { - align-content: stretch !important; } - .align-self-xl-auto { - align-self: auto !important; } - .align-self-xl-start { - align-self: flex-start !important; } - .align-self-xl-end { - align-self: flex-end !important; } - .align-self-xl-center { - align-self: center !important; } - .align-self-xl-baseline { - align-self: baseline !important; } - .align-self-xl-stretch { - align-self: stretch !important; } - .order-xl-first { - order: -1 !important; } - .order-xl-0 { - order: 0 !important; } - .order-xl-1 { - order: 1 !important; } - .order-xl-2 { - order: 2 !important; } - .order-xl-3 { - order: 3 !important; } - .order-xl-4 { - order: 4 !important; } - .order-xl-5 { - order: 5 !important; } - .order-xl-last { - order: 6 !important; } - .m-xl-0 { - margin: 0 !important; } - .m-xl-1 { - margin: 0.25rem !important; } - .m-xl-2 { - margin: 0.5rem !important; } - .m-xl-3 { - margin: 1rem !important; } - .m-xl-4 { - margin: 1.5rem !important; } - .m-xl-5 { - margin: 3rem !important; } - .m-xl-auto { - margin: auto !important; } - .mx-xl-0 { - margin-right: 0 !important; - margin-left: 0 !important; } - .mx-xl-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; } - .mx-xl-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; } - .mx-xl-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; } - .mx-xl-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; } - .mx-xl-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; } - .mx-xl-auto { - margin-right: auto !important; - margin-left: auto !important; } - .my-xl-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; } - .my-xl-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; } - .my-xl-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; } - .my-xl-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; } - .my-xl-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; } - .my-xl-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; } - .my-xl-auto { - margin-top: auto !important; - margin-bottom: auto !important; } - .mt-xl-0 { - margin-top: 0 !important; } - .mt-xl-1 { - margin-top: 0.25rem !important; } - .mt-xl-2 { - margin-top: 0.5rem !important; } - .mt-xl-3 { - margin-top: 1rem !important; } - .mt-xl-4 { - margin-top: 1.5rem !important; } - .mt-xl-5 { - margin-top: 3rem !important; } - .mt-xl-auto { - margin-top: auto !important; } - .me-xl-0 { - margin-right: 0 !important; } - .me-xl-1 { - margin-right: 0.25rem !important; } - .me-xl-2 { - margin-right: 0.5rem !important; } - .me-xl-3 { - margin-right: 1rem !important; } - .me-xl-4 { - margin-right: 1.5rem !important; } - .me-xl-5 { - margin-right: 3rem !important; } - .me-xl-auto { - margin-right: auto !important; } - .mb-xl-0 { - margin-bottom: 0 !important; } - .mb-xl-1 { - margin-bottom: 0.25rem !important; } - .mb-xl-2 { - margin-bottom: 0.5rem !important; } - .mb-xl-3 { - margin-bottom: 1rem !important; } - .mb-xl-4 { - margin-bottom: 1.5rem !important; } - .mb-xl-5 { - margin-bottom: 3rem !important; } - .mb-xl-auto { - margin-bottom: auto !important; } - .ms-xl-0 { - margin-left: 0 !important; } - .ms-xl-1 { - margin-left: 0.25rem !important; } - .ms-xl-2 { - margin-left: 0.5rem !important; } - .ms-xl-3 { - margin-left: 1rem !important; } - .ms-xl-4 { - margin-left: 1.5rem !important; } - .ms-xl-5 { - margin-left: 3rem !important; } - .ms-xl-auto { - margin-left: auto !important; } - .p-xl-0 { - padding: 0 !important; } - .p-xl-1 { - padding: 0.25rem !important; } - .p-xl-2 { - padding: 0.5rem !important; } - .p-xl-3 { - padding: 1rem !important; } - .p-xl-4 { - padding: 1.5rem !important; } - .p-xl-5 { - padding: 3rem !important; } - .px-xl-0 { - padding-right: 0 !important; - padding-left: 0 !important; } - .px-xl-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; } - .px-xl-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; } - .px-xl-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; } - .px-xl-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; } - .px-xl-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; } - .py-xl-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; } - .py-xl-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; } - .py-xl-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; } - .py-xl-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; } - .py-xl-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; } - .py-xl-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; } - .pt-xl-0 { - padding-top: 0 !important; } - .pt-xl-1 { - padding-top: 0.25rem !important; } - .pt-xl-2 { - padding-top: 0.5rem !important; } - .pt-xl-3 { - padding-top: 1rem !important; } - .pt-xl-4 { - padding-top: 1.5rem !important; } - .pt-xl-5 { - padding-top: 3rem !important; } - .pe-xl-0 { - padding-right: 0 !important; } - .pe-xl-1 { - padding-right: 0.25rem !important; } - .pe-xl-2 { - padding-right: 0.5rem !important; } - .pe-xl-3 { - padding-right: 1rem !important; } - .pe-xl-4 { - padding-right: 1.5rem !important; } - .pe-xl-5 { - padding-right: 3rem !important; } - .pb-xl-0 { - padding-bottom: 0 !important; } - .pb-xl-1 { - padding-bottom: 0.25rem !important; } - .pb-xl-2 { - padding-bottom: 0.5rem !important; } - .pb-xl-3 { - padding-bottom: 1rem !important; } - .pb-xl-4 { - padding-bottom: 1.5rem !important; } - .pb-xl-5 { - padding-bottom: 3rem !important; } - .ps-xl-0 { - padding-left: 0 !important; } - .ps-xl-1 { - padding-left: 0.25rem !important; } - .ps-xl-2 { - padding-left: 0.5rem !important; } - .ps-xl-3 { - padding-left: 1rem !important; } - .ps-xl-4 { - padding-left: 1.5rem !important; } - .ps-xl-5 { - padding-left: 3rem !important; } - .gap-xl-0 { - gap: 0 !important; } - .gap-xl-1 { - gap: 0.25rem !important; } - .gap-xl-2 { - gap: 0.5rem !important; } - .gap-xl-3 { - gap: 1rem !important; } - .gap-xl-4 { - gap: 1.5rem !important; } - .gap-xl-5 { - gap: 3rem !important; } - .row-gap-xl-0 { - row-gap: 0 !important; } - .row-gap-xl-1 { - row-gap: 0.25rem !important; } - .row-gap-xl-2 { - row-gap: 0.5rem !important; } - .row-gap-xl-3 { - row-gap: 1rem !important; } - .row-gap-xl-4 { - row-gap: 1.5rem !important; } - .row-gap-xl-5 { - row-gap: 3rem !important; } - .column-gap-xl-0 { - column-gap: 0 !important; } - .column-gap-xl-1 { - column-gap: 0.25rem !important; } - .column-gap-xl-2 { - column-gap: 0.5rem !important; } - .column-gap-xl-3 { - column-gap: 1rem !important; } - .column-gap-xl-4 { - column-gap: 1.5rem !important; } - .column-gap-xl-5 { - column-gap: 3rem !important; } - .text-xl-start { - text-align: left !important; } - .text-xl-end { - text-align: right !important; } - .text-xl-center { - text-align: center !important; } } - -@media (min-width: 1400px) { - .float-xxl-start { - float: left !important; } - .float-xxl-end { - float: right !important; } - .float-xxl-none { - float: none !important; } - .object-fit-xxl-contain { - object-fit: contain !important; } - .object-fit-xxl-cover { - object-fit: cover !important; } - .object-fit-xxl-fill { - object-fit: fill !important; } - .object-fit-xxl-scale { - object-fit: scale-down !important; } - .object-fit-xxl-none { - object-fit: none !important; } - .d-xxl-inline { - display: inline !important; } - .d-xxl-inline-block { - display: inline-block !important; } - .d-xxl-block { - display: block !important; } - .d-xxl-grid { - display: grid !important; } - .d-xxl-inline-grid { - display: inline-grid !important; } - .d-xxl-table { - display: table !important; } - .d-xxl-table-row { - display: table-row !important; } - .d-xxl-table-cell { - display: table-cell !important; } - .d-xxl-flex { - display: flex !important; } - .d-xxl-inline-flex { - display: inline-flex !important; } - .d-xxl-none { - display: none !important; } - .flex-xxl-fill { - flex: 1 1 auto !important; } - .flex-xxl-row { - flex-direction: row !important; } - .flex-xxl-column { - flex-direction: column !important; } - .flex-xxl-row-reverse { - flex-direction: row-reverse !important; } - .flex-xxl-column-reverse { - flex-direction: column-reverse !important; } - .flex-xxl-grow-0 { - flex-grow: 0 !important; } - .flex-xxl-grow-1 { - flex-grow: 1 !important; } - .flex-xxl-shrink-0 { - flex-shrink: 0 !important; } - .flex-xxl-shrink-1 { - flex-shrink: 1 !important; } - .flex-xxl-wrap { - flex-wrap: wrap !important; } - .flex-xxl-nowrap { - flex-wrap: nowrap !important; } - .flex-xxl-wrap-reverse { - flex-wrap: wrap-reverse !important; } - .justify-content-xxl-start { - justify-content: flex-start !important; } - .justify-content-xxl-end { - justify-content: flex-end !important; } - .justify-content-xxl-center { - justify-content: center !important; } - .justify-content-xxl-between { - justify-content: space-between !important; } - .justify-content-xxl-around { - justify-content: space-around !important; } - .justify-content-xxl-evenly { - justify-content: space-evenly !important; } - .align-items-xxl-start { - align-items: flex-start !important; } - .align-items-xxl-end { - align-items: flex-end !important; } - .align-items-xxl-center { - align-items: center !important; } - .align-items-xxl-baseline { - align-items: baseline !important; } - .align-items-xxl-stretch { - align-items: stretch !important; } - .align-content-xxl-start { - align-content: flex-start !important; } - .align-content-xxl-end { - align-content: flex-end !important; } - .align-content-xxl-center { - align-content: center !important; } - .align-content-xxl-between { - align-content: space-between !important; } - .align-content-xxl-around { - align-content: space-around !important; } - .align-content-xxl-stretch { - align-content: stretch !important; } - .align-self-xxl-auto { - align-self: auto !important; } - .align-self-xxl-start { - align-self: flex-start !important; } - .align-self-xxl-end { - align-self: flex-end !important; } - .align-self-xxl-center { - align-self: center !important; } - .align-self-xxl-baseline { - align-self: baseline !important; } - .align-self-xxl-stretch { - align-self: stretch !important; } - .order-xxl-first { - order: -1 !important; } - .order-xxl-0 { - order: 0 !important; } - .order-xxl-1 { - order: 1 !important; } - .order-xxl-2 { - order: 2 !important; } - .order-xxl-3 { - order: 3 !important; } - .order-xxl-4 { - order: 4 !important; } - .order-xxl-5 { - order: 5 !important; } - .order-xxl-last { - order: 6 !important; } - .m-xxl-0 { - margin: 0 !important; } - .m-xxl-1 { - margin: 0.25rem !important; } - .m-xxl-2 { - margin: 0.5rem !important; } - .m-xxl-3 { - margin: 1rem !important; } - .m-xxl-4 { - margin: 1.5rem !important; } - .m-xxl-5 { - margin: 3rem !important; } - .m-xxl-auto { - margin: auto !important; } - .mx-xxl-0 { - margin-right: 0 !important; - margin-left: 0 !important; } - .mx-xxl-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; } - .mx-xxl-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; } - .mx-xxl-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; } - .mx-xxl-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; } - .mx-xxl-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; } - .mx-xxl-auto { - margin-right: auto !important; - margin-left: auto !important; } - .my-xxl-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; } - .my-xxl-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; } - .my-xxl-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; } - .my-xxl-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; } - .my-xxl-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; } - .my-xxl-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; } - .my-xxl-auto { - margin-top: auto !important; - margin-bottom: auto !important; } - .mt-xxl-0 { - margin-top: 0 !important; } - .mt-xxl-1 { - margin-top: 0.25rem !important; } - .mt-xxl-2 { - margin-top: 0.5rem !important; } - .mt-xxl-3 { - margin-top: 1rem !important; } - .mt-xxl-4 { - margin-top: 1.5rem !important; } - .mt-xxl-5 { - margin-top: 3rem !important; } - .mt-xxl-auto { - margin-top: auto !important; } - .me-xxl-0 { - margin-right: 0 !important; } - .me-xxl-1 { - margin-right: 0.25rem !important; } - .me-xxl-2 { - margin-right: 0.5rem !important; } - .me-xxl-3 { - margin-right: 1rem !important; } - .me-xxl-4 { - margin-right: 1.5rem !important; } - .me-xxl-5 { - margin-right: 3rem !important; } - .me-xxl-auto { - margin-right: auto !important; } - .mb-xxl-0 { - margin-bottom: 0 !important; } - .mb-xxl-1 { - margin-bottom: 0.25rem !important; } - .mb-xxl-2 { - margin-bottom: 0.5rem !important; } - .mb-xxl-3 { - margin-bottom: 1rem !important; } - .mb-xxl-4 { - margin-bottom: 1.5rem !important; } - .mb-xxl-5 { - margin-bottom: 3rem !important; } - .mb-xxl-auto { - margin-bottom: auto !important; } - .ms-xxl-0 { - margin-left: 0 !important; } - .ms-xxl-1 { - margin-left: 0.25rem !important; } - .ms-xxl-2 { - margin-left: 0.5rem !important; } - .ms-xxl-3 { - margin-left: 1rem !important; } - .ms-xxl-4 { - margin-left: 1.5rem !important; } - .ms-xxl-5 { - margin-left: 3rem !important; } - .ms-xxl-auto { - margin-left: auto !important; } - .p-xxl-0 { - padding: 0 !important; } - .p-xxl-1 { - padding: 0.25rem !important; } - .p-xxl-2 { - padding: 0.5rem !important; } - .p-xxl-3 { - padding: 1rem !important; } - .p-xxl-4 { - padding: 1.5rem !important; } - .p-xxl-5 { - padding: 3rem !important; } - .px-xxl-0 { - padding-right: 0 !important; - padding-left: 0 !important; } - .px-xxl-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; } - .px-xxl-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; } - .px-xxl-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; } - .px-xxl-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; } - .px-xxl-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; } - .py-xxl-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; } - .py-xxl-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; } - .py-xxl-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; } - .py-xxl-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; } - .py-xxl-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; } - .py-xxl-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; } - .pt-xxl-0 { - padding-top: 0 !important; } - .pt-xxl-1 { - padding-top: 0.25rem !important; } - .pt-xxl-2 { - padding-top: 0.5rem !important; } - .pt-xxl-3 { - padding-top: 1rem !important; } - .pt-xxl-4 { - padding-top: 1.5rem !important; } - .pt-xxl-5 { - padding-top: 3rem !important; } - .pe-xxl-0 { - padding-right: 0 !important; } - .pe-xxl-1 { - padding-right: 0.25rem !important; } - .pe-xxl-2 { - padding-right: 0.5rem !important; } - .pe-xxl-3 { - padding-right: 1rem !important; } - .pe-xxl-4 { - padding-right: 1.5rem !important; } - .pe-xxl-5 { - padding-right: 3rem !important; } - .pb-xxl-0 { - padding-bottom: 0 !important; } - .pb-xxl-1 { - padding-bottom: 0.25rem !important; } - .pb-xxl-2 { - padding-bottom: 0.5rem !important; } - .pb-xxl-3 { - padding-bottom: 1rem !important; } - .pb-xxl-4 { - padding-bottom: 1.5rem !important; } - .pb-xxl-5 { - padding-bottom: 3rem !important; } - .ps-xxl-0 { - padding-left: 0 !important; } - .ps-xxl-1 { - padding-left: 0.25rem !important; } - .ps-xxl-2 { - padding-left: 0.5rem !important; } - .ps-xxl-3 { - padding-left: 1rem !important; } - .ps-xxl-4 { - padding-left: 1.5rem !important; } - .ps-xxl-5 { - padding-left: 3rem !important; } - .gap-xxl-0 { - gap: 0 !important; } - .gap-xxl-1 { - gap: 0.25rem !important; } - .gap-xxl-2 { - gap: 0.5rem !important; } - .gap-xxl-3 { - gap: 1rem !important; } - .gap-xxl-4 { - gap: 1.5rem !important; } - .gap-xxl-5 { - gap: 3rem !important; } - .row-gap-xxl-0 { - row-gap: 0 !important; } - .row-gap-xxl-1 { - row-gap: 0.25rem !important; } - .row-gap-xxl-2 { - row-gap: 0.5rem !important; } - .row-gap-xxl-3 { - row-gap: 1rem !important; } - .row-gap-xxl-4 { - row-gap: 1.5rem !important; } - .row-gap-xxl-5 { - row-gap: 3rem !important; } - .column-gap-xxl-0 { - column-gap: 0 !important; } - .column-gap-xxl-1 { - column-gap: 0.25rem !important; } - .column-gap-xxl-2 { - column-gap: 0.5rem !important; } - .column-gap-xxl-3 { - column-gap: 1rem !important; } - .column-gap-xxl-4 { - column-gap: 1.5rem !important; } - .column-gap-xxl-5 { - column-gap: 3rem !important; } - .text-xxl-start { - text-align: left !important; } - .text-xxl-end { - text-align: right !important; } - .text-xxl-center { - text-align: center !important; } } - -@media (min-width: 1200px) { - .fs-1 { - font-size: 2.5rem !important; } - .fs-2 { - font-size: 2rem !important; } - .fs-3 { - font-size: 1.75rem !important; } - .fs-4 { - font-size: 1.5rem !important; } } - -@media print { - .d-print-inline { - display: inline !important; } - .d-print-inline-block { - display: inline-block !important; } - .d-print-block { - display: block !important; } - .d-print-grid { - display: grid !important; } - .d-print-inline-grid { - display: inline-grid !important; } - .d-print-table { - display: table !important; } - .d-print-table-row { - display: table-row !important; } - .d-print-table-cell { - display: table-cell !important; } - .d-print-flex { - display: flex !important; } - .d-print-inline-flex { - display: inline-flex !important; } - .d-print-none { - display: none !important; } } - -.table > thead > tr > th { - background-color: #3c3834; - color: #f1f1f1; } - -.table-filter { - background-color: #34302D; - padding: 9px 12px; } - -.nav > li > a { - color: #838789; } - -.btn-primary { - margin-top: 12px; - border-width: 2px; - transition: border 0.15s; - color: #f1f1f1; - background: #34302D; - border-color: #6db33f; - -webkit-transition: border 0.15s; - -moz-transition: border 0.15s; - -o-transition: border 0.15s; - -ms-transition: border 0.15s; } - .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, - .btn-primary .open .dropdown-toggle { - background-color: #34302D; - border-color: #34302D; } - -.container .text-muted { - margin: 20px 0; } - -code { - font-size: 80%; } - -.xd-container { - margin-top: 40px; - margin-bottom: 100px; - padding-left: 5px; - padding-right: 5px; } - -h1, .h1 { - margin-bottom: 15px; } - -.index-page--subtitle { - font-size: 16px; - line-height: 24px; - margin: 0 0 30px; } - -.form-horizontal button.btn-inverse { - margin-left: 32px; } - -#job-params-modal .modal-dialog { - width: 90%; - margin-left: auto; - margin-right: auto; } - -[ng-cloak].splash { - display: block !important; } - -[ng-cloak] { - display: none; } - -.splash { - background: #6db33f; - color: #34302D; - display: none; } - -.error-page { - margin-top: 100px; - text-align: center; } - -.error-page .error-title { - font-size: 24px; - line-height: 24px; - margin: 30px 0 0; } - -table td { - vertical-align: middle; } - -table td .progress { - margin-bottom: 0; } - -table td.action-column { - width: 1px; } - -.help-block { - color: #b6afaa; } - -.xd-containers { - font-size: 15px; } - -.cluster-view > table td { - vertical-align: top; } - -.cluster-view .label, .cluster-view .column-block { - display: block; } - -.cluster-view .input-group-addon { - width: 0%; } - -.cluster-view { - margin-bottom: 0; } - -.container-details-table th { - background-color: #3c3834; - color: #f1f1f1; } - -.status-help-content-table td { - color: #34302D; } - -.logo { - width: 200px; } - -.myspinner { - animation-name: spinner; - animation-duration: 2s; - animation-iteration-count: infinite; - animation-timing-function: linear; - -webkit-transform-origin: 49% 50%; - -webkit-animation-name: spinner; - -webkit-animation-duration: 2s; - -webkit-animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; } - -hr { - border-top: 1px dotted #34302D; } - -@font-face { - font-family: 'varela_roundregular'; - src: url("../fonts/varela_round-webfont.eot"); - src: url("../fonts/varela_round-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/varela_round-webfont.woff") format("woff"), url("../fonts/varela_round-webfont.ttf") format("truetype"), url("../fonts/varela_round-webfont.svg#varela_roundregular") format("svg"); - font-weight: normal; - font-style: normal; } - -@font-face { - font-family: 'montserratregular'; - src: url("../fonts/montserrat-webfont.eot"); - src: url("../fonts/montserrat-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/montserrat-webfont.woff") format("woff"), url("../fonts/montserrat-webfont.ttf") format("truetype"), url("../fonts/montserrat-webfont.svg#montserratregular") format("svg"); - font-weight: normal; - font-style: normal; } - -body, h1, .h1, h2, .h2, h3, .h3, p, input { - margin: 0; - font-weight: 400; - font-family: "varela_roundregular", sans-serif; - color: #34302d; } - -h1, .h1 { - font-size: 24px; - line-height: 30px; - font-family: "montserratregular", sans-serif; } - -h2, .h2 { - font-size: 18px; - font-weight: 700; - line-height: 24px; - margin-bottom: 10px; - font-family: "montserratregular", sans-serif; } - -h3, .h3 { - font-size: 16px; - line-height: 24px; - margin-bottom: 10px; - font-weight: 700; } - -strong { - font-weight: 700; - font-family: "montserratregular", sans-serif; } - -.navbar { - border-top: 4px solid #6db33f; - background-color: #34302d; - margin-bottom: 0px; - border-bottom: 0; - border-left: 0; - border-right: 0; } - -.navbar a.navbar-brand { - background: url("../images/spring-logo-dataflow.png") -1px -1px no-repeat; - margin: 12px 0 6px; - width: 229px; - height: 46px; - display: inline-block; - text-decoration: none; - padding: 0; } - -.navbar a.navbar-brand span { - display: block; - width: 229px; - height: 46px; - background: url("../images/spring-logo-dataflow.png") -1px -48px no-repeat; - opacity: 0; - -moz-transition: opacity 0.12s ease-in-out; - -webkit-transition: opacity 0.12s ease-in-out; - -o-transition: opacity 0.12s ease-in-out; } - -.navbar a:hover.navbar-brand span { - opacity: 1; } - -.navbar li > a, .navbar-text { - font-family: "montserratregular", sans-serif; - text-shadow: none; - font-size: 14px; - /* line-height: 14px; */ - padding: 28px 20px; - transition: all 0.15s; - -webkit-transition: all 0.15s; - -moz-transition: all 0.15s; - -o-transition: all 0.15s; - -ms-transition: all 0.15s; } - -.navbar li > a { - text-transform: uppercase; } - -.navbar .navbar-text { - margin-top: 0; - margin-bottom: 0; } - -.navbar li:hover > a { - color: #eeeeee; - background-color: #6db33f; } - -.navbar-toggle { - border-width: 0; } - .navbar-toggle .icon-bar + .icon-bar { - margin-top: 3px; } - .navbar-toggle .icon-bar { - width: 19px; - height: 3px; } - -@media (max-width: 768px) { - .navbar-toggle { - position: absolute; - z-index: 9999; - left: 0px; - top: 0px; } - .navbar a.navbar-brand { - display: block; - margin: 0 auto 0 auto; - width: 148px; - height: 50px; - float: none; - background: url("../images/spring-logo-dataflow-mobile.png") 0 center no-repeat; } - .homepage-billboard .homepage-subtitle { - font-size: 21px; - line-height: 21px; } - .navbar a.navbar-brand span { - display: none; } - .navbar { - border-top-width: 0; } - .xd-container { - margin-top: 20px; - margin-bottom: 30px; } - .index-page--subtitle { - margin-top: 10px; - margin-bottom: 30px; } } - -/*# sourceMappingURL=../../../../../../target/petclinic.css.map */ \ No newline at end of file diff --git a/src/main/resources/static/resources/images/platform-bg.png b/src/main/resources/static/resources/images/platform-bg.png new file mode 100644 index 000000000..512185839 Binary files /dev/null and b/src/main/resources/static/resources/images/platform-bg.png differ diff --git a/src/main/resources/static/resources/images/spring-logo.svg b/src/main/resources/static/resources/images/spring-logo.svg deleted file mode 100644 index 5b2a27a74..000000000 --- a/src/main/resources/static/resources/images/spring-logo.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/static/resources/images/spring-pivotal-logo.png b/src/main/resources/static/resources/images/spring-pivotal-logo.png new file mode 100644 index 000000000..1840af274 Binary files /dev/null and b/src/main/resources/static/resources/images/spring-pivotal-logo.png differ diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html index 5f1d6f3ab..2b40d7f98 100644 --- a/src/main/resources/templates/error.html +++ b/src/main/resources/templates/error.html @@ -1,21 +1,11 @@ - + - - - -

Something happened...

+ + +

Something happened...

+

Exception message

+ - -

- The requested page was not found. - An internal server error occurred. - An unexpected error occurred. -

- - -

Exception message

- - - + \ No newline at end of file diff --git a/src/main/resources/templates/fragments/inputField.html b/src/main/resources/templates/fragments/inputField.html index da1de4772..7cef1ee9e 100644 --- a/src/main/resources/templates/fragments/inputField.html +++ b/src/main/resources/templates/fragments/inputField.html @@ -1,27 +1,26 @@ - - - - +
- -
+
- +
-
- - -
- + + - - Error + + Error
- - \ No newline at end of file + diff --git a/src/main/resources/templates/fragments/layout.html b/src/main/resources/templates/fragments/layout.html old mode 100644 new mode 100755 index 7c5cd0d86..c9094b2f0 --- a/src/main/resources/templates/fragments/layout.html +++ b/src/main/resources/templates/fragments/layout.html @@ -1,88 +1,94 @@ - + + - + - + + + + - - - - - - PetClinic :: a Spring Framework demonstration - - + - + PetClinic :: a Spring Framework demonstration + + + + + + -
-
+
+ +
- - -
-
-
-
-
- +
+
+
+
+
+ Sponsored by Pivotal
-
- + + + - \ No newline at end of file + diff --git a/src/main/resources/templates/fragments/selectField.html b/src/main/resources/templates/fragments/selectField.html index d248864d7..438474463 100644 --- a/src/main/resources/templates/fragments/selectField.html +++ b/src/main/resources/templates/fragments/selectField.html @@ -1,27 +1,29 @@ - - - - +
-
- +
- + - - Error + + Error
- \ No newline at end of file diff --git a/src/main/resources/templates/owners/createOrUpdateOwnerForm.html b/src/main/resources/templates/owners/createOrUpdateOwnerForm.html index 4cd6e115b..a34a39c7f 100644 --- a/src/main/resources/templates/owners/createOrUpdateOwnerForm.html +++ b/src/main/resources/templates/owners/createOrUpdateOwnerForm.html @@ -1,25 +1,30 @@ - - - + -

Owner

+

Owner

- - - - - + + + + +
- +
- - \ No newline at end of file + diff --git a/src/main/resources/templates/owners/findOwners.html b/src/main/resources/templates/owners/findOwners.html index 703351c7d..982be5e81 100644 --- a/src/main/resources/templates/owners/findOwners.html +++ b/src/main/resources/templates/owners/findOwners.html @@ -1,35 +1,35 @@ - - - + -

Find Owners

+

Find Owners

-
+
- +
- - -
+

Error

-
-
+
- +
- Add Owner -
- +
+ Add Owner - \ No newline at end of file + + diff --git a/src/main/resources/templates/owners/ownerDetails.html b/src/main/resources/templates/owners/ownerDetails.html index cc175cd13..746d569be 100644 --- a/src/main/resources/templates/owners/ownerDetails.html +++ b/src/main/resources/templates/owners/ownerDetails.html @@ -1,96 +1,83 @@ - + - - -

Owner Information

- -
- -
- -
- -
- - - - - - - - - - - - - - - - - - -
Name
Address
City
Telephone
- - Edit - Owner - Add - New Pet - -
-
-
-

Pets and Visits

- - - - - - + + + +
-
-
Name
-
-
Birth Date
-
-
Type
-
-
-
- - - - - + + + +

Owner Information

+ + +
Visit DateDescription
+ + + + + + + + + + + + + + + + +
Name
Address
City
Telephone
+ + Edit + Owner + Add + New Pet + +
+
+
+

Pets and Visits

+ + + + + + - - -
+
+
Name
+
+
Birth Date
+
+
Type
+
+
+
+ + + + + + + + + + - - - - - - - - - -
Visit DateDescription
Edit PetAdd Visit
-
- - - - +
Edit + PetAdd + Visit
+ + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/owners/ownersList.html b/src/main/resources/templates/owners/ownersList.html index 01223c1c5..478b37e5d 100644 --- a/src/main/resources/templates/owners/ownersList.html +++ b/src/main/resources/templates/owners/ownersList.html @@ -1,61 +1,33 @@ - + - + -

Owners

+

Owners

- - - - - - - - - - - - - - - - -
NameAddressCityTelephonePets
- - - - -
-
- Pages: - [ - - [[${i}]] - [[${i}]] - - - - - - - - - - - - - - - - - - -
- + + + + + + + + + + + + + + + + +
NameAddressCityTelephonePets
+ + + + +
- \ No newline at end of file + + diff --git a/src/main/resources/templates/pets/createOrUpdatePetForm.html b/src/main/resources/templates/pets/createOrUpdatePetForm.html index 396963d41..e4726e155 100644 --- a/src/main/resources/templates/pets/createOrUpdatePetForm.html +++ b/src/main/resources/templates/pets/createOrUpdatePetForm.html @@ -1,30 +1,34 @@ - - - +

- New - Pet + New + Pet

- +
- +
- - - + + +
- +
diff --git a/src/main/resources/templates/pets/createOrUpdateVisitForm.html b/src/main/resources/templates/pets/createOrUpdateVisitForm.html index 4f03e12d5..26a71378f 100644 --- a/src/main/resources/templates/pets/createOrUpdateVisitForm.html +++ b/src/main/resources/templates/pets/createOrUpdateVisitForm.html @@ -1,59 +1,61 @@ - - - +

- New + New Visit

- Pet + Pet - - - - + + + + - - - - + + + +
NameBirth DateTypeOwnerNameBirth DateTypeOwner
- - + +
- +

- Previous Visits + Previous Visits - - + + - - + +
DateDescriptionDateDescription
- \ No newline at end of file diff --git a/src/main/resources/templates/vets/vetList.html b/src/main/resources/templates/vets/vetList.html index e40fd654e..842411ecd 100644 --- a/src/main/resources/templates/vets/vetList.html +++ b/src/main/resources/templates/vets/vetList.html @@ -1,57 +1,35 @@ - + -

Veterinarians

+

Veterinarians

- - + + - + - +
NameSpecialtiesNameSpecialties
- none - none
-
- Pages: - [ - - [[${i}]] - [[${i}]] - - - - - - - - - - - - - - - - - - -
- - \ No newline at end of file + + + + + +
View as XMLView as JSON
+ + + diff --git a/src/main/resources/templates/welcome.html b/src/main/resources/templates/welcome.html index eb795c2f4..6b4ff0480 100644 --- a/src/main/resources/templates/welcome.html +++ b/src/main/resources/templates/welcome.html @@ -1,16 +1,16 @@ - + - + -

Welcome

-
-
- +

Welcome

+
+
+ +
-
- + \ No newline at end of file diff --git a/src/main/scss/petclinic.scss b/src/main/scss/petclinic.scss deleted file mode 100644 index 7f3e64ed2..000000000 --- a/src/main/scss/petclinic.scss +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright 2016 the original author or authors. - * - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - @import "bootstrap"; - -$icon-font-path: "../../webjars/bootstrap/fonts/"; - -$spring-green: #6db33f; -$spring-dark-green: #5fa134; -$spring-brown: #34302D; -$spring-grey: #838789; -$spring-light-grey: #f1f1f1; - -$body-bg: $spring-light-grey; -$text-color: $spring-brown; -$link-color: $spring-dark-green; -$link-hover-color: $spring-dark-green; - -$navbar-default-link-color: $spring-light-grey; -$navbar-default-link-active-color: $spring-light-grey; -$navbar-default-link-hover-color: $spring-light-grey; -$navbar-default-link-hover-bg: $spring-green; -$navbar-default-toggle-icon-bar-bg: $spring-light-grey; -$navbar-default-toggle-hover-bg: transparent; -$navbar-default-link-active-bg: $spring-green; - -$border-radius-base: 0; -$border-radius-large: 0; -$border-radius-small: 0; - -$nav-tabs-active-link-hover-color: $spring-light-grey; -$nav-tabs-active-link-hover-bg: $spring-brown; -$nav-tabs-active-link-hover-border-color: $spring-brown; -$nav-tabs-border-color: $spring-brown; - -$pagination-active-bg: $spring-brown; -$pagination-active-border: $spring-green; -$table-border-color: $spring-brown; - -.table > thead > tr > th { - background-color: lighten($spring-brown, 3%); - color: $spring-light-grey; -} - -.table-filter { - background-color: $spring-brown; - padding: 9px 12px; -} - -.nav > li > a { - color: $spring-grey; -} - -.btn-primary { - margin-top: 12px; - border-width: 2px; - transition: border 0.15s; - color: $spring-light-grey; - background: $spring-brown; - border-color: $spring-green; - -webkit-transition: border 0.15s; - -moz-transition: border 0.15s; - -o-transition: border 0.15s; - -ms-transition: border 0.15s; - - &:hover, - &:focus, - &:active, - &.active, - .open .dropdown-toggle { - background-color: $spring-brown; - border-color: $spring-brown; - } -} - - -.container .text-muted { - margin: 20px 0; -} - -code { - font-size: 80%; -} - -.xd-container { - margin-top: 40px; - margin-bottom: 100px; - padding-left: 5px; - padding-right: 5px; -} - -h1 { - margin-bottom: 15px -} - -.index-page--subtitle { - font-size: 16px; - line-height: 24px; - margin: 0 0 30px; -} - -.form-horizontal button.btn-inverse { - margin-left: 32px; -} - -#job-params-modal .modal-dialog { - width: 90%; - margin-left:auto; - margin-right:auto; -} - -[ng-cloak].splash { - display: block !important; -} -[ng-cloak] { - display: none; -} - -.splash { - background: $spring-green; - color: $spring-brown; - display: none; -} - -.error-page { - margin-top: 100px; - text-align: center; -} - -.error-page .error-title { - font-size: 24px; - line-height: 24px; - margin: 30px 0 0; -} - -table td { - vertical-align: middle; -} - -table td .progress { - margin-bottom: 0; -} - -table td.action-column { - width: 1px; -} - -.help-block { - color: lighten($text-color, 50%); // lighten the text some for contrast -} - -.xd-containers { - font-size: 15px; -} - -.cluster-view > table td { - vertical-align: top; -} - -.cluster-view .label, .cluster-view .column-block { - display: block; -} - -.cluster-view .input-group-addon { - width: 0%; -} - -.cluster-view { - margin-bottom: 0; -} - -.container-details-table th { - background-color: lighten($spring-brown, 3%); - color: $spring-light-grey; -} - -.status-help-content-table td { - color: $spring-brown; -} - -.logo { - width: 200px; -} - -.myspinner { - animation-name: spinner; - animation-duration: 2s; - animation-iteration-count: infinite; - animation-timing-function: linear; - - -webkit-transform-origin: 49% 50%; - -webkit-animation-name: spinner; - -webkit-animation-duration: 2s; - -webkit-animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; -} - -hr { - border-top: 1px dotted $spring-brown; -} - -@import "typography.scss"; -@import "header.scss"; -@import "responsive.scss"; diff --git a/src/main/wro/wro.properties b/src/main/wro/wro.properties new file mode 100644 index 000000000..bd6f3a814 --- /dev/null +++ b/src/main/wro/wro.properties @@ -0,0 +1,4 @@ +#List of preProcessors +preProcessors=lessCssImport +#List of postProcessors +postProcessors=less4j \ No newline at end of file diff --git a/src/main/wro/wro.xml b/src/main/wro/wro.xml new file mode 100644 index 000000000..590156d7e --- /dev/null +++ b/src/main/wro/wro.xml @@ -0,0 +1,6 @@ + + + classpath:META-INF/resources/webjars/bootstrap/3.3.6/less/bootstrap.less + /petclinic.less + + diff --git a/src/test/java/org/springframework/samples/petclinic/MySqlIntegrationTests.java b/src/test/java/org/springframework/samples/petclinic/MySqlIntegrationTests.java deleted file mode 100644 index 0cacc580a..000000000 --- a/src/test/java/org/springframework/samples/petclinic/MySqlIntegrationTests.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.samples.petclinic; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledInNativeImage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.restclient.RestTemplateBuilder; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.web.server.LocalServerPort; -import org.springframework.boot.testcontainers.service.connection.ServiceConnection; -import org.springframework.http.HttpStatus; -import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.samples.petclinic.vet.VetRepository; -import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.aot.DisabledInAotMode; -import org.springframework.web.client.RestTemplate; -import org.testcontainers.junit.jupiter.Container; -import org.testcontainers.junit.jupiter.Testcontainers; -import org.testcontainers.mysql.MySQLContainer; -import org.testcontainers.utility.DockerImageName; - -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) -@ActiveProfiles("mysql") -@Testcontainers(disabledWithoutDocker = true) -@DisabledInNativeImage -@DisabledInAotMode -class MySqlIntegrationTests { - - @ServiceConnection - @Container - static MySQLContainer container = new MySQLContainer(DockerImageName.parse("mysql:9.5")); - - @LocalServerPort - int port; - - @Autowired - private VetRepository vets; - - @Autowired - private RestTemplateBuilder builder; - - @Test - void testFindAll() { - vets.findAll(); - vets.findAll(); // served from cache - } - - @Test - void testOwnerDetails() { - RestTemplate template = builder.rootUri("http://localhost:" + port).build(); - ResponseEntity result = template.exchange(RequestEntity.get("/owners/1").build(), String.class); - assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK); - } - -} diff --git a/src/test/java/org/springframework/samples/petclinic/MysqlTestApplication.java b/src/test/java/org/springframework/samples/petclinic/MysqlTestApplication.java deleted file mode 100644 index e18b6cbaf..000000000 --- a/src/test/java/org/springframework/samples/petclinic/MysqlTestApplication.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.samples.petclinic; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.testcontainers.service.connection.ServiceConnection; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Profile; -import org.testcontainers.mysql.MySQLContainer; -import org.testcontainers.utility.DockerImageName; - -/** - * PetClinic Spring Boot Application. - * - * @author Dave Syer - */ -@Configuration -public class MysqlTestApplication { - - @ServiceConnection - @Profile("mysql") - @Bean - static MySQLContainer container() { - return new MySQLContainer(DockerImageName.parse("mysql:9.5")); - } - - public static void main(String[] args) { - SpringApplication.run(PetClinicApplication.class, "--spring.profiles.active=mysql", - "--spring.docker.compose.enabled=false"); - } - -} diff --git a/src/test/java/org/springframework/samples/petclinic/PetClinicIntegrationTests.java b/src/test/java/org/springframework/samples/petclinic/PetClinicIntegrationTests.java deleted file mode 100644 index 8c0451dfd..000000000 --- a/src/test/java/org/springframework/samples/petclinic/PetClinicIntegrationTests.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.samples.petclinic; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.restclient.RestTemplateBuilder; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.web.server.LocalServerPort; -import org.springframework.http.HttpStatus; -import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.samples.petclinic.vet.VetRepository; -import org.springframework.web.client.RestTemplate; - -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) -public class PetClinicIntegrationTests { - - @LocalServerPort - int port; - - @Autowired - private VetRepository vets; - - @Autowired - private RestTemplateBuilder builder; - - @Test - void testFindAll() { - vets.findAll(); - vets.findAll(); // served from cache - } - - @Test - void testOwnerDetails() { - RestTemplate template = builder.rootUri("http://localhost:" + port).build(); - ResponseEntity result = template.exchange(RequestEntity.get("/owners/1").build(), String.class); - assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK); - } - - public static void main(String[] args) { - SpringApplication.run(PetClinicApplication.class, args); - } - -} diff --git a/src/test/java/org/springframework/samples/petclinic/PostgresIntegrationTests.java b/src/test/java/org/springframework/samples/petclinic/PostgresIntegrationTests.java deleted file mode 100644 index f3c5181e7..000000000 --- a/src/test/java/org/springframework/samples/petclinic/PostgresIntegrationTests.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.samples.petclinic; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assumptions.assumeTrue; - -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledInNativeImage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.context.event.ApplicationPreparedEvent; -import org.springframework.boot.restclient.RestTemplateBuilder; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.web.server.LocalServerPort; -import org.springframework.context.ApplicationListener; -import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.core.env.EnumerablePropertySource; -import org.springframework.core.env.PropertySource; -import org.springframework.http.HttpStatus; -import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.samples.petclinic.vet.VetRepository; -import org.springframework.test.context.ActiveProfiles; -import org.springframework.web.client.RestTemplate; -import org.testcontainers.DockerClientFactory; - -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { "spring.docker.compose.skip.in-tests=false", // - "spring.docker.compose.start.arguments=--force-recreate,--renew-anon-volumes,postgres" }) -@ActiveProfiles("postgres") -@DisabledInNativeImage -public class PostgresIntegrationTests { - - @LocalServerPort - int port; - - @Autowired - private VetRepository vets; - - @Autowired - private RestTemplateBuilder builder; - - @BeforeAll - static void available() { - assumeTrue(DockerClientFactory.instance().isDockerAvailable(), "Docker not available"); - } - - public static void main(String[] args) { - new SpringApplicationBuilder(PetClinicApplication.class) // - .profiles("postgres") // - .properties( // - "spring.docker.compose.start.arguments=postgres" // - ) // - .listeners(new PropertiesLogger()) // - .run(args); - } - - @Test - void testFindAll() throws Exception { - vets.findAll(); - vets.findAll(); // served from cache - } - - @Test - void testOwnerDetails() { - RestTemplate template = builder.rootUri("http://localhost:" + port).build(); - ResponseEntity result = template.exchange(RequestEntity.get("/owners/1").build(), String.class); - assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK); - } - - static class PropertiesLogger implements ApplicationListener { - - private static final Log log = LogFactory.getLog(PropertiesLogger.class); - - private ConfigurableEnvironment environment; - - private boolean isFirstRun = true; - - @Override - public void onApplicationEvent(ApplicationPreparedEvent event) { - if (isFirstRun) { - environment = event.getApplicationContext().getEnvironment(); - printProperties(); - } - isFirstRun = false; - } - - public void printProperties() { - for (EnumerablePropertySource source : findPropertiesPropertySources()) { - log.info("PropertySource: " + source.getName()); - String[] names = source.getPropertyNames(); - Arrays.sort(names); - for (String name : names) { - String resolved = environment.getProperty(name); - - assertNotNull(resolved, "resolved environment property: " + name + " is null."); - - Object sourceProperty = source.getProperty(name); - - assertNotNull(sourceProperty, "source property was expecting an object but is null."); - - assertNotNull(sourceProperty.toString(), "source property toString() returned null."); - - String value = sourceProperty.toString(); - if (resolved.equals(value)) { - log.info(name + "=" + resolved); - } - else { - log.info(name + "=" + value + " OVERRIDDEN to " + resolved); - } - } - } - } - - private List> findPropertiesPropertySources() { - List> sources = new LinkedList<>(); - for (PropertySource source : environment.getPropertySources()) { - if (source instanceof EnumerablePropertySource enumerable) { - sources.add(enumerable); - } - } - return sources; - } - - } - -} diff --git a/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java b/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java index 559311ff8..b836d0cc2 100644 --- a/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java +++ b/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java @@ -1,19 +1,3 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.samples.petclinic.model; import static org.assertj.core.api.Assertions.assertThat; @@ -21,40 +5,41 @@ import static org.assertj.core.api.Assertions.assertThat; import java.util.Locale; import java.util.Set; -import org.junit.jupiter.api.Test; +import javax.validation.ConstraintViolation; +import javax.validation.Validator; + +import org.junit.Test; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validator; - /** - * @author Michael Isvy Simple test to make sure that Bean Validation is working (useful - * when upgrading to a new version of Hibernate Validator/ Bean Validation) + * @author Michael Isvy + * Simple test to make sure that Bean Validation is working + * (useful when upgrading to a new version of Hibernate Validator/ Bean Validation) */ -class ValidatorTests { +public class ValidatorTests { - private Validator createValidator() { - LocalValidatorFactoryBean localValidatorFactoryBean = new LocalValidatorFactoryBean(); - localValidatorFactoryBean.afterPropertiesSet(); - return localValidatorFactoryBean; - } + private Validator createValidator() { + LocalValidatorFactoryBean localValidatorFactoryBean = new LocalValidatorFactoryBean(); + localValidatorFactoryBean.afterPropertiesSet(); + return localValidatorFactoryBean; + } - @Test - void shouldNotValidateWhenFirstNameEmpty() { + @Test + public void shouldNotValidateWhenFirstNameEmpty() { - LocaleContextHolder.setLocale(Locale.ENGLISH); - Person person = new Person(); - person.setFirstName(""); - person.setLastName("smith"); + LocaleContextHolder.setLocale(Locale.ENGLISH); + Person person = new Person(); + person.setFirstName(""); + person.setLastName("smith"); - Validator validator = createValidator(); - Set> constraintViolations = validator.validate(person); + Validator validator = createValidator(); + Set> constraintViolations = validator.validate(person); - assertThat(constraintViolations).hasSize(1); - ConstraintViolation violation = constraintViolations.iterator().next(); - assertThat(violation.getPropertyPath()).hasToString("firstName"); - assertThat(violation.getMessage()).isEqualTo("must not be blank"); - } + assertThat(constraintViolations.size()).isEqualTo(1); + ConstraintViolation violation = constraintViolations.iterator().next(); + assertThat(violation.getPropertyPath().toString()).isEqualTo("firstName"); + assertThat(violation.getMessage()).isEqualTo("may not be empty"); + } } diff --git a/src/test/java/org/springframework/samples/petclinic/owner/OwnerControllerTests.java b/src/test/java/org/springframework/samples/petclinic/owner/OwnerControllerTests.java index bcab19749..7fccb3b04 100644 --- a/src/test/java/org/springframework/samples/petclinic/owner/OwnerControllerTests.java +++ b/src/test/java/org/springframework/samples/petclinic/owner/OwnerControllerTests.java @@ -1,251 +1,179 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.samples.petclinic.owner; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledInNativeImage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageImpl; -import org.springframework.data.domain.Pageable; -import org.springframework.test.context.aot.DisabledInAotMode; -import org.springframework.test.context.bean.override.mockito.MockitoBean; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; - -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - -import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.greaterThan; -import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasProperty; -import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; + +import org.assertj.core.util.Lists; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.samples.petclinic.owner.Owner; +import org.springframework.samples.petclinic.owner.OwnerController; +import org.springframework.samples.petclinic.owner.OwnerRepository; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; /** * Test class for {@link OwnerController} * * @author Colin But - * @author Wick Dynex */ +@RunWith(SpringRunner.class) @WebMvcTest(OwnerController.class) -@DisabledInNativeImage -@DisabledInAotMode -class OwnerControllerTests { +public class OwnerControllerTests { - private static final int TEST_OWNER_ID = 1; + private static final int TEST_OWNER_ID = 1; - @Autowired - private MockMvc mockMvc; + @Autowired + private MockMvc mockMvc; - @MockitoBean - private OwnerRepository owners; + @MockBean + private OwnerRepository owners; - private Owner george() { - Owner george = new Owner(); - george.setId(TEST_OWNER_ID); - george.setFirstName("George"); - george.setLastName("Franklin"); - george.setAddress("110 W. Liberty St."); - george.setCity("Madison"); - george.setTelephone("6085551023"); - Pet max = new Pet(); - PetType dog = new PetType(); - dog.setName("dog"); - max.setType(dog); - max.setName("Max"); - max.setBirthDate(LocalDate.now()); - george.addPet(max); - max.setId(1); - return george; - } + private Owner george; - @BeforeEach - void setup() { + @Before + public void setup() { + george = new Owner(); + george.setId(TEST_OWNER_ID); + george.setFirstName("George"); + george.setLastName("Franklin"); + george.setAddress("110 W. Liberty St."); + george.setCity("Madison"); + george.setTelephone("6085551023"); + given(this.owners.findById(TEST_OWNER_ID)).willReturn(george); + } - Owner george = george(); - given(this.owners.findByLastNameStartingWith(eq("Franklin"), any(Pageable.class))) - .willReturn(new PageImpl<>(List.of(george))); + @Test + public void testInitCreationForm() throws Exception { + mockMvc.perform(get("/owners/new")) + .andExpect(status().isOk()) + .andExpect(model().attributeExists("owner")) + .andExpect(view().name("owners/createOrUpdateOwnerForm")); + } - given(this.owners.findById(TEST_OWNER_ID)).willReturn(Optional.of(george)); - Visit visit = new Visit(); - visit.setDate(LocalDate.now()); - george.getPet("Max").getVisits().add(visit); + @Test + public void testProcessCreationFormSuccess() throws Exception { + mockMvc.perform(post("/owners/new") + .param("firstName", "Joe") + .param("lastName", "Bloggs") + .param("address", "123 Caramel Street") + .param("city", "London") + .param("telephone", "01316761638") + ) + .andExpect(status().is3xxRedirection()); + } - } + @Test + public void testProcessCreationFormHasErrors() throws Exception { + mockMvc.perform(post("/owners/new") + .param("firstName", "Joe") + .param("lastName", "Bloggs") + .param("city", "London") + ) + .andExpect(status().isOk()) + .andExpect(model().attributeHasErrors("owner")) + .andExpect(model().attributeHasFieldErrors("owner", "address")) + .andExpect(model().attributeHasFieldErrors("owner", "telephone")) + .andExpect(view().name("owners/createOrUpdateOwnerForm")); + } - @Test - void testInitCreationForm() throws Exception { - mockMvc.perform(get("/owners/new")) - .andExpect(status().isOk()) - .andExpect(model().attributeExists("owner")) - .andExpect(view().name("owners/createOrUpdateOwnerForm")); - } + @Test + public void testInitFindForm() throws Exception { + mockMvc.perform(get("/owners/find")) + .andExpect(status().isOk()) + .andExpect(model().attributeExists("owner")) + .andExpect(view().name("owners/findOwners")); + } - @Test - void testProcessCreationFormSuccess() throws Exception { - mockMvc - .perform(post("/owners/new").param("firstName", "Joe") - .param("lastName", "Bloggs") - .param("address", "123 Caramel Street") - .param("city", "London") - .param("telephone", "1316761638")) - .andExpect(status().is3xxRedirection()); - } + @Test + public void testProcessFindFormSuccess() throws Exception { + given(this.owners.findByLastName("")).willReturn(Lists.newArrayList(george, new Owner())); + mockMvc.perform(get("/owners")) + .andExpect(status().isOk()) + .andExpect(view().name("owners/ownersList")); + } - @Test - void testProcessCreationFormHasErrors() throws Exception { - mockMvc - .perform(post("/owners/new").param("firstName", "Joe").param("lastName", "Bloggs").param("city", "London")) - .andExpect(status().isOk()) - .andExpect(model().attributeHasErrors("owner")) - .andExpect(model().attributeHasFieldErrors("owner", "address")) - .andExpect(model().attributeHasFieldErrors("owner", "telephone")) - .andExpect(view().name("owners/createOrUpdateOwnerForm")); - } + @Test + public void testProcessFindFormByLastName() throws Exception { + given(this.owners.findByLastName(george.getLastName())).willReturn(Lists.newArrayList(george)); + mockMvc.perform(get("/owners") + .param("lastName", "Franklin") + ) + .andExpect(status().is3xxRedirection()) + .andExpect(view().name("redirect:/owners/" + TEST_OWNER_ID)); + } - @Test - void testInitFindForm() throws Exception { - mockMvc.perform(get("/owners/find")) - .andExpect(status().isOk()) - .andExpect(model().attributeExists("owner")) - .andExpect(view().name("owners/findOwners")); - } + @Test + public void testProcessFindFormNoOwnersFound() throws Exception { + mockMvc.perform(get("/owners") + .param("lastName", "Unknown Surname") + ) + .andExpect(status().isOk()) + .andExpect(model().attributeHasFieldErrors("owner", "lastName")) + .andExpect(model().attributeHasFieldErrorCode("owner", "lastName", "notFound")) + .andExpect(view().name("owners/findOwners")); + } - @Test - void testProcessFindFormSuccess() throws Exception { - Page tasks = new PageImpl<>(List.of(george(), new Owner())); - when(this.owners.findByLastNameStartingWith(anyString(), any(Pageable.class))).thenReturn(tasks); - mockMvc.perform(get("/owners?page=1")).andExpect(status().isOk()).andExpect(view().name("owners/ownersList")); - } + @Test + public void testInitUpdateOwnerForm() throws Exception { + mockMvc.perform(get("/owners/{ownerId}/edit", TEST_OWNER_ID)) + .andExpect(status().isOk()) + .andExpect(model().attributeExists("owner")) + .andExpect(model().attribute("owner", hasProperty("lastName", is("Franklin")))) + .andExpect(model().attribute("owner", hasProperty("firstName", is("George")))) + .andExpect(model().attribute("owner", hasProperty("address", is("110 W. Liberty St.")))) + .andExpect(model().attribute("owner", hasProperty("city", is("Madison")))) + .andExpect(model().attribute("owner", hasProperty("telephone", is("6085551023")))) + .andExpect(view().name("owners/createOrUpdateOwnerForm")); + } - @Test - void testProcessFindFormByLastName() throws Exception { - Page tasks = new PageImpl<>(List.of(george())); - when(this.owners.findByLastNameStartingWith(eq("Franklin"), any(Pageable.class))).thenReturn(tasks); - mockMvc.perform(get("/owners?page=1").param("lastName", "Franklin")) - .andExpect(status().is3xxRedirection()) - .andExpect(view().name("redirect:/owners/" + TEST_OWNER_ID)); - } + @Test + public void testProcessUpdateOwnerFormSuccess() throws Exception { + mockMvc.perform(post("/owners/{ownerId}/edit", TEST_OWNER_ID) + .param("firstName", "Joe") + .param("lastName", "Bloggs") + .param("address", "123 Caramel Street") + .param("city", "London") + .param("telephone", "01616291589") + ) + .andExpect(status().is3xxRedirection()) + .andExpect(view().name("redirect:/owners/{ownerId}")); + } - @Test - void testProcessFindFormNoOwnersFound() throws Exception { - Page tasks = new PageImpl<>(List.of()); - when(this.owners.findByLastNameStartingWith(eq("Unknown Surname"), any(Pageable.class))).thenReturn(tasks); - mockMvc.perform(get("/owners?page=1").param("lastName", "Unknown Surname")) - .andExpect(status().isOk()) - .andExpect(model().attributeHasFieldErrors("owner", "lastName")) - .andExpect(model().attributeHasFieldErrorCode("owner", "lastName", "notFound")) - .andExpect(view().name("owners/findOwners")); + @Test + public void testProcessUpdateOwnerFormHasErrors() throws Exception { + mockMvc.perform(post("/owners/{ownerId}/edit", TEST_OWNER_ID) + .param("firstName", "Joe") + .param("lastName", "Bloggs") + .param("city", "London") + ) + .andExpect(status().isOk()) + .andExpect(model().attributeHasErrors("owner")) + .andExpect(model().attributeHasFieldErrors("owner", "address")) + .andExpect(model().attributeHasFieldErrors("owner", "telephone")) + .andExpect(view().name("owners/createOrUpdateOwnerForm")); + } - } - - @Test - void testInitUpdateOwnerForm() throws Exception { - mockMvc.perform(get("/owners/{ownerId}/edit", TEST_OWNER_ID)) - .andExpect(status().isOk()) - .andExpect(model().attributeExists("owner")) - .andExpect(model().attribute("owner", hasProperty("lastName", is("Franklin")))) - .andExpect(model().attribute("owner", hasProperty("firstName", is("George")))) - .andExpect(model().attribute("owner", hasProperty("address", is("110 W. Liberty St.")))) - .andExpect(model().attribute("owner", hasProperty("city", is("Madison")))) - .andExpect(model().attribute("owner", hasProperty("telephone", is("6085551023")))) - .andExpect(view().name("owners/createOrUpdateOwnerForm")); - } - - @Test - void testProcessUpdateOwnerFormSuccess() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/edit", TEST_OWNER_ID).param("firstName", "Joe") - .param("lastName", "Bloggs") - .param("address", "123 Caramel Street") - .param("city", "London") - .param("telephone", "1616291589")) - .andExpect(status().is3xxRedirection()) - .andExpect(view().name("redirect:/owners/{ownerId}")); - } - - @Test - void testProcessUpdateOwnerFormUnchangedSuccess() throws Exception { - mockMvc.perform(post("/owners/{ownerId}/edit", TEST_OWNER_ID)) - .andExpect(status().is3xxRedirection()) - .andExpect(view().name("redirect:/owners/{ownerId}")); - } - - @Test - void testProcessUpdateOwnerFormHasErrors() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/edit", TEST_OWNER_ID).param("firstName", "Joe") - .param("lastName", "Bloggs") - .param("address", "") - .param("telephone", "")) - .andExpect(status().isOk()) - .andExpect(model().attributeHasErrors("owner")) - .andExpect(model().attributeHasFieldErrors("owner", "address")) - .andExpect(model().attributeHasFieldErrors("owner", "telephone")) - .andExpect(view().name("owners/createOrUpdateOwnerForm")); - } - - @Test - void testShowOwner() throws Exception { - mockMvc.perform(get("/owners/{ownerId}", TEST_OWNER_ID)) - .andExpect(status().isOk()) - .andExpect(model().attribute("owner", hasProperty("lastName", is("Franklin")))) - .andExpect(model().attribute("owner", hasProperty("firstName", is("George")))) - .andExpect(model().attribute("owner", hasProperty("address", is("110 W. Liberty St.")))) - .andExpect(model().attribute("owner", hasProperty("city", is("Madison")))) - .andExpect(model().attribute("owner", hasProperty("telephone", is("6085551023")))) - .andExpect(model().attribute("owner", hasProperty("pets", not(empty())))) - .andExpect(model().attribute("owner", - hasProperty("pets", hasItem(hasProperty("visits", hasSize(greaterThan(0))))))) - .andExpect(view().name("owners/ownerDetails")); - } - - @Test - public void testProcessUpdateOwnerFormWithIdMismatch() throws Exception { - int pathOwnerId = 1; - - Owner owner = new Owner(); - owner.setId(2); - owner.setFirstName("John"); - owner.setLastName("Doe"); - owner.setAddress("Center Street"); - owner.setCity("New York"); - owner.setTelephone("0123456789"); - - when(owners.findById(pathOwnerId)).thenReturn(Optional.of(owner)); - - mockMvc.perform(MockMvcRequestBuilders.post("/owners/{ownerId}/edit", pathOwnerId).flashAttr("owner", owner)) - .andExpect(status().is3xxRedirection()) - .andExpect(redirectedUrl("/owners/" + pathOwnerId + "/edit")) - .andExpect(flash().attributeExists("error")); - } + @Test + public void testShowOwner() throws Exception { + mockMvc.perform(get("/owners/{ownerId}", TEST_OWNER_ID)) + .andExpect(status().isOk()) + .andExpect(model().attribute("owner", hasProperty("lastName", is("Franklin")))) + .andExpect(model().attribute("owner", hasProperty("firstName", is("George")))) + .andExpect(model().attribute("owner", hasProperty("address", is("110 W. Liberty St.")))) + .andExpect(model().attribute("owner", hasProperty("city", is("Madison")))) + .andExpect(model().attribute("owner", hasProperty("telephone", is("6085551023")))) + .andExpect(view().name("owners/ownerDetails")); + } } diff --git a/src/test/java/org/springframework/samples/petclinic/owner/PetControllerTests.java b/src/test/java/org/springframework/samples/petclinic/owner/PetControllerTests.java old mode 100644 new mode 100755 index 391bb3dbb..f95d7c87c --- a/src/test/java/org/springframework/samples/petclinic/owner/PetControllerTests.java +++ b/src/test/java/org/springframework/samples/petclinic/owner/PetControllerTests.java @@ -1,37 +1,5 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.samples.petclinic.owner; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledInNativeImage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.FilterType; -import org.springframework.test.context.aot.DisabledInAotMode; -import org.springframework.test.context.bean.override.mockito.MockitoBean; -import org.springframework.test.web.servlet.MockMvc; - -import java.time.LocalDate; -import java.util.List; -import java.util.Optional; - import static org.mockito.BDDMockito.given; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; @@ -39,173 +7,123 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; +import org.assertj.core.util.Lists; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.FilterType; +import org.springframework.samples.petclinic.owner.Owner; +import org.springframework.samples.petclinic.owner.OwnerRepository; +import org.springframework.samples.petclinic.owner.Pet; +import org.springframework.samples.petclinic.owner.PetController; +import org.springframework.samples.petclinic.owner.PetRepository; +import org.springframework.samples.petclinic.owner.PetType; +import org.springframework.samples.petclinic.owner.PetTypeFormatter; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; + /** * Test class for the {@link PetController} * * @author Colin But - * @author Wick Dynex */ +@RunWith(SpringRunner.class) @WebMvcTest(value = PetController.class, - includeFilters = @ComponentScan.Filter(value = PetTypeFormatter.class, type = FilterType.ASSIGNABLE_TYPE)) -@DisabledInNativeImage -@DisabledInAotMode -class PetControllerTests { + includeFilters = @ComponentScan.Filter( + value = PetTypeFormatter.class, + type = FilterType.ASSIGNABLE_TYPE)) +public class PetControllerTests { - private static final int TEST_OWNER_ID = 1; + private static final int TEST_OWNER_ID = 1; + private static final int TEST_PET_ID = 1; - private static final int TEST_PET_ID = 1; - @Autowired - private MockMvc mockMvc; + @Autowired + private MockMvc mockMvc; - @MockitoBean - private OwnerRepository owners; + @MockBean + private PetRepository pets; - @MockitoBean - private PetTypeRepository types; + @MockBean + private OwnerRepository owners; - @BeforeEach - void setup() { - PetType cat = new PetType(); - cat.setId(3); - cat.setName("hamster"); - given(this.types.findPetTypes()).willReturn(List.of(cat)); + @Before + public void setup() { + PetType cat = new PetType(); + cat.setId(3); + cat.setName("hamster"); + given(this.pets.findPetTypes()).willReturn(Lists.newArrayList(cat)); + given(this.owners.findById(TEST_OWNER_ID)).willReturn(new Owner()); + given(this.pets.findById(TEST_PET_ID)).willReturn(new Pet()); - Owner owner = new Owner(); - Pet pet = new Pet(); - Pet dog = new Pet(); - owner.addPet(pet); - owner.addPet(dog); - pet.setId(TEST_PET_ID); - dog.setId(TEST_PET_ID + 1); - pet.setName("petty"); - dog.setName("doggy"); - given(this.owners.findById(TEST_OWNER_ID)).willReturn(Optional.of(owner)); - } + } - @Test - void testInitCreationForm() throws Exception { - mockMvc.perform(get("/owners/{ownerId}/pets/new", TEST_OWNER_ID)) - .andExpect(status().isOk()) - .andExpect(view().name("pets/createOrUpdatePetForm")) - .andExpect(model().attributeExists("pet")); - } + @Test + public void testInitCreationForm() throws Exception { + mockMvc.perform(get("/owners/{ownerId}/pets/new", TEST_OWNER_ID)) + .andExpect(status().isOk()) + .andExpect(view().name("pets/createOrUpdatePetForm")) + .andExpect(model().attributeExists("pet")); + } - @Test - void testProcessCreationFormSuccess() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/pets/new", TEST_OWNER_ID).param("name", "Betty") - .param("type", "hamster") - .param("birthDate", "2015-02-12")) - .andExpect(status().is3xxRedirection()) - .andExpect(view().name("redirect:/owners/{ownerId}")); - } + @Test + public void testProcessCreationFormSuccess() throws Exception { + mockMvc.perform(post("/owners/{ownerId}/pets/new", TEST_OWNER_ID) + .param("name", "Betty") + .param("type", "hamster") + .param("birthDate", "2015-02-12") + ) + .andExpect(status().is3xxRedirection()) + .andExpect(view().name("redirect:/owners/{ownerId}")); + } - @Nested - class ProcessCreationFormHasErrors { + @Test + public void testProcessCreationFormHasErrors() throws Exception { + mockMvc.perform(post("/owners/{ownerId}/pets/new", TEST_OWNER_ID) + .param("name", "Betty") + .param("birthDate", "2015-02-12") + ) + .andExpect(model().attributeHasNoErrors("owner")) + .andExpect(model().attributeHasErrors("pet")) + .andExpect(model().attributeHasFieldErrors("pet", "type")) + .andExpect(model().attributeHasFieldErrorCode("pet", "type", "required")) + .andExpect(status().isOk()) + .andExpect(view().name("pets/createOrUpdatePetForm")); + } - @Test - void testProcessCreationFormWithBlankName() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/pets/new", TEST_OWNER_ID).param("name", "\t \n") - .param("birthDate", "2015-02-12")) - .andExpect(model().attributeHasNoErrors("owner")) - .andExpect(model().attributeHasErrors("pet")) - .andExpect(model().attributeHasFieldErrors("pet", "name")) - .andExpect(model().attributeHasFieldErrorCode("pet", "name", "required")) - .andExpect(status().isOk()) - .andExpect(view().name("pets/createOrUpdatePetForm")); - } + @Test + public void testInitUpdateForm() throws Exception { + mockMvc.perform(get("/owners/{ownerId}/pets/{petId}/edit", TEST_OWNER_ID, TEST_PET_ID)) + .andExpect(status().isOk()) + .andExpect(model().attributeExists("pet")) + .andExpect(view().name("pets/createOrUpdatePetForm")); + } - @Test - void testProcessCreationFormWithDuplicateName() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/pets/new", TEST_OWNER_ID).param("name", "petty") - .param("birthDate", "2015-02-12")) - .andExpect(model().attributeHasNoErrors("owner")) - .andExpect(model().attributeHasErrors("pet")) - .andExpect(model().attributeHasFieldErrors("pet", "name")) - .andExpect(model().attributeHasFieldErrorCode("pet", "name", "duplicate")) - .andExpect(status().isOk()) - .andExpect(view().name("pets/createOrUpdatePetForm")); - } + @Test + public void testProcessUpdateFormSuccess() throws Exception { + mockMvc.perform(post("/owners/{ownerId}/pets/{petId}/edit", TEST_OWNER_ID, TEST_PET_ID) + .param("name", "Betty") + .param("type", "hamster") + .param("birthDate", "2015-02-12") + ) + .andExpect(status().is3xxRedirection()) + .andExpect(view().name("redirect:/owners/{ownerId}")); + } - @Test - void testProcessCreationFormWithMissingPetType() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/pets/new", TEST_OWNER_ID).param("name", "Betty") - .param("birthDate", "2015-02-12")) - .andExpect(model().attributeHasNoErrors("owner")) - .andExpect(model().attributeHasErrors("pet")) - .andExpect(model().attributeHasFieldErrors("pet", "type")) - .andExpect(model().attributeHasFieldErrorCode("pet", "type", "required")) - .andExpect(status().isOk()) - .andExpect(view().name("pets/createOrUpdatePetForm")); - } - - @Test - void testProcessCreationFormWithInvalidBirthDate() throws Exception { - LocalDate currentDate = LocalDate.now(); - String futureBirthDate = currentDate.plusMonths(1).toString(); - - mockMvc - .perform(post("/owners/{ownerId}/pets/new", TEST_OWNER_ID).param("name", "Betty") - .param("birthDate", futureBirthDate)) - .andExpect(model().attributeHasNoErrors("owner")) - .andExpect(model().attributeHasErrors("pet")) - .andExpect(model().attributeHasFieldErrors("pet", "birthDate")) - .andExpect(model().attributeHasFieldErrorCode("pet", "birthDate", "typeMismatch.birthDate")) - .andExpect(status().isOk()) - .andExpect(view().name("pets/createOrUpdatePetForm")); - } - - @Test - void testInitUpdateForm() throws Exception { - mockMvc.perform(get("/owners/{ownerId}/pets/{petId}/edit", TEST_OWNER_ID, TEST_PET_ID)) - .andExpect(status().isOk()) - .andExpect(model().attributeExists("pet")) - .andExpect(view().name("pets/createOrUpdatePetForm")); - } - - } - - @Test - void testProcessUpdateFormSuccess() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/pets/{petId}/edit", TEST_OWNER_ID, TEST_PET_ID).param("name", "Betty") - .param("type", "hamster") - .param("birthDate", "2015-02-12")) - .andExpect(status().is3xxRedirection()) - .andExpect(view().name("redirect:/owners/{ownerId}")); - } - - @Nested - class ProcessUpdateFormHasErrors { - - @Test - void testProcessUpdateFormWithInvalidBirthDate() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/pets/{petId}/edit", TEST_OWNER_ID, TEST_PET_ID).param("name", " ") - .param("birthDate", "2015/02/12")) - .andExpect(model().attributeHasNoErrors("owner")) - .andExpect(model().attributeHasErrors("pet")) - .andExpect(model().attributeHasFieldErrors("pet", "birthDate")) - .andExpect(model().attributeHasFieldErrorCode("pet", "birthDate", "typeMismatch")) - .andExpect(view().name("pets/createOrUpdatePetForm")); - } - - @Test - void testProcessUpdateFormWithBlankName() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/pets/{petId}/edit", TEST_OWNER_ID, TEST_PET_ID).param("name", " ") - .param("birthDate", "2015-02-12")) - .andExpect(model().attributeHasNoErrors("owner")) - .andExpect(model().attributeHasErrors("pet")) - .andExpect(model().attributeHasFieldErrors("pet", "name")) - .andExpect(model().attributeHasFieldErrorCode("pet", "name", "required")) - .andExpect(view().name("pets/createOrUpdatePetForm")); - } - - } + @Test + public void testProcessUpdateFormHasErrors() throws Exception { + mockMvc.perform(post("/owners/{ownerId}/pets/{petId}/edit", TEST_OWNER_ID, TEST_PET_ID) + .param("name", "Betty") + .param("birthDate", "2015/02/12") + ) + .andExpect(model().attributeHasNoErrors("owner")) + .andExpect(model().attributeHasErrors("pet")) + .andExpect(status().isOk()) + .andExpect(view().name("pets/createOrUpdatePetForm")); + } } diff --git a/src/test/java/org/springframework/samples/petclinic/owner/PetTypeFormatterTests.java b/src/test/java/org/springframework/samples/petclinic/owner/PetTypeFormatterTests.java index fe4a5f7f7..f332257bc 100644 --- a/src/test/java/org/springframework/samples/petclinic/owner/PetTypeFormatterTests.java +++ b/src/test/java/org/springframework/samples/petclinic/owner/PetTypeFormatterTests.java @@ -1,23 +1,6 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.samples.petclinic.owner; -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.BDDMockito.given; +import static org.junit.Assert.assertEquals; import java.text.ParseException; import java.util.ArrayList; @@ -25,73 +8,73 @@ import java.util.Collection; import java.util.List; import java.util.Locale; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledInNativeImage; -import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.Mockito; +import org.mockito.runners.MockitoJUnitRunner; +import org.springframework.samples.petclinic.owner.PetRepository; +import org.springframework.samples.petclinic.owner.PetType; +import org.springframework.samples.petclinic.owner.PetTypeFormatter; /** * Test class for {@link PetTypeFormatter} * * @author Colin But */ -@ExtendWith(MockitoExtension.class) -@DisabledInNativeImage -class PetTypeFormatterTests { +@RunWith(MockitoJUnitRunner.class) +public class PetTypeFormatterTests { - @Mock - private PetTypeRepository types; + @Mock + private PetRepository pets; - private PetTypeFormatter petTypeFormatter; + private PetTypeFormatter petTypeFormatter; - @BeforeEach - void setup() { - this.petTypeFormatter = new PetTypeFormatter(types); - } + @Before + public void setup() { + this.petTypeFormatter = new PetTypeFormatter(pets); + } - @Test - void testPrint() { - PetType petType = new PetType(); - petType.setName("Hamster"); - String petTypeName = this.petTypeFormatter.print(petType, Locale.ENGLISH); - assertThat(petTypeName).isEqualTo("Hamster"); - } + @Test + public void testPrint() { + PetType petType = new PetType(); + petType.setName("Hamster"); + String petTypeName = this.petTypeFormatter.print(petType, Locale.ENGLISH); + assertEquals("Hamster", petTypeName); + } - @Test - void shouldParse() throws ParseException { - given(types.findPetTypes()).willReturn(makePetTypes()); - PetType petType = petTypeFormatter.parse("Bird", Locale.ENGLISH); - assertThat(petType.getName()).isEqualTo("Bird"); - } + @Test + public void shouldParse() throws ParseException { + Mockito.when(this.pets.findPetTypes()).thenReturn(makePetTypes()); + PetType petType = petTypeFormatter.parse("Bird", Locale.ENGLISH); + assertEquals("Bird", petType.getName()); + } - @Test - void shouldThrowParseException() { - given(types.findPetTypes()).willReturn(makePetTypes()); - Assertions.assertThrows(ParseException.class, () -> { - petTypeFormatter.parse("Fish", Locale.ENGLISH); - }); - } + @Test(expected = ParseException.class) + public void shouldThrowParseException() throws ParseException { + Mockito.when(this.pets.findPetTypes()).thenReturn(makePetTypes()); + petTypeFormatter.parse("Fish", Locale.ENGLISH); + } - /** - * Helper method to produce some sample pet types just for test purpose - * @return {@link Collection} of {@link PetType} - */ - private List makePetTypes() { - List petTypes = new ArrayList<>(); - petTypes.add(new PetType() { - { - setName("Dog"); - } - }); - petTypes.add(new PetType() { - { - setName("Bird"); - } - }); - return petTypes; - } + /** + * Helper method to produce some sample pet types just for test purpose + * + * @return {@link Collection} of {@link PetType} + */ + private List makePetTypes() { + List petTypes = new ArrayList<>(); + petTypes.add(new PetType(){ + { + setName("Dog"); + } + }); + petTypes.add(new PetType(){ + { + setName("Bird"); + } + }); + return petTypes; + } } diff --git a/src/test/java/org/springframework/samples/petclinic/owner/PetValidatorTests.java b/src/test/java/org/springframework/samples/petclinic/owner/PetValidatorTests.java deleted file mode 100644 index 1a153bcbc..000000000 --- a/src/test/java/org/springframework/samples/petclinic/owner/PetValidatorTests.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2012-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.samples.petclinic.owner; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledInNativeImage; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; -import org.springframework.validation.Errors; -import org.springframework.validation.MapBindingResult; - -import java.time.LocalDate; -import java.util.HashMap; - -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * Test class for {@link PetValidator} - * - * @author Wick Dynex - */ -@ExtendWith(MockitoExtension.class) -@DisabledInNativeImage -public class PetValidatorTests { - - private PetValidator petValidator; - - private Pet pet; - - private PetType petType; - - private Errors errors; - - private static final String petName = "Buddy"; - - private static final String petTypeName = "Dog"; - - private static final LocalDate petBirthDate = LocalDate.of(1990, 1, 1); - - @BeforeEach - void setUp() { - petValidator = new PetValidator(); - pet = new Pet(); - petType = new PetType(); - errors = new MapBindingResult(new HashMap<>(), "pet"); - } - - @Test - void testValidate() { - petType.setName(petTypeName); - pet.setName(petName); - pet.setType(petType); - pet.setBirthDate(petBirthDate); - - petValidator.validate(pet, errors); - - assertFalse(errors.hasErrors()); - } - - @Nested - class ValidateHasErrors { - - @Test - void testValidateWithInvalidPetName() { - petType.setName(petTypeName); - pet.setName(""); - pet.setType(petType); - pet.setBirthDate(petBirthDate); - - petValidator.validate(pet, errors); - - assertTrue(errors.hasFieldErrors("name")); - } - - @Test - void testValidateWithInvalidPetType() { - pet.setName(petName); - pet.setType(null); - pet.setBirthDate(petBirthDate); - - petValidator.validate(pet, errors); - - assertTrue(errors.hasFieldErrors("type")); - } - - @Test - void testValidateWithInvalidBirthDate() { - petType.setName(petTypeName); - pet.setName(petName); - pet.setType(petType); - pet.setBirthDate(null); - - petValidator.validate(pet, errors); - - assertTrue(errors.hasFieldErrors("birthDate")); - } - - } - -} diff --git a/src/test/java/org/springframework/samples/petclinic/owner/VisitControllerTests.java b/src/test/java/org/springframework/samples/petclinic/owner/VisitControllerTests.java index 781de3894..08d61360e 100644 --- a/src/test/java/org/springframework/samples/petclinic/owner/VisitControllerTests.java +++ b/src/test/java/org/springframework/samples/petclinic/owner/VisitControllerTests.java @@ -1,19 +1,3 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.samples.petclinic.owner; import static org.mockito.BDDMockito.given; @@ -23,72 +7,69 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledInNativeImage; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; -import org.springframework.test.context.aot.DisabledInAotMode; -import org.springframework.test.context.bean.override.mockito.MockitoBean; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.samples.petclinic.owner.Pet; +import org.springframework.samples.petclinic.owner.PetRepository; +import org.springframework.samples.petclinic.owner.VisitController; +import org.springframework.samples.petclinic.visit.VisitRepository; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; -import java.util.Optional; - /** * Test class for {@link VisitController} * * @author Colin But - * @author Wick Dynex */ +@RunWith(SpringRunner.class) @WebMvcTest(VisitController.class) -@DisabledInNativeImage -@DisabledInAotMode -class VisitControllerTests { +public class VisitControllerTests { - private static final int TEST_OWNER_ID = 1; + private static final int TEST_PET_ID = 1; - private static final int TEST_PET_ID = 1; + @Autowired + private MockMvc mockMvc; - @Autowired - private MockMvc mockMvc; + @MockBean + private VisitRepository visits; - @MockitoBean - private OwnerRepository owners; + @MockBean + private PetRepository pets; - @BeforeEach - void init() { - Owner owner = new Owner(); - Pet pet = new Pet(); - owner.addPet(pet); - pet.setId(TEST_PET_ID); - given(this.owners.findById(TEST_OWNER_ID)).willReturn(Optional.of(owner)); - } + @Before + public void init() { + given(this.pets.findById(TEST_PET_ID)).willReturn(new Pet()); + } - @Test - void testInitNewVisitForm() throws Exception { - mockMvc.perform(get("/owners/{ownerId}/pets/{petId}/visits/new", TEST_OWNER_ID, TEST_PET_ID)) - .andExpect(status().isOk()) - .andExpect(view().name("pets/createOrUpdateVisitForm")); - } + @Test + public void testInitNewVisitForm() throws Exception { + mockMvc.perform(get("/owners/*/pets/{petId}/visits/new", TEST_PET_ID)) + .andExpect(status().isOk()) + .andExpect(view().name("pets/createOrUpdateVisitForm")); + } - @Test - void testProcessNewVisitFormSuccess() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/pets/{petId}/visits/new", TEST_OWNER_ID, TEST_PET_ID) - .param("name", "George") - .param("description", "Visit Description")) - .andExpect(status().is3xxRedirection()) - .andExpect(view().name("redirect:/owners/{ownerId}")); - } + @Test + public void testProcessNewVisitFormSuccess() throws Exception { + mockMvc.perform(post("/owners/*/pets/{petId}/visits/new", TEST_PET_ID) + .param("name", "George") + .param("description", "Visit Description") + ) + .andExpect(status().is3xxRedirection()) + .andExpect(view().name("redirect:/owners/{ownerId}")); + } - @Test - void testProcessNewVisitFormHasErrors() throws Exception { - mockMvc - .perform(post("/owners/{ownerId}/pets/{petId}/visits/new", TEST_OWNER_ID, TEST_PET_ID).param("name", - "George")) - .andExpect(model().attributeHasErrors("visit")) - .andExpect(status().isOk()) - .andExpect(view().name("pets/createOrUpdateVisitForm")); - } + @Test + public void testProcessNewVisitFormHasErrors() throws Exception { + mockMvc.perform(post("/owners/*/pets/{petId}/visits/new", TEST_PET_ID) + .param("name", "George") + ) + .andExpect(model().attributeHasErrors("visit")) + .andExpect(status().isOk()) + .andExpect(view().name("pets/createOrUpdateVisitForm")); + } } diff --git a/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceTests.java b/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceTests.java index ddc5bab1e..7ed5bf8a5 100644 --- a/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceTests.java +++ b/src/test/java/org/springframework/samples/petclinic/service/ClinicServiceTests.java @@ -1,64 +1,40 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.samples.petclinic.service; import static org.assertj.core.api.Assertions.assertThat; -import java.time.LocalDate; import java.util.Collection; -import java.util.Optional; +import java.util.Date; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.data.jpa.test.autoconfigure.DataJpaTest; -import org.springframework.boot.jdbc.test.autoconfigure.AutoConfigureTestDatabase; -import org.springframework.boot.jdbc.test.autoconfigure.AutoConfigureTestDatabase.Replace; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.context.annotation.ComponentScan; import org.springframework.samples.petclinic.owner.Owner; import org.springframework.samples.petclinic.owner.OwnerRepository; import org.springframework.samples.petclinic.owner.Pet; +import org.springframework.samples.petclinic.owner.PetRepository; import org.springframework.samples.petclinic.owner.PetType; -import org.springframework.samples.petclinic.owner.PetTypeRepository; -import org.springframework.samples.petclinic.owner.Visit; import org.springframework.samples.petclinic.vet.Vet; import org.springframework.samples.petclinic.vet.VetRepository; +import org.springframework.samples.petclinic.visit.Visit; +import org.springframework.samples.petclinic.visit.VisitRepository; +import org.springframework.stereotype.Service; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; /** * Integration test of the Service and the Repository layer. *

- * ClinicServiceSpringDataJpaTests subclasses benefit from the following services provided - * by the Spring TestContext Framework: - *

- *
    - *
  • Spring IoC container caching which spares us unnecessary set up - * time between test execution.
  • - *
  • Dependency Injection of test fixture instances, meaning that we - * don't need to perform application context lookups. See the use of - * {@link Autowired @Autowired} on the instance variable, which uses - * autowiring by type. - *
  • Transaction management, meaning each test method is executed in - * its own transaction, which is automatically rolled back by default. Thus, even if tests - * insert or otherwise change database state, there is no need for a teardown or cleanup - * script. - *
  • An {@link org.springframework.context.ApplicationContext ApplicationContext} is - * also inherited and can be used for explicit bean lookup if necessary.
  • - *
+ * ClinicServiceSpringDataJpaTests subclasses benefit from the following services provided by the Spring + * TestContext Framework:

  • Spring IoC container caching which spares us unnecessary set up + * time between test execution.
  • Dependency Injection of test fixture instances, meaning that + * we don't need to perform application context lookups. See the use of {@link Autowired @Autowired} on the {@link + * ClinicServiceTests#clinicService clinicService} instance variable, which uses autowiring by + * type.
  • Transaction management, meaning each test method is executed in its own transaction, + * which is automatically rolled back by default. Thus, even if tests insert or otherwise change database state, there + * is no need for a teardown or cleanup script.
  • An {@link org.springframework.context.ApplicationContext + * ApplicationContext} is also inherited and can be used for explicit bean lookup if necessary.
* * @author Ken Krebs * @author Rod Johnson @@ -67,185 +43,164 @@ import org.springframework.transaction.annotation.Transactional; * @author Michael Isvy * @author Dave Syer */ -@DataJpaTest -// Ensure that if the mysql profile is active we connect to the real database: -@AutoConfigureTestDatabase(replace = Replace.NONE) -// @TestPropertySource("/application-postgres.properties") -class ClinicServiceTests { - @Autowired - protected OwnerRepository owners; +@RunWith(SpringRunner.class) +@DataJpaTest(includeFilters = @ComponentScan.Filter(Service.class)) +public class ClinicServiceTests { - @Autowired - protected PetTypeRepository types; + @Autowired + protected OwnerRepository owners; - @Autowired - protected VetRepository vets; + @Autowired + protected PetRepository pets; - private final Pageable pageable = Pageable.unpaged(); + @Autowired + protected VisitRepository visits; - @Test - void shouldFindOwnersByLastName() { - Page owners = this.owners.findByLastNameStartingWith("Davis", pageable); - assertThat(owners).hasSize(2); + @Autowired + protected VetRepository vets; - owners = this.owners.findByLastNameStartingWith("Daviss", pageable); - assertThat(owners).isEmpty(); - } + @Test + public void shouldFindOwnersByLastName() { + Collection owners = this.owners.findByLastName("Davis"); + assertThat(owners.size()).isEqualTo(2); - @Test - void shouldFindSingleOwnerWithPet() { - Optional optionalOwner = this.owners.findById(1); - assertThat(optionalOwner).isPresent(); - Owner owner = optionalOwner.get(); - assertThat(owner.getLastName()).startsWith("Franklin"); - assertThat(owner.getPets()).hasSize(1); - assertThat(owner.getPets().get(0).getType()).isNotNull(); - assertThat(owner.getPets().get(0).getType().getName()).isEqualTo("cat"); - } + owners = this.owners.findByLastName("Daviss"); + assertThat(owners.isEmpty()).isTrue(); + } - @Test - @Transactional - void shouldInsertOwner() { - Page owners = this.owners.findByLastNameStartingWith("Schultz", pageable); - int found = (int) owners.getTotalElements(); + @Test + public void shouldFindSingleOwnerWithPet() { + Owner owner = this.owners.findById(1); + assertThat(owner.getLastName()).startsWith("Franklin"); + assertThat(owner.getPets().size()).isEqualTo(1); + assertThat(owner.getPets().get(0).getType()).isNotNull(); + assertThat(owner.getPets().get(0).getType().getName()).isEqualTo("cat"); + } - Owner owner = new Owner(); - owner.setFirstName("Sam"); - owner.setLastName("Schultz"); - owner.setAddress("4, Evans Street"); - owner.setCity("Wollongong"); - owner.setTelephone("4444444444"); - this.owners.save(owner); - assertThat(owner.getId()).isNotZero(); + @Test + @Transactional + public void shouldInsertOwner() { + Collection owners = this.owners.findByLastName("Schultz"); + int found = owners.size(); - owners = this.owners.findByLastNameStartingWith("Schultz", pageable); - assertThat(owners.getTotalElements()).isEqualTo(found + 1); - } + Owner owner = new Owner(); + owner.setFirstName("Sam"); + owner.setLastName("Schultz"); + owner.setAddress("4, Evans Street"); + owner.setCity("Wollongong"); + owner.setTelephone("4444444444"); + this.owners.save(owner); + assertThat(owner.getId().longValue()).isNotEqualTo(0); - @Test - @Transactional - void shouldUpdateOwner() { - Optional optionalOwner = this.owners.findById(1); - assertThat(optionalOwner).isPresent(); - Owner owner = optionalOwner.get(); - String oldLastName = owner.getLastName(); - String newLastName = oldLastName + "X"; + owners = this.owners.findByLastName("Schultz"); + assertThat(owners.size()).isEqualTo(found + 1); + } - owner.setLastName(newLastName); - this.owners.save(owner); + @Test + @Transactional + public void shouldUpdateOwner() { + Owner owner = this.owners.findById(1); + String oldLastName = owner.getLastName(); + String newLastName = oldLastName + "X"; - // retrieving new name from database - optionalOwner = this.owners.findById(1); - assertThat(optionalOwner).isPresent(); - owner = optionalOwner.get(); - assertThat(owner.getLastName()).isEqualTo(newLastName); - } + owner.setLastName(newLastName); + this.owners.save(owner); - @Test - void shouldFindAllPetTypes() { - Collection petTypes = this.types.findPetTypes(); + // retrieving new name from database + owner = this.owners.findById(1); + assertThat(owner.getLastName()).isEqualTo(newLastName); + } - PetType petType1 = EntityUtils.getById(petTypes, PetType.class, 1); - assertThat(petType1.getName()).isEqualTo("cat"); - PetType petType4 = EntityUtils.getById(petTypes, PetType.class, 4); - assertThat(petType4.getName()).isEqualTo("snake"); - } + @Test + public void shouldFindPetWithCorrectId() { + Pet pet7 = this.pets.findById(7); + assertThat(pet7.getName()).startsWith("Samantha"); + assertThat(pet7.getOwner().getFirstName()).isEqualTo("Jean"); - @Test - @Transactional - void shouldInsertPetIntoDatabaseAndGenerateId() { - Optional optionalOwner = this.owners.findById(6); - assertThat(optionalOwner).isPresent(); - Owner owner6 = optionalOwner.get(); + } - int found = owner6.getPets().size(); + @Test + public void shouldFindAllPetTypes() { + Collection petTypes = this.pets.findPetTypes(); - Pet pet = new Pet(); - pet.setName("bowser"); - Collection types = this.types.findPetTypes(); - pet.setType(EntityUtils.getById(types, PetType.class, 2)); - pet.setBirthDate(LocalDate.now()); - owner6.addPet(pet); - assertThat(owner6.getPets()).hasSize(found + 1); + PetType petType1 = EntityUtils.getById(petTypes, PetType.class, 1); + assertThat(petType1.getName()).isEqualTo("cat"); + PetType petType4 = EntityUtils.getById(petTypes, PetType.class, 4); + assertThat(petType4.getName()).isEqualTo("snake"); + } - this.owners.save(owner6); + @Test + @Transactional + public void shouldInsertPetIntoDatabaseAndGenerateId() { + Owner owner6 = this.owners.findById(6); + int found = owner6.getPets().size(); - optionalOwner = this.owners.findById(6); - assertThat(optionalOwner).isPresent(); - owner6 = optionalOwner.get(); - assertThat(owner6.getPets()).hasSize(found + 1); - // checks that id has been generated - pet = owner6.getPet("bowser"); - assertThat(pet.getId()).isNotNull(); - } + Pet pet = new Pet(); + pet.setName("bowser"); + Collection types = this.pets.findPetTypes(); + pet.setType(EntityUtils.getById(types, PetType.class, 2)); + pet.setBirthDate(new Date()); + owner6.addPet(pet); + assertThat(owner6.getPets().size()).isEqualTo(found + 1); - @Test - @Transactional - void shouldUpdatePetName() { - Optional optionalOwner = this.owners.findById(6); - assertThat(optionalOwner).isPresent(); - Owner owner6 = optionalOwner.get(); + this.pets.save(pet); + this.owners.save(owner6); - Pet pet7 = owner6.getPet(7); - String oldName = pet7.getName(); + owner6 = this.owners.findById(6); + assertThat(owner6.getPets().size()).isEqualTo(found + 1); + // checks that id has been generated + assertThat(pet.getId()).isNotNull(); + } - String newName = oldName + "X"; - pet7.setName(newName); - this.owners.save(owner6); + @Test + @Transactional + public void shouldUpdatePetName() throws Exception { + Pet pet7 = this.pets.findById(7); + String oldName = pet7.getName(); - optionalOwner = this.owners.findById(6); - assertThat(optionalOwner).isPresent(); - owner6 = optionalOwner.get(); - pet7 = owner6.getPet(7); - assertThat(pet7.getName()).isEqualTo(newName); - } + String newName = oldName + "X"; + pet7.setName(newName); + this.pets.save(pet7); - @Test - void shouldFindVets() { - Collection vets = this.vets.findAll(); + pet7 = this.pets.findById(7); + assertThat(pet7.getName()).isEqualTo(newName); + } - Vet vet = EntityUtils.getById(vets, Vet.class, 3); - assertThat(vet.getLastName()).isEqualTo("Douglas"); - assertThat(vet.getNrOfSpecialties()).isEqualTo(2); - assertThat(vet.getSpecialties().get(0).getName()).isEqualTo("dentistry"); - assertThat(vet.getSpecialties().get(1).getName()).isEqualTo("surgery"); - } + @Test + public void shouldFindVets() { + Collection vets = this.vets.findAll(); - @Test - @Transactional - void shouldAddNewVisitForPet() { - Optional optionalOwner = this.owners.findById(6); - assertThat(optionalOwner).isPresent(); - Owner owner6 = optionalOwner.get(); + Vet vet = EntityUtils.getById(vets, Vet.class, 3); + assertThat(vet.getLastName()).isEqualTo("Douglas"); + assertThat(vet.getNrOfSpecialties()).isEqualTo(2); + assertThat(vet.getSpecialties().get(0).getName()).isEqualTo("dentistry"); + assertThat(vet.getSpecialties().get(1).getName()).isEqualTo("surgery"); + } - Pet pet7 = owner6.getPet(7); - int found = pet7.getVisits().size(); - Visit visit = new Visit(); - visit.setDescription("test"); + @Test + @Transactional + public void shouldAddNewVisitForPet() { + Pet pet7 = this.pets.findById(7); + int found = pet7.getVisits().size(); + Visit visit = new Visit(); + pet7.addVisit(visit); + visit.setDescription("test"); + this.visits.save(visit); + this.pets.save(pet7); - owner6.addVisit(pet7.getId(), visit); - this.owners.save(owner6); + pet7 = this.pets.findById(7); + assertThat(pet7.getVisits().size()).isEqualTo(found + 1); + assertThat(visit.getId()).isNotNull(); + } - assertThat(pet7.getVisits()) // - .hasSize(found + 1) // - .allMatch(value -> value.getId() != null); - } - - @Test - void shouldFindVisitsByPetId() { - Optional optionalOwner = this.owners.findById(6); - assertThat(optionalOwner).isPresent(); - Owner owner6 = optionalOwner.get(); - - Pet pet7 = owner6.getPet(7); - Collection visits = pet7.getVisits(); - - assertThat(visits) // - .hasSize(2) // - .element(0) - .extracting(Visit::getDate) - .isNotNull(); - } + @Test + public void shouldFindVisitsByPetId() throws Exception { + Collection visits = this.visits.findByPetId(7); + assertThat(visits.size()).isEqualTo(2); + Visit[] visitArr = visits.toArray(new Visit[visits.size()]); + assertThat(visitArr[0].getDate()).isNotNull(); + assertThat(visitArr[0].getPetId()).isEqualTo(7); + } } diff --git a/src/test/java/org/springframework/samples/petclinic/service/EntityUtils.java b/src/test/java/org/springframework/samples/petclinic/service/EntityUtils.java index d1ce9d74f..44dc6b1c2 100644 --- a/src/test/java/org/springframework/samples/petclinic/service/EntityUtils.java +++ b/src/test/java/org/springframework/samples/petclinic/service/EntityUtils.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,14 +16,14 @@ package org.springframework.samples.petclinic.service; +import java.util.Collection; + import org.springframework.orm.ObjectRetrievalFailureException; import org.springframework.samples.petclinic.model.BaseEntity; -import java.util.Collection; - /** - * Utility methods for handling entities. Separate from the BaseEntity class mainly - * because of dependency on the ORM-associated ObjectRetrievalFailureException. + * Utility methods for handling entities. Separate from the BaseEntity class mainly because of dependency on the + * ORM-associated ObjectRetrievalFailureException. * * @author Juergen Hoeller * @author Sam Brannen @@ -32,22 +32,23 @@ import java.util.Collection; */ public abstract class EntityUtils { - /** - * Look up the entity of the given class with the given id in the given collection. - * @param entities the collection to search - * @param entityClass the entity class to look up - * @param entityId the entity id to look up - * @return the found entity - * @throws ObjectRetrievalFailureException if the entity was not found - */ - public static T getById(Collection entities, Class entityClass, int entityId) - throws ObjectRetrievalFailureException { - for (T entity : entities) { - if (entity.getId() != null && entity.getId() == entityId && entityClass.isInstance(entity)) { - return entity; - } - } - throw new ObjectRetrievalFailureException(entityClass, entityId); - } + /** + * Look up the entity of the given class with the given id in the given collection. + * + * @param entities the collection to search + * @param entityClass the entity class to look up + * @param entityId the entity id to look up + * @return the found entity + * @throws ObjectRetrievalFailureException if the entity was not found + */ + public static T getById(Collection entities, Class entityClass, int entityId) + throws ObjectRetrievalFailureException { + for (T entity : entities) { + if (entity.getId() == entityId && entityClass.isInstance(entity)) { + return entity; + } + } + throw new ObjectRetrievalFailureException(entityClass, entityId); + } } diff --git a/src/test/java/org/springframework/samples/petclinic/system/CrashControllerIntegrationTests.java b/src/test/java/org/springframework/samples/petclinic/system/CrashControllerIntegrationTests.java deleted file mode 100644 index 509585129..000000000 --- a/src/test/java/org/springframework/samples/petclinic/system/CrashControllerIntegrationTests.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.samples.petclinic.system; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; - -import java.util.List; -import java.util.Map; - -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.hibernate.autoconfigure.HibernateJpaAutoConfiguration; -import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration; -import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration; -import org.springframework.boot.resttestclient.TestRestTemplate; -import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; - -/** - * Integration Test for {@link CrashController}. - * - * @author Alex Lutz - */ -// NOT Waiting https://github.com/spring-projects/spring-boot/issues/5574 -@SpringBootTest(webEnvironment = RANDOM_PORT, - properties = { "spring.web.error.include-message=ALWAYS", "management.endpoints.access.default=none" }) -@AutoConfigureTestRestTemplate -class CrashControllerIntegrationTests { - - @Value(value = "${local.server.port}") - private int port; - - @Autowired - private TestRestTemplate rest; - - @Test - void testTriggerExceptionJson() { - ResponseEntity> resp = rest.exchange( - RequestEntity.get("http://localhost:" + port + "/oups").build(), - new ParameterizedTypeReference>() { - }); - assertThat(resp).isNotNull(); - assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); - assertThat(resp.getBody()).containsKey("timestamp"); - assertThat(resp.getBody()).containsKey("status"); - assertThat(resp.getBody()).containsKey("error"); - assertThat(resp.getBody()).containsEntry("message", - "Expected: controller used to showcase what happens when an exception is thrown"); - assertThat(resp.getBody()).containsEntry("path", "/oups"); - } - - @Test - void testTriggerExceptionHtml() { - HttpHeaders headers = new HttpHeaders(); - headers.setAccept(List.of(MediaType.TEXT_HTML)); - ResponseEntity resp = rest.exchange("http://localhost:" + port + "/oups", HttpMethod.GET, - new HttpEntity<>(headers), String.class); - assertThat(resp).isNotNull(); - assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); - assertThat(resp.getBody()).isNotNull(); - // html: - assertThat(resp.getBody()).containsSubsequence("", "

", "Something happened...", "

", "

", - "Expected:", "controller", "used", "to", "showcase", "what", "happens", "when", "an", "exception", "is", - "thrown", "

", ""); - // Not the whitelabel error page: - assertThat(resp.getBody()).doesNotContain("Whitelabel Error Page", - "This application has no explicit mapping for"); - } - - @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, - DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class }) - static class TestConfiguration { - - } - -} diff --git a/src/test/java/org/springframework/samples/petclinic/system/CrashControllerTests.java b/src/test/java/org/springframework/samples/petclinic/system/CrashControllerTests.java index b2760ebea..3f108bfe9 100644 --- a/src/test/java/org/springframework/samples/petclinic/system/CrashControllerTests.java +++ b/src/test/java/org/springframework/samples/petclinic/system/CrashControllerTests.java @@ -1,41 +1,38 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.samples.petclinic.system; -import org.junit.jupiter.api.Test; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; -import static org.assertj.core.api.Assertions.assertThatExceptionOfType; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; /** * Test class for {@link CrashController} * * @author Colin But - * @author Alex Lutz */ -// Waiting https://github.com/spring-projects/spring-boot/issues/5574 ..good -// luck ((plain(st) UNIT test)! :) -class CrashControllerTests { +@RunWith(SpringRunner.class) +// Waiting https://github.com/spring-projects/spring-boot/issues/5574 +@Ignore +@WebMvcTest(controllers = CrashController.class) +public class CrashControllerTests { - final CrashController testee = new CrashController(); - - @Test - void testTriggerException() { - assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> testee.triggerException()) - .withMessageContaining("Expected: controller used to showcase what happens when an exception is thrown"); - } + @Autowired + private MockMvc mockMvc; + @Test + public void testTriggerException() throws Exception { + mockMvc.perform(get("/oups")).andExpect(view().name("exception")) + .andExpect(model().attributeExists("exception")) + .andExpect(forwardedUrl("exception")).andExpect(status().isOk()); + } } diff --git a/src/test/java/org/springframework/samples/petclinic/system/I18nPropertiesSyncTest.java b/src/test/java/org/springframework/samples/petclinic/system/I18nPropertiesSyncTest.java deleted file mode 100644 index fec159cec..000000000 --- a/src/test/java/org/springframework/samples/petclinic/system/I18nPropertiesSyncTest.java +++ /dev/null @@ -1,136 +0,0 @@ -package org.springframework.samples.petclinic.system; - -import org.junit.jupiter.api.Test; - -import java.io.IOException; -import java.nio.file.*; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.TreeSet; -import java.util.regex.Pattern; -import java.util.stream.Stream; - -import static org.junit.jupiter.api.Assertions.fail; - -/** - * This test ensures that there are no hard-coded strings without internationalization in - * any HTML files. Also ensures that a string is translated in every language to avoid - * partial translations. - * - * @author Anuj Ashok Potdar - */ -public class I18nPropertiesSyncTest { - - private static final String I18N_DIR = "src/main/resources"; - - private static final String BASE_NAME = "messages"; - - public static final String PROPERTIES = ".properties"; - - private static final Pattern HTML_TEXT_LITERAL = Pattern.compile(">([^<>{}]+)<"); - - private static final Pattern BRACKET_ONLY = Pattern.compile("<[^>]*>\\s*[\\[\\]](?: )?\\s*]*>"); - - private static final Pattern HAS_TH_TEXT_ATTRIBUTE = Pattern.compile("th:(u)?text\\s*=\\s*\"[^\"]+\""); - - @Test - public void checkNonInternationalizedStrings() throws IOException { - Path root = Paths.get("src/main"); - List files; - - try (Stream stream = Files.walk(root)) { - files = stream.filter(p -> p.toString().endsWith(".java") || p.toString().endsWith(".html")) - .filter(p -> !p.toString().contains("/test/")) - .filter(p -> !p.getFileName().toString().endsWith("Test.java")) - .toList(); - } - - StringBuilder report = new StringBuilder(); - - for (Path file : files) { - List lines = Files.readAllLines(file); - for (int i = 0; i < lines.size(); i++) { - String line = lines.get(i).trim(); - - if (line.startsWith("//") || line.startsWith("@") || line.contains("log.") - || line.contains("System.out")) - continue; - - if (file.toString().endsWith(".html")) { - boolean hasLiteralText = HTML_TEXT_LITERAL.matcher(line).find(); - boolean hasThTextAttribute = HAS_TH_TEXT_ATTRIBUTE.matcher(line).find(); - boolean isBracketOnly = BRACKET_ONLY.matcher(line).find(); - - if (hasLiteralText && !line.contains("#{") && !hasThTextAttribute && !isBracketOnly) { - report.append("HTML: ") - .append(file) - .append(" Line ") - .append(i + 1) - .append(": ") - .append(line) - .append("\n"); - } - } - } - } - - if (!report.isEmpty()) { - fail("Hardcoded (non-internationalized) strings found:\n" + report); - } - } - - @Test - public void checkI18nPropertyFilesAreInSync() throws IOException { - List propertyFiles; - try (Stream stream = Files.walk(Paths.get(I18N_DIR))) { - propertyFiles = stream.filter(p -> p.getFileName().toString().startsWith(BASE_NAME)) - .filter(p -> p.getFileName().toString().endsWith(PROPERTIES)) - .toList(); - } - - Map localeToProps = new HashMap<>(); - - for (Path path : propertyFiles) { - Properties props = new Properties(); - try (var reader = Files.newBufferedReader(path)) { - props.load(reader); - localeToProps.put(path.getFileName().toString(), props); - } - } - - String baseFile = BASE_NAME + PROPERTIES; - Properties baseProps = localeToProps.get(baseFile); - if (baseProps == null) { - fail("Base properties file '" + baseFile + "' not found."); - return; - } - - Set baseKeys = baseProps.stringPropertyNames(); - StringBuilder report = new StringBuilder(); - - for (Map.Entry entry : localeToProps.entrySet()) { - String fileName = entry.getKey(); - // We use fallback logic to include english strings, hence messages_en is not - // populated. - if (fileName.equals(baseFile) || fileName.equals("messages_en.properties")) - continue; - - Properties props = entry.getValue(); - Set missingKeys = new TreeSet<>(baseKeys); - missingKeys.removeAll(props.stringPropertyNames()); - - if (!missingKeys.isEmpty()) { - report.append("Missing keys in ").append(fileName).append(":\n"); - missingKeys.forEach(k -> report.append(" ").append(k).append("\n")); - } - } - - if (!report.isEmpty()) { - fail("Translation files are not in sync:\n" + report); - } - } - -} diff --git a/src/test/java/org/springframework/samples/petclinic/system/ProductionConfigurationTests.java b/src/test/java/org/springframework/samples/petclinic/system/ProductionConfigurationTests.java new file mode 100644 index 000000000..9636e3623 --- /dev/null +++ b/src/test/java/org/springframework/samples/petclinic/system/ProductionConfigurationTests.java @@ -0,0 +1,23 @@ +package org.springframework.samples.petclinic.system; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.samples.petclinic.vet.VetRepository; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ProductionConfigurationTests { + + @Autowired + private VetRepository vets; + + @Test + public void testFindAll() throws Exception { + vets.findAll(); + vets.findAll(); // served from cache + } +} diff --git a/src/test/java/org/springframework/samples/petclinic/vet/VetControllerTests.java b/src/test/java/org/springframework/samples/petclinic/vet/VetControllerTests.java index b8618c35d..ce6adf8e0 100644 --- a/src/test/java/org/springframework/samples/petclinic/vet/VetControllerTests.java +++ b/src/test/java/org/springframework/samples/petclinic/vet/VetControllerTests.java @@ -1,100 +1,82 @@ -/* - * Copyright 2012-2025 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package org.springframework.samples.petclinic.vet; -import org.assertj.core.util.Lists; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledInNativeImage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; -import org.springframework.data.domain.PageImpl; -import org.springframework.data.domain.Pageable; -import org.springframework.http.MediaType; -import org.springframework.test.context.aot.DisabledInAotMode; -import org.springframework.test.context.bean.override.mockito.MockitoBean; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.ResultActions; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; - -import static org.mockito.ArgumentMatchers.any; +import static org.hamcrest.xml.HasXPath.hasXPath; import static org.mockito.BDDMockito.given; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; + +import org.assertj.core.util.Lists; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.MediaType; +import org.springframework.samples.petclinic.vet.Specialty; +import org.springframework.samples.petclinic.vet.Vet; +import org.springframework.samples.petclinic.vet.VetController; +import org.springframework.samples.petclinic.vet.VetRepository; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.ResultActions; /** * Test class for the {@link VetController} */ - +@RunWith(SpringRunner.class) @WebMvcTest(VetController.class) -@DisabledInNativeImage -@DisabledInAotMode -class VetControllerTests { +public class VetControllerTests { - @Autowired - private MockMvc mockMvc; + @Autowired + private MockMvc mockMvc; - @MockitoBean - private VetRepository vets; + @MockBean + private VetRepository vets; - private Vet james() { - Vet james = new Vet(); - james.setFirstName("James"); - james.setLastName("Carter"); - james.setId(1); - return james; - } + @Before + public void setup() { + Vet james = new Vet(); + james.setFirstName("James"); + james.setLastName("Carter"); + james.setId(1); + Vet helen = new Vet(); + helen.setFirstName("Helen"); + helen.setLastName("Leary"); + helen.setId(2); + Specialty radiology = new Specialty(); + radiology.setId(1); + radiology.setName("radiology"); + helen.addSpecialty(radiology); + given(this.vets.findAll()).willReturn(Lists.newArrayList(james, helen)); + } - private Vet helen() { - Vet helen = new Vet(); - helen.setFirstName("Helen"); - helen.setLastName("Leary"); - helen.setId(2); - Specialty radiology = new Specialty(); - radiology.setId(1); - radiology.setName("radiology"); - helen.addSpecialty(radiology); - return helen; - } + @Test + public void testShowVetListHtml() throws Exception { + mockMvc.perform(get("/vets.html")) + .andExpect(status().isOk()) + .andExpect(model().attributeExists("vets")) + .andExpect(view().name("vets/vetList")); + } - @BeforeEach - void setup() { - given(this.vets.findAll()).willReturn(Lists.newArrayList(james(), helen())); - given(this.vets.findAll(any(Pageable.class))) - .willReturn(new PageImpl(Lists.newArrayList(james(), helen()))); + @Test + public void testShowResourcesVetList() throws Exception { + ResultActions actions = mockMvc.perform(get("/vets.json").accept(MediaType.APPLICATION_JSON)) + .andExpect(status().isOk()); + actions.andExpect(content().contentType("application/json;charset=UTF-8")) + .andExpect(jsonPath("$.vetList[0].id").value(1)); + } - } - - @Test - void testShowVetListHtml() throws Exception { - - mockMvc.perform(MockMvcRequestBuilders.get("/vets.html?page=1")) - .andExpect(status().isOk()) - .andExpect(model().attributeExists("listVets")) - .andExpect(view().name("vets/vetList")); - - } - - @Test - void testShowResourcesVetList() throws Exception { - ResultActions actions = mockMvc.perform(get("/vets").accept(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()); - actions.andExpect(content().contentType(MediaType.APPLICATION_JSON)) - .andExpect(jsonPath("$.vetList[0].id").value(1)); - } + @Test + public void testShowVetListXml() throws Exception { + mockMvc.perform(get("/vets.xml").accept(MediaType.APPLICATION_XML)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_XML_VALUE)) + .andExpect(content().node(hasXPath("/vets/vetList[id=1]/id"))); + } } diff --git a/src/test/java/org/springframework/samples/petclinic/vet/VetTests.java b/src/test/java/org/springframework/samples/petclinic/vet/VetTests.java index 24b772dc3..de3a7b9bb 100644 --- a/src/test/java/org/springframework/samples/petclinic/vet/VetTests.java +++ b/src/test/java/org/springframework/samples/petclinic/vet/VetTests.java @@ -1,11 +1,11 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2016-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,27 +15,29 @@ */ package org.springframework.samples.petclinic.vet; -import org.junit.jupiter.api.Test; +import org.junit.Test; + import org.springframework.util.SerializationUtils; import static org.assertj.core.api.Assertions.assertThat; /** * @author Dave Syer + * */ -class VetTests { +public class VetTests { - @Test - void testSerialization() { - Vet vet = new Vet(); - vet.setFirstName("Zaphod"); - vet.setLastName("Beeblebrox"); - vet.setId(123); - @SuppressWarnings("deprecation") - Vet other = (Vet) SerializationUtils.deserialize(SerializationUtils.serialize(vet)); - assertThat(other.getFirstName()).isEqualTo(vet.getFirstName()); - assertThat(other.getLastName()).isEqualTo(vet.getLastName()); - assertThat(other.getId()).isEqualTo(vet.getId()); - } + @Test + public void testSerialization() { + Vet vet = new Vet(); + vet.setFirstName("Zaphod"); + vet.setLastName("Beeblebrox"); + vet.setId(123); + Vet other = (Vet) SerializationUtils + .deserialize(SerializationUtils.serialize(vet)); + assertThat(other.getFirstName()).isEqualTo(vet.getFirstName()); + assertThat(other.getLastName()).isEqualTo(vet.getLastName()); + assertThat(other.getId()).isEqualTo(vet.getId()); + } } diff --git a/src/test/jmeter/petclinic_test_plan.jmx b/src/test/jmeter/petclinic_test_plan.jmx index 89c7bf210..5e942b138 100644 --- a/src/test/jmeter/petclinic_test_plan.jmx +++ b/src/test/jmeter/petclinic_test_plan.jmx @@ -1,13 +1,11 @@ - + false false - + PETCLINIC_HOST @@ -29,12 +27,9 @@ - + continue - + false 10 @@ -49,17 +44,13 @@ Original : 500 - 10 - 10 - + 300 - - - - + + + + ${PETCLINIC_HOST} ${PETCLINIC_PORT} @@ -70,39 +61,33 @@ 4 - - - + + + true - - + + 1 - 3 + 10 1 count false - - + + 1 - 3 + 13 1 petCount false - - - - + + + + @@ -119,13 +104,10 @@ false - - - - + + + + @@ -142,13 +124,10 @@ false - - - - + + + + @@ -156,7 +135,7 @@ - ${CONTEXT_WEB}/webjars/bootstrap/dist/js/bootstrap.bundle.min.js + ${CONTEXT_WEB}/vendors/jquery/jquery.js GET true false @@ -165,13 +144,10 @@ false - - - - + + + + @@ -188,13 +164,10 @@ false - - - - + + + + @@ -202,7 +175,7 @@ - ${CONTEXT_WEB}/owners/find + ${CONTEXT_WEB}/owners/find.html GET true false @@ -211,13 +184,10 @@ false - - - - + + + + @@ -225,7 +195,7 @@ - ${CONTEXT_WEB}/owners?lastName= + ${CONTEXT_WEB}/owners.html?lastName= GET true false @@ -234,13 +204,10 @@ false - - - - + + + + @@ -248,7 +215,7 @@ - ${CONTEXT_WEB}/owners/${count} + ${CONTEXT_WEB}/owners/${count}.html GET true false @@ -257,13 +224,10 @@ false - - - - + + + + @@ -271,7 +235,7 @@ - ${CONTEXT_WEB}/owners/${count}/edit + ${CONTEXT_WEB}/owners/${count}/edit.html GET true false @@ -280,47 +244,15 @@ false - - - + + + true + - + false - Test + firstName=Test&lastName=${count}&address=1234+Test+St.&city=TestCity&telephone=612345678 = - true - firstName - - - false - ${count} - = - true - lastName - - - false - 1234+Test+St. - = - true - address - - - false - TestCity - = - true - city - - - false - 612345678 - = - true - telephone @@ -330,7 +262,7 @@ - ${CONTEXT_WEB}/owners/${count}/edit + ${CONTEXT_WEB}/owners/${count}/edit.html POST true false @@ -339,13 +271,10 @@ false - - - - + + + + @@ -353,107 +282,31 @@ - ${CONTEXT_WEB}/owners/${count}/pets/new - GET - true - false - true - false - false - - - - - - - - false - Test+Fluffy+${petCount} - = - true - name - - - false - 2020-12-20 - = - true - birthDate - - - false - cat - = - true - type - - - - - - - - - - ${CONTEXT_WEB}/owners/${count}/pets/new - POST - true - false - true - false - false - - - - - - - - - - - ${CONTEXT_WEB}/owners/${count}/pets/${petCount}/visits/new GET true false true false + false - - - - - + + + true + - + false - 2013-02-22 + date=2013%2F02%2F22&description=visit = - true - date - - - false - visit - = - true - description + + ${CONTEXT_WEB}/owners/${count}/pets/${petCount}/visits/new @@ -465,9 +318,28 @@ false - - + + + + + + + + + + + + ${CONTEXT_WEB}/owners/${count}.html + GET + true + false + true + false + false + + + + false saveConfig @@ -499,9 +371,8 @@ - - + + false saveConfig @@ -533,7 +404,7 @@ - +