print-canvas-designer 0.1.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 (67) hide show
  1. package/COMMERCIAL_LICENSE.md +47 -0
  2. package/LICENSE +37 -0
  3. package/README.md +147 -0
  4. package/THIRD_PARTY_NOTICES.md +20 -0
  5. package/dist/components/PrintDesigner.vue.d.ts +49 -0
  6. package/dist/components/PrintPreview.vue.d.ts +8 -0
  7. package/dist/editor/canvas/CanvasBarcodeElement.vue.d.ts +8 -0
  8. package/dist/editor/canvas/CanvasElement.vue.d.ts +10 -0
  9. package/dist/editor/canvas/CanvasPage.vue.d.ts +7 -0
  10. package/dist/editor/canvas/CanvasQrElement.vue.d.ts +6 -0
  11. package/dist/editor/canvas/CanvasTextElement.vue.d.ts +8 -0
  12. package/dist/editor/canvas/MoveableLayer.vue.d.ts +6 -0
  13. package/dist/editor/canvas/PrintCanvas.vue.d.ts +10 -0
  14. package/dist/editor/canvas/events.d.ts +9 -0
  15. package/dist/editor/core/defaults.d.ts +12 -0
  16. package/dist/editor/core/geometry.d.ts +7 -0
  17. package/dist/editor/core/history.d.ts +13 -0
  18. package/dist/editor/core/pluginOptions.d.ts +3 -0
  19. package/dist/editor/core/schema.d.ts +162 -0
  20. package/dist/editor/core/text.d.ts +17 -0
  21. package/dist/editor/core/units.d.ts +9 -0
  22. package/dist/editor/panels/ComponentShelf.vue.d.ts +2 -0
  23. package/dist/editor/panels/DesignerToolbar.vue.d.ts +2 -0
  24. package/dist/editor/panels/InspectorPanel.vue.d.ts +2 -0
  25. package/dist/editor/properties/AppearanceSection.vue.d.ts +6 -0
  26. package/dist/editor/properties/BaseSection.vue.d.ts +8 -0
  27. package/dist/editor/properties/CodeSection.vue.d.ts +6 -0
  28. package/dist/editor/properties/ComponentPropertySection.vue.d.ts +6 -0
  29. package/dist/editor/properties/GeometrySection.vue.d.ts +6 -0
  30. package/dist/editor/properties/TextSection.vue.d.ts +6 -0
  31. package/dist/editor/registry/components.d.ts +2 -0
  32. package/dist/editor/render/PrintElementContent.vue.d.ts +12 -0
  33. package/dist/editor/render/styles.d.ts +63 -0
  34. package/dist/editor/store/usePrintDesigner.d.ts +186 -0
  35. package/dist/editor/ui/BaseButton.vue.d.ts +21 -0
  36. package/dist/editor/ui/BaseColor.vue.d.ts +12 -0
  37. package/dist/editor/ui/BaseIconButton.vue.d.ts +8 -0
  38. package/dist/editor/ui/BaseIconGroup.vue.d.ts +14 -0
  39. package/dist/editor/ui/BaseInput.vue.d.ts +13 -0
  40. package/dist/editor/ui/BaseNumberInput.vue.d.ts +15 -0
  41. package/dist/editor/ui/BaseSegmented.vue.d.ts +14 -0
  42. package/dist/editor/ui/BaseSelect.vue.d.ts +14 -0
  43. package/dist/editor/ui/PropertyRow.vue.d.ts +20 -0
  44. package/dist/editor/ui/PropertySection.vue.d.ts +20 -0
  45. package/dist/favicon.ico +0 -0
  46. package/dist/favicon.svg +12 -0
  47. package/dist/html2canvas.esm-C4Mnoizn.cjs +22 -0
  48. package/dist/html2canvas.esm-dgT_1dIT.js +4871 -0
  49. package/dist/index-BEReyC5k.cjs +364 -0
  50. package/dist/index-DGkMLEeJ.js +18125 -0
  51. package/dist/index.cjs +1 -0
  52. package/dist/index.d.ts +13 -0
  53. package/dist/index.es-DGu5dqeR.js +6693 -0
  54. package/dist/index.es-Di9HyGPO.cjs +18 -0
  55. package/dist/index.mjs +21 -0
  56. package/dist/jspdf.es.min-BOsuRURv.js +10006 -0
  57. package/dist/jspdf.es.min-Cc_0fodg.cjs +217 -0
  58. package/dist/og-image.svg +56 -0
  59. package/dist/plugin.d.ts +9 -0
  60. package/dist/print-C0Dx8UZT.cjs +1 -0
  61. package/dist/print-CBevAO3L.js +705 -0
  62. package/dist/purify.es-BUDLCglq.cjs +3 -0
  63. package/dist/purify.es-CiEWEeUM.js +605 -0
  64. package/dist/robots.txt +4 -0
  65. package/dist/sitemap.xml +13 -0
  66. package/dist/style.css +1 -0
  67. package/package.json +57 -0
