2024-06-29 18:29:14 +08:00
import { r as O , b as S , c as w , k as C , e as g , f as T , w as A , F as x , E as I , g as L } from "./index-QWlmoZOY.js" ; var D = { exports : { } } ; ( function ( j , M ) { ( function ( a , e ) { j . exports = e ( ) } ) ( window , function ( ) { return function ( h ) { var a = { } ; function e ( o ) { if ( a [ o ] ) return a [ o ] . exports ; var d = a [ o ] = { i : o , l : ! 1 , exports : { } } ; return h [ o ] . call ( d . exports , d , d . exports , e ) , d . l = ! 0 , d . exports } return e . m = h , e . c = a , e . d = function ( o , d , f ) { e . o ( o , d ) || Object . defineProperty ( o , d , { enumerable : ! 0 , get : f } ) } , e . r = function ( o ) { typeof Symbol < "u" && Symbol . toStringTag && Object . defineProperty ( o , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( o , "__esModule" , { value : ! 0 } ) } , e . t = function ( o , d ) { if ( d & 1 && ( o = e ( o ) ) , d & 8 || d & 4 && typeof o == "object" && o && o . _ _esModule ) return o ; var f = Object . create ( null ) ; if ( e . r ( f ) , Object . defineProperty ( f , "default" , { enumerable : ! 0 , value : o } ) , d & 2 && typeof o != "string" ) for ( var b in o ) e . d ( f , b , ( function ( i ) { return o [ i ] } ) . bind ( null , b ) ) ; return f } , e . n = function ( o ) { var d = o && o . _ _esModule ? function ( ) { return o . default } : function ( ) { return o } ; return e . d ( d , "a" , d ) , d } , e . o = function ( o , d ) { return Object . prototype . hasOwnProperty . call ( o , d ) } , e . p = "" , e ( e . s = 0 ) } ( { "./src/index.js" : function ( h , a , e ) { e . r ( a ) , e ( "./src/sass/index.scss" ) ; var o = e ( "./src/js/init.js" ) , d = o . default . init ; typeof window < "u" && ( window . printJS = d ) , a . default = d } , "./src/js/browser.js" : function ( h , a , e ) { e . r ( a ) ; 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 f = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : window ; return ! ! f . 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 } } ; a . default = o } , "./src/js/functions.js" : function ( h , a , e ) { e . r ( a ) , e . d ( a , "addWrapper" , function ( ) { return b } ) , e . d ( a , "capitalizePrint" , function ( ) { return i } ) , e . d ( a , "collectStyles" , function ( ) { return l } ) , e . d ( a , "addHeader" , function ( ) { return n } ) , e . d ( a , "cleanUp" , function ( ) { return u } ) , e . d ( a , "isRawHTML" , function ( ) { return p } ) ; var o = e ( "./src/js/modal.js" ) , d = e ( "./src/js/browser.js" ) ; function f ( t ) { "@babel/helpers - typeof" ; return typeof Symbol == "function" && typeof Symbol . iterator == "symbol" ? f = function ( c ) { return typeof c } : f = function ( c ) { return c && typeof Symbol == "function" && c . constructor === Symbol && c !== Symbol . prototype ? "symbol" : typeof c } , f ( t ) } function b ( t , s ) { var c = "font-family:" + s . font + " !important; font-size: " + s . 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 , s ) { for ( var c = document . defaultView || window , E = "" , y = c . getComputedStyle ( t , "" ) , m = 0 ; m < y . length ; m ++ ) ( s . targetStyles . indexOf ( "*" ) !== - 1 || s . targetStyle . indexOf ( y [ m ] ) !== - 1 || r ( s . targetStyles , y [ m ] ) ) && y . getPropertyValue ( y [ m ] ) && ( E += y [ m ] + ":" + y . getPropertyValue ( y [ m ] ) + ";" ) ; return E += "max-width: " + s . maxWidth + "px !important; font-size: " + s . font _size + " !important;" , E } function r ( t , s ) { for ( var c = 0 ; c < t . length ; c ++ ) if ( f ( s ) === "object" && s . indexOf ( t [ c ] ) !== - 1 ) return ! 0 ; return ! 1 } function n ( t , s ) { var c = document . createElement ( "div" ) ; if ( p ( s . header ) ) c . innerHTML = s . header ; else { var E = document . createElement ( "h1" ) , y = document . createTextNode ( s . header ) ; E . appendChild ( y ) , E . setAttribute ( "style" , s . 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 s = "mouseover" ; ( d . default . isChrome ( ) || d . default . isFirefox ( ) ) && ( s = "focus" ) ; var c = function E ( ) { window . removeEventListener ( s , E ) , t . onPrintDialogClose ( ) ; var y = document . getElementById ( t . frameId ) ; y && y . remove ( ) } ; window . addEventListener ( s , c ) } function p ( t ) { var s = new RegExp ( "<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>" ) ; return s . test ( t ) } } , "./src/js/html.js" : function ( h , a , e ) { e . r ( a ) ; var o = e ( "./src/js/functions.js" ) , d = e ( "./src/js/print.js" ) ; function f ( l ) { "@babel/helpers - typeof" ; return typeof Symbol == "function" && typeof S