@azuro-org/images-generator 1.1.2 → 1.2.0

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.
@@ -1165,7 +1165,7 @@ function requireMs () {
1165
1165
  * @api public
1166
1166
  */
1167
1167
 
1168
- ms = function(val, options) {
1168
+ ms = function (val, options) {
1169
1169
  options = options || {};
1170
1170
  var type = typeof val;
1171
1171
  if (type === 'string' && val.length > 0) {
@@ -1476,24 +1476,62 @@ function requireCommon () {
1476
1476
  createDebug.names = [];
1477
1477
  createDebug.skips = [];
1478
1478
 
1479
- let i;
1480
- const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
1481
- const len = split.length;
1479
+ const split = (typeof namespaces === 'string' ? namespaces : '')
1480
+ .trim()
1481
+ .replace(' ', ',')
1482
+ .split(',')
1483
+ .filter(Boolean);
1482
1484
 
1483
- for (i = 0; i < len; i++) {
1484
- if (!split[i]) {
1485
- // ignore empty strings
1486
- continue;
1485
+ for (const ns of split) {
1486
+ if (ns[0] === '-') {
1487
+ createDebug.skips.push(ns.slice(1));
1488
+ } else {
1489
+ createDebug.names.push(ns);
1487
1490
  }
1491
+ }
1492
+ }
1488
1493
 
1489
- namespaces = split[i].replace(/\*/g, '.*?');
1490
-
1491
- if (namespaces[0] === '-') {
1492
- createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
1494
+ /**
1495
+ * Checks if the given string matches a namespace template, honoring
1496
+ * asterisks as wildcards.
1497
+ *
1498
+ * @param {String} search
1499
+ * @param {String} template
1500
+ * @return {Boolean}
1501
+ */
1502
+ function matchesTemplate(search, template) {
1503
+ let searchIndex = 0;
1504
+ let templateIndex = 0;
1505
+ let starIndex = -1;
1506
+ let matchIndex = 0;
1507
+
1508
+ while (searchIndex < search.length) {
1509
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
1510
+ // Match character or proceed with wildcard
1511
+ if (template[templateIndex] === '*') {
1512
+ starIndex = templateIndex;
1513
+ matchIndex = searchIndex;
1514
+ templateIndex++; // Skip the '*'
1515
+ } else {
1516
+ searchIndex++;
1517
+ templateIndex++;
1518
+ }
1519
+ } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
1520
+ // Backtrack to the last '*' and try to match more characters
1521
+ templateIndex = starIndex + 1;
1522
+ matchIndex++;
1523
+ searchIndex = matchIndex;
1493
1524
  } else {
1494
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
1525
+ return false; // No match
1495
1526
  }
1496
1527
  }
1528
+
1529
+ // Handle trailing '*' in template
1530
+ while (templateIndex < template.length && template[templateIndex] === '*') {
1531
+ templateIndex++;
1532
+ }
1533
+
1534
+ return templateIndex === template.length;
1497
1535
  }
1498
1536
 
1499
1537
  /**
@@ -1504,8 +1542,8 @@ function requireCommon () {
1504
1542
  */
1505
1543
  function disable() {
1506
1544
  const namespaces = [
1507
- ...createDebug.names.map(toNamespace),
1508
- ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
1545
+ ...createDebug.names,
1546
+ ...createDebug.skips.map(namespace => '-' + namespace)
1509
1547
  ].join(',');
1510
1548
  createDebug.enable('');
1511
1549
  return namespaces;
@@ -1519,21 +1557,14 @@ function requireCommon () {
1519
1557
  * @api public
1520
1558
  */
1521
1559
  function enabled(name) {
1522
- if (name[name.length - 1] === '*') {
1523
- return true;
1524
- }
1525
-
1526
- let i;
1527
- let len;
1528
-
1529
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
1530
- if (createDebug.skips[i].test(name)) {
1560
+ for (const skip of createDebug.skips) {
1561
+ if (matchesTemplate(name, skip)) {
1531
1562
  return false;
1532
1563
  }
1533
1564
  }
1534
1565
 
1535
- for (i = 0, len = createDebug.names.length; i < len; i++) {
1536
- if (createDebug.names[i].test(name)) {
1566
+ for (const ns of createDebug.names) {
1567
+ if (matchesTemplate(name, ns)) {
1537
1568
  return true;
1538
1569
  }
1539
1570
  }
@@ -1541,19 +1572,6 @@ function requireCommon () {
1541
1572
  return false;
1542
1573
  }
1543
1574
 
1544
- /**
1545
- * Convert regexp to namespace
1546
- *
1547
- * @param {RegExp} regxep
1548
- * @return {String} namespace
1549
- * @api private
1550
- */
1551
- function toNamespace(regexp) {
1552
- return regexp.toString()
1553
- .substring(2, regexp.toString().length - 2)
1554
- .replace(/\.\*\?$/, '*');
1555
- }
1556
-
1557
1575
  /**
1558
1576
  * Coerce `val`.
1559
1577
  *
@@ -1716,14 +1734,17 @@ function requireBrowser () {
1716
1734
  return false;
1717
1735
  }
1718
1736
 
1737
+ let m;
1738
+
1719
1739
  // Is webkit? http://stackoverflow.com/a/16459606/376773
1720
1740
  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
1741
+ // eslint-disable-next-line no-return-assign
1721
1742
  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
1722
1743
  // Is firebug? http://stackoverflow.com/a/398120/376773
1723
1744
  (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
1724
1745
  // Is firefox >= v31?
1725
1746
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
1726
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
1747
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
1727
1748
  // Double check webkit in userAgent just in case we are in a worker
1728
1749
  (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
1729
1750
  }
@@ -2206,11 +2227,11 @@ function requireNode () {
2206
2227
  }
2207
2228
 
2208
2229
  /**
2209
- * Invokes `util.format()` with the specified arguments and writes to stderr.
2230
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
2210
2231
  */
2211
2232
 
2212
2233
  function log(...args) {
2213
- return process.stderr.write(util.format(...args) + '\n');
2234
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
2214
2235
  }
2215
2236
 
2216
2237
  /**
@@ -1,4 +1,4 @@
1
- import {_ as __awaiter,a as __generator,d as downloadImage,g as getFile,b as getBase64Image}from'../../index-401c8546.js';import path from'path';import'fs';import'http';import'https';import'url';import'stream';import'assert';import'tty';import'util';import'os';import'zlib';var matchType = {
1
+ import {_ as __awaiter,a as __generator,d as downloadImage,g as getFile,b as getBase64Image}from'../../index-cd3884c7.js';import path from'path';import'fs';import'http';import'https';import'url';import'stream';import'assert';import'tty';import'util';import'os';import'zlib';var matchType = {
2
2
  'match': 'Waiting for match',
3
3
  'claim': 'Waiting for claim',
4
4
  'claimed': 'Claimed',
@@ -1,4 +1,4 @@
1
- import {c as commonjsGlobal,_ as __awaiter,a as __generator,g as getFile,b as getBase64Image}from'../../index-401c8546.js';import path from'path';import'fs';import'http';import'https';import'url';import'stream';import'assert';import'tty';import'util';import'os';import'zlib';var dayjs_min = {exports: {}};(function (module, exports) {
1
+ import {c as commonjsGlobal,_ as __awaiter,a as __generator,g as getFile,b as getBase64Image}from'../../index-cd3884c7.js';import path from'path';import'fs';import'http';import'https';import'url';import'stream';import'assert';import'tty';import'util';import'os';import'zlib';var dayjs_min = {exports: {}};(function (module, exports) {
2
2
  !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),l=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
3
3
  } (dayjs_min));
4
4
 
@@ -1,4 +1,4 @@
1
- import {_ as __awaiter,a as __generator,g as getFile,b as getBase64Image}from'../../index-401c8546.js';import path from'path';import'fs';import'http';import'https';import'url';import'stream';import'assert';import'tty';import'util';import'os';import'zlib';var template = {
1
+ import {_ as __awaiter,a as __generator,g as getFile,b as getBase64Image}from'../../index-cd3884c7.js';import path from'path';import'fs';import'http';import'https';import'url';import'stream';import'assert';import'tty';import'util';import'os';import'zlib';var template = {
2
2
  width: 600,
3
3
  height: 315,
4
4
  type: 'jpeg',
@@ -1,4 +1,4 @@
1
- import {_ as __awaiter,a as __generator,g as getFile,b as getBase64Image}from'../../index-401c8546.js';import path from'path';import'fs';import'http';import'https';import'url';import'stream';import'assert';import'tty';import'util';import'os';import'zlib';var template = {
1
+ import {_ as __awaiter,a as __generator,g as getFile,b as getBase64Image}from'../../index-cd3884c7.js';import path from'path';import'fs';import'http';import'https';import'url';import'stream';import'assert';import'tty';import'util';import'os';import'zlib';var template = {
2
2
  width: 416,
3
3
  height: 250,
4
4
  type: 'jpeg',
@@ -1165,7 +1165,7 @@ function requireMs () {
1165
1165
  * @api public
1166
1166
  */
1167
1167
 
1168
- ms = function(val, options) {
1168
+ ms = function (val, options) {
1169
1169
  options = options || {};
1170
1170
  var type = typeof val;
1171
1171
  if (type === 'string' && val.length > 0) {
@@ -1476,24 +1476,62 @@ function requireCommon () {
1476
1476
  createDebug.names = [];
1477
1477
  createDebug.skips = [];
1478
1478
 
1479
- let i;
1480
- const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
1481
- const len = split.length;
1479
+ const split = (typeof namespaces === 'string' ? namespaces : '')
1480
+ .trim()
1481
+ .replace(' ', ',')
1482
+ .split(',')
1483
+ .filter(Boolean);
1482
1484
 
1483
- for (i = 0; i < len; i++) {
1484
- if (!split[i]) {
1485
- // ignore empty strings
1486
- continue;
1485
+ for (const ns of split) {
1486
+ if (ns[0] === '-') {
1487
+ createDebug.skips.push(ns.slice(1));
1488
+ } else {
1489
+ createDebug.names.push(ns);
1487
1490
  }
1491
+ }
1492
+ }
1488
1493
 
1489
- namespaces = split[i].replace(/\*/g, '.*?');
1490
-
1491
- if (namespaces[0] === '-') {
1492
- createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
1494
+ /**
1495
+ * Checks if the given string matches a namespace template, honoring
1496
+ * asterisks as wildcards.
1497
+ *
1498
+ * @param {String} search
1499
+ * @param {String} template
1500
+ * @return {Boolean}
1501
+ */
1502
+ function matchesTemplate(search, template) {
1503
+ let searchIndex = 0;
1504
+ let templateIndex = 0;
1505
+ let starIndex = -1;
1506
+ let matchIndex = 0;
1507
+
1508
+ while (searchIndex < search.length) {
1509
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
1510
+ // Match character or proceed with wildcard
1511
+ if (template[templateIndex] === '*') {
1512
+ starIndex = templateIndex;
1513
+ matchIndex = searchIndex;
1514
+ templateIndex++; // Skip the '*'
1515
+ } else {
1516
+ searchIndex++;
1517
+ templateIndex++;
1518
+ }
1519
+ } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
1520
+ // Backtrack to the last '*' and try to match more characters
1521
+ templateIndex = starIndex + 1;
1522
+ matchIndex++;
1523
+ searchIndex = matchIndex;
1493
1524
  } else {
1494
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
1525
+ return false; // No match
1495
1526
  }
1496
1527
  }
1528
+
1529
+ // Handle trailing '*' in template
1530
+ while (templateIndex < template.length && template[templateIndex] === '*') {
1531
+ templateIndex++;
1532
+ }
1533
+
1534
+ return templateIndex === template.length;
1497
1535
  }
1498
1536
 
1499
1537
  /**
@@ -1504,8 +1542,8 @@ function requireCommon () {
1504
1542
  */
1505
1543
  function disable() {
1506
1544
  const namespaces = [
1507
- ...createDebug.names.map(toNamespace),
1508
- ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
1545
+ ...createDebug.names,
1546
+ ...createDebug.skips.map(namespace => '-' + namespace)
1509
1547
  ].join(',');
1510
1548
  createDebug.enable('');
1511
1549
  return namespaces;
@@ -1519,21 +1557,14 @@ function requireCommon () {
1519
1557
  * @api public
1520
1558
  */
1521
1559
  function enabled(name) {
1522
- if (name[name.length - 1] === '*') {
1523
- return true;
1524
- }
1525
-
1526
- let i;
1527
- let len;
1528
-
1529
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
1530
- if (createDebug.skips[i].test(name)) {
1560
+ for (const skip of createDebug.skips) {
1561
+ if (matchesTemplate(name, skip)) {
1531
1562
  return false;
1532
1563
  }
1533
1564
  }
1534
1565
 
1535
- for (i = 0, len = createDebug.names.length; i < len; i++) {
1536
- if (createDebug.names[i].test(name)) {
1566
+ for (const ns of createDebug.names) {
1567
+ if (matchesTemplate(name, ns)) {
1537
1568
  return true;
1538
1569
  }
1539
1570
  }
@@ -1541,19 +1572,6 @@ function requireCommon () {
1541
1572
  return false;
1542
1573
  }
1543
1574
 
1544
- /**
1545
- * Convert regexp to namespace
1546
- *
1547
- * @param {RegExp} regxep
1548
- * @return {String} namespace
1549
- * @api private
1550
- */
1551
- function toNamespace(regexp) {
1552
- return regexp.toString()
1553
- .substring(2, regexp.toString().length - 2)
1554
- .replace(/\.\*\?$/, '*');
1555
- }
1556
-
1557
1575
  /**
1558
1576
  * Coerce `val`.
1559
1577
  *
@@ -1716,14 +1734,17 @@ function requireBrowser () {
1716
1734
  return false;
1717
1735
  }
1718
1736
 
1737
+ let m;
1738
+
1719
1739
  // Is webkit? http://stackoverflow.com/a/16459606/376773
1720
1740
  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
1741
+ // eslint-disable-next-line no-return-assign
1721
1742
  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
1722
1743
  // Is firebug? http://stackoverflow.com/a/398120/376773
1723
1744
  (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
1724
1745
  // Is firefox >= v31?
1725
1746
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
1726
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
1747
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
1727
1748
  // Double check webkit in userAgent just in case we are in a worker
1728
1749
  (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
1729
1750
  }
@@ -2206,11 +2227,11 @@ function requireNode () {
2206
2227
  }
2207
2228
 
2208
2229
  /**
2209
- * Invokes `util.format()` with the specified arguments and writes to stderr.
2230
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
2210
2231
  */
2211
2232
 
2212
2233
  function log(...args) {
2213
- return process.stderr.write(util.format(...args) + '\n');
2234
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
2214
2235
  }
2215
2236
 
2216
2237
  /**
@@ -1,4 +1,4 @@
1
- 'use strict';var index=require('../../index-7f0cb09b.js'),path=require('path');require('fs'),require('http'),require('https'),require('url'),require('stream'),require('assert'),require('tty'),require('util'),require('os'),require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var matchType = {
1
+ 'use strict';var index=require('../../index-9642de53.js'),path=require('path');require('fs'),require('http'),require('https'),require('url'),require('stream'),require('assert'),require('tty'),require('util'),require('os'),require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var matchType = {
2
2
  'match': 'Waiting for match',
3
3
  'claim': 'Waiting for claim',
4
4
  'claimed': 'Claimed',
@@ -1,4 +1,4 @@
1
- 'use strict';var index=require('../../index-7f0cb09b.js'),path=require('path');require('fs'),require('http'),require('https'),require('url'),require('stream'),require('assert'),require('tty'),require('util'),require('os'),require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var dayjs_min = {exports: {}};(function (module, exports) {
1
+ 'use strict';var index=require('../../index-9642de53.js'),path=require('path');require('fs'),require('http'),require('https'),require('url'),require('stream'),require('assert'),require('tty'),require('util'),require('os'),require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var dayjs_min = {exports: {}};(function (module, exports) {
2
2
  !function(t,e){module.exports=e();}(index.c,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),l=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
3
3
  } (dayjs_min));
4
4
 
@@ -1,4 +1,4 @@
1
- 'use strict';var index=require('../../index-7f0cb09b.js'),path=require('path');require('fs'),require('http'),require('https'),require('url'),require('stream'),require('assert'),require('tty'),require('util'),require('os'),require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var template = {
1
+ 'use strict';var index=require('../../index-9642de53.js'),path=require('path');require('fs'),require('http'),require('https'),require('url'),require('stream'),require('assert'),require('tty'),require('util'),require('os'),require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var template = {
2
2
  width: 600,
3
3
  height: 315,
4
4
  type: 'jpeg',
@@ -1,4 +1,4 @@
1
- 'use strict';var index=require('../../index-7f0cb09b.js'),path=require('path');require('fs'),require('http'),require('https'),require('url'),require('stream'),require('assert'),require('tty'),require('util'),require('os'),require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var template = {
1
+ 'use strict';var index=require('../../index-9642de53.js'),path=require('path');require('fs'),require('http'),require('https'),require('url'),require('stream'),require('assert'),require('tty'),require('util'),require('os'),require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var template = {
2
2
  width: 416,
3
3
  height: 250,
4
4
  type: 'jpeg',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azuro-org/images-generator",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "license": "ISC",
5
5
  "engines": {
6
6
  "node": ">=16.15.1",
@@ -20,7 +20,7 @@
20
20
  "axios": "^0.26.1",
21
21
  "builtin-modules": "^3.2.0",
22
22
  "dayjs": "^1.11.7",
23
- "puppeteer": "^19.3.0"
23
+ "puppeteer": "^24.4.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@babel/core": "^7.17.0",