@azuro-org/images-generator 1.2.0 → 1.3.1

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.
Files changed (92) hide show
  1. package/dist/index-82868da9.js +19637 -0
  2. package/dist/index.es.js +1 -4
  3. package/dist/templates/_template/index.d.ts +1 -1
  4. package/dist/templates/bet-nft/index.d.ts +1 -1
  5. package/dist/templates/bet-nft/index.html +0 -1
  6. package/dist/templates/bet-nft/index.js +1 -1
  7. package/dist/templates/bet-og/index.d.ts +1 -1
  8. package/dist/templates/bet-og/index.js +1 -1
  9. package/dist/templates/combo-bet-og/index.d.ts +1 -1
  10. package/dist/templates/combo-bet-og/index.js +1 -1
  11. package/dist/templates/freebet/index.d.ts +1 -1
  12. package/dist/templates/freebet/index.js +1 -1
  13. package/dist/templates/trendle-social/images/bg-business.png +0 -0
  14. package/dist/templates/trendle-social/images/bg-crypto.png +0 -0
  15. package/dist/templates/trendle-social/images/bg-culture.png +0 -0
  16. package/dist/templates/trendle-social/images/bg-fomo.png +0 -0
  17. package/dist/templates/trendle-social/images/bg-politics.png +0 -0
  18. package/dist/templates/trendle-social/images/business.png +0 -0
  19. package/dist/templates/trendle-social/images/crypto.png +0 -0
  20. package/dist/templates/trendle-social/images/culture.png +0 -0
  21. package/dist/templates/trendle-social/images/fomo.png +0 -0
  22. package/dist/templates/trendle-social/images/politics.png +0 -0
  23. package/dist/templates/trendle-social/images/stamp.png +0 -0
  24. package/dist/templates/trendle-social/index.d.ts +30 -0
  25. package/dist/templates/trendle-social/index.html +209 -0
  26. package/dist/templates/trendle-social/index.js +50 -0
  27. package/dist/templates/trendle-trading/images/arrow-down.png +0 -0
  28. package/dist/templates/trendle-trading/images/arrow-up.png +0 -0
  29. package/dist/templates/trendle-trading/images/bg.png +0 -0
  30. package/dist/templates/trendle-trading/images/crash.png +0 -0
  31. package/dist/templates/trendle-trading/images/drake.png +0 -0
  32. package/dist/templates/trendle-trading/images/elon.png +0 -0
  33. package/dist/templates/trendle-trading/images/lewis.png +0 -0
  34. package/dist/templates/trendle-trading/images/logo.png +0 -0
  35. package/dist/templates/trendle-trading/images/loss.png +0 -0
  36. package/dist/templates/trendle-trading/images/mark.png +0 -0
  37. package/dist/templates/trendle-trading/images/obama.png +0 -0
  38. package/dist/templates/trendle-trading/images/profit.png +0 -0
  39. package/dist/templates/trendle-trading/images/tramp.png +0 -0
  40. package/dist/templates/trendle-trading/index.d.ts +16 -0
  41. package/dist/templates/trendle-trading/index.html +249 -0
  42. package/dist/templates/trendle-trading/index.js +51 -0
  43. package/dist/utils/generateImage.d.ts +4 -8
  44. package/dist/utils/types.d.ts +2 -2
  45. package/lib/index-de0b52f4.js +19637 -0
  46. package/lib/index.js +1 -4
  47. package/lib/templates/_template/index.d.ts +1 -1
  48. package/lib/templates/bet-nft/index.d.ts +1 -1
  49. package/lib/templates/bet-nft/index.html +0 -1
  50. package/lib/templates/bet-nft/index.js +1 -1
  51. package/lib/templates/bet-og/index.d.ts +1 -1
  52. package/lib/templates/bet-og/index.js +2 -2
  53. package/lib/templates/combo-bet-og/index.d.ts +1 -1
  54. package/lib/templates/combo-bet-og/index.js +1 -1
  55. package/lib/templates/freebet/index.d.ts +1 -1
  56. package/lib/templates/freebet/index.js +1 -1
  57. package/lib/templates/trendle-social/images/bg-business.png +0 -0
  58. package/lib/templates/trendle-social/images/bg-crypto.png +0 -0
  59. package/lib/templates/trendle-social/images/bg-culture.png +0 -0
  60. package/lib/templates/trendle-social/images/bg-fomo.png +0 -0
  61. package/lib/templates/trendle-social/images/bg-politics.png +0 -0
  62. package/lib/templates/trendle-social/images/business.png +0 -0
  63. package/lib/templates/trendle-social/images/crypto.png +0 -0
  64. package/lib/templates/trendle-social/images/culture.png +0 -0
  65. package/lib/templates/trendle-social/images/fomo.png +0 -0
  66. package/lib/templates/trendle-social/images/politics.png +0 -0
  67. package/lib/templates/trendle-social/images/stamp.png +0 -0
  68. package/lib/templates/trendle-social/index.d.ts +30 -0
  69. package/lib/templates/trendle-social/index.html +209 -0
  70. package/lib/templates/trendle-social/index.js +50 -0
  71. package/lib/templates/trendle-trading/images/arrow-down.png +0 -0
  72. package/lib/templates/trendle-trading/images/arrow-up.png +0 -0
  73. package/lib/templates/trendle-trading/images/bg.png +0 -0
  74. package/lib/templates/trendle-trading/images/crash.png +0 -0
  75. package/lib/templates/trendle-trading/images/drake.png +0 -0
  76. package/lib/templates/trendle-trading/images/elon.png +0 -0
  77. package/lib/templates/trendle-trading/images/lewis.png +0 -0
  78. package/lib/templates/trendle-trading/images/logo.png +0 -0
  79. package/lib/templates/trendle-trading/images/loss.png +0 -0
  80. package/lib/templates/trendle-trading/images/mark.png +0 -0
  81. package/lib/templates/trendle-trading/images/obama.png +0 -0
  82. package/lib/templates/trendle-trading/images/profit.png +0 -0
  83. package/lib/templates/trendle-trading/images/tramp.png +0 -0
  84. package/lib/templates/trendle-trading/index.d.ts +16 -0
  85. package/lib/templates/trendle-trading/index.html +249 -0
  86. package/lib/templates/trendle-trading/index.js +51 -0
  87. package/lib/utils/generateImage.d.ts +4 -8
  88. package/lib/utils/types.d.ts +2 -2
  89. package/package.json +4 -3
  90. package/tsconfig.json +3 -0
  91. package/dist/index-cd3884c7.js +0 -4216
  92. package/lib/index-9642de53.js +0 -4216
