PageSourceSearch

https://rorbit.app/assets/js/pages/page-dashboard.js?v=c76bb4b8

js rorbit.app collected 2026-10-02 01:14:52 UTC 41,083 bytes, 1 lines download raw bytes

1const EXT_IDS=["cpckbfgdbloljipohjmjomdgmieoabbf","ejnoabbeognjdkbfklpbmmghhicbgall"];let EXT_ID=EXT_IDS[0];function tryPingExt(e,t){if("undefined"==typeof chrome||!chrome.runtime?.sendMessage)return void t?.();let n=0;!function o(){if(n>=EXT_IDS.length)return void t?.();const r=EXT_IDS[n++];chrome.runtime.sendMessage(r,{type:"PING"},t=>{!chrome.runtime.lastError&&t?.installed?(EXT_ID=r,window._extId=r,e(t)):o()})}()}window._extId=EXT_ID;const TIER_LABELS={free:"Free Plan",pro:"Pro Plan",premium:"Premium Plan"},RORBIT_API="https://api.rorbit.app";function hideAllOverlays(){document.getElementById("overlay-connecting").style.display="none",document.getElementById("overlay-no-extension").style.display="none",document.getElementById("overlay-not-authenticated").style.display="none",document.getElementById("app").style.display="none"}function showSpinner(e,t){hideAllOverlays(),document.getElementById("overlay-connecting").style.display="flex";const n=document.getElementById("connecting-title"),o=document.getElementById("connecting-status");n&&t&&(n.textContent=t),o&&e&&(o.textContent=e)}function showOverlayNoExt(){hideAllOverlays(),document.getElementById("overlay-no-extension").style.display="flex"}function showOverlayNoAuth(){hideAllOverlays(),document.getElementById("overlay-not-authenticated").style.display="flex"}function showDashboard(){hideAllOverlays();const e=document.getElementById("nav-signout");if(e&&(e.style.display=""),window._rorbitIsAdmin){const e=document.getElementById("nav-admin");e&&(e.style.display="")}document.getElementById("app").style.display="flex"}function updateVerifyNav(e){try{localStorage.setItem("rorbit_badge",e?"1":"0")}catch{}const t=document.querySelector('[data-nav="verify"]');t&&(t.style.display=e?"none":"");const n=()=>{const t=document.getElementById("stat-verified-tag");t&&(t.style.display=e?"inline-flex":"none")};n(),requestAnimationFrame(n)}async function refreshActiveToken(){if("undefined"==typeof chrome||!chrome.runtime?.sendMessage)return"no_ext";const e=await new Promise(e=>{let t=0;!function n(){if(t>=EXT_IDS.length)return e(null);const o=EXT_IDS[t++];chrome.runtime.sendMessage(o,{type:"PING"},t=>{!chrome.runtime.lastError&&t?.installed?e(o):n()})}()});if(!e)return"no_ext";EXT_ID=e,window._extId=e;const t=await new Promise(t=>{chrome.runtime.sendMessage(e,{type:"GET_SESSION"},e=>{chrome.runtime.lastError?t(null):t(e)})});if(!t||!t.connected||!t.token)return"no_auth";try{let n=await new Promise(t=>{chrome.runtime.sendMessage(e,{type:"GET_ME"},e=>{chrome.runtime.lastError?t({ok:!1,status:0}):t(e||{ok:!1,status:0})})});if(401===n.status){const o=await new Promise(t=>{chrome.runtime.sendMessage(e,{type:"REFRESH_SESSION"},e=>{chrome.runtime.lastError?t(null):t(e)})});if(!o?.token)return"no_auth";t.token=o.token,t.tier=o.tier||t.tier,n=await new Promise(t=>{chrome.runtime.sendMessage(e,{type:"GET_ME"},e=>{chrome.runtime.lastError?t({ok:!1,status:0}):t(e||{ok:!1,status:0})})})}if(!n.ok)return"no_auth";const o=n.data;return window._rorbitToken=t.token,window._rorbitSession=t,window._rorbitTier=t.tier||o.user?.tier||"free",window._rorbitIsAdmin=!!o.user?.is_admin,"ok"}catch(e){return"no_auth"}}window.addEventListener("rorbit:session-updated",()=>{fetch("https://api.rorbit.app/verify/status",{headers:{Authorization:`Bearer ${window._rorbitToken||""}`}}).then(e=>e.json()).then(e=>{updateVerifyNav(!!e.badge)}).catch(()=>{})}),window.addEventListener("rorbit:session-cleared",()=>{try{localStorage.removeItem("rorbit_badge")}catch{}updateVerifyNav(!1)}),document.addEventListener("visibilitychange",()=>{if("visible"!==document.visibilityState)return;const e=document.getElementById("overlay-not-authenticated");e&&"none"!==e.style.display&&initDashboard()}),window._rorbitToken=null,window._rorbitSession=null,window._rorbitTier="free",window._rorbitIsAdmin=!1,window.getActiveToken=function(){return window._rorbitToken||null};let _heartbeatFails=0,_heartbeatTimer=null,_spinnerVisible=!1;function startHeartbeat(){_heartbeatTimer&&clearInterval(_heartbeatTimer),_heartbeatFails=0,_spinnerVisible=!1,_heartbeatTimer=setInterval(async()=>{const e=await refreshActiveToken();if("ok"===e)return _heartbeatFails=0,void(_spinnerVisible&&(_spinnerVisible=!1,showDashboard()));_heartbeatFails++,2===_heartbeatFails&&(_spinnerVisible=!0,showSpinner("Make sure you're signed in to the extension.","Reconnecting to your dashboard")),_heartbeatFails>=3&&(clearInterval(_heartbeatTimer),_heartbeatTimer=null,_spinnerVisible=!1,"no_ext"===e?showOverlayNoExt():showOverlayNoAuth())},3e4)}let _session=null;function renderAvatar(e,t){if(!e)return;const n=(t.initials||(t.username||"RO").slice(0,2)).toUpperCase();e.textContent=n,e.style.backgroundImage=""}function renderUser(e){_session=e,window._rorbitSession=e;const t=e.user||{},n=e.tier||"free",o=!0===e.guest,r=document.getElementById("status-avatar");r&&renderAvatar(r,t);const a=document.getElementById("stat-status-label");a&&(a.textContent=o?"Guest mode — no account linked":"Connected");const i=document.getElementById("stat-username");
1i&&(i.textContent=t.username||"—");const s=(()=>{try{return localStorage.getItem("rorbit_badge")}catch{return null}})();null!==s?updateVerifyNav("1"===s):"boolean"==typeof e.badge&&updateVerifyNav(e.badge);const l=window._rorbitToken||e.token||"";l&&fetch("https://api.rorbit.app/verify/status",{headers:{Authorization:`Bearer ${l}`}}).then(e=>e.json()).then(e=>updateVerifyNav(!!e.badge)).catch(()=>{}),window._rorbitUserId=t.robloxId||null;const d=document.getElementById("stat-userid");d&&(t.robloxId?(d.textContent=String(t.robloxId),d.href=`https://www.roblox.com/users/${t.robloxId}/profile`):(d.textContent="—",d.removeAttribute("href")));const c=document.getElementById("plan-badge");if(c){const e="free"!==n;c.className="plan-badge "+(e?"pro":"free");const t=(TIER_LABELS[n]||"Free Plan").replace(" Plan","");c.textContent="● "+t}const u=document.getElementById("comm-tier");u&&(u.textContent=(TIER_LABELS[n]||"Free").replace(" Plan",""));const m=document.getElementById("stat-plan-tag");if(m){const e=(TIER_LABELS[n]||"Free Plan").replace(" Plan","");m.textContent=e,m.className="tier-badge "+(n||"free").toLowerCase()}renderTierContent(n,t)}function renderTierContent(e,t){window._rorbitTier=e||"free";const n={free:0,pro:1,premium:2}[e]||0;renderDashboardPricing("upgrade-pricing-grid",e,t?.robloxId||null),renderYourPlan("your-plan-features","plan-badge",e);const o=document.querySelector(".bottom-row"),r=document.getElementById("your-plan-action");document.getElementById("your-plan-features");"premium"===e?o&&(o.style.display="none"):r&&"pro"===e&&(r.innerHTML='<button class="upgrade-btn" data-pd="navUpgrade"><svg style="width:14px;height:14px;vertical-align:-2px;margin-right:5px;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg> Upgrade to Premium</button>');const a=document.getElementById("features-plan-title"),i=document.getElementById("features-plan-sub"),s=document.getElementById("features-plan-action");a&&i&&s&&("premium"===e?(a.textContent="You have everything 🎉",i.textContent="All features unlocked. Enjoy the full ROrbit experience.",s.style.display="none"):"pro"===e?(a.textContent="Unlock Premium features",i.textContent="You're on Pro. Upgrade to Premium for trade tools, theme studio, and more.",s.style.display=""):(a.textContent="Unlock Pro & Premium features",i.textContent="130+ extra features across trading, profiles, servers, avatar, and alerts.",s.style.display="")),document.querySelectorAll(".feature-item.locked").forEach(e=>{const t=e.querySelector(".badge-premium"),o=e.querySelector(".badge-pro");if(n>=(t?2:o?1:0)){e.classList.remove("locked");const t=e.querySelector('input[type="checkbox"]');t&&(t.disabled=!1,t.checked=!0)}})}const VALID_PAGES=["dashboard","features","themes","stats","trades","community","upgrade","changelog","support","report","verify","contact","payments","subscription"];function finishLoad(e){renderUser(e),showDashboard();const t=e?.user?.ui_theme||e?.ui_theme;"light"!==t&&"dark"!==t||(document.documentElement.setAttribute("data-theme",t),localStorage.setItem("rorbit_theme",t),_syncThemeBtn(t));const n=(window.location.hash||"").replace("#","");n&&VALID_PAGES.includes(n)?navToPage(n):navToPage("dashboard"),"function"==typeof homeLoadCommunityFeed&&homeLoadCommunityFeed()}function _handleEmailVerifyToasts(){const e=new URLSearchParams(window.location.search);"1"===e.get("email_verified")&&(e.delete("email_verified"),window.history.replaceState({},"",window.location.pathname+(e.toString()?"?"+e.toString():"")),setTimeout(()=>{const e=document.createElement("div");e.textContent="✅ Email verified — 7 days Pro added to your account!",e.style.cssText="position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#134e4a;color:#34d399;border:1px solid #34d399;padding:12px 20px;border-radius:10px;font-size:13px;font-weight:700;z-index:9999;white-space:nowrap",document.body.appendChild(e),setTimeout(()=>e.remove(),5e3)},800)),e.get("email_error")&&(e.delete("email_error"),window.history.replaceState({},"",window.location.pathname+(e.toString()?"?"+e.toString():"")),setTimeout(()=>{const e=document.createElement("div");e.textContent="⚠️ Verification link expired — please request a new one.",e.style.cssText="position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#1c1917;color:#f59e0b;border:1px solid #f59e0b;padding:12px 20px;border-radius:10px;font-size:13px;font-weight:700;z-index:9999;white-space:nowrap",document.body.appendChild(e),setTimeout(()=>e.remove(),5e3)},800))}async function initDashboard(){_handleEmailVerifyToasts(),showSpinner("Checking extension…","Connecting to your dashboard");const e=await refreshActiveToken();if("no_ext"===e)return void showOverlayNoExt();if("no_auth"===e)return void showOverlayNoAuth();const t=window._rorbitSession,n=window._rorbitToken;finishLoad(t),showPinReminder(),loadCreatorPanel(n),loadReviewStatus(n),loadEmailStatus(n),"function"==typeof loadFeatureConfig&&loadFeatureConfig(),"function"==typeof ntfInit&&ntfInit();try{const e=await new Promise(e=>{chrome.runtime.sendMessage(window._extId,{type:"GET_ME"},t=>{chrome.runtime.lastError?e({ok:!1}):e(t||{ok:!1})})});if(e.ok){const t=e.data,n=t.user?.vote_count??null;window._rorbitVoteCount=n;const o=document.getElementById("stat-contrib"),r=document.getElementById("tip-votes");o&&(o.textContent=null!==n?n:"—"),r&&(r.textContent=null!==n?`${n} vote${1!==n?"s":""} cast`:"— votes cast")}}catch(e){}chrome.runtime.sendMessage(EXT_ID,{type:"GET_FEATURES"},e=>{e?.features&&(window._lastFeatureStates=e.features,restoreFeatureStates(e.features))}),chrome.runtime.sendMessage(EXT_ID,{type:"GET_MASTER_TOGGLE"},e=>{applyMasterToggle(!1!==e?.masterEnabled)}),runResellerPoll(n),getDashboardDataFromExt(n),setInterval(()=>getDashboardDataFromExt(n),6e4),startHeartbeat()}function promptConnectRoblox(){window.location.href=`${RORBIT_API}/auth/login?source=web`}function showPinReminder(){try{if(localStorage.getItem("rorbit_pin_tip_shown"))return}catch(e){}const e=document.getElementById("pin-reminder");if(e){e.style.display="flex";try{localStorage.setItem("rorbit_pin_tip_shown","1")}catch(e){}}}function dismissPinReminder(){const e=document.getElementById("pin-reminder");e&&(e.style.display="none")}function dashboardSignOut(){try{localStorage.removeItem("rorbit_token"),localStorage.removeItem("rorbit_user")}catch(e){}if(window._rorbitToken=null,window._rorbitSession=null,_heartbeatTimer&&(clearInterval(_heartbeatTimer),_heartbeatTimer=null),"undefined"!=typeof chrome&&chrome.runtime?.sendMessage){let e=EXT_IDS.length;const t=()=>{--e<=0&&showOverlayNoAuth()};
1EXT_IDS.forEach(e=>{try{chrome.runtime.sendMessage(e,{type:"SIGN_OUT"},()=>{chrome.runtime.lastError,t()})}catch(e){t()}})}else showOverlayNoAuth()}function navTo(e,t){document.querySelectorAll(".nav-item").forEach(e=>e.classList.remove("active")),e&&e.classList.add("active"),history.replaceState(null,"","#"+t);const n=document.getElementById("dash-content");if(!n)return;window._currentSection&&(window._currentSection.unmount?.(),window._currentSection=null);const o=window.DashSections?.[t];if(o){window._currentSection=o,o.mount(n);const e=window._getFeatConfigCache?.();e&&"function"==typeof window._applyFeatureConfig&&window._applyFeatureConfig(e)}}function navToPage(e){navTo(document.querySelector(`[data-nav="${e}"]`)||null,e)}function themesShowView(e){["themes-overview","themes-community-gallery","themes-creator","themes-animated"].forEach(t=>{const n=document.getElementById(t);n&&(n.style.display=t===e?"block":"none")})}function handleReportScreenshot(e){const t=e.files[0];if(!t)return;if(t.size>8388608)return alert("Screenshot is too large (max 8 MB). Try a smaller image or a cropped screenshot."),void(e.value="");const n=new FileReader;n.onload=e=>{document.getElementById("report-screenshot-img").src=e.target.result,document.getElementById("report-screenshot-preview").style.display="block",document.getElementById("report-drop-label").textContent=t.name},n.readAsDataURL(t)}function clearReportScreenshot(){document.getElementById("report-screenshot").value="",document.getElementById("report-screenshot-preview").style.display="none",document.getElementById("report-drop-label").textContent="Attach a screenshot — click to browse"}async function submitReport(){const e=(document.getElementById("report-what")||{}).value||"",t=(document.getElementById("report-where")||{}).value||"",n=(document.getElementById("report-type")||{}).value||"",o=(document.getElementById("report-email")||{}).value||"",r=(document.getElementById("report-user")||{}).value||"",a=document.querySelector('#report-form-wrap button[onclick="submitReport()"]');if(!e.trim()){const e=document.getElementById("report-what");return void(e&&(e.style.borderColor="#F87171",e.focus()))}a&&(a.disabled=!0,a.textContent="Sending…");let i=null;const s=document.getElementById("report-screenshot");if(s&&s.files[0]){const e=s.files[0];i=await new Promise(t=>{const n=new FileReader;n.onload=n=>{const o=n.target.result.split(",")[1];t({name:e.name||"screenshot.png",base64:o,type:e.type})},n.readAsDataURL(e)})}try{const s=window.getActiveToken?.()||null,l=await fetch(`${RORBIT_API}/report`,{method:"POST",headers:{"Content-Type":"application/json",...s?{Authorization:`Bearer ${s}`}:{}},body:JSON.stringify({what:e,where:t,type:n,email:o,reportedUser:r,screenshot:i})}),d=await l.json();l.ok&&d.ok?(document.getElementById("report-form-wrap").style.display="none",document.getElementById("report-success").style.display="block"):(a&&(a.disabled=!1,a.textContent="Send Report"),alert(d.error||"Something went wrong. Try emailing [email protected] directly!"))}catch{a&&(a.disabled=!1,a.textContent="Send Report"),alert("Network error — try emailing [email protected] directly!")}}function resetReport(){const e=document.getElementById("report-what"),t=document.getElementById("report-where"),n=document.getElementById("report-type"),o=document.getElementById("report-email"),r=document.getElementById("report-user"),a=document.getElementById("report-user-field");e&&(e.value="",e.style.borderColor=""),t&&(t.value=""),n&&(n.value=""),o&&(o.value=""),r&&(r.value=""),a&&(a.style.display="none"),clearReportScreenshot(),document.getElementById("report-form-wrap").style.display="block",document.getElementById("report-success").style.display="none"}function toggleTheme(){const e=document.documentElement,t="dark"===e.getAttribute("data-theme")?"light":"dark";e.setAttribute("data-theme",t),localStorage.setItem("rorbit_theme",t),_syncThemeBtn(t);const n=window.getActiveToken?.()||null;n&&fetch("https://api.rorbit.app/auth/preferences",{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify({theme:t})}).catch(()=>{})}function _syncThemeBtn(e){const t=document.getElementById("theme-icon"),n=document.getElementById("theme-label");if(!t||!n)return;const o="dark"===e;t.textContent=o?"☀️":"🌙",n.textContent=o?"LIGHT":"DARK"}function switchTab(e,t){const n=e.closest(".features-card");
1n.querySelectorAll(".tab-btn").forEach(e=>e.classList.remove("active")),n.querySelectorAll(".tab-content").forEach(e=>e.style.display="none"),e.classList.add("active"),document.getElementById("tab-"+t).style.display="block"}function switchFeatTab(e,t){const n=e.closest(".features-card");n.querySelectorAll(".tab-btn").forEach(e=>e.classList.remove("active")),n.querySelectorAll(".tab-content").forEach(e=>e.style.display="none"),e.classList.add("active"),document.getElementById("fpage-"+t).style.display="block"}function handleToggle(e){handleFeatureToggle(e)}function featureNameToKey(e){return e.toLowerCase().replace(/[^a-z0-9\s]/g,"").trim().replace(/\s+(\w)/g,(e,t)=>t.toUpperCase())}function applyMasterToggle(e){const t=e?"All features enabled on roblox.com":"All features paused",n=document.getElementById("dash-master-toggle"),o=document.getElementById("dash-master-sub"),r=document.getElementById("features-body");n&&(n.checked=e),o&&(o.textContent=t),r&&r.classList.toggle("features-body--disabled",!e);const a=document.getElementById("fpage-master-toggle"),i=document.getElementById("fpage-master-sub"),s=document.getElementById("fpage-features-body");a&&(a.checked=e),i&&(i.textContent=t),s&&s.classList.toggle("features-body--disabled",!e)}function _sendMasterToggle(e){"undefined"!=typeof chrome&&chrome.runtime&&chrome.runtime.sendMessage(EXT_ID,{type:"MASTER_TOGGLE",enabled:e},()=>{chrome.runtime.lastError&&console.warn("[ROrbit] MASTER_TOGGLE failed:",chrome.runtime.lastError.message)})}function submitReviewLink(){const e=document.getElementById("review-link-container");if(!e)return;const t=e.querySelector(".review-link-input-wrap");if(t)return void t.querySelector("input").focus();const n=document.createElement("div");n.className="review-link-input-wrap",n.style.cssText="margin-top:12px;display:flex;gap:8px;align-items:center;flex-wrap:wrap;";const o=document.createElement("input");o.type="url",o.placeholder="Paste your Chrome Web Store review URL…",o.style.cssText="flex:1;
1min-width:200px;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:8px 12px;color:var(--text);font-size:13px;outline:none;";const r=document.createElement("button");r.textContent="Submit",r.style.cssText="background:var(--violet);color:#fff;border:none;border-radius:8px;padding:8px 16px;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;";const a=document.createElement("div");a.style.cssText="width:100%;font-size:12px;color:var(--text-muted);margin-top:4px;",r.onclick=async function(){const e=o.value.trim();if(!e||!e.includes("chromewebstore.google.com"))return a.style.color="#f87171",void(a.textContent="Please paste a valid Chrome Web Store URL.");r.textContent="Submitting…",r.disabled=!0,o.disabled=!0;const t=window.getActiveToken?.()||null;if(!t)return a.style.color="#f87171",a.textContent="Please log in first.",r.disabled=!1,o.disabled=!1,void(r.textContent="Submit");try{const n=await fetch(`${RORBIT_API}/rewards/review-claim`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({review_url:e})}),i=await n.json();if(n.ok&&i.ok)return void loadReviewStatus(t);409===n.status?(a.style.color="#f59e0b",a.textContent="already_approved"===i.error?"Your claim was already approved — reward is active!":"Your claim is already under review. Check back soon."):(a.style.color="#f87171",a.textContent=i.error||"Something went wrong. Try again.",r.disabled=!1,o.disabled=!1,r.textContent="Submit")}catch(e){a.style.color="#f87171",a.textContent="Network error — please try again.",r.disabled=!1,o.disabled=!1,r.textContent="Submit"}},n.appendChild(o),n.appendChild(r),n.appendChild(a),e.appendChild(n),o.focus()}async function loadAccountSnapshot(e){try{const t=await fetch(`${RORBIT_API}/account-snapshot`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)return;const n=await t.json();if(!n.ok)return;const o=e=>null==e?"—":Number(e).toLocaleString(),r=e=>null==e?"—":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":Number(e).toLocaleString(),a=document.getElementById("stat-rap");a&&(a.textContent=r(n.totalRap));const i=document.getElementById("stat-limiteds");i&&(i.textContent=o(n.limitedCount));const s=document.getElementById("stat-rap-delta");if(s)if(null!=n.prevRap&&null!=n.totalRap){const e=n.totalRap-n.prevRap,t=e>=0?"+":"";s.textContent=t+r(e),s.style.color=e>=0?"var(--success)":"var(--danger)"}else s.textContent="—",s.style.color="";const l=document.getElementById("stat-friends"),d=document.getElementById("stat-followers"),c=document.getElementById("stat-following"),u=document.getElementById("stat-groups");if(l&&(l.textContent=o(n.friends)),d&&(d.textContent=o(n.followers)),c&&(c.textContent=o(n.following)),u&&(u.textContent=o(n.groups)),n.avatarUrl){const e=document.getElementById("stat-roblox-avatar"),t=document.getElementById("stat-roblox-avatar-fallback");e&&(e.src=n.avatarUrl,e.style.display="block",t&&(t.style.display="none"))}const m=document.getElementById("stat-premium");m&&(!0===n.hasPremium?(m.textContent="✓ Active",m.style.color="var(--success)"):!1===n.hasPremium&&(m.textContent="—",m.style.color=""));const p=document.getElementById("stat-joined");if(p&&n.joinedAt){const e=Math.floor((Date.now()-new Date(n.joinedAt))/31536e6);p.textContent=e>0?`${e}y ago`:"This year"}const y=document.getElementById("stat-lastsync");if(y){const e=new Date,t=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0");y.textContent=`${t}:${n}`}}catch(e){console.warn("Account snapshot failed:",e.message);const t=document.getElementById("stat-lastsync");t&&(t.textContent="failed")}}function refreshAccountSnapshot(){const e=document.getElementById("stat-lastsync");e&&(e.textContent="…");getDashboardDataFromExt(window.getActiveToken?.()||null)}async function runResellerPoll(e){if("undefined"!=typeof chrome&&chrome.runtime?.sendMessage&&e)try{const t=await fetch(`${RORBIT_API}/items/resellers/queue`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)return;const{items:n}=await t.json();if(!n||0===n.length)return;console.log(`[ROrbit] Reseller poll: fetching ${n.length} items via extension`);const o=[],r={};for(let e=0;e<n.length;e++){const t=n[e];await new Promise(e=>{chrome.runtime.sendMessage(EXT_ID,{type:"GET_RESELLERS",assetId:t},n=>
1{if(chrome.runtime.lastError||!n?.ok){o.push({item_id:t,lowest_price:null,count:0});const e=n?.error||chrome.runtime.lastError?.message||"no_response";r[e]=(r[e]||0)+1}else{const e=n.httpStatus||200;r[e]=(r[e]||0)+1,429!==e&&o.push({item_id:t,lowest_price:n.lowestPrice||null,count:n.count||0})}e()})}),e<n.length-1&&await new Promise(e=>setTimeout(e,1500))}const a=o.filter(e=>e.lowest_price>0).length;if(console.log(`[ROrbit] Reseller poll: ${o.length} items — ${a} with price, ${o.length-a} empty`),console.log("[ROrbit] Reseller poll: HTTP statuses from Roblox →",r),0===o.length)return;const i=await fetch(`${RORBIT_API}/items/resellers`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({results:o})});console.log(`[ROrbit] Reseller poll: POST /items/resellers → ${i.status}`)}catch(e){console.warn("[ROrbit] Reseller poll failed:",e.message)}}function getDashboardDataFromExt(e){if("undefined"==typeof chrome||!chrome.runtime?.sendMessage)return;const t=e=>null==e?"—":Number(e).toLocaleString(),n=e=>null==e?"—":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":Number(e).toLocaleString();try{const n=_session?.user?.robloxId||null;chrome.runtime.sendMessage(EXT_ID,{type:"GET_DASHBOARD_DATA",robloxId:n},async n=>{if(chrome.runtime.lastError)return;if("account_mismatch"===n?.error)return console.warn("[ROrbit] Account mismatch — dashboard linked to",n.linkedId,"but Roblox session is",n.activeId),void dashboardSignOut();if(!n?.ok)return;const o=e=>document.getElementById(e);if(o("stat-followers")&&(o("stat-followers").textContent=t(n.followers)),o("stat-following")&&(o("stat-following").textContent=t(n.following)),o("stat-friends")&&(o("stat-friends").textContent=t(n.friends)),o("stat-groups")&&(o("stat-groups").textContent=t(n.groups)),n.avatarUrl){const e=o("stat-roblox-avatar"),t=o("stat-roblox-avatar-fallback");e&&(e.src=n.avatarUrl,e.style.display="block"),t&&(t.style.display="none")}if(n.headshotUrl){const e=o("status-avatar");e&&(e.textContent="",e.style.backgroundImage=`url('${n.headshotUrl}'), var(--gradient)`,e.style.backgroundSize="cover",e.style.backgroundPosition="center")}if(o("stat-presence-row")&&null!=n.presenceType){const e={0:"Offline",1:"Online",2:"In Game",3:"In Studio"},t={0:"var(--text-dim)",1:"var(--success)",2:"#3B82F6",3:"var(--warning)"};o("stat-presence-row").style.display="block",o("stat-presence")&&(o("stat-presence").textContent=e[n.presenceType]??"—"),o("stat-presence-dot")&&(o("stat-presence-dot").style.color=t[n.presenceType]??"var(--text-dim)"),2===n.presenceType&&n.currentGame&&o("stat-current-game")&&(o("stat-current-game").textContent=n.currentGame,o("stat-current-game-row").style.display="block")}if(o("stat-premium")&&(!0===n.hasPremium?(o("stat-premium").textContent="✓ Active",o("stat-premium").style.color="var(--success)"):!1===n.hasPremium&&(o("stat-premium").textContent="—",o("stat-premium").style.color="")),o("stat-joined")&&n.joinedAt){const e=Math.floor((Date.now()-new Date(n.joinedAt))/31536e6);o("stat-joined").textContent=e>0?`${e}y ago`:"This year"}if(o("stat-incoming")&&(o("stat-incoming").textContent=t(n.tradesInbound)),o("stat-outbound")&&(o("stat-outbound").textContent=t(n.tradesOutbound)),o("stat-totaltrades")&&(o("stat-totaltrades").textContent=t(n.tradesCompleted)),o("stat-lasttrade")&&n.lastTradeAt){const e=new Date(n.lastTradeAt);o("stat-lasttrade").textContent=e.toLocaleDateString("en-US",{month:"short",day:"numeric"})}if(o("stat-lastsync")){const e=new Date;o("stat-lastsync").textContent=String(e.getHours()).padStart(2,"0")+":"+String(e.getMinutes()).padStart(2,"0")}if(e)try{await fetch(`${RORBIT_API}/account-snapshot/ext`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({avatarUrl:n.avatarUrl,friends:n.friends,followers:n.followers,following:n.following,groups:n.groups,hasPremium:n.hasPremium,joinedAt:n.joinedAt,tradesInbound:n.tradesInbound,tradesOutbound:n.tradesOutbound,tradesCompleted:n.tradesCompleted,lastTradeAt:n.lastTradeAt,presenceType:n.presenceType,currentGame:n.currentGame,friendRequests:n.friendRequests})})}catch(e){}})}catch(e){}try{chrome.runtime.sendMessage(EXT_ID,{type:"GET_INVENTORY_DATA"},async o=>{if(chrome.runtime.lastError||!o?.ok)return;const r=e=>document.getElementById(e);if(r("stat-rap")&&(r("stat-rap").textContent=n(o.totalRap)),r("stat-limiteds")&&(r("stat-limiteds").textContent=t(o.limitedCount)),e)try{const t=await fetch(`${RORBIT_API}
1/account-snapshot/rap`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({totalRap:o.totalRap,limitedCount:o.limitedCount})}),a=await t.json();if(null!=a.prevRap&&r("stat-rap-delta")){const e=o.totalRap-a.prevRap,t=e>=0?"+":"";r("stat-rap-delta").textContent=t+n(e),r("stat-rap-delta").style.color=e>=0?"var(--success)":"var(--danger)"}}catch(e){}})}catch(e){}}async function loadReviewStatus(e){const t=document.getElementById("review-state-form"),n=document.getElementById("review-state-pending"),o=document.getElementById("review-state-approved");if(t)if(e)try{const t=await fetch(`${RORBIT_API}/rewards/review-status`,{headers:{Authorization:`Bearer ${e}`}}),n=(await t.json()).claim;if(n&&"rejected"!==n.status)if("pending"===n.status){r("pending");const e=document.getElementById("review-pending-url");e&&n.review_url&&(e.innerHTML=`Submitted URL: <a href="${n.review_url}" target="_blank" rel="noopener" style="color:var(--violet-light);word-break:break-all">${n.review_url}</a>`)}else"approved"===n.status?r("approved"):r("form");else if(r("form"),"rejected"===n?.status){const e=document.getElementById("review-rejected-note");e&&(e.style.display="block")}}catch(e){r("form")}else r("form");function r(e){t.style.display="form"===e?"block":"none",n.style.display="pending"===e?"block":"none",o.style.display="approved"===e?"block":"none"}}async function loadEmailStatus(e){const t=document.getElementById("email-state-form"),n=document.getElementById("email-state-pending"),o=document.getElementById("email-state-verified"),r=document.getElementById("email-state-nologin");if(t)if(e){window._emailToken=e;try{const t=await fetch(`${RORBIT_API}/rewards/email-status`,{headers:{Authorization:`Bearer ${e}`}}),n=(await t.json()).record;if(!n)return void a("form");if(n.verified){a("verified");const e=document.getElementById("email-verified-address");e&&(e.textContent=n.email)}else{a("pending");const e=document.getElementById("email-pending-address");e&&(e.textContent=n.email)}}catch(e){a("form")}}else a("nologin");function a(e){[t,n,o,r].forEach(e=>{e&&(e.style.display="none")});const a={form:t,pending:n,verified:o,nologin:r}[e];a&&(a.style.display="block")}}function showEmailInput(e=!1){const t=document.getElementById("email-form-wrap");t&&(e||!t.querySelector("input")?(document.getElementById("email-state-form").style.display="block",document.getElementById("email-state-pending").style.display="none",t.innerHTML='\n      <div style="margin-top:10px;display:flex;gap:8px;flex-wrap:wrap;align-items:center">\n        <input id="email-input" type="email" placeholder="[email protected]"\n          style="flex:1;min-width:180px;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:8px 12px;color:var(--text);font-size:13px;outline:none"/>\n        <button id="email-submit-btn" data-pd="submitEmail"\n          style="padding:8px 16px;background:linear-gradient(135deg,#7c3aed,#2563eb);color:#fff;border:none;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer">\n          Send Link\n        </button>\n      </div>\n      <div id="email-msg" style="font-size:12px;margin-top:8px;min-height:16px"></div>\n    ',document.getElementById("email-input").focus()):t.querySelector("input").focus())}async function submitEmail(){const e=document.getElementById("email-input"),t=document.getElementById("email-submit-btn"),n=document.getElementById("email-msg"),o=window._emailToken;if(!e||!t||!o)return;const r=e.value.trim();if(!r||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r))return n.style.color="#f87171",void(n.textContent="Enter a valid email address.");t.disabled=!0,t.textContent="Sending…";try{const e=await fetch(`${RORBIT_API}/rewards/email-submit`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify({email:r})}),a=await e.json();if(e.ok&&a.ok){document.getElementById("email-state-form").style.display="none",document.getElementById("email-state-pending").style.display="block";const e=document.getElementById("email-pending-address");e&&(e.textContent=r)}else 409===e.status&&"already_verified"===a.error?loadEmailStatus(o):(n.style.color="#f87171",n.textContent=a.message||a.error||"Something went wrong. Try again.",t.disabled=!1,t.textContent="Send Link")}catch(e){n.style.color="#f87171",n.textContent="Network error — please try again.",t.disabled=!1,t.textContent="Send Link"}}async function unsubscribeEmail(){if(!confirm("Are you sure you want to remove your email? 👀\n\nHeads up — we're working on using your email to log into ROrbit directly (no Roblox needed). If you remove it now, you'll need to re-add it later.\n\nAny rewards you already earned stay on your account either way."))return;const e=window._emailToken;e&&(await fetch(`${RORBIT_API}/rewards/email-unsubscribe`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`}}),loadEmailStatus(e))}async function loadCreatorPanel(e){const t=document.getElementById("creator-loading"),n=document.getElementById("creator-enrolled"),o=document.getElementById("creator-claim"),r=document.getElementById("creator-nologin");
1function a(e){[t,n,o,r].forEach(e=>{e&&(e.style.display="none")}),e&&(e.style.display="block")}if(e)try{const t=await fetch(`${RORBIT_API}/creator/me`,{headers:{Authorization:`Bearer ${e}`}}),r=await t.json();if(!r.creator)return void a(o);const i=r.creator,s=(e,t)=>{const n=document.getElementById(e);n&&(n.textContent=t)};s("comm-referrals",i.confirmedCount),s("comm-pending",i.referralCount-i.confirmedCount),s("comm-tier",i.label||"Free"),s("comm-next-milestone",getNextMilestone(i.confirmedCount)),renderMilestoneLadder("milestone-ladder",i.confirmedCount),s("promo-code",i.code);const l=document.getElementById("creator-link-display");l&&(l.textContent=i.link),window._creatorLink=i.link,a(n)}catch(e){a(r)}else a(r)}async function claimCreatorCode(){const e=document.getElementById("creator-code-input"),t=document.getElementById("creator-claim-msg"),n=(e?.value||"").toUpperCase().trim();if(!n||!/^[A-Z0-9]{3,12}$/.test(n))return t.textContent="⚠ Code must be 3–12 letters and numbers only.",void(t.style.color="#F87171");const o=window.getActiveToken?.()||null;if(o){t.textContent="Claiming…",t.style.color="var(--text-muted)";try{const e=await fetch(`${RORBIT_API}/creator/claim-code`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify({code:n})}),r=await e.json();e.ok&&r.ok?(t.textContent="✓ Code claimed! Reloading…",t.style.color="#34D399",setTimeout(()=>loadCreatorPanel(o),800)):(t.textContent=r.error||"Something went wrong. Try another code.",t.style.color="#F87171")}catch(e){t.textContent="Network error — please try again.",t.style.color="#F87171"}}else t.textContent="Please log in first."}function copyCode(){const e=window._creatorLink||document.getElementById("promo-code")?.textContent||"";e&&"——————"!==e&&navigator.clipboard.writeText(e).then(()=>{const e=document.querySelector(".copy-btn");e&&(e.textContent="Copied!",setTimeout(()=>e.textContent="Copy Link",1500))})}async function loadDiscordOnline(){try{let e=null;try{const t=await fetch("https://discord.com/api/guilds/1497558055011881024/widget.json");if(t.ok){e=(await t.json()).presence_count||null}}catch(e){}if(!e){const t=await fetch("https://discord.com/api/v9/invites/NRehS6dgHv?with_counts=true");if(t.ok){e=(await t.json()).approximate_presence_count||null}}if(!e)return;const t=e.toLocaleString(),n=document.getElementById("discord-online"),o=document.getElementById("discord-online-count");n&&o&&(o.textContent=t,n.style.display="inline-flex");const r=document.getElementById("discord-online-card"),a=document.getElementById("discord-online-card-count");r&&a&&(a.textContent=t,r.style.display="inline-flex")}catch(e){}}async function loadStatusDot(){const e=document.getElementById("qa-status-dot");if(!e)return;const t=(e,t=6e3)=>{const n=new AbortController,o=setTimeout(()=>n.abort(),t);return fetch(e,{mode:"no-cors",signal:n.signal,cache:"no-store"}).then(()=>(clearTimeout(o),!0)).catch(()=>!1)},[n,o]=await Promise.all([t("https://rorbit.app/"),t("https://chromewebstore.google.com/detail/rorbit/cpckbfgdbloljipohjmjomdgmieoabbf")]);e.style.background=n&&o?"#34D399":"#F87171"}document.addEventListener("DOMContentLoaded",()=>{_syncThemeBtn(document.documentElement.getAttribute("data-theme")||"dark")}),document.addEventListener("DOMContentLoaded",()=>{["dash-master-toggle","fpage-master-toggle"].forEach(e=>{const t=document.getElementById(e);t&&t.addEventListener("change",()=>{const e=t.checked;applyMasterToggle(e),_sendMasterToggle(e)})})}),window.testReseller=function(e){"undefined"!=typeof chrome?chrome.runtime.sendMessage(EXT_ID,{type:"GET_RESELLERS",assetId:e},t=>{chrome.runtime.lastError?console.error("Extension error:",chrome.runtime.lastError.message):(console.log(`[testReseller] assetId=${e}`,t),console.log(`  httpStatus: ${t?.httpStatus}  count: ${t?.count}  lowestPrice: ${t?.lowestPrice}`))}):console.warn("No chrome API")};const FEAT_TAG_STYLES={live:"background:rgba(16,185,129,.13);color:#34d399;border:1px solid rgba(16,185,129,.3)",new:"background:rgba(6,182,212,.13);color:#22d3ee;border:1px solid rgba(6,182,212,.3)",beta:"background:rgba(139,92,246,.13);color:#c4b5fd;border:1px solid rgba(139,92,246,.3)",coming_soon:"background:rgba(37,99,235,.13);color:#60a5fa;border:1px solid rgba(37,99,235,.3)",in_construction:"background:rgba(234,88,12,.13);color:#fb923c;border:1px solid rgba(234,88,12,.3)"},FEAT_TAG_LABELS={live:"LIVE",new:"NEW",beta:"BETA",coming_soon:"COMING SOON",in_construction:"IN CONSTRUCTION"},FEAT_TIER_MAP={pro:["violet","PRO"],premium:["gold","PREMIUM"]},TIER_ORDER={free:0,pro:1,premium:2,admin:3},_featOriginalOnclick={};function buildFeatTags(e){const t=[];if(FEAT_TIER_MAP[e.min_tier]){const[n,o]=FEAT_TIER_MAP[e.min_tier];t.push(`<span class="stub-tag ${n}">${o}</span>`)}return e.status_tag&&FEAT_TAG_STYLES[e.status_tag]&&t.push(`<span class="stub-tag" style="${FEAT_TAG_STYLES[e.status_tag]}">${FEAT_TAG_LABELS[e.status_tag]}</span>`),t.join("")}
1function hasFeatureAccess(e){const t=!!window._rorbitIsAdmin,n=window._rorbitTier||"free",o=parseInt(window._rorbitUserId||0);if("disabled"!==e.state&&o&&(e.allowed_ids||[]).includes(o))return!0;if("disabled"===e.state)return!1;if("preview"===e.state)return t;return(t?3:TIER_ORDER[n]??0)>=(TIER_ORDER[e.min_tier]??0)}function showFeatureLocked(e){let t=document.getElementById("feat-locked-toast");t||(t=document.createElement("div"),t.id="feat-locked-toast",t.style.cssText=["position:fixed","bottom:32px","left:50%","transform:translateX(-50%)","background:#1C1C27","border:1px solid rgba(124,58,237,0.45)","color:#e2e8f0","padding:11px 22px","border-radius:10px","font-size:13px","font-weight:600","z-index:9999","pointer-events:none","opacity:0","transition:opacity .2s","white-space:nowrap","box-shadow:0 4px 24px rgba(0,0,0,.4)"].join(";"),document.body.appendChild(t)),t.textContent=e,t.style.opacity="1",clearTimeout(t._t),t._t=setTimeout(()=>{t.style.opacity="0"},2800)}function getLockMessage(e){if("disabled"===e.state)return"This feature is currently unavailable.";if("preview"===e.state)return"This feature is in preview — admin access only.";const t={pro:"Pro",premium:"Premium",admin:"Admin"}[e.min_tier];return t?`This feature requires ${t}. Upgrade to access it.`:"Access restricted."}let _featConfigCache=null;function applyFeatureConfig(e){_featConfigCache=e,e.forEach(e=>{const t=document.querySelector(`[data-feature="${e.id}"]`);if(!t)return;_featOriginalOnclick[e.id]||(_featOriginalOnclick[e.id]=t.onclick||null),t.style.display=!1===e.visible?"none":"",e.grayed_out?(t.style.opacity="0.42",t.style.filter="grayscale(25%)"):(t.style.opacity="",t.style.filter=""),hasFeatureAccess(e)?(t.onclick=_featOriginalOnclick[e.id],t.style.cursor=t.onclick?"pointer":""):(t.onclick=t=>{t.preventDefault(),t.stopPropagation(),showFeatureLocked(getLockMessage(e))},t.style.cursor="pointer"),t.querySelectorAll(".stub-tag, .feat-tags-row").forEach(e=>e.remove());const n=buildFeatTags(e);n&&t.insertAdjacentHTML("beforeend",`<div class="feat-tags-row" style="display:flex;flex-wrap:wrap;gap:6px;margin-top:4px">${n}</div>`)})}async function loadFeatureConfig(){try{const e=await fetch("https://api.rorbit.app/api/features"),t=await e.json();t.ok&&Array.isArray(t.features)&&applyFeatureConfig(t.features)}catch{}}window._applyFeatureConfig=function(e){applyFeatureConfig(e)},window._getFeatConfigCache=function(){return _featConfigCache},window.addEventListener("DOMContentLoaded",()=>{"function"==typeof prefetchGlobalConfig&&prefetchGlobalConfig(),initDashboard(),loadDiscordOnline(),loadStatusDot(),loadFeatureConfig(),setInterval(loadFeatureConfig,3e4)}),function(){function e(){function e(e){return document.getElementById(e)}function t(e,t){e&&e.addEventListener("click",t)}document.querySelectorAll(".nav-item[data-nav]").forEach(function(e){e.addEventListener("click",function(){navTo(e,e.getAttribute("data-nav"))})}),t(e("nav-signout"),function(){dashboardSignOut()}),t(e("welcome-signin-btn"),function(){promptConnectRoblox()}),t(e("ntf-btn"),function(){ntfToggle()}),t(e("link-reload"),function(e){e.preventDefault(),location.reload()}),t(e("link-init-dashboard"),function(e){e.preventDefault(),initDashboard()}),t(document.querySelector(".pin-reminder-close"),function(){dismissPinReminder()}),t(document.querySelector(".ntf-read-all"),function(){ntfMarkAllRead()}),t(document.querySelector(".theme-toggle"),function(){toggleTheme()})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}(),document.addEventListener("click",function(e){var t=e.target&&e.target.closest&&e.target.closest("[data-pd]");if(t){var n=t.getAttribute("data-pd");"navUpgrade"===n?navToPage("upgrade"):"submitEmail"===n&&submitEmail()}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.