@unotest/viewer 0.24.0 → 0.25.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.
@@ -1 +1 @@
1
- const _0x389a6a=_0x175c;function _0x52ec(){const _0x573e5c=['mJG3ndiWsLLNs05h','zNjVBq','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','B2jQzwn0','mJCXodaWnu1XAwjNBa','mJK3mZC0BMnsrgzn','CMvHzeLKzw50Axr5','nJLfvuvevK8','otG3ote4qLf3uhbn','Dg9tDhjPBMC','DxrMoa','zMXHzW','C3rYAw5N','nJGZnJeZnMThzuPOvG','mZa5mdK4n0z0wMzLqW','BMfTzq','zw52','y2fUrwrPDezPBgvZ','mZiZnNvdqxLcsa','mJaXALLuvMnS','n3vIsNjNuW','Bg9NB3v0vxjS','y2fUvgvYBwLUywW','C3rYAw5NAwz5','y2fUqNjVD3nLrNm','CgfYC2u','mZiWEvz3AKHg'];_0x52ec=function(){return _0x573e5c;};return _0x52ec();}(function(_0x4b5712,_0x58ca9d){const _0xe6782d={_0x16cfe6:0x10f,_0x1b5e07:0x118,_0x4ca304:0x101,_0x4cc2a7:0x105,_0x13f37c:0x111,_0x1d2930:0x10b,_0x298844:0x102},_0x2c3c2c=_0x175c,_0x55040b=_0x4b5712();while(!![]){try{const _0x4f4a3a=-parseInt(_0x2c3c2c(0x110))/0x1*(-parseInt(_0x2c3c2c(_0xe6782d._0x16cfe6))/0x2)+parseInt(_0x2c3c2c(0x104))/0x3*(parseInt(_0x2c3c2c(_0xe6782d._0x1b5e07))/0x4)+-parseInt(_0x2c3c2c(_0xe6782d._0x4ca304))/0x5+-parseInt(_0x2c3c2c(_0xe6782d._0x4cc2a7))/0x6+parseInt(_0x2c3c2c(_0xe6782d._0x13f37c))/0x7*(parseInt(_0x2c3c2c(0x10a))/0x8)+-parseInt(_0x2c3c2c(_0xe6782d._0x1d2930))/0x9+parseInt(_0x2c3c2c(0x117))/0xa*(-parseInt(_0x2c3c2c(_0xe6782d._0x298844))/0xb);if(_0x4f4a3a===_0x58ca9d)break;else _0x55040b['push'](_0x55040b['shift']());}catch(_0x2d6935){_0x55040b['push'](_0x55040b['shift']());}}}(_0x52ec,0xdf89f));var __defProp=Object['defineProperty'],__name=(_0x224fbe,_0x347b74)=>__defProp(_0x224fbe,_0x389a6a(0x10c),{'value':_0x347b74,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x389a6a(0xff);function encodeViewerSession(_0x39a832){const _0x59cc42={_0x4368a4:0x114,_0x282e66:0x106},_0x411fdb=_0x389a6a;return Buffer['from'](JSON[_0x411fdb(_0x59cc42._0x4368a4)](_0x39a832),'utf8')[_0x411fdb(_0x59cc42._0x282e66)]('base64url');}__name(encodeViewerSession,'encodeViewerSession');function decodeViewerSession(_0x45c55a){const _0xf5515b={_0xf6ef4c:0x116,_0x24a73:0xfe,_0x49f4d4:0x106,_0x588243:0x107},_0x5ca37b=_0x389a6a;if(_0x45c55a===void 0x0||_0x45c55a==='')return null;let _0x3103a6;try{_0x3103a6=JSON[_0x5ca37b(_0xf5515b._0xf6ef4c)](Buffer[_0x5ca37b(_0xf5515b._0x24a73)](_0x45c55a,'base64url')[_0x5ca37b(_0xf5515b._0x49f4d4)](_0x5ca37b(_0xf5515b._0x588243)));}catch{return null;}if(typeof _0x3103a6!==_0x5ca37b(0x100)||_0x3103a6===null)return null;const {capabilities:_0x2fcffc,identity:_0x235e9b}=_0x3103a6,_0x1b94fa=readCapabilities(_0x2fcffc);if(_0x1b94fa===null)return null;return{'capabilities':_0x1b94fa,'identity':readIdentity(_0x235e9b)};}__name(decodeViewerSession,'decodeViewerSession');function readCapabilities(_0x1d992b){const _0x3138ef={_0x1eab68:0x10e,_0x2c6578:0x113,_0x8c0a76:0x115},_0x5ef148=_0x389a6a;if(typeof _0x1d992b!==_0x5ef148(0x100)||_0x1d992b===null)return null;const _0x4755d3=_0x1d992b,_0x1a69bd=__name(_0x1ebf85=>_0x4755d3[_0x1ebf85]===!![],_0x5ef148(0x108));return{'canRun':_0x1a69bd('canRun'),'canEditFiles':_0x1a69bd(_0x5ef148(_0x3138ef._0x1eab68)),'canTerminal':_0x1a69bd(_0x5ef148(_0x3138ef._0x2c6578)),'canBrowseFs':_0x1a69bd(_0x5ef148(_0x3138ef._0x8c0a76))};}__name(readCapabilities,'readCapabilities');function _0x175c(_0x130f10,_0x439146){_0x130f10=_0x130f10-0xfe;const _0x52ec93=_0x52ec();let _0x175cf0=_0x52ec93[_0x130f10];if(_0x175c['PpxFuA']===undefined){var _0x5cf701=function(_0x580cb6){const _0xdbb692='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x224fbe='',_0x347b74='';for(let _0x39a832=0x0,_0x45c55a,_0x3103a6,_0x2fcffc=0x0;_0x3103a6=_0x580cb6['charAt'](_0x2fcffc++);~_0x3103a6&&(_0x45c55a=_0x39a832%0x4?_0x45c55a*0x40+_0x3103a6:_0x3103a6,_0x39a832++%0x4)?_0x224fbe+=String['fromCharCode'](0xff&_0x45c55a>>(-0x2*_0x39a832&0x6)):0x0){_0x3103a6=_0xdbb692['indexOf'](_0x3103a6);}for(let _0x235e9b=0x0,_0x1b94fa=_0x224fbe['length'];_0x235e9b<_0x1b94fa;_0x235e9b++){_0x347b74+='%'+('00'+_0x224fbe['charCodeAt'](_0x235e9b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x347b74);};_0x175c['nTyaNY']=_0x5cf701,_0x175c['ipUnWp']={},_0x175c['PpxFuA']=!![];}const _0x39b999=_0x52ec93[0x0],_0x3cd4a9=_0x130f10+_0x39b999,_0x4052c4=_0x175c['ipUnWp'][_0x3cd4a9];return!_0x4052c4?(_0x175cf0=_0x175c['nTyaNY'](_0x175cf0),_0x175c['ipUnWp'][_0x3cd4a9]=_0x175cf0):_0x175cf0=_0x4052c4,_0x175cf0;}function readIdentity(_0x10d5d0){const _0x5d6802={_0x48cc15:0x109,_0x31b192:0x10d,_0x2fab63:0x112},_0x3e1c37=_0x389a6a;if(typeof _0x10d5d0!=='object'||_0x10d5d0===null)return null;const _0x15cd12=_0x10d5d0,{user:_0x2c3aa9,role:_0x4ff2ac}=_0x15cd12;if(typeof _0x2c3aa9!=='string'||typeof _0x4ff2ac!==_0x3e1c37(_0x5d6802._0x48cc15))return null;return{'user':_0x2c3aa9,'role':_0x4ff2ac,...typeof _0x15cd12[_0x3e1c37(_0x5d6802._0x31b192)]===_0x3e1c37(0x109)?{'env':_0x15cd12[_0x3e1c37(0x10d)]}:{},...typeof _0x15cd12[_0x3e1c37(_0x5d6802._0x2fab63)]==='string'?{'logoutUrl':_0x15cd12[_0x3e1c37(_0x5d6802._0x2fab63)]}:{}};}__name(readIdentity,_0x389a6a(0x103));export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};
1
+ const _0x58a691=_0x377d;(function(_0x30bbfe,_0x2d71ea){const _0x576bab={_0x4398f4:0x192,_0x58d521:0x1a9,_0x5ab60e:0x199},_0x28dd9d=_0x377d,_0x56fa24=_0x30bbfe();while(!![]){try{const _0x27ece6=parseInt(_0x28dd9d(0x193))/0x1+-parseInt(_0x28dd9d(0x1a4))/0x2*(-parseInt(_0x28dd9d(0x198))/0x3)+parseInt(_0x28dd9d(_0x576bab._0x4398f4))/0x4*(parseInt(_0x28dd9d(_0x576bab._0x58d521))/0x5)+parseInt(_0x28dd9d(0x1a1))/0x6+-parseInt(_0x28dd9d(_0x576bab._0x5ab60e))/0x7*(-parseInt(_0x28dd9d(0x19c))/0x8)+-parseInt(_0x28dd9d(0x1ad))/0x9+-parseInt(_0x28dd9d(0x1a0))/0xa;if(_0x27ece6===_0x2d71ea)break;else _0x56fa24['push'](_0x56fa24['shift']());}catch(_0x3cb6d5){_0x56fa24['push'](_0x56fa24['shift']());}}}(_0x1598,0x2a915));var __defProp=Object[_0x58a691(0x1ac)],__name=(_0xb9a152,_0x3c34df)=>__defProp(_0xb9a152,_0x58a691(0x197),{'value':_0x3c34df,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER='x-unotest-viewer-session';function encodeViewerSession(_0x328157){const _0x22f281=_0x58a691;return Buffer['from'](JSON['stringify'](_0x328157),'utf8')[_0x22f281(0x1a3)](_0x22f281(0x19b));}function _0x1598(){const _0x44b2f8=['mJf1CxHbAgC','zMXHzW','yMfZzty0DxjS','nZq4nZeYs0vZuuvQ','y2fUuNvU','CgfYC2u','y2fUvgvYBwLUywW','nJi0ndG0mhjkrfLcsG','mta1odiZmMv2vfnUtq','zw5JB2rLvMLLD2vYu2vZC2LVBG','Dg9tDhjPBMC','mLLUC0j0vG','zNjVBq','Bg9NB3v0vxjS','y2fUqNjVD3nLrNm','zw52','nJi4mdCWtxvftKD0','y2fUrwrPDezPBgvZ','B2jQzwn0','zgvMAw5LuhjVCgvYDhK','mti0otq2mxHJEw1xBG','CMvHzenHCgfIAwXPDgLLCW','og91C1bOBG','nJCWmLblvw9Rqq','CMvHzeLKzw50Axr5','DxrMoa','C3rYAw5N','BMfTzq','nJy3odaZsM1iD29K'];_0x1598=function(){return _0x44b2f8;};return _0x1598();}__name(encodeViewerSession,_0x58a691(0x1a2));function decodeViewerSession(_0x37b24f){const _0x11da01={_0xeac48:0x19e,_0xbeb020:0x1a3,_0x2bdebf:0x195},_0x1a3e0e=_0x58a691;if(_0x37b24f===void 0x0||_0x37b24f==='')return null;let _0x1daa75;try{_0x1daa75=JSON[_0x1a3e0e(_0x11da01._0xeac48)](Buffer[_0x1a3e0e(0x1a5)](_0x37b24f,_0x1a3e0e(0x19b))[_0x1a3e0e(_0x11da01._0xbeb020)](_0x1a3e0e(_0x11da01._0x2bdebf)));}catch{return null;}if(typeof _0x1daa75!=='object'||_0x1daa75===null)return null;const {capabilities:_0x10e565,identity:_0x801113}=_0x1daa75,_0x494c1b=readCapabilities(_0x10e565);if(_0x494c1b===null)return null;return{'capabilities':_0x494c1b,'identity':readIdentity(_0x801113)};}function _0x377d(_0x208355,_0x2c5c1c){_0x208355=_0x208355-0x191;const _0x1598f0=_0x1598();let _0x377d3d=_0x1598f0[_0x208355];if(_0x377d['JxSQbE']===undefined){var _0x56501b=function(_0x35f181){const _0x2d7c46='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xb9a152='',_0x3c34df='';for(let _0x328157=0x0,_0x37b24f,_0x1daa75,_0x10e565=0x0;_0x1daa75=_0x35f181['charAt'](_0x10e565++);~_0x1daa75&&(_0x37b24f=_0x328157%0x4?_0x37b24f*0x40+_0x1daa75:_0x1daa75,_0x328157++%0x4)?_0xb9a152+=String['fromCharCode'](0xff&_0x37b24f>>(-0x2*_0x328157&0x6)):0x0){_0x1daa75=_0x2d7c46['indexOf'](_0x1daa75);}for(let _0x801113=0x0,_0x494c1b=_0xb9a152['length'];_0x801113<_0x494c1b;_0x801113++){_0x3c34df+='%'+('00'+_0xb9a152['charCodeAt'](_0x801113)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c34df);};_0x377d['IoztTP']=_0x56501b,_0x377d['YmabAr']={},_0x377d['JxSQbE']=!![];}const _0xd478b4=_0x1598f0[0x0],_0x640418=_0x208355+_0xd478b4,_0x2c65ca=_0x377d['YmabAr'][_0x640418];return!_0x2c65ca?(_0x377d3d=_0x377d['IoztTP'](_0x377d3d),_0x377d['YmabAr'][_0x640418]=_0x377d3d):_0x377d3d=_0x2c65ca,_0x377d3d;}__name(decodeViewerSession,'decodeViewerSession');function readCapabilities(_0x57d939){const _0x5a1783={_0x5a39d8:0x19a,_0x1afb7d:0x19d,_0x491f1e:0x1aa},_0x8c4be3=_0x58a691;if(typeof _0x57d939!=='object'||_0x57d939===null)return null;const _0x45d650=_0x57d939,_0x399c85=__name(_0x41dfa3=>_0x45d650[_0x41dfa3]===!![],_0x8c4be3(_0x5a1783._0x5a39d8));return{'canRun':_0x399c85(_0x8c4be3(_0x5a1783._0x1afb7d)),'canEditFiles':_0x399c85(_0x8c4be3(_0x5a1783._0x491f1e)),'canTerminal':_0x399c85(_0x8c4be3(0x19f)),'canBrowseFs':_0x399c85(_0x8c4be3(0x1a7))};}__name(readCapabilities,_0x58a691(0x191));function readIdentity(_0x116aaa){const _0x3a1037={_0x5f442e:0x1ab,_0x23cdaf:0x196,_0x5f3e7b:0x196,_0x3bb03a:0x1a6},_0x35398a=_0x58a691;if(typeof _0x116aaa!==_0x35398a(_0x3a1037._0x5f442e)||_0x116aaa===null)return null;const _0x4b4443=_0x116aaa,{user:_0xd95e37,role:_0x2801ea}=_0x4b4443;if(typeof _0xd95e37!==_0x35398a(_0x3a1037._0x23cdaf)||typeof _0x2801ea!=='string')return null;return{'user':_0xd95e37,'role':_0x2801ea,...typeof _0x4b4443[_0x35398a(0x1a8)]==='string'?{'env':_0x4b4443['env']}:{},...typeof _0x4b4443['logoutUrl']===_0x35398a(_0x3a1037._0x5f3e7b)?{'logoutUrl':_0x4b4443[_0x35398a(_0x3a1037._0x3bb03a)]}:{}};}__name(readIdentity,_0x58a691(0x194));export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};