most-box 0.3.0 → 0.3.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 +41 -21
- package/electron/main.js +18 -1
- package/electron/preload.cjs +8 -0
- package/out/admin/index.html +0 -0
- package/out/app/index.html +0 -0
- package/out/assets/AccountMenu-NjOgag0d.js +1 -0
- package/out/assets/FilePreviewOverlay-CZp6F1s_.js +1 -0
- package/out/assets/MarketingHeader-7B-OT2XX.js +1 -0
- package/out/assets/MarketingLayout-CyiSCygk.js +1 -0
- package/out/assets/{MilkdownEditor-BTq9bDAf.js → MilkdownEditor-WedhCoFH.js} +1 -1
- package/out/assets/OpenSidebarButton-BoSmO8CY.js +1 -0
- package/out/assets/SidebarHomeLink-CkhGDvZ8.js +1 -0
- package/out/assets/arrow-right-DUxAoZqb.js +1 -0
- package/out/assets/{ui-BpDGD3IR.js → avatar-BZwHW4ll.js} +2 -2
- package/out/assets/circle-alert-DSZ0bG_3.js +1 -0
- package/out/assets/copy-CK7HMulu.js +1 -0
- package/out/assets/download-Q1uCiwif.js +1 -0
- package/out/assets/downloadValidation-Ch966YTl.js +1 -0
- package/out/assets/external-link-DGzNJOqQ.js +1 -0
- package/out/assets/file-text-C3v0L_lQ.js +1 -0
- package/out/assets/folder-CwtLO09O.js +1 -0
- package/out/assets/hard-drive-B2V5USzR.js +1 -0
- package/out/assets/i18n-DZaOYCSO.js +1 -0
- package/out/assets/index-CBkHUp3F.css +1 -0
- package/out/assets/index-DluhgSHX.js +31 -0
- package/out/assets/index.lazy-B5TYRvFJ.js +1 -0
- package/out/assets/index.lazy-BeDctVci.js +1 -0
- package/out/assets/index.lazy-BjmAkVtV.js +1 -0
- package/out/assets/index.lazy-CHJbzlK6.js +1 -0
- package/out/assets/index.lazy-CITrkWMQ.js +1 -0
- package/out/assets/index.lazy-CTGE5fUt.js +2 -0
- package/out/assets/index.lazy-CUxcXUMy.js +2 -0
- package/out/assets/index.lazy-D84xQtPb.js +3 -0
- package/out/assets/index.lazy-DRqAgqpV.js +1 -0
- package/out/assets/index.lazy-DSAmY1q_.js +1 -0
- package/out/assets/index.lazy-DvbVQRSL.js +1 -0
- package/out/assets/index.lazy-gAJi-rJV.js +1 -0
- package/out/assets/index.lazy-rzyMd-Gz.js +1 -0
- package/out/assets/key-round-Dn5tud-4.js +1 -0
- package/out/assets/loader-CLoDCtNy.js +1 -0
- package/out/assets/lock-BEWKuIqK.js +1 -0
- package/out/assets/message-square-C8ZiYztG.js +1 -0
- package/out/assets/mp-CGBtY36n.js +1 -0
- package/out/assets/music-BsTA8b_M.js +1 -0
- package/out/assets/notebook-pen-DgWzxf2y.js +1 -0
- package/out/assets/play-CVkbAJJU.js +1 -0
- package/out/assets/plus-D1kCYb8G.js +1 -0
- package/out/assets/save-X5c7jlCg.js +1 -0
- package/out/assets/search-DAV9vDOq.js +1 -0
- package/out/assets/send-C5JjYo-A.js +1 -0
- package/out/assets/shield-check-DuD6OLde.js +1 -0
- package/out/assets/smartphone-gVFruyjO.js +1 -0
- package/out/assets/trash-2-CE-3Dc63.js +1 -0
- package/out/assets/triangle-alert-DnOxsFpB.js +1 -0
- package/out/assets/upload-CsnBv3pd.js +1 -0
- package/out/assets/{useChannelMessages-DOaWHdAP.js → useChannelMessages-Bs_RWgO4.js} +1 -1
- package/out/assets/useGameRoom-BxDxm3rp.js +1 -0
- package/out/assets/userProfile-UphvP_bG.js +1 -0
- package/out/assets/wallet-VDaoXwjI.js +1 -0
- package/out/assets/wifi-DfWbmlGE.js +1 -0
- package/out/chat/index.html +0 -0
- package/out/chat/join/index.html +0 -0
- package/out/download/index.html +2 -2
- package/out/game/gandengyan/index.html +0 -0
- package/out/game/index.html +0 -0
- package/out/game/zhajinhua/index.html +0 -0
- package/out/index.html +2 -2
- package/out/note/index.html +0 -0
- package/out/ping/index.html +2 -2
- package/out/profile/index.html +0 -0
- package/out/web3/index.html +0 -0
- package/package.json +2 -5
- package/server/src/http/app.js +2 -0
- package/server/src/http/routePolicy.js +1 -0
- package/server/src/http/routes/noteVaultRoutes.js +85 -0
- package/server/src/utils/noteVault.js +327 -0
- package/electron/preload.js +0 -6
- package/out/assets/FilePreviewOverlay-CM5IqnZD.js +0 -1
- package/out/assets/LanguageToggle-CSQtRZ3A.js +0 -1
- package/out/assets/MarketingHeader-B45AaM29.js +0 -1
- package/out/assets/MarketingLayout-A00pEOa2.js +0 -1
- package/out/assets/MarketingThemeToggle-CIKP8x9W.js +0 -1
- package/out/assets/OpenSidebarButton-D8qfUGzU.js +0 -1
- package/out/assets/SidebarAccount-_RBE5K_o.js +0 -1
- package/out/assets/SidebarHomeLink-qMFEGjZt.js +0 -1
- package/out/assets/arrow-right-BU9c_SL4.js +0 -1
- package/out/assets/circle-alert-iuHzciph.js +0 -1
- package/out/assets/copy-DEzFUzeX.js +0 -1
- package/out/assets/download-jEPn2njL.js +0 -1
- package/out/assets/downloadValidation-CSXwoQKW.js +0 -1
- package/out/assets/external-link-BFaoZeK0.js +0 -1
- package/out/assets/file-text-DPA1riJ_.js +0 -1
- package/out/assets/folder-Cfgc70_F.js +0 -1
- package/out/assets/hard-drive-Dar_AZEq.js +0 -1
- package/out/assets/i18n-NjvOSuV6.js +0 -1
- package/out/assets/index-BHZhApbo.css +0 -1
- package/out/assets/index-C-_ZwxuN.js +0 -31
- package/out/assets/index.lazy-0YYV0CR3.js +0 -1
- package/out/assets/index.lazy-BTYGr9Vb.js +0 -1
- package/out/assets/index.lazy-BVAtQtTa.js +0 -3
- package/out/assets/index.lazy-BbdLA2L-.js +0 -1
- package/out/assets/index.lazy-CbiLtziY.js +0 -1
- package/out/assets/index.lazy-CcEdBg3i.js +0 -2
- package/out/assets/index.lazy-CePHsLXG.js +0 -1
- package/out/assets/index.lazy-DG_3_VdF.js +0 -1
- package/out/assets/index.lazy-DR0rWEWZ.js +0 -2
- package/out/assets/index.lazy-DSyTSCJD.js +0 -1
- package/out/assets/index.lazy-DUhsuPLv.js +0 -1
- package/out/assets/index.lazy-DVnhWbzH.js +0 -1
- package/out/assets/index.lazy-DZpkg1DJ.js +0 -1
- package/out/assets/key-round-DNcpSuMw.js +0 -1
- package/out/assets/loader-BXQtdens.js +0 -1
- package/out/assets/lock-CLIE8cct.js +0 -1
- package/out/assets/message-square-Dp09WY1I.js +0 -1
- package/out/assets/mp-B6kdA94c.js +0 -1
- package/out/assets/music-B19Tg557.js +0 -1
- package/out/assets/notebook-pen-C8TlK5sB.js +0 -1
- package/out/assets/play-B-BjsTZz.js +0 -1
- package/out/assets/plus-4hygj-1Z.js +0 -1
- package/out/assets/save-BjrbPwhJ.js +0 -1
- package/out/assets/search-DSkiWdvX.js +0 -1
- package/out/assets/send-BL4d5iOt.js +0 -1
- package/out/assets/shield-check-DzDuWO8r.js +0 -1
- package/out/assets/smartphone-tRRFFO0a.js +0 -1
- package/out/assets/trash-2-V12tJ8lI.js +0 -1
- package/out/assets/triangle-alert-DGWc8ZHu.js +0 -1
- package/out/assets/upload-CoCptKya.js +0 -1
- package/out/assets/useGameRoom-hHkV65ii.js +0 -1
- package/out/assets/userProfile-DwZip0Dt.js +0 -1
- package/out/assets/wallet-T7ONZ3Kg.js +0 -1
- package/out/assets/wifi-Bgo8eHY0.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{R as r,S as i,T as a,f as o,g as s,m as c,tt as l,w as u,z as d}from"./avatar-BZwHW4ll.js";import{a as f,i as p,n as m}from"./i18n-DZaOYCSO.js";import{a as h}from"./AccountMenu-NjOgag0d.js";import{t as g}from"./circle-alert-DSZ0bG_3.js";import{t as _}from"./key-round-Dn5tud-4.js";import{n as v,t as y}from"./SidebarHomeLink-CkhGDvZ8.js";import{l as b}from"./index-DluhgSHX.js";import{i as x,t as S}from"./userProfile-UphvP_bG.js";var C=t(e(),1),w=[{name:`node_url`,required:!1,descriptionKey:`chatJoin.field.nodeUrl`},{name:`node_invite`,required:!1,descriptionKey:`chatJoin.field.nodeInvite`},{name:`uid`,required:!0,descriptionKey:`chatJoin.field.uid`},{name:`identity`,required:!1,descriptionKey:`chatJoin.field.identity`},{name:`logo`,required:!1,descriptionKey:`chatJoin.field.logo`},{name:`avatar`,required:!1,descriptionKey:`chatJoin.field.avatar`},{name:`name`,required:!1,descriptionKey:`chatJoin.field.name`},{name:`locale`,required:!1,descriptionKey:`chatJoin.field.locale`},{name:`channels[].id`,required:!0,descriptionKey:`chatJoin.field.channelId`},{name:`channels[].name`,required:!1,descriptionKey:`chatJoin.field.channelName`}];function T(e){let t=typeof e==`string`?e.trim():e;return m(t)?t:void 0}function E(e){return String(e||``).trim().replace(/\/+$/,``)}function D(e){return String(e||``).trim()}function O({inviteNodeUrl:e,inviteNodeInvite:t,hasBackend:n,activeBackendUrl:r,activeRemoteUrl:i,activeRemoteInvite:a}){let o=E(e),s=E(i),c=E(r);return!!o&&!!s&&n===!0&&c===s&&s===o&&D(a)===D(t)}function k(e){return!!E(e.inviteNodeUrl)&&!O(e)}var A=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Crect width="64" height="64" rx="16" fill="%232f7dd1"/%3E%3Ccircle cx="32" cy="25" r="11" fill="%23f8fbff"/%3E%3Cpath d="M14 56c3-12 12-18 18-18s15 6 18 18" fill="%23f8fbff"/%3E%3C/svg%3E`,j=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Crect width="64" height="64" rx="16" fill="%230f9f7a"/%3E%3Cpath d="M18 20h28v22H18z" rx="6" fill="%23f7fff9"/%3E%3Ccircle cx="27" cy="31" r="3" fill="%230f9f7a"/%3E%3Ccircle cx="37" cy="31" r="3" fill="%230f9f7a"/%3E%3Cpath d="M29 39h6" stroke="%230f9f7a" stroke-width="4" stroke-linecap="round"/%3E%3Cpath d="M32 12v8" stroke="%23f7fff9" stroke-width="5" stroke-linecap="round"/%3E%3C/svg%3E`,M=Object.freeze({id:`chatjoin_support`,name:`User / Service 测试频道`}),N=Object.freeze([Object.freeze({uid:`user`,identity:`user`,name:`测试用户`,avatar:A}),Object.freeze({uid:`service`,identity:`service`,name:`测试客服`,avatar:j})]),P=Object.freeze(N.map(e=>Object.freeze({locale:`zh-CN`,uid:e.uid,identity:e.identity,avatar:e.avatar,name:e.name,channels:[M]})));function F(e){let t=String(e||``).trim();return P.find(e=>e.uid===t)||null}function I(e){return JSON.stringify(e,null,2)}var L=n(),R=`0x955fe80bdb8312165471fcacd6a8f83df88a770dda6f38657ca4e62ec28d5b54`,z=50,B=`https://api.most.box`;function V(e){try{return JSON.parse(e)}catch{return null}}function H(e){return typeof e==`string`?V(e):e}function U(e,t){return t===null?e:JSON.stringify(t,null,2)}function W(e,t,n){if(t&&typeof t==`object`&&`error`in t){let e=t.error;if(typeof e==`string`)return e}return e||n}function G(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function K(e){return typeof e==`string`?e.trim():``}function q(e){let t=K(e);return t===`user`||t===`service`||t===`service_ai`?t:void 0}function J(e){let t=H(e);if(!G(t))return null;let n=K(t.uid),r=(Array.isArray(t.channels)?t.channels:[]).filter(G).map(e=>({id:K(e.id),name:K(e.name)||void 0})).filter(e=>e.id);return!n||r.length===0?null:{node_url:K(t.node_url)||void 0,node_invite:K(t.node_invite)||void 0,locale:T(t.locale),uid:n,identity:q(t.identity),logo:K(t.logo)||void 0,avatar:K(t.avatar)||void 0,name:K(t.name)||void 0,channels:r}}function Y(e){return`/chat?channel=${encodeURIComponent(e)}`}function X(e){return String(e||``).trim().slice(0,z)}function Z(){let{t:e,setLocale:t}=f(),n=b({select:e=>e.searchStr}),{token:l,pub:m,fixture:T}=(0,C.useMemo)(()=>{let e=new URLSearchParams(n);return{token:e.get(`token`)||``,pub:e.get(`pub`)||``,fixture:e.get(`fixture`)||``}},[n]),E=o(e=>e.hasBackend),D=r(e=>e.setUserIdentity),[O,A]=(0,C.useState)(``),[j,M]=(0,C.useState)(``),[N,P]=(0,C.useState)(!0),[z,H]=(0,C.useState)(``),G=(0,C.useRef)(``);return(0,C.useEffect)(()=>{let n=F(T);if(T&&!n){M(e(`chatJoin.error.unknownFixture`,{fixture:T})),P(!1);return}if(!n&&!l){M(e(`chatJoin.error.missingToken`)),P(!1);return}if(!n&&!m){M(e(`chatJoin.error.missingPub`)),P(!1);return}if(E===null){H(e(`chatJoin.status.checkingBackend`));return}let r=n?`fixture:${T}`:`${l}:${m}`;if(G.current===r)return;G.current=r;async function f(n){let r=(t,r)=>n.locale?p(t,n.locale,r):e(t,r);n.locale&&t(n.locale);let l=a(),f=u(),m=i();if(k({inviteNodeUrl:n.node_url,inviteNodeInvite:n.node_invite,hasBackend:E,activeBackendUrl:m,activeRemoteUrl:l,activeRemoteInvite:f})){if(H(r(`chatJoin.status.connectingRemote`)),!(await c({url:n.node_url,invite:n.node_invite||``})).ok)throw Error(r(`chatJoin.error.remoteConnectFailed`));s({url:n.node_url,invite:n.node_invite||``}),o.setState({hasBackend:!0})}else if(!E)throw Error(r(`chatJoin.error.noBackend`));H(r(`chatJoin.status.signingIn`));let h=d(n.uid,``),g={...h,identity:n.identity,displayName:n.name||h.displayName,logo:n.logo,avatar:n.avatar};D(g),H(r(`chatJoin.status.joiningChannel`));let _=``;for(let e of n.channels){let t=await x.createChannel(e.id,`public`,S(g)),n=t.channelKey||t.key||e.id;_||=n;let r=X(e.name);r&&await x.setChannelRemark(n,r)}let v=n.channels[0];H(r(`chatJoin.status.openingChannel`)),window.location.href=Y(_||v.id)}async function h(){try{if(n){H(e(`chatJoin.status.loadingFixture`,{name:n.name||T})),A(I(n)),await f(n);return}H(e(`chatJoin.status.decryptingInvite`));let t=await fetch(`${B}/api/chat.join.decrypt`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:l,pub:m})}),r=await t.text(),i=V(r);if(!t.ok)M(W(r,i,e(`chatJoin.error.decrypt`)));else{A(U(r,i));let t=J(i);if(!t){M(e(`chatJoin.error.invalidInvite`));return}await f(t)}}catch(t){M(e(`chatJoin.error.request`,{message:t instanceof Error?t.message:String(t)}))}finally{P(!1)}}h()},[T,E,m,t,D,e,l]),(0,L.jsx)(v,{sidebar:()=>(0,L.jsx)(y,{}),headerTitle:(0,L.jsx)(`h2`,{className:`header-title`,children:e(`chatJoin.title`)}),children:(0,L.jsx)(`div`,{className:`chat-join-container`,children:(0,L.jsxs)(`div`,{className:`chat-join-panel`,children:[N?(0,L.jsxs)(`div`,{className:`chat-join-loading`,children:[(0,L.jsx)(_,{size:32}),(0,L.jsx)(`p`,{children:z||e(`chatJoin.status.decrypting`)})]}):j?(0,L.jsxs)(`div`,{className:`chat-join-error`,children:[(0,L.jsx)(g,{size:32}),(0,L.jsx)(`p`,{children:j}),z&&(0,L.jsx)(`p`,{className:`chat-join-status`,children:z}),O&&(0,L.jsx)(`pre`,{className:`chat-join-result`,translate:`no`,children:O})]}):(0,L.jsxs)(`div`,{className:`chat-join-success`,children:[(0,L.jsx)(h,{size:32}),(0,L.jsx)(`p`,{children:z||e(`chatJoin.status.decryptSuccess`)}),(0,L.jsx)(`pre`,{className:`chat-join-result`,translate:`no`,children:O})]}),(0,L.jsxs)(`section`,{className:`chat-join-spec`,"aria-labelledby":`chat-join-spec-title`,children:[(0,L.jsxs)(`div`,{className:`chat-join-helper-title`,children:[(0,L.jsx)(_,{size:18}),(0,L.jsx)(`h3`,{id:`chat-join-spec-title`,children:e(`chatJoin.specTitle`)})]}),(0,L.jsx)(`div`,{className:`chat-join-field-list`,children:w.map(t=>(0,L.jsxs)(`div`,{className:`chat-join-field`,children:[(0,L.jsxs)(`div`,{className:`chat-join-field-meta`,children:[(0,L.jsx)(`code`,{className:`chat-join-field-name`,children:t.name}),(0,L.jsx)(`span`,{children:t.required?e(`chatJoin.field.required`):e(`chatJoin.field.optional`)})]}),(0,L.jsx)(`p`,{children:e(t.descriptionKey)})]},t.name))})]}),(0,L.jsxs)(`section`,{className:`chat-join-helper`,"aria-labelledby":`ea-test-title`,children:[(0,L.jsxs)(`div`,{className:`chat-join-helper-title`,children:[(0,L.jsx)(_,{size:18}),(0,L.jsx)(`h3`,{id:`ea-test-title`,children:e(`chatJoin.testPublicKey`)})]}),(0,L.jsx)(`code`,{className:`ui-code-box chat-join-public-key`,translate:`no`,children:R}),(0,L.jsx)(`a`,{className:`btn`,href:`/web3/#EA`,target:`_blank`,children:e(`chatJoin.openWeb3`)})]})]})})})}function Q(){return(0,L.jsx)(C.Suspense,{children:(0,L.jsx)(Z,{})})}var $=l(`/chat/join/`)({component:Q});export{$ as Route};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{$ as r,rt as i,tt as a}from"./avatar-BZwHW4ll.js";import{a as o}from"./i18n-DZaOYCSO.js";import{n as s,t as c}from"./smartphone-gVFruyjO.js";import{t as l}from"./download-Q1uCiwif.js";import{s as u}from"./index-DluhgSHX.js";import{t as d}from"./MarketingHeader-7B-OT2XX.js";import{n as f}from"./format-CR8oUWq6.js";var p=r(`apple`,[[`path`,{d:`M12 6.528V3a1 1 0 0 1 1-1h0`,key:`11qiee`}],[`path`,{d:`M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21`,key:`110c12`}]]),m=r(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),h=r(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),g=r(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),_=r(`tablet-smartphone`,[[`rect`,{width:`10`,height:`14`,x:`3`,y:`8`,rx:`2`,key:`1vrsiq`}],[`path`,{d:`M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4`,key:`1j4zmg`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}]]),v=t(e(),1),y=[`windows`,`macos`,`linux`],b=[`x64`,`arm64`],x=[`installer`];Object.freeze([{platform:`windows`,arch:`x64`},{platform:`windows`,arch:`arm64`},{platform:`macos`,arch:`x64`},{platform:`macos`,arch:`arm64`},{platform:`linux`,arch:`x64`},{platform:`linux`,arch:`arm64`}]);var S=new Set(y),C=new Set(b),w=new Set(x);function T(e){return typeof e==`object`&&!!e}function E(e){return typeof e==`string`&&e.trim().length>0}function D(e){return Number.isFinite(e)&&e>0}function O(e){return e===void 0||E(e)}function k(e){return T(e)?S.has(e.platform)&&C.has(e.arch)&&w.has(e.kind)&&E(e.filename)&&D(e.size)&&E(e.cid)&&E(e.githubUrl)&&O(e.r2Url):!1}function A(e){return!T(e)||!E(e.version)||!E(e.publishedAt)||!Array.isArray(e.assets)?!1:e.assets.every(k)}function j(e){return`${e.platform}:${e.arch}`}function M(e){return A(e)?e.assets.filter(e=>e.kind===`installer`):[]}function N(e){return Array.isArray(e)?e.some(e=>T(e)&&E(e.r2Url)):!1}function P(e,t=`r2`){return t===`r2`&&T(e)&&E(e.r2Url)?{source:`r2`,url:e.r2Url}:{source:`github`,url:T(e)&&E(e.githubUrl)?e.githubUrl:``}}var F=`https://github.com/most-people/most/releases/latest`,I=[{platform:`windows`,arch:`x64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`windows`,arch:`arm64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`macos`,arch:`x64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`macos`,arch:`arm64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`linux`,arch:`x64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F},{platform:`linux`,arch:`arm64`,kind:`installer`,filename:`GitHub Releases`,githubUrl:F}];function L(e){return e.VITE_RELEASE_MANIFEST_URL||`${(e.VITE_R2_PUBLIC_BASE_URL||`https://download.most.box`).replace(/\/+$/,``)}/releases/latest.json`}function R({manifest:e,currentKey:t,requestedSource:n}){let r=e?M(e):[],i=r.length?r:I,a=N(i),o=n===`r2`&&a?`r2`:`github`,s=i.find(e=>j(e)===t)||null;return{assets:i,currentAsset:s,otherAssets:s?i.filter(e=>j(e)!==t):i,hasR2Assets:a,activeSource:o,currentDownload:s?P(s,o):null}}function z(e,t){return P(e,t)}var B=n(),V=L({VITE_RELEASE_MANIFEST_URL:void 0,VITE_R2_PUBLIC_BASE_URL:void 0}),H={windows:{name:`Windows`,ext:`.exe`,descKey:`download.platform.windows.desc`,icon:g},macos:{name:`macOS`,ext:`.dmg`,descKey:`download.platform.macos.desc`,icon:p},linux:{name:`Linux`,ext:`.AppImage`,descKey:`download.platform.linux.desc`,icon:h}},U=[{key:`ios`,nameKey:`download.platform.ios.name`,descKey:`download.platform.ios.desc`,icon:c},{key:`android`,nameKey:`download.platform.android.name`,descKey:`download.platform.android.desc`,icon:_}];function W(){return[navigator.userAgentData?.platform,navigator.platform,navigator.userAgent].filter(Boolean).join(` `).toLowerCase()}function G(){if(typeof navigator>`u`)return`windows:x64`;let e=W(),t=/arm|aarch64/.test(e)?`arm64`:`x64`;return/mac|darwin/.test(e)?`macos:${t}`:/linux/.test(e)?`linux:${t}`:`windows:${t}`}function K(){let{t:e}=o(),[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(V?`loading`:`fallback`),[a,c]=(0,v.useState)(`windows:x64`),[d,p]=(0,v.useState)(`r2`);(0,v.useEffect)(()=>{c(G())},[]),(0,v.useEffect)(()=>{if(!V)return;let e=new AbortController;return fetch(V,{cache:`no-store`,signal:e.signal}).then(e=>{if(!e.ok)throw Error(`Manifest request failed: ${e.status}`);return e.json()}).then(e=>{if(!A(e))throw Error(`Invalid download manifest`);n(e),i(`ready`)}).catch(e=>{e instanceof DOMException&&e.name===`AbortError`||(n(null),i(`fallback`))}),()=>e.abort()},[]),(0,v.useEffect)(()=>{r===`fallback`&&p(`github`)},[r]);let{currentAsset:h,otherAssets:g,hasR2Assets:_,activeSource:y}=R({manifest:t,currentKey:a,requestedSource:d}),b=t=>z(t,y).source===`r2`?e(`download.source.r2Mirror`):`GitHub Releases`,x=e=>z(e,y).url,S=t=>{let n=H[t.platform],r=n.icon;return(0,B.jsxs)(`article`,{className:`download-current-card`,children:[(0,B.jsxs)(`div`,{className:`download-current-main`,children:[(0,B.jsx)(`div`,{className:`download-current-icon`,children:(0,B.jsx)(r,{size:34})}),(0,B.jsxs)(`div`,{className:`download-current-copy`,children:[(0,B.jsxs)(`div`,{className:`download-current-labels`,children:[(0,B.jsxs)(`span`,{className:`download-current-kicker`,children:[(0,B.jsx)(u,{size:14}),e(`download.platform.currentSystem`)]}),(0,B.jsx)(`span`,{className:`download-current-recommended`,children:e(`download.platform.recommended`)})]}),(0,B.jsxs)(`div`,{className:`download-current-heading`,children:[(0,B.jsx)(`h3`,{children:n.name}),(0,B.jsx)(`span`,{children:t.arch})]}),(0,B.jsx)(`p`,{children:e(n.descKey)}),(0,B.jsxs)(`dl`,{className:`download-current-meta`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e(`download.platform.source`)}),(0,B.jsx)(`dd`,{children:b(t)})]}),t.size?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e(`download.platform.size`)}),(0,B.jsx)(`dd`,{children:f(t.size)})]}):null,t.cid?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`CID`}),(0,B.jsx)(`dd`,{children:t.cid.slice(0,12)})]}):null]})]})]}),(0,B.jsxs)(`div`,{className:`download-current-actions`,children:[(0,B.jsx)(`span`,{children:e(`download.platform.matchedSystem`)}),(0,B.jsxs)(`a`,{href:x(t),className:`btn btn-primary`,children:[(0,B.jsx)(l,{size:17}),e(`download.platform.action`,{ext:n.ext})]}),(0,B.jsx)(`p`,{children:b(t)})]})]})},C=t=>{let n=H[t.platform],r=n.icon,i=j(t),o=i===a;return(0,B.jsxs)(`article`,{className:[`download-platform-card`,o?`is-recommended`:``].filter(Boolean).join(` `),children:[(0,B.jsx)(`div`,{className:`download-platform-icon`,children:(0,B.jsx)(r,{size:32})}),(0,B.jsxs)(`div`,{className:`download-platform-content`,children:[(0,B.jsxs)(`div`,{className:`download-platform-heading`,children:[(0,B.jsx)(`h3`,{children:n.name}),(0,B.jsx)(`span`,{children:t.arch})]}),(0,B.jsx)(`p`,{children:e(n.descKey)}),(0,B.jsxs)(`dl`,{className:`download-platform-meta`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e(`download.platform.source`)}),(0,B.jsx)(`dd`,{children:b(t)})]}),t.size?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e(`download.platform.size`)}),(0,B.jsx)(`dd`,{children:f(t.size)})]}):null,t.cid?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`CID`}),(0,B.jsx)(`dd`,{children:t.cid.slice(0,12)})]}):null]}),(0,B.jsx)(`div`,{className:`download-platform-actions`,children:(0,B.jsxs)(`a`,{href:x(t),className:`btn btn-primary`,children:[(0,B.jsx)(l,{size:16}),e(`download.platform.action`,{ext:n.ext})]})})]}),o?(0,B.jsx)(`span`,{className:`download-recommended-badge`,children:e(`download.platform.current`)}):null]},i)},w=t=>{let n=t.icon;return(0,B.jsxs)(`article`,{className:`download-coming-soon-card`,children:[(0,B.jsx)(`div`,{className:`download-platform-icon download-coming-soon-icon`,children:(0,B.jsx)(n,{size:32})}),(0,B.jsxs)(`div`,{className:`download-platform-content`,children:[(0,B.jsxs)(`div`,{className:`download-platform-heading`,children:[(0,B.jsx)(`h3`,{children:e(t.nameKey)}),(0,B.jsx)(`span`,{children:e(`download.platform.comingSoon`)})]}),(0,B.jsx)(`p`,{children:e(t.descKey)})]})]},t.key)};return(0,B.jsxs)(`div`,{className:`download-options`,children:[(0,B.jsxs)(`div`,{className:`ui-segmented-control download-source-tabs`,role:`tablist`,"aria-label":e(`download.source.label`),children:[(0,B.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":y===`r2`,disabled:!_,className:y===`r2`?`ui-segmented-option download-source-tab is-active`:`ui-segmented-option download-source-tab`,onClick:()=>p(`r2`),children:[(0,B.jsx)(s,{size:15}),`Cloudflare R2`]}),(0,B.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":y===`github`,className:y===`github`?`ui-segmented-option download-source-tab is-active`:`ui-segmented-option download-source-tab`,onClick:()=>p(`github`),children:[(0,B.jsx)(m,{size:15}),`GitHub Releases`]})]}),(0,B.jsx)(`p`,{className:`download-source-note`,children:r===`loading`?e(`download.source.loading`):r===`ready`&&t?e(`download.source.ready`,{version:t.version}):e(`download.source.fallback`)}),h?(0,B.jsx)(`div`,{className:`download-current-platform`,"aria-label":e(`download.platform.currentSystem`),children:S(h)}):null,g.length?(0,B.jsxs)(`div`,{className:`download-other-platforms`,children:[(0,B.jsx)(`p`,{className:`download-other-platforms-title`,children:e(`download.platform.otherPlatforms`)}),(0,B.jsx)(`div`,{className:`download-platform-grid`,children:g.map(e=>C(e))}),(0,B.jsxs)(`div`,{className:`download-coming-soon`,children:[(0,B.jsx)(`p`,{className:`download-coming-soon-title`,children:e(`download.platform.mobilePlatforms`)}),(0,B.jsx)(`div`,{className:`download-coming-soon-grid`,children:U.map(e=>w(e))})]})]}):null]})}var q=[{featureKey:`download.comparison.node`,webKey:`download.comparison.webConnectsNode`,desktopKey:`download.comparison.desktopBuiltinNode`},{featureKey:`download.comparison.fileSharing`,webKey:`download.comparison.webDependsNode`,desktopKey:`download.comparison.desktopFull`},{featureKey:`download.comparison.verification`,webKey:`download.comparison.webDependsNode`,desktopKey:`download.comparison.desktopFull`},{featureKey:`download.comparison.seeding`,webKey:`download.comparison.webDependsNode`,desktopKey:`download.comparison.desktopDefaultOn`},{featureKey:`download.comparison.largeFiles`,webKey:`download.comparison.webDependsNode`,desktopKey:`download.comparison.desktop10gb`}];function J(){let{t:e}=o();return(0,v.useEffect)(()=>{document.title=e(`download.meta.title`)},[e]),(0,B.jsxs)(`div`,{className:`download-page`,children:[(0,B.jsx)(d,{}),(0,B.jsx)(`section`,{className:`download-hero`,children:(0,B.jsxs)(`div`,{className:`mkt-container`,children:[(0,B.jsx)(`div`,{className:`download-hero-icon`,children:(0,B.jsx)(l,{size:40})}),(0,B.jsx)(`h1`,{className:`download-hero-title`,children:e(`download.hero.title`)}),(0,B.jsx)(`p`,{className:`download-hero-desc`,children:e(`download.hero.desc`)})]})}),(0,B.jsx)(`section`,{className:`download-platforms`,children:(0,B.jsxs)(`div`,{className:`mkt-container`,children:[(0,B.jsx)(`h2`,{className:`download-section-title`,children:e(`download.platforms.title`)}),(0,B.jsx)(K,{})]})}),(0,B.jsx)(`section`,{className:`download-comparison`,children:(0,B.jsxs)(`div`,{className:`mkt-container`,children:[(0,B.jsx)(`h2`,{className:`download-section-title`,children:e(`download.comparison.title`)}),(0,B.jsx)(`div`,{className:`download-table-wrap`,children:(0,B.jsxs)(`table`,{className:`download-table`,children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`th`,{children:e(`download.comparison.feature`)}),(0,B.jsx)(`th`,{children:e(`download.comparison.web`)}),(0,B.jsx)(`th`,{children:e(`download.comparison.desktop`)})]})}),(0,B.jsx)(`tbody`,{children:q.map(t=>(0,B.jsxs)(`tr`,{children:[(0,B.jsx)(`td`,{children:e(t.featureKey)}),(0,B.jsx)(`td`,{className:`col-web`,children:e(t.webKey)}),(0,B.jsx)(`td`,{className:`col-desktop`,children:e(t.desktopKey)})]},t.featureKey))})]})})]})}),(0,B.jsx)(`section`,{className:`download-cta`,children:(0,B.jsx)(`div`,{className:`mkt-container`,children:(0,B.jsx)(`p`,{className:`download-hero-desc`,children:e(`download.npmNote`)})})}),(0,B.jsx)(`section`,{className:`download-cta`,children:(0,B.jsx)(`div`,{className:`mkt-container`,children:(0,B.jsx)(i,{to:`/`,className:`btn btn-primary`,children:e(`common.backHome`)})})}),(0,B.jsx)(`footer`,{className:`mkt-footer`,children:(0,B.jsx)(`div`,{className:`mkt-container`,children:(0,B.jsx)(`div`,{className:`mkt-footer-inner`,children:(0,B.jsx)(`p`,{className:`mkt-footer-copy`,children:`MostBox`})})})})]})}var Y=a(`/download/`)({component:J});export{Y as Route};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{$ as r,A as i,B as a,D as o,E as s,H as c,M as l,O as u,R as d,V as f,f as p,n as m,tt as h}from"./avatar-BZwHW4ll.js";import{a as ee}from"./i18n-DZaOYCSO.js";import{t as g}from"./copy-CK7HMulu.js";import{n as te}from"./SidebarHomeLink-CkhGDvZ8.js";import{t as ne}from"./play-CVkbAJJU.js";import{a as _,i as re,n as ie,r as ae,t as oe}from"./useGameRoom-BxDxm3rp.js";import{a as se}from"./index-DluhgSHX.js";var ce=r(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),v=t(e(),1),y=[10,20,50,100],b=[`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`J`,`Q`,`K`,`A`],x=[`D`,`C`,`H`,`S`],S=new Map(b.map((e,t)=>[e,t+2])),le=new Map(x.map((e,t)=>[e,t+1])),C={high:1,pair:2,straight:3,flush:4,straightFlush:5,triple:6},ue={[C.high]:`散牌`,[C.pair]:`对子`,[C.straight]:`顺子`,[C.flush]:`金花`,[C.straightFlush]:`顺金`,[C.triple]:`豹子`};function w(e){return i(e)}function T(e=`zhajinhua`){return s(e)}function E(){return T(`round`)}function D(){let e=[];for(let t of x)for(let n of b)e.push(`${n}${t}`);return e}function O(e=D(),t=Math.random){let n=[...e];for(let e=n.length-1;e>0;e--){let r=Math.floor(t()*(e+1));[n[e],n[r]]=[n[r],n[e]]}return n}function k(e){let t=String(e||``).trim().toUpperCase(),n=t.slice(-1),r=t.slice(0,-1);if(!S.has(r)||!le.has(n))throw Error(`Invalid card: ${e}`);return{id:`${r}${n}`,rank:r,suit:n,rankValue:S.get(r),suitValue:le.get(n)}}function A(e,t){let n=Math.max(e.length,t.length);for(let r=0;r<n;r++){let n=e[r]||0,i=t[r]||0;if(n!==i)return n-i}return 0}function j(e){let t=[...new Set(e)].sort((e,t)=>e-t);return t.length===3?t[0]===2&&t[1]===3&&t[2]===14?3:t[0]+1===t[1]&&t[1]+1===t[2]?t[2]:0:0}function M(e){if(!Array.isArray(e)||e.length!==3)throw Error(`炸金花手牌必须是 3 张牌`);let t=e.map(k),n=t.map(e=>e.rankValue),r=new Map;for(let e of n)r.set(e,(r.get(e)||0)+1);let i=new Set(t.map(e=>e.suit)).size===1,a=j(n),o=[...n].sort((e,t)=>t-e),s=Math.max(...t.map(e=>e.suitValue)),c=C.high,l=o;return r.size===1?(c=C.triple,l=[o[0]]):a&&i?(c=C.straightFlush,l=[a]):i?(c=C.flush,l=o):a?(c=C.straight,l=[a]):r.size===2&&(c=C.pair,l=[[...r.entries()].find(([,e])=>e===2)[0],[...r.entries()].find(([,e])=>e===1)[0]]),{category:c,label:ue[c],tiebreakers:l,tieSuit:s,cards:t.map(e=>e.id)}}function N(e,t){let n=M(e),r=M(t);if(n.category!==r.category)return n.category-r.category;let i=A(n.tiebreakers,r.tiebreakers);return i===0?n.tieSuit-r.tieSuit:i}function P(e){return M(e).label}function de({roundId:e,action:t,amount:n,target:r}){return{roundId:e,eventId:T(`action`),action:t,amount:n,target:r}}function fe(e=[]){let t=e.filter(e=>Number(e.chips)>=10);return t.length>=2&&t.length<=5}function pe({roomCode:e,players:t,hostAddress:n,previousSeq:r=0,previousWinner:i=``,roundId:a=E(),random:s=Math.random}){let c=t.filter(e=>Number(e.chips)>=10).slice(0,5);if(c.length<2)throw Error(`至少需要 2 名有足够筹码的玩家`);let l=O(D(),s),d={},f=c.map((e,t)=>{let n=l.slice(t*3,t*3+3);return d[e.address]=n,{address:e.address,name:e.name,avatar:u(e.avatar),publicKey:e.publicKey,chips:Number(e.chips)-10,status:`active`,looked:!1,bet:10}}),p,m=o(i),h=m?f.findIndex(e=>o(e.address)===m):-1;return p=h>=0?f[h].address:f[Math.floor(s()*f.length)].address,{roomCode:w(e),roundId:a,status:`playing`,host:o(n),seq:r+1,startedAt:Date.now(),ante:10,pot:10*f.length,currentBet:10,turnAddress:p,players:f,lastAction:`本局开始`,winner:null,showdown:null,appliedEventIds:[],hands:d,actionCounts:{},compareReveal:{}}}function me(e){if(!e)return null;let t={...e};return delete t.hands,H(t)}function he(e,t){let n=F(e);return!n||!t||typeof t!=`object`?null:{...n,hands:H(t)}}function F(e){return!e||typeof e!=`object`||!e.roundId||!Array.isArray(e.players)?null:{roomCode:w(e.roomCode),roundId:String(e.roundId),status:e.status===`finished`?`finished`:`playing`,host:o(e.host),seq:Number(e.seq)||1,startedAt:Number(e.startedAt)||Date.now(),ante:Number(e.ante)||10,pot:Math.max(0,Number(e.pot)||0),currentBet:Math.max(0,Number(e.currentBet)||10),turnAddress:o(e.turnAddress),players:e.players.map(V).filter(Boolean),lastAction:String(e.lastAction||``),winner:e.winner?o(e.winner):null,showdown:e.showdown&&typeof e.showdown==`object`?H(e.showdown):null,appliedEventIds:Array.isArray(e.appliedEventIds)?e.appliedEventIds.map(String):[],actionCounts:e.actionCounts&&typeof e.actionCounts==`object`?H(e.actionCounts):{},compareReveal:e.compareReveal&&typeof e.compareReveal==`object`?H(e.compareReveal):{},lastCompare:e.lastCompare&&typeof e.lastCompare==`object`?H(e.lastCompare):null,finishedAt:e.finishedAt?Number(e.finishedAt):null}}function I(e,t,n){let r=F(e);if(!r||r.status!==`playing`)return{ok:!1,error:`当前没有进行中的牌局`};let i=o(n),a=r.players.find(e=>e.address===i);if(!a||a.status!==`active`)return{ok:!1,error:`玩家不在本轮牌局中`};if(r.turnAddress!==i)return{ok:!1,error:`还没有轮到你操作`};let s=t?.action;if(![`look`,`call`,`raise`,`compare`,`fold`].includes(s))return{ok:!1,error:`未知操作`};if(s===`look`)return a.looked?{ok:!1,error:`已经看过牌`}:{ok:!0};if(s===`call`)return a.chips>=10?{ok:!0}:{ok:!1,error:`筹码不足,不能跟注`};if(s===`raise`){let e=Number(t.amount);if(!y.includes(e))return{ok:!1,error:`加注档位无效`};let n=r.currentBet+e-a.bet;return a.chips>=n?{ok:!0}:{ok:!1,error:`筹码不足,不能加注`}}if(s===`compare`){let e=o(t.target),n=r.players.find(t=>t.address===e);if(!e||e===i||!n||n.status!==`active`)return{ok:!1,error:`请选择有效的比牌对象`};if(!r.players.filter(e=>e.status===`active`).every(e=>(r.actionCounts?.[e.address]||0)>=1))return{ok:!1,error:`第一轮不能比牌,请先跟注或加注`};let s=Math.max(0,r.currentBet-a.bet);return a.chips>=s?{ok:!0}:{ok:!1,error:`筹码不足,不能比牌`}}return{ok:!0}}function ge(e,t,n){let r=I(e,t,n);if(!r.ok)return{ok:!1,error:r.error,state:e};let i=H(e),a=o(n),s=i.players.find(e=>e.address===a),c=String(t.eventId);if(i.appliedEventIds?.includes(c))return{ok:!0,state:i,duplicate:!0};if(Array.isArray(i.appliedEventIds)||(i.appliedEventIds=[]),i.appliedEventIds.push(c),t.action===`look`)return s.looked=!0,i.lastAction=`${s.name} 看牌`,B(i);if(t.action===`fold`)return s.status=`folded`,i.lastAction=`${s.name} 弃牌`,R(i,a),z(i,a);if(t.action===`call`)return s.chips-=10,s.bet+=10,i.pot+=10,i.lastAction=`${s.name} 跟注`,R(i,a),z(i,a);if(t.action===`raise`){let e=Number(t.amount);return i.currentBet+=e,L(i,s),i.lastAction=`${s.name} 加注 ${e}`,R(i,a),z(i,a)}if(t.action===`compare`){L(i,s);let e=o(t.target),n=i.players.find(t=>t.address===e),r=s.looked,c=n.looked,l=N(i.hands?.[a]||[],i.hands?.[e]||[]),u=l>=0?s:n,d=l>=0?n:s;d.status=`folded`,d.looked=!0,i.compareReveal||={};let f=r&&c,p=!r&&!c;if(f)i.compareReveal[a]=i.hands?.[e]||[],i.compareReveal[e]=i.hands?.[a]||[];else if(p)i.compareReveal[d.address]=i.hands?.[u.address]||[];else{let e=r?s:n,t=r?n:s;i.compareReveal[e.address]=i.hands?.[t.address]||[],i.compareReveal[d.address]=i.hands?.[u.address]||[]}return i.lastCompare={initiator:a,target:e,winner:u.address,loser:d.address,initiatorLooked:r,targetLooked:c,timestamp:Date.now()},i.lastAction=`${s.name} 与 ${n.name} 比牌,${d.name} 出局`,R(i,a),z(i,a)}return{ok:!1,error:`未知操作`,state:e}}function _e(e){return(e?.players||[]).filter(e=>e.status===`active`)}function ve(e,t){let n=(e?.players||[]).find(e=>e.address===o(t));if(!e||e.status!==`playing`||!n||n.status!==`active`||e.turnAddress!==n.address)return[];let r=[];return n.looked||r.push(`look`),I(e,{action:`call`},n.address).ok&&r.push(`call`),y.some(t=>I(e,{action:`raise`,amount:t},n.address).ok)&&r.push(`raise`),_e(e).length>1&&e.players.filter(e=>e.status===`active`).every(t=>(e.actionCounts?.[t.address]||0)>=1)&&r.push(`compare`),r.push(`fold`),r}function L(e,t){let n=Math.max(0,e.currentBet-t.bet);t.chips-=n,t.bet+=n,e.pot+=n}function R(e,t){e.actionCounts||={},e.actionCounts[t]=(e.actionCounts[t]||0)+1}function z(e,t){let n=_e(e);return n.length===1?ye(e,n[0].address):(e.turnAddress=be(e,t),B(e))}function ye(e,t){let n=e.players.find(e=>e.address===t),r=e.pot;return n&&(n.chips+=e.pot),e.status=`finished`,e.winner=t,e.winAmount=r,e.turnAddress=``,e.showdown=e.hands?H(e.hands):null,e.lastAction=n?`${n.name} 赢得 ${r} 筹码`:`本局结束`,e.pot=0,e.finishedAt=Date.now(),B(e)}function be(e,t){let n=e.players,r=Math.max(0,n.findIndex(e=>e.address===o(t)));for(let e=1;e<=n.length;e++){let t=n[(r+e)%n.length];if(t.status===`active`)return t.address}return``}function B(e){return e.seq=Number(e.seq||0)+1,{ok:!0,state:e}}function V(e){if(!e||typeof e!=`object`)return null;let t=o(e.address);return t?{address:t,name:String(e.name||l(t)).slice(0,50),avatar:u(e.avatar),publicKey:String(e.publicKey||``),chips:Math.max(0,Number(e.chips)||0),status:e.status===`folded`?`folded`:`active`,looked:e.looked===!0,bet:Math.max(0,Number(e.bet)||0)}:null}function H(e){return JSON.parse(JSON.stringify(e))}var U={page:`_page_p8eol_1`,headerActions:`_headerActions_p8eol_12`,entry:`_entry_p8eol_18`,entryBrand:`_entryBrand_p8eol_28`,cardMark:`_cardMark_p8eol_34`,entryPanel:`_entryPanel_p8eol_62`,accountLine:`_accountLine_p8eol_72`,joinForm:`_joinForm_p8eol_89`,status:`_status_p8eol_110`,board:`_board_p8eol_116`,table:`_table_p8eol_123`,tableCenter:`_tableCenter_p8eol_144`,finishBanner:`_finishBanner_p8eol_173`,finishBannerIcon:`_finishBannerIcon_p8eol_192`,seats:`_seats_p8eol_196`,seat:`_seat_p8eol_196`,seatTurn:`_seatTurn_p8eol_218`,seatWinner:`_seatWinner_p8eol_223`,seatFolded:`_seatFolded_p8eol_228`,seatAvatar:`_seatAvatar_p8eol_232`,seatAvatarOffline:`_seatAvatarOffline_p8eol_252`,onlineDot:`_onlineDot_p8eol_257`,seatMain:`_seatMain_p8eol_269`,seatMeta:`_seatMeta_p8eol_270`,panel:`_panel_p8eol_301`,panelSection:`_panelSection_p8eol_308`,panelTitle:`_panelTitle_p8eol_318`,hand:`_hand_p8eol_328`,card:`_card_p8eol_34`,red:`_red_p8eol_362`,black:`_black_p8eol_366`,cardBack:`_cardBack_p8eol_370`,handLabel:`_handLabel_p8eol_391`,actionGrid:`_actionGrid_p8eol_398`,raiseRow:`_raiseRow_p8eol_399`,statusGrid:`_statusGrid_p8eol_410`,muted:`_muted_p8eol_428`,compareOverlay:`_compareOverlay_p8eol_435`,compareBox:`_compareBox_p8eol_447`,compareTitle:`_compareTitle_p8eol_461`,comparePlayers:`_comparePlayers_p8eol_467`,compareSide:`_compareSide_p8eol_474`,compareWinner:`_compareWinner_p8eol_486`,compareName:`_compareName_p8eol_491`,compareCards:`_compareCards_p8eol_502`,compareLabel:`_compareLabel_p8eol_527`,compareVs:`_compareVs_p8eol_533`,compareResult:`_compareResult_p8eol_540`},W=n(),G=`zhajinhua`;function K(...e){return e.filter(Boolean).join(` `)}function q(e,t){return String(e||``).toLowerCase()===String(t||``).toLowerCase()}function J(e=``){return e?`${e.slice(0,6)}...${e.slice(-4)}`:``}function xe(e){return e.displayName||e.username}function Y(e){let t=String(e||``),n=t.slice(-1);return{rank:t.slice(0,-1),suit:{S:`♠`,H:`♥`,C:`♣`,D:`♦`}[n]||n,color:n===`H`||n===`D`?`red`:`black`}}function X(){let{t:e}=ee(),t=p(e=>e.addToast),n=d(e=>e.initializeUser),[r,i]=(0,v.useState)(``),[o,s]=(0,v.useState)(!1),l=(0,v.useRef)(``),u=(0,v.useRef)(!1),[h,b]=(0,v.useState)(20),[x,S]=(0,v.useState)(``),[le,C]=(0,v.useState)({}),[ue,w]=(0,v.useState)(!0),[T,E]=(0,v.useState)(!1),D=(0,v.useRef)(null),O=(0,v.useRef)(new Set),k=oe({gameId:G,onError:e=>t(e,`error`),getPlayerPayload:e=>{let t=a(e.danger);return{address:e.address,name:xe(e),avatar:e.avatar||``,publicKey:t.public_key,joinedAt:Date.now()}}}),A=(0,v.useMemo)(()=>k.userIdentity?.danger?a(k.userIdentity.danger):null,[k.userIdentity?.danger]);(0,v.useEffect)(()=>{n()},[n]),(0,v.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get(`room`)?.toUpperCase();e&&(i(e),l.current=e)},[]),(0,v.useEffect)(()=>{let n=l.current;!n||u.current||!k.isBackendReady||!k.userIdentity||(u.current=!0,l.current=``,k.joinRoom(n).then(n=>{n&&t(e(`game.toast.joinedRoom`),`success`)}))},[k.isBackendReady,k.userIdentity,k.joinRoom,t,e]),(0,v.useEffect)(()=>{if(!k.roomCode)return;let e=`/game/zhajinhua?room=${k.roomCode}`;`${window.location.pathname}${window.location.search}`!==e&&window.history.replaceState(null,``,e)},[k.roomCode]);let j=(0,v.useMemo)(()=>ie(k.messages,{gameId:G,roomCode:k.roomCode}),[k.messages,k.roomCode]),M=(0,v.useMemo)(()=>ae(k.messages,{gameId:G,roomCode:k.roomCode}),[k.messages,k.roomCode])?.payload?.round||null,N=M?.host||j.hostAddress,F=q(N,k.userIdentity?.address),I=k.userIdentity?.address?.toLowerCase()||``,L=M?.players.find(e=>q(e.address,I)),R=L||j.players.find(e=>q(e.address,I)),z=le[M?.roundId||``]||null,ye=M?.showdown&&I?M.showdown[I]:null,be=M?.compareReveal&&I?M.compareReveal[I]:null,B=ye||be||(L?.looked?z:null),V=ve(M,I),H=_e(M),X=F&&fe(j.players.map(e=>({...e,chips:M?.players.find(t=>q(t.address,e.address))?.chips??1e3}))),Q=k.roomCode&&typeof window<`u`?`${window.location.origin}/game/zhajinhua?room=${k.roomCode}`:``;(0,v.useEffect)(()=>{if(!(!M||!k.userIdentity||!A||!N))for(let e of k.roomEvents){let t=e.event;if(!t||t.event!==`deal:private`)continue;let n=t.payload;if(n.roundId!==M.roundId||!q(n.recipient,k.userIdentity.address))continue;let r=f(n.encrypted||``,{senderPublicKey:n.senderPublicKey||``,recipientPrivateKey:A.private_key});if(r)try{let e=JSON.parse(r);Array.isArray(e)&&C(t=>({...t,[M.roundId]:e.map(String)}))}catch{}}},[M?.roundId,k.roomEvents,k.userIdentity,N,A?.private_key]),(0,v.useEffect)(()=>{if(M?.status===`finished`&&M.winner){w(!0);let e=setTimeout(()=>w(!1),5e3);return()=>clearTimeout(e)}},[M?.finishedAt,M?.status,M?.winner]),(0,v.useEffect)(()=>{if(M?.lastCompare?.timestamp){E(!0);let e=setTimeout(()=>E(!1),5e3);return()=>clearTimeout(e)}else E(!1)},[M?.lastCompare?.timestamp,M?.roundId]),(0,v.useEffect)(()=>{if(!F||!M||M.status!==`playing`)return;let e=D.current;if(!e)return;let t=k.roomEvents.filter(e=>{let t=e.event;if(!t||t.event!==`player:action`)return!1;let n=t.payload.actionEvent;return!(!n||n.roundId!==M.roundId||O.current.has(n.eventId)||M.appliedEventIds?.includes(n.eventId))});if(t.length===0)return;let n=!1;async function r(){let r=he(M,e);if(r)for(let e of t){if(n)return;let t=(e.event?.payload).actionEvent,i=ge(r,t,e.message.author);if(!i.ok){let n=e.message.author;if(!q(n,k.userIdentity?.address)&&r.status===`playing`&&q(r.turnAddress,n)){let e=ge(r,de({roundId:r.roundId,action:`call`,amount:void 0,target:void 0}),n);if(e.ok)i=e;else{let e=ge(r,de({roundId:r.roundId,action:`fold`,amount:void 0,target:void 0}),n);e.ok&&(i=e)}}if(!i.ok){O.current.add(t.eventId);continue}}if(r=i.state,D.current=i.state.hands,await De(i.state)&&O.current.add(t.eventId),i.state.status===`finished`)break}}return r(),()=>{n=!0}},[M?.roundId,M?.seq,M?.status,k.roomEvents,F]);async function we(){await k.createRoom()&&t(e(`game.toast.roomCreated`),`success`)}async function Te(n){n.preventDefault(),await k.joinRoom(r)&&t(e(`game.toast.joinedRoom`),`success`)}async function Ee(){Q&&(await navigator.clipboard.writeText(Q),s(!0),setTimeout(()=>s(!1),1400))}async function De(e){return k.sendRoomEvent(`room:state`,{round:me(e),seq:e.seq})}async function Oe(){if(!k.userIdentity||!A||!X){t(e(`game.zhajinhua.error.notEnoughPlayers`),`error`);return}try{let n=j.players.map(e=>({...e,chips:M?.players.find(t=>q(t.address,e.address))?.chips??1e3})),r=pe({roomCode:k.roomCode,players:n,hostAddress:k.userIdentity.address,previousSeq:M?.seq||0,previousWinner:M?.winner||``});D.current=r.hands,O.current.clear(),await De(r);for(let e of r.players){let t=c(JSON.stringify(r.hands[e.address]),{senderPrivateKey:A.private_key,recipientPublicKey:e.publicKey});await k.sendRoomEvent(`deal:private`,{roundId:r.roundId,recipient:e.address,senderPublicKey:A.public_key,encrypted:t})}C(e=>({...e,[r.roundId]:r.hands[k.userIdentity.address.toLowerCase()]})),t(e(`game.zhajinhua.toast.roundStarted`),`success`)}catch(n){t(n instanceof Error?n.message:e(`game.zhajinhua.error.startFailed`),`error`)}}async function $(e,t={}){if(!M||!k.userIdentity)return;let n=de({roundId:M.roundId,action:e,amount:t.amount,target:t.target});await k.sendRoomEvent(`player:action`,{actionEvent:n})}let ke=M?.status===`playing`?q(M.turnAddress,I)?e(`game.zhajinhua.status.yourTurn`):M.turnAddress?e(`game.zhajinhua.status.waitingPlayer`,{player:Z(M.turnAddress,j.players,k.presenceByAddress)}):e(`game.status.playing`):M?.status===`finished`?e(`game.status.finished`):e(`game.status.waitingStart`),Ae=H.filter(e=>!q(e.address,I));return(0,W.jsx)(te,{sidebar:({closeSidebar:e})=>(0,W.jsx)(re,{activeGame:`zhajinhua`,closeSidebar:e}),headerTitle:(0,W.jsx)(`h2`,{className:`header-title`,children:e(`game.zhajinhua.title`)}),headerRight:(0,W.jsx)(`div`,{className:U.headerActions,children:k.roomCode&&(0,W.jsxs)(`button`,{className:`btn btn-sm`,onClick:Ee,children:[(0,W.jsx)(g,{size:14}),e(o?`common.copied`:`game.action.shareRoom`)]})}),children:(0,W.jsx)(`main`,{className:U.page,children:k.roomCode?(0,W.jsxs)(`div`,{className:U.board,children:[(0,W.jsxs)(`section`,{className:U.table,children:[M?.status===`finished`&&M.winner&&ue&&(0,W.jsxs)(`div`,{className:U.finishBanner,children:[(0,W.jsx)(`span`,{className:U.finishBannerIcon,children:`🏆`}),(0,W.jsx)(`span`,{children:e(`game.zhajinhua.result.winChips`,{player:Z(M.winner,j.players,k.presenceByAddress),amount:M.winAmount??0})})]}),M?.lastCompare&&T&&(0,W.jsx)(Se,{lastCompare:M.lastCompare,compareReveal:M.compareReveal||{},myAddress:I,myDealtHand:z,lobbyPlayers:j.players,presenceByAddress:k.presenceByAddress,onClose:()=>E(!1)}),(0,W.jsxs)(`div`,{className:U.tableCenter,children:[(0,W.jsx)(`span`,{children:e(`game.zhajinhua.pot`)}),(0,W.jsx)(`strong`,{children:M?.pot||0}),(0,W.jsx)(`small`,{children:e(`game.zhajinhua.currentBet`,{amount:M?.currentBet||0})})]}),(0,W.jsx)(`div`,{className:U.seats,children:j.players.map(t=>{let n=M?.players.find(e=>q(e.address,t.address)),r=Ce(t,k.presenceByAddress,k.onlineAddresses),i=M?.turnAddress===t.address,a=M?.winner===t.address,o=n?.status===`folded`;return(0,W.jsxs)(`div`,{className:K(U.seat,i&&U.seatTurn,a&&U.seatWinner,o&&U.seatFolded),children:[(0,W.jsxs)(`div`,{className:K(U.seatAvatar,!r.online&&U.seatAvatarOffline),children:[(0,W.jsx)(`img`,{src:m(t.address,r.avatar),alt:``}),r.online&&(0,W.jsx)(`span`,{className:U.onlineDot})]}),(0,W.jsxs)(`div`,{className:U.seatMain,children:[(0,W.jsx)(`strong`,{translate:`no`,children:r.name}),(0,W.jsx)(`span`,{translate:`no`,children:J(t.address)})]}),(0,W.jsxs)(`div`,{className:U.seatMeta,children:[(0,W.jsx)(`span`,{children:e(`game.zhajinhua.chips`,{amount:n?.chips??1e3})}),(0,W.jsx)(`span`,{children:n?.status===`folded`?e(`game.zhajinhua.player.folded`):n?.looked?e(`game.zhajinhua.player.looked`):e(M?`game.zhajinhua.player.inRound`:`game.status.waitingStart`)})]})]},t.address)})})]}),(0,W.jsxs)(`aside`,{className:U.panel,children:[(0,W.jsxs)(`div`,{className:U.panelSection,children:[(0,W.jsxs)(`div`,{className:U.panelTitle,children:[(0,W.jsx)(_,{size:16}),(0,W.jsx)(`span`,{children:e(`game.zhajinhua.myHand`)})]}),(0,W.jsx)(`div`,{className:U.hand,children:B?B.map(e=>{let t=Y(e),n=`${t.suit}${t.rank}`;return(0,W.jsxs)(`div`,{className:K(U.card,U[t.color]),children:[(0,W.jsx)(`span`,{children:n}),(0,W.jsx)(`i`,{children:t.suit})]},e)}):[0,1,2].map(e=>(0,W.jsx)(`div`,{className:U.cardBack,children:(0,W.jsx)(_,{size:18})},e))}),(0,W.jsx)(`p`,{className:U.handLabel,children:B?P(B):e(z?`game.zhajinhua.hand.unlooked`:`game.zhajinhua.hand.waitingDeal`)})]}),(0,W.jsxs)(`div`,{className:U.panelSection,children:[(0,W.jsxs)(`div`,{className:U.panelTitle,children:[(0,W.jsx)(ne,{size:16}),(0,W.jsx)(`span`,{children:e(`game.actions`)})]}),F?(0,W.jsxs)(`button`,{className:`btn btn-primary btn-full`,onClick:Oe,disabled:!X||M?.status===`playing`,children:[(0,W.jsx)(ce,{size:16}),M?.status===`finished`?e(`game.action.nextRound`):e(`game.action.startRound`)]}):(0,W.jsx)(`p`,{className:U.muted,children:e(`game.waitingHost`)}),F&&M?.status===`finished`&&!X&&(0,W.jsx)(`p`,{className:U.muted,children:e(`game.zhajinhua.error.tooManyLowChips`)}),(0,W.jsxs)(`div`,{className:U.actionGrid,children:[(0,W.jsxs)(`button`,{className:`btn btn-secondary`,disabled:!V.includes(`look`),onClick:()=>$(`look`),children:[(0,W.jsx)(se,{size:16}),e(`game.zhajinhua.action.look`)]}),(0,W.jsx)(`button`,{className:`btn btn-secondary`,disabled:!V.includes(`call`),onClick:()=>$(`call`),children:e(`game.zhajinhua.action.call`)}),(0,W.jsx)(`button`,{className:`btn btn-secondary`,disabled:!V.includes(`fold`),onClick:()=>$(`fold`),children:e(`game.zhajinhua.action.fold`)})]}),(0,W.jsxs)(`div`,{className:U.raiseRow,children:[(0,W.jsx)(`select`,{className:`input input-compact`,value:h,onChange:e=>b(Number(e.target.value)),children:y.map(t=>(0,W.jsx)(`option`,{value:t,children:e(`game.zhajinhua.action.raiseOption`,{amount:t})},t))}),(0,W.jsx)(`button`,{className:`btn btn-secondary`,disabled:!V.includes(`raise`),onClick:()=>$(`raise`,{amount:h}),children:e(`game.zhajinhua.action.raise`)})]}),(0,W.jsxs)(`div`,{className:U.raiseRow,children:[(0,W.jsxs)(`select`,{className:`input input-compact`,value:x,onChange:e=>S(e.target.value),children:[(0,W.jsx)(`option`,{value:``,children:e(`game.zhajinhua.action.comparePlaceholder`)}),Ae.map(e=>(0,W.jsx)(`option`,{value:e.address,children:Z(e.address,Ae,k.presenceByAddress)},e.address))]}),(0,W.jsx)(`button`,{className:`btn btn-secondary`,disabled:!V.includes(`compare`)||!x,onClick:()=>$(`compare`,{target:x}),children:e(`game.zhajinhua.action.compare`)})]})]}),(0,W.jsxs)(`div`,{className:U.panelSection,children:[(0,W.jsx)(`div`,{className:U.panelTitle,children:e(`game.status.title`)}),(0,W.jsxs)(`div`,{className:U.statusGrid,children:[(0,W.jsx)(`span`,{children:e(`game.host`)}),(0,W.jsx)(`strong`,{children:N?J(N):`-`}),(0,W.jsx)(`span`,{children:e(`game.zhajinhua.myChips`)}),(0,W.jsx)(`strong`,{children:R?.chips??1e3}),(0,W.jsx)(`span`,{children:e(`game.round`)}),(0,W.jsx)(`strong`,{children:ke}),(0,W.jsx)(`span`,{children:e(`game.hint`)}),(0,W.jsx)(`strong`,{children:M?.lastAction||e(`game.waitingPlayers`)})]})]})]})]}):(0,W.jsxs)(`section`,{className:U.entry,children:[(0,W.jsxs)(`div`,{className:U.entryBrand,children:[(0,W.jsx)(`div`,{className:U.cardMark,children:(0,W.jsx)(_,{size:48})}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{children:e(`game.zhajinhua.hero.title`)}),(0,W.jsx)(`p`,{children:e(`game.hero.desc`)})]})]}),(0,W.jsxs)(`div`,{className:U.entryPanel,children:[(0,W.jsxs)(`div`,{className:U.accountLine,children:[(0,W.jsx)(`span`,{children:e(`game.currentAccount`)}),(0,W.jsx)(`strong`,{translate:`no`,children:k.userIdentity?.displayName||e(`web3.notSignedIn`)})]}),(0,W.jsxs)(`button`,{className:`btn btn-primary`,disabled:k.joining,onClick:we,children:[(0,W.jsx)(ne,{size:16}),e(`game.action.createRoom`)]}),(0,W.jsxs)(`form`,{onSubmit:Te,className:U.joinForm,children:[(0,W.jsxs)(`label`,{children:[e(`game.roomCode`),(0,W.jsx)(`input`,{value:r,maxLength:8,onChange:e=>i(e.target.value.toUpperCase()),placeholder:e(`game.roomCode.placeholder`)})]}),(0,W.jsx)(`button`,{className:`btn`,disabled:k.joining||!r,children:e(`game.action.joinRoom`)})]}),(0,W.jsx)(`p`,{className:U.status,children:k.isBackendReady?e(`game.status.nodeConnected`):e(`game.status.nodeConnecting`)})]})]})})})}function Se({lastCompare:e,compareReveal:t,myAddress:n,myDealtHand:r,lobbyPlayers:i,presenceByAddress:a,onClose:o}){let{t:s}=ee(),c=Z(e.initiator,i,a),l=Z(e.target,i,a),u=Z(e.winner,i,a),d=q(n,e.initiator),f=q(n,e.target),p=d||f;function m(e,i){return t[e]||(p&&q(e,n)&&i&&r?r:null)}let h=m(e.initiator,e.initiatorLooked),g=m(e.target,e.targetLooked);return(0,W.jsx)(`div`,{className:U.compareOverlay,onClick:o,children:(0,W.jsxs)(`div`,{className:U.compareBox,onClick:e=>e.stopPropagation(),children:[(0,W.jsx)(`div`,{className:U.compareTitle,children:s(`game.zhajinhua.compareResult`)}),(0,W.jsxs)(`div`,{className:U.comparePlayers,children:[(0,W.jsxs)(`div`,{className:K(U.compareSide,q(e.winner,e.initiator)&&U.compareWinner),children:[(0,W.jsx)(`div`,{className:U.compareName,children:c}),(0,W.jsx)(`div`,{className:U.compareCards,children:h?h.map(e=>{let t=Y(e);return(0,W.jsxs)(`div`,{className:K(U.card,U[t.color]),children:[(0,W.jsx)(`span`,{children:t.rank}),(0,W.jsx)(`i`,{children:t.suit})]},e)}):[0,1,2].map(e=>(0,W.jsx)(`div`,{className:U.cardBack,children:(0,W.jsx)(_,{size:18})},e))}),h&&(0,W.jsx)(`div`,{className:U.compareLabel,children:P(h)})]}),(0,W.jsx)(`div`,{className:U.compareVs,children:`VS`}),(0,W.jsxs)(`div`,{className:K(U.compareSide,q(e.winner,e.target)&&U.compareWinner),children:[(0,W.jsx)(`div`,{className:U.compareName,children:l}),(0,W.jsx)(`div`,{className:U.compareCards,children:g?g.map(e=>{let t=Y(e);return(0,W.jsxs)(`div`,{className:K(U.card,U[t.color]),children:[(0,W.jsx)(`span`,{children:t.rank}),(0,W.jsx)(`i`,{children:t.suit})]},e)}):[0,1,2].map(e=>(0,W.jsx)(`div`,{className:U.cardBack,children:(0,W.jsx)(_,{size:18})},e))}),g&&(0,W.jsx)(`div`,{className:U.compareLabel,children:P(g)})]})]}),(0,W.jsx)(`div`,{className:U.compareResult,children:s(`game.zhajinhua.result.winner`,{player:u})}),(0,W.jsx)(`button`,{className:`btn btn-sm`,onClick:o,children:s(`common.close`)})]})})}function Z(e,t,n){let r=Q(e);return n.get(r)?.displayName||t.find(e=>Q(e.address)===r)?.name||J(e)}function Q(e=``){return String(e||``).trim().toLowerCase()}function Ce(e,t,n){let r=Q(e.address),i=t.get(r);return{name:Z(e.address,[e],t),avatar:i?.avatar||e.avatar||``,online:r?n.has(r):!1}}var we=h(`/game/zhajinhua/`)({component:X});export{we as Route};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),n=e(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]);export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{$ as r,Y as i,Z as a}from"./avatar-BZwHW4ll.js";import{a as o}from"./i18n-DZaOYCSO.js";import{a as s}from"./AccountMenu-NjOgag0d.js";import{t as c}from"./copy-CK7HMulu.js";import{t as l}from"./dayjs.min-Dcc0B6Je.js";var u=r(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),d=t(e(),1),f=n();function p({text:e,label:t,copiedLabel:n,className:r=`btn btn-icon`,iconSize:i=14}){let{t:a}=o(),[l,u]=(0,d.useState)(!1),p=n||a(`common.copied`),m=t||a(`common.copy`);async function h(){try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),1500)}catch{}}return(0,f.jsxs)(`button`,{type:`button`,className:r,onClick:h,title:l?p:m,children:[l?(0,f.jsx)(s,{size:i}):(0,f.jsx)(c,{size:i}),t?l?p:t:null]})}var m=t(i(),1);l();var h=`0123456789abcdefghijklmnopqrstuvwxyz`,g=e=>{let t=[];for(;e>=128;)t.push(e&127|128),e>>=7;return t.push(e),t},_=e=>{let t=new Uint8Array([8,1,18,...g(e.length)]),n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n},v=(e,t)=>{if(e.length===0)return``;let n=t.length,r=0;for(;r<e.length&&e[r]===0;)r++;let i=[0];for(let t=r;t<e.length;t++){let r=e[t];for(let e=0;e<i.length;e++){let t=i[e]*256+r;i[e]=t%n,r=Math.floor(t/n)}for(;r>0;)i.push(r%n),r=Math.floor(r/n)}let a=``;for(let e=0;e<r;e++)a+=t[0];for(let e=i.length-1;e>=0;e--)a+=t[i[e]];return a},y=(e,t)=>{let n=t.slice(2),r=new Uint8Array(a(e+n));return m.default.sign.keyPair.fromSecretKey(r)},b=(e,t)=>{let n=_(y(e,t).publicKey),r=new Uint8Array(2+n.length);r[0]=0,r[1]=36,r.set(n,2);let i=new Uint8Array([1,114]),a=new Uint8Array(i.length+r.length);return a.set(i,0),a.set(r,i.length),`k`+v(a,h)};export{u as i,b as n,p as r,y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),n=e(`notebook-pen`,[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]);export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),n=e(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]);export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),n=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]);export{t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,o as t}from"./jsx-runtime-Bt-cYkS5.js";import{
|
|
1
|
+
import{n as e,o as t}from"./jsx-runtime-Bt-cYkS5.js";import{R as n,x as r}from"./avatar-BZwHW4ll.js";import{i,r as ee}from"./userProfile-UphvP_bG.js";var a=t(e(),1);function o(e=``,t=[]){let n=[e,...t];return[...new Set(n.filter(Boolean))]}function s(e=[]){return o(``,e).join(`
|
|
2
2
|
`)}function c(e,t){let n=new Set(e),r=new Set(t);return{subscribe:[...r].filter(e=>!n.has(e)),unsubscribe:[...n].filter(e=>!r.has(e))}}var te=15*1e3;function l(e){return String(e.id||`${e.author||``}-${e.timestamp||``}-${e.content||``}`)}function u(e){let t=Number(e.timestamp);return Number.isFinite(t)?t:0}function d(e){return e.map((e,t)=>({message:e,index:t})).sort((e,t)=>{let n=u(e.message)-u(t.message);return n===0?e.index-t.index:n}).map(e=>e.message)}function ne(){return`presence-${Date.now()}-${Math.random().toString(36).slice(2)}`}function f({isReady:e,enabled:t=!0,channelName:u=``,extraSubscribedChannelNames:f=[],peerId:p=``,waitForPeerId:m=!1,limit:h=100,reconnectBaseDelay:g=2500,acceptMessage:_,getMessageKey:v=l,onSyncError:y,onSocketEvent:b,onReconnect:x,presenceEnabled:S=!1,presenceProfile:C={}}){let w=n(e=>e.identity),[re,T]=(0,a.useState)([]),[E,D]=(0,a.useState)(!1),O=(0,a.useMemo)(()=>s(f),[f]),k=(0,a.useRef)(null),A=(0,a.useRef)(u),j=(0,a.useRef)(f),M=(0,a.useRef)(null),N=(0,a.useRef)(0),P=(0,a.useRef)(_),F=(0,a.useRef)(v),I=(0,a.useRef)(b),L=(0,a.useRef)(y),R=(0,a.useRef)(x),z=(0,a.useRef)(p),B=(0,a.useRef)(new Set),V=(0,a.useRef)(S),H=(0,a.useRef)(C),U=(0,a.useRef)(ne()),W=(0,a.useRef)(``);(0,a.useEffect)(()=>{j.current=O?O.split(`
|
|
3
3
|
`):[]},[O]),(0,a.useEffect)(()=>{P.current=_},[_]),(0,a.useEffect)(()=>{F.current=v},[v]),(0,a.useEffect)(()=>{I.current=b},[b]),(0,a.useEffect)(()=>{L.current=y},[y]),(0,a.useEffect)(()=>{R.current=x},[x]),(0,a.useEffect)(()=>{V.current=S},[S]),(0,a.useEffect)(()=>{H.current=C},[C]);let G=(0,a.useCallback)(e=>{let t=P.current;return t?e.filter(t):e},[]),K=(0,a.useCallback)((e,t,n=!0)=>{let r=[...e];for(let e of G(t)){let t=F.current(e);if(n){let n=r.findIndex(t=>t.pending&&t.author?.toLowerCase()===e.author?.toLowerCase()&&t.content===e.content);if(n!==-1){r[n]={...e,id:e.id||t};continue}}r.some(e=>F.current(e)===t)||r.push({...e,id:e.id||t})}return d(r)},[G]),q=(0,a.useCallback)((e,t)=>{k.current?.readyState===WebSocket.OPEN&&k.current.send(JSON.stringify({event:e,data:t}))},[]),J=(0,a.useCallback)(e=>({channel:e,sessionId:U.current,...H.current}),[]),Y=(0,a.useCallback)((e=W.current)=>{e&&(q(`channel:presence:leave`,{channel:e,sessionId:U.current}),W.current===e&&(W.current=``))},[q]),X=(0,a.useCallback)(e=>{!e||!V.current||!w||(q(`channel:presence:join`,J(e)),W.current=e)},[J,w,q]),Z=(0,a.useCallback)(e=>{let t=new Set(e.filter(Boolean)),n=c(B.current,t);for(let e of n.unsubscribe)q(`channel:unsubscribe`,{channel:e});for(let e of n.subscribe)q(`channel:subscribe`,{channel:e});B.current=t},[q]),Q=(0,a.useCallback)(()=>o(A.current,j.current),[]),$=(0,a.useCallback)(async(t=A.current,n={})=>{if(!t||!e)return[];try{let e=G(await i.getChannelMessages(t,h));return T(t=>n.replace?d(e):K(t,e,!1)),e}catch(e){return n.replace&&T([]),await L.current?.(e),[]}},[G,e,h,K]);(0,a.useEffect)(()=>{z.current=p,p&&(q(`register`,{peerId:p}),m&&(Z(Q()),A.current&&$(A.current,{replace:!0})))},[Q,p,Z,$,m,q]);let ie=(0,a.useCallback)(()=>{T([])},[]),ae=(0,a.useCallback)(async({channelName:e=A.current,content:t,attachment:n,optimisticId:r})=>{let a=t.trim();if(!e||!a||!w)return null;let o=ee(w),s={id:r||`${o.author}-${Date.now()}-${Math.random().toString(36).slice(2)}`,...o,content:a,timestamp:Date.now(),pending:!0,attachment:n};T(e=>d([...e,s]));try{let t=await i.sendChannelMessage({channelName:e,content:a,...o,attachment:n});return T(e=>d(e.map(e=>e.id===s.id?{...t.message,id:t.message.id||F.current(t.message)}:e))),t.message}catch(e){throw T(e=>e.filter(e=>e.id!==s.id)),e}},[w]);return(0,a.useEffect)(()=>{A.current=u,!(!e||!t)&&(u&&$(u,{replace:!0}),(!m||z.current)&&Z(Q()))},[u,t,O,Q,e,Z,$,m]),(0,a.useEffect)(()=>{if(!E||!S||!w||!u){Y();return}let e=W.current;e&&e!==u&&Y(e),W.current!==u&&X(u)},[u,E,X,Y,S,w]),(0,a.useEffect)(()=>{let e=W.current;!E||!S||!e||!w||q(`channel:presence:profile`,J(e))},[E,J,S,(0,a.useMemo)(()=>[C.displayName||``,C.avatar||``,C.profileUpdatedAt||``].join(`
|
|
4
4
|
`),[C.avatar,C.displayName,C.profileUpdatedAt]),w,q]),(0,a.useEffect)(()=>{if(!E||!S||!w)return;let e=window.setInterval(()=>{let e=W.current;e&&q(`channel:presence:heartbeat`,{channel:e,sessionId:U.current})},te);return()=>window.clearInterval(e)},[E,S,w,q]),(0,a.useEffect)(()=>{!e||!t||m&&!z.current||Z(Q())},[t,Q,e,Z,m]),(0,a.useEffect)(()=>{if(!e||!t){D(!1);return}let n=!1;N.current=0;async function i(){let e=new WebSocket(await r(`/ws`));if(n){e.close();return}e.onopen=()=>{D(!0),N.current=0,z.current&&e.send(JSON.stringify({event:`register`,data:{peerId:z.current}})),(!m||z.current)&&(B.current.clear(),Z(Q()),A.current&&$(A.current,{replace:!0}),R.current?.())},e.onmessage=e=>{try{let t=JSON.parse(e.data);I.current?.(t.event,t.data),t.event===`channel:message`&&t.data?.channel===A.current&&t.data?.message&&T(e=>K(e,[t.data.message])),t.event===`user:metadata:updated`&&t.data?.scope===`channels`&&A.current&&$(A.current,{replace:!0})}catch{}},e.onclose=()=>{if(D(!1),W.current=``,n)return;let e=N.current;if(e>=20)return;let t=Math.min(g*2**e,3e4);N.current=e+1,M.current=setTimeout(i,t)},e.onerror=()=>e.close(),k.current=e}return i(),()=>{n=!0,M.current&&clearTimeout(M.current),Y(),k.current?.close(),k.current=null,B.current.clear()}},[t,Q,e,Y,K,g,Z,$,m]),{clearMessages:ie,connected:E,messages:re,sendMessage:ae,setMessages:T,syncMessages:$}}export{f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{$ as r,A as i,D as a,E as o,M as s,O as c,R as l,_ as u,f as d,j as f,k as p,rt as m}from"./avatar-BZwHW4ll.js";import{a as h}from"./i18n-DZaOYCSO.js";import{t as g}from"./SidebarHomeLink-CkhGDvZ8.js";import{i as _,n as v,r as y,t as b}from"./userProfile-UphvP_bG.js";import{t as x}from"./useChannelMessages-Bs_RWgO4.js";var S=r(`spade`,[[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5`,key:`1aw2pz`}]]),C=r(`swords`,[[`polyline`,{points:`14.5 17.5 3 6 3 3 6 3 17.5 14.5`,key:`1hfsw2`}],[`line`,{x1:`13`,x2:`19`,y1:`19`,y2:`13`,key:`1vrmhu`}],[`line`,{x1:`16`,x2:`20`,y1:`16`,y2:`20`,key:`1bron3`}],[`line`,{x1:`19`,x2:`21`,y1:`21`,y2:`19`,key:`13pww6`}],[`polyline`,{points:`14.5 6.5 18 3 21 3 21 6 17.5 9.5`,key:`hbey2j`}],[`line`,{x1:`5`,x2:`9`,y1:`14`,y2:`18`,key:`1hf58s`}],[`line`,{x1:`7`,x2:`4`,y1:`17`,y2:`20`,key:`pidxm4`}],[`line`,{x1:`3`,x2:`5`,y1:`19`,y2:`21`,key:`1pehsh`}]]),w=n(),T=[{id:`gandengyan`,labelKey:`game.gandengyan.title`,href:`/game/gandengyan/`,icon:(0,w.jsx)(C,{size:16})},{id:`zhajinhua`,labelKey:`game.zhajinhua.title`,href:`/game/zhajinhua/`,icon:(0,w.jsx)(S,{size:16})}];function E({activeGame:e,closeSidebar:t}){let{t:n}=h();return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(g,{onNavigate:t}),(0,w.jsx)(`nav`,{className:`sidebar-nav`,children:T.map(r=>(0,w.jsxs)(m,{to:r.href,className:`sidebar-nav-btn ${e===r.id?`active`:``}`,onClick:t,children:[r.icon,(0,w.jsx)(`span`,{children:n(r.labelKey)})]},r.id))})]})}var D=t(e(),1),O=`game`,k=`mostbox.game.event`,A=[`gandengyan`,`zhajinhua`],j=`ABCDEFGHJKLMNPQRSTUVWXYZ23456789`;function M(e){let t=String(e||``).trim().toLowerCase();return A.includes(t)?t:``}function N(e){return i(e)}function P(e){return/^[A-Z0-9]{4,8}$/.test(String(e||``))}function F(){let e=``;for(let t=0;t<6;t++)e+=j[f(32)];return e}function I(e,t){let n=M(e),r=N(t);return!n||!P(r)?``:`game.${n}.${r.toLowerCase()}`}function L({gameId:e,roomCode:t,event:n,payload:r}){let i=M(e);return{kind:k,version:1,gameId:i,roomCode:N(t),event:String(n||``),eventId:o(i||`game`),payload:r||{}}}function R(e,t={}){try{let n=JSON.parse(String(e||``));if(!n||n.kind!==`mostbox.game.event`||n.version!==1||typeof n.event!=`string`||typeof n.eventId!=`string`)return null;let r=M(n.gameId),i=N(n.roomCode);return!r||!P(i)||t.gameId&&r!==M(t.gameId)||t.roomCode&&i!==N(t.roomCode)?null:{...n,gameId:r,roomCode:i,payload:n.payload&&typeof n.payload==`object`?n.payload:{}}}catch{return null}}function z(e=[],t={}){let n=[],r=new Map,i=``;for(let o of U(e)){let e=R(o.content,t);if(e){if(e.event===`room:create`){let t=V(e.payload?.player,o);if(!t)continue;i||=t.address,H(n,r,t);continue}if(e.event===`player:join`){let t=V(e.payload?.player,o);t&&H(n,r,t);continue}if(e.event===`player:leave`){let t=a(e.payload?.player?.address||o.author);if(t){let e=n.findIndex(e=>e.address===t);e!==-1&&(n.splice(e,1),r.delete(t))}}}}return{gameId:M(t.gameId),roomCode:N(t.roomCode),hostAddress:i,players:n}}function B(e=[],t={}){let n=null;for(let r of U(e)){let e=R(r.content,t);if(!e||e.event!==`room:state`)continue;let i=Number(e.payload?.seq||0);(!n||i>=Number(n.payload?.seq||0))&&(n=e)}return n}function V(e,t){if(!e||typeof e!=`object`)return null;let n=t&&typeof t==`object`?t:{author:t},r=n.author,i=a(e.address||r);if(!i||a(r)!==i)return null;let o=p(n.authorName||e.name,s(i)),l=c(n.avatar||e.avatar),u={address:i,name:o,publicKey:String(e.publicKey||``).trim(),joinedAt:Number(e.joinedAt||Date.now())};return l&&(u.avatar=l),u}function H(e,t,n){let r=t.get(n.address);if(r){Object.assign(r,n);return}e.push(n),t.set(n.address,n)}function U(e){return[...e].sort((e,t)=>Number(e.timestamp||0)-Number(t.timestamp||0))}function W({gameId:e,onError:t,getPlayerPayload:n}){let{t:r}=h(),i=d(e=>e.hasBackend),o=d(e=>e.checkBackend),s=d(e=>e.openConnectModal),c=l(e=>e.identity),f=l(e=>e.openLoginModal),[p,m]=(0,D.useState)(``),[g,v]=(0,D.useState)(``),[y,S]=(0,D.useState)([]),[C,w]=(0,D.useState)(!1),T=(0,D.useRef)(g);T.current=g;let E=i===!0,k=(0,D.useMemo)(()=>c?{...b(c),profileUpdatedAt:c.profileUpdatedAt}:{},[c?.avatar,c?.displayName,c?.profileUpdatedAt,c?.username]),A=(0,D.useCallback)(async(e,n)=>{let r=await u(e,n);t&&t(r)},[t]),j=(0,D.useCallback)(async(e=T.current)=>{if(!e||!E)return S([]),[];try{let t=await _.getChannelPresence(e);return T.current===e?(S(t),t):[]}catch(e){return console.warn(`[Game] Failed to fetch channel presence:`,e instanceof Error?e.message:e),[]}},[E]),M=(0,D.useCallback)((e,t)=>{if(e!==`channel:presence`)return;let n=String(t?.channelKey||t?.channel||``).trim(),r=T.current;r&&(!n||n===r)&&j(r)},[j]),P=(0,D.useCallback)(t=>!!R(t.content,{gameId:e,roomCode:p}),[e,p]),z=(0,D.useCallback)(t=>{let n=R(t.content,{gameId:e,roomCode:p});return n?`${t.author}-${n.eventId}`:`${t.author}-${t.timestamp}-${t.content}`},[e,p]),{clearMessages:B,connected:V,messages:H,sendMessage:U,syncMessages:W}=x({isReady:E,enabled:!!c,channelName:g,limit:500,acceptMessage:P,getMessageKey:z,onSyncError:e=>A(e,r(`game.room.error.readLog`)),onSocketEvent:M,onReconnect:()=>{j()},presenceEnabled:!!(g&&c),presenceProfile:k});(0,D.useEffect)(()=>{if(!g||!E){S([]);return}j(g)},[g,E,j]);let K=(0,D.useMemo)(()=>H.map(t=>({message:t,event:R(t.content,{gameId:e,roomCode:p})})).filter(e=>e.event),[e,H,p]),J=(0,D.useMemo)(()=>{let e=new Map;return y.forEach(t=>{let n=a(t.address);!n||!t.online||e.set(n,t)}),e},[y]),Y=(0,D.useMemo)(()=>new Set(J.keys()),[J]),X=(0,D.useCallback)(()=>c?E?!0:(s(),!1):(f(),!1),[E,s,f,c]);(0,D.useEffect)(()=>{i===null&&o()},[o,i]);let Z=(0,D.useCallback)(async(i,a=!1)=>{if(!X()||!c)return!1;let o=a?F():N(i),s=I(e,o);if(!s)return t&&t(r(`game.room.error.invalidCode`)),!1;w(!0);try{let t=await _.createChannel(s,O,b(c)),r=t.channelKey||t.key||s;return await G(r,c,e,o,a?`room:create`:`player:join`,{player:q(c,n?.(c))}),m(o),v(r),B(),!0}catch(e){return await A(e,r(a?`game.room.error.createFailed`:`game.room.error.joinFailed`)),!1}finally{w(!1)}},[X,e,n,t,A,B,r,c]);return{channelName:g,channelPresence:y,connected:V,createRoom:(0,D.useCallback)(()=>Z(``,!0),[Z]),ensureReady:X,isBackendReady:E,joinRoom:(0,D.useCallback)(e=>Z(e),[Z]),joining:C,messages:H,onlineAddresses:Y,presenceByAddress:J,roomCode:p,roomEvents:K,sendRoomEvent:(0,D.useCallback)(async(t,n={})=>{if(!X()||!c||!g||!p)return!1;let i=L({gameId:e,roomCode:p,event:t,payload:n}),a=JSON.stringify(i);try{return await U({channelName:g,content:a,optimisticId:`${c.address}-${i.eventId}`}),!0}catch(e){return await A(e,r(`game.room.error.sendEventFailed`)),!1}},[g,X,e,A,p,U,r,c]),setRoomCode:m,syncMessages:W,userIdentity:c}}async function G(e,t,n,r,i,a){let o=L({gameId:n,roomCode:r,event:i,payload:a});await _.sendChannelMessage({channelName:e,content:JSON.stringify(o),...y(t)})}function K(e){return{address:e.address,name:v(e),avatar:e.avatar||``,publicKey:``,joinedAt:Date.now()}}function q(e,t={}){let n=K(e),r={...n,...t};return Object.prototype.hasOwnProperty.call(t,`avatar`)||(r.avatar=n.avatar),r}export{S as a,E as i,z as n,B as r,W as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e,p as t}from"./avatar-BZwHW4ll.js";var n={getChannels(e={}){let n=new URLSearchParams;e.type&&n.set(`type`,e.type);let r=n.toString();return t.get(r?`/api/channels?${r}`:`/api/channels`).json()},createChannel(e,n=`personal`,r={}){return t.post(`/api/channels`,{json:{name:e,type:n,...r}}).json()},leaveChannel(e){return t.delete(`/api/channels`,{json:{channelKey:e}}).json()},getChannelMessages(e,n=100,r=0){return t.get(`/api/channels/${encodeURIComponent(e)}/messages?limit=${n}&offset=${r}`).json()},sendChannelMessage({channelName:e,content:n,author:r,authorName:i,avatar:a,attachment:o}){return t.post(`/api/channels/${encodeURIComponent(e)}/messages`,{json:o?{content:n,author:r,authorName:i,avatar:a,attachment:o}:{content:n,author:r,authorName:i,avatar:a}}).json()},getChannelPeers(e){return t.get(`/api/channels/${encodeURIComponent(e)}/peers`).json()},getChannelPresence(e){return t.get(`/api/channels/${encodeURIComponent(e)}/presence`).json()},setChannelRemark(e,n){return t.put(`/api/channels/${encodeURIComponent(e)}/remark`,{json:{remark:n}}).json()},setChannelPinned(e,n){return t.put(`/api/channels/${encodeURIComponent(e)}/pin`,{json:{pinned:n}}).json()},getFileDownloadUrl(t){return e(`/api/files/${t}/download`)}};function r(e){return e.displayName||e.username}function i(e){return{displayName:r(e),avatar:e.avatar||``}}function a(e){return{author:e.address,authorName:r(e),avatar:e.avatar||``}}export{n as i,r as n,a as r,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`wallet`,[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e}from"./avatar-BZwHW4ll.js";var t=e(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]);export{t};
|
package/out/chat/index.html
CHANGED
|
Binary file
|
package/out/chat/join/index.html
CHANGED
|
Binary file
|
package/out/download/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-
|
|
1
|
+
<!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-CBkHUp3F.css" data-precedence="default"/><title>下载 MostBox 桌面客户端</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="下载 MostBox 桌面客户端,获得完整的 P2P 文件分享、下载校验和持续做种能力"/><link rel="modulepreload" href="/assets/index-DluhgSHX.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="modulepreload" href="/assets/avatar-BZwHW4ll.js"/><link rel="modulepreload" href="/assets/useNavigate-DWlBD_-b.js"/><link rel="modulepreload" href="/assets/i18n-DZaOYCSO.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
|
|
2
2
|
(function() {
|
|
3
3
|
var theme = localStorage.getItem('theme');
|
|
4
4
|
if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
window.onunhandledrejection = function(event) {
|
|
18
18
|
console.error('[Unhandled Promise Rejection]', event.reason);
|
|
19
19
|
};
|
|
20
|
-
</script><!--$--><div class="download-page"><nav class="mkt-nav"><div class="mkt-nav-inner"><button type="button" class="mkt-nav-logo"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-left" aria-hidden="true"><path d="m12 19-7-7 7-7"></path><path d="M19 12H5"></path></svg><span>MOST PEOPLE</span></button><div class="mkt-nav-cta"><button type="button" class="mkt-theme-toggle" aria-label="切换主题" title="切换主题"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"></path></svg></button><span class="ui-action-menu-anchor"><button type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="_R_a5r6_" class="language-toggle mkt-theme-toggle" aria-label="选择语言" title="选择语言 (当前语言: 简体中文)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button></span></div></div></nav><section class="download-hero"><div class="mkt-container"><div class="download-hero-icon"><svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg></div><h1 class="download-hero-title">下载客户端</h1><p class="download-hero-desc">桌面客户端是当前 MVP 的首选入口,内置本地 P2P 节点,提供发布、下载校验和持续做种的完整能力。Web 端只连接已有 MostBox 节点。</p></div></section><section class="download-platforms"><div class="mkt-container"><h2 class="download-section-title">选择你的平台</h2><div class="download-options"><div class="ui-segmented-control download-source-tabs" role="tablist" aria-label="下载来源"><button type="button" role="tab" aria-selected="false" disabled="" class="ui-segmented-option download-source-tab"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud" aria-hidden="true"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"></path></svg>Cloudflare R2</button><button type="button" role="tab" aria-selected="true" class="ui-segmented-option download-source-tab is-active"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code" aria-hidden="true"><path d="m16 18 6-6-6-6"></path><path d="m8 6-6 6 6 6"></path></svg>GitHub Releases</button></div><p class="download-source-note">正在获取 Cloudflare R2 高速镜像。</p><div class="download-current-platform" aria-label="当前系统"><article class="download-current-card"><div class="download-current-main"><div class="download-current-icon"><svg xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-current-copy"><div class="download-current-labels"><span class="download-current-kicker"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg>当前系统</span><span class="download-current-recommended">推荐下载</span></div><div class="download-current-heading"><h3>Windows</h3><span>x64</span></div><p>Windows 10 或更高版本</p><dl class="download-current-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl></div></div><div class="download-current-actions"><span>已匹配你的设备</span><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a><p>GitHub Releases</p></div></article></div><div class="download-other-platforms"><p class="download-other-platforms-title">桌面端</p><div class="download-platform-grid"><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>arm64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>x64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>arm64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>x64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>arm64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article></div><div class="download-coming-soon"><p class="download-coming-soon-title">移动端</p><div class="download-coming-soon-grid"><article class="download-coming-soon-card"><div class="download-platform-icon download-coming-soon-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-smartphone" aria-hidden="true"><rect width="14" height="20" x="5" y="2" rx="2" ry="2"></rect><path d="M12 18h.01"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>iOS</h3><span>敬请期待</span></div><p>iPhone / iPad 客户端规划中</p></div></article><article class="download-coming-soon-card"><div class="download-platform-icon download-coming-soon-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-tablet-smartphone" aria-hidden="true"><rect width="10" height="14" x="3" y="8" rx="2"></rect><path d="M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4"></path><path d="M8 18h.01"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>安卓</h3><span>敬请期待</span></div><p>Android 手机和平板客户端规划中</p></div></article></div></div></div></div></div></section><section class="download-comparison"><div class="mkt-container"><h2 class="download-section-title">Web 端 vs 桌面端</h2><div class="download-table-wrap"><table class="download-table"><thead><tr><th>功能</th><th>Web 端</th><th>桌面端</th></tr></thead><tbody><tr><td>节点能力</td><td class="col-web">连接已有节点</td><td class="col-desktop">内置本地节点</td></tr><tr><td>P2P 文件分享</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>下载校验</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>持续做种</td><td class="col-web">依赖所连节点</td><td class="col-desktop">默认开启</td></tr><tr><td>大文件传输</td><td class="col-web">依赖所连节点</td><td class="col-desktop">10GB 上限内</td></tr></tbody></table></div></div></section><section class="download-cta"><div class="mkt-container"><p class="download-hero-desc">使用 npm 入口请先安装 Node.js >= 22.12,然后运行 npx most-box@latest 启动本机完整节点。</p></div></section><section class="download-cta"><div class="mkt-container"><a href="/" class="btn btn-primary">回首页</a></div></section><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><p class="mkt-footer-copy">MostBox</p></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-C-_ZwxuN.js","/assets/jsx-runtime-Bt-cYkS5.js","/assets/ui-BpDGD3IR.js","/assets/useNavigate-DWlBD_-b.js","/assets/i18n-NjvOSuV6.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-C-_ZwxuN.js"}}],css:$R[8]=["/assets/index-BHZhApbo.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1782289898827,s:"success",ssr:!0},$R[11]={i:"downloaddownload",u:1782289898831,s:"success",ssr:!0}],lastMatchId:"downloaddownload"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-C-_ZwxuN.js"></script></body></html>
|
|
20
|
+
</script><!--$--><div class="download-page"><nav class="mkt-nav"><div class="mkt-nav-inner"><button type="button" class="mkt-nav-logo"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-left" aria-hidden="true"><path d="m12 19-7-7 7-7"></path><path d="M19 12H5"></path></svg><span>MOST PEOPLE</span></button><div class="mkt-nav-cta"><button type="button" class="header-tool-btn" title="切换主题" aria-label="切换主题" aria-pressed="false"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"></path></svg></button><span class="ui-action-menu-anchor language-toggle"><button type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="_R_a5r6_" class="header-tool-btn" title="选择语言" aria-label="选择语言"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button></span><a title="个人资料" aria-label="个人资料" href="/profile/" class="account-profile-link"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user" aria-hidden="true"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg></a></div></div></nav><section class="download-hero"><div class="mkt-container"><div class="download-hero-icon"><svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg></div><h1 class="download-hero-title">下载客户端</h1><p class="download-hero-desc">桌面客户端是当前 MVP 的首选入口,内置本地 P2P 节点,提供发布、下载校验和持续做种的完整能力。Web 端只连接已有 MostBox 节点。</p></div></section><section class="download-platforms"><div class="mkt-container"><h2 class="download-section-title">选择你的平台</h2><div class="download-options"><div class="ui-segmented-control download-source-tabs" role="tablist" aria-label="下载来源"><button type="button" role="tab" aria-selected="false" disabled="" class="ui-segmented-option download-source-tab"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud" aria-hidden="true"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"></path></svg>Cloudflare R2</button><button type="button" role="tab" aria-selected="true" class="ui-segmented-option download-source-tab is-active"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code" aria-hidden="true"><path d="m16 18 6-6-6-6"></path><path d="m8 6-6 6 6 6"></path></svg>GitHub Releases</button></div><p class="download-source-note">正在获取 Cloudflare R2 高速镜像。</p><div class="download-current-platform" aria-label="当前系统"><article class="download-current-card"><div class="download-current-main"><div class="download-current-icon"><svg xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-current-copy"><div class="download-current-labels"><span class="download-current-kicker"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg>当前系统</span><span class="download-current-recommended">推荐下载</span></div><div class="download-current-heading"><h3>Windows</h3><span>x64</span></div><p>Windows 10 或更高版本</p><dl class="download-current-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl></div></div><div class="download-current-actions"><span>已匹配你的设备</span><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a><p>GitHub Releases</p></div></article></div><div class="download-other-platforms"><p class="download-other-platforms-title">桌面端</p><div class="download-platform-grid"><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>arm64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>x64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>arm64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>x64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>arm64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article></div><div class="download-coming-soon"><p class="download-coming-soon-title">移动端</p><div class="download-coming-soon-grid"><article class="download-coming-soon-card"><div class="download-platform-icon download-coming-soon-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-smartphone" aria-hidden="true"><rect width="14" height="20" x="5" y="2" rx="2" ry="2"></rect><path d="M12 18h.01"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>iOS</h3><span>敬请期待</span></div><p>iPhone / iPad 客户端规划中</p></div></article><article class="download-coming-soon-card"><div class="download-platform-icon download-coming-soon-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-tablet-smartphone" aria-hidden="true"><rect width="10" height="14" x="3" y="8" rx="2"></rect><path d="M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4"></path><path d="M8 18h.01"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>安卓</h3><span>敬请期待</span></div><p>Android 手机和平板客户端规划中</p></div></article></div></div></div></div></div></section><section class="download-comparison"><div class="mkt-container"><h2 class="download-section-title">Web 端 vs 桌面端</h2><div class="download-table-wrap"><table class="download-table"><thead><tr><th>功能</th><th>Web 端</th><th>桌面端</th></tr></thead><tbody><tr><td>节点能力</td><td class="col-web">连接已有节点</td><td class="col-desktop">内置本地节点</td></tr><tr><td>P2P 文件分享</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>下载校验</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>持续做种</td><td class="col-web">依赖所连节点</td><td class="col-desktop">默认开启</td></tr><tr><td>大文件传输</td><td class="col-web">依赖所连节点</td><td class="col-desktop">10GB 上限内</td></tr></tbody></table></div></div></section><section class="download-cta"><div class="mkt-container"><p class="download-hero-desc">使用 npm 入口请先安装 Node.js >= 22.12,然后运行 npx most-box@latest 启动本机完整节点。</p></div></section><section class="download-cta"><div class="mkt-container"><a href="/" class="btn btn-primary">回首页</a></div></section><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><p class="mkt-footer-copy">MostBox</p></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-DluhgSHX.js","/assets/jsx-runtime-Bt-cYkS5.js","/assets/avatar-BZwHW4ll.js","/assets/useNavigate-DWlBD_-b.js","/assets/i18n-DZaOYCSO.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-DluhgSHX.js"}}],css:$R[8]=["/assets/index-CBkHUp3F.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1782383355702,s:"success",ssr:!0},$R[11]={i:"downloaddownload",u:1782383355705,s:"success",ssr:!0}],lastMatchId:"downloaddownload"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-DluhgSHX.js"></script></body></html>
|
|
Binary file
|
package/out/game/index.html
CHANGED
|
Binary file
|
|
Binary file
|
package/out/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-
|
|
1
|
+
<!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-CBkHUp3F.css" data-precedence="default"/><title>MostBox</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="P2P 文件分享,无需注册"/><link rel="modulepreload" href="/assets/index-DluhgSHX.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="modulepreload" href="/assets/avatar-BZwHW4ll.js"/><link rel="modulepreload" href="/assets/useNavigate-DWlBD_-b.js"/><link rel="modulepreload" href="/assets/i18n-DZaOYCSO.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
|
|
2
2
|
(function() {
|
|
3
3
|
var theme = localStorage.getItem('theme');
|
|
4
4
|
if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
window.onunhandledrejection = function(event) {
|
|
18
18
|
console.error('[Unhandled Promise Rejection]', event.reason);
|
|
19
19
|
};
|
|
20
|
-
</script><!--$--><div class="mkt-layout"><nav class="mkt-nav"><div class="mkt-nav-inner"><a class="mkt-nav-logo active" href="/" data-status="active" aria-current="page"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.4"></rect><rect x="14" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="2" y="14" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="14" y="14" width="8" height="8" rx="2" fill="var(--accent)"></rect></svg>MOST PEOPLE</a><div class="mkt-nav-cta"><button type="button" class="mkt-theme-toggle" aria-label="切换主题" title="切换主题"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"></path></svg></button><span class="ui-action-menu-anchor"><button type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="_R_55r6_" class="language-toggle mkt-theme-toggle" aria-label="选择语言" title="选择语言 (当前语言: 简体中文)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button></span><a href="/download/" class="btn btn-primary mkt-nav-preview"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载客户端</a><button type="button" class="btn btn-secondary">开始使用</button></div></div></nav><main class="mkt-layout-main"><div class="portal-page"><section class="portal-hero"><div class="mkt-container"><h1 class="portal-hero-title">MOST PEOPLE</h1><p class="portal-hero-subtitle">去中心化 P2P 工具箱</p></div></section><section class="portal-cards-section"><div class="mkt-container"><div class="portal-cards"><button class="portal-card active"><a title="打开MostBox" href="/app/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></div><div class="portal-card-title">MostBox</div><div class="portal-card-subtitle">P2P 文件分享</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开P2P 聊天" href="/chat/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square" aria-hidden="true"><path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"></path></svg></div><div class="portal-card-title">P2P 聊天</div><div class="portal-card-subtitle">频道加密通讯</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开笔记" href="/note/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-notebook-pen" aria-hidden="true"><path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"></path><path d="M2 6h4"></path><path d="M2 10h4"></path><path d="M2 14h4"></path><path d="M2 18h4"></path><path d="M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"></path></svg></div><div class="portal-card-title">笔记</div><div class="portal-card-subtitle">加密云备份</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button><button class="portal-card "><a title="打开游戏" href="/game/gandengyan/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-gamepad2 lucide-gamepad-2" aria-hidden="true"><line x1="6" x2="10" y1="11" y2="11"></line><line x1="8" x2="8" y1="9" y2="13"></line><line x1="15" x2="15.01" y1="12" y2="12"></line><line x1="18" x2="18.01" y1="10" y2="10"></line><path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"></path></svg></div><div class="portal-card-title">游戏</div><div class="portal-card-subtitle">P2P 牌桌</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开Web3" href="/web3/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wallet" aria-hidden="true"><path d="M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"></path><path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"></path></svg></div><div class="portal-card-title">Web3</div><div class="portal-card-subtitle">账户工具箱</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button></div><div class="portal-node-actions" aria-label="节点入口"><button class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg>Web 连接节点</button><a href="/admin/" class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hard-drive" aria-hidden="true"><path d="M10 16h.01"></path><path d="M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><path d="M21.946 12.013H2.054"></path><path d="M6 16h.01"></path></svg>节点管理</a></div></div></section><section class="portal-marketing"><div class="mkt-container"><div class="portal-marketing-inner"><div class="portal-marketing-header"><h2>P2P 文件分享,无需注册</h2><p>基于 Hyperswarm 的去中心化文件传输,让文件分享回归点对点。MostBox 不是云盘;链接来自 CID,可用性来自当前在线种子。当前 MVP 优先使用桌面客户端。</p></div><div class="portal-marketing-features"><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>无需云端账号,使用本地身份隔离数据</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Hyperswarm P2P 直连传输</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>GB 级大文件流式处理</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相同文件 = 相同 CID,链接可反复校验</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>下载完成后默认继续做种</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相比微信、QQ 或网盘,不依赖中心化账号和云端托管</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Web 端只连接已有节点,桌面端提供完整 P2P 能力</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>MIT 开源,自托管,数据完全自主掌控</span></div></div><div class="portal-marketing-steps"><div class="portal-step"><span class="portal-step-num">1</span><div class="portal-step-content"><strong>下载客户端</strong><p>支持 Windows、macOS 和 Linux,桌面端提供完整的 P2P 能力。</p><p class="portal-step-link"><a href="/download/">前往下载页<!-- --> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></p></div></div><div class="portal-step"><span class="portal-step-num">2</span><div class="portal-step-content"><strong>安装并运行</strong><p>安装后打开应用,无需单独安装 Node.js。</p></div></div><div class="portal-step"><span class="portal-step-num">3</span><div class="portal-step-content"><strong>开始分享</strong><p>发布文件生成 most:// 链接,朋友下载校验通过后也会成为新的种子。</p></div></div></div><div class="portal-actions"><a href="/app/" class="btn btn-primary">进入 MostBox<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right" aria-hidden="true"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg></a></div></div></div></section></div></main><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><div class="mkt-footer-links"><a class="active" href="/" data-status="active" aria-current="page">关于</a><a href="/ping/">网络</a><a href="https://github.com/most-people/most" target="_blank" rel="noopener noreferrer">GitHub</a></div><span class="mkt-footer-copy">© <!-- -->2026<!-- --> MOST PEOPLE · MIT License</span><span class="mkt-footer-build" translate="no">v<!-- -->0.3.0</span></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-C-_ZwxuN.js","/assets/jsx-runtime-Bt-cYkS5.js","/assets/ui-BpDGD3IR.js","/assets/useNavigate-DWlBD_-b.js","/assets/i18n-NjvOSuV6.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-C-_ZwxuN.js"}}],css:$R[8]=["/assets/index-BHZhApbo.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1782289898549,s:"success",ssr:!0},$R[11]={i:"",u:1782289898752,s:"success",ssr:!0}],lastMatchId:""})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-C-_ZwxuN.js"></script></body></html>
|
|
20
|
+
</script><!--$--><div class="mkt-layout"><nav class="mkt-nav"><div class="mkt-nav-inner"><a class="mkt-nav-logo active" href="/" data-status="active" aria-current="page"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.4"></rect><rect x="14" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="2" y="14" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="14" y="14" width="8" height="8" rx="2" fill="var(--accent)"></rect></svg>MOST PEOPLE</a><div class="mkt-nav-cta"><button type="button" class="header-tool-btn" title="切换主题" aria-label="切换主题" aria-pressed="false"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"></path></svg></button><span class="ui-action-menu-anchor language-toggle"><button type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="_R_55r6_" class="header-tool-btn" title="选择语言" aria-label="选择语言"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button></span><a href="/download/" class="btn btn-primary mkt-nav-preview"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载客户端</a><a title="个人资料" aria-label="个人资料" href="/profile/" class="account-profile-link"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user" aria-hidden="true"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg></a></div></div></nav><main class="mkt-layout-main"><div class="portal-page"><section class="portal-hero"><div class="mkt-container"><h1 class="portal-hero-title">MOST PEOPLE</h1><p class="portal-hero-subtitle">去中心化 P2P 工具箱</p></div></section><section class="portal-cards-section"><div class="mkt-container"><div class="portal-cards"><button class="portal-card active"><a title="打开文件" href="/app/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></div><div class="portal-card-title">文件</div><div class="portal-card-subtitle">P2P 文件分享</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开聊天" href="/chat/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square" aria-hidden="true"><path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"></path></svg></div><div class="portal-card-title">聊天</div><div class="portal-card-subtitle">P2P 频道加密通讯</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开知识库" href="/note/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-notebook-pen" aria-hidden="true"><path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"></path><path d="M2 6h4"></path><path d="M2 10h4"></path><path d="M2 14h4"></path><path d="M2 18h4"></path><path d="M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"></path></svg></div><div class="portal-card-title">知识库</div><div class="portal-card-subtitle">加密云备份</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button><button class="portal-card "><a title="打开游戏" href="/game/gandengyan/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-gamepad2 lucide-gamepad-2" aria-hidden="true"><line x1="6" x2="10" y1="11" y2="11"></line><line x1="8" x2="8" y1="9" y2="13"></line><line x1="15" x2="15.01" y1="12" y2="12"></line><line x1="18" x2="18.01" y1="10" y2="10"></line><path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"></path></svg></div><div class="portal-card-title">游戏</div><div class="portal-card-subtitle">P2P 牌桌</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开Web3" href="/web3/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wallet" aria-hidden="true"><path d="M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"></path><path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"></path></svg></div><div class="portal-card-title">Web3</div><div class="portal-card-subtitle">账户工具箱</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button></div><div class="portal-node-actions" aria-label="节点入口"><button class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg>Web 连接节点</button><a href="/admin/" class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hard-drive" aria-hidden="true"><path d="M10 16h.01"></path><path d="M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><path d="M21.946 12.013H2.054"></path><path d="M6 16h.01"></path></svg>节点管理</a></div></div></section><section class="portal-marketing"><div class="mkt-container"><div class="portal-marketing-inner"><div class="portal-marketing-header"><h2>P2P 文件分享,无需注册</h2><p>基于 Hyperswarm 的去中心化文件传输,让文件分享回归点对点。MostBox 不是云盘;链接来自 CID,可用性来自当前在线种子。当前 MVP 优先使用桌面客户端。</p></div><div class="portal-marketing-features"><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>无需云端账号,使用本地身份隔离数据</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Hyperswarm P2P 直连传输</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>GB 级大文件流式处理</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相同文件 = 相同 CID,链接可反复校验</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>下载完成后默认继续做种</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相比微信、QQ 或网盘,不依赖中心化账号和云端托管</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Web 端只连接已有节点,桌面端提供完整 P2P 能力</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>MIT 开源,自托管,数据完全自主掌控</span></div></div><div class="portal-marketing-steps"><div class="portal-step"><span class="portal-step-num">1</span><div class="portal-step-content"><strong>下载客户端</strong><p>支持 Windows、macOS 和 Linux,桌面端提供完整的 P2P 能力。</p><p class="portal-step-link"><a href="/download/">前往下载页<!-- --> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></p></div></div><div class="portal-step"><span class="portal-step-num">2</span><div class="portal-step-content"><strong>安装并运行</strong><p>安装后打开应用,无需单独安装 Node.js。</p></div></div><div class="portal-step"><span class="portal-step-num">3</span><div class="portal-step-content"><strong>开始分享</strong><p>发布文件生成 most:// 链接,朋友下载校验通过后也会成为新的种子。</p></div></div></div><div class="portal-actions"><a href="/app/" class="btn btn-primary">进入 文件<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right" aria-hidden="true"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg></a></div></div></div></section></div></main><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><div class="mkt-footer-links"><a class="active" href="/" data-status="active" aria-current="page">关于</a><a href="/ping/">网络</a><a href="https://github.com/most-people/most" target="_blank" rel="noopener noreferrer">GitHub</a></div><span class="mkt-footer-copy">© <!-- -->2026<!-- --> MOST PEOPLE · MIT License</span><span class="mkt-footer-build" translate="no">v<!-- -->0.3.1</span></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-DluhgSHX.js","/assets/jsx-runtime-Bt-cYkS5.js","/assets/avatar-BZwHW4ll.js","/assets/useNavigate-DWlBD_-b.js","/assets/i18n-DZaOYCSO.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-DluhgSHX.js"}}],css:$R[8]=["/assets/index-CBkHUp3F.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1782383355445,s:"success",ssr:!0},$R[11]={i:"",u:1782383355632,s:"success",ssr:!0}],lastMatchId:""})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-DluhgSHX.js"></script></body></html>
|
package/out/note/index.html
CHANGED
|
Binary file
|