var p={exports:{}},_=p.exports,C;function O(){return C||(C=1,function(L){(function(g,i){L.exports?L.exports=i():g.log=i()})(_,function(){var g=function(){},i="undefined",R=typeof window!==i&&typeof window.navigator!==i&&/Trident\/|MSIE /.test(window.navigator.userAgent),y=["trace","debug","info","warn","error"],u={},l=null;function h(n,t){var e=n[t];if(typeof e.bind=="function")return e.bind(n);try{return Function.prototype.bind.call(e,n)}catch{return function(){return Function.prototype.apply.apply(e,[n,arguments])}}}function x(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function F(n){return n==="debug"&&(n="log"),typeof console===i?!1:n==="trace"&&R?x:console[n]!==void 0?h(console,n):console.log!==void 0?h(console,"log"):g}function a(){for(var n=this.getLevel(),t=0;t<y.length;t++){var e=y[t];this[e]=t<n?g:this.methodFactory(e,n,this.name)}if(this.log=this.debug,typeof console===i&&n<this.levels.SILENT)return"No console available for logging"}function m(n){return function(){typeof console!==i&&(a.call(this),this[n].apply(this,arguments))}}function A(n,t,e){return F(n)||m.apply(this,arguments)}function b(n,t){var e=this,v,w,f,s="loglevel";typeof n=="string"?s+=":"+n:typeof n=="symbol"&&(s=void 0);function U(o){var r=(y[o]||"silent").toUpperCase();if(!(typeof window===i||!s)){try{window.localStorage[s]=r;return}catch{}try{window.document.cookie=encodeURIComponent(s)+"="+r+";"}catch{}}}function E(){var o;if(!(typeof window===i||!s)){try{o=window.localStorage[s]}catch{}if(typeof o===i)try{var r=window.document.cookie,d=encodeURIComponent(s),T=r.indexOf(d+"=");T!==-1&&(o=/^([^;]+)/.exec(r.slice(T+d.length+1))[1])}catch{}return e.levels[o]===void 0&&(o=void 0),o}}function M(){if(!(typeof window===i||!s)){try{window.localStorage.removeItem(s)}catch{}try{window.document.cookie=encodeURIComponent(s)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function c(o){var r=o;if(typeof r=="string"&&e.levels[r.toUpperCase()]!==void 0&&(r=e.levels[r.toUpperCase()]),typeof r=="number"&&r>=0&&r<=e.levels.SILENT)return r;throw new TypeError("log.setLevel() called with invalid level: "+o)}e.name=n,e.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},e.methodFactory=t||A,e.getLevel=function(){return f??w??v},e.setLevel=function(o,r){return f=c(o),r!==!1&&U(f),a.call(e)},e.setDefaultLevel=function(o){w=c(o),E()||e.setLevel(o,!1)},e.resetLevel=function(){f=null,M(),a.call(e)},e.enableAll=function(o){e.setLevel(e.levels.TRACE,o)},e.disableAll=function(o){e.setLevel(e.levels.SILENT,o)},e.rebuild=function(){if(l!==e&&(v=c(l.getLevel())),a.call(e),l===e)for(var o in u)u[o].rebuild()},v=c(l?l.getLevel():"WARN");var I=E();I!=null&&(f=c(I)),a.call(e)}l=new b,l.getLogger=function(t){if(typeof t!="symbol"&&typeof t!="string"||t==="")throw new TypeError("You must supply a name when creating a logger.");var e=u[t];return e||(e=u[t]=new b(t,l.methodFactory)),e};var S=typeof window!==i?window.log:void 0;return l.noConflict=function(){return typeof window!==i&&window.log===l&&(window.log=S),l},l.getLoggers=function(){return u},l.default=l,l})}(p)),p.exports}export{O as r};
