forked from shbatm/MMM-Logging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtracer-bundle.js
2 lines (2 loc) · 29.4 KB
/
tracer-bundle.js
1
2
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Tracer=e()}}(function(){return function i(s,a,u){function c(t,e){if(!a[t]){if(!s[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=a[t]={exports:{}};s[t][0].call(o.exports,function(e){return c(s[t][1][e]||e)},o,o.exports,i,s,a,u)}return a[t].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,r){},{}],2:[function(e,t,r){var i={};(t.exports=i).themes={};var s=e("util"),a=i.styles=e("./styles"),n=Object.defineProperties,u=new RegExp(/[\r\n]+/g);i.supportsColor=e("./system/supports-colors").supportsColor,void 0===i.enabled&&(i.enabled=!1!==i.supportsColor()),i.enable=function(){i.enabled=!0},i.disable=function(){i.enabled=!1},i.stripColors=i.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};i.stylize=function(e,t){return i.enabled?a[t].open+e+a[t].close:e+""};var o=/[|\\{}()[\]^$+*?.]/g;function c(e){var t=function e(){return function(){var e=Array.prototype.slice.call(arguments).map(function(e){return void 0!==e&&e.constructor===String?e:s.inspect(e)}).join(" ");if(!i.enabled||!e)return e;var t=-1!=e.indexOf("\n"),r=this._styles,n=r.length;for(;n--;){var o=a[r[n]];e=o.open+e.replace(o.closeRe,o.open)+o.close,t&&(e=e.replace(u,function(e){return o.close+e+o.open}))}return e}.apply(e,arguments)};return t._styles=e,t.__proto__=p,t}var l,f=(l={},a.grey=a.gray,Object.keys(a).forEach(function(e){a[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(o,"\\$&")}(a[e].close),"g"),l[e]={get:function(){return c(this._styles.concat(e))}}}),l),p=n(function(){},f);i.setTheme=function(o){if("string"!=typeof o)for(var e in o)!function(n){i[n]=function(e){if("object"!=typeof o[n])return i[o[n]](e);var t=e;for(var r in o[n])t=i[o[n][r]](t);return t}}(e);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var d;for(var m in i.trap=e("./custom/trap"),i.zalgo=e("./custom/zalgo"),i.maps={},i.maps.america=e("./maps/america")(i),i.maps.zebra=e("./maps/zebra")(i),i.maps.rainbow=e("./maps/rainbow")(i),i.maps.random=e("./maps/random")(i),i.maps)!function(r){i[r]=function(e){return t=i.maps[r],e.split("").map(t).join("");var t}}(m);n(i,(d={},Object.keys(f).forEach(function(e){d[e]={get:function(){return c([e])}}}),d))},{"./custom/trap":3,"./custom/zalgo":4,"./maps/america":5,"./maps/rainbow":6,"./maps/random":7,"./maps/zebra":8,"./styles":9,"./system/supports-colors":11,util:28}],3:[function(e,t,r){t.exports=function(e,t){var n="";e=(e=e||"Run the trap, drop the bass").split("");var o={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return e.forEach(function(e){e=e.toLowerCase();var t=o[e]||[" "],r=Math.floor(Math.random()*t.length);n+=void 0!==o[e]?o[e][r]:e}),n}},{}],4:[function(e,t,r){t.exports=function(e,t){e=e||" he is here ";var c={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},n=[].concat(c.up,c.down,c.mid);function l(e){return Math.floor(Math.random()*e)}function f(t){var r=!1;return n.filter(function(e){r=e===t}),r}return function(e,t){var r,n,o="";for(n in(t=t||{}).up=void 0===t.up||t.up,t.mid=void 0===t.mid||t.mid,t.down=void 0===t.down||t.down,t.size=void 0!==t.size?t.size:"maxi",e=e.split(""))if(!f(n)){switch(o+=e[n],r={up:0,down:0,mid:0},t.size){case"mini":r.up=l(8),r.mid=l(2),r.down=l(8);break;case"maxi":r.up=l(16)+3,r.mid=l(4)+1,r.down=l(64)+3;break;default:r.up=l(8)+1,r.mid=l(6)/2,r.down=l(8)+1}var i=["up","mid","down"];for(var s in i)for(var a=i[s],u=0;u<=r[a];u++)t[a]&&(o+=c[a][l(c[a].length)])}return o}(e,t)}},{}],5:[function(e,t,r){t.exports=function(n){return function(e,t,r){if(" "===e)return e;switch(t%3){case 0:return n.red(e);case 1:return n.white(e);case 2:return n.blue(e)}}}},{}],6:[function(e,t,r){t.exports=function(n){var o=["red","yellow","green","blue","magenta"];return function(e,t,r){return" "===e?e:n[o[t++%o.length]](e)}}},{}],7:[function(e,t,r){t.exports=function(n){var o=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(e,t,r){return" "===e?e:n[o[Math.round(Math.random()*(o.length-2))]](e)}}},{}],8:[function(e,t,r){t.exports=function(n){return function(e,t,r){return t%2==0?e:n.inverse(e)}}},{}],9:[function(e,t,r){var n={};t.exports=n;var o={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(o).forEach(function(e){var t=o[e],r=n[e]=[];r.open="["+t[0]+"m",r.close="["+t[1]+"m"})},{}],10:[function(e,t,r){(function(i){"use strict";t.exports=function(e,t){var r=(t=t||i.argv).indexOf("--"),n=/^-{1,2}/.test(e)?"":"--",o=t.indexOf(n+e);return-1!==o&&(-1===r||o<r)}}).call(this,e("_process"))},{_process:18}],11:[function(t,r,e){(function(o){"use strict";var i=t("os"),s=t("./has-flag.js"),a=o.env,u=void 0;function e(e){var t,r=function(e){if(!1===u)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(e&&!e.isTTY&&!0!==u)return 0;var t=u?1:0;if("win32"===o.platform){var r=i.release().split(".");return 8<=Number(o.versions.node.split(".")[0])&&10<=Number(r[0])&&10586<=Number(r[2])?14931<=Number(r[2])?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(e){return e in a})||"codeship"===a.CI_NAME?1:t;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in a){var n=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return 3<=n?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)?1:"COLORTERM"in a?1:(a.TERM,t)}(e);return 0!==(t=r)&&{level:t,hasBasic:!0,has256:2<=t,has16m:3<=t}}s("no-color")||s("no-colors")||s("color=false")?u=!1:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(u=!0),"FORCE_COLOR"in a&&(u=0===a.FORCE_COLOR.length||0!==parseInt(a.FORCE_COLOR,10)),r.exports={supportsColor:e,stdout:e(o.stdout),stderr:e(o.stderr)}}).call(this,t("_process"))},{"./has-flag.js":10,_process:18,os:16}],12:[function(e,t,r){var n=e("./lib/colors");t.exports=n},{"./lib/colors":2}],13:[function(e,t,r){!function(e){"use strict";var w,T,x,M=(w=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,T=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,x=/[^-+\dA-Z]/g,function(e,t,r,n){if(1!==arguments.length||"string"!==(null===(o=e)?"null":void 0===o?"undefined":"object"!=typeof o?typeof o:Array.isArray(o)?"array":{}.toString.call(o).slice(8,-1).toLowerCase())||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var o,i=(t=String(M.masks[t]||t||M.masks.default)).slice(0,4);"UTC:"!==i&&"GMT:"!==i||(t=t.slice(4),r=!0,"GMT:"===i&&(n=!0));var s,a=r?"getUTC":"get",u=e[a+"Date"](),c=e[a+"Day"](),l=e[a+"Month"](),f=e[a+"FullYear"](),p=e[a+"Hours"](),d=e[a+"Minutes"](),m=e[a+"Seconds"](),y=e[a+"Milliseconds"](),g=r?0:e.getTimezoneOffset(),h=function(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var r=new Date(t.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var n=t.getTimezoneOffset()-r.getTimezoneOffset();t.setHours(t.getHours()-n);var o=(t-r)/6048e5;return 1+Math.floor(o)}(e),v=(0===(s=e.getDay())&&(s=7),s),b={d:u,dd:O(u),ddd:M.i18n.dayNames[c],dddd:M.i18n.dayNames[c+7],m:l+1,mm:O(l+1),mmm:M.i18n.monthNames[l],mmmm:M.i18n.monthNames[l+12],yy:String(f).slice(2),yyyy:f,h:p%12||12,hh:O(p%12||12),H:p,HH:O(p),M:d,MM:O(d),s:m,ss:O(m),l:O(y,3),L:O(Math.round(y/10)),t:p<12?M.i18n.timeNames[0]:M.i18n.timeNames[1],tt:p<12?M.i18n.timeNames[2]:M.i18n.timeNames[3],T:p<12?M.i18n.timeNames[4]:M.i18n.timeNames[5],TT:p<12?M.i18n.timeNames[6]:M.i18n.timeNames[7],Z:n?"GMT":r?"UTC":(String(e).match(T)||[""]).pop().replace(x,""),o:(0<g?"-":"+")+O(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][3<u%10?0:(u%100-u%10!=10)*u%10],W:h,N:v};return t.replace(w,function(e){return e in b?b[e]:e.slice(1,e.length-1)})});function O(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e}M.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},M.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},"object"==typeof r?t.exports=M:e.dateFormat=M}(this)},{}],14:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],15:[function(e,t,r){(function(u){var c=e("path"),l=e("fs"),f=parseInt("0777",8);function p(n,o,e,i){"function"==typeof o?(e=o,o={}):o&&"object"==typeof o||(o={mode:o});var t=o.mode,s=o.fs||l;void 0===t&&(t=f&~u.umask()),i||(i=null);var a=e||function(){};n=c.resolve(n),s.mkdir(n,t,function(r){if(!r)return a(null,i=i||n);switch(r.code){case"ENOENT":p(c.dirname(n),o,function(e,t){e?a(e,t):p(n,o,a,t)});break;default:s.stat(n,function(e,t){e||!t.isDirectory()?a(r,i):a(null,i)})}})}t.exports=p.mkdirp=p.mkdirP=p,p.sync=function e(r,n,o){n&&"object"==typeof n||(n={mode:n});var t=n.mode,i=n.fs||l;void 0===t&&(t=f&~u.umask()),o||(o=null),r=c.resolve(r);try{i.mkdirSync(r,t),o=o||r}catch(t){switch(t.code){case"ENOENT":e(r,n,o=e(c.dirname(r),n,o));break;default:var s;try{s=i.statSync(r)}catch(e){throw t}if(!s.isDirectory())throw t}}return o}}).call(this,e("_process"))},{_process:18,fs:1,path:17}],16:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n",r.homedir=function(){return"/"}},{}],17:[function(e,t,c){(function(o){function i(e,t){for(var r=0,n=e.length-1;0<=n;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function s(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}c.resolve=function(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:o.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");n&&(e=n+"/"+e,t="/"===n.charAt(0))}return(t?"/":"")+(e=i(s(e.split("/"),function(e){return!!e}),!t).join("/"))||"."},c.normalize=function(e){var t=c.isAbsolute(e),r="/"===n(e,-1);return(e=i(s(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},c.isAbsolute=function(e){return"/"===e.charAt(0)},c.join=function(){var e=Array.prototype.slice.call(arguments,0);return c.normalize(s(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},c.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;0<=r&&""===e[r];r--);return r<t?[]:e.slice(t,r-t+1)}e=c.resolve(e).substr(1),t=c.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),s=i,a=0;a<i;a++)if(n[a]!==o[a]){s=a;break}var u=[];for(a=s;a<n.length;a++)u.push("..");return(u=u.concat(o.slice(s))).join("/")},c.sep="/",c.delimiter=":",c.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,i=e.length-1;1<=i;--i)if(47===(t=e.charCodeAt(i))){if(!o){n=i;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},c.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,o=!0;for(t=e.length-1;0<=t;--t)if(47===e.charCodeAt(t)){if(!o){r=t+1;break}}else-1===n&&(o=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},c.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;0<=s;--s){var a=e.charCodeAt(s);if(47===a){if(o)continue;r=s+1;break}-1===n&&(o=!1,n=s+1),46===a?-1===t?t=s:1!==i&&(i=1):-1!==t&&(i=-1)}return-1===t||-1===n||0===i||1===i&&t===n-1&&t===r+1?"":e.slice(t,n)};var n="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:18}],18:[function(e,t,r){var n,o,i=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var c,l=[],f=!1,p=-1;function d(){f&&c&&(f=!1,c.length?l=c.concat(l):p=-1,l.length&&m())}function m(){if(!f){var e=u(d);f=!0;for(var t=l.length;t;){for(c=l,l=[];++p<t;)c&&c[p].run();p=-1,t=l.length}c=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new y(e,t)),1!==l.length||f||u(m)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],19:[function(s,a,e){a.exports=s("./tinytim");var u={};a.exports.clearCache=function(){u={}},a.exports.render=a.exports.tim,a.exports.renderFile=function(e,t,r){var n=s("fs"),o=e+":string",i=r?u[o]||(u[o]=n.readFileSync(e,"utf8")):n.readFileSync(e,"utf8");return a.exports.render(i,t)}},{"./tinytim":20,fs:1}],20:[function(e,t,r){r.start="{{",r.end="}}",r.tim=function(){"use strict";return function(e,s){var t=new RegExp(r.start+"\\s*([a-z0-9_][\\.a-z0-9_]*)\\s*"+r.end,"gi");return e.replace(t,function(e,t){for(var r=t.split("."),n=r.length,o=s,i=0;i<n;i++){if(void 0===(o=o[r[i]]))throw new Error("tim: '"+r[i]+"' not found in "+e);if(i===n-1)return o}})}}()},{}],21:[function(t,e,r){"use strict";var n=t("colors/safe");e.exports=function(e){return t("./console")({filters:{trace:n.magenta,debug:n.cyan,info:n.green,warn:n.yellow,error:n.red.bold,fatal:n.red.bold}},e)}},{"./console":22,"colors/safe":12}],22:[function(r,e,t){"use strict";var n={log:window.console.log.bind(window.console),info:window.console.info.bind(window.console),warn:window.console.warn.bind(window.console),error:window.console.error.bind(window.console),debug:(window.console.debug||window.console.log).bind(window.console)},y=r("tinytim"),g=r("dateformat"),h=r("./utils"),v=r("path"),b=r("./settings").settings,u=function(){},w=function(t){return function(e){return t(e)}},T=/at\s+(.*)\s+\((.*):(\d*):(\d*)\)/i,x=/at\s+()(.*):(\d*):(\d*)/i;e.exports=function(){var i={rootDir:"",format:"{{timestamp}} <{{title}}> {{file}}:{{line}} ({{method}}) {{message}}",dateformat:"isoDateTime",preprocess:function(){},transport:function(e){4<=e.level?n.error(e.output):n.log(e.output)},filters:[],level:"log",methods:["log","trace","debug","info","warn","error","fatal"],stackIndex:0,inspectOpt:{showHidden:!1,depth:2},supportConsoleMethods:!0,overwriteConsoleMethods:!1},e=arguments;"string"==typeof e[0]&&(e=[r(e[0])]),i=h.union(i,e);var s={};i.format=Array.isArray(i.format)?i.format:[i.format],i.filters=Array.isArray(i.filters)?i.filters:[i.filters],i.transport=Array.isArray(i.transport)?i.transport:[i.transport];var a,t=i.filters.length;return 0<t&&"[object Function]"!=Object.prototype.toString.call(i.filters[--t])&&(a=i.filters[t],i.filters=i.filters.slice(0,t)),"string"==typeof i.level&&(i.level=i.methods.indexOf(i.level)),i.methods.forEach(function(e,t){if(t<i.level)s[e]=u;else{var r=i.format[0];2===i.format.length&&i.format[1][e]&&(r=i.format[1][e]);var n,o=/{{(method|path|line|pos|file|folder|stack)}}/i.test(r);n=a&&a[e]?Array.isArray(a[e])?a[e]:[a[e]]:i.filters,s[e]=function(){return function(e,t,r,n,o,i,s){var a=b.level;if("string"==typeof a&&(a=e.methods.indexOf(a)),!(t<a)){var u={timestamp:g(new Date,e.dateformat),message:"",title:r,level:t,args:s};if(u.method=u.path=u.line=u.pos=u.file=u.folder="",i){var c=(new Error).stack.split("\n").slice(3),l=c[e.stackIndex]||c[0],f=T.exec(l)||x.exec(l);f&&5===f.length&&(u.method=f[1],u.path=f[2],u.line=f[3],u.pos=f[4],u.folder=v.dirname(e.rootDir&&v.isAbsolute(e.rootDir)?u.path.replace(new RegExp("^"+e.rootDir+v.sep+"?"),""):v.resolve(u.path)),u.file=v.basename(u.path),u.stack=c.join("\n"))}e.preprocess(u);var p=h.format.apply(e,u.args);u.message=p,u.output=y.tim(n,u),u.rawoutput=u.output;for(var d=o.length,m=0;m<d;m+=1)if(u.output=w(o[m])(u.output),!u.output)return u;return e.transport.forEach(function(e){e(u)}),u}}(i,t,e,r,n,o,arguments)},i.overwriteConsoleMethods&&(console[e]=s[e])}}),i.supportConsoleMethods&&Object.getOwnPropertyNames(console).forEach(function(e){s[e]||(s[e]=console[e])}),s}},{"./settings":25,"./utils":26,dateformat:13,path:17,tinytim:19}],23:[function(r,e,t){"use strict";var n=r("fs"),c=r("dateformat"),o=r("tinytim"),i=r("./utils"),l=r("child_process").spawn,f=r("child_process").spawnSync,p=r("os"),d=r("mkdirp");e.exports=function(e){var s={root:".",logPathFormat:"{{root}}/{{prefix}}.{{date}}.log",splitFormat:"yyyymmdd",allLogsFileName:!1,maxLogFiles:10};function a(e,t){var r;this.date=t,this.path=o.tim(s.logPathFormat,{root:s.root,prefix:e,date:t}),r=s.root,"Windows_NT"===p.type()?n.existsSync(r)||d(r):f("mkdir",["-p",r]),this.stream=n.createWriteStream(this.path,{flags:"a",encoding:"utf8",mode:parseInt("0644",8)})}s=i.union(s,[e]),a.prototype.write=function(e){this.stream.write(e+"\n")},a.prototype.destroy=function(){this.stream&&(this.stream.end(),this.stream.destroySoon(),this.stream=null)};var u={};function t(e){!function(e,t){if(s.allLogsFileName){var r=u.allLogFile,n=c(new Date,s.splitFormat);r&&r.date!=n&&(r.destroy(),r=null),r||(r=u.allLogFile=new a(s.allLogsFileName,n),l("find",["./","-type","f","-name","*.log","-mtime","+"+s.maxLogFiles,"-exec","rm","{}",";"])),r.write(e)}else{var o=u[t],i=c(new Date,s.splitFormat);o&&o.date!=i&&(o.destroy(),o=null),o||(o=u[t]=new a(t,i),l("find",[s.root,"-type","f","-name","*.log","-mtime","+"+s.maxLogFiles,"-exec","rm","{}",";"])),o.write(e)}}(e.output,e.title)}return e.transport?(e.transport=Array.isArray(e.transport)?e.transport:[e.transport],e.transport.push(t)):e.transport=[t],r("./console")(e)}},{"./console":22,"./utils":26,child_process:1,dateformat:13,fs:1,mkdirp:15,os:16,tinytim:19}],24:[function(e,t,r){"use strict";r.console=e("./console"),r.colorConsole=e("./color_console"),r.dailyfile=e("./dailyfile");var n=e("./settings");r.close=n.close,r.setLevel=n.setLevel,r.getLevel=n.getLevel},{"./color_console":21,"./console":22,"./dailyfile":23,"./settings":25}],25:[function(e,t,r){"use strict";var n={level:void 0};r.settings=n,r.close=function(){n.level=Number.MAX_VALUE},r.setLevel=function(e){n.level=e},r.getLevel=function(){return n.level}},{}],26:[function(e,t,r){"use strict";r.union=function(e,t){for(var r=0,n=t.length;r<n;r+=1){var o=t[r];for(var i in o)e[i]=o[i]}return e};var u=/%[sdjt]/g,c=e("util");r.format=function(e){var t=this.inspectOpt,r=arguments,n=0;if("string"!=typeof e){for(var o=[];n<r.length;n++)o.push(c.inspect(r[n],t));return o.join(" ")}n=1;for(var i=String(e).replace(u,function(e){switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return r[n]instanceof Error?JSON.stringify(r[n++],["message","stack","type","name"]):JSON.stringify(r[n++])}catch(e){return"[Circular]"}case"%t":return c.inspect(r[n++],t);default:return e}}),s=r.length,a=r[n];n<s;a=r[++n])i+=null===a||"object"!=typeof a?" "+a:" "+c.inspect(a,t);return i}},{util:28}],27:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],28:[function(p,e,j){(function(n,o){var a=/%[sdj%]/g;j.format=function(e){if(!w(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(e).replace(a,function(e){if("%%"===e)return"%";if(o<=r)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<o;s=n[++r])v(s)||!l(s)?i+=" "+s:i+=" "+u(s);return i},j.deprecate=function(e,t){if(T(o.process))return function(){return j.deprecate(e,t).apply(this,arguments)};if(!0===n.noDeprecation)return e;var r=!1;return function(){if(!r){if(n.throwDeprecation)throw new Error(t);n.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}};var e,i={};function u(e,t){var r={seen:[],stylize:c};return 3<=arguments.length&&(r.depth=arguments[2]),4<=arguments.length&&(r.colors=arguments[3]),h(t)?r.showHidden=t:t&&j._extend(r,t),T(r.showHidden)&&(r.showHidden=!1),T(r.depth)&&(r.depth=2),T(r.colors)&&(r.colors=!1),T(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),d(r,e,r.depth)}function s(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function c(e,t){return e}function d(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==j.inspect&&(!r.constructor||r.constructor.prototype!==r)){var e=r.inspect(n,t);return w(e)||(e=d(t,e,n)),e}var o=function(e,t){if(T(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(h(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(t,r);if(o)return o;var i,s=Object.keys(r),a=(i={},s.forEach(function(e,t){i[e]=!0}),i);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),O(r)&&(0<=s.indexOf("message")||0<=s.indexOf("description")))return m(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(x(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(M(r))return t.stylize(Date.prototype.toString.call(r),"date");if(O(r))return m(r)}var c,l="",f=!1,p=["{","}"];(g(r)&&(f=!0,p=["[","]"]),E(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return x(r)&&(l=" "+RegExp.prototype.toString.call(r)),M(r)&&(l=" "+Date.prototype.toUTCString.call(r)),O(r)&&(l=" "+m(r)),0!==s.length||f&&0!=r.length?n<0?x(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=f?function(t,r,n,o,e){for(var i=[],s=0,a=r.length;s<a;++s)A(r,String(s))?i.push(y(t,r,n,o,String(s),!0)):i.push("");return e.forEach(function(e){e.match(/^\d+$/)||i.push(y(t,r,n,o,e,!0))}),i}(t,r,n,a,s):s.map(function(e){return y(t,r,n,a,e,f)}),t.seen.pop(),function(e,t,r){if(60<e.reduce(function(e,t){return 0,0<=t.indexOf("\n")&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0))return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,p)):p[0]+l+p[1]}function m(e){return"["+Error.prototype.toString.call(e)+"]"}function y(e,t,r,n,o,i){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),A(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(u.value)<0?-1<(a=v(r)?d(e,u.value,null):d(e,u.value,r-1)).indexOf("\n")&&(a=i?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),T(s)){if(i&&o.match(/^\d+$/))return a;s=(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),e.stylize(s,"string"))}return s+": "+a}function g(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function w(e){return"string"==typeof e}function T(e){return void 0===e}function x(e){return l(e)&&"[object RegExp]"===t(e)}function l(e){return"object"==typeof e&&null!==e}function M(e){return l(e)&&"[object Date]"===t(e)}function O(e){return l(e)&&("[object Error]"===t(e)||e instanceof Error)}function E(e){return"function"==typeof e}function t(e){return Object.prototype.toString.call(e)}function r(e){return e<10?"0"+e.toString(10):e.toString(10)}j.debuglog=function(t){if(T(e)&&(e=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!i[t])if(new RegExp("\\b"+t+"\\b","i").test(e)){var r=n.pid;i[t]=function(){var e=j.format.apply(j,arguments);console.error("%s %d: %s",t,r,e)}}else i[t]=function(){};return i[t]},(j.inspect=u).colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},j.isArray=g,j.isBoolean=h,j.isNull=v,j.isNullOrUndefined=function(e){return null==e},j.isNumber=b,j.isString=w,j.isSymbol=function(e){return"symbol"==typeof e},j.isUndefined=T,j.isRegExp=x,j.isObject=l,j.isDate=M,j.isError=O,j.isFunction=E,j.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},j.isBuffer=p("./support/isBuffer");var f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}j.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[r(e.getHours()),r(e.getMinutes()),r(e.getSeconds())].join(":"),[e.getDate(),f[e.getMonth()],t].join(" ")),j.format.apply(j,arguments))},j.inherits=p("inherits"),j._extend=function(e,t){if(!t||!l(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":27,_process:18,inherits:14}],29:[function(e,t,r){var n=e("tracer");t.exports=n},{tracer:24}]},{},[29])(29)});
//# sourceMappingURL=tracer-bundle.js.map