{"version":3,"sources":["https:\/\/immet-dist.spbstu.ru\/lib\/amd\/src\/pending.js"],"names":["define","$","request","pendingKey","pendingPromise","Deferred","M","util","js_pending","then","js_complete","catch","prototype","constructor"],"mappings":"AAwBAA,OAAM,gBAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAU3B,GAAIC,CAAAA,CAAO,CAAG,SAASC,CAAT,CAAqB,CAC\/B,GAAIC,CAAAA,CAAc,CAAGH,CAAC,CAACI,QAAF,EAArB,CAEAF,CAAU,CAAGA,CAAU,EAAI,EAA3B,CACAG,CAAC,CAACC,IAAF,CAAOC,UAAP,CAAkBL,CAAlB,EAEAC,CAAc,CAACK,IAAf,CAAoB,UAAW,CAC3B,MAAOH,CAAAA,CAAC,CAACC,IAAF,CAAOG,WAAP,CAAmBP,CAAnB,CACV,CAFD,EAGCQ,KAHD,GAKA,MAAOP,CAAAA,CACV,CAZD,CAcAF,CAAO,CAACU,SAAR,CAAkBC,WAAlB,CAAgCX,CAAhC,CAEA,MAAOA,CAAAA,CACV,CA3BK,CAAN","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 * A helper to manage pendingJS checks.\n *\n * @module core\/pending\n * @package core\n * @copyright 2018 Andrew Nicols \n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n * @since 3.6\n *\/\ndefine(['jquery'], function($) {\n\n \/**\n * Request a new pendingPromise to be resolved.\n *\n * When the action you are performing is complete, simply call resolve on the returned Promise.\n *\n * @param {Object} pendingKey An optional key value to use\n * @return {Promise}\n *\/\n var request = function(pendingKey) {\n var pendingPromise = $.Deferred();\n\n pendingKey = pendingKey || {};\n M.util.js_pending(pendingKey);\n\n pendingPromise.then(function() {\n return M.util.js_complete(pendingKey);\n })\n .catch();\n\n return pendingPromise;\n };\n\n request.prototype.constructor = request;\n\n return request;\n});\n"],"file":"pending.min.js"}