74549e21fe5bd59c2d2d78fc044f851f81cb7290
[moodle.git] / theme / boost / amd / build / pending.min.js.map
1 {"version":3,"sources":["../src/pending.js"],"names":["define","$","moduleTransitions","alert","start","end","carousel","collapse","dropdown","modal","popover","tab","toast","tooltip","Object","keys","forEach","key","pair","eventStart","eventEnd","document","body","on","M","util","js_pending","js_complete"],"mappings":"AAsBAA,OAAM,uBAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAC3B,GAAIC,CAAAA,CAAiB,CAAG,CACpBC,KAAK,CAAE,CAEH,CACIC,KAAK,CAAE,OADX,CAEIC,GAAG,CAAE,QAFT,CAFG,CADa,CASpBC,QAAQ,CAAE,CACN,CACIF,KAAK,CAAE,OADX,CAEIC,GAAG,CAAE,MAFT,CADM,CATU,CAgBpBE,QAAQ,CAAE,CACN,CACIH,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADM,CAKN,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALM,CAhBU,CA2BpBG,QAAQ,CAAE,CACN,CACIJ,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADM,CAKN,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALM,CA3BU,CAsCpBI,KAAK,CAAE,CACH,CACIL,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADG,CAKH,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALG,CAtCa,CAiDpBK,OAAO,CAAE,CACL,CACIN,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADK,CAKL,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALK,CAjDW,CA4DpBM,GAAG,CAAE,CACD,CACIP,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADC,CAKD,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALC,CA5De,CAuEpBO,KAAK,CAAE,CACH,CACIR,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADG,CAKH,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALG,CAvEa,CAkFpBQ,OAAO,CAAE,CACL,CACIT,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADK,CAKL,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALK,CAlFW,CAAxB,CA8FAS,MAAM,CAACC,IAAP,CAAYb,CAAZ,EAA+Bc,OAA/B,CAAuC,SAASC,CAAT,CAAc,CACjDf,CAAiB,CAACe,CAAD,CAAjB,CAAuBD,OAAvB,CAA+B,SAASE,CAAT,CAAe,IACtCC,CAAAA,CAAU,CAAGD,CAAI,CAACd,KAAL,CAAa,MAAb,CAAsBa,CADG,CAEtCG,CAAQ,CAAGF,CAAI,CAACb,GAAL,CAAW,MAAX,CAAoBY,CAFO,CAG1ChB,CAAC,CAACoB,QAAQ,CAACC,IAAV,CAAD,CAAiBC,EAAjB,CAAoBJ,CAApB,CAAgC,UAAW,CACvCK,CAAC,CAACC,IAAF,CAAOC,UAAP,CAAkBN,CAAlB,CACH,CAFD,EAIAnB,CAAC,CAACoB,QAAQ,CAACC,IAAV,CAAD,CAAiBC,EAAjB,CAAoBH,CAApB,CAA8B,UAAW,CACrCI,CAAC,CAACC,IAAF,CAAOE,WAAP,CAAmBP,CAAnB,CACH,CAFD,CAGH,CAVD,CAWH,CAZD,CAaH,CA5GK,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 <http://www.gnu.org/licenses/>.\n\n/**\n * Add Pending JS checks to stock Bootstrap transitions.\n *\n * @module     theme_boost/pending\n * @copyright  2019 Andrew Nicols <andrew@nicols.co.uk>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery'], function($) {\n    var moduleTransitions = {\n        alert: [\n            // Alert.\n            {\n                start: 'close',\n                end: 'closed',\n            },\n        ],\n\n        carousel: [\n            {\n                start: 'slide',\n                end: 'slid',\n            },\n        ],\n\n        collapse: [\n            {\n                start: 'hide',\n                end: 'hidden',\n            },\n            {\n                start: 'show',\n                end: 'shown',\n            },\n        ],\n\n        dropdown: [\n            {\n                start: 'hide',\n                end: 'hidden',\n            },\n            {\n                start: 'show',\n                end: 'shown',\n            },\n        ],\n\n        modal: [\n            {\n                start: 'hide',\n                end: 'hidden',\n            },\n            {\n                start: 'show',\n                end: 'shown',\n            },\n        ],\n\n        popover: [\n            {\n                start: 'hide',\n                end: 'hidden',\n            },\n            {\n                start: 'show',\n                end: 'shown',\n            },\n        ],\n\n        tab: [\n            {\n                start: 'hide',\n                end: 'hidden',\n            },\n            {\n                start: 'show',\n                end: 'shown',\n            },\n        ],\n\n        toast: [\n            {\n                start: 'hide',\n                end: 'hidden',\n            },\n            {\n                start: 'show',\n                end: 'shown',\n            },\n        ],\n\n        tooltip: [\n            {\n                start: 'hide',\n                end: 'hidden',\n            },\n            {\n                start: 'show',\n                end: 'shown',\n            },\n        ],\n    };\n\n    Object.keys(moduleTransitions).forEach(function(key) {\n        moduleTransitions[key].forEach(function(pair) {\n            var eventStart = pair.start + '.bs.' + key;\n            var eventEnd = pair.end + '.bs.' + key;\n            $(document.body).on(eventStart, function() {\n                M.util.js_pending(eventEnd);\n            });\n\n            $(document.body).on(eventEnd, function() {\n                M.util.js_complete(eventEnd);\n            });\n        });\n    });\n});\n"],"file":"pending.min.js"}