@substrate-system/debug 0.9.32 → 0.9.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,15 +21,10 @@ It's been rewritten to use contemporary JS.
21
21
  In the browser, this uses localStorage key `'DEBUG'`.
22
22
  In Node, it uses the environment variable `DEBUG`.
23
23
 
24
- **Featuring:**
25
- * Use [exports](https://github.com/substrate-system/debug/blob/main/package.json#L31)
26
- field in `package.json` to choose node JS, browser, or cloudflare version
27
- * ESM or common JS
28
-
29
24
  Plus, [see the docs](https://substrate-system.github.io/debug/)
30
25
  generated by typescript.
31
26
 
32
- ## Contents
27
+ <details><summary><h2>Contents</h2></summary>
33
28
 
34
29
  <!-- toc -->
35
30
 
@@ -37,6 +32,7 @@ generated by typescript.
37
32
  - [Browser](#browser)
38
33
  * [Factor out of production](#factor-out-of-production)
39
34
  * [HTML `importmap`](#html-importmap)
35
+ * [Vite Example](#vite-example)
40
36
  - [Cloudflare](#cloudflare)
41
37
  - [Node JS](#node-js)
42
38
  - [Config](#config)
@@ -56,6 +52,8 @@ generated by typescript.
56
52
 
57
53
  <!-- tocstop -->
58
54
 
55
+ </details>
56
+
59
57
  ## Install
60
58
 
61
59
  ```sh
@@ -142,6 +140,103 @@ to your web server.
142
140
  > [!TIP]
143
141
  > Using a `data:` URL means no network request at all for the noop.
144
142
 
143
+
144
+ ### Vite Example
145
+
146
+ In `vite`, you can use the `transformIndexHtml` plugin to swap out the import
147
+ map depending on the environment at build time.
148
+
149
+ ```js
150
+ // vite.config.js
151
+ import { defineConfig } from 'vite'
152
+
153
+ // https://vitejs.dev/config/
154
+ export default defineConfig({
155
+ // ...
156
+ root: 'example',
157
+ plugins: [
158
+ {
159
+ name: 'html-transform',
160
+ transformIndexHtml (html) {
161
+ const isProduction = process.env.NODE_ENV === 'production'
162
+ const map = isProduction ?
163
+ '{ "imports": { "@substrate-system/debug": "data:text/javascript,export default function(){return()=>{}}" } }' :
164
+ '{ "imports": { "@substrate-system/debug": "../node_modules/@substrate-system/debug/dist/index.js" } }'
165
+
166
+ return html.replace('<%- IMPORT_MAP_CONTENT %>', map)
167
+ },
168
+ },
169
+ ],
170
+ // ...
171
+ })
172
+ ```
173
+
174
+ And the HTML:
175
+
176
+ ```html
177
+ <!DOCTYPE html>
178
+ <html lang="en">
179
+ <head>
180
+ <script type="importmap">
181
+ <%- IMPORT_MAP_CONTENT %>
182
+ </script>
183
+ </head>
184
+ ```
185
+
186
+ #### Staging Environment
187
+
188
+ For staging, you do still want the debug logs, but we need to copy the debug
189
+ file into our public directory so it is accessible to the web server.
190
+
191
+ ##### Vite Config
192
+
193
+ ```js
194
+ // vite.config.js
195
+ {
196
+ // ...
197
+ plugins: [
198
+ {
199
+ name: 'html-transform',
200
+ transformIndexHtml (html) {
201
+ const isProduction = process.env.NODE_ENV === 'production'
202
+ const isStaging = process.env.NODE_ENV === 'staging'
203
+
204
+ let map
205
+ if (isProduction && !isStaging) {
206
+ map = '{ "imports": { "@substrate-system/debug": "data:text/javascript,export default function(){return()=>{}}" } }'
207
+ } else if (isStaging) {
208
+ map = '{ "imports": { "@substrate-system/debug": "/vendor/debug.js" } }'
209
+ } else { // is dev
210
+ map = '{ "imports": { "@substrate-system/debug": "../node_modules/@substrate-system/debug/dist/index.js" } }'
211
+ }
212
+
213
+ return html.replace('<%- IMPORT_MAP_CONTENT %>', map)
214
+ },
215
+ },
216
+ ],
217
+ // ...
218
+ build: {
219
+ rollupOptions: {
220
+ external: ['@substrate-system/debug'],
221
+ },
222
+ }
223
+ // ...
224
+ }
225
+ ```
226
+
227
+ ##### Build script
228
+
229
+ Copy the file to the public directory.
230
+
231
+ ```sh
232
+ cp ./node_modules/@substrate-system/debug/dist/index.js ./public/vendor/debug.js
233
+
234
+ # then build
235
+ NODE_ENV=staging vite build
236
+ ```
237
+
238
+ -------------------
239
+
145
240
  ## Cloudflare
146
241
 
147
242
  Either pass in an env record, or will look at `globalThis` for
@@ -1,2 +1,2 @@
1
- "use strict";var V=Object.create;var l=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var s=(e,r)=>l(e,"name",{value:r,configurable:!0});var B=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),J=(e,r)=>{for(var t in r)l(e,t,{get:r[t],enumerable:!0})},b=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of O(r))!z.call(e,o)&&o!==t&&l(e,o,{get:()=>r[o],enumerable:!(n=L(r,o))||n.enumerable});return e};var _=(e,r,t)=>(t=e!=null?V(U(e)):{},b(r||!e||!e.__esModule?l(t,"default",{value:e,enumerable:!0}):t,e)),$=e=>b(l({},"__esModule",{value:!0}),e);var v=B((re,x)=>{"use strict";var f=1e3,g=f*60,F=g*60,c=F*24,G=c*7,I=c*365.25;x.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0)return P(e);if(t==="number"&&isFinite(e))return r.long?j(e):Z(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function P(e){if(e=String(e),!(e.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var t=parseFloat(r[1]),n=(r[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*I;case"weeks":case"week":case"w":return t*G;case"days":case"day":case"d":return t*c;case"hours":case"hour":case"hrs":case"hr":case"h":return t*F;case"minutes":case"minute":case"mins":case"min":case"m":return t*g;case"seconds":case"second":case"secs":case"sec":case"s":return t*f;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}s(P,"parse");function Z(e){var r=Math.abs(e);return r>=c?Math.round(e/c)+"d":r>=F?Math.round(e/F)+"h":r>=g?Math.round(e/g)+"m":r>=f?Math.round(e/f)+"s":e+"ms"}s(Z,"fmtShort");function j(e){var r=Math.abs(e);return r>=c?d(e,r,c,"day"):r>=F?d(e,r,F,"hour"):r>=g?d(e,r,g,"minute"):r>=f?d(e,r,f,"second"):e+" ms"}s(j,"fmtLong");function d(e,r,t,n){var o=r>=t*1.5;return Math.round(e/t)+" "+n+(o?"s":"")}s(d,"plural")});var Y={};J(Y,{createDebug:()=>y,default:()=>H});module.exports=$(Y);var M=_(v(),1);function w(e){return e instanceof Error?e.stack||e.message:String(e)}s(w,"coerce");function E(e,r){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r[Math.abs(t)%r.length]}s(E,"selectColor");function D(e){return e.split(/[\s,]+/).filter(Boolean).map(n=>n.replace(/\*/g,".*?")).map(n=>new RegExp("^"+n+"$"))}s(D,"createRegexFromEnvVar");function A(e=6){return Math.random().toString(20).substring(2,e)}s(A,"generateRandomString");var m=s(function(e){},"noop");m.extend=function(e){return m};var S=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];var q=console.log||(()=>{});var H=y;function K(e,r){if(r===!0)return!0;let t=localStorage?.getItem("DEBUG");return t==="*"?!0:e==="DEV"?!t:t?D(t).some(o=>o.test(e)):!1}s(K,"isEnabled");function Q(){return{j:s(function(e){try{return JSON.stringify(e)}catch(r){return"[UnexpectedJSONParseError]: "+String(r)}},"j")}}s(Q,"createFormatters");function T(e,r,{prevTime:t,color:n},o){if(r=r||[],!K(e,o))return;let i=Number(new Date),u=i-(t||i);t=i,r[0]=w(r[0]);let C=Q();typeof r[0]!="string"&&r.unshift("%O");let a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(p,N)=>{if(p==="%%")return"%";a++;let h=C[N];if(typeof h=="function"){let R=r[a];p=h.call(self,R),r.splice(a,1),a--}return p});let k=X({diff:u,color:n,useColors:W(),namespace:e},r);q(...k)}s(T,"logger");function W(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:!!(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.webkitAppearance||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}s(W,"shouldUseColors");function X({diff:e,color:r,namespace:t,useColors:n},o){if(o[0]=(n?"%c":"")+t+(n?" %c":" ")+o[0]+(n?"%c ":" ")+"+"+(0,M.default)(e,{}),!n)return;let i="color: "+r;o.splice(1,0,i,"color: inherit");let u=0,C=0;return o[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(u++,a==="%c"&&(C=u))}),o.splice(C,0,i),o}s(X,"formatArgs");function y(e){if(e===!1)return m;let r=Number(new Date),t=E(typeof e=="string"?e:A(10),S),n=e===!0,o=typeof e=="string"?e:"DEV",i=s(function(...u){return T(o,u,{prevTime:r,color:t},n)},"debug");return i.extend=function(u){let C=o+":"+u;return y(C)},i}s(y,"createDebug");
1
+ "use strict";var F=Object.create;var m=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var s=(e,r)=>m(e,"name",{value:r,configurable:!0});var B=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),J=(e,r)=>{for(var t in r)m(e,t,{get:r[t],enumerable:!0})},v=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of O(r))!z.call(e,o)&&o!==t&&m(e,o,{get:()=>r[o],enumerable:!(n=L(r,o))||n.enumerable});return e};var _=(e,r,t)=>(t=e!=null?F(U(e)):{},v(r||!e||!e.__esModule?m(t,"default",{value:e,enumerable:!0}):t,e)),$=e=>v(m({},"__esModule",{value:!0}),e);var E=B((re,w)=>{"use strict";var g=1e3,d=g*60,l=d*60,c=l*24,G=c*7,I=c*365.25;w.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0)return P(e);if(t==="number"&&isFinite(e))return r.long?j(e):Z(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function P(e){if(e=String(e),!(e.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var t=parseFloat(r[1]),n=(r[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*I;case"weeks":case"week":case"w":return t*G;case"days":case"day":case"d":return t*c;case"hours":case"hour":case"hrs":case"hr":case"h":return t*l;case"minutes":case"minute":case"mins":case"min":case"m":return t*d;case"seconds":case"second":case"secs":case"sec":case"s":return t*g;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}s(P,"parse");function Z(e){var r=Math.abs(e);return r>=c?Math.round(e/c)+"d":r>=l?Math.round(e/l)+"h":r>=d?Math.round(e/d)+"m":r>=g?Math.round(e/g)+"s":e+"ms"}s(Z,"fmtShort");function j(e){var r=Math.abs(e);return r>=c?p(e,r,c,"day"):r>=l?p(e,r,l,"hour"):r>=d?p(e,r,d,"minute"):r>=g?p(e,r,g,"second"):e+" ms"}s(j,"fmtLong");function p(e,r,t,n){var o=r>=t*1.5;return Math.round(e/t)+" "+n+(o?"s":"")}s(p,"plural")});var Y={};J(Y,{createDebug:()=>h,default:()=>H});module.exports=$(Y);var k=_(E(),1);function D(e){return e instanceof Error?e.stack||e.message:String(e)}s(D,"coerce");function A(e,r){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r[Math.abs(t)%r.length]}s(A,"selectColor");function S(e){return e.split(/[\s,]+/).filter(Boolean).map(n=>n.replace(/\*/g,".*?")).map(n=>new RegExp("^"+n+"$"))}s(S,"createRegexFromEnvVar");function M(e=6){return Math.random().toString(20).substring(2,e)}s(M,"generateRandomString");var b=s(function(e){},"noop");b.extend=function(e){return b};var C=["#e6194b","#3cb44b","#ffe119","#4363d8","#f58231","#911eb4","#42d4f4","#f032e6","#bfef45","#fabed4","#469990","#dcbeff","#9a6324","#fffac8","#800000","#aaffc3","#808000","#ffd8b1","#000075","#a9a9a9"];var q=console.log||(()=>{});var H=h;function K(e,r){if(r===!0)return!0;let t=localStorage?.getItem("DEBUG");return t==="*"?!0:e==="DEV"?!t:t?S(t).some(o=>o.test(e)):!1}s(K,"isEnabled");function Q(){return{j:s(function(e){try{return JSON.stringify(e)}catch(r){return"[UnexpectedJSONParseError]: "+String(r)}},"j")}}s(Q,"createFormatters");function T(e,r,{prevTime:t,color:n},o){if(r=r||[],!K(e,o))return;let a=Number(new Date),i=a-(t||a);t=a,r[0]=D(r[0]);let f=Q();typeof r[0]!="string"&&r.unshift("%O");let u=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(y,R)=>{if(y==="%%")return"%";u++;let x=f[R];if(typeof x=="function"){let V=r[u];y=x.call(self,V),r.splice(u,1),u--}return y});let N=X({diff:i,color:n,useColors:W(),namespace:e},r);q(...N)}s(T,"logger");function W(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:!!(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.webkitAppearance||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}s(W,"shouldUseColors");function X({diff:e,color:r,namespace:t,useColors:n},o){if(o[0]=(n?"%c":"")+t+(n?" %c":" ")+o[0]+(n?"%c ":" ")+"+"+(0,k.default)(e,{}),!n)return;let a="color: "+r;o.splice(1,0,a,"color: inherit");let i=0,f=0;return o[0].replace(/%[a-zA-Z%]/g,u=>{u!=="%%"&&(i++,u==="%c"&&(f=i))}),o.splice(f,0,a),o}s(X,"formatArgs");function h(e){if(e===!1)return b;let r=Number(new Date),t=A(typeof e=="string"?e:M(10),C),n=e===!0,o=typeof e=="string"?e:"DEV",a=s(function(...i){return T(o,i,{prevTime:r,color:t},n)},"debug");return a.extend=function(i){let f=o+":"+i;return h(f)},a}s(h,"createDebug");
2
2
  //# sourceMappingURL=index.min.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../node_modules/ms/index.js", "../../src/browser/index.ts", "../../src/index.ts", "../../src/noop.ts", "../../src/browser/util.ts"],
4
- "sourcesContent": ["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "import humanize from 'ms'\nimport {\n generateRandomString,\n coerce,\n selectColor,\n createRegexFromEnvVar,\n type Debugger\n} from '../index.js'\nimport { noop } from '../noop.js'\nimport { colors } from './util.js'\n\nconst log = console.log || (() => {})\n\nexport { Debugger }\nexport { createDebug }\nexport default createDebug\n\n/**\n * Check if the given namespace is enabled.\n * `namespace` is the name that is passed into debug.\n * `forcedEnabled` is a boolean that forces logging when true.\n * Only checks localStorage for the DEBUG key, unless forced.\n */\nfunction isEnabled (namespace:string, forcedEnabled?:boolean):boolean {\n // If explicitly forced to be enabled via boolean true\n if (forcedEnabled === true) return true\n\n const DEBUG = localStorage?.getItem('DEBUG')\n\n // Check for wildcard\n if (DEBUG === '*') return true\n\n // if we were not called with a namespace\n if (namespace === 'DEV') {\n // We want to log iff there is no DEBUG variable.\n if (!DEBUG) {\n return true\n }\n return false\n }\n\n // No DEBUG variable set\n if (!DEBUG) return false\n\n const envVars = createRegexFromEnvVar(DEBUG)\n return envVars.some(regex => regex.test(namespace))\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\nfunction createFormatters () {\n return {\n j: function (v:any) {\n try {\n return JSON.stringify(v)\n } catch (error) {\n return '[UnexpectedJSONParseError]: ' + String(error)\n }\n }\n }\n}\n\nfunction logger (\n namespace:string,\n args:any[],\n { prevTime, color },\n forcedEnabled?:boolean\n) {\n args = args || []\n if (!isEnabled(namespace, forcedEnabled)) return\n\n // Set `diff` timestamp\n const curr = Number(new Date())\n const diff = curr - (prevTime || curr)\n prevTime = curr\n\n args[0] = coerce(args[0])\n const formatters = createFormatters()\n\n if (typeof args[0] !== 'string') {\n // Anything else let's inspect with %O\n args.unshift('%O')\n }\n\n // Apply any `formatters` transformations\n let index = 0\n args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n // If we encounter an escaped %, then don't increase the\n // array index\n if (match === '%%') return '%'\n\n index++\n\n const formatter = formatters[format]\n if (typeof formatter === 'function') {\n const val = args[index]\n match = formatter.call(self, val)\n\n // Now we need to remove `args[index]` since it's inlined\n // in the `format`\n args.splice(index, 1)\n index--\n }\n return match\n })\n\n // Apply env-specific formatting (colors, etc.)\n const _args = formatArgs({\n diff,\n color,\n useColors: shouldUseColors(),\n namespace\n }, args)\n\n log(..._args)\n}\n\nfunction shouldUseColors ():boolean {\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native:\n // https://github.com/facebook/react-native/pull/1632\n return !!((typeof document !== 'undefined' && document.documentElement &&\n document.documentElement.style &&\n document.documentElement.style.webkitAppearance) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) &&\n parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)))\n}\n\n/**\n * Colorize log arguments if enabled.\n */\nfunction formatArgs ({ diff, color, namespace, useColors }:{\n diff:number,\n color:number,\n namespace:string,\n useColors:boolean\n}, args) {\n args[0] = (useColors ? '%c' : '') +\n namespace +\n (useColors ? ' %c' : ' ') +\n args[0] +\n (useColors ? '%c ' : ' ') +\n '+' + humanize(diff, {})\n\n if (!useColors) return\n\n const c = 'color: ' + color\n args.splice(1, 0, c, 'color: inherit')\n\n // The final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n let index = 0\n let lastC = 0\n args[0].replace(/%[a-zA-Z%]/g, match => {\n if (match === '%%') {\n return\n }\n index++\n if (match === '%c') {\n // We only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index\n }\n })\n\n args.splice(lastC, 0, c)\n\n return args\n}\n\nfunction createDebug (namespace:string|boolean):Debugger {\n if (namespace === false) return noop\n const prevTime = Number(new Date())\n const color = selectColor(\n typeof namespace === 'string' ? namespace : generateRandomString(10),\n colors\n )\n\n // Determine if this is a boolean true passed as the namespace\n const forcedEnabled = namespace === true\n const actualNamespace = typeof namespace === 'string' ? namespace : 'DEV'\n\n const debug = function (...args:any[]) {\n return logger(\n actualNamespace,\n args,\n { prevTime, color },\n forcedEnabled\n )\n }\n\n debug.extend = function (extension: string): Debugger {\n const extendedNamespace = actualNamespace + ':' + extension\n return createDebug(extendedNamespace)\n }\n\n return debug as Debugger\n}\n", "/**\n* Coerce `val`.\n*\n* @param {unknown} val\n* @return {string}\n*/\nexport function coerce (val:unknown):string {\n if (val instanceof Error) {\n return val.stack || val.message\n }\n\n return String(val)\n}\n\n/**\n * Selects a color for a debug namespace\n * @param {string} namespace The namespace string for the debug instance to be colored\n * @return {number|string} An ANSI color code for the given namespace\n */\nexport function selectColor (\n namespace:string,\n colors:string[]|number[]\n):number|string {\n let hash = 0\n\n for (let i = 0; i < namespace.length; i++) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i)\n hash |= 0 // Convert to 32bit integer\n }\n\n return colors[Math.abs(hash) % colors.length]\n}\n\nexport function createRegexFromEnvVar (names:string):RegExp[] {\n const split = names.split(/[\\s,]+/).filter(Boolean)\n const regexs = split\n .map(word => word.replace(/\\*/g, '.*?'))\n .map(r => new RegExp('^' + r + '$'))\n\n return regexs\n}\n\nexport type Debugger = {\n (...args: any[]): void;\n extend: (namespace: string) => Debugger;\n}\n\n/**\n * Use this to create a random namespace in the case that `debug`\n * is called without any arguments.\n * @param {number} length Lenght of the random string\n * @returns {string}\n */\nexport function generateRandomString (length = 6):string {\n return Math.random().toString(20).substring(2, length)\n}\n", "import { type Debugger } from './index.js'\n\nexport const noop:Debugger = function (_args:any[]) {}\nnoop.extend = function (_namespace:string) { return noop }\n\n", "export const colors = [\n '#0000CC',\n '#0000FF',\n '#0033CC',\n '#0033FF',\n '#0066CC',\n '#0066FF',\n '#0099CC',\n '#0099FF',\n '#00CC00',\n '#00CC33',\n '#00CC66',\n '#00CC99',\n '#00CCCC',\n '#00CCFF',\n '#3300CC',\n '#3300FF',\n '#3333CC',\n '#3333FF',\n '#3366CC',\n '#3366FF',\n '#3399CC',\n '#3399FF',\n '#33CC00',\n '#33CC33',\n '#33CC66',\n '#33CC99',\n '#33CCCC',\n '#33CCFF',\n '#6600CC',\n '#6600FF',\n '#6633CC',\n '#6633FF',\n '#66CC00',\n '#66CC33',\n '#9900CC',\n '#9900FF',\n '#9933CC',\n '#9933FF',\n '#99CC00',\n '#99CC33',\n '#CC0000',\n '#CC0033',\n '#CC0066',\n '#CC0099',\n '#CC00CC',\n '#CC00FF',\n '#CC3300',\n '#CC3333',\n '#CC3366',\n '#CC3399',\n '#CC33CC',\n '#CC33FF',\n '#CC6600',\n '#CC6633',\n '#CC9900',\n '#CC9933',\n '#CCCC00',\n '#CCCC33',\n '#FF0000',\n '#FF0033',\n '#FF0066',\n '#FF0099',\n '#FF00CC',\n '#FF00FF',\n '#FF3300',\n '#FF3333',\n '#FF3366',\n '#FF3399',\n '#FF33CC',\n '#FF33FF',\n '#FF6600',\n '#FF6633',\n '#FF9900',\n '#FF9933',\n '#FFCC00',\n '#FFCC33'\n]\n"],
5
- "mappings": "uqBAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,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C,EAAM,OAAS,SAAUC,EAA6B,CAClD,IAAMC,EAAoBH,EAAkB,IAAME,EAClD,OAAOtC,EAAYuC,CAAiB,CACxC,EAEOF,CACX,CA3BS9B,EAAAP,EAAA",
4
+ "sourcesContent": ["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "import humanize from 'ms'\nimport {\n generateRandomString,\n coerce,\n selectColor,\n createRegexFromEnvVar,\n type Debugger\n} from '../index.js'\nimport { noop } from '../noop.js'\nimport { colors } from './util.js'\n\nconst log = console.log || (() => {})\n\nexport { Debugger }\nexport { createDebug }\nexport default createDebug\n\n/**\n * Check if the given namespace is enabled.\n * `namespace` is the name that is passed into debug.\n * `forcedEnabled` is a boolean that forces logging when true.\n * Only checks localStorage for the DEBUG key, unless forced.\n */\nfunction isEnabled (namespace:string, forcedEnabled?:boolean):boolean {\n // If explicitly forced to be enabled via boolean true\n if (forcedEnabled === true) return true\n\n const DEBUG = localStorage?.getItem('DEBUG')\n\n // Check for wildcard\n if (DEBUG === '*') return true\n\n // if we were not called with a namespace\n if (namespace === 'DEV') {\n // We want to log iff there is no DEBUG variable.\n if (!DEBUG) {\n return true\n }\n return false\n }\n\n // No DEBUG variable set\n if (!DEBUG) return false\n\n const envVars = createRegexFromEnvVar(DEBUG)\n return envVars.some(regex => regex.test(namespace))\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\nfunction createFormatters () {\n return {\n j: function (v:any) {\n try {\n return JSON.stringify(v)\n } catch (error) {\n return '[UnexpectedJSONParseError]: ' + String(error)\n }\n }\n }\n}\n\nfunction logger (\n namespace:string,\n args:any[],\n { prevTime, color },\n forcedEnabled?:boolean\n) {\n args = args || []\n if (!isEnabled(namespace, forcedEnabled)) return\n\n // Set `diff` timestamp\n const curr = Number(new Date())\n const diff = curr - (prevTime || curr)\n prevTime = curr\n\n args[0] = coerce(args[0])\n const formatters = createFormatters()\n\n if (typeof args[0] !== 'string') {\n // Anything else let's inspect with %O\n args.unshift('%O')\n }\n\n // Apply any `formatters` transformations\n let index = 0\n args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n // If we encounter an escaped %, then don't increase the\n // array index\n if (match === '%%') return '%'\n\n index++\n\n const formatter = formatters[format]\n if (typeof formatter === 'function') {\n const val = args[index]\n match = formatter.call(self, val)\n\n // Now we need to remove `args[index]` since it's inlined\n // in the `format`\n args.splice(index, 1)\n index--\n }\n return match\n })\n\n // Apply env-specific formatting (colors, etc.)\n const _args = formatArgs({\n diff,\n color,\n useColors: shouldUseColors(),\n namespace\n }, args)\n\n log(..._args)\n}\n\nfunction shouldUseColors ():boolean {\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native:\n // https://github.com/facebook/react-native/pull/1632\n return !!((typeof document !== 'undefined' && document.documentElement &&\n document.documentElement.style &&\n document.documentElement.style.webkitAppearance) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) &&\n parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)))\n}\n\n/**\n * Colorize log arguments if enabled.\n */\nfunction formatArgs ({ diff, color, namespace, useColors }:{\n diff:number,\n color:number,\n namespace:string,\n useColors:boolean\n}, args) {\n args[0] = (useColors ? '%c' : '') +\n namespace +\n (useColors ? ' %c' : ' ') +\n args[0] +\n (useColors ? '%c ' : ' ') +\n '+' + humanize(diff, {})\n\n if (!useColors) return\n\n const c = 'color: ' + color\n args.splice(1, 0, c, 'color: inherit')\n\n // The final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n let index = 0\n let lastC = 0\n args[0].replace(/%[a-zA-Z%]/g, match => {\n if (match === '%%') {\n return\n }\n index++\n if (match === '%c') {\n // We only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index\n }\n })\n\n args.splice(lastC, 0, c)\n\n return args\n}\n\nfunction createDebug (namespace:string|boolean):Debugger {\n if (namespace === false) return noop\n const prevTime = Number(new Date())\n const color = selectColor(\n typeof namespace === 'string' ? namespace : generateRandomString(10),\n colors\n )\n\n // Determine if this is a boolean true passed as the namespace\n const forcedEnabled = namespace === true\n const actualNamespace = typeof namespace === 'string' ? namespace : 'DEV'\n\n const debug = function (...args:any[]) {\n return logger(\n actualNamespace,\n args,\n { prevTime, color },\n forcedEnabled\n )\n }\n\n debug.extend = function (extension: string): Debugger {\n const extendedNamespace = actualNamespace + ':' + extension\n return createDebug(extendedNamespace)\n }\n\n return debug as Debugger\n}\n", "/**\n* Coerce `val`.\n*\n* @param {unknown} val\n* @return {string}\n*/\nexport function coerce (val:unknown):string {\n if (val instanceof Error) {\n return val.stack || val.message\n }\n\n return String(val)\n}\n\n/**\n * Selects a color for a debug namespace\n * @param {string} namespace The namespace string for the debug instance to be colored\n * @return {number|string} An ANSI color code for the given namespace\n */\nexport function selectColor (\n namespace:string,\n colors:string[]|number[]\n):number|string {\n let hash = 0\n\n for (let i = 0; i < namespace.length; i++) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i)\n hash |= 0 // Convert to 32bit integer\n }\n\n return colors[Math.abs(hash) % colors.length]\n}\n\nexport function createRegexFromEnvVar (names:string):RegExp[] {\n const split = names.split(/[\\s,]+/).filter(Boolean)\n const regexs = split\n .map(word => word.replace(/\\*/g, '.*?'))\n .map(r => new RegExp('^' + r + '$'))\n\n return regexs\n}\n\nexport type Debugger = {\n (...args: any[]): void;\n extend: (namespace: string) => Debugger;\n}\n\n/**\n * Use this to create a random namespace in the case that `debug`\n * is called without any arguments.\n * @param {number} length Lenght of the random string\n * @returns {string}\n */\nexport function generateRandomString (length = 6):string {\n return Math.random().toString(20).substring(2, length)\n}\n", "import { type Debugger } from './index.js'\n\nexport const noop:Debugger = function (_args:any[]) {}\nnoop.extend = function (_namespace:string) { return noop }\n\n", "/**\n * Maximally distinct colors selected for perceptual distance in CIELAB space.\n * Any two colors in this palette are visually distinguishable.\n */\nexport const colors = [\n '#e6194b', // red\n '#3cb44b', // green\n '#ffe119', // yellow\n '#4363d8', // blue\n '#f58231', // orange\n '#911eb4', // purple\n '#42d4f4', // cyan\n '#f032e6', // magenta\n '#bfef45', // lime\n '#fabed4', // pink\n '#469990', // teal\n '#dcbeff', // lavender\n '#9a6324', // brown\n '#fffac8', // beige\n '#800000', // maroon\n '#aaffc3', // mint\n '#808000', // olive\n '#ffd8b1', // apricot\n '#000075', // navy\n '#a9a9a9', // grey\n]\n"],
5
+ "mappings": "uqBAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAIA,IAAIC,EAAI,IACJC,EAAID,EAAI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AF,EAAO,UAAAZ,EAAW,UAAA0B,CAAU,EAKtDhB,EAAM,CAQL,GAPAA,EAAK,CAAC,GAAKgB,EAAY,KAAO,IAC1B1B,GACC0B,EAAY,MAAQ,KACrBhB,EAAK,CAAC,GACLgB,EAAY,MAAQ,KACrB,OAAM,EAAAC,SAASb,EAAM,CAAC,CAAC,EAEvB,CAACY,EAAW,OAEhB,IAAME,EAAI,UAAYhB,EACtBF,EAAK,OAAO,EAAG,EAAGkB,EAAG,gBAAgB,EAKrC,IAAIX,EAAQ,EACRY,EAAQ,EACZ,OAAAnB,EAAK,CAAC,EAAE,QAAQ,cAAeQ,GAAS,CAChCA,IAAU,OAGdD,IACIC,IAAU,OAGVW,EAAQZ,GAEhB,CAAC,EAEDP,EAAK,OAAOmB,EAAO,EAAGD,CAAC,EAEhBlB,CACX,CAtCSL,EAAAkB,EAAA,cAwCT,SAASzB,EAAaE,EAAmC,CACrD,GAAIA,IAAc,GAAO,OAAO8B,EAChC,IAAMnB,EAAW,OAAO,IAAI,IAAM,EAC5BC,EAAQmB,EACV,OAAO/B,GAAc,SAAWA,EAAYgC,EAAqB,EAAE,EACnEC,CACJ,EAGMhC,EAAgBD,IAAc,GAC9BkC,EAAkB,OAAOlC,GAAc,SAAWA,EAAY,MAE9DmC,EAAQ9B,EAAA,YAAaK,EAAY,CACnC,OAAOD,EACHyB,EACAxB,EACA,CAAE,SAAAC,EAAU,MAAAC,CAAM,EAClBX,CACJ,CACJ,EAPc,SASd,OAAAkC,EAAM,OAAS,SAAUC,EAA6B,CAClD,IAAMC,EAAoBH,EAAkB,IAAME,EAClD,OAAOtC,EAAYuC,CAAiB,CACxC,EAEOF,CACX,CA3BS9B,EAAAP,EAAA",
6
6
  "names": ["require_ms", "__commonJSMin", "exports", "module", "s", "m", "h", "d", "w", "y", "val", "options", "type", "parse", "fmtLong", "fmtShort", "str", "match", "n", "__name", "ms", "msAbs", "plural", "name", "isPlural", "browser_exports", "__export", "createDebug", "browser_default", "__toCommonJS", "import_ms", "coerce", "val", "__name", "selectColor", "namespace", "colors", "hash", "i", "createRegexFromEnvVar", "names", "word", "r", "generateRandomString", "length", "noop", "__name", "_args", "_namespace", "colors", "log", "browser_default", "createDebug", "isEnabled", "namespace", "forcedEnabled", "DEBUG", "createRegexFromEnvVar", "regex", "__name", "createFormatters", "v", "error", "logger", "args", "prevTime", "color", "curr", "diff", "coerce", "formatters", "index", "match", "format", "formatter", "val", "_args", "formatArgs", "shouldUseColors", "log", "useColors", "humanize", "c", "lastC", "noop", "selectColor", "generateRandomString", "colors", "actualNamespace", "debug", "extension", "extendedNamespace"]
7
7
  }
@@ -1,2 +1,2 @@
1
- var R=Object.create;var p=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var s=(e,r)=>p(e,"name",{value:r,configurable:!0});var z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var B=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of L(r))!U.call(e,o)&&o!==t&&p(e,o,{get:()=>r[o],enumerable:!(n=V(r,o))||n.enumerable});return e};var J=(e,r,t)=>(t=e!=null?R(O(e)):{},B(r||!e||!e.__esModule?p(t,"default",{value:e,enumerable:!0}):t,e));var b=z((W,h)=>{"use strict";var f=1e3,g=f*60,F=g*60,c=F*24,_=c*7,$=c*365.25;h.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0)return G(e);if(t==="number"&&isFinite(e))return r.long?P(e):I(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function G(e){if(e=String(e),!(e.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var t=parseFloat(r[1]),n=(r[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*$;case"weeks":case"week":case"w":return t*_;case"days":case"day":case"d":return t*c;case"hours":case"hour":case"hrs":case"hr":case"h":return t*F;case"minutes":case"minute":case"mins":case"min":case"m":return t*g;case"seconds":case"second":case"secs":case"sec":case"s":return t*f;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}s(G,"parse");function I(e){var r=Math.abs(e);return r>=c?Math.round(e/c)+"d":r>=F?Math.round(e/F)+"h":r>=g?Math.round(e/g)+"m":r>=f?Math.round(e/f)+"s":e+"ms"}s(I,"fmtShort");function P(e){var r=Math.abs(e);return r>=c?l(e,r,c,"day"):r>=F?l(e,r,F,"hour"):r>=g?l(e,r,g,"minute"):r>=f?l(e,r,f,"second"):e+" ms"}s(P,"fmtLong");function l(e,r,t,n){var o=r>=t*1.5;return Math.round(e/t)+" "+n+(o?"s":"")}s(l,"plural")});var A=J(b(),1);function x(e){return e instanceof Error?e.stack||e.message:String(e)}s(x,"coerce");function v(e,r){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r[Math.abs(t)%r.length]}s(v,"selectColor");function w(e){return e.split(/[\s,]+/).filter(Boolean).map(n=>n.replace(/\*/g,".*?")).map(n=>new RegExp("^"+n+"$"))}s(w,"createRegexFromEnvVar");function E(e=6){return Math.random().toString(20).substring(2,e)}s(E,"generateRandomString");var d=s(function(e){},"noop");d.extend=function(e){return d};var D=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];var Z=console.log||(()=>{});var ue=S;function j(e,r){if(r===!0)return!0;let t=localStorage?.getItem("DEBUG");return t==="*"?!0:e==="DEV"?!t:t?w(t).some(o=>o.test(e)):!1}s(j,"isEnabled");function q(){return{j:s(function(e){try{return JSON.stringify(e)}catch(r){return"[UnexpectedJSONParseError]: "+String(r)}},"j")}}s(q,"createFormatters");function H(e,r,{prevTime:t,color:n},o){if(r=r||[],!j(e,o))return;let i=Number(new Date),u=i-(t||i);t=i,r[0]=x(r[0]);let C=q();typeof r[0]!="string"&&r.unshift("%O");let a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(m,k)=>{if(m==="%%")return"%";a++;let y=C[k];if(typeof y=="function"){let N=r[a];m=y.call(self,N),r.splice(a,1),a--}return m});let M=Q({diff:u,color:n,useColors:K(),namespace:e},r);Z(...M)}s(H,"logger");function K(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:!!(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.webkitAppearance||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}s(K,"shouldUseColors");function Q({diff:e,color:r,namespace:t,useColors:n},o){if(o[0]=(n?"%c":"")+t+(n?" %c":" ")+o[0]+(n?"%c ":" ")+"+"+(0,A.default)(e,{}),!n)return;let i="color: "+r;o.splice(1,0,i,"color: inherit");let u=0,C=0;return o[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(u++,a==="%c"&&(C=u))}),o.splice(C,0,i),o}s(Q,"formatArgs");function S(e){if(e===!1)return d;let r=Number(new Date),t=v(typeof e=="string"?e:E(10),D),n=e===!0,o=typeof e=="string"?e:"DEV",i=s(function(...u){return H(o,u,{prevTime:r,color:t},n)},"debug");return i.extend=function(u){let C=o+":"+u;return S(C)},i}s(S,"createDebug");export{S as createDebug,ue as default};
1
+ var V=Object.create;var y=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var s=(e,r)=>y(e,"name",{value:r,configurable:!0});var z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var B=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of L(r))!U.call(e,o)&&o!==t&&y(e,o,{get:()=>r[o],enumerable:!(n=F(r,o))||n.enumerable});return e};var J=(e,r,t)=>(t=e!=null?V(O(e)):{},B(r||!e||!e.__esModule?y(t,"default",{value:e,enumerable:!0}):t,e));var v=z((W,x)=>{"use strict";var g=1e3,d=g*60,l=d*60,c=l*24,_=c*7,$=c*365.25;x.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0)return G(e);if(t==="number"&&isFinite(e))return r.long?P(e):I(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function G(e){if(e=String(e),!(e.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var t=parseFloat(r[1]),n=(r[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*$;case"weeks":case"week":case"w":return t*_;case"days":case"day":case"d":return t*c;case"hours":case"hour":case"hrs":case"hr":case"h":return t*l;case"minutes":case"minute":case"mins":case"min":case"m":return t*d;case"seconds":case"second":case"secs":case"sec":case"s":return t*g;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}s(G,"parse");function I(e){var r=Math.abs(e);return r>=c?Math.round(e/c)+"d":r>=l?Math.round(e/l)+"h":r>=d?Math.round(e/d)+"m":r>=g?Math.round(e/g)+"s":e+"ms"}s(I,"fmtShort");function P(e){var r=Math.abs(e);return r>=c?m(e,r,c,"day"):r>=l?m(e,r,l,"hour"):r>=d?m(e,r,d,"minute"):r>=g?m(e,r,g,"second"):e+" ms"}s(P,"fmtLong");function m(e,r,t,n){var o=r>=t*1.5;return Math.round(e/t)+" "+n+(o?"s":"")}s(m,"plural")});var M=J(v(),1);function w(e){return e instanceof Error?e.stack||e.message:String(e)}s(w,"coerce");function E(e,r){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r[Math.abs(t)%r.length]}s(E,"selectColor");function D(e){return e.split(/[\s,]+/).filter(Boolean).map(n=>n.replace(/\*/g,".*?")).map(n=>new RegExp("^"+n+"$"))}s(D,"createRegexFromEnvVar");function A(e=6){return Math.random().toString(20).substring(2,e)}s(A,"generateRandomString");var p=s(function(e){},"noop");p.extend=function(e){return p};var S=["#e6194b","#3cb44b","#ffe119","#4363d8","#f58231","#911eb4","#42d4f4","#f032e6","#bfef45","#fabed4","#469990","#dcbeff","#9a6324","#fffac8","#800000","#aaffc3","#808000","#ffd8b1","#000075","#a9a9a9"];var Z=console.log||(()=>{});var ie=C;function j(e,r){if(r===!0)return!0;let t=localStorage?.getItem("DEBUG");return t==="*"?!0:e==="DEV"?!t:t?D(t).some(o=>o.test(e)):!1}s(j,"isEnabled");function q(){return{j:s(function(e){try{return JSON.stringify(e)}catch(r){return"[UnexpectedJSONParseError]: "+String(r)}},"j")}}s(q,"createFormatters");function H(e,r,{prevTime:t,color:n},o){if(r=r||[],!j(e,o))return;let a=Number(new Date),i=a-(t||a);t=a,r[0]=w(r[0]);let f=q();typeof r[0]!="string"&&r.unshift("%O");let u=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(b,N)=>{if(b==="%%")return"%";u++;let h=f[N];if(typeof h=="function"){let R=r[u];b=h.call(self,R),r.splice(u,1),u--}return b});let k=Q({diff:i,color:n,useColors:K(),namespace:e},r);Z(...k)}s(H,"logger");function K(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:!!(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.webkitAppearance||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}s(K,"shouldUseColors");function Q({diff:e,color:r,namespace:t,useColors:n},o){if(o[0]=(n?"%c":"")+t+(n?" %c":" ")+o[0]+(n?"%c ":" ")+"+"+(0,M.default)(e,{}),!n)return;let a="color: "+r;o.splice(1,0,a,"color: inherit");let i=0,f=0;return o[0].replace(/%[a-zA-Z%]/g,u=>{u!=="%%"&&(i++,u==="%c"&&(f=i))}),o.splice(f,0,a),o}s(Q,"formatArgs");function C(e){if(e===!1)return p;let r=Number(new Date),t=E(typeof e=="string"?e:A(10),S),n=e===!0,o=typeof e=="string"?e:"DEV",a=s(function(...i){return H(o,i,{prevTime:r,color:t},n)},"debug");return a.extend=function(i){let f=o+":"+i;return C(f)},a}s(C,"createDebug");export{C as createDebug,ie as default};
2
2
  //# sourceMappingURL=index.min.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../node_modules/ms/index.js", "../../src/browser/index.ts", "../../src/index.ts", "../../src/noop.ts", "../../src/browser/util.ts"],
4
- "sourcesContent": ["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "import humanize from 'ms'\nimport {\n generateRandomString,\n coerce,\n selectColor,\n createRegexFromEnvVar,\n type Debugger\n} from '../index.js'\nimport { noop } from '../noop.js'\nimport { colors } from './util.js'\n\nconst log = console.log || (() => {})\n\nexport { Debugger }\nexport { createDebug }\nexport default createDebug\n\n/**\n * Check if the given namespace is enabled.\n * `namespace` is the name that is passed into debug.\n * `forcedEnabled` is a boolean that forces logging when true.\n * Only checks localStorage for the DEBUG key, unless forced.\n */\nfunction isEnabled (namespace:string, forcedEnabled?:boolean):boolean {\n // If explicitly forced to be enabled via boolean true\n if (forcedEnabled === true) return true\n\n const DEBUG = localStorage?.getItem('DEBUG')\n\n // Check for wildcard\n if (DEBUG === '*') return true\n\n // if we were not called with a namespace\n if (namespace === 'DEV') {\n // We want to log iff there is no DEBUG variable.\n if (!DEBUG) {\n return true\n }\n return false\n }\n\n // No DEBUG variable set\n if (!DEBUG) return false\n\n const envVars = createRegexFromEnvVar(DEBUG)\n return envVars.some(regex => regex.test(namespace))\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\nfunction createFormatters () {\n return {\n j: function (v:any) {\n try {\n return JSON.stringify(v)\n } catch (error) {\n return '[UnexpectedJSONParseError]: ' + String(error)\n }\n }\n }\n}\n\nfunction logger (\n namespace:string,\n args:any[],\n { prevTime, color },\n forcedEnabled?:boolean\n) {\n args = args || []\n if (!isEnabled(namespace, forcedEnabled)) return\n\n // Set `diff` timestamp\n const curr = Number(new Date())\n const diff = curr - (prevTime || curr)\n prevTime = curr\n\n args[0] = coerce(args[0])\n const formatters = createFormatters()\n\n if (typeof args[0] !== 'string') {\n // Anything else let's inspect with %O\n args.unshift('%O')\n }\n\n // Apply any `formatters` transformations\n let index = 0\n args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n // If we encounter an escaped %, then don't increase the\n // array index\n if (match === '%%') return '%'\n\n index++\n\n const formatter = formatters[format]\n if (typeof formatter === 'function') {\n const val = args[index]\n match = formatter.call(self, val)\n\n // Now we need to remove `args[index]` since it's inlined\n // in the `format`\n args.splice(index, 1)\n index--\n }\n return match\n })\n\n // Apply env-specific formatting (colors, etc.)\n const _args = formatArgs({\n diff,\n color,\n useColors: shouldUseColors(),\n namespace\n }, args)\n\n log(..._args)\n}\n\nfunction shouldUseColors ():boolean {\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native:\n // https://github.com/facebook/react-native/pull/1632\n return !!((typeof document !== 'undefined' && document.documentElement &&\n document.documentElement.style &&\n document.documentElement.style.webkitAppearance) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) &&\n parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)))\n}\n\n/**\n * Colorize log arguments if enabled.\n */\nfunction formatArgs ({ diff, color, namespace, useColors }:{\n diff:number,\n color:number,\n namespace:string,\n useColors:boolean\n}, args) {\n args[0] = (useColors ? '%c' : '') +\n namespace +\n (useColors ? ' %c' : ' ') +\n args[0] +\n (useColors ? '%c ' : ' ') +\n '+' + humanize(diff, {})\n\n if (!useColors) return\n\n const c = 'color: ' + color\n args.splice(1, 0, c, 'color: inherit')\n\n // The final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n let index = 0\n let lastC = 0\n args[0].replace(/%[a-zA-Z%]/g, match => {\n if (match === '%%') {\n return\n }\n index++\n if (match === '%c') {\n // We only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index\n }\n })\n\n args.splice(lastC, 0, c)\n\n return args\n}\n\nfunction createDebug (namespace:string|boolean):Debugger {\n if (namespace === false) return noop\n const prevTime = Number(new Date())\n const color = selectColor(\n typeof namespace === 'string' ? namespace : generateRandomString(10),\n colors\n )\n\n // Determine if this is a boolean true passed as the namespace\n const forcedEnabled = namespace === true\n const actualNamespace = typeof namespace === 'string' ? namespace : 'DEV'\n\n const debug = function (...args:any[]) {\n return logger(\n actualNamespace,\n args,\n { prevTime, color },\n forcedEnabled\n )\n }\n\n debug.extend = function (extension: string): Debugger {\n const extendedNamespace = actualNamespace + ':' + extension\n return createDebug(extendedNamespace)\n }\n\n return debug as Debugger\n}\n", "/**\n* Coerce `val`.\n*\n* @param {unknown} val\n* @return {string}\n*/\nexport function coerce (val:unknown):string {\n if (val instanceof Error) {\n return val.stack || val.message\n }\n\n return String(val)\n}\n\n/**\n * Selects a color for a debug namespace\n * @param {string} namespace The namespace string for the debug instance to be colored\n * @return {number|string} An ANSI color code for the given namespace\n */\nexport function selectColor (\n namespace:string,\n colors:string[]|number[]\n):number|string {\n let hash = 0\n\n for (let i = 0; i < namespace.length; i++) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i)\n hash |= 0 // Convert to 32bit integer\n }\n\n return colors[Math.abs(hash) % colors.length]\n}\n\nexport function createRegexFromEnvVar (names:string):RegExp[] {\n const split = names.split(/[\\s,]+/).filter(Boolean)\n const regexs = split\n .map(word => word.replace(/\\*/g, '.*?'))\n .map(r => new RegExp('^' + r + '$'))\n\n return regexs\n}\n\nexport type Debugger = {\n (...args: any[]): void;\n extend: (namespace: string) => Debugger;\n}\n\n/**\n * Use this to create a random namespace in the case that `debug`\n * is called without any arguments.\n * @param {number} length Lenght of the random string\n * @returns {string}\n */\nexport function generateRandomString (length = 6):string {\n return Math.random().toString(20).substring(2, length)\n}\n", "import { type Debugger } from './index.js'\n\nexport const noop:Debugger = function (_args:any[]) {}\nnoop.extend = function (_namespace:string) { return noop }\n\n", "export const colors = [\n '#0000CC',\n '#0000FF',\n '#0033CC',\n '#0033FF',\n '#0066CC',\n '#0066FF',\n '#0099CC',\n '#0099FF',\n '#00CC00',\n '#00CC33',\n '#00CC66',\n '#00CC99',\n '#00CCCC',\n '#00CCFF',\n '#3300CC',\n '#3300FF',\n '#3333CC',\n '#3333FF',\n '#3366CC',\n '#3366FF',\n '#3399CC',\n '#3399FF',\n '#33CC00',\n '#33CC33',\n '#33CC66',\n '#33CC99',\n '#33CCCC',\n '#33CCFF',\n '#6600CC',\n '#6600FF',\n '#6633CC',\n '#6633FF',\n '#66CC00',\n '#66CC33',\n '#9900CC',\n '#9900FF',\n '#9933CC',\n '#9933FF',\n '#99CC00',\n '#99CC33',\n '#CC0000',\n '#CC0033',\n '#CC0066',\n '#CC0099',\n '#CC00CC',\n '#CC00FF',\n '#CC3300',\n '#CC3333',\n '#CC3366',\n '#CC3399',\n '#CC33CC',\n '#CC33FF',\n '#CC6600',\n '#CC6633',\n '#CC9900',\n '#CC9933',\n '#CCCC00',\n '#CCCC33',\n '#FF0000',\n '#FF0033',\n '#FF0066',\n '#FF0099',\n '#FF00CC',\n '#FF00FF',\n '#FF3300',\n '#FF3333',\n '#FF3366',\n '#F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B,EACAxB,EACA,CAAE,SAAAC,EAAU,MAAAC,CAAM,EAClBX,CACJ,CACJ,EAPc,SASd,OAAAkC,EAAM,OAAS,SAAUC,EAA6B,CAClD,IAAMC,EAAoBH,EAAkB,IAAME,EAClD,OAAOtC,EAAYuC,CAAiB,CACxC,EAEOF,CACX,CA3BS9B,EAAAP,EAAA",
4
+ "sourcesContent": ["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "import humanize from 'ms'\nimport {\n generateRandomString,\n coerce,\n selectColor,\n createRegexFromEnvVar,\n type Debugger\n} from '../index.js'\nimport { noop } from '../noop.js'\nimport { colors } from './util.js'\n\nconst log = console.log || (() => {})\n\nexport { Debugger }\nexport { createDebug }\nexport default createDebug\n\n/**\n * Check if the given namespace is enabled.\n * `namespace` is the name that is passed into debug.\n * `forcedEnabled` is a boolean that forces logging when true.\n * Only checks localStorage for the DEBUG key, unless forced.\n */\nfunction isEnabled (namespace:string, forcedEnabled?:boolean):boolean {\n // If explicitly forced to be enabled via boolean true\n if (forcedEnabled === true) return true\n\n const DEBUG = localStorage?.getItem('DEBUG')\n\n // Check for wildcard\n if (DEBUG === '*') return true\n\n // if we were not called with a namespace\n if (namespace === 'DEV') {\n // We want to log iff there is no DEBUG variable.\n if (!DEBUG) {\n return true\n }\n return false\n }\n\n // No DEBUG variable set\n if (!DEBUG) return false\n\n const envVars = createRegexFromEnvVar(DEBUG)\n return envVars.some(regex => regex.test(namespace))\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\nfunction createFormatters () {\n return {\n j: function (v:any) {\n try {\n return JSON.stringify(v)\n } catch (error) {\n return '[UnexpectedJSONParseError]: ' + String(error)\n }\n }\n }\n}\n\nfunction logger (\n namespace:string,\n args:any[],\n { prevTime, color },\n forcedEnabled?:boolean\n) {\n args = args || []\n if (!isEnabled(namespace, forcedEnabled)) return\n\n // Set `diff` timestamp\n const curr = Number(new Date())\n const diff = curr - (prevTime || curr)\n prevTime = curr\n\n args[0] = coerce(args[0])\n const formatters = createFormatters()\n\n if (typeof args[0] !== 'string') {\n // Anything else let's inspect with %O\n args.unshift('%O')\n }\n\n // Apply any `formatters` transformations\n let index = 0\n args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n // If we encounter an escaped %, then don't increase the\n // array index\n if (match === '%%') return '%'\n\n index++\n\n const formatter = formatters[format]\n if (typeof formatter === 'function') {\n const val = args[index]\n match = formatter.call(self, val)\n\n // Now we need to remove `args[index]` since it's inlined\n // in the `format`\n args.splice(index, 1)\n index--\n }\n return match\n })\n\n // Apply env-specific formatting (colors, etc.)\n const _args = formatArgs({\n diff,\n color,\n useColors: shouldUseColors(),\n namespace\n }, args)\n\n log(..._args)\n}\n\nfunction shouldUseColors ():boolean {\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false\n }\n\n // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native:\n // https://github.com/facebook/react-native/pull/1632\n return !!((typeof document !== 'undefined' && document.documentElement &&\n document.documentElement.style &&\n document.documentElement.style.webkitAppearance) ||\n // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) &&\n parseInt(RegExp.$1, 10) >= 31) ||\n // Double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)))\n}\n\n/**\n * Colorize log arguments if enabled.\n */\nfunction formatArgs ({ diff, color, namespace, useColors }:{\n diff:number,\n color:number,\n namespace:string,\n useColors:boolean\n}, args) {\n args[0] = (useColors ? '%c' : '') +\n namespace +\n (useColors ? ' %c' : ' ') +\n args[0] +\n (useColors ? '%c ' : ' ') +\n '+' + humanize(diff, {})\n\n if (!useColors) return\n\n const c = 'color: ' + color\n args.splice(1, 0, c, 'color: inherit')\n\n // The final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n let index = 0\n let lastC = 0\n args[0].replace(/%[a-zA-Z%]/g, match => {\n if (match === '%%') {\n return\n }\n index++\n if (match === '%c') {\n // We only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index\n }\n })\n\n args.splice(lastC, 0, c)\n\n return args\n}\n\nfunction createDebug (namespace:string|boolean):Debugger {\n if (namespace === false) return noop\n const prevTime = Number(new Date())\n const color = selectColor(\n typeof namespace === 'string' ? namespace : generateRandomString(10),\n colors\n )\n\n // Determine if this is a boolean true passed as the namespace\n const forcedEnabled = namespace === true\n const actualNamespace = typeof namespace === 'string' ? namespace : 'DEV'\n\n const debug = function (...args:any[]) {\n return logger(\n actualNamespace,\n args,\n { prevTime, color },\n forcedEnabled\n )\n }\n\n debug.extend = function (extension: string): Debugger {\n const extendedNamespace = actualNamespace + ':' + extension\n return createDebug(extendedNamespace)\n }\n\n return debug as Debugger\n}\n", "/**\n* Coerce `val`.\n*\n* @param {unknown} val\n* @return {string}\n*/\nexport function coerce (val:unknown):string {\n if (val instanceof Error) {\n return val.stack || val.message\n }\n\n return String(val)\n}\n\n/**\n * Selects a color for a debug namespace\n * @param {string} namespace The namespace string for the debug instance to be colored\n * @return {number|string} An ANSI color code for the given namespace\n */\nexport function selectColor (\n namespace:string,\n colors:string[]|number[]\n):number|string {\n let hash = 0\n\n for (let i = 0; i < namespace.length; i++) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i)\n hash |= 0 // Convert to 32bit integer\n }\n\n return colors[Math.abs(hash) % colors.length]\n}\n\nexport function createRegexFromEnvVar (names:string):RegExp[] {\n const split = names.split(/[\\s,]+/).filter(Boolean)\n const regexs = split\n .map(word => word.replace(/\\*/g, '.*?'))\n .map(r => new RegExp('^' + r + '$'))\n\n return regexs\n}\n\nexport type Debugger = {\n (...args: any[]): void;\n extend: (namespace: string) => Debugger;\n}\n\n/**\n * Use this to create a random namespace in the case that `debug`\n * is called without any arguments.\n * @param {number} length Lenght of the random string\n * @returns {string}\n */\nexport function generateRandomString (length = 6):string {\n return Math.random().toString(20).substring(2, length)\n}\n", "import { type Debugger } from './index.js'\n\nexport const noop:Debugger = function (_args:any[]) {}\nnoop.extend = function (_namespace:string) { return noop }\n\n", "/**\n * Maximally distinct colors selected for perceptual distance in CIELAB space.\n * Any two colors in this palette are visually distinguishable.\n */\nexport const colors = [\n '#e6194b', // red\n '#3cb44b', // green\n '#ffe119', // yellow\n '#4363d8', // blue\n '#f58231', // orange\n '#911eb4', // purple\n '#42d4f4', // cyan\n '#f032e6', // magenta\n '#bfef45', // lime\n '#fabed4', // pink\n '#469990', // teal\n '#dcbeff', // lavender\n '#9a6324', // brown\n '#fffac8', // beige\n '#800000', // maroon\n '#aaffc3', // mint\n '#808000', // olive\n '#ffd8b1', // apricot\n '#000075', // navy\n '#a9a9a9', // grey\n]\n"],
5
+ "mappings": "4j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AF,EAAO,UAAAZ,EAAW,UAAA0B,CAAU,EAKtDhB,EAAM,CAQL,GAPAA,EAAK,CAAC,GAAKgB,EAAY,KAAO,IAC1B1B,GACC0B,EAAY,MAAQ,KACrBhB,EAAK,CAAC,GACLgB,EAAY,MAAQ,KACrB,OAAM,EAAAC,SAASb,EAAM,CAAC,CAAC,EAEvB,CAACY,EAAW,OAEhB,IAAME,EAAI,UAAYhB,EACtBF,EAAK,OAAO,EAAG,EAAGkB,EAAG,gBAAgB,EAKrC,IAAIX,EAAQ,EACRY,EAAQ,EACZ,OAAAnB,EAAK,CAAC,EAAE,QAAQ,cAAeQ,GAAS,CAChCA,IAAU,OAGdD,IACIC,IAAU,OAGVW,EAAQZ,GAEhB,CAAC,EAEDP,EAAK,OAAOmB,EAAO,EAAGD,CAAC,EAEhBlB,CACX,CAtCSL,EAAAkB,EAAA,cAwCT,SAASzB,EAAaE,EAAmC,CACrD,GAAIA,IAAc,GAAO,OAAO8B,EAChC,IAAMnB,EAAW,OAAO,IAAI,IAAM,EAC5BC,EAAQmB,EACV,OAAO/B,GAAc,SAAWA,EAAYgC,EAAqB,EAAE,EACnEC,CACJ,EAGMhC,EAAgBD,IAAc,GAC9BkC,EAAkB,OAAOlC,GAAc,SAAWA,EAAY,MAE9DmC,EAAQ9B,EAAA,YAAaK,EAAY,CACnC,OAAOD,EACHyB,EACAxB,EACA,CAAE,SAAAC,EAAU,MAAAC,CAAM,EAClBX,CACJ,CACJ,EAPc,SASd,OAAAkC,EAAM,OAAS,SAAUC,EAA6B,CAClD,IAAMC,EAAoBH,EAAkB,IAAME,EAClD,OAAOtC,EAAYuC,CAAiB,CACxC,EAEOF,CACX,CA3BS9B,EAAAP,EAAA",
6
6
  "names": ["require_ms", "__commonJSMin", "exports", "module", "s", "m", "h", "d", "w", "y", "val", "options", "type", "parse", "fmtLong", "fmtShort", "str", "match", "n", "__name", "ms", "msAbs", "plural", "name", "isPlural", "import_ms", "coerce", "val", "__name", "selectColor", "namespace", "colors", "hash", "i", "createRegexFromEnvVar", "names", "word", "r", "generateRandomString", "length", "noop", "__name", "_args", "_namespace", "colors", "log", "browser_default", "createDebug", "isEnabled", "namespace", "forcedEnabled", "DEBUG", "createRegexFromEnvVar", "regex", "__name", "createFormatters", "v", "error", "logger", "args", "prevTime", "color", "curr", "diff", "coerce", "formatters", "index", "match", "format", "formatter", "val", "_args", "formatArgs", "shouldUseColors", "log", "useColors", "humanize", "c", "lastC", "noop", "selectColor", "generateRandomString", "colors", "actualNamespace", "debug", "extension", "extendedNamespace"]
7
7
  }
@@ -22,81 +22,45 @@ __export(util_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(util_exports);
24
24
  const colors = [
25
- "#0000CC",
26
- "#0000FF",
27
- "#0033CC",
28
- "#0033FF",
29
- "#0066CC",
30
- "#0066FF",
31
- "#0099CC",
32
- "#0099FF",
33
- "#00CC00",
34
- "#00CC33",
35
- "#00CC66",
36
- "#00CC99",
37
- "#00CCCC",
38
- "#00CCFF",
39
- "#3300CC",
40
- "#3300FF",
41
- "#3333CC",
42
- "#3333FF",
43
- "#3366CC",
44
- "#3366FF",
45
- "#3399CC",
46
- "#3399FF",
47
- "#33CC00",
48
- "#33CC33",
49
- "#33CC66",
50
- "#33CC99",
51
- "#33CCCC",
52
- "#33CCFF",
53
- "#6600CC",
54
- "#6600FF",
55
- "#6633CC",
56
- "#6633FF",
57
- "#66CC00",
58
- "#66CC33",
59
- "#9900CC",
60
- "#9900FF",
61
- "#9933CC",
62
- "#9933FF",
63
- "#99CC00",
64
- "#99CC33",
65
- "#CC0000",
66
- "#CC0033",
67
- "#CC0066",
68
- "#CC0099",
69
- "#CC00CC",
70
- "#CC00FF",
71
- "#CC3300",
72
- "#CC3333",
73
- "#CC3366",
74
- "#CC3399",
75
- "#CC33CC",
76
- "#CC33FF",
77
- "#CC6600",
78
- "#CC6633",
79
- "#CC9900",
80
- "#CC9933",
81
- "#CCCC00",
82
- "#CCCC33",
83
- "#FF0000",
84
- "#FF0033",
85
- "#FF0066",
86
- "#FF0099",
87
- "#FF00CC",
88
- "#FF00FF",
89
- "#FF3300",
90
- "#FF3333",
91
- "#FF3366",
92
- "#FF3399",
93
- "#FF33CC",
94
- "#FF33FF",
95
- "#FF6600",
96
- "#FF6633",
97
- "#FF9900",
98
- "#FF9933",
99
- "#FFCC00",
100
- "#FFCC33"
25
+ "#e6194b",
26
+ // red
27
+ "#3cb44b",
28
+ // green
29
+ "#ffe119",
30
+ // yellow
31
+ "#4363d8",
32
+ // blue
33
+ "#f58231",
34
+ // orange
35
+ "#911eb4",
36
+ // purple
37
+ "#42d4f4",
38
+ // cyan
39
+ "#f032e6",
40
+ // magenta
41
+ "#bfef45",
42
+ // lime
43
+ "#fabed4",
44
+ // pink
45
+ "#469990",
46
+ // teal
47
+ "#dcbeff",
48
+ // lavender
49
+ "#9a6324",
50
+ // brown
51
+ "#fffac8",
52
+ // beige
53
+ "#800000",
54
+ // maroon
55
+ "#aaffc3",
56
+ // mint
57
+ "#808000",
58
+ // olive
59
+ "#ffd8b1",
60
+ // apricot
61
+ "#000075",
62
+ // navy
63
+ "#a9a9a9"
64
+ // grey
101
65
  ];
102
66
  //# sourceMappingURL=util.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/browser/util.ts"],
4
- "sourcesContent": ["export const colors = [\n '#0000CC',\n '#0000FF',\n '#0033CC',\n '#0033FF',\n '#0066CC',\n '#0066FF',\n '#0099CC',\n '#0099FF',\n '#00CC00',\n '#00CC33',\n '#00CC66',\n '#00CC99',\n '#00CCCC',\n '#00CCFF',\n '#3300CC',\n '#3300FF',\n '#3333CC',\n '#3333FF',\n '#3366CC',\n '#3366FF',\n '#3399CC',\n '#3399FF',\n '#33CC00',\n '#33CC33',\n '#33CC66',\n '#33CC99',\n '#33CCCC',\n '#33CCFF',\n '#6600CC',\n '#6600FF',\n '#6633CC',\n '#6633FF',\n '#66CC00',\n '#66CC33',\n '#9900CC',\n '#9900FF',\n '#9933CC',\n '#9933FF',\n '#99CC00',\n '#99CC33',\n '#CC0000',\n '#CC0033',\n '#CC0066',\n '#CC0099',\n '#CC00CC',\n '#CC00FF',\n '#CC3300',\n '#CC3333',\n '#CC3366',\n '#CC3399',\n '#CC33CC',\n '#CC33FF',\n '#CC6600',\n '#CC6633',\n '#CC9900',\n '#CC9933',\n '#CCCC00',\n '#CCCC33',\n '#FF0000',\n '#FF0033',\n '#FF0066',\n '#FF0099',\n '#FF00CC',\n '#FF00FF',\n '#FF3300',\n '#FF3333',\n '#FF3366',\n '#FF3399',\n '#FF33CC',\n '#FF33FF',\n '#FF6600',\n '#FF6633',\n '#FF9900',\n '#FF9933',\n '#FFCC00',\n '#FFCC33'\n]\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,SAAS;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;",
4
+ "sourcesContent": ["/**\n * Maximally distinct colors selected for perceptual distance in CIELAB space.\n * Any two colors in this palette are visually distinguishable.\n */\nexport const colors = [\n '#e6194b', // red\n '#3cb44b', // green\n '#ffe119', // yellow\n '#4363d8', // blue\n '#f58231', // orange\n '#911eb4', // purple\n '#42d4f4', // cyan\n '#f032e6', // magenta\n '#bfef45', // lime\n '#fabed4', // pink\n '#469990', // teal\n '#dcbeff', // lavender\n '#9a6324', // brown\n '#fffac8', // beige\n '#800000', // maroon\n '#aaffc3', // mint\n '#808000', // olive\n '#ffd8b1', // apricot\n '#000075', // navy\n '#a9a9a9', // grey\n]\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,SAAS;AAAA,EAClB;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACJ;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,6 @@
1
+ /**
2
+ * Maximally distinct colors selected for perceptual distance in CIELAB space.
3
+ * Any two colors in this palette are visually distinguishable.
4
+ */
1
5
  export declare const colors: string[];
2
6
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/browser/util.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,UA6ElB,CAAA"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/browser/util.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,MAAM,UAqBlB,CAAA"}