const _0x1cca60=_0x4741;(function(_0x373c63,_0x359802){const _0x5adf6c=_0x4741,_0x4651d2=_0x373c63();while(!![]){try{const _0xe58fe5=-parseInt(_0x5adf6c(0xf5))/0x1*(-parseInt(_0x5adf6c(0xe3))/0x2)+parseInt(_0x5adf6c(0xe1))/0x3+parseInt(_0x5adf6c(0xe8))/0x4*(-parseInt(_0x5adf6c(0xd3))/0x5)+parseInt(_0x5adf6c(0xc7))/0x6+-parseInt(_0x5adf6c(0xc2))/0x7*(parseInt(_0x5adf6c(0xeb))/0x8)+parseInt(_0x5adf6c(0xef))/0x9+-parseInt(_0x5adf6c(0xe6))/0xa;if(_0xe58fe5===_0x359802)break;else _0x4651d2['push'](_0x4651d2['shift']());}catch(_0x3cf3a8){_0x4651d2['push'](_0x4651d2['shift']());}}}(_0x312c,0xab192));import{extension_settings}from'/scripts/extensions.js';import{saveSettings,extensionName}from'./settings.js';import{updateUI}from'../ui/state.js';export const pluginAuthStatus={'authorized':![],'expired':![]};const SERVER_URL=_0x1cca60(0xbf),AUTH_CONFIG={'expiryDate':new Date(_0x1cca60(0xc5))};export function getPasswordForDate(_0xc0815c){const _0x1290b2=_0x1cca60,_0x24e0e0=_0xc0815c[_0x1290b2(0xe0)](),_0x322ac2=String(_0xc0815c[_0x1290b2(0xd4)]()+0x1)[_0x1290b2(0xd7)](0x2,'0'),_0x5b1b86=String(_0xc0815c[_0x1290b2(0xcf)]())[_0x1290b2(0xd7)](0x2,'0');return _0x1290b2(0xdf)+_0x24e0e0+_0x322ac2+_0x5b1b86;}export function checkAuthorization(){const _0x3e2dae=_0x1cca60,_0x2ae0a4=new Date(),_0x3eda3f=localStorage[_0x3e2dae(0xf3)](_0x3e2dae(0xd9));if(_0x3eda3f){const _0x11a837=new Date(_0x3eda3f);_0x2ae0a4>_0x11a837?pluginAuthStatus[_0x3e2dae(0xc8)]=!![]:pluginAuthStatus[_0x3e2dae(0xc8)]=![];}else pluginAuthStatus['expired']=_0x2ae0a4>AUTH_CONFIG[_0x3e2dae(0xe2)];pluginAuthStatus[_0x3e2dae(0xc8)]&&(localStorage[_0x3e2dae(0xe4)](_0x3e2dae(0xee)),localStorage[_0x3e2dae(0xe4)](_0x3e2dae(0xcc)),localStorage['removeItem']('plugin_user_type'),localStorage['removeItem']('plugin_valid_until'),console[_0x3e2dae(0xdc)](_0x3e2dae(0xe7)));const _0x1790e0=localStorage[_0x3e2dae(0xf3)]('plugin_activated')==='true';return pluginAuthStatus[_0x3e2dae(0xc6)]=_0x1790e0&&!pluginAuthStatus[_0x3e2dae(0xc8)],pluginAuthStatus[_0x3e2dae(0xc6)];}export async function activatePluginAuthorization(_0x413b03){const _0x1203a1=_0x1cca60;try{const _0xbd8a7f=await fetch(SERVER_URL+_0x1203a1(0xc3),{'method':_0x1203a1(0xf4),'headers':{'Content-Type':_0x1203a1(0xc1)},'body':JSON[_0x1203a1(0xf0)]({'code':_0x413b03})}),_0x25b7e5=await _0xbd8a7f[_0x1203a1(0xf1)]();if(_0x25b7e5[_0x1203a1(0xcd)]){localStorage[_0x1203a1(0xec)](_0x1203a1(0xcc),_0x413b03),localStorage['setItem'](_0x1203a1(0xee),_0x1203a1(0xdb)),localStorage[_0x1203a1(0xec)](_0x1203a1(0xd2),_0x1203a1(0xdb)),localStorage['setItem'](_0x1203a1(0xc9),_0x25b7e5[_0x1203a1(0xdd)]),localStorage['removeItem'](_0x1203a1(0xd9));const _0x78a255=_0x25b7e5['note']||_0x25b7e5[_0x1203a1(0xdd)];return toastr[_0x1203a1(0xcd)]('授权激活成功!用户类型:\x20'+_0x78a255,_0x1203a1(0xd1)),pluginAuthStatus[_0x1203a1(0xc6)]=!![],enablePluginUI(),!![];}}catch(_0x3ccb8b){console['warn']('服务器验证连接失败,尝试本地验证...',_0x3ccb8b);}const _0x2352b6=getPasswordForDate(new Date());if(_0x413b03===_0x2352b6){const _0x4c4c03=new Date();return _0x4c4c03[_0x1203a1(0xea)](_0x4c4c03['getDate']()+0x7),localStorage[_0x1203a1(0xec)](_0x1203a1(0xcc),_0x413b03),localStorage['setItem'](_0x1203a1(0xee),_0x1203a1(0xdb)),localStorage[_0x1203a1(0xec)](_0x1203a1(0xd2),_0x1203a1(0xdb)),localStorage[_0x1203a1(0xec)](_0x1203a1(0xc9),'1'),localStorage['setItem'](_0x1203a1(0xd9),_0x4c4c03[_0x1203a1(0xe9)]()),toastr[_0x1203a1(0xcd)](_0x1203a1(0xe5)+_0x4c4c03[_0x1203a1(0xc0)](),_0x1203a1(0xd1)),pluginAuthStatus['authorized']=!![],enablePluginUI(),!![];}return toastr['error'](_0x1203a1(0xce),_0x1203a1(0xd6)),![];}function _0x4741(_0x33d7a4,_0x3ecd85){const _0x312c0d=_0x312c();return _0x4741=function(_0x4741ad,_0x581deb){_0x4741ad=_0x4741ad-0xbf;let _0x2ef28a=_0x312c0d[_0x4741ad];return _0x2ef28a;},_0x4741(_0x33d7a4,_0x3ecd85);}function _0x312c(){const _0x303a1b=['plugin_valid_until','slideUp','true','log','type','\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20','Amily-','getFullYear','2682516MKUXgc','expiryDate','167086qkhIXw','removeItem','每日授权激活成功!有效期至:\x20','11247660HGuowg','[Amily2号]\x20检测到授权已过期,已清理本地存储。','2692HwIUhs','toISOString','setDate','1107688TATumj','setItem','.plugin-features','plugin_activated','10028259ZRrllJ','stringify','json','slideDown','getItem','POST','1PLFZSK','