{"version":3,"sources":["https:\/\/flodev.flinders.edu.au\/local\/ce\/amd\/src\/wcloader.js"],"names":["define","$","init","componentsJson","components","JSON","parse","each","key","value","scriptNode","document","createElement","type","src","append","toggle"],"mappings":"AAyBAA,OAAM,qBAAC,CAAC,QAAD,CAAD,CACF,SAASC,CAAT,CAAY,CAER,MAAO,CAKHC,IAAI,CAAE,cAASC,CAAT,CAAyB,CAC3B,GAAIC,CAAAA,CAAU,CAAGC,IAAI,CAACC,KAAL,CAAWH,CAAX,CAAjB,CACA,GAAmB,EAAf,GAAAC,CAAJ,CAAuB,CACnBH,CAAC,CAACM,IAAF,CAAOH,CAAP,CAAmB,SAASI,CAAT,CAAcC,CAAd,CAAqB,CACpC,GAAIC,CAAAA,CAAU,CAAGC,QAAQ,CAACC,aAAT,CAAuB,QAAvB,CAAjB,CACAF,CAAU,CAACG,IAAX,CAAkBJ,CAAK,CAACI,IAAxB,CACAH,CAAU,CAACI,GAAX,CAAiBL,CAAK,CAACK,GAAvB,CACAb,CAAC,CAAC,MAAD,CAAD,CAAUc,MAAV,CAAiBL,CAAjB,CACH,CALD,CAMH,CACDT,CAAC,CAAC,kBAAD,CAAD,CAAsBe,MAAtB,EACH,CAhBE,CAkBV,CArBC,CAAN","sourcesContent":["\/**\n * 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 * Web components loader.\n *\n * @package local_ce\n * @author David Castro\n * @copyright Copyright (c) 2020 Open LMS\n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n *\/\n\n\ndefine(['jquery'],\n function($) {\n\n return {\n \/**\n * Initializes this module.\n * @param componentsJson\n *\/\n init: function(componentsJson) {\n var components = JSON.parse(componentsJson);\n if (components !== {}) {\n $.each(components, function(key, value) {\n var scriptNode = document.createElement('script');\n scriptNode.type = value.type;\n scriptNode.src = value.src;\n $('body').append(scriptNode);\n });\n }\n $(\"#local_ce_loader\").toggle();\n }\n };\n });\n"],"file":"wcloader.min.js"}