@sv-print/plugin-api-image 0.1.2 → 0.1.3

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/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var H=(r,x,e)=>new Promise((a,f)=>{var h=i=>{try{I(e.next(i))}catch(d){f(d)}},u=i=>{try{I(e.throw(i))}catch(d){f(d)}},I=i=>i.done?a(i.value):Promise.resolve(i.value).then(h,u);I((e=e.apply(r,x)).next())});const V=require("html-to-image");function X(r){if(r&&r.__esModule)return r;const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(x,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}return x.default=r,Object.freeze(x)}const $=X(V);function C(r,x){const e=R();return C=function(a,f){return a=a-474,e[a]},C(r,x)}(function(r,x){const e=C,a=r();for(;[];)try{if(parseInt(e(503))/1*(parseInt(e(504))/2)+parseInt(e(555))/3*(-parseInt(e(487))/4)+parseInt(e(535))/5+parseInt(e(526))/6*(-parseInt(e(521))/7)+-parseInt(e(475))/8*(parseInt(e(505))/9)+-parseInt(e(490))/10+-parseInt(e(493))/11*(-parseInt(e(559))/12)===x)break;a.push(a.shift())}catch(f){a.push(a.shift())}})(R,816052);function R(){const r=["position:fixed","then","hinnn","toLowerCase","click","loadAllImages","indexOf","appendChild","jpeg","removeTempContainer","run","html","3441704qtnwHN",".jpg","limit","pop","length","6XyoQTM","includes","end","start","queue","baseURI","http","replace","style","1106880KqPUKf","drawImage","width","onProgress","jpg","height","toImage percent: ","toType","IMG","floor","toDataURL","image/jpeg","clear","download","error","quality","getTempContainer","printPanels","gif","css","361308RsofXq","getHtml","Deferred","ceil","39956604WryTHN","add","log","setAttribute","isDownload","blob","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","2342960qOtRWn","base64","src","display","bmp","forEach","name","tagName","createElement","getContext","extend","svg","40ZTyEhO","clearRect","resolve","5600870NYRqPE","none","push","11IUEizV","devicePixelRatio","url","onload","total","canvas","remove","find","svg2canvas","download.jpg","38PHPcee","5622CHoDSb","18PuPaoM",".hiprint-printPanel .hiprint-printPaper","split","imageSmoothingEnabled"];return R=function(){return r},R()}const B=function(r,x){return H(this,null,function*(){const e=C;let a=this,f=globalThis.$[e(557)](),h=!![],u=10,I=(i,d)=>{const b=e,y=Math[b(544)](i/d*100);console.log("cur",i,b(497),d),console[b(561)](b(541),y+"%")};if(this[e(552)][e(525)]){let i=globalThis.$[e(485)]({filter:t=>{const n=e;return t[n(482)]!=n(543)||t.tagName==n(543)&&([n(539),n(517),"png",n(553),n(479),"webp",n(486)][n(527)](t[n(477)][n(507)](".").pop()[n(512)]())||t[n(477)]!=t[n(531)]||t.src.indexOf(n(532))>-1&&t[n(477)]!=t[n(531)]||t[n(477)][n(515)](n(476))>-1)},backgroundColor:"#fff"},x||{}),d=yield this[e(556)](r,x);x&&x[e(563)]!=null&&(h=x.isDownload),x&&x[e(538)]!=null&&(I=x[e(538)]),x&&x[e(523)]!=null&&(u=x.limit),globalThis.$(d).css(e(537),"")[e(554)](e(540),""),this.createTempContainer();let b=this[e(551)]();this[e(501)](d,i),b[e(520)](d[0]);let y=b[e(500)](e(506)).length;globalThis.$(d)[e(554)](e(509)),this[e(514)](d,function(){const t=e;try{let n=[],A=Math[t(558)](y/u),L=y%u;const p=document.createElement(t(498)),k=p.getContext("2d"),E=b[t(537)]()*(i.pixelRatio||globalThis[t(494)]);for(let v=0;v<A;v++){k[t(488)](0,0,p[t(537)],p.height);const j=v==A-1;let S=0,N=j?L:u;for(let g=0;g<N;g++){k.clearRect(0,0,p.width,p[t(540)]);const c=v*u+g,w=b[t(500)](t(506))[c];globalThis.hinnn.queue[t(560)](function(q){const T=t;$.toCanvas(w,i)[T(510)](function(_){const s=T;let m=_[s(484)]("2d");m[s(508)]=![];let P=_[s(545)](s(546),i[s(550)]||.92),o=new Image;o[s(477)]=P,o[s(496)]=function(){const l=s;g===0&&(p[l(537)]=E,p[l(540)]=o[l(540)]*N),S+=o[l(540)],k[l(536)](o,0,S-o[l(540)],E,o[l(540)]),I(c+1,y),q()}})})}globalThis[t(511)][t(530)][t(560)](function(g){const c=t;let w=i.type||c(546),q=i[c(542)]||"url",T=i.quality||.8;if(h){let _=p.toDataURL(w,T),s=new Image;s[c(477)]=_,s[c(496)]=function(){const m=c;n[m(492)]({url:_,start:v*u+1,end:v*u+N}),j&&(globalThis[m(511)].queue.clear(),a[m(518)](),n[m(480)](P=>{const o=m;let l=document[o(483)]("a"),O=x[o(481)]||o(502);O.indexOf(".")==-1&&(O+=o(522));let U=O[o(507)](".")[o(524)](),z=O[o(533)]("."+U,"")+"_"+P[o(529)]+"-"+P[o(528)]+"."+U;l[o(534)][o(478)]=o(491),l.setAttribute(o(548),z),l[o(562)]("href",P[o(495)]),document.body[o(516)](l),l[o(513)](),l[o(499)]()})),g()};return}if(q==c(495)){n.push(p.toDataURL(w,T)),j&&(globalThis[c(511)][c(530)][c(547)](),a[c(518)](),f[c(489)](n)),g();return}q==c(564)&&p.toBlob(function(_){const s=c;n[s(492)](_),j&&(globalThis[s(511)].queue[s(547)](),a[s(518)](),f[s(489)](n)),g()},w,T)})}globalThis.hinnn[t(530)][t(519)]()}catch(n){console[t(549)](t(474)),console[t(561)](n)}})}return f.promise()})};(function(r,x){for(var e=M,a=r();[];)try{var f=-parseInt(e(334))/1+-parseInt(e(331))/2*(-parseInt(e(344))/3)+-parseInt(e(338))/4*(parseInt(e(341))/5)+-parseInt(e(332))/6*(-parseInt(e(337))/7)+-parseInt(e(339))/8+-parseInt(e(335))/9+parseInt(e(330))/10*(parseInt(e(336))/11);if(f===x)break;a.push(a.shift())}catch(h){a.push(a.shift())}})(D,181429);function D(){var r=["1295808WtNBbn","add toImage Api","123315SiaLiG","newPrintTemplate","add toImage Api to PrintTemplate","9YVzMTT","10MvYIXj","220664DaJysg","376422ksOobN","0.3.0","53520SAQUct","1388907VBMmzC","3903009xpjZvF","7ssnXvg","32FfDhfS"];return D=function(){return r},D()}function M(r,x){var e=D();return M=function(a,f){a=a-330;var h=e[a];return h},M(r,x)}function W(r){var x=M;return{name:x(340),description:"add toImage Api",hooks:[{hook:x(342),name:x(343),description:x(343),priority:1,run:({template:e,options:a})=>{Object.defineProperty(e,"toImage",{value:B,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:x(333)}}module.exports=W;
1
+ "use strict";var E=(c,x,e)=>new Promise((a,s)=>{var h=i=>{try{v(e.next(i))}catch(p){s(p)}},b=i=>{try{v(e.throw(i))}catch(p){s(p)}},v=i=>i.done?a(i.value):Promise.resolve(i.value).then(h,b);v((e=e.apply(c,x)).next())});const J=require("html-to-image");function L(c){if(c&&c.__esModule)return c;const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const e in c)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(c,e);Object.defineProperty(x,e,a.get?a:{enumerable:!0,get:()=>c[e]})}}return x.default=c,Object.freeze(x)}const N=L(J);(function(c,x){const e=P,a=c();for(;[];)try{if(parseInt(e(256))/1*(-parseInt(e(251))/2)+parseInt(e(202))/3+-parseInt(e(240))/4*(-parseInt(e(262))/5)+-parseInt(e(249))/6+-parseInt(e(257))/7*(parseInt(e(265))/8)+parseInt(e(214))/9+parseInt(e(209))/10*(-parseInt(e(266))/11)===x)break;a.push(a.shift())}catch(s){a.push(a.shift())}})(O,895242);function P(c,x){const e=O();return P=function(a,s){return a=a-198,e[a]},P(c,x)}function O(){const c=["devicePixelRatio","pop","none","add","download.jpg","clear","hinnn","loadAllImages","gif","blob","getHtml","bmp","drawImage","getContext","width","png","log","end","toType","2140296JIAPBS","limit","svg","appendChild","start",".jpg","run","80HKLNvz","clearRect","toBlob","floor","toLowerCase","14153616tpUZDS","css","then","base64","isDownload","extend","promise","onProgress","indexOf","createElement",".hiprint-printPanel .hiprint-printPaper","printPanels","resolve","cur","queue","removeTempContainer","length","push","html","height","name","webp","onload","quality","#fff","baseURI","4mSGYjc","IMG","toCanvas","createTempContainer","canvas","svg2canvas","ceil","replace","imageSmoothingEnabled","3318840FwheCH","toDataURL","2enrpHW","display","http","tagName","remove","221627spbDRI","238pIEAXC","jpeg","includes","click","pixelRatio","2667735awVlxc","total","src","199624IHMSBy","414139JwxQRn","type","image/jpeg","url","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): "];return O=function(){return c},O()}const Q=function(c,x){return E(this,null,function*(){const e=P;let a=this,s=globalThis.$.Deferred(),h=!![],b=10,v=(i,p)=>{const f=P,T=Math[f(212)](i/p*100);console[f(199)](f(227),i,f(263),p),console[f(199)]("toImage percent: ",T+"%")};if(this[e(225)][e(230)]){let i=globalThis.$[e(219)]({filter:t=>{const n=e;return t[n(254)]!=n(241)||t[n(254)]=="IMG"&&(["jpg",n(258),n(198),n(279),n(282),n(235),n(204)][n(259)](t[n(264)].split(".")[n(272)]()[n(213)]())||t[n(264)]!=t.baseURI||t[n(264)][n(222)](n(253))>-1&&t.src!=t[n(239)]||t[n(264)][n(222)](n(217))>-1)},backgroundColor:e(238)},x||{}),p=yield this[e(281)](c,x);x&&x[e(218)]!=null&&(h=x[e(218)]),x&&x.onProgress!=null&&(v=x[e(221)]),x&&x[e(203)]!=null&&(b=x[e(203)]),globalThis.$(p)[e(215)]("width","")[e(215)](e(233),""),this[e(243)]();let f=this.getTempContainer();this[e(245)](p,i),f[e(232)](p[0]);let T=f.find(e(224))[e(230)];globalThis.$(p)[e(215)]("position:fixed"),this[e(278)](p,function(){const t=e;try{let n=[],H=Math[t(246)](T/b),$=T%b||1;const u=document[t(223)](t(244)),S=u[t(284)]("2d"),U=f.width()*(i[t(261)]||globalThis[t(271)]);for(let w=0;w<H;w++){S[t(210)](0,0,u.width,u.height);const C=w==H-1;let q=0,D=C?$:b;for(let g=0;g<D;g++){S.clearRect(0,0,u[t(285)],u[t(233)]);const r=w*b+g,y=f.find(t(224))[r];globalThis[t(277)][t(228)][t(274)](function(R){const _=t;N[_(242)](y,i)[_(216)](function(m){const l=_;let I=m[l(284)]("2d");I[l(248)]=![];let j=m[l(250)](l(268),i.quality||.92),o=new Image;o[l(264)]=j,o[l(236)]=function(){const d=l;g===0&&(u[d(285)]=U,u[d(233)]=o[d(233)]*D),q+=o.height,S[d(283)](o,0,q-o[d(233)],U,o[d(233)]),v(r+1,T),R()}})})}globalThis.hinnn[t(228)][t(274)](function(g){const r=t;let y=i[r(267)]||r(268),R=i[r(201)]||r(269),_=i[r(237)]||.8;if(h){let m=u[r(250)](y,_),l=new Image;l[r(264)]=m,l[r(236)]=function(){const I=r;n[I(231)]({url:m,start:w*b+1,end:w*b+D}),C&&(globalThis[I(277)][I(228)][I(276)](),a.removeTempContainer(),n.forEach(j=>{const o=I;let d=document[o(223)]("a"),A=x[o(234)]||o(275);A[o(222)](".")==-1&&(A+=o(207));let G=A.split(".").pop(),B=A[o(247)]("."+G,"")+"_"+j[o(206)]+"-"+j[o(200)]+"."+G;d.style[o(252)]=o(273),d.setAttribute("download",B),d.setAttribute("href",j[o(269)]),document.body[o(205)](d),d[o(260)](),d[o(255)]()})),g()};return}if(R=="url"){n.push(u[r(250)](y,_)),C&&(globalThis[r(277)][r(228)].clear(),a[r(229)](),s[r(226)](n)),g();return}R==r(280)&&u[r(211)](function(m){const l=r;n.push(m),C&&(globalThis.hinnn[l(228)].clear(),a[l(229)](),s[l(226)](n)),g()},y,_)})}globalThis[t(277)][t(228)][t(208)]()}catch(n){console.error(t(270)),console[t(199)](n)}})}return s[e(220)]()})};function k(){var c=["defineProperty","154908jgjsRx","27WstqnP","newPrintTemplate","363625tshdTi","add toImage Api","9gphsIY","1161755vwfrIX","1449328biOYGf","2199246sJUgcZ","167046aGRQjC","toImage","add toImage Api to PrintTemplate","45538AUpZQg"];return k=function(){return c},k()}(function(c,x){for(var e=M,a=c();[];)try{var s=-parseInt(e(415))/1+-parseInt(e(410))/2*(parseInt(e(417))/3)+parseInt(e(412))/4+-parseInt(e(404))/5+-parseInt(e(407))/6+parseInt(e(406))/7+-parseInt(e(405))/8*(-parseInt(e(413))/9);if(s===x)break;a.push(a.shift())}catch(h){a.push(a.shift())}})(k,204279);function M(c,x){var e=k();return M=function(a,s){a=a-404;var h=e[a];return h},M(c,x)}function Y(c){var x=M;return{name:"add toImage Api",description:x(416),hooks:[{hook:x(414),name:x(409),description:x(409),priority:1,run:({template:e,options:a})=>{var s=x;Object[s(411)](e,s(408),{value:Q,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:"0.3.0"}}module.exports=Y;
package/dist/index.mjs CHANGED
@@ -1,152 +1,153 @@
1
- var L = (s, n, x) => new Promise((o, f) => {
2
- var h = (r) => {
1
+ var $ = (i, n, x) => new Promise((a, s) => {
2
+ var b = (r) => {
3
3
  try {
4
- I(x.next(r));
5
- } catch (d) {
6
- f(d);
4
+ v(x.next(r));
5
+ } catch (p) {
6
+ s(p);
7
7
  }
8
8
  }, u = (r) => {
9
9
  try {
10
- I(x.throw(r));
11
- } catch (d) {
12
- f(d);
10
+ v(x.throw(r));
11
+ } catch (p) {
12
+ s(p);
13
13
  }
14
- }, I = (r) => r.done ? o(r.value) : Promise.resolve(r.value).then(h, u);
15
- I((x = x.apply(s, n)).next());
14
+ }, v = (r) => r.done ? a(r.value) : Promise.resolve(r.value).then(b, u);
15
+ v((x = x.apply(i, n)).next());
16
16
  });
17
- import * as X from "html-to-image";
18
- function D(s, n) {
19
- const x = j();
20
- return D = function(o, f) {
21
- return o = o - 474, x[o];
22
- }, D(s, n);
23
- }
24
- (function(s, n) {
25
- const x = D, o = s();
17
+ import * as L from "html-to-image";
18
+ (function(i, n) {
19
+ const x = P, a = i();
26
20
  for (; []; )
27
21
  try {
28
- if (parseInt(x(503)) / 1 * (parseInt(x(504)) / 2) + parseInt(x(555)) / 3 * (-parseInt(x(487)) / 4) + parseInt(x(535)) / 5 + parseInt(x(526)) / 6 * (-parseInt(x(521)) / 7) + -parseInt(x(475)) / 8 * (parseInt(x(505)) / 9) + -parseInt(x(490)) / 10 + -parseInt(x(493)) / 11 * (-parseInt(x(559)) / 12) === n)
22
+ if (parseInt(x(256)) / 1 * (-parseInt(x(251)) / 2) + parseInt(x(202)) / 3 + -parseInt(x(240)) / 4 * (-parseInt(x(262)) / 5) + -parseInt(x(249)) / 6 + -parseInt(x(257)) / 7 * (parseInt(x(265)) / 8) + parseInt(x(214)) / 9 + parseInt(x(209)) / 10 * (-parseInt(x(266)) / 11) === n)
29
23
  break;
30
- o.push(o.shift());
31
- } catch (f) {
32
- o.push(o.shift());
24
+ a.push(a.shift());
25
+ } catch (s) {
26
+ a.push(a.shift());
33
27
  }
34
- })(j, 816052);
35
- function j() {
36
- const s = ["position:fixed", "then", "hinnn", "toLowerCase", "click", "loadAllImages", "indexOf", "appendChild", "jpeg", "removeTempContainer", "run", "html", "3441704qtnwHN", ".jpg", "limit", "pop", "length", "6XyoQTM", "includes", "end", "start", "queue", "baseURI", "http", "replace", "style", "1106880KqPUKf", "drawImage", "width", "onProgress", "jpg", "height", "toImage percent: ", "toType", "IMG", "floor", "toDataURL", "image/jpeg", "clear", "download", "error", "quality", "getTempContainer", "printPanels", "gif", "css", "361308RsofXq", "getHtml", "Deferred", "ceil", "39956604WryTHN", "add", "log", "setAttribute", "isDownload", "blob", "toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ", "2342960qOtRWn", "base64", "src", "display", "bmp", "forEach", "name", "tagName", "createElement", "getContext", "extend", "svg", "40ZTyEhO", "clearRect", "resolve", "5600870NYRqPE", "none", "push", "11IUEizV", "devicePixelRatio", "url", "onload", "total", "canvas", "remove", "find", "svg2canvas", "download.jpg", "38PHPcee", "5622CHoDSb", "18PuPaoM", ".hiprint-printPanel .hiprint-printPaper", "split", "imageSmoothingEnabled"];
37
- return j = function() {
38
- return s;
39
- }, j();
28
+ })(k, 895242);
29
+ function P(i, n) {
30
+ const x = k();
31
+ return P = function(a, s) {
32
+ return a = a - 198, x[a];
33
+ }, P(i, n);
34
+ }
35
+ function k() {
36
+ const i = ["devicePixelRatio", "pop", "none", "add", "download.jpg", "clear", "hinnn", "loadAllImages", "gif", "blob", "getHtml", "bmp", "drawImage", "getContext", "width", "png", "log", "end", "toType", "2140296JIAPBS", "limit", "svg", "appendChild", "start", ".jpg", "run", "80HKLNvz", "clearRect", "toBlob", "floor", "toLowerCase", "14153616tpUZDS", "css", "then", "base64", "isDownload", "extend", "promise", "onProgress", "indexOf", "createElement", ".hiprint-printPanel .hiprint-printPaper", "printPanels", "resolve", "cur", "queue", "removeTempContainer", "length", "push", "html", "height", "name", "webp", "onload", "quality", "#fff", "baseURI", "4mSGYjc", "IMG", "toCanvas", "createTempContainer", "canvas", "svg2canvas", "ceil", "replace", "imageSmoothingEnabled", "3318840FwheCH", "toDataURL", "2enrpHW", "display", "http", "tagName", "remove", "221627spbDRI", "238pIEAXC", "jpeg", "includes", "click", "pixelRatio", "2667735awVlxc", "total", "src", "199624IHMSBy", "414139JwxQRn", "type", "image/jpeg", "url", "toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): "];
37
+ return k = function() {
38
+ return i;
39
+ }, k();
40
40
  }
41
- const $ = function(s, n) {
42
- return L(this, null, function* () {
43
- const x = D;
44
- let o = this, f = globalThis.$[x(557)](), h = !![], u = 10, I = (r, d) => {
45
- const b = x, w = Math[b(544)](r / d * 100);
46
- console.log("cur", r, b(497), d), console[b(561)](b(541), w + "%");
41
+ const O = function(i, n) {
42
+ return $(this, null, function* () {
43
+ const x = P;
44
+ let a = this, s = globalThis.$.Deferred(), b = !![], u = 10, v = (r, p) => {
45
+ const f = P, T = Math[f(212)](r / p * 100);
46
+ console[f(199)](f(227), r, f(263), p), console[f(199)]("toImage percent: ", T + "%");
47
47
  };
48
- if (this[x(552)][x(525)]) {
49
- let r = globalThis.$[x(485)]({ filter: (e) => {
48
+ if (this[x(225)][x(230)]) {
49
+ let r = globalThis.$[x(219)]({ filter: (e) => {
50
50
  const t = x;
51
- return e[t(482)] != t(543) || e.tagName == t(543) && ([t(539), t(517), "png", t(553), t(479), "webp", t(486)][t(527)](e[t(477)][t(507)](".").pop()[t(512)]()) || e[t(477)] != e[t(531)] || e.src.indexOf(t(532)) > -1 && e[t(477)] != e[t(531)] || e[t(477)][t(515)](t(476)) > -1);
52
- }, backgroundColor: "#fff" }, n || {}), d = yield this[x(556)](s, n);
53
- n && n[x(563)] != null && (h = n.isDownload), n && n[x(538)] != null && (I = n[x(538)]), n && n[x(523)] != null && (u = n.limit), globalThis.$(d).css(x(537), "")[x(554)](x(540), ""), this.createTempContainer();
54
- let b = this[x(551)]();
55
- this[x(501)](d, r), b[x(520)](d[0]);
56
- let w = b[x(500)](x(506)).length;
57
- globalThis.$(d)[x(554)](x(509)), this[x(514)](d, function() {
51
+ return e[t(254)] != t(241) || e[t(254)] == "IMG" && (["jpg", t(258), t(198), t(279), t(282), t(235), t(204)][t(259)](e[t(264)].split(".")[t(272)]()[t(213)]()) || e[t(264)] != e.baseURI || e[t(264)][t(222)](t(253)) > -1 && e.src != e[t(239)] || e[t(264)][t(222)](t(217)) > -1);
52
+ }, backgroundColor: x(238) }, n || {}), p = yield this[x(281)](i, n);
53
+ n && n[x(218)] != null && (b = n[x(218)]), n && n.onProgress != null && (v = n[x(221)]), n && n[x(203)] != null && (u = n[x(203)]), globalThis.$(p)[x(215)]("width", "")[x(215)](x(233), ""), this[x(243)]();
54
+ let f = this.getTempContainer();
55
+ this[x(245)](p, r), f[x(232)](p[0]);
56
+ let T = f.find(x(224))[x(230)];
57
+ globalThis.$(p)[x(215)]("position:fixed"), this[x(278)](p, function() {
58
58
  const e = x;
59
59
  try {
60
- let t = [], N = Math[e(558)](w / u), S = w % u;
61
- const p = document.createElement(e(498)), A = p.getContext("2d"), O = b[e(537)]() * (r.pixelRatio || globalThis[e(494)]);
62
- for (let v = 0; v < N; v++) {
63
- A[e(488)](0, 0, p[e(537)], p.height);
64
- const q = v == N - 1;
65
- let U = 0, E = q ? S : u;
66
- for (let g = 0; g < E; g++) {
67
- A.clearRect(0, 0, p.width, p[e(540)]);
68
- const c = v * u + g, y = b[e(500)](e(506))[c];
69
- globalThis.hinnn.queue[e(560)](function(C) {
70
- const T = e;
71
- X.toCanvas(y, r)[T(510)](function(_) {
72
- const i = T;
73
- let m = _[i(484)]("2d");
74
- m[i(508)] = ![];
75
- let P = _[i(545)](i(546), r[i(550)] || 0.92), a = new Image();
76
- a[i(477)] = P, a[i(496)] = function() {
77
- const l = i;
78
- g === 0 && (p[l(537)] = O, p[l(540)] = a[l(540)] * E), U += a[l(540)], A[l(536)](a, 0, U - a[l(540)], O, a[l(540)]), I(c + 1, w), C();
60
+ let t = [], M = Math[e(246)](T / u), B = T % u || 1;
61
+ const h = document[e(223)](e(244)), D = h[e(284)]("2d"), S = f.width() * (r[e(261)] || globalThis[e(271)]);
62
+ for (let w = 0; w < M; w++) {
63
+ D[e(210)](0, 0, h.width, h.height);
64
+ const R = w == M - 1;
65
+ let q = 0, G = R ? B : u;
66
+ for (let g = 0; g < G; g++) {
67
+ D.clearRect(0, 0, h[e(285)], h[e(233)]);
68
+ const c = w * u + g, y = f.find(e(224))[c];
69
+ globalThis[e(277)][e(228)][e(274)](function(j) {
70
+ const _ = e;
71
+ L[_(242)](y, r)[_(216)](function(m) {
72
+ const d = _;
73
+ let I = m[d(284)]("2d");
74
+ I[d(248)] = ![];
75
+ let C = m[d(250)](d(268), r.quality || 0.92), o = new Image();
76
+ o[d(264)] = C, o[d(236)] = function() {
77
+ const l = d;
78
+ g === 0 && (h[l(285)] = S, h[l(233)] = o[l(233)] * G), q += o.height, D[l(283)](o, 0, q - o[l(233)], S, o[l(233)]), v(c + 1, T), j();
79
79
  };
80
80
  });
81
81
  });
82
82
  }
83
- globalThis[e(511)][e(530)][e(560)](function(g) {
83
+ globalThis.hinnn[e(228)][e(274)](function(g) {
84
84
  const c = e;
85
- let y = r.type || c(546), C = r[c(542)] || "url", T = r.quality || 0.8;
86
- if (h) {
87
- let _ = p.toDataURL(y, T), i = new Image();
88
- i[c(477)] = _, i[c(496)] = function() {
89
- const m = c;
90
- t[m(492)]({ url: _, start: v * u + 1, end: v * u + E }), q && (globalThis[m(511)].queue.clear(), o[m(518)](), t[m(480)]((P) => {
91
- const a = m;
92
- let l = document[a(483)]("a"), R = n[a(481)] || a(502);
93
- R.indexOf(".") == -1 && (R += a(522));
94
- let H = R[a(507)](".")[a(524)](), V = R[a(533)]("." + H, "") + "_" + P[a(529)] + "-" + P[a(528)] + "." + H;
95
- l[a(534)][a(478)] = a(491), l.setAttribute(a(548), V), l[a(562)]("href", P[a(495)]), document.body[a(516)](l), l[a(513)](), l[a(499)]();
85
+ let y = r[c(267)] || c(268), j = r[c(201)] || c(269), _ = r[c(237)] || 0.8;
86
+ if (b) {
87
+ let m = h[c(250)](y, _), d = new Image();
88
+ d[c(264)] = m, d[c(236)] = function() {
89
+ const I = c;
90
+ t[I(231)]({ url: m, start: w * u + 1, end: w * u + G }), R && (globalThis[I(277)][I(228)][I(276)](), a.removeTempContainer(), t.forEach((C) => {
91
+ const o = I;
92
+ let l = document[o(223)]("a"), A = n[o(234)] || o(275);
93
+ A[o(222)](".") == -1 && (A += o(207));
94
+ let E = A.split(".").pop(), J = A[o(247)]("." + E, "") + "_" + C[o(206)] + "-" + C[o(200)] + "." + E;
95
+ l.style[o(252)] = o(273), l.setAttribute("download", J), l.setAttribute("href", C[o(269)]), document.body[o(205)](l), l[o(260)](), l[o(255)]();
96
96
  })), g();
97
97
  };
98
98
  return;
99
99
  }
100
- if (C == c(495)) {
101
- t.push(p.toDataURL(y, T)), q && (globalThis[c(511)][c(530)][c(547)](), o[c(518)](), f[c(489)](t)), g();
100
+ if (j == "url") {
101
+ t.push(h[c(250)](y, _)), R && (globalThis[c(277)][c(228)].clear(), a[c(229)](), s[c(226)](t)), g();
102
102
  return;
103
103
  }
104
- C == c(564) && p.toBlob(function(_) {
105
- const i = c;
106
- t[i(492)](_), q && (globalThis[i(511)].queue[i(547)](), o[i(518)](), f[i(489)](t)), g();
107
- }, y, T);
104
+ j == c(280) && h[c(211)](function(m) {
105
+ const d = c;
106
+ t.push(m), R && (globalThis.hinnn[d(228)].clear(), a[d(229)](), s[d(226)](t)), g();
107
+ }, y, _);
108
108
  });
109
109
  }
110
- globalThis.hinnn[e(530)][e(519)]();
110
+ globalThis[e(277)][e(228)][e(208)]();
111
111
  } catch (t) {
112
- console[e(549)](e(474)), console[e(561)](t);
112
+ console.error(e(270)), console[e(199)](t);
113
113
  }
114
114
  });
115
115
  }
116
- return f.promise();
116
+ return s[x(220)]();
117
117
  });
118
118
  };
119
- (function(s, n) {
120
- for (var x = k, o = s(); []; )
119
+ function H() {
120
+ var i = ["defineProperty", "154908jgjsRx", "27WstqnP", "newPrintTemplate", "363625tshdTi", "add toImage Api", "9gphsIY", "1161755vwfrIX", "1449328biOYGf", "2199246sJUgcZ", "167046aGRQjC", "toImage", "add toImage Api to PrintTemplate", "45538AUpZQg"];
121
+ return H = function() {
122
+ return i;
123
+ }, H();
124
+ }
125
+ (function(i, n) {
126
+ for (var x = U, a = i(); []; )
121
127
  try {
122
- var f = -parseInt(x(334)) / 1 + -parseInt(x(331)) / 2 * (-parseInt(x(344)) / 3) + -parseInt(x(338)) / 4 * (parseInt(x(341)) / 5) + -parseInt(x(332)) / 6 * (-parseInt(x(337)) / 7) + -parseInt(x(339)) / 8 + -parseInt(x(335)) / 9 + parseInt(x(330)) / 10 * (parseInt(x(336)) / 11);
123
- if (f === n)
128
+ var s = -parseInt(x(415)) / 1 + -parseInt(x(410)) / 2 * (parseInt(x(417)) / 3) + parseInt(x(412)) / 4 + -parseInt(x(404)) / 5 + -parseInt(x(407)) / 6 + parseInt(x(406)) / 7 + -parseInt(x(405)) / 8 * (-parseInt(x(413)) / 9);
129
+ if (s === n)
124
130
  break;
125
- o.push(o.shift());
126
- } catch (h) {
127
- o.push(o.shift());
131
+ a.push(a.shift());
132
+ } catch (b) {
133
+ a.push(a.shift());
128
134
  }
129
- })(M, 181429);
130
- function M() {
131
- var s = ["1295808WtNBbn", "add toImage Api", "123315SiaLiG", "newPrintTemplate", "add toImage Api to PrintTemplate", "9YVzMTT", "10MvYIXj", "220664DaJysg", "376422ksOobN", "0.3.0", "53520SAQUct", "1388907VBMmzC", "3903009xpjZvF", "7ssnXvg", "32FfDhfS"];
132
- return M = function() {
133
- return s;
134
- }, M();
135
- }
136
- function k(s, n) {
137
- var x = M();
138
- return k = function(o, f) {
139
- o = o - 330;
140
- var h = x[o];
141
- return h;
142
- }, k(s, n);
135
+ })(H, 204279);
136
+ function U(i, n) {
137
+ var x = H();
138
+ return U = function(a, s) {
139
+ a = a - 404;
140
+ var b = x[a];
141
+ return b;
142
+ }, U(i, n);
143
143
  }
144
- function B(s) {
145
- var n = k;
146
- return { name: n(340), description: "add toImage Api", hooks: [{ hook: n(342), name: n(343), description: n(343), priority: 1, run: ({ template: x, options: o }) => {
147
- Object.defineProperty(x, "toImage", { value: $, enumerable: ![], writable: !![], configurable: !![] });
148
- } }], leastHiprintVersion: n(333) };
144
+ function Y(i) {
145
+ var n = U;
146
+ return { name: "add toImage Api", description: n(416), hooks: [{ hook: n(414), name: n(409), description: n(409), priority: 1, run: ({ template: x, options: a }) => {
147
+ var s = n;
148
+ Object[s(411)](x, s(408), { value: O, enumerable: ![], writable: !![], configurable: !![] });
149
+ } }], leastHiprintVersion: "0.3.0" };
149
150
  }
150
151
  export {
151
- B as default
152
+ Y as default
152
153
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(b,_){typeof exports=="object"&&typeof module!="undefined"?module.exports=_(require("html-to-image")):typeof define=="function"&&define.amd?define(["html-to-image"],_):(b=typeof globalThis!="undefined"?globalThis:b||self,b.pluginApiImage=_(b.htmlToImage))})(this,function(b){"use strict";var $=(b,_,w)=>new Promise((P,I)=>{var E=d=>{try{h(w.next(d))}catch(a){I(a)}},j=d=>{try{h(w.throw(d))}catch(a){I(a)}},h=d=>d.done?P(d.value):Promise.resolve(d.value).then(E,j);h((w=w.apply(b,_)).next())});function _(a){if(a&&a.__esModule)return a;const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(x,e,i.get?i:{enumerable:!0,get:()=>a[e]})}}return x.default=a,Object.freeze(x)}const w=_(b);function P(a,x){const e=I();return P=function(i,p){return i=i-474,e[i]},P(a,x)}(function(a,x){const e=P,i=a();for(;[];)try{if(parseInt(e(503))/1*(parseInt(e(504))/2)+parseInt(e(555))/3*(-parseInt(e(487))/4)+parseInt(e(535))/5+parseInt(e(526))/6*(-parseInt(e(521))/7)+-parseInt(e(475))/8*(parseInt(e(505))/9)+-parseInt(e(490))/10+-parseInt(e(493))/11*(-parseInt(e(559))/12)===x)break;i.push(i.shift())}catch(p){i.push(i.shift())}})(I,816052);function I(){const a=["position:fixed","then","hinnn","toLowerCase","click","loadAllImages","indexOf","appendChild","jpeg","removeTempContainer","run","html","3441704qtnwHN",".jpg","limit","pop","length","6XyoQTM","includes","end","start","queue","baseURI","http","replace","style","1106880KqPUKf","drawImage","width","onProgress","jpg","height","toImage percent: ","toType","IMG","floor","toDataURL","image/jpeg","clear","download","error","quality","getTempContainer","printPanels","gif","css","361308RsofXq","getHtml","Deferred","ceil","39956604WryTHN","add","log","setAttribute","isDownload","blob","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","2342960qOtRWn","base64","src","display","bmp","forEach","name","tagName","createElement","getContext","extend","svg","40ZTyEhO","clearRect","resolve","5600870NYRqPE","none","push","11IUEizV","devicePixelRatio","url","onload","total","canvas","remove","find","svg2canvas","download.jpg","38PHPcee","5622CHoDSb","18PuPaoM",".hiprint-printPanel .hiprint-printPaper","split","imageSmoothingEnabled"];return I=function(){return a},I()}const E=function(a,x){return $(this,null,function*(){const e=P;let i=this,p=globalThis.$[e(557)](),q=!![],T=10,H=(f,g)=>{const u=e,R=Math[u(544)](f/g*100);console.log("cur",f,u(497),g),console[u(561)](u(541),R+"%")};if(this[e(552)][e(525)]){let f=globalThis.$[e(485)]({filter:t=>{const n=e;return t[n(482)]!=n(543)||t.tagName==n(543)&&([n(539),n(517),"png",n(553),n(479),"webp",n(486)][n(527)](t[n(477)][n(507)](".").pop()[n(512)]())||t[n(477)]!=t[n(531)]||t.src.indexOf(n(532))>-1&&t[n(477)]!=t[n(531)]||t[n(477)][n(515)](n(476))>-1)},backgroundColor:"#fff"},x||{}),g=yield this[e(556)](a,x);x&&x[e(563)]!=null&&(q=x.isDownload),x&&x[e(538)]!=null&&(H=x[e(538)]),x&&x[e(523)]!=null&&(T=x.limit),globalThis.$(g).css(e(537),"")[e(554)](e(540),""),this.createTempContainer();let u=this[e(551)]();this[e(501)](g,f),u[e(520)](g[0]);let R=u[e(500)](e(506)).length;globalThis.$(g)[e(554)](e(509)),this[e(514)](g,function(){const t=e;try{let n=[],L=Math[t(558)](R/T),B=R%T;const l=document.createElement(t(498)),S=l.getContext("2d"),z=u[t(537)]()*(f.pixelRatio||globalThis[t(494)]);for(let O=0;O<L;O++){S[t(488)](0,0,l[t(537)],l.height);const k=O==L-1;let V=0,U=k?B:T;for(let m=0;m<U;m++){S.clearRect(0,0,l.width,l[t(540)]);const s=O*T+m,D=u[t(500)](t(506))[s];globalThis.hinnn.queue[t(560)](function(A){const C=t;w.toCanvas(D,f)[C(510)](function(v){const r=C;let y=v[r(484)]("2d");y[r(508)]=![];let M=v[r(545)](r(546),f[r(550)]||.92),o=new Image;o[r(477)]=M,o[r(496)]=function(){const c=r;m===0&&(l[c(537)]=z,l[c(540)]=o[c(540)]*U),V+=o[c(540)],S[c(536)](o,0,V-o[c(540)],z,o[c(540)]),H(s+1,R),A()}})})}globalThis[t(511)][t(530)][t(560)](function(m){const s=t;let D=f.type||s(546),A=f[s(542)]||"url",C=f.quality||.8;if(q){let v=l.toDataURL(D,C),r=new Image;r[s(477)]=v,r[s(496)]=function(){const y=s;n[y(492)]({url:v,start:O*T+1,end:O*T+U}),k&&(globalThis[y(511)].queue.clear(),i[y(518)](),n[y(480)](M=>{const o=y;let c=document[o(483)]("a"),N=x[o(481)]||o(502);N.indexOf(".")==-1&&(N+=o(522));let X=N[o(507)](".")[o(524)](),W=N[o(533)]("."+X,"")+"_"+M[o(529)]+"-"+M[o(528)]+"."+X;c[o(534)][o(478)]=o(491),c.setAttribute(o(548),W),c[o(562)]("href",M[o(495)]),document.body[o(516)](c),c[o(513)](),c[o(499)]()})),m()};return}if(A==s(495)){n.push(l.toDataURL(D,C)),k&&(globalThis[s(511)][s(530)][s(547)](),i[s(518)](),p[s(489)](n)),m();return}A==s(564)&&l.toBlob(function(v){const r=s;n[r(492)](v),k&&(globalThis[r(511)].queue[r(547)](),i[r(518)](),p[r(489)](n)),m()},D,C)})}globalThis.hinnn[t(530)][t(519)]()}catch(n){console[t(549)](t(474)),console[t(561)](n)}})}return p.promise()})};(function(a,x){for(var e=h,i=a();[];)try{var p=-parseInt(e(334))/1+-parseInt(e(331))/2*(-parseInt(e(344))/3)+-parseInt(e(338))/4*(parseInt(e(341))/5)+-parseInt(e(332))/6*(-parseInt(e(337))/7)+-parseInt(e(339))/8+-parseInt(e(335))/9+parseInt(e(330))/10*(parseInt(e(336))/11);if(p===x)break;i.push(i.shift())}catch(q){i.push(i.shift())}})(j,181429);function j(){var a=["1295808WtNBbn","add toImage Api","123315SiaLiG","newPrintTemplate","add toImage Api to PrintTemplate","9YVzMTT","10MvYIXj","220664DaJysg","376422ksOobN","0.3.0","53520SAQUct","1388907VBMmzC","3903009xpjZvF","7ssnXvg","32FfDhfS"];return j=function(){return a},j()}function h(a,x){var e=j();return h=function(i,p){i=i-330;var q=e[i];return q},h(a,x)}function d(a){var x=h;return{name:x(340),description:"add toImage Api",hooks:[{hook:x(342),name:x(343),description:x(343),priority:1,run:({template:e,options:i})=>{Object.defineProperty(e,"toImage",{value:E,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:x(333)}}return d});
1
+ (function(h,_){typeof exports=="object"&&typeof module!="undefined"?module.exports=_(require("html-to-image")):typeof define=="function"&&define.amd?define(["html-to-image"],_):(h=typeof globalThis!="undefined"?globalThis:h||self,h.pluginApiImage=_(h.htmlToImage))})(this,function(h){"use strict";var N=(h,_,P)=>new Promise((I,v)=>{var U=u=>{try{b(P.next(u))}catch(a){v(a)}},C=u=>{try{b(P.throw(u))}catch(a){v(a)}},b=u=>u.done?I(u.value):Promise.resolve(u.value).then(U,C);b((P=P.apply(h,_)).next())});function _(a){if(a&&a.__esModule)return a;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const P=_(h);(function(a,t){const e=I,o=a();for(;[];)try{if(parseInt(e(256))/1*(-parseInt(e(251))/2)+parseInt(e(202))/3+-parseInt(e(240))/4*(-parseInt(e(262))/5)+-parseInt(e(249))/6+-parseInt(e(257))/7*(parseInt(e(265))/8)+parseInt(e(214))/9+parseInt(e(209))/10*(-parseInt(e(266))/11)===t)break;o.push(o.shift())}catch(d){o.push(o.shift())}})(v,895242);function I(a,t){const e=v();return I=function(o,d){return o=o-198,e[o]},I(a,t)}function v(){const a=["devicePixelRatio","pop","none","add","download.jpg","clear","hinnn","loadAllImages","gif","blob","getHtml","bmp","drawImage","getContext","width","png","log","end","toType","2140296JIAPBS","limit","svg","appendChild","start",".jpg","run","80HKLNvz","clearRect","toBlob","floor","toLowerCase","14153616tpUZDS","css","then","base64","isDownload","extend","promise","onProgress","indexOf","createElement",".hiprint-printPanel .hiprint-printPaper","printPanels","resolve","cur","queue","removeTempContainer","length","push","html","height","name","webp","onload","quality","#fff","baseURI","4mSGYjc","IMG","toCanvas","createTempContainer","canvas","svg2canvas","ceil","replace","imageSmoothingEnabled","3318840FwheCH","toDataURL","2enrpHW","display","http","tagName","remove","221627spbDRI","238pIEAXC","jpeg","includes","click","pixelRatio","2667735awVlxc","total","src","199624IHMSBy","414139JwxQRn","type","image/jpeg","url","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): "];return v=function(){return a},v()}const U=function(a,t){return N(this,null,function*(){const e=I;let o=this,d=globalThis.$.Deferred(),R=!![],T=10,E=(l,g)=>{const f=I,O=Math[f(212)](l/g*100);console[f(199)](f(227),l,f(263),g),console[f(199)]("toImage percent: ",O+"%")};if(this[e(225)][e(230)]){let l=globalThis.$[e(219)]({filter:x=>{const n=e;return x[n(254)]!=n(241)||x[n(254)]=="IMG"&&(["jpg",n(258),n(198),n(279),n(282),n(235),n(204)][n(259)](x[n(264)].split(".")[n(272)]()[n(213)]())||x[n(264)]!=x.baseURI||x[n(264)][n(222)](n(253))>-1&&x.src!=x[n(239)]||x[n(264)][n(222)](n(217))>-1)},backgroundColor:e(238)},t||{}),g=yield this[e(281)](a,t);t&&t[e(218)]!=null&&(R=t[e(218)]),t&&t.onProgress!=null&&(E=t[e(221)]),t&&t[e(203)]!=null&&(T=t[e(203)]),globalThis.$(g)[e(215)]("width","")[e(215)](e(233),""),this[e(243)]();let f=this.getTempContainer();this[e(245)](g,l),f[e(232)](g[0]);let O=f.find(e(224))[e(230)];globalThis.$(g)[e(215)]("position:fixed"),this[e(278)](g,function(){const x=e;try{let n=[],$=Math[x(246)](O/T),Q=O%T||1;const p=document[x(223)](x(244)),q=p[x(284)]("2d"),B=f.width()*(l[x(261)]||globalThis[x(271)]);for(let A=0;A<$;A++){q[x(210)](0,0,p.width,p.height);const S=A==$-1;let J=0,G=S?Q:T;for(let m=0;m<G;m++){q.clearRect(0,0,p[x(285)],p[x(233)]);const i=A*T+m,k=f.find(x(224))[i];globalThis[x(277)][x(228)][x(274)](function(D){const w=x;P[w(242)](k,l)[w(216)](function(y){const r=w;let j=y[r(284)]("2d");j[r(248)]=![];let M=y[r(250)](r(268),l.quality||.92),c=new Image;c[r(264)]=M,c[r(236)]=function(){const s=r;m===0&&(p[s(285)]=B,p[s(233)]=c[s(233)]*G),J+=c.height,q[s(283)](c,0,J-c[s(233)],B,c[s(233)]),E(i+1,O),D()}})})}globalThis.hinnn[x(228)][x(274)](function(m){const i=x;let k=l[i(267)]||i(268),D=l[i(201)]||i(269),w=l[i(237)]||.8;if(R){let y=p[i(250)](k,w),r=new Image;r[i(264)]=y,r[i(236)]=function(){const j=i;n[j(231)]({url:y,start:A*T+1,end:A*T+G}),S&&(globalThis[j(277)][j(228)][j(276)](),o.removeTempContainer(),n.forEach(M=>{const c=j;let s=document[c(223)]("a"),H=t[c(234)]||c(275);H[c(222)](".")==-1&&(H+=c(207));let L=H.split(".").pop(),Y=H[c(247)]("."+L,"")+"_"+M[c(206)]+"-"+M[c(200)]+"."+L;s.style[c(252)]=c(273),s.setAttribute("download",Y),s.setAttribute("href",M[c(269)]),document.body[c(205)](s),s[c(260)](),s[c(255)]()})),m()};return}if(D=="url"){n.push(p[i(250)](k,w)),S&&(globalThis[i(277)][i(228)].clear(),o[i(229)](),d[i(226)](n)),m();return}D==i(280)&&p[i(211)](function(y){const r=i;n.push(y),S&&(globalThis.hinnn[r(228)].clear(),o[r(229)](),d[r(226)](n)),m()},k,w)})}globalThis[x(277)][x(228)][x(208)]()}catch(n){console.error(x(270)),console[x(199)](n)}})}return d[e(220)]()})};function C(){var a=["defineProperty","154908jgjsRx","27WstqnP","newPrintTemplate","363625tshdTi","add toImage Api","9gphsIY","1161755vwfrIX","1449328biOYGf","2199246sJUgcZ","167046aGRQjC","toImage","add toImage Api to PrintTemplate","45538AUpZQg"];return C=function(){return a},C()}(function(a,t){for(var e=b,o=a();[];)try{var d=-parseInt(e(415))/1+-parseInt(e(410))/2*(parseInt(e(417))/3)+parseInt(e(412))/4+-parseInt(e(404))/5+-parseInt(e(407))/6+parseInt(e(406))/7+-parseInt(e(405))/8*(-parseInt(e(413))/9);if(d===t)break;o.push(o.shift())}catch(R){o.push(o.shift())}})(C,204279);function b(a,t){var e=C();return b=function(o,d){o=o-404;var R=e[o];return R},b(a,t)}function u(a){var t=b;return{name:"add toImage Api",description:t(416),hooks:[{hook:t(414),name:t(409),description:t(409),priority:1,run:({template:e,options:o})=>{var d=t;Object[d(411)](e,d(408),{value:U,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:"0.3.0"}}return u});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sv-print/plugin-api-image",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "add image api to print template",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",