Current Path : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/ |
Current File : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/url.min.js.map |
{"version":3,"sources":["../src/url.js"],"names":["define","$","config","fileUrl","relativeScript","slashArg","url","wwwroot","charAt","slasharguments","encodeURIComponent","relativeUrl","relativePath","params","includeSessKey","indexOf","Error","admin","replace","sesskey","queryString","Object","keys","length","map","value","param","join","imageUrl","imagename","component","M","util","image_url"],"mappings":"AAyBAA,OAAM,YAAC,CAAC,QAAD,CAAW,aAAX,CAAD,CAA4B,SAASC,CAAT,CAAYC,CAAZ,CAAoB,CAGlD,MAAqC,CAUjCC,OAAO,CAAE,iBAASC,CAAT,CAAyBC,CAAzB,CAAmC,CAExC,GAAIC,CAAAA,CAAG,CAAGJ,CAAM,CAACK,OAAP,CAAiBH,CAA3B,CAGA,GAA0B,GAAtB,EAAAC,CAAQ,CAACG,MAAT,CAAgB,CAAhB,CAAJ,CAA+B,CAC3BH,CAAQ,CAAG,IAAMA,CACpB,CACD,GAAIH,CAAM,CAACO,cAAX,CAA2B,CACvBH,CAAG,EAAID,CACV,CAFD,IAEO,CACHC,CAAG,EAAI,SAAWI,kBAAkB,CAACL,CAAD,CACvC,CACD,MAAOC,CAAAA,CACV,CAxBgC,CAmCjCK,WAAW,CAAE,qBAASC,CAAT,CAAuBC,CAAvB,CAA+BC,CAA/B,CAA+C,CAExD,GAAsC,CAAlC,GAAAF,CAAY,CAACG,OAAb,CAAqB,OAArB,GAA0E,CAAnC,GAAAH,CAAY,CAACG,OAAb,CAAqB,QAArB,CAAvC,EAA8G,CAA/B,EAAAH,CAAY,CAACG,OAAb,CAAqB,KAArB,CAAnF,CAAqH,CACjH,KAAM,IAAIC,CAAAA,KAAJ,CAAU,oDAAV,CACT,CAGD,GAA8B,GAA1B,EAAAJ,CAAY,CAACJ,MAAb,CAAoB,CAApB,CAAJ,CAAmC,CAC/BI,CAAY,CAAG,IAAMA,CACxB,CAGD,GAAqB,OAAjB,GAAAV,CAAM,CAACe,KAAX,CAA8B,CAC1BL,CAAY,CAAGA,CAAY,CAACM,OAAb,CAAqB,YAArB,CAAmC,IAAMhB,CAAM,CAACe,KAAb,CAAqB,GAAxD,CAClB,CAEDJ,CAAM,CAAGA,CAAM,EAAI,EAAnB,CACA,GAAIC,CAAJ,CAAoB,CAChBD,CAAM,CAACM,OAAP,CAAiBjB,CAAM,CAACiB,OAC3B,CAED,GAAIC,CAAAA,CAAW,CAAG,EAAlB,CACA,GAAIC,MAAM,CAACC,IAAP,CAAYT,CAAZ,EAAoBU,MAAxB,CAAgC,CAC5BH,CAAW,CAAGnB,CAAC,CAACuB,GAAF,CAAMX,CAAN,CAAc,SAASY,CAAT,CAAgBC,CAAhB,CAAuB,CAC/C,MAAOA,CAAAA,CAAK,CAAG,GAAR,CAAcD,CACxB,CAFa,EAEXE,IAFW,CAEN,GAFM,CAGjB,CAED,GAAoB,EAAhB,GAAAP,CAAJ,CAAwB,CACpB,MAAOlB,CAAAA,CAAM,CAACK,OAAP,CAAiBK,CAAjB,CAAgC,GAAhC,CAAsCQ,CAChD,CAFD,IAEO,CACH,MAAOlB,CAAAA,CAAM,CAACK,OAAP,CAAiBK,CAC3B,CACJ,CApEgC,CA8EjCgB,QAAQ,CAAE,kBAASC,CAAT,CAAoBC,CAApB,CAA+B,CACrC,MAAOC,CAAAA,CAAC,CAACC,IAAF,CAAOC,SAAP,CAAiBJ,CAAjB,CAA4BC,CAA5B,CACV,CAhFgC,CAkFxC,CArFK,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 * URL utility functions.\n *\n * @module core/url\n * @package core\n * @class url\n * @copyright 2015 Damyon Wiese <damyon@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 2.9\n */\ndefine(['jquery', 'core/config'], function($, config) {\n\n\n return /** @alias module:core/url */ {\n // Public variables and functions.\n /**\n * Construct a file url\n *\n * @method fileUrl\n * @param {string} relativeScript\n * @param {string} slashArg\n * @return {string}\n */\n fileUrl: function(relativeScript, slashArg) {\n\n var url = config.wwwroot + relativeScript;\n\n // Force a /\n if (slashArg.charAt(0) != '/') {\n slashArg = '/' + slashArg;\n }\n if (config.slasharguments) {\n url += slashArg;\n } else {\n url += '?file=' + encodeURIComponent(slashArg);\n }\n return url;\n },\n\n /**\n * Take a path relative to the moodle basedir and do some fixing (see class moodle_url in php).\n *\n * @method relativeUrl\n * @param {string} relativePath The path relative to the moodle basedir.\n * @param {object} params The query parameters for the URL.\n * @param {bool} includeSessKey Add the session key to the query params.\n * @return {string}\n */\n relativeUrl: function(relativePath, params, includeSessKey) {\n\n if (relativePath.indexOf('http:') === 0 || relativePath.indexOf('https:') === 0 || relativePath.indexOf('://') >= 0) {\n throw new Error('relativeUrl function does not accept absolute urls');\n }\n\n // Fix non-relative paths;\n if (relativePath.charAt(0) != '/') {\n relativePath = '/' + relativePath;\n }\n\n // Fix admin urls.\n if (config.admin !== 'admin') {\n relativePath = relativePath.replace(/^\\/admin\\//, '/' + config.admin + '/');\n }\n\n params = params || {};\n if (includeSessKey) {\n params.sesskey = config.sesskey;\n }\n\n var queryString = '';\n if (Object.keys(params).length) {\n queryString = $.map(params, function(value, param) {\n return param + '=' + value;\n }).join('&');\n }\n\n if (queryString !== '') {\n return config.wwwroot + relativePath + '?' + queryString;\n } else {\n return config.wwwroot + relativePath;\n }\n },\n\n /**\n * Wrapper for image_url function.\n *\n * @method imageUrl\n * @param {string} imagename The image name (e.g. t/edit).\n * @param {string} component The component (e.g. mod_feedback).\n * @return {string}\n */\n imageUrl: function(imagename, component) {\n return M.util.image_url(imagename, component);\n }\n };\n});\n"],"file":"url.min.js"}