@privacyscrubber/mcp-server 2.3.9 → 2.4.1
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/README.md +50 -11
- package/index.js +881 -79
- package/manifest.json +84 -8
- package/package.json +3 -2
- package/pii-masking-run.js +103 -26
- package/ps-license-manager.cjs +261 -11
- package/ps-license-manager.js +4 -0
- package/ps-pii-engine.cjs +450 -96
- package/ps-pii-engine.js +450 -96
- package/scrubber-core.cjs +31 -25
- package/server.json +27 -4
package/ps-license-manager.cjs
CHANGED
|
@@ -1,11 +1,261 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const _0x5a6bc0=_0x4b8b,_0x20bda8=_0x4b8b;function _0x4b8b(_0xa0bd5a,_0x432c96){_0xa0bd5a=_0xa0bd5a-0x14d;const _0x5c0d8c=_0x5c0d();let _0x4b8bc6=_0x5c0d8c[_0xa0bd5a];if(_0x4b8b['TZGCLi']===undefined){var _0x1c5328=function(_0x3e82c4){const _0x31fdd9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xd40b8d='',_0x536b76='';for(let _0x1657b6=0x0,_0x47eac7,_0x3abea1,_0x4139ab=0x0;_0x3abea1=_0x3e82c4['charAt'](_0x4139ab++);~_0x3abea1&&(_0x47eac7=_0x1657b6%0x4?_0x47eac7*0x40+_0x3abea1:_0x3abea1,_0x1657b6++%0x4)?_0xd40b8d+=String['fromCharCode'](0xff&_0x47eac7>>(-0x2*_0x1657b6&0x6)):0x0){_0x3abea1=_0x31fdd9['indexOf'](_0x3abea1);}for(let _0x409ff6=0x0,_0x5f472a=_0xd40b8d['length'];_0x409ff6<_0x5f472a;_0x409ff6++){_0x536b76+='%'+('00'+_0xd40b8d['charCodeAt'](_0x409ff6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x536b76);};_0x4b8b['epkeHl']=_0x1c5328,_0x4b8b['KweFCy']={},_0x4b8b['TZGCLi']=!![];}const _0x2f22a9=_0x5c0d8c[0x0],_0x2c2190=_0xa0bd5a+_0x2f22a9,_0x4c8d16=_0x4b8b['KweFCy'][_0x2c2190];return!_0x4c8d16?(_0x4b8bc6=_0x4b8b['epkeHl'](_0x4b8bc6),_0x4b8b['KweFCy'][_0x2c2190]=_0x4b8bc6):_0x4b8bc6=_0x4c8d16,_0x4b8bc6;}(function(_0x43981d,_0x3be4be){const _0x32fa0b={_0x1bee4e:0x186,_0x1e0858:0x17b,_0x28a7ba:0x260,_0x2e2158:0x1d9,_0x2aade5:0x192,_0x71d64c:0x1a7},_0x15d9c5=_0x4b8b,_0x49d9e6=_0x4b8b,_0x2153ab=_0x43981d();while(!![]){try{const _0x253dcc=-parseInt(_0x15d9c5(_0x32fa0b._0x1bee4e))/0x1+parseInt(_0x15d9c5(_0x32fa0b._0x1e0858))/0x2+-parseInt(_0x49d9e6(_0x32fa0b._0x28a7ba))/0x3+-parseInt(_0x49d9e6(_0x32fa0b._0x2e2158))/0x4+parseInt(_0x49d9e6(_0x32fa0b._0x2aade5))/0x5+-parseInt(_0x49d9e6(0x16a))/0x6*(parseInt(_0x49d9e6(0x1ea))/0x7)+parseInt(_0x49d9e6(0x18e))/0x8*(parseInt(_0x15d9c5(_0x32fa0b._0x71d64c))/0x9);if(_0x253dcc===_0x3be4be)break;else _0x2153ab['push'](_0x2153ab['shift']());}catch(_0x486fc7){_0x2153ab['push'](_0x2153ab['shift']());}}}(_0x5c0d,0x637e9),function(_0x322b78){const _0x2da1cf={_0x3d0ae7:0x191,_0x2857a6:0x1cd,_0x5c2a19:0x23e,_0x166649:0x197,_0x2b1f9f:0x18c,_0x3c079b:0x182,_0xa875bf:0x1dc,_0x180e73:0x187,_0x5541de:0x198,_0xf4aa03:0x26e,_0x43b6b7:0x248,_0x97c251:0x1f7,_0x34f0fb:0x1d8,_0x2589f4:0x20c,_0x3070eb:0x272,_0x390294:0x173,_0x2b1920:0x14d,_0x351c82:0x18b,_0x1b0605:0x227,_0x20140f:0x1f6,_0x529363:0x15d,_0x4dd70b:0x1ca,_0x38ec98:0x1cc,_0xc79d3b:0x162,_0x5d6e8a:0x167,_0x2df0a4:0x21a,_0x5c00cd:0x23d,_0x337ab3:0x1c8,_0x1947d1:0x204,_0x435ac5:0x247,_0x4364dd:0x280,_0x309619:0x211,_0x305f08:0x1e5,_0x276084:0x21b,_0x3ec973:0x201,_0x540a89:0x1dd,_0x1f9612:0x1e9,_0x176a0f:0x1ad,_0x23c2b3:0x275,_0xa8a83c:0x24c,_0x45b227:0x268,_0x470c78:0x25f,_0x503e91:0x242,_0x5989a2:0x1ae,_0x2e561d:0x202,_0x455f0b:0x1a3,_0x5836af:0x1bb,_0xed016f:0x26a,_0xf720c9:0x1ac,_0x410d3f:0x1a2,_0x3965c5:0x250,_0x1c0db1:0x228,_0x56e778:0x217,_0x43a0c6:0x25d,_0x4684ab:0x22c,_0x1da3ea:0x243,_0x26e618:0x1ba,_0x500880:0x203,_0x387250:0x1eb,_0x4a6020:0x218,_0x4c3001:0x15e,_0x255b8f:0x239,_0x2a347f:0x23c,_0x532060:0x1c4,_0x3cb5d6:0x1b4,_0x3809f3:0x1f4,_0x49cbf0:0x1fe,_0x3ec058:0x27e,_0x49f727:0x1c0,_0x275d0d:0x1b1,_0x5a6687:0x150,_0x4839c9:0x262,_0x108229:0x26d,_0x3f9518:0x24f,_0x450671:0x189,_0x4a8386:0x1f1,_0x4f3613:0x1d6,_0x6ad9b7:0x229,_0xae44bf:0x20d,_0xc2ad1b:0x16c,_0x1c2be2:0x183,_0x129745:0x24a,_0x25f325:0x1d4,_0x4d39cf:0x1db,_0x2c9adc:0x274,_0x17106f:0x163,_0x11f136:0x27b,_0x50aa9c:0x279,_0x5c350c:0x15f,_0x527329:0x194,_0x16a80d:0x1fc,_0x4796ae:0x232,_0x3b7eb8:0x23f,_0x112359:0x251,_0x1988d1:0x1f0,_0x373860:0x1bd,_0x206cbe:0x19b,_0x3af490:0x277,_0x368cc6:0x178,_0x18f171:0x253,_0x3dae4d:0x20f,_0x492614:0x1e0,_0x3da43a:0x1e8,_0x596067:0x26c,_0x220e7b:0x171,_0x56f511:0x151,_0x2365d9:0x1b8,_0x260abf:0x16e,_0x4f2b8f:0x190,_0xaec02b:0x244,_0x4d8346:0x1d5,_0x23e8e8:0x1a9,_0xed7753:0x16f,_0x3f63d7:0x276,_0x517076:0x17e,_0x430b97:0x266,_0x36d52b:0x25a,_0x1d2732:0x199,_0x2b60b7:0x21c,_0x65ba70:0x25b,_0x190310:0x27f,_0x1766bc:0x206,_0x3676f6:0x1f9,_0x1ef79d:0x156,_0x5a4578:0x27d,_0x2a91b8:0x245,_0x57d941:0x20e,_0x33bea3:0x238,_0x4ba80e:0x1b5,_0x2ff057:0x154,_0x39ef32:0x1af,_0x189310:0x1c2,_0x14ef4c:0x208,_0x5be717:0x222,_0x561668:0x1c6,_0x53aec4:0x161,_0x376e75:0x270,_0x4f0d43:0x160,_0x3374ef:0x152,_0x2e8aa0:0x19a,_0x1cc995:0x1bc,_0x5adfad:0x1de,_0x8123ad:0x1a4,_0x431af9:0x1cb,_0x3f4543:0x15c,_0xb7d299:0x1ff,_0xe2578c:0x18f,_0x35aee5:0x185,_0x30ebdb:0x15b,_0x3b61e2:0x265,_0x391c38:0x15d,_0x4a47c8:0x15d,_0x4ba03a:0x1ca,_0x146bcb:0x185,_0x1b9fcc:0x265,_0x2b210c:0x15d,_0x4eef46:0x1ca,_0x2e3077:0x1fb,_0x2440d5:0x185},_0x2fd1a1={_0x283332:0x225,_0x2d2b85:0x177,_0x53117e:0x17f,_0x3fd500:0x240,_0x3d7e1e:0x1b7,_0x526e42:0x209,_0x1ac5c9:0x23b,_0x2cad33:0x1df,_0x1ce44e:0x221,_0x5aa0b4:0x221,_0x1a5266:0x264,_0x3d4d9d:0x23b,_0x1781aa:0x205,_0x547350:0x180,_0x676ef:0x168,_0x289aac:0x255,_0x330ea9:0x23b,_0x10986b:0x1a1,_0x14c942:0x20a,_0x1b0892:0x1a1,_0xb5e36e:0x269,_0x5b4349:0x15d,_0x51c611:0x1ca,_0x2107cc:0x27c,_0x5a71ec:0x259,_0x2ac45c:0x22f,_0x31bdf9:0x267,_0x1f6911:0x22d,_0x21aff7:0x19d,_0x58da27:0x19d,_0xf9204f:0x1f8,_0x2f9192:0x19d,_0x29e5b8:0x168,_0x3598e7:0x1a0,_0x2ddaad:0x263,_0x55a2d0:0x254,_0x418b95:0x259,_0x441dd3:0x20c,_0x40b494:0x214,_0x401ff1:0x223,_0x5a5a59:0x22e,_0x4055ba:0x1d0,_0x2f78b4:0x1d0,_0x517b12:0x19f,_0x15006:0x1e3,_0x17091d:0x1d0,_0x5cbe1e:0x19f,_0x2a6eb7:0x1b0,_0x518ed7:0x1f2,_0x535ca1:0x1b2,_0x53997e:0x17a,_0xace37b:0x212,_0x479c3f:0x257,_0xfb5f4:0x216,_0x2956bd:0x219,_0x394be3:0x19d,_0x11c558:0x255,_0x25e484:0x27c,_0x40affc:0x174,_0x3f9f8a:0x19d,_0x30fa67:0x1c7,_0x2618d5:0x271,_0x2ef361:0x22e,_0x92b8e:0x1d0,_0x155e88:0x153,_0x58b15b:0x1fd,_0x593497:0x231,_0x2d39b6:0x181,_0xe0cfff:0x16b,_0x3cc0f7:0x18a,_0x22d502:0x176,_0x444b75:0x1aa,_0x3e66d8:0x27a,_0x230cbf:0x278,_0x93ba31:0x14f,_0x105029:0x23a,_0x152ea7:0x1a5,_0x3ab4e7:0x22b,_0x21c8fd:0x255,_0x3d1099:0x24d,_0x204515:0x1b7,_0x27fdd1:0x1c3,_0x3d9152:0x1c3,_0x735370:0x20b,_0x14e864:0x19d,_0x18ddf6:0x19d,_0x22b674:0x234,_0x501c18:0x215,_0x14e001:0x170,_0x44a0d9:0x20b,_0xd4bb75:0x230,_0x208e65:0x17c,_0x10fdbd:0x1ab,_0x4a3785:0x1aa,_0x1361e0:0x17c,_0x108ed4:0x22e,_0x329101:0x1d0,_0x4308c1:0x22e,_0x3195e5:0x1d0,_0x5cca8e:0x165,_0x41d2e2:0x18d,_0x542559:0x1be,_0x4c0bbb:0x18d,_0x1b6deb:0x1bf,_0x2d4464:0x1ec,_0x2ce4ec:0x224,_0x717b2a:0x18a,_0x1eda6e:0x210,_0xcafdd:0x207,_0x42dd5e:0x246},_0x4487e6={_0x14b9bb:0x155,_0x4166d1:0x233,_0x53667f:0x1f8,_0x367bea:0x219,_0x3796bc:0x1e7,_0x5f0bb3:0x159,_0x1babf8:0x19c,_0x56c287:0x1b6,_0x27b257:0x236,_0x24a6c8:0x200,_0x2d9655:0x1a8,_0x351217:0x184,_0x4a0263:0x1ee,_0x5aa65b:0x159,_0x170ee1:0x184,_0xa28e8f:0x1e4,_0x505985:0x1ef,_0xfe2b38:0x213,_0x7ec27e:0x258,_0x5efaa0:0x1ee,_0x17b177:0x249,_0x4b3ebf:0x1ce,_0x337340:0x200,_0x344885:0x193,_0x2969bc:0x168,_0x9f4149:0x255},_0xb67b61={_0x52706f:0x19d,_0x4bf22a:0x219,_0x2bea32:0x255,_0x29303c:0x1a0,_0xba1bb7:0x1d3},_0x26aed8={_0xf624df:0x168,_0xf900d1:0x1e2,_0x447352:0x19d,_0x3081e3:0x19d,_0x177fee:0x172,_0x155b39:0x179,_0x315a4e:0x219,_0x126ee7:0x216},_0x478545={_0x581b4f:0x169,_0x3430e0:0x1a6,_0x5e402f:0x1e2},_0x219c4e=_0x4b8b,_0x325e0=_0x4b8b,_0x1127d4={'IhViw':function(_0x127d8e,_0x342788){return _0x127d8e%_0x342788;},'wlUKY':function(_0x2bba80,_0x4725ae){return _0x2bba80*_0x4725ae;},'qstcY':function(_0xe3e9a3,_0x3edf60){return _0xe3e9a3%_0x3edf60;},'NEifM':function(_0x330114,_0x3e8eda){return _0x330114<_0x3e8eda;},'OSFHx':function(_0xadfabd,_0x51102f){return _0xadfabd(_0x51102f);},'ktPka':function(_0xe1ad51,_0x274940,_0x3f41c4){return _0xe1ad51(_0x274940,_0x3f41c4);},'dbkyh':function(_0x58f749,_0x5487db){return _0x58f749*_0x5487db;},'SRChA':function(_0x477e78,_0x157cde){return _0x477e78-_0x157cde;},'MWTMf':function(_0x37b0b2,_0x19bdf4){return _0x37b0b2|_0x19bdf4;},'jomOr':function(_0x4f2524,_0x5449bf){return _0x4f2524<_0x5449bf;},'gOhkp':function(_0x25825a,_0x33deb7){return _0x25825a-_0x33deb7;},'FqOOX':function(_0x570c3d,_0x5da045){return _0x570c3d+_0x5da045;},'BKoSN':function(_0x2bdfab,_0x15629f){return _0x2bdfab+_0x15629f;},'KwdKX':function(_0x4aa820,_0x4bc0f9){return _0x4aa820^_0x4bc0f9;},'Hhhzu':function(_0xd9754c,_0x59e2d2){return _0xd9754c&_0x59e2d2;},'kJsRs':function(_0x3d95f0,_0x410e14){return _0x3d95f0<_0x410e14;},'vTOoq':function(_0x4c01d6,_0x57960c){return _0x4c01d6-_0x57960c;},'jLjra':function(_0x43ffb7,_0x7f9f05,_0x73b842){return _0x43ffb7(_0x7f9f05,_0x73b842);},'NVPkB':function(_0x40437d,_0x40a45d){return _0x40437d>>>_0x40a45d;},'eEYuf':function(_0x4dd36a,_0x15caf1,_0x32e82c){return _0x4dd36a(_0x15caf1,_0x32e82c);},'fKrGp':function(_0x149715,_0x51e109){return _0x149715<_0x51e109;},'MMajY':function(_0x5a99d1,_0x473772){return _0x5a99d1>>_0x473772;},'szieR':_0x219c4e(_0x2da1cf._0x3d0ae7)+_0x219c4e(_0x2da1cf._0x2857a6)+_0x325e0(_0x2da1cf._0x5c2a19)+_0x325e0(_0x2da1cf._0x166649),'kwNQb':_0x219c4e(_0x2da1cf._0x2b1f9f)+_0x219c4e(_0x2da1cf._0x3c079b)+_0x219c4e(_0x2da1cf._0xa875bf)+_0x325e0(_0x2da1cf._0x180e73)+'e','xKTnd':function(_0x237cb0,_0x219014){return _0x237cb0===_0x219014;},'ApEdL':_0x219c4e(_0x2da1cf._0x5541de)+_0x219c4e(_0x2da1cf._0xf4aa03)+_0x219c4e(0x196)+_0x325e0(_0x2da1cf._0x43b6b7)+_0x325e0(_0x2da1cf._0x97c251)+_0x325e0(_0x2da1cf._0x34f0fb)+_0x219c4e(0x188)+_0x219c4e(0x21e),'aSTIq':function(_0x4532b1,_0x14fba1){return _0x4532b1<_0x14fba1;},'ckymD':function(_0x1ec80b,_0x174696){return _0x1ec80b+_0x174696;},'PUVtu':_0x219c4e(_0x2da1cf._0x2589f4)+_0x325e0(_0x2da1cf._0x3070eb)+'-','IaNSe':function(_0x4e5f6a,_0x1ddc35,_0x3cad64){return _0x4e5f6a(_0x1ddc35,_0x3cad64);},'CjENT':function(_0x5686be,_0x2c2261){return _0x5686be(_0x2c2261);},'iIeRN':_0x325e0(_0x2da1cf._0x390294),'Qfcpi':_0x219c4e(_0x2da1cf._0x2589f4)+_0x219c4e(_0x2da1cf._0x2b1920)+_0x325e0(_0x2da1cf._0x351c82)+_0x325e0(_0x2da1cf._0x1b0605)+'@#','QClhO':_0x219c4e(_0x2da1cf._0x20140f),'eidCF':function(_0x25e466,_0x2d4dda,_0x5587fa,_0x199886){return _0x25e466(_0x2d4dda,_0x5587fa,_0x199886);},'FnQbp':function(_0x180720,_0x87f799){return _0x180720/_0x87f799;},'KDPSQ':function(_0x2861d2,_0x130896){return _0x2861d2(_0x130896);},'Ogink':_0x325e0(_0x2da1cf._0x529363)+_0x325e0(_0x2da1cf._0x4dd70b)+'d'},_0x41cbce=_0x1127d4[_0x219c4e(_0x2da1cf._0x38ec98)+'Q'](BigInt,_0x325e0(_0x2da1cf._0xc79d3b)+_0x325e0(_0x2da1cf._0x5d6e8a)+_0x219c4e(_0x2da1cf._0x2df0a4)+_0x219c4e(0x273)+_0x219c4e(_0x2da1cf._0x5c00cd)+_0x325e0(_0x2da1cf._0x337ab3)+_0x325e0(_0x2da1cf._0x1947d1)+_0x325e0(0x237)+_0x325e0(_0x2da1cf._0x435ac5)+_0x219c4e(_0x2da1cf._0x4364dd)+_0x325e0(_0x2da1cf._0x309619)+_0x219c4e(_0x2da1cf._0x305f08)+_0x325e0(_0x2da1cf._0x276084)+_0x219c4e(_0x2da1cf._0x3ec973)+_0x219c4e(0x1d2)+_0x219c4e(_0x2da1cf._0x540a89)+_0x219c4e(_0x2da1cf._0x1f9612)+_0x219c4e(0x226)+_0x219c4e(_0x2da1cf._0x176a0f)+_0x325e0(0x22a)+_0x219c4e(0x21f)+_0x219c4e(0x1c5)+_0x325e0(_0x2da1cf._0x23c2b3)+_0x219c4e(0x1e1)+_0x219c4e(0x19e)+_0x219c4e(_0x2da1cf._0xa8a83c)+_0x219c4e(_0x2da1cf._0x45b227)+_0x325e0(_0x2da1cf._0x470c78)+_0x325e0(_0x2da1cf._0x503e91)+_0x219c4e(_0x2da1cf._0x5989a2)+_0x219c4e(_0x2da1cf._0x2e561d)+_0x219c4e(_0x2da1cf._0x455f0b)+_0x325e0(_0x2da1cf._0x5836af)+_0x325e0(_0x2da1cf._0xed016f)+_0x219c4e(_0x2da1cf._0xf720c9)+_0x219c4e(_0x2da1cf._0x410d3f)+_0x219c4e(_0x2da1cf._0x3965c5)+_0x325e0(_0x2da1cf._0x1c0db1)+_0x325e0(_0x2da1cf._0x56e778)+_0x219c4e(_0x2da1cf._0x43a0c6)+_0x325e0(0x25e)+_0x325e0(_0x2da1cf._0x4684ab)+_0x325e0(_0x2da1cf._0x1da3ea)+_0x219c4e(0x158)+_0x325e0(_0x2da1cf._0x26e618)+_0x219c4e(_0x2da1cf._0x500880)+_0x219c4e(0x164)+_0x219c4e(_0x2da1cf._0x387250)+_0x325e0(_0x2da1cf._0x4a6020)+_0x219c4e(_0x2da1cf._0x4c3001)+_0x219c4e(_0x2da1cf._0x255b8f)+_0x219c4e(_0x2da1cf._0x2a347f)+_0x325e0(_0x2da1cf._0x532060)+_0x219c4e(_0x2da1cf._0x3cb5d6)+_0x325e0(_0x2da1cf._0x3809f3)+_0x219c4e(_0x2da1cf._0x49cbf0)+_0x219c4e(_0x2da1cf._0x3ec058)+_0x219c4e(_0x2da1cf._0x49f727)+_0x219c4e(_0x2da1cf._0x275d0d)+_0x219c4e(_0x2da1cf._0x5a6687)+_0x325e0(_0x2da1cf._0x4839c9)+_0x219c4e(_0x2da1cf._0x108229)+_0x219c4e(_0x2da1cf._0x3f9518)+_0x325e0(_0x2da1cf._0x450671)+_0x219c4e(_0x2da1cf._0x4a8386)+_0x219c4e(_0x2da1cf._0x4f3613)+_0x219c4e(_0x2da1cf._0x6ad9b7)+_0x219c4e(_0x2da1cf._0xae44bf)+_0x325e0(_0x2da1cf._0xc2ad1b)+_0x325e0(_0x2da1cf._0x1c2be2)+_0x325e0(0x195)+_0x219c4e(0x24b)+_0x325e0(_0x2da1cf._0x129745)+_0x219c4e(_0x2da1cf._0x25f325)+_0x325e0(_0x2da1cf._0x4d39cf)+_0x219c4e(_0x2da1cf._0x2c9adc)+_0x219c4e(_0x2da1cf._0x17106f)+_0x219c4e(_0x2da1cf._0x11f136)+_0x219c4e(0x26f)+_0x325e0(_0x2da1cf._0x50aa9c)+_0x219c4e(_0x2da1cf._0x5c350c)+_0x325e0(0x24e)+_0x219c4e(_0x2da1cf._0x527329)+_0x219c4e(_0x2da1cf._0x16a80d)+_0x325e0(_0x2da1cf._0x4796ae)+_0x325e0(0x16d)+_0x325e0(_0x2da1cf._0x3b7eb8)+_0x219c4e(_0x2da1cf._0x112359)+_0x325e0(0x26b)+_0x219c4e(0x1ed)+_0x219c4e(_0x2da1cf._0x1988d1)+_0x325e0(_0x2da1cf._0x373860)+_0x219c4e(_0x2da1cf._0x206cbe)+_0x325e0(_0x2da1cf._0x3af490)+_0x219c4e(_0x2da1cf._0x368cc6)+_0x325e0(0x1e6)+_0x219c4e(_0x2da1cf._0x18f171)+_0x325e0(_0x2da1cf._0x3dae4d)+_0x325e0(0x17d)+_0x219c4e(_0x2da1cf._0x492614)+_0x325e0(_0x2da1cf._0x3da43a)+_0x219c4e(_0x2da1cf._0x596067)+_0x325e0(_0x2da1cf._0x220e7b)+_0x325e0(0x1d7)+_0x325e0(_0x2da1cf._0x56f511)+_0x325e0(_0x2da1cf._0x2365d9)+_0x219c4e(0x261)+_0x219c4e(_0x2da1cf._0x260abf)+_0x219c4e(_0x2da1cf._0x4f2b8f)+_0x219c4e(_0x2da1cf._0xaec02b)+_0x325e0(_0x2da1cf._0x4d8346)+_0x219c4e(_0x2da1cf._0x23e8e8)+_0x325e0(_0x2da1cf._0xed7753)+_0x325e0(_0x2da1cf._0x3f63d7)+_0x219c4e(_0x2da1cf._0x517076)+_0x325e0(_0x2da1cf._0x430b97)+_0x325e0(0x1fa)+_0x219c4e(_0x2da1cf._0x36d52b)+_0x325e0(_0x2da1cf._0x1d2732)+_0x219c4e(_0x2da1cf._0x2b60b7)+_0x219c4e(0x252)+_0x219c4e(_0x2da1cf._0x65ba70)+_0x325e0(0x241)+_0x325e0(_0x2da1cf._0x190310)+_0x219c4e(_0x2da1cf._0x1766bc)+_0x219c4e(_0x2da1cf._0x3676f6)+_0x219c4e(_0x2da1cf._0x1ef79d)+_0x325e0(_0x2da1cf._0x5a4578)+_0x325e0(_0x2da1cf._0x2a91b8)+_0x219c4e(_0x2da1cf._0x57d941)+_0x219c4e(_0x2da1cf._0x33bea3)+_0x325e0(_0x2da1cf._0x4ba80e)+_0x219c4e(_0x2da1cf._0x2ff057)+_0x325e0(_0x2da1cf._0x39ef32)+_0x219c4e(_0x2da1cf._0x189310)+_0x219c4e(_0x2da1cf._0x14ef4c)+_0x219c4e(_0x2da1cf._0x5be717)+_0x219c4e(_0x2da1cf._0x17106f)+_0x219c4e(_0x2da1cf._0x561668)+_0x325e0(0x256)+_0x219c4e(_0x2da1cf._0x53aec4)+_0x325e0(_0x2da1cf._0x376e75)+_0x219c4e(_0x2da1cf._0x4f0d43)+_0x325e0(_0x2da1cf._0x3374ef)+_0x219c4e(_0x2da1cf._0x2e8aa0)+_0x219c4e(_0x2da1cf._0x1cc995)+_0x325e0(0x166)+_0x325e0(_0x2da1cf._0x5adfad)+_0x219c4e(_0x2da1cf._0x8123ad)+_0x219c4e(_0x2da1cf._0x431af9)+_0x219c4e(0x1d1)+_0x325e0(_0x2da1cf._0x3f4543)+_0x219c4e(_0x2da1cf._0xb7d299)+_0x219c4e(_0x2da1cf._0xe2578c)+'1'),_0x316a68=0x10001n;function _0xb2ad95(_0x174784,_0xdd7b4d,_0x101298){const _0x5bbaa7=_0x219c4e,_0xe268c0=_0x219c4e;let _0xdc9b2e=0x1n;_0x174784=_0x1127d4[_0x5bbaa7(_0x478545._0x581b4f)+'w'](_0x174784,_0x101298);while(_0xdd7b4d>0x0n){if(_0x1127d4[_0x5bbaa7(0x169)+'w'](_0xdd7b4d,0x2n)===0x1n)_0xdc9b2e=_0x1127d4[_0x5bbaa7(_0x478545._0x3430e0)+'Y'](_0xdc9b2e,_0x174784)%_0x101298;_0xdd7b4d=_0xdd7b4d/0x2n,_0x174784=_0x1127d4[_0xe268c0(_0x478545._0x5e402f)+'Y'](_0x174784*_0x174784,_0x101298);}return _0xdc9b2e;}function _0x546a55(_0x35e3c8){const _0x35a39d=_0x325e0,_0x42be04=_0x325e0;let _0x169d63=_0x35e3c8[_0x35a39d(_0x26aed8._0xf624df)+_0x35a39d(0x255)](0x10);if(_0x1127d4[_0x35a39d(_0x26aed8._0xf900d1)+'Y'](_0x169d63[_0x35a39d(_0x26aed8._0x447352)+'th'],0x2)!==0x0)_0x169d63='0'+_0x169d63;let _0x238f1f='';for(let _0xd2bbea=0x0;_0xd2bbea<_0x169d63[_0x35a39d(_0x26aed8._0x3081e3)+'th'];_0xd2bbea+=0x2){_0x238f1f+=String[_0x42be04(_0x26aed8._0x177fee)+_0x42be04(_0x26aed8._0x155b39)+_0x42be04(_0x26aed8._0x315a4e)](parseInt(_0x169d63[_0x35a39d(_0x26aed8._0x126ee7)+'tr'](_0xd2bbea,0x2),0x10));}return _0x238f1f;}function _0x268f6f(_0x2a0451){const _0x6eeb76=_0x219c4e,_0x2519da=_0x219c4e;let _0x510d18='';for(let _0xe85f0d=0x0;_0x1127d4[_0x6eeb76(0x157)+'M'](_0xe85f0d,_0x2a0451[_0x2519da(_0xb67b61._0x52706f)+'th']);_0xe85f0d++){_0x510d18+=_0x2a0451[_0x6eeb76(0x1f8)+_0x2519da(_0xb67b61._0x4bf22a)+'At'](_0xe85f0d)[_0x6eeb76(0x168)+_0x2519da(_0xb67b61._0x2bea32)](0x10)[_0x2519da(_0xb67b61._0x29303c)+_0x6eeb76(0x263)](0x2,'0');}return _0x1127d4[_0x6eeb76(_0xb67b61._0xba1bb7)+'x'](BigInt,'0x'+_0x510d18);}function _0x29e9b6(_0x3922f9){const _0x1abb18=_0x219c4e,_0x2e6a30=_0x219c4e;function _0x47b66a(_0x37e3c7,_0x2505be){return _0x37e3c7>>>_0x2505be|_0x37e3c7<<0x20-_0x2505be;}var _0x484066=Math[_0x1abb18(_0x4487e6._0x14b9bb)],_0xb8feab=_0x484066(0x2,0x20),_0xdf4b21=_0x1abb18(0x19d)+'th',_0x18b21d,_0x3dde9c,_0x113eeb='',_0xa4435d=[],_0x505729=_0x3922f9[_0xdf4b21]*0x8,_0x1db25a=_0x29e9b6['h']=_0x29e9b6['h']||[],_0x262c74=_0x29e9b6['k']=_0x29e9b6['k']||[],_0x18798b=_0x262c74[_0xdf4b21],_0x1432cf={};for(var _0x22370c=0x2;_0x18798b<0x40;_0x22370c++){if(!_0x1432cf[_0x22370c]){for(_0x18b21d=0x0;_0x18b21d<0x139;_0x18b21d+=_0x22370c){_0x1432cf[_0x18b21d]=_0x22370c;}_0x1db25a[_0x18798b]=_0x1127d4[_0x2e6a30(_0x4487e6._0x4166d1)+'a'](_0x484066,_0x22370c,0.5)*_0xb8feab|0x0,_0x262c74[_0x18798b++]=_0x484066(_0x22370c,0x1/0x3)*_0xb8feab|0x0;}}_0x3922f9+='\u0080';while(_0x3922f9[_0xdf4b21]%0x40-0x38)_0x3922f9+='\x00';for(_0x18b21d=0x0;_0x18b21d<_0x3922f9[_0xdf4b21];_0x18b21d++){_0x3dde9c=_0x3922f9[_0x1abb18(_0x4487e6._0x53667f)+_0x2e6a30(_0x4487e6._0x367bea)+'At'](_0x18b21d);if(_0x3dde9c>>0x8)return;_0xa4435d[_0x18b21d>>0x2]|=_0x3dde9c<<_0x1127d4[_0x1abb18(_0x4487e6._0x3796bc)+'h'](_0x1127d4[_0x1abb18(0x1b9)+'A'](0x3,_0x18b21d)%0x4,0x8);}_0xa4435d[_0xa4435d[_0xdf4b21]]=_0x1127d4[_0x2e6a30(_0x4487e6._0x5f0bb3)+'f'](_0x505729/_0xb8feab,0x0),_0xa4435d[_0xa4435d[_0xdf4b21]]=_0x505729;for(_0x3dde9c=0x0;_0x1127d4[_0x1abb18(_0x4487e6._0x1babf8)+'r'](_0x3dde9c,_0xa4435d[_0xdf4b21]);){var _0x4d3918=_0xa4435d[_0x1abb18(_0x4487e6._0x56c287)+'e'](_0x3dde9c,_0x3dde9c+=0x10),_0x5da73c=_0x1db25a;_0x1db25a=_0x1db25a[_0x2e6a30(0x1b6)+'e'](0x0,0x8);for(_0x18b21d=0x0;_0x18b21d<0x40;_0x18b21d++){var _0x1da569=_0x4d3918[_0x18b21d-0xf],_0x2bf740=_0x4d3918[_0x1127d4[_0x2e6a30(_0x4487e6._0x27b257)+'p'](_0x18b21d,0x2)],_0x36dd35=_0x1db25a[0x0],_0x3a3ce7=_0x1db25a[0x4],_0x1116a7=_0x1127d4[_0x2e6a30(_0x4487e6._0x24a6c8)+'X'](_0x1127d4[_0x1abb18(_0x4487e6._0x2d9655)+'N'](_0x1db25a[0x7]+(_0x1127d4[_0x2e6a30(_0x4487e6._0x351217)+'X'](_0x47b66a(_0x3a3ce7,0x6),_0x47b66a(_0x3a3ce7,0xb))^_0x47b66a(_0x3a3ce7,0x19)),_0x1127d4[_0x2e6a30(_0x4487e6._0x4a0263)+'u'](_0x3a3ce7,_0x1db25a[0x5])^~_0x3a3ce7&_0x1db25a[0x6])+_0x262c74[_0x18b21d],_0x4d3918[_0x18b21d]=_0x1127d4[_0x2e6a30(0x1da)+'s'](_0x18b21d,0x10)?_0x4d3918[_0x18b21d]:_0x1127d4[_0x2e6a30(_0x4487e6._0x5aa65b)+'f'](_0x1127d4[_0x2e6a30(_0x4487e6._0x2d9655)+'N'](_0x4d3918[_0x18b21d-0x10]+_0x1127d4[_0x1abb18(_0x4487e6._0x170ee1)+'X'](_0x1127d4[_0x2e6a30(_0x4487e6._0x351217)+'X'](_0x47b66a(_0x1da569,0x7),_0x47b66a(_0x1da569,0x12)),_0x1da569>>>0x3),_0x4d3918[_0x1127d4[_0x2e6a30(_0x4487e6._0xa28e8f)+'q'](_0x18b21d,0x7)])+(_0x1127d4[_0x2e6a30(_0x4487e6._0x505985)+'a'](_0x47b66a,_0x2bf740,0x11)^_0x47b66a(_0x2bf740,0x13)^_0x1127d4[_0x1abb18(_0x4487e6._0xfe2b38)+'B'](_0x2bf740,0xa)),0x0)),_0x569d47=(_0x47b66a(_0x36dd35,0x2)^_0x1127d4[_0x2e6a30(_0x4487e6._0x7ec27e)+'f'](_0x47b66a,_0x36dd35,0xd)^_0x1127d4[_0x1abb18(0x1ef)+'a'](_0x47b66a,_0x36dd35,0x16))+(_0x36dd35&_0x1db25a[0x1]^_0x1127d4[_0x1abb18(_0x4487e6._0x5efaa0)+'u'](_0x36dd35,_0x1db25a[0x2])^_0x1db25a[0x1]&_0x1db25a[0x2]);_0x1db25a=[_0x1116a7+_0x569d47|0x0][_0x1abb18(_0x4487e6._0x17b177)+'at'](_0x1db25a),_0x1db25a[0x4]=_0x1db25a[0x4]+_0x1116a7|0x0;}for(_0x18b21d=0x0;_0x1127d4[_0x2e6a30(_0x4487e6._0x4b3ebf)+'p'](_0x18b21d,0x8);_0x18b21d++){_0x1db25a[_0x18b21d]=_0x1db25a[_0x18b21d]+_0x5da73c[_0x18b21d]|0x0;}}for(_0x18b21d=0x0;_0x18b21d<0x8;_0x18b21d++){for(_0x3dde9c=0x3;_0x1127d4[_0x2e6a30(_0x4487e6._0x337340)+'X'](_0x3dde9c,0x1);_0x3dde9c--){var _0x328ffd=_0x1127d4[_0x1abb18(_0x4487e6._0x5efaa0)+'u'](_0x1127d4[_0x2e6a30(_0x4487e6._0x344885)+'Y'](_0x1db25a[_0x18b21d],_0x3dde9c*0x8),0xff);_0x113eeb+=_0x1127d4[_0x2e6a30(0x200)+'X'](_0x1127d4[_0x1abb18(0x19c)+'r'](_0x328ffd,0x10)?0x0:'',_0x328ffd[_0x1abb18(_0x4487e6._0x2969bc)+_0x2e6a30(_0x4487e6._0x9f4149)](0x10));}}return _0x113eeb;}class LicenseManager{static validate(_0x31b7e8,_0x2d202f={}){const _0x730a9=_0x325e0,_0x2697a0=_0x325e0;if(!_0x31b7e8)return{'valid':![],'tier':null,'reason':_0x1127d4[_0x730a9(_0x2fd1a1._0x283332)+'R']};const _0x10e0c1=_0x31b7e8[_0x730a9(_0x2fd1a1._0x2d2b85)](),_0x437b45=_0x10e0c1[_0x2697a0(_0x2fd1a1._0x53117e)+_0x2697a0(0x25c)+_0x2697a0(_0x2fd1a1._0x3fd500)](),_0x3c088e=_0x437b45[_0x2697a0(_0x2fd1a1._0x3d7e1e)+'t']('-'),_0x4c49c3=_0x2d202f[_0x2697a0(_0x2fd1a1._0x526e42)+_0x730a9(_0x2fd1a1._0x1ac5c9)]!==undefined&&_0x2d202f[_0x2697a0(_0x2fd1a1._0x526e42)+_0x2697a0(_0x2fd1a1._0x1ac5c9)]!==null?_0x2d202f[_0x730a9(_0x2fd1a1._0x526e42)+_0x730a9(_0x2fd1a1._0x1ac5c9)]:Date[_0x730a9(0x1b3)]();let _0x68379f=0x0;_0x2d202f[_0x2697a0(_0x2fd1a1._0x2cad33)+_0x730a9(_0x2fd1a1._0x1ce44e)]&&(_0x68379f=parseInt(_0x2d202f[_0x730a9(_0x2fd1a1._0x2cad33)+_0x2697a0(_0x2fd1a1._0x5aa0b4)][_0x730a9(_0x2fd1a1._0x1a5266)+_0x2697a0(0x180)](_0x1127d4[_0x2697a0(0x15a)+'b'])||'0',0xa),(_0x2d202f[_0x2697a0(_0x2fd1a1._0x526e42)+_0x2697a0(_0x2fd1a1._0x1ac5c9)]===undefined||_0x2d202f[_0x2697a0(0x209)+_0x2697a0(_0x2fd1a1._0x3d4d9d)]===null)&&_0x2d202f[_0x2697a0(_0x2fd1a1._0x2cad33)+_0x2697a0(_0x2fd1a1._0x5aa0b4)][_0x2697a0(_0x2fd1a1._0x1781aa)+_0x2697a0(_0x2fd1a1._0x547350)](_0x1127d4[_0x730a9(0x15a)+'b'],_0x4c49c3[_0x2697a0(_0x2fd1a1._0x676ef)+_0x2697a0(_0x2fd1a1._0x289aac)]()));if((_0x2d202f[_0x730a9(0x209)+_0x2697a0(_0x2fd1a1._0x3d4d9d)]===undefined||_0x1127d4[_0x2697a0(0x176)+'d'](_0x2d202f[_0x2697a0(_0x2fd1a1._0x526e42)+_0x2697a0(_0x2fd1a1._0x330ea9)],null))&&_0x4c49c3<_0x68379f){if(_0x2d202f[_0x730a9(0x20a)+_0x730a9(_0x2fd1a1._0x10986b)+'y'])_0x2d202f[_0x730a9(_0x2fd1a1._0x14c942)+_0x730a9(_0x2fd1a1._0x1b0892)+'y']();return{'valid':![],'tier':null,'reason':_0x1127d4[_0x2697a0(_0x2fd1a1._0xb5e36e)+'L']};}const _0xbc480c=typeof atob!==_0x730a9(_0x2fd1a1._0x5b4349)+_0x2697a0(_0x2fd1a1._0x51c611)+'d'?atob:_0x5f0bbc=>Buffer[_0x2697a0(0x172)](_0x5f0bbc,_0x730a9(0x1f3)+'64')[_0x2697a0(0x168)+_0x730a9(0x255)](_0x730a9(0x1cf)+'ry');if(_0x437b45[_0x2697a0(_0x2fd1a1._0x2107cc)+_0x730a9(_0x2fd1a1._0x5a71ec)+'th'](_0x730a9(_0x2fd1a1._0x2ac45c)+_0x730a9(_0x2fd1a1._0x31bdf9)+'-'))try{const _0x20ac4f=_0x10e0c1[_0x2697a0(0x216)+_0x730a9(_0x2fd1a1._0x1f6911)+'g'](0x9),_0x505992=_0xbc480c(_0x20ac4f),_0x3b2120=new Uint8Array(_0x505992[_0x2697a0(_0x2fd1a1._0x21aff7)+'th']);for(let _0x311963=0x0;_0x1127d4[_0x730a9(0x1c1)+'q'](_0x311963,_0x505992[_0x2697a0(_0x2fd1a1._0x58da27)+'th']);_0x311963++){_0x3b2120[_0x311963]=_0x505992[_0x2697a0(_0x2fd1a1._0xf9204f)+_0x2697a0(0x219)+'At'](_0x311963);}let _0x5ab5b6='';for(let _0x1307d7=0x0;_0x1307d7<_0x3b2120[_0x2697a0(_0x2fd1a1._0x2f9192)+'th'];_0x1307d7++){_0x5ab5b6+=_0x3b2120[_0x1307d7][_0x730a9(_0x2fd1a1._0x29e5b8)+_0x730a9(_0x2fd1a1._0x289aac)](0x10)[_0x2697a0(_0x2fd1a1._0x3598e7)+_0x2697a0(_0x2fd1a1._0x2ddaad)](0x2,'0');}const _0x58e1c6=BigInt(_0x1127d4[_0x2697a0(_0x2fd1a1._0x55a2d0)+'D']('0x',_0x5ab5b6)),_0x28eea0=_0xb2ad95(_0x58e1c6,_0x316a68,_0x41cbce),_0x4ce590=_0x546a55(_0x28eea0);if(_0x4ce590[_0x2697a0(_0x2fd1a1._0x2107cc)+_0x730a9(_0x2fd1a1._0x418b95)+'th'](_0x730a9(_0x2fd1a1._0x441dd3)+_0x2697a0(_0x2fd1a1._0x40b494)+_0x2697a0(0x1f5))){const _0x5e9bf4=parseInt(_0x4ce590[_0x730a9(0x216)+_0x730a9(0x22d)+'g'](0xb),0xa);if(!isNaN(_0x5e9bf4)){if(_0x4c49c3<_0x5e9bf4)return{'valid':!![],'tier':_0x2697a0(_0x2fd1a1._0x401ff1)+'S','expires':_0x5e9bf4};if(_0x2d202f[_0x730a9(_0x2fd1a1._0x5a5a59)+_0x2697a0(_0x2fd1a1._0x4055ba)+'d'])_0x2d202f[_0x730a9(0x22e)+_0x730a9(_0x2fd1a1._0x2f78b4)+'d'](_0x730a9(0x19f)+'t');return{'valid':![],'tier':null,'reason':_0x730a9(_0x2fd1a1._0x517b12)+_0x2697a0(_0x2fd1a1._0x15006)+_0x2697a0(_0x2fd1a1._0x17091d)+'d'};}}}catch(_0x12becf){return{'valid':![],'tier':null,'reason':_0x730a9(_0x2fd1a1._0x5cbe1e)+_0x2697a0(_0x2fd1a1._0x2a6eb7)+_0x2697a0(_0x2fd1a1._0x518ed7)+_0x730a9(_0x2fd1a1._0x535ca1)+_0x2697a0(_0x2fd1a1._0x53997e)+_0x730a9(0x235)};}if(_0x437b45[_0x730a9(_0x2fd1a1._0x2107cc)+_0x2697a0(_0x2fd1a1._0x5a71ec)+'th'](_0x2697a0(_0x2fd1a1._0xace37b)+_0x2697a0(_0x2fd1a1._0x479c3f)))try{const _0x2fa0b7=_0x10e0c1[_0x2697a0(_0x2fd1a1._0xfb5f4)+_0x730a9(_0x2fd1a1._0x1f6911)+'g'](0x7),_0x4f57fe=_0xbc480c(_0x2fa0b7),_0x1e4c32=new Uint8Array(_0x4f57fe[_0x730a9(_0x2fd1a1._0x2f9192)+'th']);for(let _0x594270=0x0;_0x1127d4[_0x730a9(0x157)+'M'](_0x594270,_0x4f57fe[_0x730a9(0x19d)+'th']);_0x594270++){_0x1e4c32[_0x594270]=_0x4f57fe[_0x2697a0(_0x2fd1a1._0xf9204f)+_0x730a9(_0x2fd1a1._0x2956bd)+'At'](_0x594270);}let _0x4b1c14='';for(let _0x56285f=0x0;_0x56285f<_0x1e4c32[_0x730a9(_0x2fd1a1._0x394be3)+'th'];_0x56285f++){_0x4b1c14+=_0x1e4c32[_0x56285f][_0x2697a0(_0x2fd1a1._0x29e5b8)+_0x2697a0(_0x2fd1a1._0x11c558)](0x10)[_0x730a9(_0x2fd1a1._0x3598e7)+_0x2697a0(_0x2fd1a1._0x2ddaad)](0x2,'0');}const _0x1781b5=BigInt('0x'+_0x4b1c14),_0x49d926=_0xb2ad95(_0x1781b5,_0x316a68,_0x41cbce),_0x4d8517=_0x546a55(_0x49d926);if(_0x4d8517[_0x2697a0(_0x2fd1a1._0x25e484)+_0x730a9(_0x2fd1a1._0x5a71ec)+'th'](_0x1127d4[_0x2697a0(_0x2fd1a1._0x40affc)+'u'])){const _0x385910=_0x4d8517[_0x730a9(0x1b7)+'t']('-');if(_0x385910[_0x730a9(_0x2fd1a1._0x3f9f8a)+'th']>=0x5){const _0x21d5ba=_0x385910[0x2],_0x298b5d=_0x1127d4[_0x2697a0(_0x2fd1a1._0x30fa67)+'e'](parseInt,_0x385910[0x4],0xa);if(!_0x1127d4[_0x730a9(_0x2fd1a1._0x2618d5)+'T'](isNaN,_0x298b5d)){if(_0x4c49c3<_0x298b5d)return{'valid':!![],'tier':_0x21d5ba,'expires':_0x298b5d};if(_0x2d202f[_0x2697a0(_0x2fd1a1._0x2ef361)+_0x2697a0(_0x2fd1a1._0x92b8e)+'d'])_0x2d202f[_0x730a9(0x22e)+_0x730a9(_0x2fd1a1._0x17091d)+'d'](_0x730a9(_0x2fd1a1._0x155e88));return{'valid':![],'tier':null,'reason':_0x2697a0(_0x2fd1a1._0x58b15b)+_0x730a9(_0x2fd1a1._0x593497)+_0x2697a0(0x1be)+_0x730a9(_0x2fd1a1._0x2d39b6)};}}}}catch(_0x1caba3){return{'valid':![],'tier':null,'reason':_0x2697a0(0x1fd)+_0x730a9(0x14e)+_0x730a9(_0x2fd1a1._0xe0cfff)+_0x2697a0(0x224)+_0x730a9(_0x2fd1a1._0x3cc0f7)+'d'};}if(_0x3c088e[_0x2697a0(_0x2fd1a1._0x3f9f8a)+'th']===0x4&&_0x1127d4[_0x2697a0(_0x2fd1a1._0x22d502)+'d'](_0x3c088e[0x0],'PS')&&[_0x730a9(_0x2fd1a1._0x444b75),_0x2697a0(_0x2fd1a1._0x401ff1)+'S',_0x730a9(_0x2fd1a1._0x3e66d8),_0x1127d4[_0x2697a0(_0x2fd1a1._0x230cbf)+'N'],_0x730a9(_0x2fd1a1._0x93ba31)+_0x2697a0(_0x2fd1a1._0x105029)+'SE'][_0x2697a0(_0x2fd1a1._0x152ea7)+_0x2697a0(_0x2fd1a1._0x3ab4e7)](_0x3c088e[0x1])){const _0x5a9339=_0x3c088e[0x1],_0x276c4f=_0x3c088e[0x2],_0x104538=_0x3c088e[0x3],_0x69149f=_0x1127d4[_0x2697a0(0x21d)+'i'],_0x56868b=_0x276c4f+_0x69149f+_0x5a9339;let _0x1dbf2d=0x0;for(let _0x495c8d=0x0;_0x495c8d<_0x56868b[_0x730a9(_0x2fd1a1._0x2f9192)+'th'];_0x495c8d++){_0x1dbf2d+=_0x56868b[_0x2697a0(_0x2fd1a1._0xf9204f)+_0x2697a0(0x219)+'At'](_0x495c8d)*(_0x495c8d+0x1);}const _0x1ff00d=(_0x1dbf2d%0x270f)[_0x730a9(0x168)+_0x730a9(_0x2fd1a1._0x21c8fd)]()[_0x730a9(_0x2fd1a1._0x3598e7)+_0x2697a0(_0x2fd1a1._0x2ddaad)](0x4,'0');if(_0x104538===_0x1ff00d)return{'valid':!![],'tier':_0x5a9339};}if(_0x10e0c1[_0x730a9(_0x2fd1a1._0x25e484)+_0x2697a0(0x259)+'th'](_0x1127d4[_0x730a9(_0x2fd1a1._0x3d1099)+'O'])&&_0x10e0c1[_0x730a9(_0x2fd1a1._0x204515)+'t']('.')[_0x730a9(0x19d)+'th']===0x3)try{const [_0x238d77,_0x4587b9,_0x281f3e]=_0x10e0c1[_0x2697a0(_0x2fd1a1._0x3d7e1e)+'t']('.');let _0x35b482=_0x281f3e[_0x730a9(_0x2fd1a1._0x27fdd1)+_0x730a9(0x20b)](/-/g,'+')[_0x730a9(_0x2fd1a1._0x3d9152)+_0x730a9(_0x2fd1a1._0x735370)](/_/g,'/');while(_0x35b482[_0x2697a0(_0x2fd1a1._0x14e864)+'th']%0x4)_0x35b482+='=';const _0x16bcf5=_0x1127d4[_0x2697a0(0x271)+'T'](_0xbc480c,_0x35b482);let _0x5d134a='';for(let _0x42b38a=0x0;_0x42b38a<_0x16bcf5[_0x730a9(_0x2fd1a1._0x18ddf6)+'th'];_0x42b38a++){_0x5d134a+=_0x16bcf5[_0x2697a0(_0x2fd1a1._0xf9204f)+_0x730a9(_0x2fd1a1._0x2956bd)+'At'](_0x42b38a)[_0x730a9(0x168)+_0x2697a0(_0x2fd1a1._0x11c558)](0x10)[_0x2697a0(0x1a0)+_0x2697a0(_0x2fd1a1._0x2ddaad)](0x2,'0');}const _0x2d6cda=BigInt('0x'+_0x5d134a),_0x3a0bf9=_0x1127d4[_0x2697a0(_0x2fd1a1._0x22b674)+'F'](_0xb2ad95,_0x2d6cda,_0x316a68,_0x41cbce);let _0x1e28ff=_0x3a0bf9[_0x2697a0(0x168)+_0x2697a0(_0x2fd1a1._0x289aac)](0x10);if(_0x1e28ff[_0x730a9(0x19d)+'th']%0x2!==0x0)_0x1e28ff='0'+_0x1e28ff;const _0x50e9d7=_0x29e9b6(_0x238d77+'.'+_0x4587b9);if(_0x1e28ff[_0x2697a0(_0x2fd1a1._0x501c18)+_0x2697a0(_0x2fd1a1._0x14e001)](_0x50e9d7)){const _0xc060dc=_0xbc480c(_0x4587b9[_0x2697a0(0x1c3)+_0x2697a0(_0x2fd1a1._0x735370)](/-/g,'+')[_0x730a9(0x1c3)+_0x730a9(_0x2fd1a1._0x44a0d9)](/_/g,'/')),_0x300dd9=JSON[_0x730a9(_0x2fd1a1._0xd4bb75)+'e'](_0xc060dc);if(_0x300dd9[_0x730a9(0x17c)]&&_0x1127d4[_0x2697a0(0x1c9)+'p'](_0x4c49c3,0x3e8)<_0x300dd9[_0x730a9(_0x2fd1a1._0x208e65)])return{'valid':!![],'tier':_0x300dd9[_0x730a9(_0x2fd1a1._0x10fdbd)]||_0x730a9(_0x2fd1a1._0x4a3785),'expires':_0x300dd9[_0x730a9(_0x2fd1a1._0x1361e0)]*0x3e8};else{if(_0x2d202f[_0x730a9(_0x2fd1a1._0x108ed4)+_0x2697a0(_0x2fd1a1._0x329101)+'d'])_0x2d202f[_0x2697a0(_0x2fd1a1._0x4308c1)+_0x730a9(_0x2fd1a1._0x3195e5)+'d'](_0x730a9(_0x2fd1a1._0x5cca8e));return{'valid':![],'tier':null,'reason':_0x2697a0(_0x2fd1a1._0x41d2e2)+_0x2697a0(_0x2fd1a1._0x542559)+_0x730a9(0x181)};}}}catch(_0x35063b){return{'valid':![],'tier':null,'reason':_0x2697a0(_0x2fd1a1._0x4c0bbb)+_0x730a9(_0x2fd1a1._0x1b6deb)+_0x2697a0(_0x2fd1a1._0x2d4464)+_0x2697a0(_0x2fd1a1._0x2ce4ec)+_0x2697a0(_0x2fd1a1._0x717b2a)+'d'};}return{'valid':![],'tier':null,'reason':_0x730a9(_0x2fd1a1._0x1eda6e)+_0x730a9(_0x2fd1a1._0xcafdd)+_0x730a9(_0x2fd1a1._0x42dd5e)+'at'};}}typeof globalThis!==_0x325e0(0x15d)+_0x219c4e(0x1ca)+'d'&&(globalThis[_0x325e0(_0x2da1cf._0x35aee5)+_0x325e0(_0x2da1cf._0x30ebdb)+_0x219c4e(_0x2da1cf._0x3b61e2)+'er']=LicenseManager),typeof _0x322b78!==_0x219c4e(_0x2da1cf._0x391c38)+_0x219c4e(_0x2da1cf._0x4dd70b)+'d'&&(_0x322b78[_0x219c4e(0x185)+_0x325e0(0x15b)+_0x219c4e(0x265)+'er']=LicenseManager),typeof window!==_0x325e0(_0x2da1cf._0x4a47c8)+_0x325e0(_0x2da1cf._0x4ba03a)+'d'&&(window[_0x325e0(_0x2da1cf._0x146bcb)+_0x219c4e(_0x2da1cf._0x30ebdb)+_0x219c4e(_0x2da1cf._0x1b9fcc)+'er']=LicenseManager),typeof exports!==_0x219c4e(_0x2da1cf._0x2b210c)+_0x325e0(_0x2da1cf._0x4eef46)+'d'&&(typeof module!==_0x1127d4[_0x325e0(0x220)+'k']&&module[_0x219c4e(_0x2da1cf._0x2e3077)+_0x325e0(0x175)]&&(module[_0x219c4e(_0x2da1cf._0x2e3077)+_0x219c4e(0x175)]=LicenseManager),exports[_0x325e0(_0x2da1cf._0x2440d5)+_0x325e0(_0x2da1cf._0x30ebdb)+_0x325e0(_0x2da1cf._0x3b61e2)+'er']=LicenseManager);}(typeof globalThis!==_0x5a6bc0(0x15d)+_0x20bda8(0x1ca)+'d'?globalThis:typeof window!==_0x5a6bc0(0x15d)+_0x20bda8(0x1ca)+'d'?window:this));function _0x5c0d(){const _0x4e0afc=['C3vICW','otm3oq','ndy4ma','q29Kzq','mta0ma','nde1mW','mZuYmq','uwzJCa','DgvK','nZyWnq','t2DPBG','ywDL','mdG1nW','vevbtq','B24GzG','C3PPzq','ota4ma','mJzFiq','mdC1na','mdGYoq','mtCYoq','DwrLCW','mta5nW','DhjPBG','B25fEa','ufmTua','CgfYCW','A2v5ia','nJKZmG','A3rqAW','zwLKqW','BgvK','z09OAW','mZGWmW','mdu5mq','mdmXmq','uLbssq','vgLTzq','ndi1mW','ndy3oa','CM92Aq','ndu2mG','yxnL','ote4mG','ndyZnW','mJCXmq','nde0oq','mJa2nG','zM9YBq','otG2oa','y2SGyq','y29UyW','nJG5oq','nJa1nG','mtiWmq','uunSAa','odq5nW','nZm1oa','nJq5oq','ody1mG','mtK3na','ode0mG','y2T5Bq','CMLUzW','nZa4nW','u0eT','zuvzDq','DhnxAq','nZq3ma','nZaYmG','CgvYqW','oteYnq','ndyWoa','otaZnW','mJa4ndf3r2f4qK8','mJa2nq','nta4nG','DgfYDa','z2v0sq','yw5HzW','odiXmG','suXpva','mZiXoq','qxbfza','ntmXoq','nJqYma','mJC2oq','nte1oa','AYbYBW','nZCXnW','mZy5ma','q2PftG','luXjqW','ntaZna','odiZnW','mJe4oa','nta1oa','mte3mq','AuLLuG','otaYmG','u0rl','mZiYma','C3rHCG','nteXoq','nZyWmW','ndC5nG','nJG4na','x1nbta','zgvJCG','ru5urq','mtu0oq','ntC0oq','ntaXnW','uLnb','mJG1mG','Cg93','ntaZnG','tKvPzG','mJCZna','tvDutq','A3Douq','BNnLtq','nZCWnG','Dw5Kzq','ntu0nW','ntGXoa','otKWma','nJKXmG','mJeZmq','odCYoq','ndG4mG','sLDu','mtyWmG','nZK3oq','Dg9tDa','swHwAq','mJiYnKTYzwrtzW','Exb0Aq','odKYnq','mZu0ma','oti5na','mJuYnW','v2L0Aa','nJi2ma','zNjVBq','t0vn','ufvwDa','CNrZ','EeTuBG','DhjPBq','nJm0nW','q2HHCG','igzHAq','mteZnZC5oeL5uhzTEa','zxHW','ndC3mG','mZC2ma','Dg9vCa','DgvT','CMvK','yxn0xW','odmXnW','s3DKsW','tgLJzq','nde5mdy4u0P1EuTA','x3rPBq','zxrLyW','mtyYnG','ywLSzq','vf8Yma','ChnFBa','sLDuia','ndq1ntjqqLLpsxi','ote2oq','nJiXmq','tM8GAW','mti0ntG2nvP3C0TcBq','tu1HAG','nJi0mG','mtqYmq','BgXIyq','zgvK','q2XVyW','ndKXnq','mdmYma','ody2mG','AM9TtW','BgvUzW','nJu1na','ugLSBW','CgfKuW','B21HBa','nJa4mW','odG1nW','mty0oa','Aw5JBa','D2XvsW','mtiXnvHkCffPua','qKTVuW','nJy4mq','ufjp','DgLLCG','mJm4oq','mJqYoa','mJeYnW','mZGXmW','DcbKzq','ndeYoq','DgLVBG','BM93','nta0na','ndaWnW','C2XPyW','C3bSAq','ntK2na','u1jdAa','ndq3nW','mtKWnq','mZq5na','odu1oq','zxHWAq','DMfSAq','mte0oq','yvnusq','nZq2mq','CMvWBa','mdG2nq','nty5mG','ntG4na','swfouW','mJmZna','rM5ryG','zMLUzq','mJyZnq','s0rquW','zxKGCa','zKTYrW','yMLUyq','CgLYzq','mtqXmq','nZu5nq','t1ngsa','odK3oq','mJK2ma','mJu4mq','nZmXmG','BhKGza','mtG5nJe4nencDgjfwa','A0PZuG','mdy0nW','C2vLBG','mZyWoa','mdy5na','C3rVCG','nty3ma','odeWnq','Cxn0yW','DcbLEa','DLrpBW','ntaXoq','mtmZnG','zgjREq','ntC0nG','otyWoq','ndK0ow1VueH5Ba','nZG2oq','zgf0Aq','nZqYna','sgHOEG','AKXQCG','mZq4nG','odyXmG','y3j5Ca','yMfZzq','mZa5nG','t1qT','zxLk','BM9Tyq','y2HHCG','nJmWmW','nZmWoa','zxHWBW','nZa2mq','uLnbia','odyYoa','ntu4nW','rNfptW','oda1nW','nZyXna','mdq4nq','nti0mG','C2v0sq','mZG4nG','BgLKia','odqYoq','Bw9JAW','B25bBG','ywnL','wLreuW','nJC4mq','mJC2nW','otm5nq','sw52yq','mJy4ma','ufmTuG','tLzqAW','lvbjta','zw5KCW'];_0x5c0d=function(){return _0x4e0afc;};return _0x5c0d();}
|
|
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));
|
package/ps-license-manager.js
CHANGED
|
@@ -238,6 +238,10 @@
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
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
|
+
|
|
241
245
|
// Export module for ES modules, CommonJS, and Browser Global
|
|
242
246
|
if (typeof globalThis !== 'undefined') {
|
|
243
247
|
globalThis.LicenseManager = LicenseManager;
|