diff --git a/background.ts b/background.ts index b9f15b7..587b022 100644 --- a/background.ts +++ b/background.ts @@ -47,7 +47,7 @@ async function _initLocalization(url: string): Promise { // TODO check version let data: Record = {}; - if (url.includes("robertsspaceindustries.com") || url.includes("manual")) { + if (url.includes("robertsspaceindustries.com")) { data["zh-CN"] = await _getJsonData("zh-CN-rsi.json", {cacheKey: "zh-CN", version: v.rsi}); data["concierge"] = await _getJsonData("concierge.json", {cacheKey: "concierge", version: v.concierge}); data["orgs"] = await _getJsonData("orgs.json", {cacheKey: "orgs", version: v.orgs}); @@ -57,6 +57,14 @@ async function _initLocalization(url: string): Promise { data["UEX"] = await _getJsonData("zh-CN-uex.json", {cacheKey: "uex", version: v.uex}); } else if (url.includes("erkul.games")) { data["DPS"] = await _getJsonData("zh-CN-dps.json", {cacheKey: "dps", version: v.dps}); + } else if (url.includes("manual")) { + data["zh-CN"] = await _getJsonData("zh-CN-rsi.json", {cacheKey: "zh-CN", version: v.rsi}); + data["concierge"] = await _getJsonData("concierge.json", {cacheKey: "concierge", version: v.concierge}); + data["orgs"] = await _getJsonData("orgs.json", {cacheKey: "orgs", version: v.orgs}); + data["address"] = await _getJsonData("addresses.json", {cacheKey: "orgs", version: v.addresses}); + data["hangar"] = await _getJsonData("hangar.json", {cacheKey: "hangar", version: v.hangar}); + data["UEX"] = await _getJsonData("zh-CN-uex.json", {cacheKey: "uex", version: v.uex}); + data["DPS"] = await _getJsonData("zh-CN-dps.json", {cacheKey: "dps", version: v.dps}); } // update data let replaceWords: ReplaceWord[] = []; @@ -65,7 +73,7 @@ async function _initLocalization(url: string): Promise { replaceWords.push(...getLocalizationResource(data, key)); } - if (url.includes("robertsspaceindustries.com") || url.includes("manual")) { + if (url.includes("robertsspaceindustries.com")) { const org = "https://robertsspaceindustries.com/orgs"; const citizens = "https://robertsspaceindustries.com/citizens"; const organization = "https://robertsspaceindustries.com/account/organization"; @@ -106,6 +114,20 @@ async function _initLocalization(url: string): Promise { addLocalizationResource("UEX"); } else if (url.includes("erkul.games")) { addLocalizationResource("DPS"); + } else if (url.includes("manual")) { + addLocalizationResource("zh-CN"); + replaceWords.push({"word": 'members', "replacement": '名成员'}); + addLocalizationResource("orgs"); + addLocalizationResource("address"); + replaceWords.push( + {"word": 'Total recruits: ', "replacement": '总邀请数:'}, + {"word": 'Prospects ', "replacement": '未完成的邀请'}, + {"word": 'Recruits', "replacement": '已完成的邀请'} + ); + addLocalizationResource("concierge"); + addLocalizationResource("hangar"); + addLocalizationResource("UEX"); + addLocalizationResource("DPS"); } return replaceWords; } diff --git a/core.ts b/core.ts index b05262f..0d5d79c 100644 --- a/core.ts +++ b/core.ts @@ -57,8 +57,6 @@ function WebLocalizationUpdateReplaceWords(w) { } async function allTranslate() { - SCLocalizationTranslating = true; - async function replaceTextNode(node: Node, parentNode?: Element) { if (node.nodeType === Node.TEXT_NODE) { // 保存原始文本内容 @@ -244,7 +242,11 @@ InitWebLocalization(); function _loadLocalizationData() { chrome.runtime.sendMessage({ action: "_loadLocalizationData", url: window.location.href }, function (response) { - WebLocalizationUpdateReplaceWords(response.result); + console.log("response ===" + JSON.stringify(response)); + if (response.result.length > 0) { + SCLocalizationTranslating = true; + WebLocalizationUpdateReplaceWords(response.result); + } }); } @@ -255,6 +257,7 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { undoTranslate(); return; } + SCLocalizationTranslating = true; SCLocalizationEnableSplitMode = true; WebLocalizationUpdateReplaceWords(request.data); } @@ -271,6 +274,7 @@ window.addEventListener('message', async (event) => { try { SCLocalizationEnableSplitMode = true; chrome.runtime.sendMessage({ action: "_loadLocalizationData", url: "manual" }, function (response) { + SCLocalizationTranslating = true; WebLocalizationUpdateReplaceWords(response.result); }); response = { success: true }; diff --git a/dist/chrome/background/service_worker.js b/dist/chrome/background/service_worker.js index 5b745a6..bc3ee44 100644 --- a/dist/chrome/background/service_worker.js +++ b/dist/chrome/background/service_worker.js @@ -1 +1 @@ -(()=>{var e={},t={};function s(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,s),o.exports}s.rv=()=>"1.3.8",s.ruid="bundler=rspack@1.3.8";let r=null;async function n(){r=await a("versions.json"),console.log("Localization Version ==="),console.log(r)}async function o(e){if(console.log("url ==="+e),null==r)return await n(),o(e);let t=r,s={};e.includes("robertsspaceindustries.com")||e.includes("manual")?(s["zh-CN"]=await a("zh-CN-rsi.json",{cacheKey:"zh-CN",version:t.rsi}),s.concierge=await a("concierge.json",{cacheKey:"concierge",version:t.concierge}),s.orgs=await a("orgs.json",{cacheKey:"orgs",version:t.orgs}),s.address=await a("addresses.json",{cacheKey:"orgs",version:t.addresses}),s.hangar=await a("hangar.json",{cacheKey:"hangar",version:t.hangar})):e.includes("uexcorp.space")?s.UEX=await a("zh-CN-uex.json",{cacheKey:"uex",version:t.uex}):e.includes("erkul.games")&&(s.DPS=await a("zh-CN-dps.json",{cacheKey:"dps",version:t.dps}));let c=[];function i(e){c.push(...function(e,t){let s=[],r=e[t];if("object"==typeof r)for(let[e,t]of Object.entries(r)){let r=e.toString().trim().toLowerCase().replace(/\xa0/g," ").replace(/\s{2,}/g," ");s.push({word:r,replacement:String(t)})}return s}(s,e))}if(e.includes("robertsspaceindustries.com")||e.includes("manual")){if(e.startsWith("https://robertsspaceindustries.com/spectrum/community/"))return[];i("zh-CN"),(e.startsWith("https://robertsspaceindustries.com/orgs")||e.startsWith("https://robertsspaceindustries.com/citizens")||e.startsWith("https://robertsspaceindustries.com/account/organization"))&&(c.push({word:"members",replacement:"名成员"}),i("orgs")),e.startsWith("https://robertsspaceindustries.com/account/addresses")&&i("address"),e.startsWith("https://robertsspaceindustries.com/account/referral-program")&&c.push({word:"Total recruits: ",replacement:"总邀请数:"},{word:"Prospects ",replacement:"未完成的邀请"},{word:"Recruits",replacement:"已完成的邀请"}),e.startsWith("https://robertsspaceindustries.com/account/concierge")&&(c=[],i("concierge")),e.startsWith("https://robertsspaceindustries.com/account/pledges")&&i("hangar")}else e.includes("uexcorp.space")?i("UEX"):e.includes("erkul.games")&&i("DPS");return c}async function a(e,t={}){let{cacheKey:s="",version:r=null}=t;if(s&&""!==s){let e=await c(`${s}_version`),t=await c(s);if(t&&"object"==typeof t&&Object.keys(t).length>0&&e===r)return t}let n=new Date,o=await fetch("https://git.scbox.xkeyc.cn/SCToolBox/ScWeb_Chinese_Translate/raw/branch/main/json/locales/"+e,{method:"GET",mode:"cors"}),l=new Date,u=await o.json();if(s&&""!==s){let e=l.getTime()-n.getTime();console.log(`update ${s} v == ${r} time == ${e/1e3}s`),await i(s,u),await i(`${s}_version`,r)}return u}function c(e){return new Promise(t=>{chrome.storage.local.get([e],s=>{t(s[e]||null)})})}function i(e,t){return new Promise(s=>{let r={};r[e]=t,chrome.storage.local.set(r,()=>{s()})})}chrome.runtime.onInstalled.addListener(function(){n().then(e=>{}),console.log("SWTT init")}),chrome.runtime.onMessage.addListener(function(e,t,s){if("_loadLocalizationData"===e.action)return o(e.url).then(e=>{s({result:e})}),!0}),chrome.runtime.onInstalled.addListener(function(){chrome.contextMenus.create({id:"translate",title:"切换翻译",contexts:["all"]})}),chrome.contextMenus.onClicked.addListener((e,t)=>{console.log("contextMenus",e,t);let s="manual";t&&t.url&&["robertsspaceindustries.com","erkul.games","uexcorp.space"].find(e=>t.url.includes(e))&&(s=t.url),o(s).then(e=>{t&&void 0!==t.id&&chrome.tabs.sendMessage(t.id,{action:"_toggleTranslation",data:e})})})})(); \ No newline at end of file +(()=>{var e={},s={};function r(t){var n=s[t];if(void 0!==n)return n.exports;var o=s[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.rv=()=>"1.3.8",r.ruid="bundler=rspack@1.3.8";let t=null;async function n(){t=await a("versions.json"),console.log("Localization Version ==="),console.log(t)}async function o(e){if(console.log("url ==="+e),null==t)return await n(),o(e);let s=t,r={};e.includes("robertsspaceindustries.com")?(r["zh-CN"]=await a("zh-CN-rsi.json",{cacheKey:"zh-CN",version:s.rsi}),r.concierge=await a("concierge.json",{cacheKey:"concierge",version:s.concierge}),r.orgs=await a("orgs.json",{cacheKey:"orgs",version:s.orgs}),r.address=await a("addresses.json",{cacheKey:"orgs",version:s.addresses}),r.hangar=await a("hangar.json",{cacheKey:"hangar",version:s.hangar})):e.includes("uexcorp.space")?r.UEX=await a("zh-CN-uex.json",{cacheKey:"uex",version:s.uex}):e.includes("erkul.games")?r.DPS=await a("zh-CN-dps.json",{cacheKey:"dps",version:s.dps}):e.includes("manual")&&(r["zh-CN"]=await a("zh-CN-rsi.json",{cacheKey:"zh-CN",version:s.rsi}),r.concierge=await a("concierge.json",{cacheKey:"concierge",version:s.concierge}),r.orgs=await a("orgs.json",{cacheKey:"orgs",version:s.orgs}),r.address=await a("addresses.json",{cacheKey:"orgs",version:s.addresses}),r.hangar=await a("hangar.json",{cacheKey:"hangar",version:s.hangar}),r.UEX=await a("zh-CN-uex.json",{cacheKey:"uex",version:s.uex}),r.DPS=await a("zh-CN-dps.json",{cacheKey:"dps",version:s.dps}));let c=[];function i(e){c.push(...function(e,s){let r=[],t=e[s];if("object"==typeof t)for(let[e,s]of Object.entries(t)){let t=e.toString().trim().toLowerCase().replace(/\xa0/g," ").replace(/\s{2,}/g," ");r.push({word:t,replacement:String(s)})}return r}(r,e))}if(e.includes("robertsspaceindustries.com")){if(e.startsWith("https://robertsspaceindustries.com/spectrum/community/"))return[];i("zh-CN"),(e.startsWith("https://robertsspaceindustries.com/orgs")||e.startsWith("https://robertsspaceindustries.com/citizens")||e.startsWith("https://robertsspaceindustries.com/account/organization"))&&(c.push({word:"members",replacement:"名成员"}),i("orgs")),e.startsWith("https://robertsspaceindustries.com/account/addresses")&&i("address"),e.startsWith("https://robertsspaceindustries.com/account/referral-program")&&c.push({word:"Total recruits: ",replacement:"总邀请数:"},{word:"Prospects ",replacement:"未完成的邀请"},{word:"Recruits",replacement:"已完成的邀请"}),e.startsWith("https://robertsspaceindustries.com/account/concierge")&&(c=[],i("concierge")),e.startsWith("https://robertsspaceindustries.com/account/pledges")&&i("hangar")}else e.includes("uexcorp.space")?i("UEX"):e.includes("erkul.games")?i("DPS"):e.includes("manual")&&(i("zh-CN"),c.push({word:"members",replacement:"名成员"}),i("orgs"),i("address"),c.push({word:"Total recruits: ",replacement:"总邀请数:"},{word:"Prospects ",replacement:"未完成的邀请"},{word:"Recruits",replacement:"已完成的邀请"}),i("concierge"),i("hangar"),i("UEX"),i("DPS"));return c}async function a(e,s={}){let{cacheKey:r="",version:t=null}=s;if(r&&""!==r){let e=await c(`${r}_version`),s=await c(r);if(s&&"object"==typeof s&&Object.keys(s).length>0&&e===t)return s}let n=new Date,o=await fetch("https://git.scbox.xkeyc.cn/SCToolBox/ScWeb_Chinese_Translate/raw/branch/main/json/locales/"+e,{method:"GET",mode:"cors"}),l=new Date,u=await o.json();if(r&&""!==r){let e=l.getTime()-n.getTime();console.log(`update ${r} v == ${t} time == ${e/1e3}s`),await i(r,u),await i(`${r}_version`,t)}return u}function c(e){return new Promise(s=>{chrome.storage.local.get([e],r=>{s(r[e]||null)})})}function i(e,s){return new Promise(r=>{let t={};t[e]=s,chrome.storage.local.set(t,()=>{r()})})}chrome.runtime.onInstalled.addListener(function(){n().then(e=>{}),console.log("SWTT init")}),chrome.runtime.onMessage.addListener(function(e,s,r){if("_loadLocalizationData"===e.action)return o(e.url).then(e=>{r({result:e})}),!0}),chrome.runtime.onInstalled.addListener(function(){chrome.contextMenus.create({id:"translate",title:"切换翻译",contexts:["all"]})}),chrome.contextMenus.onClicked.addListener((e,s)=>{console.log("contextMenus",e,s);let r="manual";s&&s.url&&["robertsspaceindustries.com","erkul.games","uexcorp.space"].find(e=>s.url.includes(e))&&(r=s.url),o(r).then(e=>{s&&void 0!==s.id&&chrome.tabs.sendMessage(s.id,{action:"_toggleTranslation",data:e})})})})(); \ No newline at end of file diff --git a/dist/chrome/content_scripts/content-0.js b/dist/chrome/content_scripts/content-0.js index 89a2a96..b9f618c 100644 --- a/dist/chrome/content_scripts/content-0.js +++ b/dist/chrome/content_scripts/content-0.js @@ -1 +1 @@ -(()=>{var s={242:function(){let s={},e=!1,n=!1;function a(e){e.sort(function(s,e){return e.word.length-s.word.length}).forEach(({word:e,replacement:n})=>{s[e]=n}),window.location.hostname.startsWith("issue-council.robertsspaceindustries.com")&&(s.save="保存"),t().then(s=>{})}async function t(){async function s(e,n){if(e.nodeType===Node.TEXT_NODE){let s=e.nodeValue||"",a=u(s);if(s!==a&&n){let t=n.getAttribute("data-original-value")||"";n.setAttribute("data-original-value",t+s),e.nodeValue=a}}else for(let n=0;n{s.innerText=s.getAttribute("data-original-value")||"",s.removeAttribute("data-original-value")}),document.querySelectorAll('input[type="button"], input[type="submit"], input[type="text"], input[type="password"]').forEach(s=>{s.hasAttribute("data-original-value")&&("button"===s.type||"submit"===s.type?s.value=s.getAttribute("data-original-value")||"":s.placeholder=s.getAttribute("data-original-value")||"",s.removeAttribute("data-original-value"))}),Promise.resolve({success:!0})}function i(s,e){let n,a;if("INPUT"===s.tagName){if(n="button"===s.type||"submit"===s.type?"value":"placeholder",a=u(s[n]),s[n]===a)return;let t=e.getAttribute("data-original-value")||"";s.setAttribute("data-original-value",t+s[n])}else{if(a=u(s[n="data"]),s[n]===a)return;let t=e.getAttribute("data-original-value")||"";e.setAttribute("data-original-value",t+s[n])}s[n]=a}function u(n){let a=n.toLowerCase().replace(/\xa0/g," ").replace(/\s{2,}/g," ").trim(),t=n.replace(/\xa0/g," ").replace(/\s{2,}/g," ").trim(),r=a.replace("the ",""),i=a.replace("- ","");if(s[a])n=s[a];else if(e)if(t.includes(" - ")){let e=n,r=t.split(" - ");if("upgrade"===r[0].toLowerCase()&&a.includes("to")&&a.endsWith("edition")){let s=a.replace("standard edition","").replace("upgrade","").replace("warbond edition","").split(" to "),e="升级包 "+u(s[0])+" 到 "+u(s[1]);a.endsWith("warbond edition")?e+=" 战争债券版":e+=" 标准版",n=e}else r.forEach(function(n){e=s[n.toLowerCase()]?e.replace(n,s[n.toLowerCase()]):e.replace(n,u(n))}),n=e}else if(a.endsWith("starter pack")||a.endsWith("starter package")){let e=a.replace("starter package","").replace("starter pack","").trim();s[e.toLowerCase()]&&(e=s[e.toLowerCase()]),n=e+" 新手包"}else a.startsWith("the ")&&s[r]?n=s[r]:a.startsWith("- ")&&s[i]&&(n="- "+s[i]);return n}new(window.MutationObserver||window.WebKitMutationObserver)(function(s,e){for(let e of s)for(let s of e.addedNodes)!function s(e){if(n&&function(s){if(["IMG","svg","mat-icon"].includes(s.tagName)||s.id&&[].includes(s.id))return!1;if(s.classList){for(let e of["css-truncate"])if(s.classList.contains(e))return!1}return!0}(e))for(let n of e.childNodes){if(["RELATIVE-TIME","TIME-AGO"].includes(e.tagName))return void function(s){let e=navigator.language||navigator.language,n=$(s).attr("datetime");$(s).text(timeago.format(n,e.replace("-","_")))}(e);n.nodeType===Node.TEXT_NODE?i(n,e):n.nodeType===Node.ELEMENT_NODE&&("INPUT"===n.tagName?i(n,e):s(n))}}(s)}).observe(document.body,{subtree:!0,characterData:!0,childList:!0}),window.location.href.includes("robertsspaceindustries.com")&&(e=!0),window.location.hostname.includes("www.erkul.games")&&document.body.addEventListener("click",function(s){setTimeout(function(){t().then(s=>{})},200)}),chrome.runtime.sendMessage({action:"_loadLocalizationData",url:window.location.href},function(s){a(s.result)}),chrome.runtime.onMessage.addListener((s,t,i)=>{if("_toggleTranslation"===s.action){if(n){n=!1,r();return}e=!0,a(s.data)}}),window.addEventListener("message",async s=>{if(s.source!==window||!s.data||"SC_TRANSLATE_REQUEST"!==s.data.type)return;let{action:n}=s.data;if("translate"===n)try{e=!0,chrome.runtime.sendMessage({action:"_loadLocalizationData",url:"manual"},function(s){a(s.result)})}catch(s){s.message}else if("undoTranslate"===n)try{await r()}catch(s){s.message}}),window.postMessage({type:"SC-BOX-TRANSLATE-API-AVAILABLE"},"*")},148:function(s,e){(function(s){"use strict";var e=["second","minute","hour","day","week","month","year"];function n(s,n){if(0===n)return["just now","right now"];var a=e[Math.floor(n/2)];return 1=u[t]&&t=u[n]&&n"1.3.8",n.ruid="bundler=rspack@1.3.8",n(242),n(148)})(); \ No newline at end of file +(()=>{var s={242:function(){let s={},e=!1,n=!1;function a(e){e.sort(function(s,e){return e.word.length-s.word.length}).forEach(({word:e,replacement:n})=>{s[e]=n}),window.location.hostname.startsWith("issue-council.robertsspaceindustries.com")&&(s.save="保存"),t().then(s=>{})}async function t(){async function s(e,n){if(e.nodeType===Node.TEXT_NODE){let s=e.nodeValue||"",a=u(s);if(s!==a&&n){let t=n.getAttribute("data-original-value")||"";n.setAttribute("data-original-value",t+s),e.nodeValue=a}}else for(let n=0;n{s.innerText=s.getAttribute("data-original-value")||"",s.removeAttribute("data-original-value")}),document.querySelectorAll('input[type="button"], input[type="submit"], input[type="text"], input[type="password"]').forEach(s=>{s.hasAttribute("data-original-value")&&("button"===s.type||"submit"===s.type?s.value=s.getAttribute("data-original-value")||"":s.placeholder=s.getAttribute("data-original-value")||"",s.removeAttribute("data-original-value"))}),Promise.resolve({success:!0})}function i(s,e){let n,a;if("INPUT"===s.tagName){if(n="button"===s.type||"submit"===s.type?"value":"placeholder",a=u(s[n]),s[n]===a)return;let t=e.getAttribute("data-original-value")||"";s.setAttribute("data-original-value",t+s[n])}else{if(a=u(s[n="data"]),s[n]===a)return;let t=e.getAttribute("data-original-value")||"";e.setAttribute("data-original-value",t+s[n])}s[n]=a}function u(n){let a=n.toLowerCase().replace(/\xa0/g," ").replace(/\s{2,}/g," ").trim(),t=n.replace(/\xa0/g," ").replace(/\s{2,}/g," ").trim(),r=a.replace("the ",""),i=a.replace("- ","");if(s[a])n=s[a];else if(e)if(t.includes(" - ")){let e=n,r=t.split(" - ");if("upgrade"===r[0].toLowerCase()&&a.includes("to")&&a.endsWith("edition")){let s=a.replace("standard edition","").replace("upgrade","").replace("warbond edition","").split(" to "),e="升级包 "+u(s[0])+" 到 "+u(s[1]);a.endsWith("warbond edition")?e+=" 战争债券版":e+=" 标准版",n=e}else r.forEach(function(n){e=s[n.toLowerCase()]?e.replace(n,s[n.toLowerCase()]):e.replace(n,u(n))}),n=e}else if(a.endsWith("starter pack")||a.endsWith("starter package")){let e=a.replace("starter package","").replace("starter pack","").trim();s[e.toLowerCase()]&&(e=s[e.toLowerCase()]),n=e+" 新手包"}else a.startsWith("the ")&&s[r]?n=s[r]:a.startsWith("- ")&&s[i]&&(n="- "+s[i]);return n}new(window.MutationObserver||window.WebKitMutationObserver)(function(s,e){for(let e of s)for(let s of e.addedNodes)!function s(e){if(n&&function(s){if(["IMG","svg","mat-icon"].includes(s.tagName)||s.id&&[].includes(s.id))return!1;if(s.classList){for(let e of["css-truncate"])if(s.classList.contains(e))return!1}return!0}(e))for(let n of e.childNodes){if(["RELATIVE-TIME","TIME-AGO"].includes(e.tagName))return void function(s){let e=navigator.language||navigator.language,n=$(s).attr("datetime");$(s).text(timeago.format(n,e.replace("-","_")))}(e);n.nodeType===Node.TEXT_NODE?i(n,e):n.nodeType===Node.ELEMENT_NODE&&("INPUT"===n.tagName?i(n,e):s(n))}}(s)}).observe(document.body,{subtree:!0,characterData:!0,childList:!0}),window.location.href.includes("robertsspaceindustries.com")&&(e=!0),window.location.hostname.includes("www.erkul.games")&&document.body.addEventListener("click",function(s){setTimeout(function(){t().then(s=>{})},200)}),chrome.runtime.sendMessage({action:"_loadLocalizationData",url:window.location.href},function(s){console.log("response ==="+JSON.stringify(s)),s.result.length>0&&(n=!0,a(s.result))}),chrome.runtime.onMessage.addListener((s,t,i)=>{if("_toggleTranslation"===s.action){if(n){n=!1,r();return}n=!0,e=!0,a(s.data)}}),window.addEventListener("message",async s=>{if(s.source!==window||!s.data||"SC_TRANSLATE_REQUEST"!==s.data.type)return;let{action:t}=s.data;if("translate"===t)try{e=!0,chrome.runtime.sendMessage({action:"_loadLocalizationData",url:"manual"},function(s){n=!0,a(s.result)})}catch(s){s.message}else if("undoTranslate"===t)try{await r()}catch(s){s.message}}),window.postMessage({type:"SC-BOX-TRANSLATE-API-AVAILABLE"},"*")},148:function(s,e){(function(s){"use strict";var e=["second","minute","hour","day","week","month","year"];function n(s,n){if(0===n)return["just now","right now"];var a=e[Math.floor(n/2)];return 1=u[t]&&t=u[n]&&n"1.3.8",n.ruid="bundler=rspack@1.3.8",n(242),n(148)})(); \ No newline at end of file