@unotest/viewer 0.27.0 → 0.28.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 _0x25b64b=_0x3b21;(function(_0x2c4363,_0x4048fe){const _0x3ab26d={_0x3f8911:0x182,_0x2bbf13:0x184,_0x2c25e6:0x18a,_0x2a122e:0x18f,_0x5dd682:0x190},_0x5d2f4a=_0x3b21,_0x376fd4=_0x2c4363();while(!![]){try{const _0x1e2517=-parseInt(_0x5d2f4a(0x198))/0x1+parseInt(_0x5d2f4a(0x183))/0x2+-parseInt(_0x5d2f4a(_0x3ab26d._0x3f8911))/0x3+-parseInt(_0x5d2f4a(_0x3ab26d._0x2bbf13))/0x4+parseInt(_0x5d2f4a(_0x3ab26d._0x2c25e6))/0x5+-parseInt(_0x5d2f4a(0x18e))/0x6+parseInt(_0x5d2f4a(_0x3ab26d._0x2a122e))/0x7*(parseInt(_0x5d2f4a(_0x3ab26d._0x5dd682))/0x8);if(_0x1e2517===_0x4048fe)break;else _0x376fd4['push'](_0x376fd4['shift']());}catch(_0x49bf9f){_0x376fd4['push'](_0x376fd4['shift']());}}}(_0x4872,0x52c4c));function _0x3b21(_0x2c6d39,_0x3a6b17){_0x2c6d39=_0x2c6d39-0x181;const _0x4872f0=_0x4872();let _0x3b21e6=_0x4872f0[_0x2c6d39];if(_0x3b21['hyWHMj']===undefined){var _0x39c4e1=function(_0x584a2f){const _0x10a132='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2af93c='',_0x9acbd1='';for(let _0x1c222f=0x0,_0x45b945,_0x28808f,_0x4a95cb=0x0;_0x28808f=_0x584a2f['charAt'](_0x4a95cb++);~_0x28808f&&(_0x45b945=_0x1c222f%0x4?_0x45b945*0x40+_0x28808f:_0x28808f,_0x1c222f++%0x4)?_0x2af93c+=String['fromCharCode'](0xff&_0x45b945>>(-0x2*_0x1c222f&0x6)):0x0){_0x28808f=_0x10a132['indexOf'](_0x28808f);}for(let _0x17f1d0=0x0,_0xef0589=_0x2af93c['length'];_0x17f1d0<_0xef0589;_0x17f1d0++){_0x9acbd1+='%'+('00'+_0x2af93c['charCodeAt'](_0x17f1d0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x9acbd1);};_0x3b21['qPmTvx']=_0x39c4e1,_0x3b21['jvCzfR']={},_0x3b21['hyWHMj']=!![];}const _0x43b9cc=_0x4872f0[0x0],_0xb3e954=_0x2c6d39+_0x43b9cc,_0xffc397=_0x3b21['jvCzfR'][_0xb3e954];return!_0xffc397?(_0x3b21e6=_0x3b21['qPmTvx'](_0x3b21e6),_0x3b21['jvCzfR'][_0xb3e954]=_0x3b21e6):_0x3b21e6=_0xffc397,_0x3b21e6;}var __defProp=Object['defineProperty'],__name=(_0x2af93c,_0x9acbd1)=>__defProp(_0x2af93c,'name',{'value':_0x9acbd1,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x25b64b(0x185);function encodeViewerSession(_0x1c222f){const _0x27f261={_0x3ccc85:0x18d,_0x5d96cb:0x195},_0x269393=_0x25b64b;return Buffer[_0x269393(0x186)](JSON[_0x269393(0x181)](_0x1c222f),_0x269393(0x193))[_0x269393(_0x27f261._0x3ccc85)](_0x269393(_0x27f261._0x5d96cb));}__name(encodeViewerSession,'encodeViewerSession');function decodeViewerSession(_0x45b945){const _0x50ff14=_0x25b64b;if(_0x45b945===void 0x0||_0x45b945==='')return null;let _0x28808f;try{_0x28808f=JSON['parse'](Buffer['from'](_0x45b945,_0x50ff14(0x195))['toString']('utf8'));}catch{return null;}if(typeof _0x28808f!=='object'||_0x28808f===null)return null;const {capabilities:_0x4a95cb,identity:_0x17f1d0}=_0x28808f,_0xef0589=readCapabilities(_0x4a95cb);if(_0xef0589===null)return null;return{'capabilities':_0xef0589,'identity':readIdentity(_0x17f1d0)};}__name(decodeViewerSession,_0x25b64b(0x18b));function readCapabilities(_0x2cea0f){const _0x44a1ce={_0xdbd45a:0x199,_0x50c20b:0x187,_0x301e3a:0x18c},_0x227d2e=_0x25b64b;if(typeof _0x2cea0f!==_0x227d2e(_0x44a1ce._0xdbd45a)||_0x2cea0f===null)return null;const _0x41f5fe=_0x2cea0f,_0x1ac972=__name(_0x165834=>_0x41f5fe[_0x165834]===!![],_0x227d2e(0x192));return{'canRun':_0x1ac972(_0x227d2e(0x197)),'canEditFiles':_0x1ac972(_0x227d2e(_0x44a1ce._0x50c20b)),'canTerminal':_0x1ac972(_0x227d2e(_0x44a1ce._0x301e3a)),'canBrowseFs':_0x1ac972(_0x227d2e(0x194))};}__name(readCapabilities,_0x25b64b(0x196));function _0x4872(){const _0xfb89aa=['mtC1mZK2mhDmt0Xdza','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','zNjVBq','y2fUrwrPDezPBgvZ','C3rYAw5N','zw52','mtC4nZu2nu1jseTHDW','zgvJB2rLvMLLD2vYu2vZC2LVBG','y2fUvgvYBwLUywW','Dg9tDhjPBMC','mtu2odyYofvVDuv6ra','mtriBfP3tMG','ndGWmZKZnMfqvgTgrW','Bg9NB3v0vxjS','zMXHzW','DxrMoa','y2fUqNjVD3nLrNm','yMfZzty0DxjS','CMvHzenHCgfIAwXPDgLLCW','y2fUuNvU','mJa2mdq5s1jjz1bN','B2jQzwn0','C3rYAw5NAwz5','mtu2otCWoenwsLjMDW','nde5ndCYEMPoChzs'];_0x4872=function(){return _0xfb89aa;};return _0x4872();}function readIdentity(_0x2879ae){const _0x41274f={_0x555d3d:0x189,_0x2a3791:0x189,_0x1157b5:0x191},_0x124424=_0x25b64b;if(typeof _0x2879ae!=='object'||_0x2879ae===null)return null;const _0x5aa2a2=_0x2879ae,{user:_0x3b9da8,role:_0x552107}=_0x5aa2a2;if(typeof _0x3b9da8!=='string'||typeof _0x552107!=='string')return null;return{'user':_0x3b9da8,'role':_0x552107,...typeof _0x5aa2a2[_0x124424(_0x41274f._0x555d3d)]==='string'?{'env':_0x5aa2a2[_0x124424(_0x41274f._0x2a3791)]}:{},...typeof _0x5aa2a2[_0x124424(_0x41274f._0x1157b5)]===_0x124424(0x188)?{'logoutUrl':_0x5aa2a2['logoutUrl']}:{}};}__name(readIdentity,'readIdentity');export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};
1
+ const _0x576d7f=_0x25c5;(function(_0x16be06,_0xce1206){const _0x46f8a5={_0x347a66:0x14c,_0x9299fb:0x15c,_0x1dd569:0x151,_0x250b9f:0x157,_0x4af7ad:0x148,_0x404e73:0x142},_0x2a7bb2=_0x25c5,_0x16d51a=_0x16be06();while(!![]){try{const _0x49cd5c=parseInt(_0x2a7bb2(0x140))/0x1*(-parseInt(_0x2a7bb2(0x13e))/0x2)+parseInt(_0x2a7bb2(_0x46f8a5._0x347a66))/0x3*(parseInt(_0x2a7bb2(0x145))/0x4)+parseInt(_0x2a7bb2(0x155))/0x5+parseInt(_0x2a7bb2(_0x46f8a5._0x9299fb))/0x6*(-parseInt(_0x2a7bb2(0x152))/0x7)+-parseInt(_0x2a7bb2(_0x46f8a5._0x1dd569))/0x8*(-parseInt(_0x2a7bb2(_0x46f8a5._0x250b9f))/0x9)+parseInt(_0x2a7bb2(_0x46f8a5._0x4af7ad))/0xa+-parseInt(_0x2a7bb2(0x14a))/0xb*(parseInt(_0x2a7bb2(_0x46f8a5._0x404e73))/0xc);if(_0x49cd5c===_0xce1206)break;else _0x16d51a['push'](_0x16d51a['shift']());}catch(_0xb82019){_0x16d51a['push'](_0x16d51a['shift']());}}}(_0x1dd3,0x2e48c));var __defProp=Object[_0x576d7f(0x14f)],__name=(_0x28c095,_0x55a4b3)=>__defProp(_0x28c095,_0x576d7f(0x15d),{'value':_0x55a4b3,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x576d7f(0x14b);function _0x25c5(_0x18ae68,_0x1cf7f5){_0x18ae68=_0x18ae68-0x13e;const _0x1dd3a4=_0x1dd3();let _0x25c55b=_0x1dd3a4[_0x18ae68];if(_0x25c5['ZQTmwj']===undefined){var _0x14af58=function(_0x26fd60){const _0x6bf5f6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x28c095='',_0x55a4b3='';for(let _0x551220=0x0,_0x43f01c,_0xd7296f,_0x15ea33=0x0;_0xd7296f=_0x26fd60['charAt'](_0x15ea33++);~_0xd7296f&&(_0x43f01c=_0x551220%0x4?_0x43f01c*0x40+_0xd7296f:_0xd7296f,_0x551220++%0x4)?_0x28c095+=String['fromCharCode'](0xff&_0x43f01c>>(-0x2*_0x551220&0x6)):0x0){_0xd7296f=_0x6bf5f6['indexOf'](_0xd7296f);}for(let _0x3d76e1=0x0,_0x15e5e7=_0x28c095['length'];_0x3d76e1<_0x15e5e7;_0x3d76e1++){_0x55a4b3+='%'+('00'+_0x28c095['charCodeAt'](_0x3d76e1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x55a4b3);};_0x25c5['kQMtrc']=_0x14af58,_0x25c5['iABWrK']={},_0x25c5['ZQTmwj']=!![];}const _0x5852fa=_0x1dd3a4[0x0],_0x9ca2ed=_0x18ae68+_0x5852fa,_0x50519a=_0x25c5['iABWrK'][_0x9ca2ed];return!_0x50519a?(_0x25c55b=_0x25c5['kQMtrc'](_0x25c55b),_0x25c5['iABWrK'][_0x9ca2ed]=_0x25c55b):_0x25c55b=_0x50519a,_0x25c55b;}function encodeViewerSession(_0x551220){const _0x32567e=_0x576d7f;return Buffer[_0x32567e(0x144)](JSON[_0x32567e(0x143)](_0x551220),'utf8')[_0x32567e(0x141)](_0x32567e(0x150));}__name(encodeViewerSession,_0x576d7f(0x15b));function decodeViewerSession(_0x43f01c){const _0x4f8337={_0x217fb9:0x156,_0x1dc4fe:0x144,_0x43fca4:0x150,_0x23fb59:0x141},_0x19cb99=_0x576d7f;if(_0x43f01c===void 0x0||_0x43f01c==='')return null;let _0xd7296f;try{_0xd7296f=JSON[_0x19cb99(_0x4f8337._0x217fb9)](Buffer[_0x19cb99(_0x4f8337._0x1dc4fe)](_0x43f01c,_0x19cb99(_0x4f8337._0x43fca4))[_0x19cb99(_0x4f8337._0x23fb59)](_0x19cb99(0x154)));}catch{return null;}if(typeof _0xd7296f!==_0x19cb99(0x14e)||_0xd7296f===null)return null;const {capabilities:_0x15ea33,identity:_0x3d76e1}=_0xd7296f,_0x15e5e7=readCapabilities(_0x15ea33);if(_0x15e5e7===null)return null;return{'capabilities':_0x15e5e7,'identity':readIdentity(_0x3d76e1)};}__name(decodeViewerSession,_0x576d7f(0x14d));function readCapabilities(_0x51e130){const _0x10ed43={_0x1a210a:0x158,_0x602ccd:0x146},_0x2bdaa1=_0x576d7f;if(typeof _0x51e130!=='object'||_0x51e130===null)return null;const _0x110818=_0x51e130,_0x55130a=__name(_0x53fc41=>_0x110818[_0x53fc41]===!![],'flag');return{'canRun':_0x55130a(_0x2bdaa1(0x149)),'canEditFiles':_0x55130a(_0x2bdaa1(_0x10ed43._0x1a210a)),'canTerminal':_0x55130a(_0x2bdaa1(_0x10ed43._0x602ccd)),'canBrowseFs':_0x55130a(_0x2bdaa1(0x153))};}__name(readCapabilities,'readCapabilities');function _0x1dd3(){const _0x5edf07=['CMvHzeLKzw50Axr5','mJqWnZq1mePxuLbguG','y2fUuNvU','nJzbzxzlugC','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','m05vAK13Dq','zgvJB2rLvMLLD2vYu2vZC2LVBG','B2jQzwn0','zgvMAw5LuhjVCgvYDhK','yMfZzty0DxjS','mtz2zKDyEhC','mtKZmteXoePnuNfUCq','y2fUqNjVD3nLrNm','DxrMoa','mtCYmJq5mfPRyvHRra','CgfYC2u','mtmZmJK5C3PtuMvn','y2fUrwrPDezPBgvZ','zw52','Bg9NB3v0vxjS','zw5JB2rLvMLLD2vYu2vZC2LVBG','nK5Lugndtq','BMfTzq','mJG3ndi4t0vRruvU','C3rYAw5N','muvNu1jnqq','Dg9tDhjPBMC','mJyYodCYCNrSuM90','C3rYAw5NAwz5','zNjVBq','ntaYotu2qunlD0Tm','y2fUvgvYBwLUywW'];_0x1dd3=function(){return _0x5edf07;};return _0x1dd3();}function readIdentity(_0x461971){const _0x1d8aae={_0x52c684:0x14e,_0x31d69b:0x13f,_0x277323:0x13f,_0xe74d0d:0x159,_0x43887c:0x15a,_0x5511ea:0x13f},_0x57525f=_0x576d7f;if(typeof _0x461971!==_0x57525f(_0x1d8aae._0x52c684)||_0x461971===null)return null;const _0x520929=_0x461971,{user:_0x3fb62a,role:_0xc7983a}=_0x520929;if(typeof _0x3fb62a!==_0x57525f(_0x1d8aae._0x31d69b)||typeof _0xc7983a!==_0x57525f(_0x1d8aae._0x277323))return null;return{'user':_0x3fb62a,'role':_0xc7983a,...typeof _0x520929[_0x57525f(0x159)]===_0x57525f(0x13f)?{'env':_0x520929[_0x57525f(_0x1d8aae._0xe74d0d)]}:{},...typeof _0x520929[_0x57525f(_0x1d8aae._0x43887c)]===_0x57525f(_0x1d8aae._0x5511ea)?{'logoutUrl':_0x520929[_0x57525f(0x15a)]}:{}};}__name(readIdentity,_0x576d7f(0x147));export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};