@sv-print/plugin-api-pdf 0.2.1 → 0.2.2

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,37 +1 @@
1
- "use strict";var L=(i,e,a)=>new Promise((x,o)=>{var b=t=>{try{m(a.next(t))}catch(u){o(u)}},w=t=>{try{m(a.throw(t))}catch(u){o(u)}},m=t=>t.done?x(t.value):Promise.resolve(t.value).then(b,w);m((a=a.apply(i,e)).next())});const W=require("@zumer/snapdom"),B=require("jspdf");(function(i,e){const a=I,x=i();for(;[];)try{if(parseInt(a(189))/1+-parseInt(a(195))/2+-parseInt(a(151))/3*(parseInt(a(138))/4)+-parseInt(a(143))/5+-parseInt(a(184))/6*(parseInt(a(177))/7)+-parseInt(a(133))/8+-parseInt(a(201))/9*(-parseInt(a(196))/10)===e)break;x.push(x.shift())}catch(o){x.push(x.shift())}})(k,780489);const E=function(i,e,a){return L(this,null,function*(){const x=I;var o=this,b=globalThis.$.Deferred(),w=!![];let m=(_,P)=>{const d=I,r=Math[d(199)](_/P*100);console.log("cur",_,d(192),P),console[d(156)](d(187),r+"%")},t=a||{};if(this[x(171)][x(174)]){if(typeof e===x(172)){const c=e[x(125)](".pdf")>-1?e:e+x(179);t.name=c}else t=e||{},!t[x(182)]&&(t[x(182)]=x(193)+Date[x(131)]()+".pdf");let _=this[x(171)][0][x(141)],P=this[x(171)][0].height;var u=globalThis.hinnn.mm[x(162)](t[x(175)]||_),J=globalThis[x(140)].mm[x(162)](t[x(153)]||P),f=globalThis.$[x(197)]({},t||{});const d=this[x(171)][0][x(128)],r=this[x(171)][0][x(176)],O=r&&(r[x(132)]>0||r[x(129)]>0),R=d!=null&&d!=""&&d!=x(144);var C=new B.jsPDF({orientation:this[x(161)](0)==1?x(136):x(181),unit:"pt",format:R?d.toLocaleLowerCase():[u,J]}),g=yield this[x(164)](i,t);t&&(t.pixelRatio&&(f.dpr=t[x(198)],f.scale=t[x(198)]),t[x(134)]!=null&&(w=t[x(134)]),t[x(148)]!=null&&(m=t[x(148)])),globalThis.$(g)[x(137)](x(141),"")[x(137)](x(183),""),this[x(194)]();var v=this[x(155)]();if(O&&t[x(175)]&&t[x(153)]){let c=Math[x(199)](t.paperWidth/(_+r.layoutRowGap/2)),h=Math.floor(t[x(153)]/(P+r.layoutColumnGap/2));const T=c*h,l=g[x(139)](x(123)),y=l[x(174)],n=Math[x(120)](y/T);let s=globalThis.$(x(146));r[x(186)]==x(173)?s[x(168)](x(135)+(Number(r[x(132)])||0)/2+x(122)+(Number(r.layoutColumnGap)||0)/2+`mm;
2
- }
3
- .hiprint-printTemplate .hiprint-printPanel-small {
4
- display:inline-block;
5
- padding: `+(Number(r[x(132)])||0)/2+"mm "+(Number(r.layoutColumnGap)||0)/2+x(185)):s[x(168)](`<style>
6
- .hiprint-printPanel-small{
7
- box-sizing: border-box;
8
- border: 0px;
9
- }
10
- .hiprint-printPaper-small{
11
- position: relative;
12
- padding: 0;
13
- }
14
- .hiprint-printTemplate .hiprint-printPaper{
15
- display: flex;
16
- flex-wrap: wrap;
17
- flex-direction: column;
18
- align-content: flex-start;
19
- margin: -`+(Number(r[x(132)])||0)/2+"mm -"+(Number(r[x(129)])||0)/2+x(204)+(Number(r[x(132)])||0)/2+x(157)+(Number(r.layoutColumnGap)||0)/2+x(185));for(let p=0;p<n;p++){const G=globalThis.$(x(152)+t.paperWidth+x(154)+t[x(153)]+x(118)),$=p*T,U=Math.min((p+1)*T,y);for(let N=$;N<U;N++){const q=l.eq(N)[x(150)]();q[x(127)](x(170)),q[x(158)](x(160)+N);const A=globalThis.$('<div class="hiprint-printPanel-small"></div>');A.append(q),G[x(139)](x(178)).append(A)}s.append(G)}this[x(169)](s,f),v[x(145)](s[0]),globalThis.$(s)[x(137)](x(200))}else this.svg2canvas(g,f),v[x(145)](g[0]),globalThis.$(g)[x(137)](x(200));let M=v[x(139)](x(123))[x(174)];this.loadAllImages(v,function(){const c=x;try{v[c(139)](c(123))[c(165)](function(h,T){const l=c;globalThis[l(140)][l(191)][l(119)](function(y){const n=l;W.snapdom[n(147)](T,f)[n(159)](function(s){const p=n;var G=s[p(180)]("2d");G[p(126)]=![];var $=s[p(142)]("image/jpeg",f.quality||.92);C[p(205)]($,"JPEG",0,0,u,J),h<M-1&&C[p(124)](),m(h+1,M),y()})[n(121)](s=>{const p=n;throw new Error(s[p(206)])})}),h==M-1&&(globalThis[l(140)][l(191)][l(119)](function(y){const n=l;if(w)o[n(202)](),C[n(130)](t[n(182)]);else{o[n(202)]();let s=t[n(167)]||"blob",p=C[n(149)](s);b[n(166)](p)}globalThis.hinnn[n(191)][n(203)]()}),globalThis[l(140)].queue.run())})}catch(h){console[c(163)](c(188)),console[c(156)](h)}})}return b[x(190)]()})};function I(i,e){const a=k();return I=function(x,o){return x=x-118,a[x]},I(i,e)}function k(){const i=["clone","6dMscGT",`<div class="hiprint-printPanel">
20
- <div class="hiprint-printPaper" style="width:`,"paperHeight","mm;height:","getTempContainer","log","mm ","addClass","then","hiprint-printPaper-small start-","getOrient","toPt","error","getHtml","each","resolve","type","append","svg2canvas","hiprint-printPaper","printPanels","string","row","length","paperWidth","panelLayoutOptions","1023631wWoxaT",".hiprint-printPaper",".pdf","getContext","landscape","name","height","30WptyTU",`mm;
21
- }
22
- </style>`,"layoutType","toPdf percent: ","toPdf \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","1168448GPmBDt","promise","queue","total","sv-print-","createTempContainer","2647114kIxruS","1428210JcRIkc","extend","pixelRatio","floor","position:fixed","261MdYkZK","removeTempContainer","clear",`mm;
23
- }
24
- .hiprint-printTemplate .hiprint-printPanel-small {
25
- display:inline-block;
26
- padding: `,"addImage","message",`mm;"></div>
27
- </div>`,"add","ceil","catch","mm -",".hiprint-printPanel .hiprint-printPaper","addPage","indexOf","imageSmoothingEnabled","removeClass","paperType","layoutColumnGap","save","now","layoutRowGap","303088jpjeEu","isDownload",`<style>
28
- .hiprint-printPanel-small{
29
- box-sizing: border-box;
30
- border: 0px;
31
- }
32
- .hiprint-printPaper-small{
33
- position: relative;
34
- padding: 0;
35
- }
36
- .hiprint-printTemplate .hiprint-printPaper{
37
- margin: -`,"portrait","css","2985212aXroAw","find","hinnn","width","toDataURL","4722770jKjDwl","\u81EA\u5B9A\u4E49","html",'<div class="hiprint-printTemplate"></div>',"toCanvas","onProgress","output"];return k=function(){return i},k()}(function(i,e){for(var a=D,x=i();[];)try{var o=parseInt(a(285))/1*(-parseInt(a(271))/2)+-parseInt(a(278))/3*(-parseInt(a(274))/4)+parseInt(a(276))/5*(-parseInt(a(270))/6)+-parseInt(a(269))/7*(parseInt(a(281))/8)+parseInt(a(286))/9+-parseInt(a(282))/10+-parseInt(a(279))/11*(-parseInt(a(272))/12);if(o===e)break;x.push(x.shift())}catch(b){x.push(x.shift())}})(j,888198);function j(){var i=["defineProperty","add toPdf Api to PrintTemplate","2723IGOXJN","8021799kZgTqd","101689obIHjr","195666UJaNvt","530sNXPXd","29986056hlVKwJ","0.3.0","2852356gBcZAa","newPrintTemplate","30pJdmwU","toPdf","6DDlCVP","11vOMLVp","add toPdf Api","808UNSBJG","15436410LeGBkC"];return j=function(){return i},j()}function D(i,e){var a=j();return D=function(x,o){x=x-269;var b=a[x];return b},D(i,e)}function H(i){var e=D;return{name:"add toPdf Api",description:e(280),hooks:[{hook:e(275),name:e(284),description:e(284),priority:1,run:({template:a,options:x})=>{var o=e;Object[o(283)](a,o(277),{value:E,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:e(273)}}module.exports=H;
1
+ "use strict";var S=(a,n,x)=>new Promise((e,o)=>{var d=t=>{try{p(x.next(t))}catch(f){o(f)}},m=t=>{try{p(x.throw(t))}catch(f){o(f)}},p=t=>t.done?e(t.value):Promise.resolve(t.value).then(d,m);p((x=x.apply(a,n)).next())});const U=require("@zumer/snapdom"),W=require("jspdf");(function(a,n){const x=y,e=a();for(;;)try{if(-parseInt(x(181))/1*(-parseInt(x(219))/2)+parseInt(x(213))/3+-parseInt(x(220))/4*(parseInt(x(212))/5)+-parseInt(x(200))/6*(parseInt(x(182))/7)+parseInt(x(227))/8+parseInt(x(203))/9+-parseInt(x(184))/10===n)break;e.push(e.shift())}catch(o){e.push(e.shift())}})(w,998909);function w(){const a=["3358983pLJjpl","paperHeight","pixelRatio","Deferred","extend","each","108cpHUHk","152tMUSqg","getOrient","addImage","createTempContainer","JPEG","printPanels","height","2738168EjIhWV","getHtml","add","#fff","自定义","name","paperWidth",".pdf","toPdf percent: ","floor",".hiprint-printPanel .hiprint-printPaper","resolve","hinnn","output","position:fixed","image/jpeg","message","indexOf","blob","toPdf 失败(可能您的图片资源无法正常加载): ","toCanvas","portrait","removeTempContainer","25766FaCiRS","455518znuvMt","clear","29328650AEjNPL","promise","queue","error","toLocaleLowerCase","toDataURL","length","catch","quality","onProgress","css","width","paperType","isDownload","find","then","12OdchtS","loadAllImages","html","11243232ZnkyFS","scale","run","toPt","imageSmoothingEnabled","now","log","svg2canvas","landscape","5345BKGGqa"];return w=function(){return a},w()}const F=function(a,n,x){return S(this,null,function*(){const e=y;var o=this,d=globalThis.$[e(216)](),m=!0;let p=(I,T)=>{const l=e,b=Math[l(236)](I/T*100);console[l(209)]("cur",I,"total",T),console.log(l(235),b+"%")},t=x||{};if(this[e(225)].length){if(typeof n=="string"){const s=n[e(175)](e(234))>-1?n:n+e(234);t[e(232)]=s}else t=n||{},!t.name&&(t.name="sv-print-"+Date[e(208)]()+e(234));let I=this[e(225)][0][e(195)],T=this[e(225)][0][e(226)];const l=t[e(233)]&&t[e(214)];var f=globalThis.hinnn.mm[e(206)](t[e(233)]||I),q=globalThis.hinnn.mm[e(206)](t[e(214)]||T),u=globalThis.$[e(217)]({backgroundColor:e(230)},t||{});const b=this[e(225)][0][e(196)],D=b!=null&&b!=""&&b!=e(231),O=this[e(221)](0)==1||l?e(179):e(211),E=D&&!l?b[e(188)]():[f,q];var v=new W.jsPDF({orientation:O,unit:"pt",format:E}),_=yield this[e(228)](a,t);t&&(t[e(215)]&&(u.dpr=t[e(215)],u[e(204)]=t.pixelRatio),t.isDownload!=null&&(m=t[e(197)]),t[e(193)]!=null&&(p=t[e(193)])),globalThis.$(_).css(e(195),"")[e(194)](e(226),""),this[e(223)]();var P=this.getTempContainer();this[e(210)](_,u),P[e(202)](_[0]),globalThis.$(_).css(e(241));let j=P[e(198)](e(237))[e(190)];this[e(201)](P,function(){const s=e;try{P[s(198)](s(237))[s(218)](function(g,H){const c=s;globalThis[c(239)].queue.add(function(A){const r=c;U.snapdom[r(178)](H,u)[r(199)](function(h){const i=r;var L=h.getContext("2d");L[i(207)]=!1;var R=h[i(189)](i(242),u[i(192)]||.92);v[i(222)](R,i(224),0,0,f,q),g<j-1&&v.addPage(),p(g+1,j),A()})[r(191)](h=>{const i=r;throw new Error(h[i(243)])})}),g==j-1&&(globalThis[c(239)][c(186)][c(229)](function(A){const r=c;if(m)o[r(180)](),v.save(t[r(232)]);else{o[r(180)]();let h=t.type||r(176),i=v[r(240)](h);d[r(238)](i)}globalThis.hinnn[r(186)][r(183)]()}),globalThis[c(239)][c(186)][c(205)]())})}catch(g){console[s(187)](s(177)),console[s(209)](g)}})}return d[e(185)]()})};function y(a,n){const x=w();return y=function(e,o){return e=e-175,x[e]},y(a,n)}(function(a,n){for(var x=k,e=a();;)try{var o=parseInt(x(110))/1+-parseInt(x(108))/2*(parseInt(x(113))/3)+parseInt(x(115))/4*(-parseInt(x(114))/5)+-parseInt(x(112))/6+parseInt(x(109))/7+-parseInt(x(111))/8*(parseInt(x(119))/9)+parseInt(x(121))/10;if(o===n)break;e.push(e.shift())}catch(d){e.push(e.shift())}})(C,452171);function k(a,n){var x=C();return k=function(e,o){e=e-107;var d=x[e];return d},k(a,n)}function J(a){var n=k;return{name:n(120),description:"add toPdf Api",hooks:[{hook:"newPrintTemplate",name:"add toPdf Api to PrintTemplate",description:n(118),priority:1,run:({template:x,options:e})=>{var o=n;Object[o(107)](x,o(116),{value:F,enumerable:!1,writable:!0,configurable:!0})}}],leastHiprintVersion:n(117)}}function C(){var a=["add toPdf Api","9333550RwXQdP","defineProperty","312718ZVTmse","539938NUAttv","824089SpfuXz","40TnvvPr","1473846SJXJZg","6WFTWOY","161065QkcmVK","44xZTOUo","toPdf","0.3.0","add toPdf Api to PrintTemplate","845469rygPpW"];return C=function(){return a},C()}module.exports=J;
package/dist/index.mjs CHANGED
@@ -1,188 +1,132 @@
1
- var O = (i, e, a) => new Promise((x, o) => {
2
- var b = (t) => {
1
+ var D = (a, n, x) => new Promise((e, o) => {
2
+ var d = (t) => {
3
3
  try {
4
- m(a.next(t));
5
- } catch (u) {
6
- o(u);
4
+ f(x.next(t));
5
+ } catch (p) {
6
+ o(p);
7
7
  }
8
- }, w = (t) => {
8
+ }, m = (t) => {
9
9
  try {
10
- m(a.throw(t));
11
- } catch (u) {
12
- o(u);
10
+ f(x.throw(t));
11
+ } catch (p) {
12
+ o(p);
13
13
  }
14
- }, m = (t) => t.done ? x(t.value) : Promise.resolve(t.value).then(b, w);
15
- m((a = a.apply(i, e)).next());
14
+ }, f = (t) => t.done ? e(t.value) : Promise.resolve(t.value).then(d, m);
15
+ f((x = x.apply(a, n)).next());
16
16
  });
17
- import { snapdom as W } from "@zumer/snapdom";
18
- import { jsPDF as B } from "jspdf";
19
- (function(i, e) {
20
- const a = I, x = i();
21
- for (; []; )
17
+ import { snapdom as U } from "@zumer/snapdom";
18
+ import { jsPDF as W } from "jspdf";
19
+ (function(a, n) {
20
+ const x = y, e = a();
21
+ for (; ; )
22
22
  try {
23
- if (parseInt(a(189)) / 1 + -parseInt(a(195)) / 2 + -parseInt(a(151)) / 3 * (parseInt(a(138)) / 4) + -parseInt(a(143)) / 5 + -parseInt(a(184)) / 6 * (parseInt(a(177)) / 7) + -parseInt(a(133)) / 8 + -parseInt(a(201)) / 9 * (-parseInt(a(196)) / 10) === e)
24
- break;
25
- x.push(x.shift());
23
+ if (-parseInt(x(181)) / 1 * (-parseInt(x(219)) / 2) + parseInt(x(213)) / 3 + -parseInt(x(220)) / 4 * (parseInt(x(212)) / 5) + -parseInt(x(200)) / 6 * (parseInt(x(182)) / 7) + parseInt(x(227)) / 8 + parseInt(x(203)) / 9 + -parseInt(x(184)) / 10 === n) break;
24
+ e.push(e.shift());
26
25
  } catch (o) {
27
- x.push(x.shift());
26
+ e.push(e.shift());
28
27
  }
29
- })(k, 780489);
30
- const E = function(i, e, a) {
31
- return O(this, null, function* () {
32
- const x = I;
33
- var o = this, b = globalThis.$.Deferred(), w = !![];
34
- let m = (_, P) => {
35
- const d = I, r = Math[d(199)](_ / P * 100);
36
- console.log("cur", _, d(192), P), console[d(156)](d(187), r + "%");
37
- }, t = a || {};
38
- if (this[x(171)][x(174)]) {
39
- if (typeof e === x(172)) {
40
- const c = e[x(125)](".pdf") > -1 ? e : e + x(179);
41
- t.name = c;
42
- } else
43
- t = e || {}, !t[x(182)] && (t[x(182)] = x(193) + Date[x(131)]() + ".pdf");
44
- let _ = this[x(171)][0][x(141)], P = this[x(171)][0].height;
45
- var u = globalThis.hinnn.mm[x(162)](t[x(175)] || _), A = globalThis[x(140)].mm[x(162)](t[x(153)] || P), f = globalThis.$[x(197)]({}, t || {});
46
- const d = this[x(171)][0][x(128)], r = this[x(171)][0][x(176)], R = r && (r[x(132)] > 0 || r[x(129)] > 0), q = d != null && d != "" && d != x(144);
47
- var C = new B({ orientation: this[x(161)](0) == 1 ? x(136) : x(181), unit: "pt", format: q ? d.toLocaleLowerCase() : [u, A] }), g = yield this[x(164)](i, t);
48
- t && (t.pixelRatio && (f.dpr = t[x(198)], f.scale = t[x(198)]), t[x(134)] != null && (w = t[x(134)]), t[x(148)] != null && (m = t[x(148)])), globalThis.$(g)[x(137)](x(141), "")[x(137)](x(183), ""), this[x(194)]();
49
- var v = this[x(155)]();
50
- if (R && t[x(175)] && t[x(153)]) {
51
- let c = Math[x(199)](t.paperWidth / (_ + r.layoutRowGap / 2)), h = Math.floor(t[x(153)] / (P + r.layoutColumnGap / 2));
52
- const T = c * h, l = g[x(139)](x(123)), y = l[x(174)], n = Math[x(120)](y / T);
53
- let s = globalThis.$(x(146));
54
- r[x(186)] == x(173) ? s[x(168)](x(135) + (Number(r[x(132)]) || 0) / 2 + x(122) + (Number(r.layoutColumnGap) || 0) / 2 + `mm;
55
- }
56
- .hiprint-printTemplate .hiprint-printPanel-small {
57
- display:inline-block;
58
- padding: ` + (Number(r[x(132)]) || 0) / 2 + "mm " + (Number(r.layoutColumnGap) || 0) / 2 + x(185)) : s[x(168)](`<style>
59
- .hiprint-printPanel-small{
60
- box-sizing: border-box;
61
- border: 0px;
62
- }
63
- .hiprint-printPaper-small{
64
- position: relative;
65
- padding: 0;
66
- }
67
- .hiprint-printTemplate .hiprint-printPaper{
68
- display: flex;
69
- flex-wrap: wrap;
70
- flex-direction: column;
71
- align-content: flex-start;
72
- margin: -` + (Number(r[x(132)]) || 0) / 2 + "mm -" + (Number(r[x(129)]) || 0) / 2 + x(204) + (Number(r[x(132)]) || 0) / 2 + x(157) + (Number(r.layoutColumnGap) || 0) / 2 + x(185));
73
- for (let p = 0; p < n; p++) {
74
- const G = globalThis.$(x(152) + t.paperWidth + x(154) + t[x(153)] + x(118)), $ = p * T, U = Math.min((p + 1) * T, y);
75
- for (let N = $; N < U; N++) {
76
- const J = l.eq(N)[x(150)]();
77
- J[x(127)](x(170)), J[x(158)](x(160) + N);
78
- const L = globalThis.$('<div class="hiprint-printPanel-small"></div>');
79
- L.append(J), G[x(139)](x(178)).append(L);
80
- }
81
- s.append(G);
82
- }
83
- this[x(169)](s, f), v[x(145)](s[0]), globalThis.$(s)[x(137)](x(200));
84
- } else
85
- this.svg2canvas(g, f), v[x(145)](g[0]), globalThis.$(g)[x(137)](x(200));
86
- let M = v[x(139)](x(123))[x(174)];
87
- this.loadAllImages(v, function() {
88
- const c = x;
28
+ })(w, 998909);
29
+ function w() {
30
+ const a = ["3358983pLJjpl", "paperHeight", "pixelRatio", "Deferred", "extend", "each", "108cpHUHk", "152tMUSqg", "getOrient", "addImage", "createTempContainer", "JPEG", "printPanels", "height", "2738168EjIhWV", "getHtml", "add", "#fff", "自定义", "name", "paperWidth", ".pdf", "toPdf percent: ", "floor", ".hiprint-printPanel .hiprint-printPaper", "resolve", "hinnn", "output", "position:fixed", "image/jpeg", "message", "indexOf", "blob", "toPdf 失败(可能您的图片资源无法正常加载): ", "toCanvas", "portrait", "removeTempContainer", "25766FaCiRS", "455518znuvMt", "clear", "29328650AEjNPL", "promise", "queue", "error", "toLocaleLowerCase", "toDataURL", "length", "catch", "quality", "onProgress", "css", "width", "paperType", "isDownload", "find", "then", "12OdchtS", "loadAllImages", "html", "11243232ZnkyFS", "scale", "run", "toPt", "imageSmoothingEnabled", "now", "log", "svg2canvas", "landscape", "5345BKGGqa"];
31
+ return w = function() {
32
+ return a;
33
+ }, w();
34
+ }
35
+ const F = function(a, n, x) {
36
+ return D(this, null, function* () {
37
+ const e = y;
38
+ var o = this, d = globalThis.$[e(216)](), m = !0;
39
+ let f = (I, T) => {
40
+ const l = e, b = Math[l(236)](I / T * 100);
41
+ console[l(209)]("cur", I, "total", T), console.log(l(235), b + "%");
42
+ }, t = x || {};
43
+ if (this[e(225)].length) {
44
+ if (typeof n == "string") {
45
+ const s = n[e(175)](e(234)) > -1 ? n : n + e(234);
46
+ t[e(232)] = s;
47
+ } else t = n || {}, !t.name && (t.name = "sv-print-" + Date[e(208)]() + e(234));
48
+ let I = this[e(225)][0][e(195)], T = this[e(225)][0][e(226)];
49
+ const l = t[e(233)] && t[e(214)];
50
+ var p = globalThis.hinnn.mm[e(206)](t[e(233)] || I), S = globalThis.hinnn.mm[e(206)](t[e(214)] || T), u = globalThis.$[e(217)]({ backgroundColor: e(230) }, t || {});
51
+ const b = this[e(225)][0][e(196)], O = b != null && b != "" && b != e(231), q = this[e(221)](0) == 1 || l ? e(179) : e(211), E = O && !l ? b[e(188)]() : [p, S];
52
+ var v = new W({ orientation: q, unit: "pt", format: E }), _ = yield this[e(228)](a, t);
53
+ t && (t[e(215)] && (u.dpr = t[e(215)], u[e(204)] = t.pixelRatio), t.isDownload != null && (m = t[e(197)]), t[e(193)] != null && (f = t[e(193)])), globalThis.$(_).css(e(195), "")[e(194)](e(226), ""), this[e(223)]();
54
+ var P = this.getTempContainer();
55
+ this[e(210)](_, u), P[e(202)](_[0]), globalThis.$(_).css(e(241));
56
+ let A = P[e(198)](e(237))[e(190)];
57
+ this[e(201)](P, function() {
58
+ const s = e;
89
59
  try {
90
- v[c(139)](c(123))[c(165)](function(h, T) {
91
- const l = c;
92
- globalThis[l(140)][l(191)][l(119)](function(y) {
93
- const n = l;
94
- W[n(147)](T, f)[n(159)](function(s) {
95
- const p = n;
96
- var G = s[p(180)]("2d");
97
- G[p(126)] = ![];
98
- var $ = s[p(142)]("image/jpeg", f.quality || 0.92);
99
- C[p(205)]($, "JPEG", 0, 0, u, A), h < M - 1 && C[p(124)](), m(h + 1, M), y();
100
- })[n(121)]((s) => {
101
- const p = n;
102
- throw new Error(s[p(206)]);
60
+ P[s(198)](s(237))[s(218)](function(g, H) {
61
+ const c = s;
62
+ globalThis[c(239)].queue.add(function(j) {
63
+ const r = c;
64
+ U[r(178)](H, u)[r(199)](function(h) {
65
+ const i = r;
66
+ var L = h.getContext("2d");
67
+ L[i(207)] = !1;
68
+ var R = h[i(189)](i(242), u[i(192)] || 0.92);
69
+ v[i(222)](R, i(224), 0, 0, p, S), g < A - 1 && v.addPage(), f(g + 1, A), j();
70
+ })[r(191)]((h) => {
71
+ const i = r;
72
+ throw new Error(h[i(243)]);
103
73
  });
104
- }), h == M - 1 && (globalThis[l(140)][l(191)][l(119)](function(y) {
105
- const n = l;
106
- if (w)
107
- o[n(202)](), C[n(130)](t[n(182)]);
74
+ }), g == A - 1 && (globalThis[c(239)][c(186)][c(229)](function(j) {
75
+ const r = c;
76
+ if (m) o[r(180)](), v.save(t[r(232)]);
108
77
  else {
109
- o[n(202)]();
110
- let s = t[n(167)] || "blob", p = C[n(149)](s);
111
- b[n(166)](p);
78
+ o[r(180)]();
79
+ let h = t.type || r(176), i = v[r(240)](h);
80
+ d[r(238)](i);
112
81
  }
113
- globalThis.hinnn[n(191)][n(203)]();
114
- }), globalThis[l(140)].queue.run());
82
+ globalThis.hinnn[r(186)][r(183)]();
83
+ }), globalThis[c(239)][c(186)][c(205)]());
115
84
  });
116
- } catch (h) {
117
- console[c(163)](c(188)), console[c(156)](h);
85
+ } catch (g) {
86
+ console[s(187)](s(177)), console[s(209)](g);
118
87
  }
119
88
  });
120
89
  }
121
- return b[x(190)]();
90
+ return d[e(185)]();
122
91
  });
123
92
  };
124
- function I(i, e) {
125
- const a = k();
126
- return I = function(x, o) {
127
- return x = x - 118, a[x];
128
- }, I(i, e);
129
- }
130
- function k() {
131
- const i = ["clone", "6dMscGT", `<div class="hiprint-printPanel">
132
- <div class="hiprint-printPaper" style="width:`, "paperHeight", "mm;height:", "getTempContainer", "log", "mm ", "addClass", "then", "hiprint-printPaper-small start-", "getOrient", "toPt", "error", "getHtml", "each", "resolve", "type", "append", "svg2canvas", "hiprint-printPaper", "printPanels", "string", "row", "length", "paperWidth", "panelLayoutOptions", "1023631wWoxaT", ".hiprint-printPaper", ".pdf", "getContext", "landscape", "name", "height", "30WptyTU", `mm;
133
- }
134
- </style>`, "layoutType", "toPdf percent: ", "toPdf \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ", "1168448GPmBDt", "promise", "queue", "total", "sv-print-", "createTempContainer", "2647114kIxruS", "1428210JcRIkc", "extend", "pixelRatio", "floor", "position:fixed", "261MdYkZK", "removeTempContainer", "clear", `mm;
135
- }
136
- .hiprint-printTemplate .hiprint-printPanel-small {
137
- display:inline-block;
138
- padding: `, "addImage", "message", `mm;"></div>
139
- </div>`, "add", "ceil", "catch", "mm -", ".hiprint-printPanel .hiprint-printPaper", "addPage", "indexOf", "imageSmoothingEnabled", "removeClass", "paperType", "layoutColumnGap", "save", "now", "layoutRowGap", "303088jpjeEu", "isDownload", `<style>
140
- .hiprint-printPanel-small{
141
- box-sizing: border-box;
142
- border: 0px;
143
- }
144
- .hiprint-printPaper-small{
145
- position: relative;
146
- padding: 0;
147
- }
148
- .hiprint-printTemplate .hiprint-printPaper{
149
- margin: -`, "portrait", "css", "2985212aXroAw", "find", "hinnn", "width", "toDataURL", "4722770jKjDwl", "\u81EA\u5B9A\u4E49", "html", '<div class="hiprint-printTemplate"></div>', "toCanvas", "onProgress", "output"];
150
- return k = function() {
151
- return i;
152
- }, k();
93
+ function y(a, n) {
94
+ const x = w();
95
+ return y = function(e, o) {
96
+ return e = e - 175, x[e];
97
+ }, y(a, n);
153
98
  }
154
- (function(i, e) {
155
- for (var a = j, x = i(); []; )
99
+ (function(a, n) {
100
+ for (var x = k, e = a(); ; )
156
101
  try {
157
- var o = parseInt(a(285)) / 1 * (-parseInt(a(271)) / 2) + -parseInt(a(278)) / 3 * (-parseInt(a(274)) / 4) + parseInt(a(276)) / 5 * (-parseInt(a(270)) / 6) + -parseInt(a(269)) / 7 * (parseInt(a(281)) / 8) + parseInt(a(286)) / 9 + -parseInt(a(282)) / 10 + -parseInt(a(279)) / 11 * (-parseInt(a(272)) / 12);
158
- if (o === e)
159
- break;
160
- x.push(x.shift());
161
- } catch (b) {
162
- x.push(x.shift());
102
+ var o = parseInt(x(110)) / 1 + -parseInt(x(108)) / 2 * (parseInt(x(113)) / 3) + parseInt(x(115)) / 4 * (-parseInt(x(114)) / 5) + -parseInt(x(112)) / 6 + parseInt(x(109)) / 7 + -parseInt(x(111)) / 8 * (parseInt(x(119)) / 9) + parseInt(x(121)) / 10;
103
+ if (o === n) break;
104
+ e.push(e.shift());
105
+ } catch (d) {
106
+ e.push(e.shift());
163
107
  }
164
- })(D, 888198);
165
- function D() {
166
- var i = ["defineProperty", "add toPdf Api to PrintTemplate", "2723IGOXJN", "8021799kZgTqd", "101689obIHjr", "195666UJaNvt", "530sNXPXd", "29986056hlVKwJ", "0.3.0", "2852356gBcZAa", "newPrintTemplate", "30pJdmwU", "toPdf", "6DDlCVP", "11vOMLVp", "add toPdf Api", "808UNSBJG", "15436410LeGBkC"];
167
- return D = function() {
168
- return i;
169
- }, D();
108
+ })(C, 452171);
109
+ function k(a, n) {
110
+ var x = C();
111
+ return k = function(e, o) {
112
+ e = e - 107;
113
+ var d = x[e];
114
+ return d;
115
+ }, k(a, n);
170
116
  }
171
- function j(i, e) {
172
- var a = D();
173
- return j = function(x, o) {
174
- x = x - 269;
175
- var b = a[x];
176
- return b;
177
- }, j(i, e);
117
+ function $(a) {
118
+ var n = k;
119
+ return { name: n(120), description: "add toPdf Api", hooks: [{ hook: "newPrintTemplate", name: "add toPdf Api to PrintTemplate", description: n(118), priority: 1, run: ({ template: x, options: e }) => {
120
+ var o = n;
121
+ Object[o(107)](x, o(116), { value: F, enumerable: !1, writable: !0, configurable: !0 });
122
+ } }], leastHiprintVersion: n(117) };
178
123
  }
179
- function K(i) {
180
- var e = j;
181
- return { name: "add toPdf Api", description: e(280), hooks: [{ hook: e(275), name: e(284), description: e(284), priority: 1, run: ({ template: a, options: x }) => {
182
- var o = e;
183
- Object[o(283)](a, o(277), { value: E, enumerable: ![], writable: !![], configurable: !![] });
184
- } }], leastHiprintVersion: e(273) };
124
+ function C() {
125
+ var a = ["add toPdf Api", "9333550RwXQdP", "defineProperty", "312718ZVTmse", "539938NUAttv", "824089SpfuXz", "40TnvvPr", "1473846SJXJZg", "6WFTWOY", "161065QkcmVK", "44xZTOUo", "toPdf", "0.3.0", "add toPdf Api to PrintTemplate", "845469rygPpW"];
126
+ return C = function() {
127
+ return a;
128
+ }, C();
185
129
  }
186
130
  export {
187
- K as default
131
+ $ as default
188
132
  };
package/dist/index.umd.js CHANGED
@@ -1,37 +1 @@
1
- (function(d,h){typeof exports=="object"&&typeof module!="undefined"?module.exports=h(require("@zumer/snapdom"),require("jspdf")):typeof define=="function"&&define.amd?define(["@zumer/snapdom","jspdf"],h):(d=typeof globalThis!="undefined"?globalThis:d||self,d.pluginApiPdf=h(d.window,d.jspdf))})(this,function(d,h){"use strict";var W=(d,h,g)=>new Promise((m,u)=>{var v=n=>{try{y(g.next(n))}catch(e){u(e)}},P=n=>{try{y(g.throw(n))}catch(e){u(e)}},y=n=>n.done?m(n.value):Promise.resolve(n.value).then(v,P);y((g=g.apply(d,h)).next())});(function(n,e){const a=m,x=n();for(;[];)try{if(parseInt(a(189))/1+-parseInt(a(195))/2+-parseInt(a(151))/3*(parseInt(a(138))/4)+-parseInt(a(143))/5+-parseInt(a(184))/6*(parseInt(a(177))/7)+-parseInt(a(133))/8+-parseInt(a(201))/9*(-parseInt(a(196))/10)===e)break;x.push(x.shift())}catch(l){x.push(x.shift())}})(u,780489);const g=function(n,e,a){return W(this,null,function*(){const x=m;var l=this,_=globalThis.$.Deferred(),J=!![];let L=(C,G)=>{const b=m,r=Math[b(199)](C/G*100);console.log("cur",C,b(192),G),console[b(156)](b(187),r+"%")},t=a||{};if(this[x(171)][x(174)]){if(typeof e===x(172)){const c=e[x(125)](".pdf")>-1?e:e+x(179);t.name=c}else t=e||{},!t[x(182)]&&(t[x(182)]=x(193)+Date[x(131)]()+".pdf");let C=this[x(171)][0][x(141)],G=this[x(171)][0].height;var O=globalThis.hinnn.mm[x(162)](t[x(175)]||C),R=globalThis[x(140)].mm[x(162)](t[x(153)]||G),T=globalThis.$[x(197)]({},t||{});const b=this[x(171)][0][x(128)],r=this[x(171)][0][x(176)],z=r&&(r[x(132)]>0||r[x(129)]>0),B=b!=null&&b!=""&&b!=x(144);var k=new h.jsPDF({orientation:this[x(161)](0)==1?x(136):x(181),unit:"pt",format:B?b.toLocaleLowerCase():[O,R]}),I=yield this[x(164)](n,t);t&&(t.pixelRatio&&(T.dpr=t[x(198)],T.scale=t[x(198)]),t[x(134)]!=null&&(J=t[x(134)]),t[x(148)]!=null&&(L=t[x(148)])),globalThis.$(I)[x(137)](x(141),"")[x(137)](x(183),""),this[x(194)]();var w=this[x(155)]();if(z&&t[x(175)]&&t[x(153)]){let c=Math[x(199)](t.paperWidth/(C+r.layoutRowGap/2)),f=Math.floor(t[x(153)]/(G+r.layoutColumnGap/2));const j=c*f,s=I[x(139)](x(123)),N=s[x(174)],i=Math[x(120)](N/j);let p=globalThis.$(x(146));r[x(186)]==x(173)?p[x(168)](x(135)+(Number(r[x(132)])||0)/2+x(122)+(Number(r.layoutColumnGap)||0)/2+`mm;
2
- }
3
- .hiprint-printTemplate .hiprint-printPanel-small {
4
- display:inline-block;
5
- padding: `+(Number(r[x(132)])||0)/2+"mm "+(Number(r.layoutColumnGap)||0)/2+x(185)):p[x(168)](`<style>
6
- .hiprint-printPanel-small{
7
- box-sizing: border-box;
8
- border: 0px;
9
- }
10
- .hiprint-printPaper-small{
11
- position: relative;
12
- padding: 0;
13
- }
14
- .hiprint-printTemplate .hiprint-printPaper{
15
- display: flex;
16
- flex-wrap: wrap;
17
- flex-direction: column;
18
- align-content: flex-start;
19
- margin: -`+(Number(r[x(132)])||0)/2+"mm -"+(Number(r[x(129)])||0)/2+x(204)+(Number(r[x(132)])||0)/2+x(157)+(Number(r.layoutColumnGap)||0)/2+x(185));for(let o=0;o<i;o++){const D=globalThis.$(x(152)+t.paperWidth+x(154)+t[x(153)]+x(118)),q=o*j,E=Math.min((o+1)*j,N);for(let M=q;M<E;M++){const A=s.eq(M)[x(150)]();A[x(127)](x(170)),A[x(158)](x(160)+M);const U=globalThis.$('<div class="hiprint-printPanel-small"></div>');U.append(A),D[x(139)](x(178)).append(U)}p.append(D)}this[x(169)](p,T),w[x(145)](p[0]),globalThis.$(p)[x(137)](x(200))}else this.svg2canvas(I,T),w[x(145)](I[0]),globalThis.$(I)[x(137)](x(200));let $=w[x(139)](x(123))[x(174)];this.loadAllImages(w,function(){const c=x;try{w[c(139)](c(123))[c(165)](function(f,j){const s=c;globalThis[s(140)][s(191)][s(119)](function(N){const i=s;d.snapdom[i(147)](j,T)[i(159)](function(p){const o=i;var D=p[o(180)]("2d");D[o(126)]=![];var q=p[o(142)]("image/jpeg",T.quality||.92);k[o(205)](q,"JPEG",0,0,O,R),f<$-1&&k[o(124)](),L(f+1,$),N()})[i(121)](p=>{const o=i;throw new Error(p[o(206)])})}),f==$-1&&(globalThis[s(140)][s(191)][s(119)](function(N){const i=s;if(J)l[i(202)](),k[i(130)](t[i(182)]);else{l[i(202)]();let p=t[i(167)]||"blob",o=k[i(149)](p);_[i(166)](o)}globalThis.hinnn[i(191)][i(203)]()}),globalThis[s(140)].queue.run())})}catch(f){console[c(163)](c(188)),console[c(156)](f)}})}return _[x(190)]()})};function m(n,e){const a=u();return m=function(x,l){return x=x-118,a[x]},m(n,e)}function u(){const n=["clone","6dMscGT",`<div class="hiprint-printPanel">
20
- <div class="hiprint-printPaper" style="width:`,"paperHeight","mm;height:","getTempContainer","log","mm ","addClass","then","hiprint-printPaper-small start-","getOrient","toPt","error","getHtml","each","resolve","type","append","svg2canvas","hiprint-printPaper","printPanels","string","row","length","paperWidth","panelLayoutOptions","1023631wWoxaT",".hiprint-printPaper",".pdf","getContext","landscape","name","height","30WptyTU",`mm;
21
- }
22
- </style>`,"layoutType","toPdf percent: ","toPdf \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","1168448GPmBDt","promise","queue","total","sv-print-","createTempContainer","2647114kIxruS","1428210JcRIkc","extend","pixelRatio","floor","position:fixed","261MdYkZK","removeTempContainer","clear",`mm;
23
- }
24
- .hiprint-printTemplate .hiprint-printPanel-small {
25
- display:inline-block;
26
- padding: `,"addImage","message",`mm;"></div>
27
- </div>`,"add","ceil","catch","mm -",".hiprint-printPanel .hiprint-printPaper","addPage","indexOf","imageSmoothingEnabled","removeClass","paperType","layoutColumnGap","save","now","layoutRowGap","303088jpjeEu","isDownload",`<style>
28
- .hiprint-printPanel-small{
29
- box-sizing: border-box;
30
- border: 0px;
31
- }
32
- .hiprint-printPaper-small{
33
- position: relative;
34
- padding: 0;
35
- }
36
- .hiprint-printTemplate .hiprint-printPaper{
37
- margin: -`,"portrait","css","2985212aXroAw","find","hinnn","width","toDataURL","4722770jKjDwl","\u81EA\u5B9A\u4E49","html",'<div class="hiprint-printTemplate"></div>',"toCanvas","onProgress","output"];return u=function(){return n},u()}(function(n,e){for(var a=P,x=n();[];)try{var l=parseInt(a(285))/1*(-parseInt(a(271))/2)+-parseInt(a(278))/3*(-parseInt(a(274))/4)+parseInt(a(276))/5*(-parseInt(a(270))/6)+-parseInt(a(269))/7*(parseInt(a(281))/8)+parseInt(a(286))/9+-parseInt(a(282))/10+-parseInt(a(279))/11*(-parseInt(a(272))/12);if(l===e)break;x.push(x.shift())}catch(_){x.push(x.shift())}})(v,888198);function v(){var n=["defineProperty","add toPdf Api to PrintTemplate","2723IGOXJN","8021799kZgTqd","101689obIHjr","195666UJaNvt","530sNXPXd","29986056hlVKwJ","0.3.0","2852356gBcZAa","newPrintTemplate","30pJdmwU","toPdf","6DDlCVP","11vOMLVp","add toPdf Api","808UNSBJG","15436410LeGBkC"];return v=function(){return n},v()}function P(n,e){var a=v();return P=function(x,l){x=x-269;var _=a[x];return _},P(n,e)}function y(n){var e=P;return{name:"add toPdf Api",description:e(280),hooks:[{hook:e(275),name:e(284),description:e(284),priority:1,run:({template:a,options:x})=>{var l=e;Object[l(283)](a,l(277),{value:g,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:e(273)}}return y});
1
+ (function(s,l){typeof exports=="object"&&typeof module!="undefined"?module.exports=l(require("@zumer/snapdom"),require("jspdf")):typeof define=="function"&&define.amd?define(["@zumer/snapdom","jspdf"],l):(s=typeof globalThis!="undefined"?globalThis:s||self,s.pluginApiPdf=l(s.window,s.jspdf))})(this,function(s,l){"use strict";var H=(s,l,c)=>new Promise((k,u)=>{var b=t=>{try{p(c.next(t))}catch(n){u(n)}},A=t=>{try{p(c.throw(t))}catch(n){u(n)}},p=t=>t.done?k(t.value):Promise.resolve(t.value).then(b,A);p((c=c.apply(s,l)).next())});(function(t,n){const x=u,e=t();for(;;)try{if(-parseInt(x(181))/1*(-parseInt(x(219))/2)+parseInt(x(213))/3+-parseInt(x(220))/4*(parseInt(x(212))/5)+-parseInt(x(200))/6*(parseInt(x(182))/7)+parseInt(x(227))/8+parseInt(x(203))/9+-parseInt(x(184))/10===n)break;e.push(e.shift())}catch(i){e.push(e.shift())}})(c,998909);function c(){const t=["3358983pLJjpl","paperHeight","pixelRatio","Deferred","extend","each","108cpHUHk","152tMUSqg","getOrient","addImage","createTempContainer","JPEG","printPanels","height","2738168EjIhWV","getHtml","add","#fff","自定义","name","paperWidth",".pdf","toPdf percent: ","floor",".hiprint-printPanel .hiprint-printPaper","resolve","hinnn","output","position:fixed","image/jpeg","message","indexOf","blob","toPdf 失败(可能您的图片资源无法正常加载): ","toCanvas","portrait","removeTempContainer","25766FaCiRS","455518znuvMt","clear","29328650AEjNPL","promise","queue","error","toLocaleLowerCase","toDataURL","length","catch","quality","onProgress","css","width","paperType","isDownload","find","then","12OdchtS","loadAllImages","html","11243232ZnkyFS","scale","run","toPt","imageSmoothingEnabled","now","log","svg2canvas","landscape","5345BKGGqa"];return c=function(){return t},c()}const k=function(t,n,x){return H(this,null,function*(){const e=u;var i=this,h=globalThis.$[e(216)](),q=!0;let S=(y,j)=>{const m=e,g=Math[m(236)](y/j*100);console[m(209)]("cur",y,"total",j),console.log(m(235),g+"%")},a=x||{};if(this[e(225)].length){if(typeof n=="string"){const d=n[e(175)](e(234))>-1?n:n+e(234);a[e(232)]=d}else a=n||{},!a.name&&(a.name="sv-print-"+Date[e(208)]()+e(234));let y=this[e(225)][0][e(195)],j=this[e(225)][0][e(226)];const m=a[e(233)]&&a[e(214)];var D=globalThis.hinnn.mm[e(206)](a[e(233)]||y),O=globalThis.hinnn.mm[e(206)](a[e(214)]||j),_=globalThis.$[e(217)]({backgroundColor:e(230)},a||{});const g=this[e(225)][0][e(196)],L=g!=null&&g!=""&&g!=e(231),R=this[e(221)](0)==1||m?e(179):e(211),U=L&&!m?g[e(188)]():[D,O];var I=new l.jsPDF({orientation:R,unit:"pt",format:U}),T=yield this[e(228)](t,a);a&&(a[e(215)]&&(_.dpr=a[e(215)],_[e(204)]=a.pixelRatio),a.isDownload!=null&&(q=a[e(197)]),a[e(193)]!=null&&(S=a[e(193)])),globalThis.$(T).css(e(195),"")[e(194)](e(226),""),this[e(223)]();var w=this.getTempContainer();this[e(210)](T,_),w[e(202)](T[0]),globalThis.$(T).css(e(241));let C=w[e(198)](e(237))[e(190)];this[e(201)](w,function(){const d=e;try{w[d(198)](d(237))[d(218)](function(P,W){const f=d;globalThis[f(239)].queue.add(function(E){const o=f;s.snapdom[o(178)](W,_)[o(199)](function(v){const r=o;var z=v.getContext("2d");z[r(207)]=!1;var F=v[r(189)](r(242),_[r(192)]||.92);I[r(222)](F,r(224),0,0,D,O),P<C-1&&I.addPage(),S(P+1,C),E()})[o(191)](v=>{const r=o;throw new Error(v[r(243)])})}),P==C-1&&(globalThis[f(239)][f(186)][f(229)](function(E){const o=f;if(q)i[o(180)](),I.save(a[o(232)]);else{i[o(180)]();let v=a.type||o(176),r=I[o(240)](v);h[o(238)](r)}globalThis.hinnn[o(186)][o(183)]()}),globalThis[f(239)][f(186)][f(205)]())})}catch(P){console[d(187)](d(177)),console[d(209)](P)}})}return h[e(185)]()})};function u(t,n){const x=c();return u=function(e,i){return e=e-175,x[e]},u(t,n)}(function(t,n){for(var x=b,e=t();;)try{var i=parseInt(x(110))/1+-parseInt(x(108))/2*(parseInt(x(113))/3)+parseInt(x(115))/4*(-parseInt(x(114))/5)+-parseInt(x(112))/6+parseInt(x(109))/7+-parseInt(x(111))/8*(parseInt(x(119))/9)+parseInt(x(121))/10;if(i===n)break;e.push(e.shift())}catch(h){e.push(e.shift())}})(p,452171);function b(t,n){var x=p();return b=function(e,i){e=e-107;var h=x[e];return h},b(t,n)}function A(t){var n=b;return{name:n(120),description:"add toPdf Api",hooks:[{hook:"newPrintTemplate",name:"add toPdf Api to PrintTemplate",description:n(118),priority:1,run:({template:x,options:e})=>{var i=n;Object[i(107)](x,i(116),{value:k,enumerable:!1,writable:!0,configurable:!0})}}],leastHiprintVersion:n(117)}}function p(){var t=["add toPdf Api","9333550RwXQdP","defineProperty","312718ZVTmse","539938NUAttv","824089SpfuXz","40TnvvPr","1473846SJXJZg","6WFTWOY","161065QkcmVK","44xZTOUo","toPdf","0.3.0","add toPdf Api to PrintTemplate","845469rygPpW"];return p=function(){return t},p()}return A});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sv-print/plugin-api-pdf",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "add pdf api to print template",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",