package/lib/index.js CHANGED
@@ -123,12 +123,9 @@ function __generator(thisArg, body) {
123
123
  return [4 /*yield*/, page.close()];
124
124
  case 14:
125
125
  _d.sent();
126
- return [4 /*yield*/, browser.close()
127
- // @ts-ignore
128
- ];
126
+ return [4 /*yield*/, browser.close()];
129
127
  case 15:
130
128
  _d.sent();
131
- // @ts-ignore
132
129
  return [2 /*return*/, imageBuffer];
133
130
  case 16: return [2 /*return*/];
134
131
  }
@@ -1,4 +1,4 @@
1
1
  import { type Template } from '../../utils';
2
2
  export type Props = {};
3
- declare const template: Template;
3
+ declare const template: Template<Props>;
4
4
  export default template;
@@ -23,5 +23,5 @@ export type Props = {
23
23
  betOdds: string;
24
24
  currentOdds: string;
25
25
  };
26
- declare const template: Template;
26
+ declare const template: Template<Props>;
27
27
  export default template;
@@ -40,7 +40,6 @@
40
40
  flex: none;
41
41
  }
42
42
 
43
-
44
43
  .items-center {
45
44
  align-items: center;
46
45
  }
@@ -1,4 +1,4 @@
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 = {
1
+ 'use strict';var index=require('../../index-de0b52f4.js'),path=require('path');require('fs'),require('util'),require('stream'),require('http'),require('https'),require('url'),require('crypto'),require('assert'),require('tty'),require('zlib'),require('events');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',
@@ -11,5 +11,5 @@ export type Props = {
11
11
  startsAt: number;
12
12
  };
13
13
  };
