diff --git a/.env.sample b/.env.sample index db6c64e6..c12c7dc0 100644 --- a/.env.sample +++ b/.env.sample @@ -36,4 +36,17 @@ MAIL_FROM_NAME=Claper # Claper configuration #ENABLE_ACCOUNT_CREATION=true -#GS_JPG_RESOLUTION=300x300 \ No newline at end of file +#ALLOW_UNLINK_EXTERNAL_PROVIDER=false +#LOGOUT_REDIRECT_URL=https://google.com +#GS_JPG_RESOLUTION=300x300 + +# OIDC configuration + +# OIDC_PROVIDER_NAME="OpenID" +# OIDC_ISSUER=https://my-idp.example/application/o/claper/ +# OIDC_CLIENT_ID=XXX +# OIDC_CLIENT_SECRET=XXX +# OIDC_SCOPES="openid email profile" +# OIDC_LOGO_URL="" +# OIDC_PROPERTY_MAPPINGS="roles:custom_attributes.roles,organization:custom_attributes.organization" +# OIDC_AUTO_REDIRECT_LOGIN=true \ No newline at end of file diff --git a/.gitignore b/.gitignore index 383c2792..b7b33754 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ test/e2e/node_modules .DS_Store priv/static/.well-known/apple-developer-merchantid-domain-association priv/static/loaderio-eb3b956a176cdd4f54eb8570ce8bbb06.txt +.elixir_ls diff --git a/CHANGELOG.md b/CHANGELOG.md index 65d7c651..acb1709d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +## v2.1.0 + +### Features + +- LTI 1.3 integration (Beta) +- OpenID Connect integration +- New layout for presentation manager +- Duplicate event feature + +### Fixes and improvements + +- Improve embeds integration for better compatibility with different providers +- Add an option to polls to show results to attendees + +### Fixes and improvements + +- Fix input length validation for polls + ## v2.0.1 ### Features diff --git a/Dockerfile b/Dockerfile index 84d45346..8132d81a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -117,9 +117,10 @@ ENV MIX_ENV="prod" # Only copy the final release from the build stage COPY --from=builder --chmod=a+rX /app/_build/prod/rel/claper /app +COPY --from=builder /app/priv/repo/seeds.exs /app/priv/repo/ RUN mkdir /app/uploads && chmod -R 777 /app/uploads EXPOSE 4000 WORKDIR "/app" USER root -CMD ["sh", "-c", "/app/bin/claper eval Claper.Release.migrate && /app/bin/claper start"] +CMD ["sh", "-c", "/app/bin/claper eval Claper.Release.migrate && /app/bin/claper eval Claper.Release.seeds && /app/bin/claper start"] diff --git a/LICENSE.txt b/LICENSE.txt index 576c1e42..29ebfa54 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies @@ -7,17 +7,15 @@ Preamble - The GNU General Public License is a free, copyleft license for -software and other kinds of works. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to +our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. +software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you @@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. The precise terms and conditions for copying, distribution and modification follow. @@ -72,7 +60,7 @@ modification follow. 0. Definitions. - "This License" refers to version 3 of the GNU General Public License. + "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. @@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - 13. Use with the GNU Affero General Public License. + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single +under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General +Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published +GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's +versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. @@ -631,44 +629,33 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Claper, tool to let your audience interact during your presentations. - Copyright (C) 2022 Alexandre Lion + + Copyright (C) This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Affero General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Claper Copyright (C) 2022 Alexandre Lion - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +For more information on this, and how to apply and follow the GNU AGPL, see +. \ No newline at end of file diff --git a/README.md b/README.md index d5b78221..1f48c611 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,15 @@ Claper is proudly powered by Phoenix and Elixir. [![Phoenix][Phoenix]][Phoenix-url] [![Elixir][Elixir]][Elixir-url] [![Tailwind][Tailwind]][Tailwind-url] +### Our partners and sponsors + +LMDDC +Pixilearn +UCCS + ## Documentation -You can find all the instructions and configuration in [the documentation](https://docs.claper.co/configuration.html). +You can find all the instructions and configuration in [the documentation](https://docs.claper.co/). ## Development environment @@ -112,11 +118,15 @@ Distributed under the GPLv3 License. See `LICENSE.txt` for more information. -## Contact +## Links + +[![](https://img.shields.io/badge/ClaperCo/Claper-000000?style=for-the-badge&logo=Github&logoColor=white)](https://github.com/ClaperCo/Claper) + +[![](https://img.shields.io/badge/Discord-5052db?style=for-the-badge&logo=Discord&logoColor=white)](https://discord.gg/M7ejVaC9gA) -[![](https://img.shields.io/badge/@alxlion__-000000?style=for-the-badge&logo=x&logoColor=white)](https://x.com/alxlion_) +[![](https://img.shields.io/badge//r/claper-ed491a?style=for-the-badge&logo=Reddit&logoColor=white)](https://reddit.com/r/claper) -Project Link: [https://github.com/ClaperCo/Claper](https://github.com/ClaperCo/Claper) +[![]()](https://x.com/alxlion_) @@ -138,3 +148,6 @@ Project Link: [https://github.com/ClaperCo/Claper](https://github.com/ClaperCo/C [Tailwind-url]: https://tailwindcss.com/ [Phoenix]: https://img.shields.io/badge/phoenix-f35424?style=for-the-badge&logo=&logoColor=white [Phoenix-url]: https://www.phoenixframework.org/ +[lmddc-logo]: /priv/static/images/partners/lmddc.png +[pixilearn-logo]: /priv/static/images/partners/pixilearn.png +[uccs-logo]: /priv/static/images/partners/uccs.png diff --git a/assets/js/app.js b/assets/js/app.js index da91fe65..af51d194 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -494,7 +494,6 @@ Hooks.QRCode = { Hooks.Dropdown = { mounted() { this.el.addEventListener("click", (e) => { - e.preventDefault(); this.el.classList.toggle("hidden"); }); }, diff --git a/assets/js/manager.js b/assets/js/manager.js index b138312b..a70613f9 100644 --- a/assets/js/manager.js +++ b/assets/js/manager.js @@ -1,82 +1,176 @@ -import { tns } from "tiny-slider" +import { tns } from "tiny-slider"; export class Manager { - constructor(context) { - this.context = context - this.currentPage = parseInt(context.el.dataset.currentPage) - this.maxPage = parseInt(context.el.dataset.maxPage) + this.context = context; + this.currentPage = parseInt(context.el.dataset.currentPage); + this.maxPage = parseInt(context.el.dataset.maxPage); } init() { - - this.context.handleEvent('page-manage', data => { - var el = document.getElementById("slide-preview-" + data.current_page) + this.context.handleEvent("page-manage", (data) => { + var el = document.getElementById("slide-preview-" + data.current_page); if (el) { - setTimeout(() => { - document.getElementById("slides").scrollTo({ - top: el.offsetTop - el.scrollHeight, - left: 0, - behavior: 'smooth' - }); - }, data.timeout ? data.timeout : 0) + setTimeout( + () => { + const slidesLayout = document.getElementById("slides-layout"); + const layoutWidth = slidesLayout.clientWidth; + const elementWidth = el.children[0].scrollWidth; + const scrollPosition = + el.children[0].offsetLeft - layoutWidth / 2 + elementWidth / 2; + + slidesLayout.scrollTo({ + left: scrollPosition, + }); + }, + data.timeout ? data.timeout : 0 + ); } - }) - - window.addEventListener('keydown', (e) => { + }); - if ((e.target.tagName || '').toLowerCase() != "input") { - e.preventDefault() + window.addEventListener("keydown", (e) => { + if ((e.target.tagName || "").toLowerCase() != "input") { + e.preventDefault(); switch (e.key) { - case 'ArrowUp': - this.prevPage() - break - case 'ArrowLeft': - this.prevPage() - break - case 'ArrowRight': - this.nextPage() - break - case 'ArrowDown': - this.nextPage() - break + case "ArrowUp": + this.prevPage(); + break; + case "ArrowLeft": + this.prevPage(); + break; + case "ArrowRight": + this.nextPage(); + break; + case "ArrowDown": + this.nextPage(); + break; } } }); + + this.initPreview(); + } + + initPreview() { + var preview = document.getElementById("preview"); + + if (preview) { + let isDragging = false; + let startX, startY; + + let originalSnap = localStorage.getItem("preview-position"); + if (originalSnap) { + let snaps = originalSnap.split(":"); + preview.style.left = `${snaps[0]}px`; + preview.style.top = `${snaps[1]}px`; + } + + const startDrag = (e) => { + isDragging = true; + startX = (e.clientX || e.touches[0].clientX) - preview.offsetLeft; + startY = (e.clientY || e.touches[0].clientY) - preview.offsetTop; + }; + + const drag = (e) => { + if (!isDragging) return; + + e.preventDefault(); + + const clientX = e.clientX || e.touches[0].clientX; + const clientY = e.clientY || e.touches[0].clientY; + + const newX = clientX - startX; + const newY = clientY - startY; + + preview.style.left = `${newX}px`; + preview.style.top = `${newY}px`; + }; + + const endDrag = () => { + if (!isDragging) return; + isDragging = false; + + const windowWidth = window.innerWidth; + const windowHeight = window.innerHeight; + const previewRect = preview.getBoundingClientRect(); + const padding = 20; // Add 20px padding + + let snapX, snapY; + + if (previewRect.left < windowWidth / 2) { + snapX = padding; + } else { + snapX = windowWidth - previewRect.width - padding; + } + + if (previewRect.top < windowHeight / 2) { + snapY = padding; + } else { + snapY = windowHeight - previewRect.height - padding; + } + + preview.style.transition = "left 0.3s ease-out, top 0.3s ease-out"; + preview.style.left = `${snapX}px`; + preview.style.top = `${snapY}px`; + + localStorage.setItem("preview-position", `${snapX}:${snapY}`); + + // Remove the transition after it's complete + setTimeout(() => { + preview.style.transition = ""; + }, 300); + }; + + preview.addEventListener("mousedown", startDrag); + preview.addEventListener("touchstart", startDrag); + + document.addEventListener("mousemove", drag); + document.addEventListener("touchmove", drag); + + document.addEventListener("mouseup", endDrag); + document.addEventListener("touchend", endDrag); + } } update() { - this.currentPage = parseInt(this.context.el.dataset.currentPage) - var el = document.getElementById("slide-preview-" + this.currentPage) + this.currentPage = parseInt(this.context.el.dataset.currentPage); + var el = document.getElementById("slide-preview-" + this.currentPage); if (el) { setTimeout(() => { - document.getElementById("slides").scrollTo({ - top: el.offsetTop - el.scrollHeight, - left: 0, - behavior: 'smooth' + const slidesLayout = document.getElementById("slides-layout"); + const layoutWidth = slidesLayout.clientWidth; + const elementWidth = el.children[0].scrollWidth; + const scrollPosition = + el.children[0].offsetLeft - layoutWidth / 2 + elementWidth / 2; + + slidesLayout.scrollTo({ + left: scrollPosition, + behavior: "smooth", }); - }, 50) + }, 50); } + + this.initPreview(); } nextPage() { - if (this.currentPage == this.maxPage - 1) - return; + if (this.currentPage == this.maxPage - 1) return; this.currentPage += 1; - this.context.pushEventTo(this.context.el, "current-page", { "page": this.currentPage.toString() }); + this.context.pushEventTo(this.context.el, "current-page", { + page: this.currentPage.toString(), + }); } prevPage() { - if (this.currentPage == 0) - return; + if (this.currentPage == 0) return; this.currentPage -= 1; - this.context.pushEventTo(this.context.el, "current-page", { "page": this.currentPage.toString() }); - + this.context.pushEventTo(this.context.el, "current-page", { + page: this.currentPage.toString(), + }); } - } diff --git a/assets/package-lock.json b/assets/package-lock.json index 5ae5a83d..75ca0130 100644 --- a/assets/package-lock.json +++ b/assets/package-lock.json @@ -6,6 +6,7 @@ "": { "dependencies": { "@sjmc11/tourguidejs": "^0.0.16", + "@tailwindcss/container-queries": "^0.1.1", "air-datepicker": "^3.5.0", "animate.css": "^4.1.1", "moment": "^2.29.4", @@ -45,7 +46,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true, "engines": { "node": ">=10" }, @@ -447,7 +447,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -461,7 +460,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -470,7 +468,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -478,14 +475,12 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.20", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -495,7 +490,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -508,7 +502,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, "engines": { "node": ">= 8" } @@ -517,7 +510,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -535,6 +527,14 @@ "sass": "^1.55.0" } }, + "node_modules/@tailwindcss/container-queries": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz", + "integrity": "sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==", + "peerDependencies": { + "tailwindcss": ">=3.2.0" + } + }, "node_modules/@vue/reactivity": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz", @@ -572,8 +572,7 @@ "node_modules/any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" }, "node_modules/anymatch": { "version": "3.1.3", @@ -590,8 +589,7 @@ "node_modules/arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" }, "node_modules/autoprefixer": { "version": "10.4.19", @@ -633,8 +631,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/binary-extensions": { "version": "2.3.0", @@ -651,7 +648,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -704,7 +700,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, "engines": { "node": ">= 6" } @@ -756,7 +751,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, "engines": { "node": ">= 6" } @@ -764,14 +758,12 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, "bin": { "cssesc": "bin/cssesc" }, @@ -782,14 +774,12 @@ "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" }, "node_modules/electron-to-chromium": { "version": "1.4.736", @@ -848,7 +838,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -864,7 +853,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -877,7 +865,6 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, "dependencies": { "reusify": "^1.0.4" } @@ -909,8 +896,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8= sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8= sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "2.3.3", @@ -929,7 +915,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -949,7 +934,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -966,7 +950,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -975,8 +958,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/is-binary-path": { "version": "2.1.0", @@ -993,7 +975,6 @@ "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dev": true, "dependencies": { "hasown": "^2.0.0" }, @@ -1032,7 +1013,6 @@ "version": "1.20.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz", "integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==", - "dev": true, "bin": { "jiti": "bin/jiti.js" } @@ -1041,7 +1021,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "dev": true, "engines": { "node": ">=10" } @@ -1049,14 +1028,12 @@ "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, "engines": { "node": ">= 8" } @@ -1065,7 +1042,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1096,7 +1072,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", @@ -1107,7 +1082,6 @@ "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, "funding": [ { "type": "github", @@ -1148,7 +1122,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -1157,7 +1130,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, "engines": { "node": ">= 6" } @@ -1166,7 +1138,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E= sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "dependencies": { "wrappy": "1" } @@ -1175,7 +1146,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18= sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -1183,8 +1153,7 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/phoenix": { "resolved": "../deps/phoenix", @@ -1201,8 +1170,7 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -1219,7 +1187,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw= sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -1228,7 +1195,6 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, "engines": { "node": ">= 6" } @@ -1237,7 +1203,6 @@ "version": "8.4.38", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "dev": true, "funding": [ { "type": "opencollective", @@ -1265,7 +1230,6 @@ "version": "15.1.0", "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, "dependencies": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", @@ -1282,7 +1246,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dev": true, "dependencies": { "camelcase-css": "^2.0.1" }, @@ -1301,7 +1264,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", - "dev": true, "dependencies": { "lilconfig": "^2.0.5", "yaml": "^2.1.1" @@ -1330,7 +1292,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", - "dev": true, "dependencies": { "postcss-selector-parser": "^6.0.11" }, @@ -1349,7 +1310,6 @@ "version": "6.0.13", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dev": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -1361,8 +1321,7 @@ "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/qr-code-styling": { "version": "1.6.0-rc.1", @@ -1381,7 +1340,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, "funding": [ { "type": "github", @@ -1401,7 +1359,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q= sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, "dependencies": { "pify": "^2.3.0" } @@ -1421,7 +1378,6 @@ "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -1438,7 +1394,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -1448,7 +1403,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "funding": [ { "type": "github", @@ -1505,7 +1459,6 @@ "version": "3.34.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz", "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", @@ -1527,7 +1480,6 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1547,7 +1499,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -1559,7 +1510,6 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz", "integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==", - "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -1596,7 +1546,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -1608,7 +1557,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -1621,7 +1569,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, "dependencies": { "any-promise": "^1.0.0" } @@ -1630,7 +1577,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, "dependencies": { "thenify": ">= 3.1.0 < 4" }, @@ -1657,8 +1603,7 @@ "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" }, "node_modules/update-browserslist-db": { "version": "1.0.13", @@ -1693,20 +1638,17 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/yaml": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz", "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==", - "dev": true, "engines": { "node": ">= 14" } @@ -1716,8 +1658,7 @@ "@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==" }, "@esbuild/aix-ppc64": { "version": "0.20.2", @@ -1906,7 +1847,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, "requires": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -1916,26 +1856,22 @@ "@jridgewell/resolve-uri": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==" }, "@jridgewell/set-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" }, "@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "@jridgewell/trace-mapping": { "version": "0.3.20", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -1945,7 +1881,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, "requires": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1954,14 +1889,12 @@ "@nodelib/fs.stat": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" }, "@nodelib/fs.walk": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1976,6 +1909,12 @@ "sass": "^1.55.0" } }, + "@tailwindcss/container-queries": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz", + "integrity": "sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==", + "requires": {} + }, "@vue/reactivity": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz", @@ -2013,8 +1952,7 @@ "any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" }, "anymatch": { "version": "3.1.3", @@ -2028,8 +1966,7 @@ "arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" }, "autoprefixer": { "version": "10.4.19", @@ -2048,8 +1985,7 @@ "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "binary-extensions": { "version": "2.3.0", @@ -2060,7 +1996,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2089,8 +2024,7 @@ "camelcase-css": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==" }, "caniuse-lite": { "version": "1.0.30001609", @@ -2116,32 +2050,27 @@ "commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" }, "didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" }, "dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" }, "electron-to-chromium": { "version": "1.4.736", @@ -2190,7 +2119,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", - "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -2203,7 +2131,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "requires": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -2215,7 +2142,6 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, "requires": { "reusify": "^1.0.4" } @@ -2237,8 +2163,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8= sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8= sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "fsevents": { "version": "2.3.3", @@ -2249,8 +2174,7 @@ "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "glob-parent": { "version": "5.1.2", @@ -2264,7 +2188,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, "requires": { "function-bind": "^1.1.2" } @@ -2278,7 +2201,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -2287,8 +2209,7 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "is-binary-path": { "version": "2.1.0", @@ -2302,7 +2223,6 @@ "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dev": true, "requires": { "hasown": "^2.0.0" } @@ -2328,32 +2248,27 @@ "jiti": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz", - "integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==", - "dev": true + "integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==" }, "lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "dev": true + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==" }, "lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2375,7 +2290,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, "requires": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", @@ -2385,8 +2299,7 @@ "nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" }, "node-releases": { "version": "2.0.14", @@ -2408,20 +2321,17 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-hash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==" }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E= sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "requires": { "wrappy": "1" } @@ -2429,14 +2339,12 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18= sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18= sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" }, "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "phoenix": { "version": "file:../deps/phoenix" @@ -2453,8 +2361,7 @@ "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "picomatch": { "version": "2.3.1", @@ -2464,20 +2371,17 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw= sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw= sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" }, "pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==" }, "postcss": { "version": "8.4.38", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "dev": true, "requires": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", @@ -2488,7 +2392,6 @@ "version": "15.1.0", "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, "requires": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", @@ -2499,7 +2402,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dev": true, "requires": { "camelcase-css": "^2.0.1" } @@ -2508,7 +2410,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", - "dev": true, "requires": { "lilconfig": "^2.0.5", "yaml": "^2.1.1" @@ -2518,7 +2419,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", - "dev": true, "requires": { "postcss-selector-parser": "^6.0.11" } @@ -2527,7 +2427,6 @@ "version": "6.0.13", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dev": true, "requires": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -2536,8 +2435,7 @@ "postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "qr-code-styling": { "version": "1.6.0-rc.1", @@ -2555,14 +2453,12 @@ "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q= sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, "requires": { "pify": "^2.3.0" } @@ -2579,7 +2475,6 @@ "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, "requires": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -2589,14 +2484,12 @@ "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "requires": { "queue-microtask": "^1.2.2" } @@ -2630,7 +2523,6 @@ "version": "3.34.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz", "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==", - "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", @@ -2645,7 +2537,6 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2660,14 +2551,12 @@ "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, "tailwindcss": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz", "integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==", - "dev": true, "requires": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -2697,7 +2586,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, "requires": { "is-glob": "^4.0.3" } @@ -2706,7 +2594,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "requires": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -2718,7 +2605,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, "requires": { "any-promise": "^1.0.0" } @@ -2727,7 +2613,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, "requires": { "thenify": ">= 3.1.0 < 4" } @@ -2748,8 +2633,7 @@ "ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" }, "update-browserslist-db": { "version": "1.0.13", @@ -2764,20 +2648,17 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "yaml": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz", - "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==", - "dev": true + "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==" } } } diff --git a/assets/package.json b/assets/package.json index 489c5282..f7f2c373 100644 --- a/assets/package.json +++ b/assets/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "@sjmc11/tourguidejs": "^0.0.16", + "@tailwindcss/container-queries": "^0.1.1", "air-datepicker": "^3.5.0", "animate.css": "^4.1.1", "moment": "^2.29.4", @@ -24,4 +25,4 @@ "split.js": "^1.6.5", "tiny-slider": "^2.9.4" } -} \ No newline at end of file +} diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js index 8b9604a7..d927e1db 100644 --- a/assets/tailwind.config.js +++ b/assets/tailwind.config.js @@ -1,112 +1,109 @@ -const { colors: defaultColors } = require('tailwindcss/defaultTheme') +const { colors: defaultColors } = require("tailwindcss/defaultTheme"); const colors = { ...defaultColors, ...{ "water-blue": { - "50": "#E3F2FD", - "100": "#C2E3FA", - "200": "#84C8F6", - "300": "#3DA7F0", - "400": "#1395EC", - "500": "#1186D5", - "600": "#0D65A1", - "700": "#0A5689", - "800": "#0A4B76", - "900": "#073250", + 50: "#E3F2FD", + 100: "#C2E3FA", + 200: "#84C8F6", + 300: "#3DA7F0", + 400: "#1395EC", + 500: "#1186D5", + 600: "#0D65A1", + 700: "#0A5689", + 800: "#0A4B76", + 900: "#073250", }, "electric-purple": { - "50": "#F2E0FF", - "100": "#E3BDFF", - "200": "#C77AFF", - "300": "#A62EFF", - "400": "#9200FF", - "500": "#A327FF", - "600": "#6400AD", - "700": "#550094", - "800": "#490080", - "900": "#320057", + 50: "#F2E0FF", + 100: "#E3BDFF", + 200: "#C77AFF", + 300: "#A62EFF", + 400: "#9200FF", + 500: "#A327FF", + 600: "#6400AD", + 700: "#550094", + 800: "#490080", + 900: "#320057", }, - "wedgewood": { - "50": "#F0F4F8", - "100": "#D9E3ED", - "200": "#B9CCDF", - "300": "#97B3CE", - "400": "#7499BE", - "500": "#507DAA", - "600": "#3F6388", - "700": "#314D68", - "800": "#253B50", - "900": "#1A2938", + wedgewood: { + 50: "#F0F4F8", + 100: "#D9E3ED", + 200: "#B9CCDF", + 300: "#97B3CE", + 400: "#7499BE", + 500: "#507DAA", + 600: "#3F6388", + 700: "#314D68", + 800: "#253B50", + 900: "#1A2938", }, "rose-madder": { - "50": "#FCEDEE", - "100": "#F9D5D7", - "200": "#F3ABB0", - "300": "#ED8188", - "400": "#E75761", - "500": "#E12D39", - "600": "#B4242E", - "700": "#871B22", - "800": "#5A1217", - "900": "#2D090B", + 50: "#FCEDEE", + 100: "#F9D5D7", + 200: "#F3ABB0", + 300: "#ED8188", + 400: "#E75761", + 500: "#E12D39", + 600: "#B4242E", + 700: "#871B22", + 800: "#5A1217", + 900: "#2D090B", }, "school-bus-yellow": { - "50": "#FFFBEB", - "100": "#FEF3C7", - "200": "#FDE68A", - "300": "#FCD34D", - "400": "#FBBF24", - "500": "#F59E0B", - "600": "#D97706", - "700": "#B45309", - "800": "#92400E", - "900": "#78350F", + 50: "#FFFBEB", + 100: "#FEF3C7", + 200: "#FDE68A", + 300: "#FCD34D", + 400: "#FBBF24", + 500: "#F59E0B", + 600: "#D97706", + 700: "#B45309", + 800: "#92400E", + 900: "#78350F", }, "green-teal": { - "50": "#ECFDF5", - "100": "#D1FAE5", - "200": "#A7F3D0", - "300": "#6EE7B7", - "400": "#34D399", - "500": "#10B981", - "600": "#059669", - "700": "#047857", - "800": "#065F46", - "900": "#064E3B", + 50: "#ECFDF5", + 100: "#D1FAE5", + 200: "#A7F3D0", + 300: "#6EE7B7", + 400: "#34D399", + 500: "#10B981", + 600: "#059669", + 700: "#047857", + 800: "#065F46", + 900: "#064E3B", }, }, -} +}; module.exports = { - mode: 'jit', - content: [ - './js/**/*.js', - '../lib/*_web/**/*.*ex' - ], + mode: "jit", + content: ["./js/**/*.js", "../lib/*_web/**/*.*ex"], safelist: [ - '-top-1.5', - 'top-1', - 'left-3', - 'top-6', - 'h-5', - 'left-2.5', - 'top-3', - 'h-7', - 'bg-secondary-600', - 'text-white', - 'bg-white', - 'text-gray-600' + "-top-1.5", + "top-1", + "left-3", + "top-6", + "h-5", + "left-2.5", + "top-3", + "h-7", + "bg-secondary-600", + "text-white", + "bg-white", + "text-gray-600", ], - darkMode: 'media', + darkMode: "media", theme: { extend: { backgroundSize: { - 'size-200': '200% 200%', + "size-200": "200% 200%", }, backgroundPosition: { - 'pos-0': '0% 0%', - 'pos-100': '100% 100%', + "pos-0": "0% 0%", + "pos-100": "100% 100%", }, colors: { primary: colors["water-blue"], @@ -114,24 +111,24 @@ module.exports = { neutral: colors["wedgewood"], "supporting-red": colors["rose-madder"], "supporting-yellow": colors["school-bus-yellow"], - "supporting-green": colors["green-teal"] - } + "supporting-green": colors["green-teal"], + }, }, fontFamily: { - sans: ['Roboto', 'sans-serif'], - serif: ['Merriweather', 'serif'], + sans: ["Roboto", "sans-serif"], + serif: ["Merriweather", "serif"], }, boxShadow: { - "base": "0px 1px 3px 0px rgba(0,0,0,0.1), 0px 1px 2px 0px rgba(0,0,0,0.06)", - "lg": "0px 4px 6px 0px rgba(0,0,0,0.05), 0px 10px 15px 0px rgba(0,0,0,0.1)", - "md": "0px 4px 6px 0px rgba(0,0,0,0.1), 0px 2px 4px 0px rgba(0,0,0,0.06)", - "xl": "0px 10px 10px 0px rgba(0,0,0,0.04), 0px 20px 25px 0px rgba(0,0,0,0.1)", + base: "0px 1px 3px 0px rgba(0,0,0,0.1), 0px 1px 2px 0px rgba(0,0,0,0.06)", + lg: "0px 4px 6px 0px rgba(0,0,0,0.05), 0px 10px 15px 0px rgba(0,0,0,0.1)", + md: "0px 4px 6px 0px rgba(0,0,0,0.1), 0px 2px 4px 0px rgba(0,0,0,0.06)", + xl: "0px 10px 10px 0px rgba(0,0,0,0.04), 0px 20px 25px 0px rgba(0,0,0,0.1)", "2xl": "0px 25px 50px 0px rgba(0,0,0,0.25)", - "inner": "inset 0px 2px 4px 0px rgba(0,0,0,0.06)" - } + inner: "inset 0px 2px 4px 0px rgba(0,0,0,0.06)", + }, }, variants: { extend: {}, }, - plugins: [], -} + plugins: [require("@tailwindcss/container-queries")], +}; diff --git a/config/runtime.exs b/config/runtime.exs index 5ad65c6a..7dc94de1 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -41,7 +41,6 @@ case secret_key_base do nil end -site_url = get_var_from_path_or_env(config_dir, "SITE_URL", "http://localhost:4000") base_url = get_var_from_path_or_env(config_dir, "BASE_URL") if !base_url do @@ -82,6 +81,50 @@ same_site_cookie = get_var_from_path_or_env(config_dir, "SAME_SITE_COOKIE", "Lax secure_cookie = get_var_from_path_or_env(config_dir, "SECURE_COOKIE", "false") |> String.to_existing_atom() +oidc_issuer = get_var_from_path_or_env(config_dir, "OIDC_ISSUER", "https://accounts.google.com") + +oidc_client_id = get_var_from_path_or_env(config_dir, "OIDC_CLIENT_ID", nil) +oidc_client_secret = get_var_from_path_or_env(config_dir, "OIDC_CLIENT_SECRET", nil) +oidc_scopes = get_var_from_path_or_env(config_dir, "OIDC_SCOPES", "openid email profile") +oidc_provider_name = get_var_from_path_or_env(config_dir, "OIDC_PROVIDER_NAME", "OpenID Connect") +oidc_logo_url = get_var_from_path_or_env(config_dir, "OIDC_LOGO_URL", "/images/icons/openid.png") + +oidc_auto_redirect_login = + get_var_from_path_or_env(config_dir, "OIDC_AUTO_REDIRECT_LOGIN", "false") + |> String.to_existing_atom() + +oidc_property_mappings = + get_var_from_path_or_env(config_dir, "OIDC_PROPERTY_MAPPINGS", nil) + |> case do + nil -> + nil + + mappings -> + String.split(mappings, ",") + |> Enum.map(&String.split(&1, ":")) + |> Enum.into(%{}, fn [key, value] -> {key, value} end) + end + +oidc_enabled = + !is_nil(oidc_client_id) and !is_nil(oidc_client_secret) + +allow_unlink_external_provider = + get_var_from_path_or_env(config_dir, "ALLOW_UNLINK_EXTERNAL_PROVIDER", "true") + |> String.to_existing_atom() + +logout_redirect_url = get_var_from_path_or_env(config_dir, "LOGOUT_REDIRECT_URL", nil) + +config :claper, :oidc, + enabled: oidc_enabled, + issuer: oidc_issuer, + client_id: oidc_client_id, + client_secret: oidc_client_secret, + scopes: String.split(oidc_scopes, " "), + provider_name: oidc_provider_name, + logo_url: oidc_logo_url, + property_mappings: oidc_property_mappings, + auto_redirect_login: oidc_auto_redirect_login + config :claper, Claper.Repo, url: database_url, ssl: db_ssl, @@ -94,6 +137,7 @@ config :claper, Claper.Repo, config :claper, ClaperWeb.Endpoint, url: [scheme: base_url.scheme, host: base_url.host, path: base_url.path, port: base_url.port], + base_url: base_url, http: [ ip: listen_ip, port: port, @@ -105,7 +149,9 @@ config :claper, ClaperWeb.Endpoint, secure_cookie: secure_cookie config :claper, - enable_account_creation: enable_account_creation + enable_account_creation: enable_account_creation, + allow_unlink_external_provider: allow_unlink_external_provider, + logout_redirect_url: logout_redirect_url config :claper, :presentations, max_file_size: max_file_size, diff --git a/dev.sh b/dev.sh index 58ed4204..3d16b608 100755 --- a/dev.sh +++ b/dev.sh @@ -1,10 +1,12 @@ -export $(cat .env | xargs) +set -a +source .env +set +a args=("$@") -if [ "${args[0]}" == "test" ]; then - mix test -elif [ "${args[0]}" == "start" ]; then +if [ "${args[0]}" == "start" ]; then mix phx.server +else + mix "$@" fi diff --git a/lib/claper/accounts.ex b/lib/claper/accounts.ex index 655b8e19..0a9a946a 100644 --- a/lib/claper/accounts.ex +++ b/lib/claper/accounts.ex @@ -4,11 +4,26 @@ defmodule Claper.Accounts do """ import Ecto.Query, warn: false + alias Claper.Accounts alias Claper.Repo alias Claper.Accounts.{User, UserToken, UserNotifier} - ## Database getters + @doc """ + Creates a user. + + ## Examples + iex> create_user(%{field: value}) + {:ok, %User{}} + + iex> create_user(%{field: bad_value}) + {:error, %Ecto.Changeset{}} + """ + def create_user(attrs) do + %User{} + |> User.registration_changeset(attrs) + |> Repo.insert(returning: [:uuid]) + end @doc """ Gets a user by email. @@ -26,6 +41,30 @@ defmodule Claper.Accounts do Repo.get_by(User, email: email) end + @doc """ + Gets a user by email and creates a new user if the user does not exist. + + ## Examples + iex> get_user_by_email_or_create("foo@example.com") + %User{} + iex> get_user_by_email_or_create("unknown@example.com") + %User{} + """ + def get_user_by_email_or_create(email) when is_binary(email) do + case get_user_by_email(email) do + nil -> + create_user(%{ + email: email, + confirmed_at: DateTime.utc_now(), + is_randomized_password: true, + password: :crypto.strong_rand_bytes(32) + }) + + user -> + {:ok, user} + end + end + @doc """ Gets a user by email and password. @@ -190,6 +229,24 @@ defmodule Claper.Accounts do end end + @doc """ + Sets the user password. + ## Examples + iex> set_user_password(user, %{password: ...}) + {:ok, %User{}} + iex> set_user_password(user, %{password: ...}) + {:error, %Ecto.Changeset{}} + """ + def set_user_password(user, attrs) do + user + |> User.password_changeset(attrs |> Map.put("is_randomized_password", false)) + |> Repo.update() + |> case do + {:ok, user} -> {:ok, user} + {:error, changeset} -> {:error, changeset} + end + end + @doc """ Updates the user preferences. ## Examples @@ -354,7 +411,11 @@ defmodule Claper.Accounts do when is_function(reset_password_url_fun, 1) do {encoded_token, user_token} = UserToken.build_email_token(user, "reset_password") Repo.insert!(user_token) - UserNotifier.deliver_reset_password_instructions(user, reset_password_url_fun.(encoded_token)) + + UserNotifier.deliver_reset_password_instructions( + user, + reset_password_url_fun.(encoded_token) + ) end @doc """ @@ -454,4 +515,59 @@ defmodule Claper.Accounts do def delete(user) do Repo.delete(user) end + + ## OIDC + + def create_oidc_user(attrs) do + %Accounts.Oidc.User{} + |> Accounts.Oidc.User.changeset(attrs) + |> Repo.insert() + end + + def remove_oidc_user(claper_user, issuer) do + Repo.delete_all( + from u in Accounts.Oidc.User, + where: u.issuer == ^issuer and u.user_id == ^claper_user.id + ) + end + + def get_all_oidc_users_by_email(email) do + Repo.all(from u in Accounts.Oidc.User, where: u.email == ^email) + end + + def get_oidc_user_by_sub(sub) do + Repo.get_by(Accounts.Oidc.User, sub: sub) + end + + def get_or_create_user_with_oidc( + %{ + sub: sub + } = attrs + ) do + case get_oidc_user_by_sub(sub) do + nil -> create_new_user(attrs) + %Accounts.Oidc.User{} = user -> update_oidc_user(user, attrs) + end + end + + defp create_new_user(attrs) do + with {:ok, claper_user} <- get_user_by_email_or_create(attrs.email), + updated_attrs <- + Map.merge(attrs, %{user_id: claper_user.id}), + {:ok, user} <- create_oidc_user(updated_attrs) do + {:ok, user |> Repo.preload(:user)} + else + _ -> {:error, %{reason: :invalid_user, msg: "Invalid Claper user"}} + end + end + + defp update_oidc_user(user, attrs) do + user + |> Accounts.Oidc.User.changeset(attrs) + |> Repo.update() + |> case do + {:ok, user} -> {:ok, user |> Repo.preload(:user)} + {:error, changeset} -> {:error, changeset} + end + end end diff --git a/lib/claper/accounts/oidc/user.ex b/lib/claper/accounts/oidc/user.ex new file mode 100644 index 00000000..0df03c29 --- /dev/null +++ b/lib/claper/accounts/oidc/user.ex @@ -0,0 +1,66 @@ +defmodule Claper.Accounts.Oidc.User do + use Ecto.Schema + import Ecto.Changeset + + @type t :: %__MODULE__{ + id: integer(), + sub: String.t(), + name: String.t() | nil, + email: String.t(), + issuer: String.t(), + provider: String.t(), + refresh_token: String.t(), + access_token: String.t(), + expires_at: NaiveDateTime.t(), + photo_url: String.t(), + groups: {:array, :string}, + roles: :string, + organization: String.t(), + user_id: integer(), + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + + schema "oidc_users" do + field :sub, :string + field :name, :string + field :email, :string + field :issuer, :string + field :provider, :string + field :id_token, :string + field :refresh_token, :string, redact: true + field :access_token, :string, redact: true + field :expires_at, :naive_datetime + field :photo_url, :string + field :groups, {:array, :string} + field :roles, :string + field :organization, :string + + belongs_to :user, Claper.Accounts.User + + timestamps() + end + + @doc false + def changeset(user, attrs) do + user + |> cast(attrs, [ + :sub, + :name, + :email, + :issuer, + :provider, + :id_token, + :photo_url, + :access_token, + :expires_at, + :groups, + :organization, + :user_id, + :roles, + :refresh_token + ]) + |> validate_required([:sub, :email, :issuer, :provider, :id_token, :user_id]) + |> unique_constraint(:sub) + end +end diff --git a/lib/claper/accounts/user.ex b/lib/claper/accounts/user.ex index 53bed30b..008e835b 100644 --- a/lib/claper/accounts/user.ex +++ b/lib/claper/accounts/user.ex @@ -3,12 +3,26 @@ defmodule Claper.Accounts.User do import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + uuid: Ecto.UUID.t(), + email: String.t(), + password: String.t() | nil, + hashed_password: String.t(), + is_randomized_password: boolean(), + confirmed_at: NaiveDateTime.t() | nil, + locale: String.t() | nil, + events: [Claper.Events.Event.t()] | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + schema "users" do field :uuid, :binary_id field :email, :string field :password, :string, virtual: true, redact: true field :hashed_password, :string, redact: true - field :is_admin, :boolean + field :is_randomized_password, :boolean field :confirmed_at, :naive_datetime field :locale, :string @@ -19,7 +33,7 @@ defmodule Claper.Accounts.User do def registration_changeset(user, attrs, opts \\ []) do user - |> cast(attrs, [:email, :confirmed_at, :password]) + |> cast(attrs, [:email, :confirmed_at, :password, :is_randomized_password]) |> validate_email() |> validate_password(opts) end @@ -78,7 +92,7 @@ defmodule Claper.Accounts.User do """ def password_changeset(user, attrs, opts \\ []) do user - |> cast(attrs, [:password]) + |> cast(attrs, [:password, :is_randomized_password]) |> validate_confirmation(:password) |> validate_password(opts) end diff --git a/lib/claper/application.ex b/lib/claper/application.ex index 24849285..db1299c1 100644 --- a/lib/claper/application.ex +++ b/lib/claper/application.ex @@ -8,6 +8,7 @@ defmodule Claper.Application do @impl true def start(_type, _args) do topologies = Application.get_env(:libcluster, :topologies) || [] + oidc_config = Application.get_env(:claper, :oidc) || [] children = [ {Cluster.Supervisor, [topologies, [name: Claper.ClusterSupervisor]]}, @@ -23,7 +24,9 @@ defmodule Claper.Application do # Start a worker by calling: Claper.Worker.start_link(arg) # {Claper.Worker, arg} {Finch, name: Swoosh.Finch}, - {Task.Supervisor, name: Claper.TaskSupervisor} + {Task.Supervisor, name: Claper.TaskSupervisor}, + {Oidcc.ProviderConfiguration.Worker, + %{issuer: oidc_config[:issuer], name: Claper.OidcProviderConfig}} ] # See https://hexdocs.pm/elixir/Supervisor.html diff --git a/lib/claper/embeds.ex b/lib/claper/embeds.ex index 772b2156..b9b2e5dd 100644 --- a/lib/claper/embeds.ex +++ b/lib/claper/embeds.ex @@ -93,6 +93,14 @@ defmodule Claper.Embeds do %Embed{} |> Embed.changeset(attrs) |> Repo.insert() + |> case do + {:ok, embed} -> + embed = Repo.preload(embed, presentation_file: :event) + broadcast({:ok, embed, embed.presentation_file.event.uuid}, :embed_created) + + {:error, changeset} -> + {:error, %{changeset | action: :insert}} + end end @doc """ @@ -157,22 +165,16 @@ defmodule Claper.Embeds do |> Repo.update_all(set: [enabled: false]) end - def set_status(id, presentation_file_id, position, status) do - if status do - from(e in Embed, - where: - e.presentation_file_id == ^presentation_file_id and e.position == ^position and - e.id != ^id - ) - |> Repo.update_all(set: [enabled: false]) - end + def set_enabled(id) do + get_embed!(id) + |> Ecto.Changeset.change(enabled: true) + |> Repo.update() + end - from(e in Embed, - where: - e.presentation_file_id == ^presentation_file_id and e.position == ^position and - e.id == ^id - ) - |> Repo.update_all(set: [enabled: status]) + def set_disabled(id) do + get_embed!(id) + |> Ecto.Changeset.change(enabled: false) + |> Repo.update() end defp broadcast({:error, _reason} = error, _embed), do: error diff --git a/lib/claper/embeds/embed.ex b/lib/claper/embeds/embed.ex index 021fa84d..80305887 100644 --- a/lib/claper/embeds/embed.ex +++ b/lib/claper/embeds/embed.ex @@ -3,10 +3,24 @@ defmodule Claper.Embeds.Embed do import Ecto.Changeset import ClaperWeb.Gettext + @type t :: %__MODULE__{ + id: integer(), + title: String.t(), + content: String.t(), + provider: String.t(), + enabled: boolean(), + position: integer() | nil, + attendee_visibility: boolean() | nil, + presentation_file_id: integer() | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + @derive {Jason.Encoder, only: [:title, :content, :position, :attendee_visibility]} schema "embeds" do field :title, :string field :content, :string + field :provider, :string field :enabled, :boolean, default: true field :position, :integer, default: 0 field :attendee_visibility, :boolean, default: false @@ -23,6 +37,7 @@ defmodule Claper.Embeds.Embed do :enabled, :title, :content, + :provider, :presentation_file_id, :position, :attendee_visibility @@ -30,12 +45,61 @@ defmodule Claper.Embeds.Embed do |> validate_required([ :title, :content, + :provider, :presentation_file_id, :position, :attendee_visibility ]) - |> validate_format(:content, ~r//, - message: gettext("Invalid embed format (should start with )") - ) + |> validate_inclusion(:provider, ["youtube", "vimeo", "canva", "googleslides", "custom"]) + |> validate_provider_url() + end + + defp validate_provider_url(changeset) do + case get_field(changeset, :provider) do + "youtube" -> + changeset + |> validate_format(:content, ~r/^https?:\/\/.+$/, + message: gettext("Please enter a valid link starting with http:// or https://") + ) + |> validate_format(:content, ~r/youtu\.be/, + message: gettext("Please enter a valid %{provider} link", provider: "YouTube") + ) + + "canva" -> + changeset + |> validate_format(:content, ~r/^https?:\/\/.+$/, + message: gettext("Please enter a valid link starting with http:// or https://") + ) + |> validate_format(:content, ~r/canva\.com/, + message: gettext("Please enter a valid %{provider} link", provider: "Canva") + ) + + "googleslides" -> + changeset + |> validate_format(:content, ~r/^https?:\/\/.+$/, + message: gettext("Please enter a valid link starting with http:// or https://") + ) + |> validate_format(:content, ~r/google\.com/, + message: gettext("Please enter a valid %{provider} link", provider: "Google Slides") + ) + + "vimeo" -> + changeset + |> validate_format(:content, ~r/^https?:\/\/.+$/, + message: gettext("Please enter a valid link starting with http:// or https://") + ) + |> validate_format(:content, ~r/vimeo\.com/, + message: gettext("Please enter a valid %{provider} link", provider: "Vimeo") + ) + + "custom" -> + changeset + |> validate_format(:content, ~r//s, + message: gettext("Please enter valid HTML content with an iframe tag") + ) + + _ -> + changeset + end end end diff --git a/lib/claper/events.ex b/lib/claper/events.ex index 8672f9db..b5807dc4 100644 --- a/lib/claper/events.ex +++ b/lib/claper/events.ex @@ -97,7 +97,7 @@ defmodule Claper.Events do event = Repo.get_by!(Event, uuid: id) is_leader = - Claper.Events.is_leaded_by(current_user.email, event) || event.user_id == current_user.id + Claper.Events.leaded_by?(current_user.email, event) || event.user_id == current_user.id if is_leader do event |> Repo.preload(preload) @@ -177,12 +177,12 @@ defmodule Claper.Events do ## Examples - iex> is_leaded_by("email@example.com", 123) + iex> leaded_by?("email@example.com", 123) true """ - def is_leaded_by(email, event) do + def leaded_by?(email, event) do from(a in ActivityLeader, join: u in Claper.Accounts.User, on: u.email == a.email, @@ -365,6 +365,138 @@ defmodule Claper.Events do end end + @doc """ + Duplicate an event + + ## Examples + + iex> duplicate(user_id, event_uuid) + {:ok, %Event{}} + + iex> duplicate(user_id, event_uuid) + {:error, %Ecto.Changeset{}} + + """ + def duplicate_event(user_id, event_uuid) do + case Ecto.Multi.new() + |> Ecto.Multi.run(:original_event, fn _repo, _changes -> + {:ok, + get_user_event!(user_id, event_uuid, + presentation_file: [ + polls: [:poll_opts], + forms: [], + embeds: [], + presentation_state: [] + ] + )} + end) + |> Ecto.Multi.run(:new_event, fn _repo, %{original_event: original_event} -> + new_code = + for _ <- 1..5, + into: "", + do: <> + + attrs = + Map.from_struct(original_event) + |> Map.drop([:id, :inserted_at, :updated_at, :presentation_file]) + |> Map.put(:leaders, []) + |> Map.put(:code, "#{new_code}") + |> Map.put(:name, "#{original_event.name} (Copy)") + + create_event(attrs) + end) + |> Ecto.Multi.run(:new_presentation_file, fn _repo, + %{ + original_event: original_event, + new_event: new_event + } -> + attrs = + Map.from_struct(original_event.presentation_file) + |> Map.drop([:id, :inserted_at, :updated_at, :presentation_state]) + |> Map.put(:event_id, new_event.id) + + Claper.Presentations.create_presentation_file(attrs) + end) + |> Ecto.Multi.run(:new_presentation_state, fn _repo, + %{ + original_event: original_event, + new_presentation_file: + new_presentation_file + } -> + attrs = + Map.from_struct(original_event.presentation_file.presentation_state) + |> Map.drop([:id, :inserted_at, :updated_at]) + |> Map.put(:presentation_file_id, new_presentation_file.id) + |> Map.put(:position, 0) + |> Map.put(:banned, nil) + + Claper.Presentations.create_presentation_state(attrs) + end) + |> Ecto.Multi.run(:polls, fn _repo, + %{ + new_presentation_file: new_presentation_file, + original_event: original_event + } -> + {:ok, + Enum.map(original_event.presentation_file.polls, fn poll -> + poll_attrs = + Map.from_struct(poll) + |> Map.drop([:id, :inserted_at, :updated_at]) + |> Map.put(:presentation_file_id, new_presentation_file.id) + |> Map.put( + :poll_opts, + Enum.map(poll.poll_opts, fn opt -> + Map.from_struct(opt) + |> Map.drop([:id, :inserted_at, :updated_at]) + end) + ) + + {:ok, new_poll} = Claper.Polls.create_poll(poll_attrs) + new_poll + end)} + end) + |> Ecto.Multi.run(:forms, fn _repo, + %{ + new_presentation_file: new_presentation_file, + original_event: original_event + } -> + {:ok, + Enum.map(original_event.presentation_file.forms, fn form -> + form_attrs = + Map.from_struct(form) + |> Map.drop([:id, :inserted_at, :updated_at]) + |> Map.put(:presentation_file_id, new_presentation_file.id) + |> Map.put( + :fields, + Enum.map(form.fields, &Map.from_struct(&1)) + ) + + {:ok, new_form} = Claper.Forms.create_form(form_attrs) + new_form + end)} + end) + |> Ecto.Multi.run(:embeds, fn _repo, + %{ + new_presentation_file: new_presentation_file, + original_event: original_event + } -> + {:ok, + Enum.map(original_event.presentation_file.embeds, fn embed -> + embed_attrs = + Map.from_struct(embed) + |> Map.drop([:id, :inserted_at, :updated_at]) + |> Map.put(:presentation_file_id, new_presentation_file.id) + + {:ok, new_embed} = Claper.Embeds.create_embed(embed_attrs) + new_embed + end)} + end) + |> Repo.transaction() do + {:ok, %{new_event: new_event}} -> {:ok, new_event} + {:error, _failed_operation, failed_value, _changes_so_far} -> {:error, failed_value} + end + end + @doc """ Deletes a event. @@ -396,6 +528,24 @@ defmodule Claper.Events do alias Claper.Events.ActivityLeader + @doc """ + Creates a activity leader. + + ## Examples + + iex> create_activity_leader(%{field: value}) + {:ok, %ActivityLeader{}} + + iex> create_activity_leader(%{field: bad_value}) + {:error, %Ecto.Changeset{}} + + """ + def create_activity_leader(attrs) do + %ActivityLeader{} + |> ActivityLeader.changeset(attrs) + |> Repo.insert() + end + @doc """ Gets a single facilitator. diff --git a/lib/claper/events/activity_leader.ex b/lib/claper/events/activity_leader.ex index 429b0e75..9259ccbe 100644 --- a/lib/claper/events/activity_leader.ex +++ b/lib/claper/events/activity_leader.ex @@ -2,6 +2,18 @@ defmodule Claper.Events.ActivityLeader do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + temp_id: String.t() | nil, + delete: boolean() | nil, + user_id: integer() | nil, + user_email: String.t() | nil, + email: String.t(), + event_id: integer(), + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + schema "activity_leaders" do field :temp_id, :string, virtual: true field :delete, :boolean, virtual: true diff --git a/lib/claper/events/event.ex b/lib/claper/events/event.ex index 2a0b7e5a..6596ec2c 100644 --- a/lib/claper/events/event.ex +++ b/lib/claper/events/event.ex @@ -2,6 +2,22 @@ defmodule Claper.Events.Event do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + uuid: Ecto.UUID.t(), + name: String.t() | nil, + code: String.t(), + audience_peak: integer() | nil, + started_at: NaiveDateTime.t(), + expired_at: NaiveDateTime.t() | nil, + posts: [Claper.Posts.Post.t()] | nil, + leaders: [Claper.Events.ActivityLeader.t()] | nil, + presentation_file: Claper.Presentations.PresentationFile.t() | nil, + user: Claper.Accounts.User.t() | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + schema "events" do field :uuid, :binary_id field :name, :string diff --git a/lib/claper/forms.ex b/lib/claper/forms.ex index 893825dc..0fc1091f 100644 --- a/lib/claper/forms.ex +++ b/lib/claper/forms.ex @@ -95,6 +95,14 @@ defmodule Claper.Forms do %Form{} |> Form.changeset(attrs) |> Repo.insert() + |> case do + {:ok, form} -> + form = Repo.preload(form, presentation_file: :event) + broadcast({:ok, form, form.presentation_file.event.uuid}, :form_created) + + {:error, changeset} -> + {:error, %{changeset | action: :insert}} + end end @doc """ @@ -181,22 +189,16 @@ defmodule Claper.Forms do |> Repo.update_all(set: [enabled: false]) end - def set_status(id, presentation_file_id, position, status) do - if status do - from(f in Form, - where: - f.presentation_file_id == ^presentation_file_id and f.position == ^position and - f.id != ^id - ) - |> Repo.update_all(set: [enabled: false]) - end + def set_enabled(id) do + get_form!(id) + |> Ecto.Changeset.change(enabled: true) + |> Repo.update() + end - from(f in Form, - where: - f.presentation_file_id == ^presentation_file_id and f.position == ^position and - f.id == ^id - ) - |> Repo.update_all(set: [enabled: status]) + def set_disabled(id) do + get_form!(id) + |> Ecto.Changeset.change(enabled: false) + |> Repo.update() end defp broadcast({:error, _reason} = error, _form), do: error diff --git a/lib/claper/forms/field.ex b/lib/claper/forms/field.ex index 3d4c4b35..d0b32141 100644 --- a/lib/claper/forms/field.ex +++ b/lib/claper/forms/field.ex @@ -2,6 +2,11 @@ defmodule Claper.Forms.Field do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + name: String.t(), + type: String.t() + } + @primary_key false embedded_schema do field :name, :string diff --git a/lib/claper/forms/form.ex b/lib/claper/forms/form.ex index 18ba9431..f4e41f86 100644 --- a/lib/claper/forms/form.ex +++ b/lib/claper/forms/form.ex @@ -2,6 +2,18 @@ defmodule Claper.Forms.Form do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + enabled: boolean() | nil, + position: integer() | nil, + title: String.t(), + fields: [Claper.Forms.Field.t()] | nil, + presentation_file_id: integer() | nil, + form_submits: [Claper.Forms.FormSubmit.t()] | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + @derive {Jason.Encoder, only: [:title, :position]} schema "forms" do field :enabled, :boolean, default: true diff --git a/lib/claper/forms/form_submit.ex b/lib/claper/forms/form_submit.ex index e672330a..a867fa5d 100644 --- a/lib/claper/forms/form_submit.ex +++ b/lib/claper/forms/form_submit.ex @@ -2,6 +2,16 @@ defmodule Claper.Forms.FormSubmit do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + attendee_identifier: String.t() | nil, + response: map(), + form_id: integer() | nil, + user_id: integer() | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + schema "form_submits" do field :attendee_identifier, :string field :response, :map, on_replace: :delete diff --git a/lib/claper/interactions.ex b/lib/claper/interactions.ex new file mode 100644 index 00000000..2e9d662b --- /dev/null +++ b/lib/claper/interactions.ex @@ -0,0 +1,115 @@ +defmodule Claper.Interactions do + alias Claper.Polls + alias Claper.Forms + alias Claper.Embeds + alias Claper.Events + alias Claper.Presentations + + import Ecto.Query, warn: false + + @type interaction :: Polls.Poll | Forms.Form | Embeds.Embed + + def get_number_total_interactions(presentation_file_id) do + from(p in Polls.Poll, + where: p.presentation_file_id == ^presentation_file_id, + select: count(p.id) + ) + |> Claper.Repo.one() + |> Kernel.+( + from(f in Forms.Form, + where: f.presentation_file_id == ^presentation_file_id, + select: count(f.id) + ) + |> Claper.Repo.one() + ) + |> Kernel.+( + from(e in Embeds.Embed, + where: e.presentation_file_id == ^presentation_file_id, + select: count(e.id) + ) + |> Claper.Repo.one() + ) + end + + def get_active_interaction(event, position) do + with {:ok, interactions} <- get_interactions_at_position(event, position) do + interactions |> Enum.filter(&(&1.enabled == true)) |> List.first() + end + end + + def get_interactions_at_position( + %Events.Event{ + presentation_file: %Presentations.PresentationFile{id: presentation_file_id} + } = event, + position, + broadcast \\ false + ) do + with polls <- Polls.list_polls_at_position(presentation_file_id, position), + forms <- Forms.list_forms_at_position(presentation_file_id, position), + embeds <- Embeds.list_embeds_at_position(presentation_file_id, position) do + interactions = + (polls ++ forms ++ embeds) + |> Enum.sort_by(& &1.inserted_at, {:asc, NaiveDateTime}) + + if broadcast do + active_interaction = interactions |> Enum.filter(&(&1.enabled == true)) |> List.first() + + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{event.uuid}", + {:current_interaction, active_interaction} + ) + end + + {:ok, interactions} + end + end + + def enable_interaction(interaction) do + Ecto.Multi.new() + |> Ecto.Multi.run(:disable_polls, fn _repo, _ -> + {count, _} = Polls.disable_all(interaction.presentation_file_id, interaction.position) + {:ok, count} + end) + |> Ecto.Multi.run(:disable_forms, fn _repo, _ -> + {count, _} = Forms.disable_all(interaction.presentation_file_id, interaction.position) + {:ok, count} + end) + |> Ecto.Multi.run(:disable_embeds, fn _repo, _ -> + {count, _} = Embeds.disable_all(interaction.presentation_file_id, interaction.position) + {:ok, count} + end) + |> Ecto.Multi.run(:enable_interaction, fn _repo, _ -> + set_enabled(interaction) + end) + |> Claper.Repo.transaction() + |> case do + {:ok, _} -> :ok + {:error, _, reason, _} -> {:error, reason} + end + end + + defp set_enabled(%Polls.Poll{} = interaction) do + Polls.set_enabled(interaction.id) + end + + defp set_enabled(%Forms.Form{} = interaction) do + Forms.set_enabled(interaction.id) + end + + defp set_enabled(%Embeds.Embed{} = interaction) do + Embeds.set_enabled(interaction.id) + end + + def disable_interaction(%Polls.Poll{} = interaction) do + Polls.set_disabled(interaction.id) + end + + def disable_interaction(%Forms.Form{} = interaction) do + Forms.set_disabled(interaction.id) + end + + def disable_interaction(%Embeds.Embed{} = interaction) do + Embeds.set_disabled(interaction.id) + end +end diff --git a/lib/claper/polls.ex b/lib/claper/polls.ex index 724dec21..4ed6d1aa 100644 --- a/lib/claper/polls.ex +++ b/lib/claper/polls.ex @@ -142,6 +142,14 @@ defmodule Claper.Polls do %Poll{} |> Poll.changeset(attrs) |> Repo.insert() + |> case do + {:ok, poll} -> + poll = Repo.preload(poll, presentation_file: :event) + broadcast({:ok, poll, poll.presentation_file.event.uuid}, :poll_created) + + {:error, changeset} -> + {:error, %{changeset | action: :insert}} + end end @doc """ @@ -275,22 +283,16 @@ defmodule Claper.Polls do |> Repo.update_all(set: [enabled: false]) end - def set_status(id, presentation_file_id, position, status) do - if status do - from(p in Poll, - where: - p.presentation_file_id == ^presentation_file_id and p.position == ^position and - p.id != ^id - ) - |> Repo.update_all(set: [enabled: false]) - end + def set_enabled(id) do + get_poll!(id) + |> Ecto.Changeset.change(enabled: true) + |> Repo.update() + end - from(p in Poll, - where: - p.presentation_file_id == ^presentation_file_id and p.position == ^position and - p.id == ^id - ) - |> Repo.update_all(set: [enabled: status]) + def set_disabled(id) do + get_poll!(id) + |> Ecto.Changeset.change(enabled: false) + |> Repo.update() end defp broadcast({:error, _reason} = error, _poll), do: error diff --git a/lib/claper/polls/poll.ex b/lib/claper/polls/poll.ex index 5e75cb35..f340b537 100644 --- a/lib/claper/polls/poll.ex +++ b/lib/claper/polls/poll.ex @@ -2,6 +2,21 @@ defmodule Claper.Polls.Poll do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + title: String.t(), + position: integer() | nil, + total: integer() | nil, + enabled: boolean() | nil, + multiple: boolean() | nil, + presentation_file_id: integer() | nil, + poll_opts: [Claper.Polls.PollOpt.t()], + poll_votes: [Claper.Polls.PollVote.t()] | nil, + show_results: boolean() | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + @derive {Jason.Encoder, only: [:title, :position]} schema "polls" do field :title, :string @@ -9,6 +24,7 @@ defmodule Claper.Polls.Poll do field :total, :integer, virtual: true field :enabled, :boolean field :multiple, :boolean + field :show_results, :boolean belongs_to :presentation_file, Claper.Presentations.PresentationFile has_many :poll_opts, Claper.Polls.PollOpt, on_replace: :delete @@ -20,8 +36,17 @@ defmodule Claper.Polls.Poll do @doc false def changeset(poll, attrs) do poll - |> cast(attrs, [:title, :presentation_file_id, :position, :enabled, :total, :multiple]) + |> cast(attrs, [ + :title, + :presentation_file_id, + :position, + :enabled, + :total, + :multiple, + :show_results + ]) |> cast_assoc(:poll_opts, required: true) |> validate_required([:title, :presentation_file_id, :position]) + |> validate_length(:title, max: 255) end end diff --git a/lib/claper/polls/poll_opt.ex b/lib/claper/polls/poll_opt.ex index 071a2e59..6fbb028e 100644 --- a/lib/claper/polls/poll_opt.ex +++ b/lib/claper/polls/poll_opt.ex @@ -2,6 +2,18 @@ defmodule Claper.Polls.PollOpt do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + content: String.t(), + vote_count: integer(), + percentage: float(), + poll_id: integer(), + poll: Claper.Polls.Poll.t(), + poll_votes: [Claper.Polls.PollVote.t()], + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + @derive {Jason.Encoder, only: [:content, :vote_count]} schema "poll_opts" do field :content, :string @@ -19,5 +31,6 @@ defmodule Claper.Polls.PollOpt do poll_opt |> cast(attrs, [:content, :vote_count, :poll_id]) |> validate_required([:content]) + |> validate_length(:content, max: 255) end end diff --git a/lib/claper/polls/poll_vote.ex b/lib/claper/polls/poll_vote.ex index b96a8daa..f6944fad 100644 --- a/lib/claper/polls/poll_vote.ex +++ b/lib/claper/polls/poll_vote.ex @@ -2,6 +2,16 @@ defmodule Claper.Polls.PollVote do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + attendee_identifier: String.t() | nil, + poll_id: integer() | nil, + poll_opt_id: integer() | nil, + user_id: integer() | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + schema "poll_votes" do field :attendee_identifier, :string diff --git a/lib/claper/posts/post.ex b/lib/claper/posts/post.ex index 57a0db0d..ab639d65 100644 --- a/lib/claper/posts/post.ex +++ b/lib/claper/posts/post.ex @@ -2,6 +2,24 @@ defmodule Claper.Posts.Post do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + body: String.t(), + uuid: Ecto.UUID.t(), + like_count: integer() | nil, + love_count: integer() | nil, + lol_count: integer() | nil, + name: String.t() | nil, + attendee_identifier: String.t() | nil, + position: integer() | nil, + pinned: boolean() | nil, + event_id: integer() | nil, + user_id: integer() | nil, + reactions: [Claper.Posts.Reaction.t()] | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + schema "posts" do field :body, :string field :uuid, :binary_id diff --git a/lib/claper/posts/reaction.ex b/lib/claper/posts/reaction.ex index a4c8f95f..9fe6100d 100644 --- a/lib/claper/posts/reaction.ex +++ b/lib/claper/posts/reaction.ex @@ -2,6 +2,16 @@ defmodule Claper.Posts.Reaction do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + icon: String.t() | nil, + attendee_identifier: String.t() | nil, + post_id: integer() | nil, + user_id: integer() | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + schema "reactions" do field :icon, :string field :attendee_identifier, :string diff --git a/lib/claper/presentations.ex b/lib/claper/presentations.ex index b44540b4..680661ec 100644 --- a/lib/claper/presentations.ex +++ b/lib/claper/presentations.ex @@ -25,8 +25,11 @@ defmodule Claper.Presentations do def get_presentation_file!(id, preload \\ []), do: Repo.get!(PresentationFile, id) |> Repo.preload(preload) - def get_presentation_file_by_hash!(hash) when is_binary(hash), - do: Repo.get_by(PresentationFile, hash: hash) |> Repo.preload([:event]) + def get_presentation_files_by_hash(hash) when is_binary(hash), + do: Repo.all(from p in PresentationFile, where: p.hash == ^hash) + + def get_presentation_files_by_hash(hash) when is_nil(hash), + do: [] @doc """ Creates a presentation_files. diff --git a/lib/claper/presentations/presentation_file.ex b/lib/claper/presentations/presentation_file.ex index 787334ad..a70a36c3 100644 --- a/lib/claper/presentations/presentation_file.ex +++ b/lib/claper/presentations/presentation_file.ex @@ -2,6 +2,20 @@ defmodule Claper.Presentations.PresentationFile do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + hash: String.t() | nil, + length: integer() | nil, + status: String.t() | nil, + event_id: integer() | nil, + polls: [Claper.Polls.Poll.t()] | nil, + forms: [Claper.Forms.Form.t()] | nil, + embeds: [Claper.Embeds.Embed.t()] | nil, + presentation_state: Claper.Presentations.PresentationState.t(), + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + schema "presentation_files" do field :hash, :string field :length, :integer diff --git a/lib/claper/presentations/presentation_state.ex b/lib/claper/presentations/presentation_state.ex index dd1ef7c4..24ff2363 100644 --- a/lib/claper/presentations/presentation_state.ex +++ b/lib/claper/presentations/presentation_state.ex @@ -2,6 +2,22 @@ defmodule Claper.Presentations.PresentationState do use Ecto.Schema import Ecto.Changeset + @type t :: %__MODULE__{ + id: integer(), + position: integer() | nil, + chat_visible: boolean() | nil, + poll_visible: boolean() | nil, + join_screen_visible: boolean() | nil, + chat_enabled: boolean() | nil, + anonymous_chat_enabled: boolean() | nil, + message_reaction_enabled: boolean() | nil, + banned: [String.t()] | nil, + show_only_pinned: boolean() | nil, + presentation_file_id: integer() | nil, + inserted_at: NaiveDateTime.t(), + updated_at: NaiveDateTime.t() + } + schema "presentation_states" do field :position, :integer field :chat_visible, :boolean @@ -10,7 +26,6 @@ defmodule Claper.Presentations.PresentationState do field :chat_enabled, :boolean field :anonymous_chat_enabled, :boolean field :message_reaction_enabled, :boolean, default: true - field :show_poll_results_enabled, :boolean, default: true field :banned, {:array, :string}, default: [] field :show_only_pinned, :boolean, default: false @@ -32,8 +47,7 @@ defmodule Claper.Presentations.PresentationState do :chat_enabled, :anonymous_chat_enabled, :show_only_pinned, - :message_reaction_enabled, - :show_poll_results_enabled + :message_reaction_enabled ]) |> validate_required([]) end diff --git a/lib/claper/release.ex b/lib/claper/release.ex index 3683f933..4401231f 100644 --- a/lib/claper/release.ex +++ b/lib/claper/release.ex @@ -15,6 +15,17 @@ defmodule Claper.Release do end end + def seeds do + load_app() + + for repo <- repos() do + {:ok, _, _} = + Ecto.Migrator.with_repo(repo, fn _repo -> + Code.eval_file("priv/repo/seeds.exs") + end) + end + end + def rollback(repo, version) do load_app() {:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :down, to: version)) diff --git a/lib/claper/tasks/converter.ex b/lib/claper/tasks/converter.ex index 2420c31b..6e5b3c33 100644 --- a/lib/claper/tasks/converter.ex +++ b/lib/claper/tasks/converter.ex @@ -11,7 +11,7 @@ defmodule Claper.Tasks.Converter do Convert the presentation file to images. We use original hash :erlang.phash2(code-name) where the files are uploaded to send it to another folder with a new hash. This last stored in db. """ - def convert(user_id, file, hash, ext, presentation_file_id) do + def convert(user_id, file, hash, ext, presentation_file_id, is_copy \\ false) do presentation = Claper.Presentations.get_presentation_file!(presentation_file_id, [:event]) {:ok, presentation} = @@ -32,11 +32,11 @@ defmodule Claper.Tasks.Converter do "#{hash}" ]) - IO.puts("Starting conversion for #{hash}...") + IO.puts("Starting conversion for #{hash}... (copy: #{is_copy})") file_to_pdf(String.to_atom(ext), path, file) |> pdf_to_jpg(path, presentation, user_id) - |> jpg_upload(hash, path, presentation, user_id) + |> jpg_upload(hash, path, presentation, user_id, is_copy) end @doc """ @@ -113,7 +113,7 @@ defmodule Claper.Tasks.Converter do failure(presentation, path, user_id) end - defp jpg_upload(%Result{status: 0}, hash, path, presentation, user_id) do + defp jpg_upload(%Result{status: 0}, hash, path, presentation, user_id, is_copy) do files = Path.wildcard("#{path}/*.jpg") # assign new hash to avoid cache issues @@ -147,14 +147,14 @@ defmodule Claper.Tasks.Converter do end end - if !is_nil(presentation.hash) do + if !is_nil(presentation.hash) && !is_copy do clear(presentation.hash) end success(presentation, path, new_hash, length(files), user_id) end - defp jpg_upload(_result, _hash, path, presentation, user_id) do + defp jpg_upload(_result, _hash, path, presentation, user_id, _is_copy) do failure(presentation, path, user_id) end diff --git a/lib/claper_web/controllers/lti/grade_controller.ex b/lib/claper_web/controllers/lti/grade_controller.ex new file mode 100644 index 00000000..23953040 --- /dev/null +++ b/lib/claper_web/controllers/lti/grade_controller.ex @@ -0,0 +1,70 @@ +defmodule ClaperWeb.Lti.GradeController do + use ClaperWeb, :controller + + alias Lti13.Tool.Services.AGS + alias Lti13.Tool.Services.AGS.Score + + def create(conn, _params) do + resource_id = conn |> get_session(:resource_id) |> String.to_integer() + user_id = conn |> get_session(:user_id) + timestamp = get_timestamp() + + case fetch_access_token() do + {:ok, access_token} -> + handle_line_item(conn, resource_id, user_id, timestamp, access_token) + + {:error, msg} -> + conn |> send_resp(500, msg) + end + end + + defp get_timestamp do + {:ok, dt} = DateTime.now("Etc/UTC") + DateTime.to_iso8601(dt) + end + + defp fetch_access_token do + Lti13.Tool.Services.AccessToken.fetch_access_token( + %{ + auth_token_url: "http://localhost.charlesproxy.com/mod/lti/token.php", + client_id: "NQQ8egz8Kj1s1qw", + auth_server: "http://localhost.charlesproxy.com" + }, + [ + "https://purl.imsglobal.org/spec/lti-ags/scope/lineitem", + "https://purl.imsglobal.org/spec/lti-ags/scope/score" + ], + "http://localhost:4000" + ) + end + + defp handle_line_item(conn, resource_id, user_id, timestamp, access_token) do + case AGS.fetch_or_create_line_item( + "http://localhost.charlesproxy.com/mod/lti/services.php/2/lineitems?type_id=2", + resource_id, + fn -> 100.0 end, + "test", + access_token + ) do + {:ok, line_item} -> + post_score(line_item, user_id, timestamp, access_token) + conn |> send_resp(200, "") + end + end + + defp post_score(line_item, user_id, timestamp, access_token) do + AGS.post_score( + %Score{ + scoreGiven: 90.0, + scoreMaximum: 100.0, + activityProgress: "Completed", + gradingProgress: "FullyGraded", + userId: user_id, + comment: "", + timestamp: timestamp + }, + line_item, + access_token + ) + end +end diff --git a/lib/claper_web/controllers/lti/launch_controller.ex b/lib/claper_web/controllers/lti/launch_controller.ex new file mode 100644 index 00000000..3fcfecd6 --- /dev/null +++ b/lib/claper_web/controllers/lti/launch_controller.ex @@ -0,0 +1,72 @@ +defmodule ClaperWeb.Lti.LaunchController do + alias ClaperWeb.UserAuth + use ClaperWeb, :controller + + def login(conn, params) do + case Lti13.Tool.OidcLogin.oidc_login_redirect_url(params) do + {:ok, state, redirect_url} -> + conn + |> put_session("state", state) + |> redirect(external: redirect_url) + + {:error, %{reason: :invalid_registration, msg: msg, issuer: _issuer, client_id: _client_id}} -> + render(conn, "error.html", msg: msg) + + {:error, %{reason: _reason, msg: msg}} -> + render(conn, "error.html", msg: msg) + end + end + + def launch(conn, params) do + session_state = Plug.Conn.get_session(conn, "state") + + case Lti13.Tool.LaunchValidation.validate(params, session_state) do + {:ok, + %{ + lti_user: lti_user, + claims: %{ + "https://purl.imsglobal.org/spec/lti/claim/context" => %{ + "label" => _course_label, + "title" => _course_title + }, + "https://purl.imsglobal.org/spec/lti/claim/resource_link" => %{ + "title" => _resource_title, + "id" => resource_id + }, + "sub" => user_id + }, + resource: resource + }} -> + conn = + conn + |> put_session(:resource_id, resource_id) + |> put_session(:user_id, user_id) + |> set_user_return_to(resource, lti_user) + + UserAuth.log_in_user(conn, lti_user.user) + + {:error, %{reason: :invalid_registration, msg: msg, issuer: _issuer, client_id: _client_id}} -> + render(conn, "error.html", msg: msg) + + {:error, + %{ + reason: :invalid_deployment, + msg: msg, + registration_id: _registration_id, + deployment_id: _deployment_id + }} -> + render(conn, "error.html", msg: msg) + + {:error, %{reason: _reason, msg: msg}} -> + render(conn, "error.html", msg: msg) + end + end + + defp set_user_return_to(conn, resource, lti_user) do + if resource.event.user_id == lti_user.user_id do + conn |> put_session(:user_return_to, ~p"/events") + else + conn |> put_session(:user_return_to, ~p"/e/#{resource.event.code}") + end + end +end diff --git a/lib/claper_web/controllers/lti/registration_controller.ex b/lib/claper_web/controllers/lti/registration_controller.ex new file mode 100644 index 00000000..f797dcfd --- /dev/null +++ b/lib/claper_web/controllers/lti/registration_controller.ex @@ -0,0 +1,110 @@ +defmodule ClaperWeb.Lti.RegistrationController do + use ClaperWeb, :controller + + def new(conn, %{"openid_configuration" => conf, "registration_token" => token}) do + render(conn, "new.html", conf: conf, token: token) + end + + def new(conn, _params) do + conn |> render(ClaperWeb.ErrorView, "404.html") + end + + def create(conn, params) do + jwk = Lti13.Jwks.get_active_jwk() + + %{"openid_configuration" => conf, "registration_token" => token} = params + + body = Req.post!(conf).body + + %{ + "issuer" => issuer, + "registration_endpoint" => reg_endpoint, + "jwks_uri" => jwks_uri, + "authorization_endpoint" => auth_endpoint, + "token_endpoint" => token_endpoint + } = body + + body = + Req.post!(reg_endpoint, + headers: [ + {"Authorization", "Bearer #{token}"}, + {"Content-type", "application/json"}, + {"Accept", "application/json"} + ], + body: body() + ).body + + %{ + "client_id" => client_id, + "https://purl.imsglobal.org/spec/lti-tool-configuration" => %{ + "deployment_id" => deployment_id + } + } = body + + {:ok, registration} = + Lti13.Registrations.create_registration(%{ + issuer: issuer, + client_id: client_id, + key_set_url: jwks_uri, + auth_token_url: token_endpoint, + auth_login_url: auth_endpoint, + auth_server: issuer, + tool_jwk_id: jwk.id + }) + + {:ok, _deployment} = + Lti13.Deployments.create_deployment(%{ + deployment_id: deployment_id, + registration_id: registration.id + }) + + render(conn, "success.html") + end + + defp body() do + endpoint_config = Application.get_env(:claper, ClaperWeb.Endpoint)[:url] + + default_ports = [80, 443] + + port_suffix = + if endpoint_config[:port] in default_ports, do: "", else: ":#{endpoint_config[:port]}" + + url = "#{endpoint_config[:scheme]}://#{endpoint_config[:host]}#{port_suffix}" + + Jason.encode_to_iodata!(%{ + "application_type" => "web", + "response_types" => ["id_token"], + "grant_types" => ["implict", "client_credentials"], + "initiate_login_uri" => "#{url}/lti/login", + "redirect_uris" => [ + "#{url}/lti/launch" + ], + "client_name" => "Claper", + "jwks_uri" => "#{url}/.well-known/jwks.json", + "logo_uri" => "#{url}/images/logo.svg", + "token_endpoint_auth_method" => "private_key_jwt", + "scope" => + "https://purl.imsglobal.org/spec/lti-ags/scope/score https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly", + "https://purl.imsglobal.org/spec/lti-tool-configuration" => %{ + "domain" => "#{endpoint_config[:host]}#{port_suffix}", + "description" => "Create interactive presentations", + "target_link_uri" => "#{url}/lti/launch", + "custom_parameters" => %{ + "context_start_date" => "$CourseSection.timeFrame.begin", + "context_end_date" => "$CourseSection.timeFrame.end", + "resource_title" => "$ResourceLink.title", + "resource_id" => "$ResourceLink.id" + }, + "claims" => ["iss", "sub", "name", "email"] + } + }) + end + + def jwks(conn, _params) do + keys = Lti13.Jwks.get_all_public_keys() + + conn + |> put_status(:ok) + |> json(keys) + end +end diff --git a/lib/claper_web/controllers/user_auth.ex b/lib/claper_web/controllers/user_auth.ex index 5fb26fe2..383c9f54 100644 --- a/lib/claper_web/controllers/user_auth.ex +++ b/lib/claper_web/controllers/user_auth.ex @@ -75,6 +75,7 @@ defmodule ClaperWeb.UserAuth do It clears all session data for safety. See renew_session. """ def log_out_user(conn) do + logout_redirect_url = Application.get_env(:claper, :logout_redirect_url) user_token = get_session(conn, :user_token) user_token && Accounts.delete_session_token(user_token) @@ -85,9 +86,14 @@ defmodule ClaperWeb.UserAuth do conn |> renew_session() |> delete_resp_cookie(@remember_me_cookie) - |> redirect(to: "/") + |> custom_logout_redirect(logout_redirect_url) end + defp custom_logout_redirect(conn, nil), do: conn |> redirect(to: "/") + + defp custom_logout_redirect(conn, logout_redirect_url), + do: conn |> redirect(external: logout_redirect_url) + @doc """ Authenticates the user by looking into the session and remember me token. diff --git a/lib/claper_web/controllers/user_oidc_auth.ex b/lib/claper_web/controllers/user_oidc_auth.ex new file mode 100644 index 00000000..d2e85a23 --- /dev/null +++ b/lib/claper_web/controllers/user_oidc_auth.ex @@ -0,0 +1,118 @@ +defmodule ClaperWeb.UserOidcAuth do + @moduledoc """ + Plug for OpenID Connect authentication. + """ + alias ClaperWeb.UserAuth + use ClaperWeb, :controller + + import Phoenix.Controller + + @doc false + def new(conn, _params) do + {:ok, redirect_uri} = + Oidcc.create_redirect_url( + Claper.OidcProviderConfig, + client_id(), + client_secret(), + opts() + ) + + uri = Enum.join(redirect_uri, "") + + redirect(conn, external: uri) + end + + def callback(conn, %{"code" => code} = _params) do + with {:ok, + %Oidcc.Token{ + id: %Oidcc.Token.Id{token: id_token, claims: claims}, + access: %Oidcc.Token.Access{token: access_token}, + refresh: refresh_token + }} <- + Oidcc.retrieve_token( + code, + Claper.OidcProviderConfig, + client_id(), + client_secret(), + opts() + ), + {:ok, oidc_user} <- validate_user(id_token, access_token, refresh_token, claims) do + conn + |> UserAuth.log_in_user(oidc_user.user) + else + {:error, _} -> + conn + |> put_flash(:error, "Cannot authenticate user.") + |> redirect(to: ~p"/users/log_in") + end + + conn + end + + defp config do + Application.get_env(:claper, :oidc) + end + + defp client_id do + config()[:client_id] + end + + defp client_secret do + config()[:client_secret] + end + + defp provider_name do + config()[:provider_name] + end + + defp scopes do + config()[:scopes] + end + + defp base_url do + Application.get_env(:claper, ClaperWeb.Endpoint)[:base_url] + end + + defp opts() do + url = base_url() + + %{ + redirect_uri: "#{url}/users/oidc/callback", + scopes: scopes() + } + end + + defp format_refresh_token(%Oidcc.Token.Refresh{token: token}) do + token + end + + defp format_refresh_token(:none) do + "" + end + + defp validate_user(id_token, access_token, refresh_token, claims) do + mappings = config()[:property_mappings] + + case Claper.Accounts.get_or_create_user_with_oidc(%{ + sub: claims["sub"], + issuer: claims["iss"], + name: claims["name"], + email: claims["email"], + provider: provider_name(), + expires_at: claims["exp"] |> DateTime.from_unix!() |> DateTime.to_naive(), + id_token: id_token, + access_token: access_token, + refresh_token: format_refresh_token(refresh_token), + groups: claims["groups"], + roles: claims[mappings["roles"]], + organization: claims[mappings["organization"]], + photo_url: claims[mappings["photo_url"]] + }) do + {:error, _} -> + {:error, %{reason: :invalid_user, msg: "Invalid user"}} + + {:ok, user} -> + {:ok, user} + end + end +end diff --git a/lib/claper_web/controllers/user_session_controller.ex b/lib/claper_web/controllers/user_session_controller.ex index 1de54e70..81ecc219 100644 --- a/lib/claper_web/controllers/user_session_controller.ex +++ b/lib/claper_web/controllers/user_session_controller.ex @@ -5,8 +5,28 @@ defmodule ClaperWeb.UserSessionController do alias ClaperWeb.UserAuth def new(conn, _params) do + oidc_auto_redirect_login = Application.get_env(:claper, :oidc)[:auto_redirect_login] + + conn + |> redirect_to_login(oidc_auto_redirect_login) + end + + defp redirect_to_login(conn, true) do + conn |> redirect(to: "/users/oidc") + end + + defp redirect_to_login(conn, false) do + oidc_provider_name = Application.get_env(:claper, :oidc)[:provider_name] + oidc_logo_url = Application.get_env(:claper, :oidc)[:logo_url] + oidc_enabled = Application.get_env(:claper, :oidc)[:enabled] + conn - |> render("new.html", error_message: nil) + |> render("new.html", + error_message: nil, + oidc_provider_name: oidc_provider_name, + oidc_logo_url: oidc_logo_url, + oidc_enabled: oidc_enabled + ) end # def create(conn, %{"user" => %{"email" => email}} = _user_params) do @@ -18,10 +38,19 @@ defmodule ClaperWeb.UserSessionController do def create(conn, %{"user" => user_params}) do %{"email" => email, "password" => password} = user_params + oidc_provider_name = Application.get_env(:claper, :oidc)[:provider_name] + oidc_logo_url = Application.get_env(:claper, :oidc)[:logo_url] + oidc_enabled = Application.get_env(:claper, :oidc)[:enabled] + if user = Accounts.get_user_by_email_and_password(email, password) do UserAuth.log_in_user(conn, user, user_params) else - render(conn, "new.html", error_message: "Invalid email or password") + render(conn, "new.html", + error_message: "Invalid email or password", + oidc_provider_name: oidc_provider_name, + oidc_logo_url: oidc_logo_url, + oidc_enabled: oidc_enabled + ) end end diff --git a/lib/claper_web/endpoint.ex b/lib/claper_web/endpoint.ex index 63ae0bea..bb783e5e 100644 --- a/lib/claper_web/endpoint.ex +++ b/lib/claper_web/endpoint.ex @@ -7,7 +7,9 @@ defmodule ClaperWeb.Endpoint do @session_options [ store: :cookie, key: "_claper_key", - signing_salt: "Tg18Y2zU" + signing_salt: "Tg18Y2zU", + # 30 days + max_age: 24 * 60 * 60 * 30 ] socket "/live", Phoenix.LiveView.Socket, diff --git a/lib/claper_web/live/embed_live/form_component.ex b/lib/claper_web/live/embed_live/form_component.ex index fcf4dee8..8bb7a7e5 100644 --- a/lib/claper_web/live/embed_live/form_component.ex +++ b/lib/claper_web/live/embed_live/form_component.ex @@ -12,6 +12,13 @@ defmodule ClaperWeb.EmbedLive.FormComponent do |> assign(assigns) |> assign_new(:dark, fn -> false end) |> assign(:embeds, list_embeds(assigns)) + |> assign(:providers, [ + {"YouTube", "youtube"}, + {"Vimeo", "vimeo"}, + {"Canva", "canva"}, + {"Google Slides", "googleslides"}, + {"Custom (iframe)", "custom"} + ]) |> assign(:changeset, changeset)} end diff --git a/lib/claper_web/live/embed_live/form_component.html.heex b/lib/claper_web/live/embed_live/form_component.html.heex index bf07172e..2d17912a 100644 --- a/lib/claper_web/live/embed_live/form_component.html.heex +++ b/lib/claper_web/live/embed_live/form_component.html.heex @@ -18,24 +18,42 @@ required="true" /> -
- + +
+