@@ -0,0 +1,56 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630" role="img" aria-labelledby="title desc">
2
+ <title id="title">Print Canvas Designer</title>
3
+ <desc id="desc">Vue 3 print template canvas designer preview image.</desc>
4
+ <rect width="1200" height="630" fill="#f6f8fb"/>
5
+ <rect x="70" y="70" width="1060" height="490" rx="18" fill="#ffffff" stroke="#dbe3ee" stroke-width="2"/>
6
+ <rect x="70" y="70" width="1060" height="64" rx="18" fill="#eff6ff"/>
7
+ <rect x="70" y="116" width="1060" height="18" fill="#eff6ff"/>
8
+ <circle cx="112" cy="102" r="10" fill="#2563eb"/>
9
+ <circle cx="144" cy="102" r="10" fill="#93c5fd"/>
10
+ <circle cx="176" cy="102" r="10" fill="#bfdbfe"/>
11
+ <text x="220" y="110" fill="#172033" font-family="Arial, sans-serif" font-size="28" font-weight="700">Print Canvas Designer</text>
12
+ <rect x="110" y="174" width="190" height="324" rx="10" fill="#f8fafc" stroke="#dbe3ee"/>
13
+ <text x="136" y="220" fill="#475569" font-family="Arial, sans-serif" font-size="24" font-weight="700">Components</text>
14
+ <rect x="136" y="252" width="58" height="48" rx="8" fill="#ffffff" stroke="#bfdbfe"/>
15
+ <rect x="216" y="252" width="58" height="48" rx="8" fill="#ffffff" stroke="#bfdbfe"/>
16
+ <rect x="136" y="322" width="58" height="48" rx="8" fill="#ffffff" stroke="#bfdbfe"/>
17
+ <rect x="216" y="322" width="58" height="48" rx="8" fill="#ffffff" stroke="#bfdbfe"/>
18
+ <rect x="350" y="174" width="360" height="324" rx="4" fill="#ffffff" stroke="#cbd5e1"/>
19
+ <text x="386" y="228" fill="#111827" font-family="Arial, sans-serif" font-size="28" font-weight="800">SHOE BOX LABEL</text>
20
+ <rect x="386" y="258" width="250" height="72" fill="#ffffff" stroke="#111827"/>
21
+ <g fill="#111827">
22
+ <rect x="398" y="272" width="5" height="44"/>
23
+ <rect x="410" y="272" width="12" height="44"/>
24
+ <rect x="430" y="272" width="6" height="44"/>
25
+ <rect x="446" y="272" width="16" height="44"/>
26
+ <rect x="472" y="272" width="7" height="44"/>
27
+ <rect x="490" y="272" width="13" height="44"/>
28
+ <rect x="516" y="272" width="5" height="44"/>
29
+ <rect x="532" y="272" width="18" height="44"/>
30
+ <rect x="560" y="272" width="8" height="44"/>
31
+ <rect x="580" y="272" width="12" height="44"/>
32
+ <rect x="606" y="272" width="6" height="44"/>
33
+ </g>
34
+ <text x="386" y="370" fill="#111827" font-family="Arial, sans-serif" font-size="32" font-weight="800">RUN-2048-BR-42</text>
35
+ <rect x="386" y="398" width="72" height="72" fill="#ffffff" stroke="#111827"/>
36
+ <g fill="#111827">
37
+ <rect x="396" y="408" width="12" height="12"/>
38
+ <rect x="408" y="408" width="12" height="12"/>
39
+ <rect x="432" y="408" width="12" height="12"/>
40
+ <rect x="396" y="420" width="12" height="12"/>
41
+ <rect x="420" y="420" width="12" height="12"/>
42
+ <rect x="444" y="420" width="12" height="12"/>
43
+ <rect x="408" y="432" width="12" height="12"/>
44
+ <rect x="432" y="432" width="12" height="12"/>
45
+ <rect x="396" y="456" width="12" height="12"/>
46
+ <rect x="420" y="456" width="12" height="12"/>
47
+ <rect x="444" y="456" width="12" height="12"/>
48
+ </g>
49
+ <text x="486" y="430" fill="#475569" font-family="Arial, sans-serif" font-size="24">Text · Image · QR · Barcode</text>
50
+ <rect x="760" y="174" width="330" height="324" rx="10" fill="#f8fafc" stroke="#dbe3ee"/>
51
+ <text x="792" y="220" fill="#475569" font-family="Arial, sans-serif" font-size="24" font-weight="700">Inspector</text>
52
+ <rect x="792" y="252" width="250" height="34" rx="6" fill="#dbeafe"/>
53
+ <rect x="792" y="306" width="210" height="34" rx="6" fill="#bfdbfe"/>
54
+ <rect x="792" y="360" width="230" height="34" rx="6" fill="#dbeafe"/>
55
+ <text x="110" y="590" fill="#2563eb" font-family="Arial, sans-serif" font-size="28" font-weight="700">Vue 3 print template canvas designer</text>
56
+ </svg>
@@ -0,0 +1,9 @@
1
+ import { App } from 'vue';
2
+ import { PrintDesignerPluginOptions } from './editor/core/schema';
3
+ export declare const createPrintDesignerPlugin: (options?: PrintDesignerPluginOptions) => {
4
+ install(app: App): void;
5
+ };
6
+ declare const _default: {
7
+ install(app: App): void;
8
+ };
9
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";const w=require("./index-BEReyC5k.cjs");function C(v,j){for(var h=0;h<j.length;h++){const d=j[h];if(typeof d!="string"&&!Array.isArray(d)){for(const n in d)if(n!=="default"&&!(n in v)){const o=Object.getOwnPropertyDescriptor(d,n);o&&Object.defineProperty(v,n,o.get?o:{enumerable:!0,get:()=>d[n]})}}}return Object.freeze(Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}))}var O={exports:{}},P;function T(){return P||(P=1,(function(v,j){(function(d,n){v.exports=n()})(window,function(){return(function(h){var d={};function n(o){if(d[o])return d[o].exports;var a=d[o]={i:o,l:!1,exports:{}};return h[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=h,n.c=d,n.d=function(o,a,s){n.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:s})},n.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,a){if(a&1&&(o=n(o)),a&8||a&4&&typeof o=="object"&&o&&o.__esModule)return o;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:o}),a&2&&typeof o!="string")for(var b in o)n.d(s,b,(function(i){return o[i]}).bind(null,b));return s},n.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(a,"a",a),a},n.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},n.p="",n(n.s=0)})({"./src/index.js":(function(h,d,n){n.r(d),n("./src/sass/index.scss");var o=n("./src/js/init.js"),a=o.default.init;typeof window<"u"&&(window.printJS=a),d.default=a}),"./src/js/browser.js":(function(h,d,n){n.r(d);var o={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!o.isIE()&&!!window.StyleMedia},isChrome:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!s.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};d.default=o}),"./src/js/functions.js":(function(h,d,n){n.r(d),n.d(d,"addWrapper",function(){return b}),n.d(d,"capitalizePrint",function(){return i}),n.d(d,"collectStyles",function(){return l}),n.d(d,"addHeader",function(){return e}),n.d(d,"cleanUp",function(){return u}),n.d(d,"isRawHTML",function(){return y});var o=n("./src/js/modal.js"),a=n("./src/js/browser.js");function s(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(c){return typeof c}:s=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},s(t)}function b(t,f){var c="font-family:"+f.font+" !important; font-size: "+f.font_size+" !important; width:100%;";return'<div style="'+c+'">'+t+"</div>"}function i(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t,f){for(var c=document.defaultView||window,E="",p=c.getComputedStyle(t,""),g=0;g<p.length;g++)(f.targetStyles.indexOf("*")!==-1||f.targetStyle.indexOf(p[g])!==-1||r(f.targetStyles,p[g]))&&p.getPropertyValue(p[g])&&(E+=p[g]+":"+p.getPropertyValue(p[g])+";");return E+="max-width: "+f.maxWidth+"px !important; font-size: "+f.font_size+" !important;",E}function r(t,f){for(var c=0;c<t.length;c++)if(s(f)==="object"&&f.indexOf(t[c])!==-1)return!0;return!1}function e(t,f){var c=document.createElement("div");if(y(f.header))c.innerHTML=f.header;else{var E=document.createElement("h1"),p=document.createTextNode(f.header);E.appendChild(p),E.setAttribute("style",f.headerStyle),c.appendChild(E)}t.insertBefore(c,t.childNodes[0])}function u(t){t.showModal&&o.default.close(),t.onLoadingEnd&&t.onLoadingEnd(),(t.showModal||t.onLoadingStart)&&window.URL.revokeObjectURL(t.printable);var f="mouseover";(a.default.isChrome()||a.default.isFirefox())&&(f="focus");var c=function E(){window.removeEventListener(f,E),t.onPrintDialogClose();var p=document.getElementById(t.frameId);p&&p.remove()};window.addEventListener(f,c)}function y(t){var f=new RegExp("<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>");return f.test(t)}}),"./src/js/html.js":(function(h,d,n){n.r(d);var o=n("./src/js/functions.js"),a=n("./src/js/print.js");function s(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(e){return typeof e}:s=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(l)}d.default={print:function(r,e){var u=i(r.printable)?r.printable:document.getElementById(r.printable);if(!u){window.console.error("Invalid HTML element id: "+r.printable);return}r.printableElement=b(u,r),r.header&&Object(o.addHeader)(r.printableElement,r),a.default.send(r,e)}};function b(l,r){for(var e=l.cloneNode(),u=Array.prototype.slice.call(l.childNodes),y=0;y<u.length;y++)if(r.ignoreElements.indexOf(u[y].id)===-1){var t=b(u[y],r);e.appendChild(t)}switch(r.scanStyles&&l.nodeType===1&&e.setAttribute("style",Object(o.collectStyles)(l,r)),l.tagName){case"SELECT":e.value=l.value;break;case"CANVAS":e.getContext("2d").drawImage(l,0,0);break}return e}function i(l){return s(l)==="object"&&l&&(l instanceof HTMLElement||l.nodeType===1)}}),"./src/js/image.js":(function(h,d,n){n.r(d);var o=n("./src/js/functions.js"),a=n("./src/js/print.js"),s=n("./src/js/browser.js");d.default={print:function(i,l){i.printable.constructor!==Array&&(i.printable=[i.printable]),i.printableElement=document.createElement("div"),i.printable.forEach(function(r){var e=document.createElement("img");if(e.setAttribute("style",i.imageStyle),e.src=r,s.default.isFirefox()){var u=e.src;e.src=u}var y=document.createElement("div");y.appendChild(e),i.printableElement.appendChild(y)}),i.header&&Object(o.addHeader)(i.printableElement,i),a.default.send(i,l)}}}),"./src/js/init.js":(function(h,d,n){n.r(d);var o=n("./src/js/browser.js"),a=n("./src/js/modal.js"),s=n("./src/js/pdf.js"),b=n("./src/js/html.js"),i=n("./src/js/raw-html.js"),l=n("./src/js/image.js"),r=n("./src/js/json.js");function e(y){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(f){return typeof f}:e=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},e(y)}var u=["pdf","html","image","json","raw-html"];d.default={init:function(){var t={printable:null,fallbackPrintable:null,type:"pdf",header:null,headerStyle:"font-weight: 300;",maxWidth:800,properties:null,gridHeaderStyle:"font-weight: bold; padding: 5px; border: 1px solid #dddddd;",gridStyle:"border: 1px solid lightgray; margin-bottom: -1px;",showModal:!1,onError:function(S){throw S},onLoadingStart:null,onLoadingEnd:null,onPrintDialogClose:function(){},onIncompatibleBrowser:function(){},modalMessage:"Retrieving Document...",frameId:"printJS",printableElement:null,documentTitle:"Document",targetStyle:["clear","display","width","min-width","height","min-height","max-height"],targetStyles:["border","box","break","text-decoration"],ignoreElements:[],repeatTableHeader:!0,css:null,style:null,scanStyles:!0,base64:!1,onPdfOpen:null,font:"TimesNewRoman",font_size:"12pt",honorMarginPadding:!0,honorColor:!1,imageStyle:"max-width: 100%;"},f=arguments[0];if(f===void 0)throw new Error("printJS expects at least 1 attribute.");switch(e(f)){case"string":t.printable=encodeURI(f),t.fallbackPrintable=t.printable,t.type=arguments[1]||t.type;break;case"object":t.printable=f.printable,t.fallbackPrintable=typeof f.fallbackPrintable<"u"?f.fallbackPrintable:t.printable,t.fallbackPrintable=t.base64?"data:application/pdf;base64,".concat(t.fallbackPrintable):t.fallbackPrintable;for(var c in t)c==="printable"||c==="fallbackPrintable"||(t[c]=typeof f[c]<"u"?f[c]:t[c]);break;default:throw new Error('Unexpected argument type! Expected "string" or "object", got '+e(f))}if(!t.printable)throw new Error("Missing printable information.");if(!t.type||typeof t.type!="string"||u.indexOf(t.type.toLowerCase())===-1)throw new Error("Invalid print type. Available types are: pdf, html, image and json.");t.showModal&&a.default.show(t),t.onLoadingStart&&t.onLoadingStart();var E=document.getElementById(t.frameId);E&&E.parentNode.removeChild(E);var p=document.createElement("iframe");switch(o.default.isFirefox()?p.setAttribute("style","width: 1px; height: 100px; position: fixed; left: 0; top: 0; opacity: 0; border-width: 0; margin: 0; padding: 0"):p.setAttribute("style","visibility: hidden; height: 0; width: 0; position: absolute; border: 0"),p.setAttribute("id",t.frameId),t.type!=="pdf"&&(p.srcdoc="<html><head><title>"+t.documentTitle+"</title>",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(m){p.srcdoc+='<link rel="stylesheet" href="'+m+'">'})),p.srcdoc+="</head><body></body></html>"),t.type){case"pdf":if(o.default.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer.");var g=window.open(t.fallbackPrintable,"_blank");g.focus(),t.onIncompatibleBrowser()}catch(m){t.onError(m)}finally{t.showModal&&a.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else s.default.print(t,p);break;case"image":l.default.print(t,p);break;case"html":b.default.print(t,p);break;case"raw-html":i.default.print(t,p);break;case"json":r.default.print(t,p);break}}}}),"./src/js/json.js":(function(h,d,n){n.r(d);var o=n("./src/js/functions.js"),a=n("./src/js/print.js");function s(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(r){return typeof r}:s=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},s(i)}d.default={print:function(l,r){if(s(l.printable)!=="object")throw new Error("Invalid javascript data object (JSON).");if(typeof l.repeatTableHeader!="boolean")throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!l.properties||!Array.isArray(l.properties))throw new Error("Invalid properties array for your JSON data.");l.properties=l.properties.map(function(e){return{field:s(e)==="object"?e.field:e,displayName:s(e)==="object"?e.displayName:e,columnSize:s(e)==="object"&&e.columnSize?e.columnSize+";":100/l.properties.length+"%;"}}),l.printableElement=document.createElement("div"),l.header&&Object(o.addHeader)(l.printableElement,l),l.printableElement.innerHTML+=b(l),a.default.send(l,r)}};function b(i){var l=i.printable,r=i.properties,e='<table style="border-collapse: collapse; width: 100%;">';i.repeatTableHeader&&(e+="<thead>"),e+="<tr>";for(var u=0;u<r.length;u++)e+='<th style="width:'+r[u].columnSize+";"+i.gridHeaderStyle+'">'+Object(o.capitalizePrint)(r[u].displayName)+"</th>";e+="</tr>",i.repeatTableHeader&&(e+="</thead>"),e+="<tbody>";for(var y=0;y<l.length;y++){e+="<tr>";for(var t=0;t<r.length;t++){var f=l[y],c=r[t].field.split(".");if(c.length>1)for(var E=0;E<c.length;E++)f=f[c[E]];else f=f[r[t].field];e+='<td style="width:'+r[t].columnSize+i.gridStyle+'">'+f+"</td>"}e+="</tr>"}return e+="</tbody></table>",e}}),"./src/js/modal.js":(function(h,d,n){n.r(d);var o={show:function(s){var b="font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;",i=document.createElement("div");i.setAttribute("style",b),i.setAttribute("id","printJS-Modal");var l=document.createElement("div");l.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),l.appendChild(r);var e=document.createElement("span");e.setAttribute("class","printSpinner"),l.appendChild(e);var u=document.createTextNode(s.modalMessage);l.appendChild(u),i.appendChild(l),document.getElementsByTagName("body")[0].appendChild(i),document.getElementById("printClose").addEventListener("click",function(){o.close()})},close:function(){var s=document.getElementById("printJS-Modal");s&&s.parentNode.removeChild(s)}};d.default=o}),"./src/js/pdf.js":(function(h,d,n){n.r(d);var o=n("./src/js/print.js"),a=n("./src/js/functions.js");d.default={print:function(i,l){if(i.base64){var r=Uint8Array.from(atob(i.printable),function(u){return u.charCodeAt(0)});s(i,l,r);return}i.printable=/^(blob|http|\/\/)/i.test(i.printable)?i.printable:window.location.origin+(i.printable.charAt(0)!=="/"?"/"+i.printable:i.printable);var e=new window.XMLHttpRequest;e.responseType="arraybuffer",e.addEventListener("error",function(){Object(a.cleanUp)(i),i.onError(e.statusText,e)}),e.addEventListener("load",function(){if([200,201].indexOf(e.status)===-1){Object(a.cleanUp)(i),i.onError(e.statusText,e);return}s(i,l,e.response)}),e.open("GET",i.printable,!0),e.send()}};function s(b,i,l){var r=new window.Blob([l],{type:"application/pdf"});r=window.URL.createObjectURL(r),i.setAttribute("src",r),o.default.send(b,i)}}),"./src/js/print.js":(function(h,d,n){n.r(d);var o=n("./src/js/browser.js"),a=n("./src/js/functions.js"),s={send:function(e,u){document.getElementsByTagName("body")[0].appendChild(u);var y=document.getElementById(e.frameId);y.onload=function(){if(e.type==="pdf"){o.default.isFirefox()?setTimeout(function(){return b(y,e)},1e3):b(y,e);return}var t=y.contentWindow||y.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(e.printableElement),e.type!=="pdf"&&e.style){var f=document.createElement("style");f.innerHTML=e.style,t.head.appendChild(f)}var c=t.getElementsByTagName("img");c.length>0?i(Array.from(c)).then(function(){return b(y,e)}):b(y,e)}}};function b(r,e){try{if(r.focus(),o.default.isEdge()||o.default.isIE())try{r.contentWindow.document.execCommand("print",!1,null)}catch{r.contentWindow.print()}else r.contentWindow.print()}catch(u){e.onError(u)}finally{o.default.isFirefox()&&(r.style.visibility="hidden",r.style.left="-1px"),Object(a.cleanUp)(e)}}function i(r){var e=r.map(function(u){if(u.src&&u.src!==window.location.href)return l(u)});return Promise.all(e)}function l(r){return new Promise(function(e){var u=function y(){!r||typeof r.naturalWidth>"u"||r.naturalWidth===0||!r.complete?setTimeout(y,500):e()};u()})}d.default=s}),"./src/js/raw-html.js":(function(h,d,n){n.r(d);var o=n("./src/js/print.js");d.default={print:function(s,b){s.printableElement=document.createElement("div"),s.printableElement.setAttribute("style","width:100%"),s.printableElement.innerHTML=s.printable,o.default.send(s,b)}}}),"./src/sass/index.scss":(function(h,d,n){}),0:(function(h,d,n){h.exports=n("./src/index.js")})}).default})})(O)),O.exports}var M=T();const A=w.getDefaultExportFromCjs(M),I=C({__proto__:null,default:A},[M]);exports.print=I;