14
- declare const template: Template;
14
+ declare const template: Template<Props>;
15
15
  export default template;
@@ -1,5 +1,5 @@
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
- !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}));
1
+ 'use strict';var index=require('../../index-de0b52f4.js'),path=require('path');require('fs'),require('util'),require('stream'),require('http'),require('https'),require('url'),require('crypto'),require('assert'),require('tty'),require('zlib'),require('events');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};var dayjs_min = {exports: {}};(function (module, exports) {
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
 
5
5
  var dayjs = dayjs_min.exports;var template = {
@@ -12,5 +12,5 @@ export type Props = {
12
12
  payout: string | number;
13
13
  }>;
14
14
  };
15
- declare const template: Template;
15
+ declare const template: Template<Props>;
16
16
  export default template;
@@ -1,4 +1,4 @@
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 = {
1
+ 'use strict';var index=require('../../index-de0b52f4.js'),path=require('path');require('fs'),require('util'),require('stream'),require('http'),require('https'),require('url'),require('crypto'),require('assert'),require('tty'),require('zlib'),require('events');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',
@@ -3,5 +3,5 @@ export type Props = {
3
3
  amount: string;
4
4
  date: string;
5
5
  };
6
- declare const template: Template;
6
+ declare const template: Template<Props>;
7
7
  export default template;
@@ -1,4 +1,4 @@
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 = {
1
+ 'use strict';var index=require('../../index-de0b52f4.js'),path=require('path');require('fs'),require('util'),require('stream'),require('http'),require('https'),require('url'),require('crypto'),require('assert'),require('tty'),require('zlib'),require('events');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',
@@ -0,0 +1,30 @@
1
+ import { type Template } from '../../utils';
2
+ declare const cardTypes: {
3
+ readonly business: {
4
+ readonly bottomImg: "images/business.png";
5
+ readonly bgImg: "images/bg-business.png";
6
+ };
7
+ readonly culture: {
8
+ readonly bottomImg: "images/culture.png";
9
+ readonly bgImg: "images/bg-culture.png";
10
+ };
11
+ readonly crypto: {
12
+ readonly bottomImg: "images/crypto.png";
13
+ readonly bgImg: "images/bg-crypto.png";
14
+ };
15
+ readonly politics: {
16
+ readonly bottomImg: "images/politics.png";
17
+ readonly bgImg: "images/bg-politics.png";
18
+ };
19
+ readonly fomo: {
20
+ readonly bottomImg: "images/fomo.png";
21
+ readonly bgImg: "images/bg-fomo.png";
22
+ };
23
+ };
24
+ export type Props = {
25
+ type: keyof typeof cardTypes;
26
+ avatarUrl: string;
27
+ username: string;
28
+ };
29
+ declare const template: Template<Props>;
30
+ export default template;
@@ -0,0 +1,209 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link href="https://fonts.googleapis.com/css2?family=Geist+Mono&family=Mona+Sans:ital,wght@75..125,700&display=swap" rel="stylesheet">
7
+ <style>
8
+ html {
9
+ font-family: 'Inter', sans-serif;
10
+ font-weight: 500;
11
+ }
12
+
13
+ html, body {
14
+ margin: 0;
15
+ width: fit-content;
16
+ }
17
+
18
+ .mona-sans {
19
+ font-family: "Mona Sans", sans-serif;
20
+ font-optical-sizing: auto;
21
+ font-style: normal;
22
+ }
23
+
24
+ .geist-mono {
25
+ font-family: "Geist Mono", sans-serif;
26
+ font-optical-sizing: auto;
27
+ font-weight: 400;
28
+ font-style: normal;
29
+ }
30
+
31
+ * {
32
+ box-sizing: border-box;
33
+ }
34
+
35
+ .flex {
36
+ display: flex;
37
+ }
38
+
39
+ .flex-wrap {
40
+ flex-wrap: wrap;
41
+ }
42
+
43
+ .flex-1 {
44
+ flex: 1 1 0;
45
+ }
46
+
47
+ .flex-auto {
48
+ flex: 1 1 auto;
49
+ }
50
+
51
+ .flex-none {
52
+ flex: none;
53
+ }
54
+
55
+ .items-center {
56
+ align-items: center;
57
+ }
58
+
59
+ .items-start {
60
+ align-items: flex-start;
61
+ }
62
+
63
+ .items-end {
64
+ align-items: flex-end;
65
+ }
66
+
67
+ .items-baseline {
68
+ align-items: baseline;
69
+ }
70
+
71
+ .items-stretch {
72
+ align-items: stretch;
73
+ }
74
+
75
+ .self-auto {
76
+ align-self: auto;
77
+ }
78
+
79
+ .self-start {
80
+ align-self: flex-start;
81
+ }
82
+
83
+ .self-end {
84
+ align-self: flex-end;
85
+ }
86
+
87
+ .self-center {
88
+ align-self: center;
89
+ }
90
+
91
+ .self-stretch {
92
+ align-self: stretch;
93
+ }
94
+
95
+ .justify-around {
96
+ justify-content: space-around;
97
+ }
98
+
99
+ .justify-between {
100
+ justify-content: space-between;
101
+ }
102
+
103
+ .justify-center {
104
+ justify-content: center;
105
+ }
106
+
107
+ .justify-start {
108
+ justify-content: flex-start;
109
+ }
110
+
111
+ .justify-end {
112
+ justify-content: flex-end;
113
+ }
114
+
115
+ .flex-row {
116
+ flex-direction: row;
117
+ }
118
+
119
+ .flex-col {
120
+ flex-direction: column;
121
+ }
122
+
123
+ .flex-col-reverse {
124
+ flex-direction: column-reverse;
125
+ }
126
+
127
+ .text-upper {
128
+ text-transform: uppercase;
129
+ }
130
+
131
+ .text-center {
132
+ text-align: center;
133
+ }
134
+
135
+ .card {
136
+ width: 850px;
137
+ height: 1060px;
138
+ padding-top: 260px;
139
+ position: relative;
140
+ }
141
+
142
+ .bg {
143
+ position: absolute;
144
+ mix-blend-mode: difference;
145
+ top: 0px;
146
+ left: 0px;
147
+ width: 100%;
148
+ height: 100%;
149
+ }
150
+
151
+ .bottom-img {
152
+ position: absolute;
153
+ mix-blend-mode: multiply;
154
+ bottom: 0px;
155
+ left: 0px;
156
+ width: 100%;
157
+ }
158
+
159
+ .avatar {
160
+ width: 300px;
161
+ height: 300px;
162
+ border-radius: 100%;
163
+ border: 3.5px solid white;
164
+ overflow: hidden;
165
+ margin: 40px auto 0;
166
+ position: relative;
167
+ z-index: 10;
168
+ }
169
+
170
+ .avatar > img {
171
+ width: 100%;
172
+ }
173
+
174
+ .username {
175
+ background-color: #111;
176
+ color: #fff;
177
+ padding: 8px 20px 13px;
178
+ margin: -14px auto 0;
179
+ width: fit-content;
180
+ position: relative;
181
+ z-index: 10;
182
+ font-size: 36px;
183
+ line-height: 100%;
184
+ font-weight: 400;
185
+ }
186
+
187
+ .stamp-img {
188
+ width: 240px;
189
+ height: 240px;
190
+ position: absolute;
191
+ top: 270px;
192
+ right: 140px;
193
+ z-index: 20;
194
+ }
195
+ </style>
196
+ </head>
197
+ <body>
198
+ <div class="card">
199
+ <img src="{bgImg}" alt="" class="bg">
200
+ <img src="{bottomImg}" alt="" class="bottom-img">
201
+ <img src="{titleImg}" alt="" class="title-img">
202
+ <div class="avatar flex items-center justify-center">
203
+ <img src="{avatar}" alt="">
204
+ </div>
205
+ <img src="{stampImg}" alt="" class="stamp-img">
206
+ <div class="username geist-mono">{username}</div>
207
+ </div>
208
+ </body>
209
+ </html>
@@ -0,0 +1,50 @@
1
+ 'use strict';var index=require('../../index-de0b52f4.js'),path=require('path');require('fs'),require('util'),require('stream'),require('http'),require('https'),require('url'),require('crypto'),require('assert'),require('tty'),require('zlib'),require('events');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var cardTypes = {
2
+ 'business': {
3
+ bottomImg: 'images/business.png',
4
+ bgImg: 'images/bg-business.png',
5
+ },
6
+ 'culture': {
7
+ bottomImg: 'images/culture.png',
8
+ bgImg: 'images/bg-culture.png',
9
+ },
10
+ 'crypto': {
11
+ bottomImg: 'images/crypto.png',
12
+ bgImg: 'images/bg-crypto.png',
13
+ },
14
+ 'politics': {
15
+ bottomImg: 'images/politics.png',
16
+ bgImg: 'images/bg-politics.png',
17
+ },
18
+ 'fomo': {
19
+ bottomImg: 'images/fomo.png',
20
+ bgImg: 'images/bg-fomo.png',
21
+ },
22
+ };
23
+ var template = {
24
+ width: 850,
25
+ height: 1060,
26
+ type: 'jpeg',
27
+ html: function (props) { return index._(void 0, void 0, void 0, function () {
28
+ var type, avatarUrl, username, _a, bottomImg, bgImg, html, stampImage, bottomImage, bgImage, avatarImage;
29
+ return index.a(this, function (_b) {
30
+ switch (_b.label) {
31
+ case 0:
32
+ type = props.type, avatarUrl = props.avatarUrl, username = props.username;
33
+ _a = cardTypes[type], bottomImg = _a.bottomImg, bgImg = _a.bgImg;
34
+ html = index.g(path__default["default"].join(__dirname, 'index.html'));
35
+ stampImage = index.b(path__default["default"].resolve(__dirname, 'images/stamp.png'));
36
+ bottomImage = index.b(path__default["default"].resolve(__dirname, bottomImg));
37
+ bgImage = index.b(path__default["default"].resolve(__dirname, bgImg));
38
+ return [4 /*yield*/, index.d(avatarUrl)];
39
+ case 1:
40
+ avatarImage = _b.sent();
41
+ return [2 /*return*/, html
42
+ .replace('{bgImg}', bgImage)
43
+ .replace('{bottomImg}', bottomImage)
44
+ .replace('{stampImg}', stampImage)
45
+ .replace('{avatar}', avatarImage)
46
+ .replace('{username}', username)];
47
+ }
48
+ });
49
+ }); }
50
+ };module.exports=template;
@@ -0,0 +1,16 @@
1
+ import { type Template } from '../../utils';
2
+ export type Props = {
3
+ type: 'obama' | 'drake' | 'crash' | 'tramp' | 'elon' | 'lewis' | 'mark';
4
+ trend: {
5
+ image: string;
6
+ title: string;
7
+ };
8
+ position: {
9
+ leverage: number;
10
+ isLong: boolean;
11
+ };
12
+ pnl: number;
13
+ referralUrl: string;
14
+ };
15
+ declare const template: Template<Props>;
16
+ export default template;