@privacyscrubber/sdk 2.4.0 → 2.4.2
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/benchmark.js +33 -25
- package/browser.js +274 -37
- package/cli.js +7 -1
- package/examples/python-bridge/bridge_daemon.cjs +2 -2
- package/examples/python-bridge/fastapi_example.py +1 -1
- package/examples/python-bridge/privacyscrubber/__init__.py +1 -1
- package/examples/python-bridge/privacyscrubber/bridge_daemon.cjs +1 -1
- package/examples/python-bridge/privacyscrubber/cli.py +1 -1
- package/examples/python-bridge/privacyscrubber/client.py +11 -5
- package/examples/python-bridge/pyproject.toml +1 -1
- package/examples/python-bridge/setup.py +1 -1
- package/examples/python-bridge/test_python_bridge.py +1 -1
- package/fastmcp.cjs +29 -18
- package/index.cjs +31 -13
- package/index.js +35 -17
- package/package.json +5 -1
- package/ps-license-manager.js +261 -11
- package/ps-pii-engine.cjs +3611 -8
- package/scrubber-core.cjs +1801 -8
- package/vercel-ai.cjs +1 -1
- package/vercel-ai.js +1 -1
- package/examples/python-bridge/dist/privacyscrubber-2.3.9-py3-none-any.whl +0 -0
- package/examples/python-bridge/dist/privacyscrubber-2.3.9.tar.gz +0 -0
- package/examples/python-bridge/privacyscrubber.egg-info/PKG-INFO +0 -311
- package/examples/python-bridge/privacyscrubber.egg-info/SOURCES.txt +0 -18
- package/examples/python-bridge/privacyscrubber.egg-info/dependency_links.txt +0 -1
- package/examples/python-bridge/privacyscrubber.egg-info/entry_points.txt +0 -3
- package/examples/python-bridge/privacyscrubber.egg-info/requires.txt +0 -18
- package/examples/python-bridge/privacyscrubber.egg-info/top_level.txt +0 -1
package/ps-license-manager.js
CHANGED
|
@@ -1,11 +1,261 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function _0xe728(){const _0x493566=['mtK3na','ntaXoq','x3rPBq','nJKXmG','nwzfDfjVEq','nZu5nq','yMLUyq','mZuYmq','BxrXBW','yMfZzq','mZGXmW','Dw5Kzq','otm3oq','tMvorG','AuLlEa','zxHWAq','zxHW','ote2oq','DhnxAq','q2HHCG','nta4nG','mtyWmG','ofP1D2n0Bq','uLnbia','nZyXna','nde1mW','mtjlEKPWCKq','v3LVzq','otm5nq','CNrZ','r0jsDa','mteWmtK5ohrhwe5ZCG','ndeYoq','swnWAG','otaYmG','zgf0Aq','mJa2nq','CMLUzW','nZG2oq','nZK3oq','yw5HzW','odeWnq','ugPLDq','ugLSBW','ndyWoa','yxnL','nZa4nW','ndKXnq','BM9Tyq','mtKWnq','CMvWBa','mZu0ma','vevbtq','ota4ma','B24GzG','ufmTuG','CgvYqW','nti0mG','zxKGCa','nZyWnq','luXjqW','DcbKzq','zgvJCG','uLnb','mtqXmq','nZa2mq','zg9yDq','DgvT','t1qT','mtmZnG','uLbssq','oda1nW','nZm1oa','mJeZmq','ALrACG','ufjp','mZyWoa','ode0mG','zxrLyW','mte3mq','mJy4ma','nJmWmW','ndi2ntiYrxH5wvrR','ndG4mG','ntu0nW','BhKGza','odCYoq','Aw5JBa','D0DjEG','rgTiqG','otKWma','u2vRtG','DMfSAq','mtiWmq','nZaYmG','odq5nW','B25fEa','y29UyW','terXsG','v1HTqq','ru5urq','Dg9vCa','nta1oa','BM93','D1PUAa','DgfYDa','vgLTzq','q29Kzq','odG1nW','mdmYma','tgjdAG','mJeYnW','BgXIyq','nte1oa','ufmTua','tM8GAW','z1bAyW','zNjVBq','nty5mG','CgfKuW','mty0oa','C3rVCG','odiZnW','ntC0nG','mZG4nG','nZCXnW','yuX3wa','ndaWnW','nJy4mq','mZiXoq','ntaZna','ntG4na','BKjAua','mdG1nW','BNPvyW','mJC2nW','sLDuia','mZy5ma','mJHKBunWDgm','mdC1na','CM92Aq','DhjPBG','wLreuW','mJqYoa','B25bBG','odqYoq','C2vLBG','nZq2mq','CMvK','ndyZnW','ndC3mG','mta4nde3nZHRwxbYB2W','txHcAa','otyWoq','ndi1mW','tgLJzq','ntaXnW','ntK2na','nJi2ma','DgLLCG','q2DwsW','odu1oq','mtu0oq','DgLVBG','CgfYCW','oteYnq','zw5KCW','ody1mG','nZmWoa','DhjPBq','ndC5nG','nJC4mq','igzHAq','nJi0mG','mta5nW','C3vICW','C3bSAq','mte0oq','mZiYma','zM9YBq','nZCWnG','mta0ma','mZq5na','zw1kAW','zw5cAq','BgvUzW','mJi5otG0ngHQB0nhsa','nteXoq','q0vcuq','q2XVyW','mJzFiq','odyYoa','ntaZnG','nJG5oq','ChnFBa','t0vn','mdu5mq','nZyWmW','mdGYoq','vxjUuq','Bw9JAW','nJa4mW','u0rl','yxn0xW','nJu1na','DwrLCW','mJyZnq','mZq4nG','mJmZna','mZC2ma','y2SGyq','mdG2nq','z3jsvG','CMrUtW','DgvK','AKjzvq','ndy3oa','BgLKia','mdy5na','y3j5Ca','s0TWqG','u0eT','ntu4nW','nZmXmG','mJm4oq','zxHWBW','mJG1mG','mdq4nq','nty3ma','nde0oq','nJiXmq','mdy0nW','rhfIDG','ote4mG','ody2mG','ntC0oq','ywDL','AYbYBW','zgvK','mtyYnG','mJCXmq','C2v0sq','nZqYna','sMP4DW','C3rHCG','zMLUzq','mJK2ma','Cg93','suXpva','mJa2nG','ntmXoq','mJu4mq','quPdtG','vhbsAG','otaZnW','nJKZmG','CgLYzq','mJuYnW','z2v0sq','x1nbta','nZq3ma','ndu2mG','nJm0nW','zxLk','nZq3mdqYognYz1PHuW','nJG4na','Exb0Aq','mJCZna','A2v5ia','wfvNvW','ywLSzq','lvbjta','ywnL','C2XPyW','vf8Yma','mZGWmW','v2L0Aa','BgvK','mJe4oa','B21HBa','mdmXmq','odK3oq','mJC2oq','nJCXnJGXneDOvujduG','BNnLtq','mJK2mdK1nJLcEwX3vuu','Dg9tDa','mtqYmq','odmXnW','odyXmG','rvrrBq','mZa5nG','Ew9IsG','nJq5oq','sLDu','y2HHCG','odiXmG','otG2oa','sw52yq','y0TOtq','DcbLEa','mtCYoq','ndq3nW','ndy4ma','nJa1nG','y0XlzG','nta0na','odKYnq','ntGXoa','nJqYma','mtbsEw9ZEhK','oti5na'];_0xe728=function(){return _0x493566;};return _0xe728();}function _0x410b(_0x266537,_0x458a3a){_0x266537=_0x266537-0x159;const _0xe7286f=_0xe728();let _0x410be3=_0xe7286f[_0x266537];if(_0x410b['krrIxU']===undefined){var _0x2915a6=function(_0x4a6a7b){const _0x1aa2aa='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x17be3c='',_0x3152a7='';for(let _0x80cbb2=0x0,_0x179bb9,_0x2f5efd,_0x13a1af=0x0;_0x2f5efd=_0x4a6a7b['charAt'](_0x13a1af++);~_0x2f5efd&&(_0x179bb9=_0x80cbb2%0x4?_0x179bb9*0x40+_0x2f5efd:_0x2f5efd,_0x80cbb2++%0x4)?_0x17be3c+=String['fromCharCode'](0xff&_0x179bb9>>(-0x2*_0x80cbb2&0x6)):0x0){_0x2f5efd=_0x1aa2aa['indexOf'](_0x2f5efd);}for(let _0x51ee0c=0x0,_0x31434d=_0x17be3c['length'];_0x51ee0c<_0x31434d;_0x51ee0c++){_0x3152a7+='%'+('00'+_0x17be3c['charCodeAt'](_0x51ee0c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3152a7);};_0x410b['Xlzlus']=_0x2915a6,_0x410b['sdrGLi']={},_0x410b['krrIxU']=!![];}const _0x8dcbcc=_0xe7286f[0x0],_0x1bbb5c=_0x266537+_0x8dcbcc,_0x19da59=_0x410b['sdrGLi'][_0x1bbb5c];return!_0x19da59?(_0x410be3=_0x410b['Xlzlus'](_0x410be3),_0x410b['sdrGLi'][_0x1bbb5c]=_0x410be3):_0x410be3=_0x19da59,_0x410be3;}const _0xc1de4a=_0x410b,_0x196a6e=_0x410b;(function(_0x40e4b7,_0x272153){const _0x53f91a={_0x2a58c6:0x211,_0x22770d:0x1a9,_0x231567:0x1e1,_0x15a7c0:0x15b,_0x15a6ef:0x272,_0xffe1e0:0x25f,_0x224dc4:0x16d,_0x1efca6:0x1ee,_0x4d9ff4:0x28d,_0x40e28f:0x274,_0x44d2da:0x171},_0x3713da=_0x410b,_0x308c33=_0x410b,_0x12eece=_0x40e4b7();while(!![]){try{const _0x3d1bfd=-parseInt(_0x3713da(0x176))/0x1+parseInt(_0x308c33(_0x53f91a._0x2a58c6))/0x2+-parseInt(_0x308c33(_0x53f91a._0x22770d))/0x3*(parseInt(_0x3713da(_0x53f91a._0x231567))/0x4)+parseInt(_0x3713da(_0x53f91a._0x15a7c0))/0x5*(-parseInt(_0x308c33(_0x53f91a._0x15a6ef))/0x6)+-parseInt(_0x3713da(_0x53f91a._0xffe1e0))/0x7*(parseInt(_0x3713da(_0x53f91a._0x224dc4))/0x8)+-parseInt(_0x308c33(_0x53f91a._0x1efca6))/0x9*(-parseInt(_0x3713da(_0x53f91a._0x4d9ff4))/0xa)+parseInt(_0x3713da(_0x53f91a._0x40e28f))/0xb*(parseInt(_0x308c33(_0x53f91a._0x44d2da))/0xc);if(_0x3d1bfd===_0x272153)break;else _0x12eece['push'](_0x12eece['shift']());}catch(_0x409573){_0x12eece['push'](_0x12eece['shift']());}}}(_0xe728,0xba256),function(_0x390583){const _0x583d0f={_0xce66ca:0x210,_0x52064c:0x219,_0x11d7e7:0x222,_0x98bc58:0x159,_0x53967f:0x1e5,_0x4704f5:0x266,_0xd48feb:0x19b,_0x410d85:0x18e,_0x3c5f9b:0x234,_0x4a5a65:0x221,_0x3bc736:0x1bb,_0x406a65:0x27d,_0x5acebe:0x1df,_0x165f35:0x1eb,_0x8c57d7:0x162,_0x5ac43d:0x24c,_0x59d290:0x1ba,_0x3f3b51:0x1a0,_0x174e01:0x17e,_0x427bbe:0x20c,_0x4db593:0x227,_0x32cd1c:0x280,_0x319208:0x1a7,_0x1a7b13:0x290,_0x18bd3c:0x170,_0x45be4b:0x15c,_0x52b832:0x1a3,_0x49451c:0x1f0,_0x13ab92:0x18c,_0x49708f:0x284,_0x585a57:0x192,_0x799c56:0x1cd,_0x3ebc98:0x180,_0x4b5af1:0x223,_0x1ab6c2:0x1b4,_0x3bff84:0x255,_0x4a3df8:0x1ec,_0x5a1bdc:0x1c6,_0x2dbd44:0x16f,_0x297564:0x1c3,_0x268145:0x188,_0x2c6aef:0x220,_0x4fa7d4:0x27c,_0x154695:0x1e2,_0x5a89c4:0x163,_0x4284f5:0x1fc,_0x2323be:0x183,_0x2bc1fe:0x262,_0x4bb08a:0x285,_0xa8d954:0x23a,_0x3774f2:0x1aa,_0x502470:0x17d,_0x222a1b:0x286,_0x485b6a:0x1ab,_0x1a1cc4:0x26f,_0x441167:0x22a,_0x3398c7:0x289,_0x2289bc:0x27a,_0x5bc652:0x216,_0x3fb3cc:0x21c,_0x6feaed:0x208,_0x24ae63:0x177,_0x5df1e4:0x16b,_0x404eee:0x1c8,_0x3c1d15:0x246,_0x30a635:0x278,_0x469e29:0x252,_0x5b0afb:0x21d,_0x25c58e:0x202,_0x4d82f5:0x28a,_0x59bad3:0x277,_0x1026c6:0x276,_0xb7dcc8:0x287,_0x32f8c9:0x218,_0x29be6c:0x23e,_0x550e0f:0x1d1,_0x56700c:0x209,_0x3fc7b9:0x1d4,_0x3bc7cb:0x179,_0xea524d:0x28b,_0x56b29f:0x204,_0x2218f5:0x1fe,_0x39b5ba:0x249,_0x506563:0x226,_0x90777b:0x1f8,_0x38de5f:0x241,_0x254327:0x1a6,_0x549719:0x25d,_0x5ef84a:0x19c,_0x28f147:0x1a4,_0x1cdfd8:0x173,_0x4f0145:0x23b,_0x23371b:0x271,_0x42f375:0x1f5,_0x18f944:0x236,_0x73d8bc:0x242,_0x1dc902:0x1f4,_0x3944ac:0x28e,_0x5f0dfe:0x23d,_0xe77ca:0x24d,_0x3399c5:0x1d7,_0x292477:0x258,_0x35428a:0x1bd,_0x3aeecc:0x228,_0x7055ce:0x1ff,_0x49cf39:0x186,_0x3e72af:0x15e,_0x2414dd:0x28f,_0x3c163f:0x1b5,_0x250391:0x201,_0x58a350:0x1d3,_0x28b8ed:0x1a8,_0x4894bc:0x217,_0x1cc7d1:0x1de,_0x33ab00:0x21b,_0x80eaa1:0x1d6,_0xe5c6a8:0x239,_0x5070f2:0x1ea,_0x4be84e:0x1e8,_0x117590:0x1dc,_0x79d260:0x1ad,_0x1be29d:0x1da,_0x2910f3:0x15a,_0x415011:0x1e0,_0x520f86:0x1b1,_0x21fab9:0x1f3,_0x1a90e8:0x1c4,_0x3e791b:0x20d,_0x507a61:0x16c,_0x5cd01f:0x231,_0x4148ac:0x225,_0x18f4fb:0x197,_0x694d4c:0x20b,_0x2df170:0x235,_0x2ec0e2:0x168,_0x47d553:0x273,_0x4741bc:0x17f,_0x3ea7c6:0x1f2,_0x1baf07:0x17f,_0x318aa0:0x24c,_0x24ebee:0x1f2,_0x3d7ae1:0x1b9,_0x57469c:0x174},_0x19be63={_0xf0df7f:0x1ca,_0xa1d71d:0x1bc,_0x1429ee:0x18f,_0xbd4f01:0x207,_0x324afa:0x21f,_0x37cdc9:0x1c1,_0x2aed73:0x1d0,_0x123406:0x243,_0x2a4e43:0x1d0,_0x16d302:0x243,_0x22a19f:0x259,_0x4dbe21:0x19a,_0x23a8d5:0x22e,_0x4bdb1d:0x1c1,_0x478cfa:0x21f,_0x2ccce9:0x1c1,_0x35374a:0x243,_0xcc39e9:0x248,_0x38e384:0x219,_0x4c93fc:0x222,_0x4a750c:0x159,_0x1159a9:0x17c,_0x1eda07:0x21f,_0xdb3baa:0x1cb,_0x1349b0:0x1e7,_0x2bf536:0x26e,_0x1a22bc:0x26e,_0x492352:0x1c7,_0x573c39:0x229,_0x982b64:0x187,_0x432b5d:0x1ac,_0x1cc34e:0x1a5,_0x5b3653:0x22d,_0x1a4e96:0x162,_0x994777:0x24b,_0x83d0b8:0x169,_0x3826f7:0x1c9,_0xf4b5c1:0x24f,_0x299ea2:0x206,_0x5c3def:0x1e4,_0x58fede:0x210,_0x14f185:0x1c2,_0x59a99c:0x210,_0x9ecc32:0x1c0,_0x33c199:0x169,_0x1638fa:0x206,_0x20bd1b:0x15f,_0x3c2f0f:0x18b,_0x4f78ae:0x1b7,_0x4e773b:0x257,_0x3e9586:0x257,_0x3bf438:0x182,_0x53a6d9:0x182,_0x1bb693:0x283,_0x287ca5:0x182,_0x1c201d:0x194,_0x3d5fbe:0x232,_0x5ce7ba:0x1fa,_0x3344aa:0x203,_0x385438:0x26c,_0x2d8e4e:0x24b,_0x3fc1c2:0x169,_0x42c8c9:0x1e4,_0x574e9e:0x1ba,_0x42f40f:0x27e,_0x429fa3:0x1c2,_0x55c568:0x210,_0x4470bd:0x275,_0x2f531e:0x17c,_0x24577b:0x213,_0x2cbcbc:0x169,_0x35e1a2:0x1e5,_0x1412a2:0x193,_0x5aad59:0x207,_0x3e9ca8:0x1b7,_0x2b547e:0x1b7,_0x54d4fc:0x257,_0x3f571a:0x1bf,_0x28d6cb:0x16e,_0x3adcd1:0x263,_0xf719e5:0x166,_0x395d12:0x1eb,_0x2174f7:0x195,_0x446919:0x18d,_0x208f6c:0x181,_0xf093f1:0x1a2,_0xb55ce0:0x1a1,_0x50c202:0x21a,_0x168181:0x233,_0x17518d:0x1ae,_0x488f80:0x25a,_0x11fea2:0x269,_0x2d4f78:0x215,_0x1b0e73:0x27e,_0x5e2c72:0x1ce,_0x919fc1:0x1c0,_0x7b2005:0x169,_0x1fb20a:0x25e,_0xd0871a:0x207,_0x4c6c49:0x189,_0x8c0116:0x267,_0x529b9b:0x189,_0x4445f2:0x27e,_0x202973:0x275,_0x53653b:0x1b0,_0x642e19:0x264,_0x897091:0x275,_0x2d8791:0x199,_0x2ed1a2:0x189,_0x72292b:0x1fb,_0x34d553:0x167,_0x584c15:0x1f6,_0x54f6c7:0x1a2,_0x10f5d9:0x257,_0x209725:0x257,_0xc343d2:0x253,_0x3a7b19:0x1df,_0x17005d:0x1b3,_0x57813e:0x17a,_0x4c9708:0x18d,_0x559df8:0x281,_0x4c0680:0x230},_0x5cba76={_0x4624a0:0x24e,_0x3157a2:0x282,_0x261403:0x22c,_0x23610e:0x21e,_0x4dd17:0x288,_0x198824:0x27e,_0xa83edd:0x1c2,_0x339d1d:0x1ef,_0x3de801:0x22c,_0x9a781:0x20e,_0x2e5210:0x288,_0x1015f1:0x268,_0xc32128:0x268,_0x250c8b:0x164,_0x46cd81:0x279,_0x1d24e6:0x279,_0x50eed5:0x1f7,_0x343e83:0x254,_0x5db278:0x1d5,_0x3eb05e:0x1f7,_0x3f0c04:0x172,_0x3b8940:0x27b,_0x3d1199:0x279,_0x485141:0x1dd,_0x7e8df9:0x175,_0x2665c2:0x1b8,_0x2ffdd3:0x288,_0x2f8e68:0x22c,_0x30ed0e:0x1c5,_0x5c59f1:0x275,_0x4f2486:0x17c},_0x19b46f={_0x2e9f00:0x210,_0x496efc:0x27e,_0x1774dc:0x1c2,_0x173a21:0x275,_0x180666:0x17c,_0x38ff6a:0x1ce},_0x2ed152={_0x30dd1f:0x275,_0x10e284:0x210,_0x4fbdbb:0x210,_0x4f324e:0x1cc,_0x32bec0:0x16a,_0x406f98:0x1dd},_0x16b3bf={_0x5038d9:0x21e,_0x36f97f:0x20e,_0x354ddf:0x22c},_0x4d6853=_0x410b,_0x47ab44=_0x410b,_0x4bce41={'UrnQH':function(_0x27c063,_0x1c5688){return _0x27c063%_0x1c5688;},'emJkp':function(_0x52f371,_0x4bd3e4){return _0x52f371/_0x4bd3e4;},'rdnOD':function(_0x26c112,_0x208095){return _0x26c112*_0x208095;},'nzUcx':function(_0x40351c,_0x118186,_0x1e9d49){return _0x40351c(_0x118186,_0x1e9d49);},'cKhMJ':function(_0x25ecd3,_0x1ed514,_0x5b4b90){return _0x25ecd3(_0x1ed514,_0x5b4b90);},'Jjxwz':_0x4d6853(_0x583d0f._0xce66ca)+'th','cLKfv':function(_0xe78d80,_0x1ef5b2){return _0xe78d80<_0x1ef5b2;},'MxBhu':function(_0x2bbdf2,_0x4527dd){return _0x2bbdf2<<_0x4527dd;},'NeNFr':function(_0x18e7a4,_0x589f62){return _0x18e7a4<_0x589f62;},'ETQmD':function(_0x4dbd7c,_0x39c727){return _0x4dbd7c^_0x39c727;},'CgVKr':function(_0x2120cb,_0x34adca,_0x1f5189){return _0x2120cb(_0x34adca,_0x1f5189);},'TpRjD':function(_0x33029e,_0x24bb27){return _0x33029e+_0x24bb27;},'aLwXW':function(_0x3c6931,_0x2b1577){return _0x3c6931^_0x2b1577;},'WyoeT':function(_0xc7c5cc,_0x2bef01,_0x3438d0){return _0xc7c5cc(_0x2bef01,_0x3438d0);},'yobJO':function(_0xb387ef,_0x3b0da6){return _0xb387ef>>>_0x3b0da6;},'GBRtT':function(_0x1c0aa2,_0x19d1a9){return _0x1c0aa2|_0x19d1a9;},'LbCjM':function(_0x21d689,_0x524ad2){return _0x21d689<_0x524ad2;},'jBYUf':_0x47ab44(_0x583d0f._0x52064c)+_0x47ab44(_0x583d0f._0x11d7e7)+_0x4d6853(0x1e9)+_0x47ab44(_0x583d0f._0x98bc58)+'e','gPZcx':function(_0x5b57b8,_0xc56de2){return _0x5b57b8===_0xc56de2;},'Icpjn':_0x4d6853(_0x583d0f._0x53967f)+_0x4d6853(_0x583d0f._0x4704f5)+_0x47ab44(_0x583d0f._0xd48feb),'mtqoO':function(_0x564fa7,_0x1ded1f){return _0x564fa7<_0x1ded1f;},'wGIzk':_0x47ab44(_0x583d0f._0x410d85)+_0x47ab44(_0x583d0f._0x3c5f9b),'WXmAN':function(_0x26a024,_0x546b45){return _0x26a024(_0x546b45);},'CEBQz':function(_0x2dcd4b,_0x3582da,_0x2b1926,_0x1e4969){return _0x2dcd4b(_0x3582da,_0x2b1926,_0x1e4969);},'wZnhl':_0x4d6853(0x196),'Pjeuk':function(_0x3ec77d,_0x532586){return _0x3ec77d===_0x532586;},'jTZrc':_0x47ab44(_0x583d0f._0x4a5a65),'KKpBp':_0x4d6853(_0x583d0f._0x3bc736)+_0x4d6853(0x19d)+'SE','enBiF':function(_0x1b6a6e,_0x19a396){return _0x1b6a6e<_0x19a396;},'DkHBp':function(_0x24cf1e,_0x1fae95){return _0x24cf1e+_0x1fae95;},'XUgWa':function(_0x443500,_0x48291a,_0xfd191a,_0x4020b9){return _0x443500(_0x48291a,_0xfd191a,_0x4020b9);},'doXuc':function(_0x3c9b7b,_0x3fdf7c){return _0x3c9b7b+_0x3fdf7c;},'grRVn':function(_0x25bb9b,_0x5b2bde){return _0x25bb9b(_0x5b2bde);},'iIKxe':function(_0x9f01c1,_0x5d0015){return _0x9f01c1<_0x5d0015;},'SekNG':_0x47ab44(_0x583d0f._0x406a65),'AJCNm':_0x4d6853(_0x583d0f._0x5acebe)+_0x4d6853(0x166)+_0x4d6853(_0x583d0f._0x165f35),'LDqJe':_0x4d6853(_0x583d0f._0x8c57d7)+_0x47ab44(_0x583d0f._0x5ac43d)+'d'},_0x374988=_0x4bce41[_0x4d6853(_0x583d0f._0x59d290)+'N'](BigInt,_0x47ab44(_0x583d0f._0x3f3b51)+_0x4d6853(_0x583d0f._0x174e01)+_0x47ab44(_0x583d0f._0x427bbe)+_0x47ab44(0x1d9)+_0x47ab44(0x22f)+_0x4d6853(_0x583d0f._0x4db593)+_0x4d6853(0x190)+_0x4d6853(0x26a)+_0x4d6853(_0x583d0f._0x32cd1c)+_0x47ab44(0x260)+_0x4d6853(_0x583d0f._0x319208)+_0x4d6853(_0x583d0f._0x1a7b13)+_0x4d6853(_0x583d0f._0x18bd3c)+_0x4d6853(0x19e)+_0x47ab44(_0x583d0f._0x45be4b)+_0x4d6853(_0x583d0f._0x52b832)+_0x4d6853(_0x583d0f._0x49451c)+_0x4d6853(_0x583d0f._0x13ab92)+_0x4d6853(0x1e6)+_0x4d6853(_0x583d0f._0x49708f)+_0x4d6853(_0x583d0f._0x585a57)+_0x4d6853(_0x583d0f._0x799c56)+_0x47ab44(0x26d)+_0x47ab44(_0x583d0f._0x3ebc98)+_0x4d6853(_0x583d0f._0x4b5af1)+_0x4d6853(_0x583d0f._0x1ab6c2)+_0x4d6853(0x1d8)+_0x47ab44(_0x583d0f._0x3bff84)+_0x4d6853(_0x583d0f._0x4a3df8)+_0x47ab44(_0x583d0f._0x5a1bdc)+_0x47ab44(_0x583d0f._0x2dbd44)+_0x4d6853(_0x583d0f._0x297564)+_0x47ab44(_0x583d0f._0x268145)+_0x4d6853(0x251)+_0x47ab44(0x237)+_0x4d6853(_0x583d0f._0x2c6aef)+_0x47ab44(_0x583d0f._0x4fa7d4)+_0x47ab44(_0x583d0f._0x154695)+_0x4d6853(_0x583d0f._0x5a89c4)+_0x4d6853(_0x583d0f._0x4284f5)+_0x4d6853(_0x583d0f._0x2323be)+_0x47ab44(0x205)+_0x47ab44(0x247)+_0x4d6853(_0x583d0f._0x2bc1fe)+_0x47ab44(_0x583d0f._0x4bb08a)+_0x47ab44(_0x583d0f._0xa8d954)+_0x4d6853(_0x583d0f._0x3774f2)+_0x47ab44(_0x583d0f._0x502470)+_0x4d6853(_0x583d0f._0x222a1b)+_0x4d6853(_0x583d0f._0x485b6a)+_0x4d6853(_0x583d0f._0x1a1cc4)+_0x47ab44(0x1f1)+_0x4d6853(_0x583d0f._0x441167)+_0x4d6853(_0x583d0f._0x3398c7)+_0x4d6853(_0x583d0f._0x2289bc)+_0x47ab44(_0x583d0f._0x5bc652)+_0x4d6853(_0x583d0f._0x3fb3cc)+_0x47ab44(_0x583d0f._0x6feaed)+_0x4d6853(_0x583d0f._0x24ae63)+_0x47ab44(0x1f9)+_0x47ab44(_0x583d0f._0x5df1e4)+_0x47ab44(_0x583d0f._0x404eee)+_0x4d6853(0x19f)+_0x47ab44(_0x583d0f._0x3c1d15)+_0x4d6853(_0x583d0f._0x30a635)+_0x4d6853(_0x583d0f._0x469e29)+_0x4d6853(_0x583d0f._0x5b0afb)+_0x4d6853(_0x583d0f._0x25c58e)+_0x47ab44(_0x583d0f._0x4d82f5)+_0x4d6853(_0x583d0f._0x59bad3)+_0x4d6853(_0x583d0f._0x1026c6)+_0x47ab44(_0x583d0f._0xb7dcc8)+_0x4d6853(_0x583d0f._0x32f8c9)+_0x47ab44(0x270)+_0x4d6853(_0x583d0f._0x29be6c)+_0x4d6853(_0x583d0f._0x550e0f)+_0x4d6853(0x1ad)+_0x4d6853(_0x583d0f._0x56700c)+_0x4d6853(_0x583d0f._0x3fc7b9)+_0x47ab44(_0x583d0f._0x3bc7cb)+_0x47ab44(_0x583d0f._0xea524d)+_0x47ab44(0x1b6)+_0x4d6853(_0x583d0f._0x56b29f)+_0x47ab44(0x198)+_0x4d6853(0x256)+_0x47ab44(0x18a)+_0x4d6853(0x25c)+_0x4d6853(_0x583d0f._0x2218f5)+_0x47ab44(0x28c)+_0x4d6853(_0x583d0f._0x39b5ba)+_0x47ab44(_0x583d0f._0x506563)+_0x4d6853(_0x583d0f._0x90777b)+_0x47ab44(_0x583d0f._0x38de5f)+_0x47ab44(_0x583d0f._0x254327)+_0x4d6853(_0x583d0f._0x549719)+_0x4d6853(_0x583d0f._0x5ef84a)+_0x4d6853(_0x583d0f._0x28f147)+_0x4d6853(_0x583d0f._0x1cdfd8)+_0x4d6853(0x1ed)+_0x4d6853(_0x583d0f._0x4f0145)+_0x47ab44(0x1d2)+_0x47ab44(_0x583d0f._0x23371b)+_0x4d6853(_0x583d0f._0x42f375)+_0x47ab44(_0x583d0f._0x18f944)+_0x4d6853(_0x583d0f._0x73d8bc)+_0x4d6853(_0x583d0f._0x1dc902)+_0x4d6853(0x17b)+_0x47ab44(_0x583d0f._0x3944ac)+_0x47ab44(_0x583d0f._0x5f0dfe)+_0x4d6853(0x23c)+_0x4d6853(_0x583d0f._0xe77ca)+_0x4d6853(_0x583d0f._0x3399c5)+_0x4d6853(_0x583d0f._0x292477)+_0x4d6853(_0x583d0f._0x35428a)+_0x47ab44(_0x583d0f._0x3aeecc)+_0x47ab44(0x27f)+_0x4d6853(_0x583d0f._0x7055ce)+_0x4d6853(0x25b)+_0x4d6853(_0x583d0f._0x49cf39)+_0x4d6853(_0x583d0f._0x3e72af)+_0x47ab44(_0x583d0f._0x2414dd)+_0x4d6853(_0x583d0f._0x3c163f)+_0x4d6853(0x240)+_0x47ab44(_0x583d0f._0x250391)+_0x4d6853(_0x583d0f._0x58a350)+_0x4d6853(_0x583d0f._0x28b8ed)+_0x47ab44(_0x583d0f._0x4894bc)+_0x47ab44(0x212)+_0x47ab44(0x250)+_0x47ab44(_0x583d0f._0x1cc7d1)+_0x47ab44(_0x583d0f._0x33ab00)+_0x4d6853(_0x583d0f._0x80eaa1)+_0x4d6853(_0x583d0f._0xe5c6a8)+_0x4d6853(0x161)+_0x47ab44(_0x583d0f._0x5070f2)+_0x4d6853(_0x583d0f._0x4be84e)+_0x4d6853(_0x583d0f._0x117590)+_0x47ab44(_0x583d0f._0x79d260)+_0x47ab44(_0x583d0f._0x1be29d)+_0x47ab44(0x185)+_0x47ab44(_0x583d0f._0x2910f3)+_0x47ab44(_0x583d0f._0x415011)+_0x4d6853(_0x583d0f._0x520f86)+_0x47ab44(_0x583d0f._0x21fab9)+_0x4d6853(_0x583d0f._0x1a90e8)+_0x47ab44(_0x583d0f._0x3e791b)+_0x47ab44(_0x583d0f._0x507a61)+_0x4d6853(_0x583d0f._0x5cd01f)+_0x4d6853(0x1cf)+_0x4d6853(_0x583d0f._0x4148ac)+_0x4d6853(_0x583d0f._0x18f4fb)+_0x4d6853(_0x583d0f._0x694d4c)+_0x4d6853(_0x583d0f._0x2df170)+_0x4d6853(_0x583d0f._0x2ec0e2)+'1'),_0x30ed66=0x10001n;function _0x40401b(_0x5efa76,_0x11a6cd,_0x1e50c7){const _0x50df3b=_0x47ab44,_0x5be020=_0x47ab44;let _0x4fca1f=0x1n;_0x5efa76=_0x5efa76%_0x1e50c7;while(_0x11a6cd>0x0n){if(_0x4bce41[_0x50df3b(_0x16b3bf._0x5038d9)+'H'](_0x11a6cd,0x2n)===0x1n)_0x4fca1f=_0x4fca1f*_0x5efa76%_0x1e50c7;_0x11a6cd=_0x4bce41[_0x50df3b(_0x16b3bf._0x36f97f)+'p'](_0x11a6cd,0x2n),_0x5efa76=_0x4bce41[_0x50df3b(_0x16b3bf._0x5038d9)+'H'](_0x4bce41[_0x50df3b(_0x16b3bf._0x354ddf)+'D'](_0x5efa76,_0x5efa76),_0x1e50c7);}return _0x4fca1f;}function _0x4ee7bc(_0x21e2d6){const _0x2a558b=_0x47ab44,_0x5136a7=_0x47ab44;let _0x2185e9=_0x21e2d6[_0x2a558b(_0x2ed152._0x30dd1f)+_0x5136a7(0x17c)](0x10);if(_0x2185e9[_0x5136a7(_0x2ed152._0x10e284)+'th']%0x2!==0x0)_0x2185e9='0'+_0x2185e9;let _0x7f0b47='';for(let _0x7bf70d=0x0;_0x7bf70d<_0x2185e9[_0x5136a7(_0x2ed152._0x4fbdbb)+'th'];_0x7bf70d+=0x2){_0x7f0b47+=String[_0x2a558b(_0x2ed152._0x4f324e)+_0x2a558b(_0x2ed152._0x32bec0)+_0x2a558b(0x1c2)](_0x4bce41[_0x5136a7(_0x2ed152._0x406f98)+'x'](parseInt,_0x2185e9[_0x2a558b(0x206)+'tr'](_0x7bf70d,0x2),0x10));}return _0x7f0b47;}function _0x2134f(_0x684469){const _0x2d78cc=_0x4d6853,_0x36d093=_0x4d6853;let _0x16b24e='';for(let _0x27311f=0x0;_0x27311f<_0x684469[_0x2d78cc(_0x19b46f._0x2e9f00)+'th'];_0x27311f++){_0x16b24e+=_0x684469[_0x2d78cc(_0x19b46f._0x496efc)+_0x2d78cc(_0x19b46f._0x1774dc)+'At'](_0x27311f)[_0x36d093(_0x19b46f._0x173a21)+_0x36d093(_0x19b46f._0x180666)](0x10)[_0x36d093(_0x19b46f._0x38ff6a)+_0x2d78cc(0x1c0)](0x2,'0');}return BigInt('0x'+_0x16b24e);}function _0x56462d(_0xdb2c9f){const _0x17bd7b={_0x1207b1:0x1db},_0x51b773=_0x4d6853,_0x5ae7e9=_0x4d6853,_0x304824={'nBZPS':function(_0x265e6b,_0x239265){return _0x265e6b<<_0x239265;},'Dqbvw':function(_0x410b37,_0x384eab){return _0x410b37-_0x384eab;}};function _0x3cb57e(_0x2ceb4b,_0x4dbb19){const _0x41ed02=_0x410b,_0x2cd234=_0x410b;return _0x2ceb4b>>>_0x4dbb19|_0x304824[_0x41ed02(_0x17bd7b._0x1207b1)+'S'](_0x2ceb4b,_0x304824[_0x41ed02(0x23f)+'w'](0x20,_0x4dbb19));}var _0x357113=Math[_0x51b773(_0x5cba76._0x4624a0)],_0x50cab5=_0x4bce41[_0x5ae7e9(_0x5cba76._0x3157a2)+'J'](_0x357113,0x2,0x20),_0x56a6e7=_0x4bce41[_0x51b773(0x24a)+'z'],_0x1e2a61,_0x5c30df,_0x55fa36='',_0x10b20e=[],_0xf437ea=_0x4bce41[_0x5ae7e9(_0x5cba76._0x261403)+'D'](_0xdb2c9f[_0x56a6e7],0x8),_0x1d11ec=_0x56462d['h']=_0x56462d['h']||[],_0x226e00=_0x56462d['k']=_0x56462d['k']||[],_0x50f6b5=_0x226e00[_0x56a6e7],_0x27e32c={};for(var _0x2877cd=0x2;_0x50f6b5<0x40;_0x2877cd++){if(!_0x27e32c[_0x2877cd]){for(_0x1e2a61=0x0;_0x1e2a61<0x139;_0x1e2a61+=_0x2877cd){_0x27e32c[_0x1e2a61]=_0x2877cd;}_0x1d11ec[_0x50f6b5]=_0x357113(_0x2877cd,0.5)*_0x50cab5|0x0,_0x226e00[_0x50f6b5++]=_0x357113(_0x2877cd,0x1/0x3)*_0x50cab5|0x0;}}_0xdb2c9f+='\u0080';while(_0x4bce41[_0x5ae7e9(_0x5cba76._0x23610e)+'H'](_0xdb2c9f[_0x56a6e7],0x40)-0x38)_0xdb2c9f+='\x00';for(_0x1e2a61=0x0;_0x4bce41[_0x5ae7e9(_0x5cba76._0x4dd17)+'v'](_0x1e2a61,_0xdb2c9f[_0x56a6e7]);_0x1e2a61++){_0x5c30df=_0xdb2c9f[_0x5ae7e9(_0x5cba76._0x198824)+_0x51b773(_0x5cba76._0xa83edd)+'At'](_0x1e2a61);if(_0x5c30df>>0x8)return;_0x10b20e[_0x1e2a61>>0x2]|=_0x4bce41[_0x51b773(_0x5cba76._0x339d1d)+'u'](_0x5c30df,_0x4bce41[_0x51b773(_0x5cba76._0x3de801)+'D']((0x3-_0x1e2a61)%0x4,0x8));}_0x10b20e[_0x10b20e[_0x56a6e7]]=_0x4bce41[_0x51b773(_0x5cba76._0x9a781)+'p'](_0xf437ea,_0x50cab5)|0x0,_0x10b20e[_0x10b20e[_0x56a6e7]]=_0xf437ea;for(_0x5c30df=0x0;_0x4bce41[_0x51b773(_0x5cba76._0x2e5210)+'v'](_0x5c30df,_0x10b20e[_0x56a6e7]);){var _0x40a31c=_0x10b20e[_0x5ae7e9(_0x5cba76._0x1015f1)+'e'](_0x5c30df,_0x5c30df+=0x10),_0x3ab1db=_0x1d11ec;_0x1d11ec=_0x1d11ec[_0x51b773(_0x5cba76._0xc32128)+'e'](0x0,0x8);for(_0x1e2a61=0x0;_0x4bce41[_0x5ae7e9(_0x5cba76._0x250c8b)+'r'](_0x1e2a61,0x40);_0x1e2a61++){var _0x37dc77=_0x40a31c[_0x1e2a61-0xf],_0x881ac2=_0x40a31c[_0x1e2a61-0x2],_0x179aa8=_0x1d11ec[0x0],_0x49bf0b=_0x1d11ec[0x4],_0x409ee0=_0x1d11ec[0x7]+_0x4bce41[_0x5ae7e9(_0x5cba76._0x46cd81)+'D'](_0x4bce41[_0x5ae7e9(_0x5cba76._0x1d24e6)+'D'](_0x4bce41[_0x51b773(_0x5cba76._0x50eed5)+'r'](_0x3cb57e,_0x49bf0b,0x6),_0x3cb57e(_0x49bf0b,0xb)),_0x3cb57e(_0x49bf0b,0x19))+(_0x49bf0b&_0x1d11ec[0x5]^~_0x49bf0b&_0x1d11ec[0x6])+_0x226e00[_0x1e2a61]+(_0x40a31c[_0x1e2a61]=_0x1e2a61<0x10?_0x40a31c[_0x1e2a61]:_0x4bce41[_0x51b773(_0x5cba76._0x343e83)+'D'](_0x40a31c[_0x1e2a61-0x10]+_0x4bce41[_0x51b773(_0x5cba76._0x5db278)+'W'](_0x4bce41[_0x51b773(_0x5cba76._0x3eb05e)+'r'](_0x3cb57e,_0x37dc77,0x7)^_0x4bce41[_0x51b773(_0x5cba76._0x3f0c04)+'T'](_0x3cb57e,_0x37dc77,0x12),_0x4bce41[_0x51b773(_0x5cba76._0x3b8940)+'O'](_0x37dc77,0x3))+_0x40a31c[_0x1e2a61-0x7],_0x4bce41[_0x5ae7e9(_0x5cba76._0x3d1199)+'D'](_0x3cb57e(_0x881ac2,0x11),_0x3cb57e(_0x881ac2,0x13))^_0x881ac2>>>0xa)|0x0),_0x20aea8=(_0x3cb57e(_0x179aa8,0x2)^_0x4bce41[_0x5ae7e9(_0x5cba76._0x485141)+'x'](_0x3cb57e,_0x179aa8,0xd)^_0x3cb57e(_0x179aa8,0x16))+(_0x179aa8&_0x1d11ec[0x1]^_0x179aa8&_0x1d11ec[0x2]^_0x1d11ec[0x1]&_0x1d11ec[0x2]);_0x1d11ec=[_0x4bce41[_0x51b773(_0x5cba76._0x7e8df9)+'T'](_0x409ee0+_0x20aea8,0x0)][_0x5ae7e9(_0x5cba76._0x2665c2)+'at'](_0x1d11ec),_0x1d11ec[0x4]=_0x1d11ec[0x4]+_0x409ee0|0x0;}for(_0x1e2a61=0x0;_0x4bce41[_0x51b773(_0x5cba76._0x2ffdd3)+'v'](_0x1e2a61,0x8);_0x1e2a61++){_0x1d11ec[_0x1e2a61]=_0x1d11ec[_0x1e2a61]+_0x3ab1db[_0x1e2a61]|0x0;}}for(_0x1e2a61=0x0;_0x1e2a61<0x8;_0x1e2a61++){for(_0x5c30df=0x3;_0x5c30df+0x1;_0x5c30df--){var _0x585cfd=_0x1d11ec[_0x1e2a61]>>_0x4bce41[_0x5ae7e9(_0x5cba76._0x2f8e68)+'D'](_0x5c30df,0x8)&0xff;_0x55fa36+=(_0x4bce41[_0x5ae7e9(_0x5cba76._0x30ed0e)+'M'](_0x585cfd,0x10)?0x0:'')+_0x585cfd[_0x51b773(_0x5cba76._0x5c59f1)+_0x5ae7e9(_0x5cba76._0x4f2486)](0x10);}}return _0x55fa36;}class LicenseManager{static validate(_0x5c399b,_0xa43fb2={}){const _0x419aa4=_0x4d6853,_0x32d0aa=_0x4d6853;if(!_0x5c399b)return{'valid':![],'tier':null,'reason':_0x419aa4(_0x19be63._0xf0df7f)+_0x419aa4(0x191)+_0x419aa4(0x1e3)+_0x32d0aa(0x245)};const _0x505bdc=_0x5c399b[_0x419aa4(0x200)](),_0x4fd6b8=_0x505bdc[_0x419aa4(_0x19be63._0xa1d71d)+_0x419aa4(_0x19be63._0x1429ee)+_0x419aa4(0x184)](),_0x4a9c2a=_0x4fd6b8[_0x419aa4(_0x19be63._0xbd4f01)+'t']('-'),_0x531ac8=_0xa43fb2[_0x32d0aa(_0x19be63._0x324afa)+_0x419aa4(0x1c1)]!==undefined&&_0xa43fb2[_0x419aa4(_0x19be63._0x324afa)+_0x419aa4(_0x19be63._0x37cdc9)]!==null?_0xa43fb2[_0x32d0aa(_0x19be63._0x324afa)+_0x419aa4(0x1c1)]:Date[_0x419aa4(0x1be)]();let _0x56b573=0x0;_0xa43fb2[_0x419aa4(_0x19be63._0x2aed73)+_0x32d0aa(_0x19be63._0x123406)]&&(_0x56b573=parseInt(_0xa43fb2[_0x32d0aa(_0x19be63._0x2a4e43)+_0x419aa4(_0x19be63._0x16d302)][_0x32d0aa(_0x19be63._0x22a19f)+_0x419aa4(_0x19be63._0x4dbe21)](_0x4bce41[_0x419aa4(_0x19be63._0x23a8d5)+'f'])||'0',0xa),(_0xa43fb2[_0x419aa4(_0x19be63._0x324afa)+_0x419aa4(_0x19be63._0x4bdb1d)]===undefined||_0xa43fb2[_0x419aa4(_0x19be63._0x478cfa)+_0x419aa4(_0x19be63._0x2ccce9)]===null)&&_0xa43fb2[_0x32d0aa(0x1d0)+_0x419aa4(_0x19be63._0x35374a)][_0x32d0aa(_0x19be63._0xcc39e9)+_0x32d0aa(0x19a)](_0x32d0aa(_0x19be63._0x38e384)+_0x419aa4(_0x19be63._0x4c93fc)+_0x419aa4(0x1e9)+_0x419aa4(_0x19be63._0x4a750c)+'e',_0x531ac8[_0x32d0aa(0x275)+_0x419aa4(_0x19be63._0x1159a9)]()));if((_0xa43fb2[_0x419aa4(_0x19be63._0x1eda07)+_0x32d0aa(0x1c1)]===undefined||_0x4bce41[_0x32d0aa(_0x19be63._0xdb3baa)+'x'](_0xa43fb2[_0x419aa4(0x21f)+_0x419aa4(0x1c1)],null))&&_0x531ac8<_0x56b573){if(_0xa43fb2[_0x419aa4(_0x19be63._0x1349b0)+_0x419aa4(_0x19be63._0x2bf536)+'y'])_0xa43fb2[_0x419aa4(0x1e7)+_0x419aa4(_0x19be63._0x1a22bc)+'y']();return{'valid':![],'tier':null,'reason':_0x419aa4(0x214)+_0x419aa4(0x244)+_0x32d0aa(_0x19be63._0x492352)+_0x419aa4(_0x19be63._0x573c39)+_0x32d0aa(_0x19be63._0x982b64)+_0x419aa4(_0x19be63._0x432b5d)+_0x419aa4(_0x19be63._0x1cc34e)+_0x419aa4(_0x19be63._0x5b3653)};}const _0x447909=typeof atob!==_0x32d0aa(_0x19be63._0x1a4e96)+_0x32d0aa(0x24c)+'d'?atob:_0x41fa6e=>Buffer[_0x32d0aa(0x1cc)](_0x41fa6e,_0x419aa4(0x160)+'64')[_0x419aa4(0x275)+_0x32d0aa(0x17c)](_0x419aa4(0x15d)+'ry');if(_0x4fd6b8[_0x419aa4(_0x19be63._0x994777)+_0x419aa4(_0x19be63._0x83d0b8)+'th'](_0x419aa4(_0x19be63._0x3826f7)+_0x419aa4(_0x19be63._0xf4b5c1)+'-'))try{const _0x3daad4=_0x505bdc[_0x32d0aa(_0x19be63._0x299ea2)+_0x419aa4(_0x19be63._0x5c3def)+'g'](0x9),_0x5b651a=_0x447909(_0x3daad4),_0x3b5ba4=new Uint8Array(_0x5b651a[_0x32d0aa(_0x19be63._0x58fede)+'th']);for(let _0xeb1f97=0x0;_0xeb1f97<_0x5b651a[_0x419aa4(_0x19be63._0x58fede)+'th'];_0xeb1f97++){_0x3b5ba4[_0xeb1f97]=_0x5b651a[_0x419aa4(0x27e)+_0x419aa4(_0x19be63._0x14f185)+'At'](_0xeb1f97);}let _0xfce5c='';for(let _0xe0ba1d=0x0;_0xe0ba1d<_0x3b5ba4[_0x32d0aa(_0x19be63._0x59a99c)+'th'];_0xe0ba1d++){_0xfce5c+=_0x3b5ba4[_0xe0ba1d][_0x419aa4(0x275)+_0x419aa4(_0x19be63._0x1159a9)](0x10)[_0x32d0aa(0x1ce)+_0x419aa4(_0x19be63._0x9ecc32)](0x2,'0');}const _0x40c0ac=BigInt('0x'+_0xfce5c),_0xa5ec9d=_0x40401b(_0x40c0ac,_0x30ed66,_0x374988),_0x436176=_0x4ee7bc(_0xa5ec9d);if(_0x436176[_0x32d0aa(_0x19be63._0x994777)+_0x419aa4(_0x19be63._0x33c199)+'th'](_0x4bce41[_0x32d0aa(0x178)+'n'])){const _0x274dc6=parseInt(_0x436176[_0x32d0aa(_0x19be63._0x1638fa)+_0x32d0aa(_0x19be63._0x5c3def)+'g'](0xb),0xa);if(!isNaN(_0x274dc6)){if(_0x4bce41[_0x32d0aa(_0x19be63._0x20bd1b)+'O'](_0x531ac8,_0x274dc6))return{'valid':!![],'tier':_0x419aa4(_0x19be63._0x3c2f0f)+'S','expires':_0x274dc6};if(_0xa43fb2[_0x32d0aa(_0x19be63._0x4f78ae)+_0x419aa4(_0x19be63._0x4e773b)+'d'])_0xa43fb2[_0x419aa4(_0x19be63._0x4f78ae)+_0x32d0aa(_0x19be63._0x3e9586)+'d'](_0x419aa4(_0x19be63._0x3bf438)+'t');return{'valid':![],'tier':null,'reason':_0x32d0aa(_0x19be63._0x53a6d9)+_0x32d0aa(_0x19be63._0x1bb693)+_0x32d0aa(_0x19be63._0x3e9586)+'d'};}}}catch(_0x20ec75){return{'valid':![],'tier':null,'reason':_0x32d0aa(_0x19be63._0x287ca5)+_0x32d0aa(_0x19be63._0x1c201d)+_0x419aa4(_0x19be63._0x3d5fbe)+_0x32d0aa(_0x19be63._0x5ce7ba)+_0x32d0aa(_0x19be63._0x3344aa)+_0x419aa4(_0x19be63._0x385438)};}if(_0x4fd6b8[_0x419aa4(_0x19be63._0x2d8e4e)+_0x32d0aa(_0x19be63._0x3fc1c2)+'th'](_0x4bce41[_0x32d0aa(0x1af)+'k']))try{const _0x46888d=_0x505bdc[_0x32d0aa(_0x19be63._0x299ea2)+_0x32d0aa(_0x19be63._0x42c8c9)+'g'](0x7),_0x338ab0=_0x4bce41[_0x32d0aa(_0x19be63._0x574e9e)+'N'](_0x447909,_0x46888d),_0x5ee6e1=new Uint8Array(_0x338ab0[_0x32d0aa(0x210)+'th']);for(let _0x1ce592=0x0;_0x1ce592<_0x338ab0[_0x32d0aa(_0x19be63._0x58fede)+'th'];_0x1ce592++){_0x5ee6e1[_0x1ce592]=_0x338ab0[_0x419aa4(_0x19be63._0x42f40f)+_0x32d0aa(_0x19be63._0x429fa3)+'At'](_0x1ce592);}let _0x1da7d6='';for(let _0x5a594b=0x0;_0x5a594b<_0x5ee6e1[_0x32d0aa(_0x19be63._0x55c568)+'th'];_0x5a594b++){_0x1da7d6+=_0x5ee6e1[_0x5a594b][_0x32d0aa(_0x19be63._0x4470bd)+_0x419aa4(_0x19be63._0x2f531e)](0x10)[_0x32d0aa(0x1ce)+_0x32d0aa(_0x19be63._0x9ecc32)](0x2,'0');}const _0x102ba7=BigInt('0x'+_0x1da7d6),_0x3c17f7=_0x4bce41[_0x419aa4(_0x19be63._0x24577b)+'z'](_0x40401b,_0x102ba7,_0x30ed66,_0x374988),_0x102420=_0x4ee7bc(_0x3c17f7);if(_0x102420[_0x419aa4(_0x19be63._0x994777)+_0x32d0aa(_0x19be63._0x2cbcbc)+'th'](_0x32d0aa(_0x19be63._0x35e1a2)+_0x32d0aa(_0x19be63._0x1412a2)+'-')){const _0x197aaf=_0x102420[_0x419aa4(_0x19be63._0x5aad59)+'t']('-');if(_0x197aaf[_0x32d0aa(0x210)+'th']>=0x5){const _0x238de6=_0x197aaf[0x2],_0x5d4d77=parseInt(_0x197aaf[0x4],0xa);if(!isNaN(_0x5d4d77)){if(_0x4bce41[_0x419aa4(0x1c5)+'M'](_0x531ac8,_0x5d4d77))return{'valid':!![],'tier':_0x238de6,'expires':_0x5d4d77};if(_0xa43fb2[_0x419aa4(_0x19be63._0x3e9ca8)+_0x32d0aa(_0x19be63._0x4e773b)+'d'])_0xa43fb2[_0x419aa4(_0x19be63._0x2b547e)+_0x32d0aa(_0x19be63._0x54d4fc)+'d'](_0x4bce41[_0x32d0aa(_0x19be63._0x3f571a)+'l']);return{'valid':![],'tier':null,'reason':_0x32d0aa(_0x19be63._0x28d6cb)+_0x419aa4(_0x19be63._0x3adcd1)+_0x32d0aa(_0x19be63._0xf719e5)+_0x419aa4(_0x19be63._0x395d12)};}}}}catch(_0x4c463e){return{'valid':![],'tier':null,'reason':_0x419aa4(0x16e)+_0x32d0aa(_0x19be63._0x2174f7)+_0x32d0aa(0x261)+_0x32d0aa(_0x19be63._0x446919)+_0x32d0aa(0x265)+'d'};}if(_0x4a9c2a[_0x419aa4(_0x19be63._0x58fede)+'th']===0x4&&_0x4bce41[_0x419aa4(_0x19be63._0x208f6c)+'k'](_0x4a9c2a[0x0],'PS')&&[_0x32d0aa(_0x19be63._0xf093f1),_0x32d0aa(_0x19be63._0x3c2f0f)+'S',_0x4bce41[_0x32d0aa(_0x19be63._0xb55ce0)+'c'],_0x419aa4(_0x19be63._0x50c202),_0x4bce41[_0x419aa4(_0x19be63._0x168181)+'p']][_0x32d0aa(_0x19be63._0x17518d)+_0x419aa4(0x224)](_0x4a9c2a[0x1])){const _0x2e9f1f=_0x4a9c2a[0x1],_0x3698ca=_0x4a9c2a[0x2],_0x2d4ccd=_0x4a9c2a[0x3],_0x1be06a=_0x419aa4(_0x19be63._0x35e1a2)+_0x32d0aa(_0x19be63._0x488f80)+_0x419aa4(_0x19be63._0x11fea2)+_0x32d0aa(_0x19be63._0x2d4f78)+'@#',_0x274cb7=_0x3698ca+_0x1be06a+_0x2e9f1f;let _0x3fead7=0x0;for(let _0x150243=0x0;_0x4bce41[_0x32d0aa(0x20f)+'F'](_0x150243,_0x274cb7[_0x419aa4(_0x19be63._0x58fede)+'th']);_0x150243++){_0x3fead7+=_0x274cb7[_0x419aa4(_0x19be63._0x1b0e73)+_0x32d0aa(_0x19be63._0x429fa3)+'At'](_0x150243)*(_0x150243+0x1);}const _0x10095a=(_0x3fead7%0x270f)[_0x32d0aa(_0x19be63._0x4470bd)+_0x419aa4(_0x19be63._0x2f531e)]()[_0x32d0aa(_0x19be63._0x5e2c72)+_0x419aa4(_0x19be63._0x919fc1)](0x4,'0');if(_0x2d4ccd===_0x10095a)return{'valid':!![],'tier':_0x2e9f1f};}if(_0x505bdc[_0x32d0aa(_0x19be63._0x994777)+_0x419aa4(_0x19be63._0x7b2005)+'th'](_0x419aa4(_0x19be63._0x1fb20a))&&_0x505bdc[_0x32d0aa(_0x19be63._0xd0871a)+'t']('.')[_0x32d0aa(0x210)+'th']===0x3)try{const [_0xf85df0,_0x4e7a58,_0x45d4a2]=_0x505bdc[_0x32d0aa(0x207)+'t']('.');let _0x315633=_0x45d4a2[_0x32d0aa(_0x19be63._0x4c6c49)+_0x32d0aa(_0x19be63._0x8c0116)](/-/g,'+')[_0x32d0aa(_0x19be63._0x529b9b)+_0x32d0aa(0x267)](/_/g,'/');while(_0x315633[_0x419aa4(0x210)+'th']%0x4)_0x315633+='=';const _0x130c8d=_0x447909(_0x315633);let _0x3d85ab='';for(let _0x59360b=0x0;_0x59360b<_0x130c8d[_0x32d0aa(_0x19be63._0x55c568)+'th'];_0x59360b++){_0x3d85ab+=_0x130c8d[_0x419aa4(_0x19be63._0x4445f2)+_0x32d0aa(0x1c2)+'At'](_0x59360b)[_0x419aa4(_0x19be63._0x202973)+_0x32d0aa(0x17c)](0x10)[_0x32d0aa(_0x19be63._0x5e2c72)+_0x32d0aa(_0x19be63._0x919fc1)](0x2,'0');}const _0x358763=BigInt(_0x4bce41[_0x419aa4(_0x19be63._0x53653b)+'p']('0x',_0x3d85ab)),_0x170af7=_0x4bce41[_0x419aa4(_0x19be63._0x642e19)+'a'](_0x40401b,_0x358763,_0x30ed66,_0x374988);let _0x534733=_0x170af7[_0x32d0aa(_0x19be63._0x897091)+_0x419aa4(0x17c)](0x10);if(_0x534733[_0x32d0aa(0x210)+'th']%0x2!==0x0)_0x534733='0'+_0x534733;const _0x41c822=_0x56462d(_0x4bce41[_0x419aa4(_0x19be63._0x2d8791)+'c'](_0xf85df0,'.')+_0x4e7a58);if(_0x534733[_0x419aa4(0x1fd)+_0x32d0aa(0x26b)](_0x41c822)){const _0x5d680e=_0x4bce41[_0x419aa4(0x22b)+'n'](_0x447909,_0x4e7a58[_0x32d0aa(_0x19be63._0x2ed1a2)+_0x419aa4(0x267)](/-/g,'+')[_0x419aa4(0x189)+_0x32d0aa(_0x19be63._0x8c0116)](/_/g,'/')),_0x646b6=JSON[_0x32d0aa(_0x19be63._0x72292b)+'e'](_0x5d680e);if(_0x646b6[_0x32d0aa(_0x19be63._0x34d553)]&&_0x4bce41[_0x419aa4(0x165)+'e'](_0x531ac8/0x3e8,_0x646b6[_0x419aa4(0x167)]))return{'valid':!![],'tier':_0x646b6[_0x32d0aa(_0x19be63._0x584c15)]||_0x419aa4(_0x19be63._0x54f6c7),'expires':_0x646b6[_0x32d0aa(_0x19be63._0x34d553)]*0x3e8};else{if(_0xa43fb2[_0x32d0aa(_0x19be63._0x4f78ae)+_0x32d0aa(_0x19be63._0x10f5d9)+'d'])_0xa43fb2[_0x32d0aa(0x1b7)+_0x419aa4(_0x19be63._0x209725)+'d'](_0x4bce41[_0x32d0aa(0x1b2)+'G']);return{'valid':![],'tier':null,'reason':_0x4bce41[_0x419aa4(_0x19be63._0xc343d2)+'m']};}}}catch(_0x23a87a){return{'valid':![],'tier':null,'reason':_0x419aa4(_0x19be63._0x3a7b19)+_0x32d0aa(_0x19be63._0x17005d)+_0x32d0aa(_0x19be63._0x57813e)+_0x419aa4(_0x19be63._0x4c9708)+_0x32d0aa(0x265)+'d'};}return{'valid':![],'tier':null,'reason':_0x32d0aa(_0x19be63._0x559df8)+_0x419aa4(_0x19be63._0x4c0680)+_0x32d0aa(0x20a)+'at'};}}typeof globalThis!==_0x4d6853(0x162)+_0x47ab44(_0x583d0f._0x5ac43d)+'d'&&(globalThis[_0x4d6853(0x1f2)+_0x47ab44(_0x583d0f._0x47d553)+_0x4d6853(_0x583d0f._0x4741bc)+'er']=LicenseManager),typeof _0x390583!==_0x47ab44(0x162)+_0x47ab44(_0x583d0f._0x5ac43d)+'d'&&(_0x390583[_0x47ab44(_0x583d0f._0x3ea7c6)+_0x47ab44(_0x583d0f._0x47d553)+_0x47ab44(_0x583d0f._0x1baf07)+'er']=LicenseManager),typeof window!==_0x4d6853(_0x583d0f._0x8c57d7)+_0x4d6853(_0x583d0f._0x318aa0)+'d'&&(window[_0x47ab44(_0x583d0f._0x24ebee)+_0x4d6853(_0x583d0f._0x47d553)+_0x47ab44(_0x583d0f._0x1baf07)+'er']=LicenseManager),typeof exports!==_0x4bce41[_0x4d6853(_0x583d0f._0x3d7ae1)+'e']&&(typeof module!==_0x4bce41[_0x4d6853(0x1b9)+'e']&&module[_0x4d6853(0x238)+_0x4d6853(0x174)]&&(module[_0x47ab44(0x238)+_0x4d6853(_0x583d0f._0x57469c)]=LicenseManager),exports[_0x4d6853(_0x583d0f._0x24ebee)+_0x47ab44(0x273)+_0x4d6853(_0x583d0f._0x1baf07)+'er']=LicenseManager);}(typeof globalThis!==_0xc1de4a(0x162)+_0x196a6e(0x24c)+'d'?globalThis:typeof window!==_0xc1de4a(0x162)+_0x196a6e(0x24c)+'d'?window:this));
|
|
1
|
+
(function(global) {
|
|
2
|
+
// ── START LICENSE CRYPTO ──
|
|
3
|
+
const PUBLIC_KEY_N = BigInt("21317979104050344678233452423803986868842680501941538057759536089609908024281729760556922188810565541201321990374637212776148857190553192389608364990754937991254608109727112734447704854882786946805547031142530865504430968628760311494129154950865158735816268612258108296781892583171421605668998979064782378729322077179022581884976242706169323540456286526420742434868559866211716347133681429395477256705746276962607312574959642065929462114149296066812527505837608212730874704915352119747022918247963886630350365119206627670591400728523813746184290857872958847087691236909900501703203494160206941648263514117706558791691");
|
|
4
|
+
const PUBLIC_KEY_E = 65537n;
|
|
5
|
+
|
|
6
|
+
function modPow(base, exp, mod) {
|
|
7
|
+
let res = 1n;
|
|
8
|
+
base = base % mod;
|
|
9
|
+
while (exp > 0n) {
|
|
10
|
+
if (exp % 2n === 1n) res = (res * base) % mod;
|
|
11
|
+
exp = exp / 2n;
|
|
12
|
+
base = (base * base) % mod;
|
|
13
|
+
}
|
|
14
|
+
return res;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function bigIntToString(bi) {
|
|
18
|
+
let hex = bi.toString(16);
|
|
19
|
+
if (hex.length % 2 !== 0) hex = '0' + hex;
|
|
20
|
+
let str = '';
|
|
21
|
+
for (let i = 0; i < hex.length; i += 2) {
|
|
22
|
+
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
|
|
23
|
+
}
|
|
24
|
+
return str;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function stringToBigInt(str) {
|
|
28
|
+
let hex = '';
|
|
29
|
+
for (let i = 0; i < str.length; i++) {
|
|
30
|
+
hex += str.charCodeAt(i).toString(16).padStart(2, '0');
|
|
31
|
+
}
|
|
32
|
+
return BigInt('0x' + hex);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function sha256(ascii) {
|
|
36
|
+
function rightRotate(value, amount) { return (value>>>amount) | (value<<(32 - amount)); }
|
|
37
|
+
var mathPow = Math.pow; var maxWord = mathPow(2, 32);
|
|
38
|
+
var lengthProperty = 'length'; var i, j;
|
|
39
|
+
var result = ''; var words = []; var asciiBitLength = ascii[lengthProperty]*8;
|
|
40
|
+
var hash = sha256.h = sha256.h || [];
|
|
41
|
+
var k = sha256.k = sha256.k || [];
|
|
42
|
+
var primeCounter = k[lengthProperty];
|
|
43
|
+
var isComposite = {};
|
|
44
|
+
for (var candidate = 2; primeCounter < 64; candidate++) {
|
|
45
|
+
if (!isComposite[candidate]) {
|
|
46
|
+
for (i = 0; i < 313; i += candidate) { isComposite[i] = candidate; }
|
|
47
|
+
hash[primeCounter] = (mathPow(candidate, .5)*maxWord)|0;
|
|
48
|
+
k[primeCounter++] = (mathPow(candidate, 1/3)*maxWord)|0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
ascii += '\x80';
|
|
52
|
+
while (ascii[lengthProperty]%64 - 56) ascii += '\x00';
|
|
53
|
+
for (i = 0; i < ascii[lengthProperty]; i++) {
|
|
54
|
+
j = ascii.charCodeAt(i);
|
|
55
|
+
if (j>>8) return;
|
|
56
|
+
words[i>>2] |= j << ((3 - i)%4)*8;
|
|
57
|
+
}
|
|
58
|
+
words[words[lengthProperty]] = ((asciiBitLength/maxWord)|0);
|
|
59
|
+
words[words[lengthProperty]] = (asciiBitLength)
|
|
60
|
+
for (j = 0; j < words[lengthProperty];) {
|
|
61
|
+
var w = words.slice(j, j += 16);
|
|
62
|
+
var oldHash = hash;
|
|
63
|
+
hash = hash.slice(0, 8);
|
|
64
|
+
for (i = 0; i < 64; i++) {
|
|
65
|
+
var w15 = w[i - 15], w2 = w[i - 2];
|
|
66
|
+
var a = hash[0], e = hash[4];
|
|
67
|
+
var temp1 = hash[7] + (rightRotate(e, 6) ^ rightRotate(e, 11) ^ rightRotate(e, 25)) + ((e&hash[5])^((~e)&hash[6])) + k[i] + (w[i] = (i < 16) ? w[i] : (w[i - 16] + (rightRotate(w15, 7) ^ rightRotate(w15, 18) ^ (w15>>>3)) + w[i - 7] + (rightRotate(w2, 17) ^ rightRotate(w2, 19) ^ (w2>>>10)))|0);
|
|
68
|
+
var temp2 = (rightRotate(a, 2) ^ rightRotate(a, 13) ^ rightRotate(a, 22)) + ((a&hash[1])^(a&hash[2])^(hash[1]&hash[2]));
|
|
69
|
+
hash = [(temp1 + temp2)|0].concat(hash);
|
|
70
|
+
hash[4] = (hash[4] + temp1)|0;
|
|
71
|
+
}
|
|
72
|
+
for (i = 0; i < 8; i++) { hash[i] = (hash[i] + oldHash[i])|0; }
|
|
73
|
+
}
|
|
74
|
+
for (i = 0; i < 8; i++) {
|
|
75
|
+
for (j = 3; j + 1; j--) {
|
|
76
|
+
var b = (hash[i]>>(j*8))&255;
|
|
77
|
+
result += ((b < 16) ? 0 : '') + b.toString(16);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
// ── END LICENSE CRYPTO ──
|
|
83
|
+
|
|
84
|
+
class LicenseManager {
|
|
85
|
+
/**
|
|
86
|
+
* Validates a license key universally across all environments.
|
|
87
|
+
* @param {string} key - The license key.
|
|
88
|
+
* @param {object} options - Options mapping to environment specifics.
|
|
89
|
+
* @returns {object} { valid: boolean, tier: string|null, reason?: string, expires?: number }
|
|
90
|
+
*/
|
|
91
|
+
static validate(key, options = {}) {
|
|
92
|
+
if (!key) return { valid: false, tier: null, reason: "No key provided" };
|
|
93
|
+
const rawKey = key.trim();
|
|
94
|
+
const k = rawKey.toUpperCase();
|
|
95
|
+
const parts = k.split('-');
|
|
96
|
+
|
|
97
|
+
const now = options.mockTime !== undefined && options.mockTime !== null ? options.mockTime : Date.now();
|
|
98
|
+
let lastSeen = 0;
|
|
99
|
+
|
|
100
|
+
if (options.storage) {
|
|
101
|
+
lastSeen = parseInt(options.storage.getItem('ps_last_seen_time') || '0', 10);
|
|
102
|
+
if (options.mockTime === undefined || options.mockTime === null) {
|
|
103
|
+
options.storage.setItem('ps_last_seen_time', now.toString());
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Clock rollback guard
|
|
108
|
+
if ((options.mockTime === undefined || options.mockTime === null) && now < lastSeen) {
|
|
109
|
+
if (options.onAnomaly) options.onAnomaly();
|
|
110
|
+
return { valid: false, tier: null, reason: "Clock rollback anomaly detected" };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const _atob = typeof atob !== 'undefined' ? atob : (str) => Buffer.from(str, 'base64').toString('binary');
|
|
114
|
+
|
|
115
|
+
// 1. Process Pilot Keys (RSA-1024 Encrypted Timestamps)
|
|
116
|
+
if (k.startsWith('PS-PILOT-')) {
|
|
117
|
+
try {
|
|
118
|
+
const payload = rawKey.substring(9);
|
|
119
|
+
const binary = _atob(payload);
|
|
120
|
+
const bytes = new Uint8Array(binary.length);
|
|
121
|
+
for (let i = 0; i < binary.length; i++) {
|
|
122
|
+
bytes[i] = binary.charCodeAt(i);
|
|
123
|
+
}
|
|
124
|
+
let hex = '';
|
|
125
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
126
|
+
hex += bytes[i].toString(16).padStart(2, '0');
|
|
127
|
+
}
|
|
128
|
+
const S = BigInt('0x' + hex);
|
|
129
|
+
|
|
130
|
+
const M = modPow(S, PUBLIC_KEY_E, PUBLIC_KEY_N);
|
|
131
|
+
const decryptedStr = bigIntToString(M);
|
|
132
|
+
|
|
133
|
+
if (decryptedStr.startsWith('ZTDS-PILOT-')) {
|
|
134
|
+
const expDate = parseInt(decryptedStr.substring(11), 10);
|
|
135
|
+
if (!isNaN(expDate)) {
|
|
136
|
+
if (now < expDate) return { valid: true, tier: 'TEAMS', expires: expDate };
|
|
137
|
+
|
|
138
|
+
if (options.onExpired) options.onExpired('Pilot');
|
|
139
|
+
return { valid: false, tier: null, reason: "Pilot expired" };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
} catch(e) {
|
|
143
|
+
return { valid: false, tier: null, reason: "Pilot decryption failed" };
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 1.5. Process RSA Signed Keys (PS-RSA-...)
|
|
148
|
+
if (k.startsWith('PS-RSA-')) {
|
|
149
|
+
try {
|
|
150
|
+
const payload = rawKey.substring(7);
|
|
151
|
+
const binary = _atob(payload);
|
|
152
|
+
const bytes = new Uint8Array(binary.length);
|
|
153
|
+
for (let i = 0; i < binary.length; i++) {
|
|
154
|
+
bytes[i] = binary.charCodeAt(i);
|
|
155
|
+
}
|
|
156
|
+
let hex = '';
|
|
157
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
158
|
+
hex += bytes[i].toString(16).padStart(2, '0');
|
|
159
|
+
}
|
|
160
|
+
const S = BigInt('0x' + hex);
|
|
161
|
+
|
|
162
|
+
const M = modPow(S, PUBLIC_KEY_E, PUBLIC_KEY_N);
|
|
163
|
+
const decryptedStr = bigIntToString(M);
|
|
164
|
+
|
|
165
|
+
if (decryptedStr.startsWith('ZTDS-LIC-')) {
|
|
166
|
+
const pieces = decryptedStr.split('-');
|
|
167
|
+
if (pieces.length >= 5) {
|
|
168
|
+
const tier = pieces[2];
|
|
169
|
+
const expires = parseInt(pieces[4], 10);
|
|
170
|
+
if (!isNaN(expires)) {
|
|
171
|
+
if (now < expires) return { valid: true, tier: tier, expires: expires };
|
|
172
|
+
|
|
173
|
+
if (options.onExpired) options.onExpired('RSA');
|
|
174
|
+
return { valid: false, tier: null, reason: "RSA key expired" };
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
} catch(e) {
|
|
179
|
+
return { valid: false, tier: null, reason: "RSA decryption failed" };
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// 2. Process Modern Prefixed Keys (v1.4.2+ Salted Checksum)
|
|
184
|
+
if (parts.length === 4 && parts[0] === 'PS' && ['PRO', 'TEAMS', 'SDK', 'OEM', 'ENTERPRISE'].includes(parts[1])) {
|
|
185
|
+
const tier = parts[1];
|
|
186
|
+
const core = parts[2];
|
|
187
|
+
const checksum = parts[3];
|
|
188
|
+
const salt = "ZTDS_SALT_2026_!@#";
|
|
189
|
+
const input = core + salt + tier;
|
|
190
|
+
let sum = 0;
|
|
191
|
+
for (let i = 0; i < input.length; i++) {
|
|
192
|
+
sum += input.charCodeAt(i) * (i + 1);
|
|
193
|
+
}
|
|
194
|
+
const expectedChecksum = (sum % 9999).toString().padStart(4, '0');
|
|
195
|
+
if (checksum === expectedChecksum) {
|
|
196
|
+
return { valid: true, tier: tier };
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// 3. Process Standard RS256 JWTs (eyJ...)
|
|
201
|
+
if (rawKey.startsWith('eyJ') && rawKey.split('.').length === 3) {
|
|
202
|
+
try {
|
|
203
|
+
const [b64Header, b64Payload, b64Signature] = rawKey.split('.');
|
|
204
|
+
|
|
205
|
+
let sigStr = b64Signature.replace(/-/g, '+').replace(/_/g, '/');
|
|
206
|
+
while (sigStr.length % 4) sigStr += '=';
|
|
207
|
+
const binarySig = _atob(sigStr);
|
|
208
|
+
let hexSig = '';
|
|
209
|
+
for (let i = 0; i < binarySig.length; i++) {
|
|
210
|
+
hexSig += binarySig.charCodeAt(i).toString(16).padStart(2, '0');
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
const S = BigInt('0x' + hexSig);
|
|
214
|
+
const M = modPow(S, PUBLIC_KEY_E, PUBLIC_KEY_N);
|
|
215
|
+
|
|
216
|
+
let mHex = M.toString(16);
|
|
217
|
+
if (mHex.length % 2 !== 0) mHex = '0' + mHex;
|
|
218
|
+
|
|
219
|
+
const expectedHash = sha256(b64Header + '.' + b64Payload);
|
|
220
|
+
|
|
221
|
+
if (mHex.endsWith(expectedHash)) {
|
|
222
|
+
const payloadJson = _atob(b64Payload.replace(/-/g, '+').replace(/_/g, '/'));
|
|
223
|
+
const payload = JSON.parse(payloadJson);
|
|
224
|
+
|
|
225
|
+
if (payload.exp && (now / 1000) < payload.exp) {
|
|
226
|
+
return { valid: true, tier: payload.tier || 'PRO', expires: payload.exp * 1000 };
|
|
227
|
+
} else {
|
|
228
|
+
if (options.onExpired) options.onExpired('JWT');
|
|
229
|
+
return { valid: false, tier: null, reason: "JWT expired" };
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
} catch(e) {
|
|
233
|
+
return { valid: false, tier: null, reason: "JWT validation failed" };
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return { valid: false, tier: null, reason: "Invalid format" };
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
LicenseManager.PUBLIC_KEY_N = PUBLIC_KEY_N;
|
|
242
|
+
LicenseManager.PUBLIC_KEY_E = PUBLIC_KEY_E;
|
|
243
|
+
LicenseManager.OFFLINE_KEY_SALT = "ZTDS_SALT_2026_!@#";
|
|
244
|
+
|
|
245
|
+
// Export module for ES modules, CommonJS, and Browser Global
|
|
246
|
+
if (typeof globalThis !== 'undefined') {
|
|
247
|
+
globalThis.LicenseManager = LicenseManager;
|
|
248
|
+
}
|
|
249
|
+
if (typeof global !== 'undefined') {
|
|
250
|
+
global.LicenseManager = LicenseManager;
|
|
251
|
+
}
|
|
252
|
+
if (typeof window !== 'undefined') {
|
|
253
|
+
window.LicenseManager = LicenseManager;
|
|
254
|
+
}
|
|
255
|
+
if (typeof exports !== 'undefined') {
|
|
256
|
+
if (typeof module !== 'undefined' && module.exports) {
|
|
257
|
+
module.exports = LicenseManager;
|
|
258
|
+
}
|
|
259
|
+
exports.LicenseManager = LicenseManager;
|
|
260
|
+
}
|
|
261
|
+
})(typeof globalThis !== 'undefined' ? globalThis : (typeof window !== 'undefined' ? window : this));
|