{"version":3,"file":"splash.min.js","sources":["https:\/\/moodle.sonsbeekmedia.nl\/caie_39\/mod\/teachingtools\/amd\/src\/splash.js"],"sourcesContent":["\/\/ This file is part of Moodle - http:\/\/moodle.org\/\n\/\/\n\/\/ Moodle is free software: you can redistribute it and\/or modify\n\/\/ it under the terms of the GNU General Public License as published by\n\/\/ the Free Software Foundation, either version 3 of the License, or\n\/\/ (at your option) any later version.\n\/\/\n\/\/ Moodle is distributed in the hope that it will be useful,\n\/\/ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\/\/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\/\/ GNU General Public License for more details.\n\/\/\n\/\/ You should have received a copy of the GNU General Public License\n\/\/ along with Moodle. If not, see .\n\n\/**\n * Splash effect for the teaching tools.\n *\n * @module mod_teachingtools\/splash\n * @copyright 2023 Sonsbeekmedia\n * @author Bas Brands \n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n *\/\n\nimport anime from 'mod_teachingtools\/anime.es';\n\n\/**\n * Initialise the splash effect.\n *\/\nconst init = () => {\n \/\/ When the user exists full screen mode using the Esc key. The fullscreen\n \/\/ button and the app should be updated.\n\n document.addEventListener('app-ready', () => {\n const splashImages = document.querySelectorAll('[data-type=\"splash\"]');\n if (!splashImages.length) {\n return;\n }\n const splashAnim = anime.timeline({\n autoplay: false,\n });\n splashAnim.add({\n targets: '.splash-image',\n easing: 'easeInOutSine',\n keyframes: [\n {\n opacity: [0, 1],\n scale: [0.5, 1],\n duration: 500\n },\n {\n scale: [1, 0.95],\n duration: 500\n },\n {\n scale: [0.95, 0.95],\n duration: 1000\n },\n {\n opacity: [1, 0],\n duration: 500\n }\n ],\n complete: () => {\n \/\/ Destroy the splashImage element.\n splashImages.forEach((image) => {\n image.remove();\n });\n }\n });\n splashAnim.play();\n });\n};\n\nexport default {\n init: init\n};\n"],"names":["init","document","addEventListener","splashImages","querySelectorAll","length","splashAnim","anime","timeline","autoplay","add","targets","easing","keyframes","opacity","scale","duration","complete","forEach","image","remove","play"],"mappings":";;;;;;;;wJA0Ee,CACXA,KA9CS,KAITC,SAASC,iBAAiB,aAAa,WAC7BC,aAAeF,SAASG,iBAAiB,4BAC1CD,aAAaE,oBAGZC,WAAaC,eAAMC,SAAS,CAC9BC,UAAU,IAEdH,WAAWI,IAAI,CACXC,QAAS,gBACTC,OAAQ,gBACRC,UAAW,CACP,CACIC,QAAS,CAAC,EAAG,GACbC,MAAO,CAAC,GAAK,GACbC,SAAU,KAEd,CACID,MAAO,CAAC,EAAG,KACXC,SAAU,KAEd,CACID,MAAO,CAAC,IAAM,KACdC,SAAU,KAEd,CACIF,QAAS,CAAC,EAAG,GACbE,SAAU,MAGlBC,SAAU,KAENd,aAAae,SAASC,QAClBA,MAAMC,eAIlBd,WAAWe"}