@univerjs-pro/print 0.22.1 → 0.23.0

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/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x395fd8=_0xc1ee;(function(_0x17bd3c,_0x4d83a5){const _0x2f1cfc=_0xc1ee,_0x7bc760=_0x17bd3c();while(!![]){try{const _0x571bc9=-parseInt(_0x2f1cfc(0x12b))/0x1*(parseInt(_0x2f1cfc(0x124))/0x2)+parseInt(_0x2f1cfc(0x11e))/0x3+parseInt(_0x2f1cfc(0x105))/0x4+parseInt(_0x2f1cfc(0x11b))/0x5*(parseInt(_0x2f1cfc(0x10c))/0x6)+-parseInt(_0x2f1cfc(0x12e))/0x7+parseInt(_0x2f1cfc(0x12f))/0x8+-parseInt(_0x2f1cfc(0x11c))/0x9*(-parseInt(_0x2f1cfc(0x113))/0xa);if(_0x571bc9===_0x4d83a5)break;else _0x7bc760['push'](_0x7bc760['shift']());}catch(_0x25be7c){_0x7bc760['push'](_0x7bc760['shift']());}}}(_0x2e42,0xeaf73),Object['defineProperty'](exports,Symbol[_0x395fd8(0x119)],{'value':_0x395fd8(0x11a)}));function _0x2e42(){const _0x36faea=['Middle','PRINT_CONTAINER_CLASS','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','10mxTAsr','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','Narrow','className','Origin','Custom','toStringTag','Module','709615rzIDMh','7743447STimvm','Portrait','3414972obTPJP','\x0a\x20\x20\x20\x20.',',\x20.','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','Normal','927284BDDdeO','FitPage','PrintDirection','FitHeight','Start','createPrintStyle','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','2NcAgVI','printing-canvas-container','Wide','5640789QUVolH','642208MmMmZH','PaperMarginMap','1330804VPXMfP','PrintScale','innerHTML','FitWidth','PrintAlign','createElement','style','12SFeZOE','Landscape','offline-printing-css','End'];_0x2e42=function(){return _0x36faea;};return _0x2e42();}function _0xc1ee(_0x35966b,_0x4734f3){_0x35966b=_0x35966b-0x104;const _0x2e42a7=_0x2e42();let _0xc1eed=_0x2e42a7[_0x35966b];return _0xc1eed;}let PrintDirection=function(_0x5b34fc){const _0x203824=_0x395fd8;return _0x5b34fc[_0x203824(0x11d)]='Portrait',_0x5b34fc['Landscape']=_0x203824(0x10d),_0x5b34fc;}({}),PrintScale=function(_0x3ad1d9){const _0x34103a=_0x395fd8;return _0x3ad1d9[_0x34103a(0x117)]='Origin',_0x3ad1d9['FitWidth']=_0x34103a(0x108),_0x3ad1d9[_0x34103a(0x127)]=_0x34103a(0x127),_0x3ad1d9[_0x34103a(0x125)]='FitPage',_0x3ad1d9['Custom']='Custom',_0x3ad1d9;}({}),PrintAlign=function(_0x2673ef){const _0x54f21f=_0x395fd8;return _0x2673ef[_0x54f21f(0x128)]='Start',_0x2673ef[_0x54f21f(0x10f)]=_0x54f21f(0x10f),_0x2673ef['Middle']=_0x54f21f(0x110),_0x2673ef;}({}),PrintPaperMargin=function(_0x785ebe){const _0x289350=_0x395fd8;return _0x785ebe[_0x289350(0x123)]=_0x289350(0x123),_0x785ebe[_0x289350(0x115)]=_0x289350(0x115),_0x785ebe[_0x289350(0x12d)]=_0x289350(0x12d),_0x785ebe['None']='None',_0x785ebe[_0x289350(0x118)]=_0x289350(0x118),_0x785ebe;}({});const PaperMarginMap={[_0x395fd8(0x123)]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},[_0x395fd8(0x115)]:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[_0x395fd8(0x12d)]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},['None']:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},[_0x395fd8(0x118)]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},PRINT_CONTAINER_CLASS=_0x395fd8(0x12c),PRINT_CANVAS_CLASS='printing-canvas';function createPrintStyle(_0x29cffb,_0x773900,_0x42f5c7){const _0x30859a=_0x395fd8,_0x3041eb=_0x42f5c7===_0x30859a(0x11d)?_0x29cffb:_0x773900,_0x5ac420=_0x42f5c7===_0x30859a(0x11d)?_0x773900:_0x29cffb,_0xc6487=_0x30859a(0x11f)+PRINT_CANVAS_CLASS+_0x30859a(0x121)+_0x3041eb+'px\x20'+_0x5ac420+_0x30859a(0x114)+PRINT_CONTAINER_CLASS+_0x30859a(0x120)+PRINT_CONTAINER_CLASS+_0x30859a(0x12a)+PRINT_CANVAS_CLASS+_0x30859a(0x122)+_0x5ac420+'px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20'+_0x3041eb+_0x30859a(0x112),_0x1aa3d4=document[_0x30859a(0x10a)](_0x30859a(0x10b));return _0x1aa3d4[_0x30859a(0x107)]=_0xc6487,_0x1aa3d4[_0x30859a(0x116)]=_0x30859a(0x10e),_0x1aa3d4;}exports['PRINT_CANVAS_CLASS']=PRINT_CANVAS_CLASS,exports[_0x395fd8(0x111)]=PRINT_CONTAINER_CLASS,exports[_0x395fd8(0x104)]=PaperMarginMap,exports[_0x395fd8(0x109)]=PrintAlign,exports[_0x395fd8(0x126)]=PrintDirection,exports['PrintPaperMargin']=PrintPaperMargin,exports[_0x395fd8(0x106)]=PrintScale,exports[_0x395fd8(0x129)]=createPrintStyle;
1
+ const _0x333be3=_0x493c;function _0x5520(){const _0x5d4352=['Custom','PrintAlign','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','FitPage','printing-canvas','\x0a\x20\x20\x20\x20.','Middle','defineProperty','Normal','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','offline-printing-css','1042rqWCIN','Landscape','5955600LATFtz','FitHeight','toStringTag',',\x20.','createPrintStyle','PaperMarginMap','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','26721GYdZww','None','PrintScale','PRINT_CONTAINER_CLASS','5NEzYFk','Portrait','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','PRINT_CANVAS_CLASS','367SaZrck','Module','318092mmXyti','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','innerHTML','50607YTpqiG','px\x20','End','8GQSsaM','PrintPaperMargin','677824sYKARG','Origin','style','Wide','Start','printing-canvas-container','473694fOWniM','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','Narrow'];_0x5520=function(){return _0x5d4352;};return _0x5520();}(function(_0x53546d,_0x1436c0){const _0x148e97=_0x493c,_0x23f15b=_0x53546d();while(!![]){try{const _0x2c08e0=parseInt(_0x148e97(0x174))/0x1*(-parseInt(_0x148e97(0x163))/0x2)+-parseInt(_0x148e97(0x16c))/0x3+-parseInt(_0x148e97(0x147))/0x4*(parseInt(_0x148e97(0x170))/0x5)+-parseInt(_0x148e97(0x155))/0x6+-parseInt(_0x148e97(0x14f))/0x7+parseInt(_0x148e97(0x14d))/0x8*(-parseInt(_0x148e97(0x14a))/0x9)+parseInt(_0x148e97(0x165))/0xa;if(_0x2c08e0===_0x1436c0)break;else _0x23f15b['push'](_0x23f15b['shift']());}catch(_0x3e1a80){_0x23f15b['push'](_0x23f15b['shift']());}}}(_0x5520,0x20d77),Object[_0x333be3(0x15f)](exports,Symbol[_0x333be3(0x167)],{'value':_0x333be3(0x146)}));let e=function(_0x3e3e44){const _0x58eafe=_0x333be3;return _0x3e3e44[_0x58eafe(0x171)]=_0x58eafe(0x171),_0x3e3e44[_0x58eafe(0x164)]=_0x58eafe(0x164),_0x3e3e44;}({}),t=function(_0x1de988){const _0x2f902e=_0x333be3;return _0x1de988[_0x2f902e(0x150)]='Origin',_0x1de988['FitWidth']='FitWidth',_0x1de988[_0x2f902e(0x166)]=_0x2f902e(0x166),_0x1de988['FitPage']=_0x2f902e(0x15b),_0x1de988['Custom']=_0x2f902e(0x158),_0x1de988;}({}),n=function(_0xecc62c){const _0x170ff7=_0x333be3;return _0xecc62c[_0x170ff7(0x153)]='Start',_0xecc62c[_0x170ff7(0x14c)]=_0x170ff7(0x14c),_0xecc62c['Middle']=_0x170ff7(0x15e),_0xecc62c;}({}),r=function(_0x184941){const _0x5becb9=_0x333be3;return _0x184941[_0x5becb9(0x160)]=_0x5becb9(0x160),_0x184941[_0x5becb9(0x157)]='Narrow',_0x184941['Wide']=_0x5becb9(0x152),_0x184941[_0x5becb9(0x16d)]=_0x5becb9(0x16d),_0x184941['Custom']=_0x5becb9(0x158),_0x184941;}({});function _0x493c(_0x4d631e,_0x368083){_0x4d631e=_0x4d631e-0x146;const _0x5520b0=_0x5520();let _0x493cfe=_0x5520b0[_0x4d631e];return _0x493cfe;}const i={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a=_0x333be3(0x154),o=_0x333be3(0x15c);function s(_0x285dc5,_0x42f98a,_0x36ef18){const _0x5b5bcf=_0x333be3;let _0x430e74=_0x36ef18===_0x5b5bcf(0x171)?_0x285dc5:_0x42f98a,_0x3dfae7=_0x36ef18===_0x5b5bcf(0x171)?_0x42f98a:_0x285dc5,_0x10f4ff=_0x5b5bcf(0x15d)+o+_0x5b5bcf(0x156)+_0x430e74+_0x5b5bcf(0x14b)+_0x3dfae7+_0x5b5bcf(0x16b)+a+_0x5b5bcf(0x168)+a+_0x5b5bcf(0x148)+o+_0x5b5bcf(0x161)+_0x3dfae7+_0x5b5bcf(0x15a)+_0x430e74+_0x5b5bcf(0x172),_0x55d365=document['createElement'](_0x5b5bcf(0x151));return _0x55d365[_0x5b5bcf(0x149)]=_0x10f4ff,_0x55d365['className']=_0x5b5bcf(0x162),_0x55d365;}exports[_0x333be3(0x173)]=o,exports[_0x333be3(0x16f)]=a,exports[_0x333be3(0x16a)]=i,exports[_0x333be3(0x159)]=n,exports['PrintDirection']=e,exports[_0x333be3(0x14e)]=r,exports[_0x333be3(0x16e)]=t,exports[_0x333be3(0x169)]=s;
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3d7f(_0x2a059f,_0x395d5a){_0x2a059f=_0x2a059f-0x1a5;const _0x56c6e1=_0x56c6();let _0x3d7fb7=_0x56c6e1[_0x2a059f];return _0x3d7fb7;}const _0xd6c7cd=_0x3d7f;(function(_0x2e405c,_0x2d6f7b){const _0x164962=_0x3d7f,_0xcd2471=_0x2e405c();while(!![]){try{const _0x1ce8b4=parseInt(_0x164962(0x1c3))/0x1*(parseInt(_0x164962(0x1ad))/0x2)+parseInt(_0x164962(0x1c1))/0x3+parseInt(_0x164962(0x1aa))/0x4+-parseInt(_0x164962(0x1af))/0x5*(-parseInt(_0x164962(0x1ba))/0x6)+-parseInt(_0x164962(0x1c5))/0x7+-parseInt(_0x164962(0x1ac))/0x8+parseInt(_0x164962(0x1c4))/0x9;if(_0x1ce8b4===_0x2d6f7b)break;else _0xcd2471['push'](_0xcd2471['shift']());}catch(_0x306699){_0xcd2471['push'](_0xcd2471['shift']());}}}(_0x56c6,0xaa5b9));let PrintDirection=function(_0x5470af){const _0x147d38=_0x3d7f;return _0x5470af[_0x147d38(0x1a6)]='Portrait',_0x5470af[_0x147d38(0x1bd)]=_0x147d38(0x1bd),_0x5470af;}({}),PrintScale=function(_0x2d5dc5){const _0x484e6f=_0x3d7f;return _0x2d5dc5[_0x484e6f(0x1b3)]=_0x484e6f(0x1b3),_0x2d5dc5['FitWidth']='FitWidth',_0x2d5dc5[_0x484e6f(0x1bf)]='FitHeight',_0x2d5dc5[_0x484e6f(0x1b8)]=_0x484e6f(0x1b8),_0x2d5dc5['Custom']=_0x484e6f(0x1a5),_0x2d5dc5;}({}),PrintAlign=function(_0x4fbef5){const _0x3c6772=_0x3d7f;return _0x4fbef5[_0x3c6772(0x1c6)]=_0x3c6772(0x1c6),_0x4fbef5['End']='End',_0x4fbef5[_0x3c6772(0x1b0)]=_0x3c6772(0x1b0),_0x4fbef5;}({}),PrintPaperMargin=function(_0x29d2b7){const _0xe5edb5=_0x3d7f;return _0x29d2b7[_0xe5edb5(0x1b5)]=_0xe5edb5(0x1b5),_0x29d2b7['Narrow']=_0xe5edb5(0x1b1),_0x29d2b7['Wide']=_0xe5edb5(0x1b2),_0x29d2b7[_0xe5edb5(0x1a8)]=_0xe5edb5(0x1a8),_0x29d2b7[_0xe5edb5(0x1a5)]='Custom',_0x29d2b7;}({});const PaperMarginMap={[_0xd6c7cd(0x1b5)]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},['Narrow']:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[_0xd6c7cd(0x1b2)]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},['None']:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},[_0xd6c7cd(0x1a5)]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},PRINT_CONTAINER_CLASS=_0xd6c7cd(0x1bc),PRINT_CANVAS_CLASS=_0xd6c7cd(0x1b4);function createPrintStyle(_0x268c31,_0x4750d4,_0x51b82c){const _0x33b392=_0xd6c7cd,_0x3b00e1=_0x51b82c==='Portrait'?_0x268c31:_0x4750d4,_0x1947c4=_0x51b82c==='Portrait'?_0x4750d4:_0x268c31,_0x5205f4='\x0a\x20\x20\x20\x20.'+PRINT_CANVAS_CLASS+_0x33b392(0x1c0)+_0x3b00e1+_0x33b392(0x1a9)+_0x1947c4+_0x33b392(0x1ae)+PRINT_CONTAINER_CLASS+_0x33b392(0x1c7)+PRINT_CONTAINER_CLASS+_0x33b392(0x1bb)+PRINT_CANVAS_CLASS+_0x33b392(0x1b9)+_0x1947c4+_0x33b392(0x1c2)+_0x3b00e1+_0x33b392(0x1a7),_0x20d4c0=document[_0x33b392(0x1ab)](_0x33b392(0x1be));return _0x20d4c0[_0x33b392(0x1b6)]=_0x5205f4,_0x20d4c0[_0x33b392(0x1b7)]='offline-printing-css',_0x20d4c0;}export{PRINT_CANVAS_CLASS,PRINT_CONTAINER_CLASS,PaperMarginMap,PrintAlign,PrintDirection,PrintPaperMargin,PrintScale,createPrintStyle};function _0x56c6(){const _0x46f25b=['px\x20','1503832hjrGjf','createElement','8086640gBeitC','46KjzDRu','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','25sQTnGL','Middle','Narrow','Wide','Origin','printing-canvas','Normal','innerHTML','className','FitPage','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','709932dpOvWB','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','printing-canvas-container','Landscape','style','FitHeight','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','836856HiKOYO','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','40300ZtJzxx','1299843FcdAFb','4264624IBJAYU','Start',',\x20.','Custom','Portrait','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','None'];_0x56c6=function(){return _0x46f25b;};return _0x56c6();}
1
+ const _0x5135c6=_0x4dfe;(function(_0x2144c5,_0x3e313b){const _0x3da92e=_0x4dfe,_0x1c5a3a=_0x2144c5();while(!![]){try{const _0x659581=-parseInt(_0x3da92e(0xb0))/0x1+parseInt(_0x3da92e(0xa5))/0x2+parseInt(_0x3da92e(0xb1))/0x3*(parseInt(_0x3da92e(0xae))/0x4)+parseInt(_0x3da92e(0xbe))/0x5*(parseInt(_0x3da92e(0xc5))/0x6)+-parseInt(_0x3da92e(0xba))/0x7+parseInt(_0x3da92e(0xa3))/0x8*(parseInt(_0x3da92e(0xa9))/0x9)+parseInt(_0x3da92e(0xa0))/0xa*(-parseInt(_0x3da92e(0xa4))/0xb);if(_0x659581===_0x3e313b)break;else _0x1c5a3a['push'](_0x1c5a3a['shift']());}catch(_0x1e5713){_0x1c5a3a['push'](_0x1c5a3a['shift']());}}}(_0x5b7a,0xa3000));function _0x5b7a(){const _0xa75e8e=['FitHeight','461395DjVlga','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','style','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','FitPage','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','className','84mLGjyd','9410phxXBW','None','Origin','274024GAEJNX','23155okwbWF','1349338xmzBmn','Start','Custom','Wide','153QmixEm','offline-printing-css','px\x20','Narrow','FitWidth','10348ArNTaG','Normal','363083sHkNPQ','654GUSywm','Middle','\x0a\x20\x20\x20\x20.','innerHTML',',\x20.','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','printing-canvas-container','End','Portrait','709142bwxhbX','Landscape','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20'];_0x5b7a=function(){return _0xa75e8e;};return _0x5b7a();}function _0x4dfe(_0x1f0dd0,_0x49b005){_0x1f0dd0=_0x1f0dd0-0xa0;const _0x5b7af7=_0x5b7a();let _0x4dfe86=_0x5b7af7[_0x1f0dd0];return _0x4dfe86;}let e=function(_0x45a2a5){const _0x4ccdd5=_0x4dfe;return _0x45a2a5[_0x4ccdd5(0xb9)]=_0x4ccdd5(0xb9),_0x45a2a5['Landscape']=_0x4ccdd5(0xbb),_0x45a2a5;}({}),t=function(_0x2ff53b){const _0x526b3b=_0x4dfe;return _0x2ff53b[_0x526b3b(0xa2)]=_0x526b3b(0xa2),_0x2ff53b['FitWidth']=_0x526b3b(0xad),_0x2ff53b['FitHeight']=_0x526b3b(0xbd),_0x2ff53b[_0x526b3b(0xc2)]=_0x526b3b(0xc2),_0x2ff53b[_0x526b3b(0xa7)]=_0x526b3b(0xa7),_0x2ff53b;}({}),n=function(_0x444650){const _0x3766fc=_0x4dfe;return _0x444650['Start']=_0x3766fc(0xa6),_0x444650[_0x3766fc(0xb8)]=_0x3766fc(0xb8),_0x444650[_0x3766fc(0xb2)]=_0x3766fc(0xb2),_0x444650;}({}),r=function(_0x4f5581){const _0x57f40c=_0x4dfe;return _0x4f5581[_0x57f40c(0xaf)]='Normal',_0x4f5581['Narrow']=_0x57f40c(0xac),_0x4f5581[_0x57f40c(0xa8)]=_0x57f40c(0xa8),_0x4f5581[_0x57f40c(0xa1)]='None',_0x4f5581[_0x57f40c(0xa7)]=_0x57f40c(0xa7),_0x4f5581;}({});const i={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a=_0x5135c6(0xb7),o='printing-canvas';function s(_0x24eb7d,_0x1710f5,_0x1c8af4){const _0x299afe=_0x5135c6;let _0x26746d=_0x1c8af4===_0x299afe(0xb9)?_0x24eb7d:_0x1710f5,_0x247d22=_0x1c8af4==='Portrait'?_0x1710f5:_0x24eb7d,_0x13c85b=_0x299afe(0xb3)+o+_0x299afe(0xc1)+_0x26746d+_0x299afe(0xab)+_0x247d22+_0x299afe(0xc3)+a+_0x299afe(0xb5)+a+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.'+o+_0x299afe(0xbc)+_0x247d22+_0x299afe(0xbf)+_0x26746d+_0x299afe(0xb6),_0x4755ce=document['createElement'](_0x299afe(0xc0));return _0x4755ce[_0x299afe(0xb4)]=_0x13c85b,_0x4755ce[_0x299afe(0xc4)]=_0x299afe(0xaa),_0x4755ce;}export{o as PRINT_CANVAS_CLASS,a as PRINT_CONTAINER_CLASS,i as PaperMarginMap,n as PrintAlign,e as PrintDirection,r as PrintPaperMargin,t as PrintScale,s as createPrintStyle};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3d7f(_0x2a059f,_0x395d5a){_0x2a059f=_0x2a059f-0x1a5;const _0x56c6e1=_0x56c6();let _0x3d7fb7=_0x56c6e1[_0x2a059f];return _0x3d7fb7;}const _0xd6c7cd=_0x3d7f;(function(_0x2e405c,_0x2d6f7b){const _0x164962=_0x3d7f,_0xcd2471=_0x2e405c();while(!![]){try{const _0x1ce8b4=parseInt(_0x164962(0x1c3))/0x1*(parseInt(_0x164962(0x1ad))/0x2)+parseInt(_0x164962(0x1c1))/0x3+parseInt(_0x164962(0x1aa))/0x4+-parseInt(_0x164962(0x1af))/0x5*(-parseInt(_0x164962(0x1ba))/0x6)+-parseInt(_0x164962(0x1c5))/0x7+-parseInt(_0x164962(0x1ac))/0x8+parseInt(_0x164962(0x1c4))/0x9;if(_0x1ce8b4===_0x2d6f7b)break;else _0xcd2471['push'](_0xcd2471['shift']());}catch(_0x306699){_0xcd2471['push'](_0xcd2471['shift']());}}}(_0x56c6,0xaa5b9));let PrintDirection=function(_0x5470af){const _0x147d38=_0x3d7f;return _0x5470af[_0x147d38(0x1a6)]='Portrait',_0x5470af[_0x147d38(0x1bd)]=_0x147d38(0x1bd),_0x5470af;}({}),PrintScale=function(_0x2d5dc5){const _0x484e6f=_0x3d7f;return _0x2d5dc5[_0x484e6f(0x1b3)]=_0x484e6f(0x1b3),_0x2d5dc5['FitWidth']='FitWidth',_0x2d5dc5[_0x484e6f(0x1bf)]='FitHeight',_0x2d5dc5[_0x484e6f(0x1b8)]=_0x484e6f(0x1b8),_0x2d5dc5['Custom']=_0x484e6f(0x1a5),_0x2d5dc5;}({}),PrintAlign=function(_0x4fbef5){const _0x3c6772=_0x3d7f;return _0x4fbef5[_0x3c6772(0x1c6)]=_0x3c6772(0x1c6),_0x4fbef5['End']='End',_0x4fbef5[_0x3c6772(0x1b0)]=_0x3c6772(0x1b0),_0x4fbef5;}({}),PrintPaperMargin=function(_0x29d2b7){const _0xe5edb5=_0x3d7f;return _0x29d2b7[_0xe5edb5(0x1b5)]=_0xe5edb5(0x1b5),_0x29d2b7['Narrow']=_0xe5edb5(0x1b1),_0x29d2b7['Wide']=_0xe5edb5(0x1b2),_0x29d2b7[_0xe5edb5(0x1a8)]=_0xe5edb5(0x1a8),_0x29d2b7[_0xe5edb5(0x1a5)]='Custom',_0x29d2b7;}({});const PaperMarginMap={[_0xd6c7cd(0x1b5)]:{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},['Narrow']:{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},[_0xd6c7cd(0x1b2)]:{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},['None']:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},[_0xd6c7cd(0x1a5)]:{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},PRINT_CONTAINER_CLASS=_0xd6c7cd(0x1bc),PRINT_CANVAS_CLASS=_0xd6c7cd(0x1b4);function createPrintStyle(_0x268c31,_0x4750d4,_0x51b82c){const _0x33b392=_0xd6c7cd,_0x3b00e1=_0x51b82c==='Portrait'?_0x268c31:_0x4750d4,_0x1947c4=_0x51b82c==='Portrait'?_0x4750d4:_0x268c31,_0x5205f4='\x0a\x20\x20\x20\x20.'+PRINT_CANVAS_CLASS+_0x33b392(0x1c0)+_0x3b00e1+_0x33b392(0x1a9)+_0x1947c4+_0x33b392(0x1ae)+PRINT_CONTAINER_CLASS+_0x33b392(0x1c7)+PRINT_CONTAINER_CLASS+_0x33b392(0x1bb)+PRINT_CANVAS_CLASS+_0x33b392(0x1b9)+_0x1947c4+_0x33b392(0x1c2)+_0x3b00e1+_0x33b392(0x1a7),_0x20d4c0=document[_0x33b392(0x1ab)](_0x33b392(0x1be));return _0x20d4c0[_0x33b392(0x1b6)]=_0x5205f4,_0x20d4c0[_0x33b392(0x1b7)]='offline-printing-css',_0x20d4c0;}export{PRINT_CANVAS_CLASS,PRINT_CONTAINER_CLASS,PaperMarginMap,PrintAlign,PrintDirection,PrintPaperMargin,PrintScale,createPrintStyle};function _0x56c6(){const _0x46f25b=['px\x20','1503832hjrGjf','createElement','8086640gBeitC','46KjzDRu','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','25sQTnGL','Middle','Narrow','Wide','Origin','printing-canvas','Normal','innerHTML','className','FitPage','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','709932dpOvWB','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','printing-canvas-container','Landscape','style','FitHeight','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','836856HiKOYO','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','40300ZtJzxx','1299843FcdAFb','4264624IBJAYU','Start',',\x20.','Custom','Portrait','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','None'];_0x56c6=function(){return _0x46f25b;};return _0x56c6();}
1
+ const _0x5135c6=_0x4dfe;(function(_0x2144c5,_0x3e313b){const _0x3da92e=_0x4dfe,_0x1c5a3a=_0x2144c5();while(!![]){try{const _0x659581=-parseInt(_0x3da92e(0xb0))/0x1+parseInt(_0x3da92e(0xa5))/0x2+parseInt(_0x3da92e(0xb1))/0x3*(parseInt(_0x3da92e(0xae))/0x4)+parseInt(_0x3da92e(0xbe))/0x5*(parseInt(_0x3da92e(0xc5))/0x6)+-parseInt(_0x3da92e(0xba))/0x7+parseInt(_0x3da92e(0xa3))/0x8*(parseInt(_0x3da92e(0xa9))/0x9)+parseInt(_0x3da92e(0xa0))/0xa*(-parseInt(_0x3da92e(0xa4))/0xb);if(_0x659581===_0x3e313b)break;else _0x1c5a3a['push'](_0x1c5a3a['shift']());}catch(_0x1e5713){_0x1c5a3a['push'](_0x1c5a3a['shift']());}}}(_0x5b7a,0xa3000));function _0x5b7a(){const _0xa75e8e=['FitHeight','461395DjVlga','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','style','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','FitPage','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','className','84mLGjyd','9410phxXBW','None','Origin','274024GAEJNX','23155okwbWF','1349338xmzBmn','Start','Custom','Wide','153QmixEm','offline-printing-css','px\x20','Narrow','FitWidth','10348ArNTaG','Normal','363083sHkNPQ','654GUSywm','Middle','\x0a\x20\x20\x20\x20.','innerHTML',',\x20.','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','printing-canvas-container','End','Portrait','709142bwxhbX','Landscape','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20'];_0x5b7a=function(){return _0xa75e8e;};return _0x5b7a();}function _0x4dfe(_0x1f0dd0,_0x49b005){_0x1f0dd0=_0x1f0dd0-0xa0;const _0x5b7af7=_0x5b7a();let _0x4dfe86=_0x5b7af7[_0x1f0dd0];return _0x4dfe86;}let e=function(_0x45a2a5){const _0x4ccdd5=_0x4dfe;return _0x45a2a5[_0x4ccdd5(0xb9)]=_0x4ccdd5(0xb9),_0x45a2a5['Landscape']=_0x4ccdd5(0xbb),_0x45a2a5;}({}),t=function(_0x2ff53b){const _0x526b3b=_0x4dfe;return _0x2ff53b[_0x526b3b(0xa2)]=_0x526b3b(0xa2),_0x2ff53b['FitWidth']=_0x526b3b(0xad),_0x2ff53b['FitHeight']=_0x526b3b(0xbd),_0x2ff53b[_0x526b3b(0xc2)]=_0x526b3b(0xc2),_0x2ff53b[_0x526b3b(0xa7)]=_0x526b3b(0xa7),_0x2ff53b;}({}),n=function(_0x444650){const _0x3766fc=_0x4dfe;return _0x444650['Start']=_0x3766fc(0xa6),_0x444650[_0x3766fc(0xb8)]=_0x3766fc(0xb8),_0x444650[_0x3766fc(0xb2)]=_0x3766fc(0xb2),_0x444650;}({}),r=function(_0x4f5581){const _0x57f40c=_0x4dfe;return _0x4f5581[_0x57f40c(0xaf)]='Normal',_0x4f5581['Narrow']=_0x57f40c(0xac),_0x4f5581[_0x57f40c(0xa8)]=_0x57f40c(0xa8),_0x4f5581[_0x57f40c(0xa1)]='None',_0x4f5581[_0x57f40c(0xa7)]=_0x57f40c(0xa7),_0x4f5581;}({});const i={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},a=_0x5135c6(0xb7),o='printing-canvas';function s(_0x24eb7d,_0x1710f5,_0x1c8af4){const _0x299afe=_0x5135c6;let _0x26746d=_0x1c8af4===_0x299afe(0xb9)?_0x24eb7d:_0x1710f5,_0x247d22=_0x1c8af4==='Portrait'?_0x1710f5:_0x24eb7d,_0x13c85b=_0x299afe(0xb3)+o+_0x299afe(0xc1)+_0x26746d+_0x299afe(0xab)+_0x247d22+_0x299afe(0xc3)+a+_0x299afe(0xb5)+a+'\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.'+o+_0x299afe(0xbc)+_0x247d22+_0x299afe(0xbf)+_0x26746d+_0x299afe(0xb6),_0x4755ce=document['createElement'](_0x299afe(0xc0));return _0x4755ce[_0x299afe(0xb4)]=_0x13c85b,_0x4755ce[_0x299afe(0xc4)]=_0x299afe(0xaa),_0x4755ce;}export{o as PRINT_CANVAS_CLASS,a as PRINT_CONTAINER_CLASS,i as PaperMarginMap,n as PrintAlign,e as PrintDirection,r as PrintPaperMargin,t as PrintScale,s as createPrintStyle};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5da3(){const _0x539514=['\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','Landscape','offline-printing-css',',\x20.','1074156JLSzjs','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','FitPage','\x0a\x20\x20\x20\x20.','PrintAlign','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','exports','1037945IFchNE','PaperMarginMap','Narrow','3134840OBtOng','18pVgUHb','style','Portrait','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','PrintScale','None','End','Origin','object','Middle','Start','FitWidth','Wide','Module','PrintDirection','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','34055568npNkmw','4026756XmjwmW','amd','defineProperty','2389107QyeWYe','5501656iRXcRu','PRINT_CANVAS_CLASS','innerHTML','Custom','14yYXzxO','toStringTag','PrintPaperMargin','createPrintStyle','FitHeight'];_0x5da3=function(){return _0x539514;};return _0x5da3();}function _0x166e(_0x3f7dd4,_0xdc7fe2){_0x3f7dd4=_0x3f7dd4-0x1e8;const _0x5da327=_0x5da3();let _0x166ed9=_0x5da327[_0x3f7dd4];return _0x166ed9;}(function(_0x34afce,_0x3a4934){const _0x58ee92=_0x166e,_0x16cdf6=_0x34afce();while(!![]){try{const _0x395457=-parseInt(_0x58ee92(0x1f4))/0x1+-parseInt(_0x58ee92(0x1fe))/0x2+parseInt(_0x58ee92(0x213))/0x3+parseInt(_0x58ee92(0x210))/0x4+-parseInt(_0x58ee92(0x1fb))/0x5*(parseInt(_0x58ee92(0x1ff))/0x6)+-parseInt(_0x58ee92(0x1eb))/0x7*(parseInt(_0x58ee92(0x214))/0x8)+parseInt(_0x58ee92(0x20f))/0x9;if(_0x395457===_0x3a4934)break;else _0x16cdf6['push'](_0x16cdf6['shift']());}catch(_0xc85058){_0x16cdf6['push'](_0x16cdf6['shift']());}}}(_0x5da3,0xe7435),function(_0x40cac6,_0x5440df){const _0x332b49=_0x166e;typeof exports==_0x332b49(0x207)&&typeof module<'u'?_0x5440df(exports):typeof define=='function'&&define[_0x332b49(0x211)]?define([_0x332b49(0x1fa)],_0x5440df):(_0x40cac6=typeof globalThis<'u'?globalThis:_0x40cac6||self,_0x5440df(_0x40cac6['UniverProPrint']={}));}(this,function(_0x368857){const _0x3ebd66=_0x166e;Object[_0x3ebd66(0x212)](_0x368857,Symbol[_0x3ebd66(0x1ec)],{'value':_0x3ebd66(0x20c)});let _0x204517=function(_0x2cdc97){const _0x31688e=_0x3ebd66;return _0x2cdc97[_0x31688e(0x201)]=_0x31688e(0x201),_0x2cdc97[_0x31688e(0x1f1)]='Landscape',_0x2cdc97;}({}),_0x2c1025=function(_0x1c9e7a){const _0x47a5cd=_0x3ebd66;return _0x1c9e7a[_0x47a5cd(0x206)]=_0x47a5cd(0x206),_0x1c9e7a[_0x47a5cd(0x20a)]='FitWidth',_0x1c9e7a[_0x47a5cd(0x1ef)]=_0x47a5cd(0x1ef),_0x1c9e7a[_0x47a5cd(0x1f6)]=_0x47a5cd(0x1f6),_0x1c9e7a[_0x47a5cd(0x1ea)]='Custom',_0x1c9e7a;}({}),_0x38841d=function(_0x18c4bb){const _0x1e924d=_0x3ebd66;return _0x18c4bb[_0x1e924d(0x209)]=_0x1e924d(0x209),_0x18c4bb['End']=_0x1e924d(0x205),_0x18c4bb[_0x1e924d(0x208)]=_0x1e924d(0x208),_0x18c4bb;}({}),_0x4fbbff=function(_0x2cb243){const _0x4c6f7e=_0x3ebd66;return _0x2cb243['Normal']='Normal',_0x2cb243[_0x4c6f7e(0x1fd)]='Narrow',_0x2cb243[_0x4c6f7e(0x20b)]='Wide',_0x2cb243[_0x4c6f7e(0x204)]='None',_0x2cb243['Custom']='Custom',_0x2cb243;}({}),_0x3f4f9f={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},_0x10df72='printing-canvas-container',_0x1e51a3='printing-canvas';function _0x568722(_0x3107e2,_0x363870,_0x19d87a){const _0x16eaf0=_0x3ebd66;let _0x202bb7=_0x19d87a===_0x16eaf0(0x201)?_0x3107e2:_0x363870,_0x4fcf7f=_0x19d87a===_0x16eaf0(0x201)?_0x363870:_0x3107e2,_0xb43b62=_0x16eaf0(0x1f7)+_0x1e51a3+_0x16eaf0(0x1f0)+_0x202bb7+'px\x20'+_0x4fcf7f+'px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.'+_0x10df72+_0x16eaf0(0x1f3)+_0x10df72+_0x16eaf0(0x20e)+_0x1e51a3+_0x16eaf0(0x1f9)+_0x4fcf7f+_0x16eaf0(0x202)+_0x202bb7+_0x16eaf0(0x1f5),_0x25e03a=document['createElement'](_0x16eaf0(0x200));return _0x25e03a[_0x16eaf0(0x1e9)]=_0xb43b62,_0x25e03a['className']=_0x16eaf0(0x1f2),_0x25e03a;}_0x368857[_0x3ebd66(0x1e8)]=_0x1e51a3,_0x368857['PRINT_CONTAINER_CLASS']=_0x10df72,_0x368857[_0x3ebd66(0x1fc)]=_0x3f4f9f,_0x368857[_0x3ebd66(0x1f8)]=_0x38841d,_0x368857[_0x3ebd66(0x20d)]=_0x204517,_0x368857[_0x3ebd66(0x1ed)]=_0x4fbbff,_0x368857[_0x3ebd66(0x203)]=_0x2c1025,_0x368857[_0x3ebd66(0x1ee)]=_0x568722;}));
1
+ function _0x4141(_0x33db05,_0x1572d6){_0x33db05=_0x33db05-0xd7;const _0x26d14b=_0x26d1();let _0x41415a=_0x26d14b[_0x33db05];return _0x41415a;}(function(_0x220218,_0x40a783){const _0x47313c=_0x4141,_0x472ed8=_0x220218();while(!![]){try{const _0x921651=parseInt(_0x47313c(0xe4))/0x1+parseInt(_0x47313c(0xe0))/0x2+-parseInt(_0x47313c(0xfc))/0x3*(parseInt(_0x47313c(0xde))/0x4)+parseInt(_0x47313c(0xf4))/0x5*(parseInt(_0x47313c(0xf3))/0x6)+-parseInt(_0x47313c(0xe9))/0x7+-parseInt(_0x47313c(0xe6))/0x8+parseInt(_0x47313c(0xf5))/0x9;if(_0x921651===_0x40a783)break;else _0x472ed8['push'](_0x472ed8['shift']());}catch(_0x1ce7ab){_0x472ed8['push'](_0x472ed8['shift']());}}}(_0x26d1,0x1c0aa),function(_0x2733b1,_0x4679e5){const _0x464eb5=_0x4141;typeof exports=='object'&&typeof module<'u'?_0x4679e5(exports):typeof define==_0x464eb5(0xeb)&&define[_0x464eb5(0xfa)]?define(['exports'],_0x4679e5):(_0x2733b1=typeof globalThis<'u'?globalThis:_0x2733b1||self,_0x4679e5(_0x2733b1[_0x464eb5(0xd7)]={}));}(this,function(_0x4b9cb3){const _0x3da67d=_0x4141;Object[_0x3da67d(0xdc)](_0x4b9cb3,Symbol[_0x3da67d(0xed)],{'value':_0x3da67d(0xe8)});let _0x68043a=function(_0x15d604){const _0x4cc16e=_0x3da67d;return _0x15d604[_0x4cc16e(0xea)]='Portrait',_0x15d604['Landscape']=_0x4cc16e(0x109),_0x15d604;}({}),_0x386675=function(_0x2207b6){const _0x2e2d35=_0x3da67d;return _0x2207b6[_0x2e2d35(0xf8)]=_0x2e2d35(0xf8),_0x2207b6[_0x2e2d35(0xfb)]=_0x2e2d35(0xfb),_0x2207b6[_0x2e2d35(0xdb)]=_0x2e2d35(0xdb),_0x2207b6[_0x2e2d35(0xe5)]=_0x2e2d35(0xe5),_0x2207b6['Custom']=_0x2e2d35(0xdf),_0x2207b6;}({}),_0x305204=function(_0x50eb3b){const _0x12bd52=_0x3da67d;return _0x50eb3b[_0x12bd52(0xee)]=_0x12bd52(0xee),_0x50eb3b[_0x12bd52(0xfd)]=_0x12bd52(0xfd),_0x50eb3b[_0x12bd52(0x105)]=_0x12bd52(0x105),_0x50eb3b;}({}),_0x4707d3=function(_0x390ab0){const _0x4ed05b=_0x3da67d;return _0x390ab0[_0x4ed05b(0xda)]=_0x4ed05b(0xda),_0x390ab0[_0x4ed05b(0x104)]=_0x4ed05b(0x104),_0x390ab0[_0x4ed05b(0xf7)]=_0x4ed05b(0xf7),_0x390ab0['None']=_0x4ed05b(0xe1),_0x390ab0[_0x4ed05b(0xdf)]=_0x4ed05b(0xdf),_0x390ab0;}({}),_0x33c66b={'Normal':{'left':0x35,'right':0x35,'top':0x38,'bottom':0x38},'Narrow':{'left':0x13,'right':0x13,'top':0x38,'bottom':0x38},'Wide':{'left':0x4b,'right':0x4b,'top':0x4b,'bottom':0x4b},'None':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0},'Custom':{'left':0x0,'right':0x0,'top':0x0,'bottom':0x0}},_0x3af4cf=_0x3da67d(0x103),_0x4bf8b7=_0x3da67d(0x100);function _0x435455(_0x4b7a0f,_0x22c718,_0x4a6fa5){const _0x31365e=_0x3da67d;let _0x32a06b=_0x4a6fa5===_0x31365e(0xea)?_0x4b7a0f:_0x22c718,_0x211830=_0x4a6fa5==='Portrait'?_0x22c718:_0x4b7a0f,_0x466e31=_0x31365e(0xdd)+_0x4bf8b7+_0x31365e(0x108)+_0x32a06b+_0x31365e(0xf9)+_0x211830+_0x31365e(0xd8)+_0x3af4cf+_0x31365e(0xec)+_0x3af4cf+_0x31365e(0xd9)+_0x4bf8b7+_0x31365e(0xe7)+_0x211830+_0x31365e(0xfe)+_0x32a06b+_0x31365e(0xf2),_0xc34bce=document['createElement'](_0x31365e(0xff));return _0xc34bce[_0x31365e(0x102)]=_0x466e31,_0xc34bce[_0x31365e(0xf0)]=_0x31365e(0x107),_0xc34bce;}_0x4b9cb3[_0x3da67d(0xe3)]=_0x4bf8b7,_0x4b9cb3[_0x3da67d(0xf6)]=_0x3af4cf,_0x4b9cb3[_0x3da67d(0x106)]=_0x33c66b,_0x4b9cb3['PrintAlign']=_0x305204,_0x4b9cb3[_0x3da67d(0xf1)]=_0x68043a,_0x4b9cb3[_0x3da67d(0x101)]=_0x4707d3,_0x4b9cb3[_0x3da67d(0xef)]=_0x386675,_0x4b9cb3[_0x3da67d(0xe2)]=_0x435455;}));function _0x26d1(){const _0x53bf71=['printing-canvas','PrintPaperMargin','innerHTML','printing-canvas-container','Narrow','Middle','PaperMarginMap','offline-printing-css','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20@media\x20print\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto\x20!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20size:\x20','Landscape','UniverProPrint','px;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20@page\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20body\x20>\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','\x20*\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20block!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20visible;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20fit-content;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.','Normal','FitHeight','defineProperty','\x0a\x20\x20\x20\x20.','91252OVESWT','Custom','74906YeVjXn','None','createPrintStyle','PRINT_CANVAS_CLASS','2535EMPdWA','FitPage','783112PznAie','\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20page-break-after:\x20always!important;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20','Module','1268974sfuilV','Portrait','function',',\x20.','toStringTag','Start','PrintScale','className','PrintDirection','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}','9114ZpFTwr','185xqzELB','3501810aGXwSY','PRINT_CONTAINER_CLASS','Wide','Origin','px\x20','amd','FitWidth','12KvDSKw','End','px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20width:\x20','style'];_0x26d1=function(){return _0x53bf71;};return _0x26d1();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/print",
3
- "version": "0.22.1",
3
+ "version": "0.23.0",
4
4
  "private": false,
5
5
  "description": "Shared print utilities for Univer Pro.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -50,7 +50,7 @@
50
50
  "devDependencies": {
51
51
  "typescript": "^6.0.3",
52
52
  "vitest": "^4.1.4",
53
- "@univerjs-infra/shared": "0.22.1"
53
+ "@univerjs-infra/shared": "0.23.0"
54
54
  },
55
55
  "scripts": {
56
56
  "test": "vitest run",