+ +
+

<%= gettext("Options") %>

+
<%= checkbox(f, :attendee_visibility, class: "h-4 w-5") %> <%= label( f, :attendee_visibility, - gettext("Attendee can view the web content on their device"), + gettext("Attendees can view the web content on their device"), class: "text-sm font-medium" ) %>
diff --git a/lib/claper_web/live/event_live/embed_component.ex b/lib/claper_web/live/event_live/embed_component.ex index aa3fd197..46ef2740 100644 --- a/lib/claper_web/live/event_live/embed_component.ex +++ b/lib/claper_web/live/event_live/embed_component.ex @@ -60,7 +60,12 @@ defmodule ClaperWeb.EventLive.EmbedComponent do

<%= @embed.title %>

- <%= raw(@embed.content) %> + <.live_component + id="embed-component" + module={ClaperWeb.EventLive.EmbedIframeComponent} + provider={@embed.provider} + content={@embed.content} + />
diff --git a/lib/claper_web/live/event_live/embed_iframe_component.ex b/lib/claper_web/live/event_live/embed_iframe_component.ex new file mode 100644 index 00000000..ef53356d --- /dev/null +++ b/lib/claper_web/live/event_live/embed_iframe_component.ex @@ -0,0 +1,47 @@ +defmodule ClaperWeb.EventLive.EmbedIframeComponent do + use ClaperWeb, :live_component + + def render(assigns) do + ~H""" +
+ <%= case @provider do %> + <% "youtube" -> %> + + <% "vimeo" -> %> + + <% "canva" -> %> + + <% "googleslides" -> %> + + <% "custom" -> %> + <%= raw(@content) %> + <% end %> +
+ """ + end +end diff --git a/lib/claper_web/live/event_live/event_card_component.ex b/lib/claper_web/live/event_live/event_card_component.ex index 6b88c799..cfbde2e6 100644 --- a/lib/claper_web/live/event_live/event_card_component.ex +++ b/lib/claper_web/live/event_live/event_card_component.ex @@ -73,7 +73,7 @@ defmodule ClaperWeb.EventLive.EventCardComponent do class="mt-2 flex flex-col space-y-2 sm:space-y-0 justify-between sm:flex-row items-center" >
-
+
<%= if not @is_leader do %> - - <%= gettext("Edit") %> - + <%= gettext("Action") %> + + + + + <% end %>
@@ -196,16 +255,57 @@ defmodule ClaperWeb.EventLive.EventCardComponent do <%= gettext("Error when processing the file") %> -
+
<%= if not @is_leader do %> - - <%= gettext("Edit") %> - + <%= gettext("Action") %> + + + + + <% end %>
@@ -244,21 +344,64 @@ defmodule ClaperWeb.EventLive.EventCardComponent do <%= gettext("View report") %> -
+
<%= if not @is_leader do %> - <%= link(gettext("Delete"), - to: "#", - phx_click: "delete", - phx_value_id: @event.uuid, - data: [ - confirm: - gettext( - "This will delete all data related to your event, this cannot be undone. Confirm ?" - ) - ], - class: - "flex w-full lg:w-auto rounded-md tracking-wide focus:outline-none focus:shadow-outline text-red-500 text-sm items-center" - ) %> + + <% end %>
diff --git a/lib/claper_web/live/event_live/event_form_component.ex b/lib/claper_web/live/event_live/event_form_component.ex index 483e6204..b98c6377 100644 --- a/lib/claper_web/live/event_live/event_form_component.ex +++ b/lib/claper_web/live/event_live/event_form_component.ex @@ -248,7 +248,7 @@ defmodule ClaperWeb.EventLive.EventFormComponent do event_params ) do {:ok, event} -> - handle_file_conversion(socket, hash, ext) + handle_file_conversion(socket, hash, ext, event) send_email_to_leaders(socket, event) @@ -262,17 +262,20 @@ defmodule ClaperWeb.EventLive.EventFormComponent do end end - defp handle_file_conversion(socket, hash, ext) do + defp handle_file_conversion(socket, hash, ext, event) do if is_nil(hash) || is_nil(ext) do :ok else + files = Claper.Presentations.get_presentation_files_by_hash(event.presentation_file.hash) + Task.Supervisor.async_nolink(Claper.TaskSupervisor, fn -> Claper.Tasks.Converter.convert( socket.assigns.current_user.id, "original.#{ext}", hash, ext, - socket.assigns.event.presentation_file.id + socket.assigns.event.presentation_file.id, + files |> Enum.count() > 1 ) end) end diff --git a/lib/claper_web/live/event_live/event_form_component.html.heex b/lib/claper_web/live/event_live/event_form_component.html.heex index 2d348eee..028444bd 100644 --- a/lib/claper_web/live/event_live/event_form_component.html.heex +++ b/lib/claper_web/live/event_live/event_form_component.html.heex @@ -277,20 +277,6 @@ to={Date.add(Date.utc_today(), 365)} /> - - <%= if @action == :edit do %> - - <% end %>
<%= gettext("Remove") %> diff --git a/lib/claper_web/live/event_live/index.ex b/lib/claper_web/live/event_live/index.ex index 1eb53eb3..d6c4f692 100644 --- a/lib/claper_web/live/event_live/index.ex +++ b/lib/claper_web/live/event_live/index.ex @@ -12,10 +12,12 @@ defmodule ClaperWeb.EventLive.Index do Gettext.put_locale(ClaperWeb.Gettext, locale) end + code = for _ <- 1..5, into: "", do: <> + changeset = Events.change_event(%Event{}, %{ started_at: NaiveDateTime.utc_now(), - code: Enum.random(1000..9999), + code: code, leaders: [] }) @@ -56,6 +58,8 @@ defmodule ClaperWeb.EventLive.Index do @impl true def handle_event("save", %{"event" => event_params}, socket) do + code = for _ <- 1..5, into: "", do: <> + case Claper.Events.create_event( event_params |> Map.put("user_id", socket.assigns.current_user.id) @@ -65,7 +69,10 @@ defmodule ClaperWeb.EventLive.Index do "presentation_state" => %{} }) |> Map.put("started_at", NaiveDateTime.utc_now()) - |> Map.put("code", "#{Enum.random(1000..9999)}") + |> Map.put( + "code", + "#{code}" + ) ) do {:ok, _event} -> {:noreply, @@ -81,11 +88,19 @@ defmodule ClaperWeb.EventLive.Index do @impl true def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do event = Events.get_user_event!(current_user.id, id, [:presentation_file]) + + hash = event.presentation_file.hash + + files = + Claper.Presentations.get_presentation_files_by_hash(hash) + {:ok, _} = Events.delete_event(event) - Task.Supervisor.async_nolink(Claper.TaskSupervisor, fn -> - Claper.Tasks.Converter.clear(event.presentation_file.hash) - end) + if files |> Enum.empty?() && !is_nil(hash) do + Task.Supervisor.async_nolink(Claper.TaskSupervisor, fn -> + Claper.Tasks.Converter.clear(event.presentation_file.hash) + end) + end {:noreply, redirect(socket, to: ~p"/events")} end @@ -106,6 +121,13 @@ defmodule ClaperWeb.EventLive.Index do {:noreply, redirect(socket, to: ~p"/events")} end + @impl true + def handle_event("duplicate", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do + event = Events.get_user_event!(current_user.id, id) + {:ok, _} = Events.duplicate_event(current_user.id, event.uuid) + {:noreply, redirect(socket, to: ~p"/events")} + end + @impl true def handle_event( "toggle-quick-create", @@ -142,11 +164,13 @@ defmodule ClaperWeb.EventLive.Index do end defp apply_action(socket, :new, _params) do + code = for _ <- 1..5, into: "", do: <> + socket |> assign(:page_title, gettext("Create")) |> assign(:event, %Event{ started_at: NaiveDateTime.utc_now(), - code: Enum.random(1000..9999), + code: code, leaders: [] }) end diff --git a/lib/claper_web/live/event_live/index.html.heex b/lib/claper_web/live/event_live/index.html.heex index c37385ff..28b6cba3 100644 --- a/lib/claper_web/live/event_live/index.html.heex +++ b/lib/claper_web/live/event_live/index.html.heex @@ -12,7 +12,7 @@ <% else %>