Current Path : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/ |
Current File : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/loglevel.min.js |
function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}(function(a,b){"use strict";if("function"==typeof define&&define.amd){define ("core/loglevel",b)}else if("object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports){module.exports=b()}else{a.log=b()}})(this,function(){"use strict";var h=function(){},i="undefined",j=("undefined"==typeof window?"undefined":_typeof(window))!==i&&/Trident\/|MSIE /.test(window.navigator.userAgent),k=["trace","debug","info","warn","error"];function a(a,b){var c=a[b];if("function"==typeof c.bind){return c.bind(a)}else{try{return Function.prototype.bind.call(c,a)}catch(b){return function(){return Function.prototype.apply.apply(c,[a,arguments])}}}}function b(){if(console.log){if(console.log.apply){console.log.apply(console,arguments)}else{Function.prototype.apply.apply(console.log,[console,arguments])}}if(console.trace)console.trace()}function c(c){if("debug"===c){c="log"}if(("undefined"==typeof console?"undefined":_typeof(console))===i){return!1}else if("trace"===c&&j){return b}else if(console[c]!==void 0){return a(console,c)}else if(console.log!==void 0){return a(console,"log")}else{return h}}function d(a,b){for(var c=0,d;c<k.length;c++){d=k[c];this[d]=c<a?h:this.methodFactory(d,a,b)}this.log=this.debug}function e(a,b,c){return function(){if(("undefined"==typeof console?"undefined":_typeof(console))!==i){d.call(this,b,c);this[a].apply(this,arguments)}}}function f(a){return c(a)||e.apply(this,arguments)}function g(a,b,c){var h=this,j,l="loglevel";if(a){l+=":"+a}function e(a){var b=(k[a]||"silent").toUpperCase();if(("undefined"==typeof window?"undefined":_typeof(window))===i)return;try{window.localStorage[l]=b;return}catch(a){}try{window.document.cookie=encodeURIComponent(l)+"="+b+";"}catch(a){}}function g(){var a;if(("undefined"==typeof window?"undefined":_typeof(window))===i)return;try{a=window.localStorage[l]}catch(a){}if(_typeof(a)===i){try{var b=window.document.cookie,c=b.indexOf(encodeURIComponent(l)+"=");if(-1!==c){a=/^([^;]+)/.exec(b.slice(c))[1]}}catch(a){}}if(h.levels[a]===void 0){a=void 0}return a}h.name=a;h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5};h.methodFactory=c||f;h.getLevel=function(){return j};h.setLevel=function(b,c){if("string"==typeof b&&h.levels[b.toUpperCase()]!==void 0){b=h.levels[b.toUpperCase()]}if("number"==typeof b&&0<=b&&b<=h.levels.SILENT){j=b;if(!1!==c){e(b)}d.call(h,b,a);if(("undefined"==typeof console?"undefined":_typeof(console))===i&&b<h.levels.SILENT){return"No console available for logging"}}else{throw"log.setLevel() called with invalid level: "+b}};h.setDefaultLevel=function(a){if(!g()){h.setLevel(a,!1)}};h.enableAll=function(a){h.setLevel(h.levels.TRACE,a)};h.disableAll=function(a){h.setLevel(h.levels.SILENT,a)};var m=g();if(null==m){m=null==b?"WARN":b}h.setLevel(m,!1)}var l=new g,m={};l.getLogger=function(a){if("string"!=typeof a||""===a){throw new TypeError("You must supply a name when creating a logger.")}var b=m[a];if(!b){b=m[a]=new g(a,l.getLevel(),l.methodFactory)}return b};var n=("undefined"==typeof window?"undefined":_typeof(window))!==i?window.log:void 0;l.noConflict=function(){if(("undefined"==typeof window?"undefined":_typeof(window))!==i&&window.log===l){window.log=n}return l};l.getLoggers=function(){return m};return l}); //# sourceMappingURL=loglevel.min.js.map