!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(global,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e,r){"use strict";const{execFile:n}=r(6);t.exports=(t,e=[],r)=>new Promise((o,i)=>{n(t,e,(t,e)=>{t?i(t):o(r?r(e):e)})})},function(t,e){t.exports=require("fs")},function(t,e){t.exports=function(t){return String(t).match(/\\?.|^$/g).reduce((t,e)=>('"'===e?t.quote^=1:t.quote||" "!==e?t.a[t.a.length-1]+=e.replace(/\\(.)/,"$1"):t.a.push(""),t),{a:[""]}).a}},function(t,e,r){"use strict";switch(r(4).platform()){case"darwin":case"linux":t.exports={print:r(5),getPrinters:r(7),getDefaultPrinter:r(8)};break;case"win32":t.exports={print:r(9),getPrinters:r(12),getDefaultPrinter:r(13)};break;default:!function(){throw new Error("Platform not supported")}()}},function(t,e){t.exports=require("os")},function(t,e,r){"use strict";const n=r(1),o=r(2),i=r(0);t.exports=(t,e={})=>{if(!t)throw"No PDF specified";if("string"!=typeof t)throw"Invalid PDF name";if(!n.existsSync(t))throw"No such file";const r=[t],{printer:s,unix:u}=e;if(s&&r.push("-d",s),u){if(!Array.isArray(u))throw"options.unix should be an array";u.map(o).reduce((t,e)=>t.concat(e),[]).forEach(t=>r.push(t))}return i("lp",r)}},function(t,e){t.exports=require("child_process")},function(t,e,r){"use strict";const n=r(0);t.exports=()=>n("lpstat",["-a"],t=>t.trim().split("\n").map(t=>t.substr(0,t.indexOf(" "))))},function(t,e,r){"use strict";const n=r(0);t.exports=()=>n("lpstat",["-d"],t=>t.substr(t.indexOf(":")+1).trim())},function(t,e,r){"use strict";const n=r(10),o=r(1),i=r(2),s=r(0),{fixPathForAsarUnpack:u}=r(11),c=["-print-to","-print-to-default","-print-dialog"];t.exports=(t,e={})=>{if(!t)throw"No PDF specified";if("string"!=typeof t)throw"Invalid PDF name";if(!o.existsSync(t))throw"No such file";let r=n.join(__dirname,"SumatraPDF.exe");r=u(r);const a=[],{printer:p,win32:f}=e;if(f){if(!Array.isArray(f))throw"options.win32 should be an array";f.map(i).reduce((t,e)=>t.concat(e),[]).forEach(t=>a.push(t))}let l=!1;return a.some(t=>!!(c.indexOf(t)>-1)&&(l=!0,!0)),l||(p?a.push("-print-to",p):a.push("-print-to-default"),a.push("-silent")),a.push(t),s(r,a)}},function(t,e){t.exports=require("path")},function(t,e,r){"use strict";const n="electron"in process.versions&&process.mainModule&&process.mainModule.filename.includes("app.asar");e.fixPathForAsarUnpack=t=>n?t.replace("app.asar","app.asar.unpacked"):t},function(t,e,r){"use strict";const n=r(0);t.exports=()=>n("wmic",["printer","get","name"],t=>t.trim().split(/\s*[\r\n]+/).slice(1))},function(t,e,r){"use strict";const n=r(0);t.exports=()=>n("wmic",["printer","get","name,default"],t=>{const e=t.trim().split(/\s*[\r\n]+/).slice(1).filter(t=>0===t.indexOf("TRUE"));return 0===e.length?"":e[0].replace(/TRUE\s+/,"")})}])}));