@univer-cli/unit-pdf-printer 1.0.0-rc.0 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- (function(_0x4cfd4f,_0x53abf8){const _0x156099=_0x5abb,_0x483786=_0x4cfd4f();while(!![]){try{const _0x293098=parseInt(_0x156099(0x89))/0x1*(parseInt(_0x156099(0x9d))/0x2)+-parseInt(_0x156099(0x92))/0x3*(-parseInt(_0x156099(0xa2))/0x4)+parseInt(_0x156099(0x9a))/0x5*(parseInt(_0x156099(0x99))/0x6)+-parseInt(_0x156099(0x83))/0x7+-parseInt(_0x156099(0x9e))/0x8+parseInt(_0x156099(0x94))/0x9+parseInt(_0x156099(0x80))/0xa;if(_0x293098===_0x53abf8)break;else _0x483786['push'](_0x483786['shift']());}catch(_0x4265c){_0x483786['push'](_0x483786['shift']());}}}(_0x29f8,0xafc7f));var e=class extends Error{['code'];constructor(_0xfb0e99,_0x1619c5){const _0x399b51=_0x5abb;super(_0x1619c5),this[_0x399b51(0x81)]=_0x399b51(0x8a),this[_0x399b51(0xa1)]=_0xfb0e99;}};function t(_0x533c79){return _0x533c79 instanceof e;}function _0x29f8(){const _0x3a5b3d=['trim','pageCount','unitData.id\x20is\x20required','1ENCPLa','UnitPdfPrinterError','render\x20runtime\x20returned\x20invalid\x20PDF\x20bytes','operation\x20aborted','reason','bytes','signal','\x20page\x20limit','unitData','18SLuLmM','runtime','5130720QQmlhd','subarray','application/pdf','.pdf','length','12Fhoduz','2934065NonTGc','\x20pages,\x20over\x20the\x20','printPdf','1298706OZBvph','10387512XbBBMp','string','unit','code','199164OQAksy','INVALID_INPUT','6439900qtpbJt','name','replaceAll','9221499rKtmGS','print\x20produced\x20','fromCharCode'];_0x29f8=function(){return _0x3a5b3d;};return _0x29f8();}var n=0x3e8;function r(_0x5e1df0){let _0x1d8ec6=_0x5e1df0['maxPages']??n;if(!Number['isSafeInteger'](_0x1d8ec6)||_0x1d8ec6<0x1)throw new e('INVALID_INPUT','maxPages\x20must\x20be\x20a\x20positive\x20integer');return{async 'print'(_0x3bd2a1){const _0x2838ab=_0x5abb;c(_0x3bd2a1[_0x2838ab(0x8f)]);let _0x163049=i(_0x3bd2a1[_0x2838ab(0x91)]),_0x1017c8=await _0x5e1df0[_0x2838ab(0x93)][_0x2838ab(0x9c)](_0x3bd2a1);if(c(_0x3bd2a1[_0x2838ab(0x8f)]),_0x1017c8['pageCount']>_0x1d8ec6)throw new e('INVALID_INPUT',_0x2838ab(0x84)+_0x1017c8[_0x2838ab(0x87)]+_0x2838ab(0x9b)+_0x1d8ec6+_0x2838ab(0x90));if(!s(_0x1017c8[_0x2838ab(0x8e)]))throw new e('INVALID_INPUT',_0x2838ab(0x8b));return{'bytes':_0x1017c8[_0x2838ab(0x8e)],'mediaType':_0x2838ab(0x96),'name':o(a(_0x3bd2a1['unitData'])??_0x163049)+_0x2838ab(0x97),'pageCount':_0x1017c8[_0x2838ab(0x87)],'unitId':_0x163049,'unitType':_0x3bd2a1['unitType']};}};}function _0x5abb(_0xd218b1,_0x5a2a27){_0xd218b1=_0xd218b1-0x80;const _0x29f840=_0x29f8();let _0x5abba3=_0x29f840[_0xd218b1];return _0x5abba3;}function i(_0x437beb){const _0x24ef89=_0x5abb;if(typeof _0x437beb['id']!=_0x24ef89(0x9f)||_0x437beb['id'][_0x24ef89(0x98)]===0x0)throw new e(_0x24ef89(0xa3),_0x24ef89(0x88));return _0x437beb['id'];}function a(_0x2b57f4){const _0x59a6dd=_0x5abb;let _0x50dbd9=_0x2b57f4[_0x59a6dd(0x81)];return typeof _0x50dbd9==_0x59a6dd(0x9f)&&_0x50dbd9[_0x59a6dd(0x86)]()[_0x59a6dd(0x98)]>0x0?_0x50dbd9[_0x59a6dd(0x86)]():void 0x0;}function o(_0x291d71){const _0x16db53=_0x5abb;let _0x1a6e1e=_0x291d71[_0x16db53(0x82)](/[\\/:*?"<>|]/gu,'-')['trim']();return _0x1a6e1e[_0x16db53(0x98)]>0x0?_0x1a6e1e:_0x16db53(0xa0);}function s(_0x1d69d1){const _0x4a96e4=_0x5abb;return _0x1d69d1[_0x4a96e4(0x98)]>=0x5&&String[_0x4a96e4(0x85)](..._0x1d69d1[_0x4a96e4(0x95)](0x0,0x5))==='%PDF-';}function c(_0xd5afb5){const _0x488cdb=_0x5abb;if(_0xd5afb5?.['aborted']===!0x0)throw _0xd5afb5[_0x488cdb(0x8d)]instanceof Error?_0xd5afb5[_0x488cdb(0x8d)]:Error(_0x488cdb(0x8c));}export{e as UnitPdfPrinterError,r as createUnitPdfPrinter,t as isUnitPdfPrinterError};
1
+ function _0x2abc(_0x96f52,_0x3d863e){_0x96f52=_0x96f52-0x12f;const _0x51746e=_0x5174();let _0x2abca3=_0x51746e[_0x96f52];return _0x2abca3;}const _0x1d30fd=_0x2abc;(function(_0x29b196,_0x7aa99a){const _0x33258a=_0x2abc,_0x229014=_0x29b196();while(!![]){try{const _0x1556eb=-parseInt(_0x33258a(0x146))/0x1*(-parseInt(_0x33258a(0x14a))/0x2)+-parseInt(_0x33258a(0x150))/0x3*(-parseInt(_0x33258a(0x134))/0x4)+parseInt(_0x33258a(0x143))/0x5+parseInt(_0x33258a(0x14b))/0x6+parseInt(_0x33258a(0x148))/0x7+-parseInt(_0x33258a(0x145))/0x8+-parseInt(_0x33258a(0x139))/0x9*(parseInt(_0x33258a(0x13c))/0xa);if(_0x1556eb===_0x7aa99a)break;else _0x229014['push'](_0x229014['shift']());}catch(_0x14138f){_0x229014['push'](_0x229014['shift']());}}}(_0x5174,0x6d6c9));function _0x5174(){const _0x1b99d6=['replaceAll','unitData.id\x20is\x20required','pageCount','render\x20runtime\x20returned\x20invalid\x20PDF\x20bytes','1919660jyfZRw','reason','6397008qwggJX','141IihWzZ','%PDF-','2120678chpOes','printPdf','2174bhjPgQ','1010172qDwSoU','string','UnitPdfPrinterError','fromCharCode','bytes','540jWhypL','application/pdf','code','unitData','INVALID_INPUT','runtime','unit','print\x20produced\x20','signal','maxPages\x20must\x20be\x20a\x20positive\x20integer','6980SYDPWW','subarray','\x20page\x20limit','length','name','36cHWjej','isSafeInteger','trim','186970aLpOTi','operation\x20aborted','\x20pages,\x20over\x20the\x20'];_0x5174=function(){return _0x1b99d6;};return _0x5174();}var e=class extends Error{[_0x1d30fd(0x152)];constructor(_0x6aee28,_0x2d033f){const _0x5d3c36=_0x1d30fd;super(_0x2d033f),this[_0x5d3c36(0x138)]=_0x5d3c36(0x14d),this[_0x5d3c36(0x152)]=_0x6aee28;}};function t(_0x50ae93){return _0x50ae93 instanceof e;}var n=0x3e8;function r(_0x508009){const _0x2f866c=_0x1d30fd;let _0x47c9b8=_0x508009['maxPages']??n;if(!Number[_0x2f866c(0x13a)](_0x47c9b8)||_0x47c9b8<0x1)throw new e(_0x2f866c(0x154),_0x2f866c(0x133));return{async 'print'(_0x549b24){const _0x2061b0=_0x2f866c;c(_0x549b24[_0x2061b0(0x132)]);let _0x4241b5=i(_0x549b24[_0x2061b0(0x153)]),_0x2a32a7=await _0x508009[_0x2061b0(0x12f)][_0x2061b0(0x149)](_0x549b24);if(c(_0x549b24[_0x2061b0(0x132)]),_0x2a32a7[_0x2061b0(0x141)]>_0x47c9b8)throw new e(_0x2061b0(0x154),_0x2061b0(0x131)+_0x2a32a7['pageCount']+_0x2061b0(0x13e)+_0x47c9b8+_0x2061b0(0x136));if(!s(_0x2a32a7[_0x2061b0(0x14f)]))throw new e(_0x2061b0(0x154),_0x2061b0(0x142));return{'bytes':_0x2a32a7[_0x2061b0(0x14f)],'mediaType':_0x2061b0(0x151),'name':o(a(_0x549b24['unitData'])??_0x4241b5)+'.pdf','pageCount':_0x2a32a7[_0x2061b0(0x141)],'unitId':_0x4241b5,'unitType':_0x549b24['unitType']};}};}function i(_0x1afa25){const _0x49216b=_0x1d30fd;if(typeof _0x1afa25['id']!=_0x49216b(0x14c)||_0x1afa25['id'][_0x49216b(0x137)]===0x0)throw new e(_0x49216b(0x154),_0x49216b(0x140));return _0x1afa25['id'];}function a(_0x4da49a){const _0x5dd8aa=_0x1d30fd;let _0x24bc8e=_0x4da49a[_0x5dd8aa(0x138)];return typeof _0x24bc8e==_0x5dd8aa(0x14c)&&_0x24bc8e[_0x5dd8aa(0x13b)]()[_0x5dd8aa(0x137)]>0x0?_0x24bc8e[_0x5dd8aa(0x13b)]():void 0x0;}function o(_0x57f9e1){const _0x4d227c=_0x1d30fd;let _0x5c2cdd=_0x57f9e1[_0x4d227c(0x13f)](/[\\/:*?"<>|]/gu,'-')[_0x4d227c(0x13b)]();return _0x5c2cdd['length']>0x0?_0x5c2cdd:_0x4d227c(0x130);}function s(_0x24aee4){const _0x57ac0f=_0x1d30fd;return _0x24aee4[_0x57ac0f(0x137)]>=0x5&&String[_0x57ac0f(0x14e)](..._0x24aee4[_0x57ac0f(0x135)](0x0,0x5))===_0x57ac0f(0x147);}function c(_0x574be0){const _0x55fa6a=_0x1d30fd;if(_0x574be0?.['aborted']===!0x0)throw _0x574be0['reason']instanceof Error?_0x574be0[_0x55fa6a(0x144)]:Error(_0x55fa6a(0x13d));}export{e as UnitPdfPrinterError,r as createUnitPdfPrinter,t as isUnitPdfPrinterError};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@univer-cli/unit-pdf-printer",
3
3
  "description": "Print materialized Univer Units to PDF through the browser render runtime.",
4
4
  "type": "module",
5
- "version": "1.0.0-rc.0",
5
+ "version": "1.0.0",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.mjs",
8
8
  "types": "./dist/index.d.ts",
@@ -19,6 +19,6 @@
19
19
  "README.zh-CN.md"
20
20
  ],
21
21
  "dependencies": {
22
- "@univer-cli/univer-render-runtime": "1.0.0-rc.0"
22
+ "@univer-cli/univer-render-runtime": "1.0.0"
23
23
  }
24
24
  }