{"version":3,"file":"templates.min.js","sources":["https:\/\/courses.fincert.org\/lib\/amd\/src\/templates.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 * Template renderer for Moodle. Load and render Moodle templates with Mustache.\n *\n * @module core\/templates\n * @copyright 2015 Damyon Wiese \n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n * @since 2.9\n *\/\n\nimport $ from 'jquery';\nimport * as config from 'core\/config';\nimport * as filterEvents from 'core_filters\/events';\nimport * as Y from 'core\/yui';\nimport Renderer from '.\/local\/templates\/renderer';\nimport {getNormalisedComponent} from 'core\/utils';\n\n\/**\n * Execute a block of JS returned from a template.\n * Call this AFTER adding the template HTML into the DOM so the nodes can be found.\n *\n * @method runTemplateJS\n * @param {string} source - A block of javascript.\n *\/\nconst runTemplateJS = (source) => {\n if (source.trim() !== '') {\n \/\/ Note. We continue to use jQuery here because people are doing some dumb things\n \/\/ and we need to find, seek, and destroy first.\n \/\/ In particular, people are providing a mixture of JS, and HTML content here.\n \/\/ jQuery is someohow, magically, detecting this and putting tags into tags.\n const newScript = $('