most-box 0.1.6 → 0.1.7
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 +18 -13
- package/out/404/index.html +2 -2
- package/out/404.html +2 -2
- package/out/__next.__PAGE__.txt +6 -6
- package/out/__next._full.txt +15 -15
- package/out/__next._head.txt +3 -3
- package/out/__next._index.txt +7 -7
- package/out/__next._tree.txt +4 -4
- package/out/_next/static/chunks/0-c8h4u1i2f78.js +1 -0
- package/out/_next/static/chunks/02j6ojja7vzp8.js +1 -0
- package/out/_next/static/chunks/06im3as4nwfil.js +1 -0
- package/out/_next/static/chunks/0sq_0pwxnhby2.js +1 -0
- package/out/_next/static/chunks/1h-f81ddyfcmx.css +1 -0
- package/out/_next/static/chunks/22h69_zwmttt4.js +1 -0
- package/out/_next/static/chunks/23zlmarf-go2x.js +1 -0
- package/out/_next/static/chunks/24k_4-y4ym0df.js +1 -0
- package/out/_next/static/chunks/{0vmjat-s4a3yj.css → 258tyt1xt34p4.css} +1 -1
- package/out/_next/static/chunks/2693fczty5yr8.js +1 -0
- package/out/_next/static/chunks/26hcvxjw9do9d.js +1 -0
- package/out/_next/static/chunks/2_i1b78h0yiu_.js +1 -0
- package/out/_next/static/chunks/3e9ia0hs-pqvs.css +1 -0
- package/out/_next/static/chunks/3ejz1mdljwwqf.css +1 -0
- package/out/_next/static/chunks/3mccxoa60ley8.js +1 -0
- package/out/_next/static/chunks/{23kls47vn_rpg.css → 418_591yp64lx.css} +1 -1
- package/out/_next/static/chunks/43l72x-2z3zxb.js +1 -0
- package/out/_not-found/__next._full.txt +12 -12
- package/out/_not-found/__next._head.txt +3 -3
- package/out/_not-found/__next._index.txt +7 -7
- package/out/_not-found/__next._not-found.__PAGE__.txt +4 -4
- package/out/_not-found/__next._not-found.txt +3 -3
- package/out/_not-found/__next._tree.txt +2 -2
- package/out/_not-found/index.html +2 -2
- package/out/_not-found/index.txt +12 -12
- package/out/admin/__next._full.txt +13 -13
- package/out/admin/__next._head.txt +3 -3
- package/out/admin/__next._index.txt +7 -7
- package/out/admin/__next._tree.txt +2 -2
- package/out/admin/__next.admin.__PAGE__.txt +4 -4
- package/out/admin/__next.admin.txt +3 -3
- package/out/admin/index.html +2 -2
- package/out/admin/index.txt +13 -13
- package/out/app/__next._full.txt +13 -13
- package/out/app/__next._head.txt +3 -3
- package/out/app/__next._index.txt +7 -7
- package/out/app/__next._tree.txt +2 -2
- package/out/app/__next.app.__PAGE__.txt +4 -4
- package/out/app/__next.app.txt +3 -3
- package/out/app/index.html +2 -2
- package/out/app/index.txt +13 -13
- package/out/chat/__next._full.txt +13 -13
- package/out/chat/__next._head.txt +3 -3
- package/out/chat/__next._index.txt +7 -7
- package/out/chat/__next._tree.txt +2 -2
- package/out/chat/__next.chat.__PAGE__.txt +4 -4
- package/out/chat/__next.chat.txt +3 -3
- package/out/chat/index.html +2 -2
- package/out/chat/index.txt +13 -13
- package/out/chat/join/__next._full.txt +13 -13
- package/out/chat/join/__next._head.txt +3 -3
- package/out/chat/join/__next._index.txt +7 -7
- package/out/chat/join/__next._tree.txt +2 -2
- package/out/chat/join/__next.chat.join.__PAGE__.txt +4 -4
- package/out/chat/join/__next.chat.join.txt +3 -3
- package/out/chat/join/__next.chat.txt +3 -3
- package/out/chat/join/index.html +2 -2
- package/out/chat/join/index.txt +13 -13
- package/out/demo/__next._full.txt +15 -15
- package/out/demo/__next._head.txt +3 -3
- package/out/demo/__next._index.txt +7 -7
- package/out/demo/__next._tree.txt +4 -4
- package/out/demo/__next.demo.__PAGE__.txt +6 -6
- package/out/demo/__next.demo.txt +3 -3
- package/out/demo/index.html +3 -3
- package/out/demo/index.txt +15 -15
- package/out/download/__next._full.txt +35 -33
- package/out/download/__next._head.txt +3 -3
- package/out/download/__next._index.txt +7 -7
- package/out/download/__next._tree.txt +3 -3
- package/out/download/__next.download.__PAGE__.txt +6 -6
- package/out/download/__next.download.txt +3 -3
- package/out/download/index.html +2 -2
- package/out/download/index.txt +35 -33
- package/out/game/__next._full.txt +11 -11
- package/out/game/__next._head.txt +3 -3
- package/out/game/__next._index.txt +7 -7
- package/out/game/__next._tree.txt +2 -2
- package/out/game/__next.game.__PAGE__.txt +2 -2
- package/out/game/__next.game.txt +3 -3
- package/out/game/gandengyan/__next._full.txt +14 -14
- package/out/game/gandengyan/__next._head.txt +3 -3
- package/out/game/gandengyan/__next._index.txt +7 -7
- package/out/game/gandengyan/__next._tree.txt +3 -3
- package/out/game/gandengyan/__next.game.gandengyan.__PAGE__.txt +5 -5
- package/out/game/gandengyan/__next.game.gandengyan.txt +3 -3
- package/out/game/gandengyan/__next.game.txt +3 -3
- package/out/game/gandengyan/index.html +2 -2
- package/out/game/gandengyan/index.txt +14 -14
- package/out/game/index.html +1 -1
- package/out/game/index.txt +11 -11
- package/out/game/zhajinhua/__next._full.txt +14 -13
- package/out/game/zhajinhua/__next._head.txt +3 -3
- package/out/game/zhajinhua/__next._index.txt +7 -7
- package/out/game/zhajinhua/__next._tree.txt +3 -2
- package/out/game/zhajinhua/__next.game.txt +3 -3
- package/out/game/zhajinhua/__next.game.zhajinhua.__PAGE__.txt +5 -4
- package/out/game/zhajinhua/__next.game.zhajinhua.txt +3 -3
- package/out/game/zhajinhua/index.html +2 -2
- package/out/game/zhajinhua/index.txt +14 -13
- package/out/index.html +2 -2
- package/out/index.txt +15 -15
- package/out/note/__next._full.txt +13 -13
- package/out/note/__next._head.txt +3 -3
- package/out/note/__next._index.txt +7 -7
- package/out/note/__next._tree.txt +2 -2
- package/out/note/__next.note.__PAGE__.txt +4 -4
- package/out/note/__next.note.txt +3 -3
- package/out/note/index.html +2 -2
- package/out/note/index.txt +13 -13
- package/out/ping/__next._full.txt +14 -14
- package/out/ping/__next._head.txt +3 -3
- package/out/ping/__next._index.txt +7 -7
- package/out/ping/__next._tree.txt +3 -3
- package/out/ping/__next.ping.__PAGE__.txt +5 -5
- package/out/ping/__next.ping.txt +3 -3
- package/out/ping/index.html +2 -2
- package/out/ping/index.txt +14 -14
- package/out/web3/__next._full.txt +13 -13
- package/out/web3/__next._head.txt +3 -3
- package/out/web3/__next._index.txt +7 -7
- package/out/web3/__next._tree.txt +2 -2
- package/out/web3/__next.web3.__PAGE__.txt +4 -4
- package/out/web3/__next.web3.txt +3 -3
- package/out/web3/ed25519/__next._full.txt +11 -11
- package/out/web3/ed25519/__next._head.txt +3 -3
- package/out/web3/ed25519/__next._index.txt +7 -7
- package/out/web3/ed25519/__next._tree.txt +2 -2
- package/out/web3/ed25519/__next.web3.ed25519.__PAGE__.txt +2 -2
- package/out/web3/ed25519/__next.web3.ed25519.txt +3 -3
- package/out/web3/ed25519/__next.web3.txt +3 -3
- package/out/web3/ed25519/index.html +1 -1
- package/out/web3/ed25519/index.txt +11 -11
- package/out/web3/index.html +2 -2
- package/out/web3/index.txt +13 -13
- package/out/web3/tools/__next._full.txt +11 -11
- package/out/web3/tools/__next._head.txt +3 -3
- package/out/web3/tools/__next._index.txt +7 -7
- package/out/web3/tools/__next._tree.txt +2 -2
- package/out/web3/tools/__next.web3.tools.__PAGE__.txt +2 -2
- package/out/web3/tools/__next.web3.tools.txt +3 -3
- package/out/web3/tools/__next.web3.txt +3 -3
- package/out/web3/tools/index.html +1 -1
- package/out/web3/tools/index.txt +11 -11
- package/package.json +1 -1
- package/server/src/core/gameRoom.js +12 -0
- package/server/src/core/zhajinhua.js +82 -14
- package/server/src/games/gandengyan.js +39 -0
- package/server/src/index.js +8 -1
- package/out/_next/static/chunks/0-ryc9icn6dql.css +0 -1
- package/out/_next/static/chunks/088-v8tzobg5g.js +0 -1
- package/out/_next/static/chunks/0g9303i8psy6z.js +0 -1
- package/out/_next/static/chunks/10p6-qnuk3p9x.js +0 -1
- package/out/_next/static/chunks/2524ggtr3e4fp.js +0 -1
- package/out/_next/static/chunks/2mcmt4yla_xle.js +0 -1
- package/out/_next/static/chunks/2v7_4ps1l4a8o.css +0 -1
- package/out/_next/static/chunks/2vk2ln79gpvm4.js +0 -1
- package/out/_next/static/chunks/37msy2-4ucgts.js +0 -1
- package/out/_next/static/chunks/384w3w4qvhw61.js +0 -1
- package/out/_next/static/chunks/3aa-weedhv4e0.js +0 -1
- package/out/_next/static/chunks/3erbaukgkw8f2.js +0 -1
- package/out/_next/static/chunks/3qj5xz_d4cbk6.js +0 -1
- /package/out/_next/static/{NPIlpdzQWkiVZpgfhlypH → eXddCOt9eyz0j78b1m4Ex}/_buildManifest.js +0 -0
- /package/out/_next/static/{NPIlpdzQWkiVZpgfhlypH → eXddCOt9eyz0j78b1m4Ex}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{NPIlpdzQWkiVZpgfhlypH → eXddCOt9eyz0j78b1m4Ex}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89664,e=>{"use strict";let a=(0,e.i(56420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,a],89664)},8734,e=>{"use strict";let a=(0,e.i(56420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,a],8734)},26091,e=>{"use strict";let a=(0,e.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,a],26091)},73474,e=>{"use strict";let a=(0,e.i(56420).default)("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"}]]);e.s(["Trash2",0,a],73474)},62368,e=>{"use strict";let a=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,a],62368)},66595,e=>{"use strict";let a=(0,e.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,a],66595)},51921,e=>{"use strict";let a=(0,e.i(56420).default)("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"}]]);e.s(["Music",0,a],51921)},12796,e=>{"use strict";let a=(0,e.i(56420).default)("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"}]]);e.s(["Loader",0,a],12796)},80796,e=>{"use strict";let a=(0,e.i(56420).default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);e.s(["Film",0,a],80796)},15170,e=>{"use strict";let a=(0,e.i(56420).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);e.s(["Image",0,a],15170)},6933,e=>{"use strict";e.s(["getFileSubtype",0,function(e){let a=String(e||"").split(".").pop()?.toLowerCase()||"";return["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","heic","heif"].includes(a)?"image":["mp4","webm","mov","avi","mkv","flv","wmv","m4v","mpeg","3gp"].includes(a)?"video":["mp3","wav","ogg","flac","aac","m4a","wma","opus"].includes(a)?"audio":["txt","md","js","ts","jsx","tsx","css","scss","less","json","xml","html","htm","yaml","yml","toml","ini","cfg","conf","log","sh","bash","py","rb","go","rs","java","c","cpp","h","hpp","cs","php","sql","graphql","env","gitignore","dockerfile","readme"].includes(a)?"text":"file"}])},25981,67927,e=>{"use strict";var a=e.i(56420);let s=(0,a.default)("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"}]]);e.s(["Upload",0,s],25981);let t=(0,a.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],67927)},26067,e=>{"use strict";let a=(0,e.i(56420).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,a],26067)},10818,61507,40616,e=>{"use strict";let a=(0,e.i(56420).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,a],10818);var s=e.i(18050),t=e.i(26091),i=e.i(80796),r=e.i(26067),l=e.i(15170),n=e.i(51921),o=e.i(6933);function c(e){let a=e.lastIndexOf("/");return -1===a?{folder:"",name:e}:{folder:e.substring(0,a),name:e.substring(a+1)}}e.s(["FileCard",0,function({file:e,isSelected:a,onSelect:r,onPreview:d}){let u=(0,o.getFileSubtype)(e.fileName),m=(0,s.jsx)(t.FileText,{size:24,color:"#fff"});return"image"===u?m=(0,s.jsx)(l.Image,{size:24,color:"#fff"}):"video"===u?m=(0,s.jsx)(i.Film,{size:24,color:"#fff"}):"audio"===u&&(m=(0,s.jsx)(n.Music,{size:24,color:"#fff"})),(0,s.jsxs)("div",{"data-id":e.cid,onClick:()=>r(e.cid),onDoubleClick:()=>d(e),className:`card ${a?"selected":""}`,children:[(0,s.jsx)("div",{className:`card-icon ${e.starred?"starred":"file"}`,children:m}),(0,s.jsx)("p",{className:"card-name",children:c(e.fileName).name})]})},"FolderCard",0,function({folder:e,onClick:a}){return(0,s.jsxs)("div",{onClick:a,className:"card",children:[(0,s.jsx)("div",{className:"card-icon folder",children:(0,s.jsx)(r.Folder,{size:28,color:"#fff"})}),(0,s.jsx)("p",{className:"card-name",children:e.name})]})},"parseAppFileName",0,c],61507);var d=e.i(71645),u=e.i(63676);e.i(4121);var m=e.i(57667);e.s(["MoveModal",0,function({items:e,allFolders:a,currentPath:t,onMove:i,onClose:l}){let[n,o]=(0,d.useState)(""),[c,p]=(0,d.useState)(t),h=n?[{path:"",name:"全部内容"},...n.split("/").filter(Boolean).map((e,a,s)=>({path:s.slice(0,a+1).join("/"),name:e}))]:[],f=a.filter(e=>{if(""===n)return!e.path.includes("/");let a=n+"/";return!!e.path.startsWith(a)&&!e.path.substring(a.length).includes("/")});return(0,s.jsx)(m.ModalOverlay,{onClose:l,children:(0,s.jsxs)("div",{className:"move-modal",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"modal-header",children:[(0,s.jsx)("h3",{children:"移动到"}),(0,s.jsx)("button",{type:"button",onClick:l,className:"btn btn-icon",children:(0,s.jsx)(u.X,{size:18})})]}),(0,s.jsxs)("p",{className:"move-modal-desc",children:["已选 ",e.length," 个项目"]}),(0,s.jsx)("div",{className:"move-new-folder",children:(0,s.jsx)("input",{type:"text",className:"input",value:c,onChange:e=>p(e.target.value),placeholder:"输入路径创建嵌套文件夹"})}),(0,s.jsx)("p",{className:"move-modal-hint",children:"如 图片/壁纸"}),(0,s.jsx)("div",{className:"move-breadcrumb",children:h.map((e,a)=>(0,s.jsxs)(d.default.Fragment,{children:[a>0&&(0,s.jsx)("span",{className:"breadcrumb-separator",children:"/"}),(0,s.jsx)("button",{type:"button",onClick:()=>{o(e.path),p(e.path)},className:`move-breadcrumb-btn ${n===e.path&&!c?"active":""}`,children:e.name})]},e.path))}),(0,s.jsxs)("div",{className:"move-folder-list",children:[0===f.length&&(0,s.jsx)("p",{className:"move-modal-empty",children:"该目录下没有子文件夹"}),f.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>o(e.path),className:`move-folder-item ${n===e.path&&!c?"selected":""}`,children:[(0,s.jsx)(r.Folder,{size:16}),(0,s.jsx)("span",{children:e.name})]},e.path))]}),(0,s.jsxs)("div",{className:"modal-actions",children:[(0,s.jsx)("button",{type:"button",onClick:l,className:"btn btn-secondary",children:"取消"}),(0,s.jsx)("button",{type:"button",onClick:function(){i(n||c.trim())},className:"btn btn-primary",children:"移动"})]})]})})}],40616)},11241,e=>{"use strict";let a=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,a],11241)},35965,e=>{"use strict";let a=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,a],35965)},96699,e=>{"use strict";let a=(0,e.i(56420).default)("moon",[["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",key:"kfwtm"}]]);e.s(["Moon",0,a],96699)},59665,5142,e=>{"use strict";var a=e.i(18050),s=e.i(71645);let t=(0,e.i(56420).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);function i(e=!1,a={}){let[t,r]=(0,s.useState)(e),l=(0,s.useCallback)(()=>{r(e=>e||(a.onOpen?.(),!0))},[a.onOpen]),n=(0,s.useCallback)(()=>{r(e=>e?(a.onClose?.(),!1):e)},[a.onClose]);return[t,{open:l,close:n,toggle:(0,s.useCallback)(()=>{t?n():l()},[n,l,t]),set:r}]}e.s(["useDisclosure",0,i],5142);let r=(0,s.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:l,headerRight:n,children:o}){let[c,d]=i(!1),[u,m]=(0,s.useState)(!1),p=function(e,{getInitialValueInEffect:a}={getInitialValueInEffect:!0}){let[t,i]=(0,s.useState)(a?void 0:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,s.useEffect)(()=>{try{if("matchMedia"in window){let a=window.matchMedia(e);i(a.matches);let s=e=>i(e.matches);return a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}}}catch(e){return}},[e]),t||!1}("(max-width: 768px)"),h=()=>{p?d.open():m(!1)};return(0,a.jsx)(r.Provider,{value:{closeSidebar:d.close,openSidebar:h,isSidebarVisible:p?c:!u},children:(0,a.jsxs)("div",{className:"app-layout",children:[(0,a.jsx)("div",{className:`sidebar-overlay ${c?"visible":""}`,onClick:()=>d.close()}),(0,a.jsx)("div",{className:`sidebar ${c?"open":""} ${u?"collapsed":""}`,children:e({closeSidebar:d.close,openSidebar:h})}),(0,a.jsxs)("div",{className:"main-content",children:[(0,a.jsxs)("header",{className:"app-header",children:[(0,a.jsxs)("div",{className:"header-left",children:[(0,a.jsx)("button",{onClick:()=>{p?d.toggle():m(!u)},className:"btn btn-icon sidebar-toggle-btn","aria-label":p?"打开菜单":u?"展开侧边栏":"收起侧边栏",children:(0,a.jsx)(t,{size:16})}),l]}),(0,a.jsx)("div",{className:"header-right",children:n})]}),o]})]})})},"useAppShell",0,function(){let e=(0,s.useContext)(r);if(!e)throw Error("useAppShell must be used within AppShell");return e}],59665)},27648,e=>{"use strict";var a=e.i(18050),s=e.i(93957),t=e.i(71192);e.s(["default",0,function({className:e=""}){let i=(0,t.useUserStore)(e=>e.identity),r=(0,t.useUserStore)(e=>e.openLoginModal),l=(0,t.useUserStore)(e=>e.logoutUser);return(0,a.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,a.jsxs)("div",{className:"user-info",children:[(0,a.jsx)("img",{className:"user-avatar-img",src:(0,s.generateAvatar)(i?.address,i?.avatar),alt:"avatar"}),(0,a.jsx)("span",{className:"user-name",title:i?.address,children:i?.displayName||"未登录"})]}),i?(0,a.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:l,children:"退出"}):(0,a.jsx)("button",{className:"btn btn-primary login-btn",onClick:r,children:"登录"})]})}])},39626,e=>{"use strict";var a=e.i(18050);let s=(0,e.i(56420).default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var t=e.i(59665);e.s(["default",0,function({label:e="打开侧边栏",className:i="",variant:r="primary"}){let{isSidebarVisible:l,openSidebar:n}=(0,t.useAppShell)();return l?null:(0,a.jsxs)("button",{type:"button",className:`btn ${"primary"===r?"btn-primary":""} sidebar-open-hint ${i}`.trim(),onClick:n,children:[(0,a.jsx)(s,{size:16}),e]})}],39626)},79490,11028,27668,e=>{"use strict";let a=(0,e.i(56420).default)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);e.s(["Edit2",0,a],79490);var s=e.i(18050),t=e.i(71645),i=e.i(26091),r=e.i(12796),l=e.i(51921),n=e.i(63676),o=e.i(26913);e.s(["default",0,function({item:e,isBackendReady:a,getFileDownloadUrl:c,onClose:d}){let[u,m]=(0,t.useState)(""),[p,h]=(0,t.useState)(!1),[f,x]=(0,t.useState)(""),[j,g]=(0,t.useState)("");return(0,t.useEffect)(()=>{if("text"!==e.subtype)return;let s=!1;return(m(""),g(""),a)?(h(!0),(async()=>{try{let a=await fetch(c(e.cid),{headers:{...await (0,o.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`),Range:"bytes=0-9999"}});if(!a.ok)throw Error("加载失败");let t=await a.text();s||m(t||"(文件为空)")}catch{s||m("加载失败")}finally{s||h(!1)}})(),()=>{s=!0}):void m("加载失败")},[c,a,e.cid,e.subtype]),(0,t.useEffect)(()=>{var s;if("image"!==(s=e.subtype)&&"video"!==s&&"audio"!==s)return void x("");if(x(""),g(""),!a)return void g("加载失败");let t="",i=!1;return(async()=>{try{let a=await fetch(c(e.cid),{headers:await (0,o.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`)});if(!a.ok)throw Error("加载失败");let s=URL.createObjectURL(await a.blob());t=s,i||x(s)}catch{i||g("加载失败")}})(),()=>{i=!0,t&&URL.revokeObjectURL(t)}},[c,a,e.cid,e.subtype]),(0,s.jsxs)("div",{className:"preview-overlay",onClick:d,children:[(0,s.jsx)("button",{type:"button",className:"preview-close",onClick:d,"aria-label":"关闭预览",children:(0,s.jsx)(n.X,{size:20})}),(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),children:["image"===e.subtype&&(0,s.jsx)("div",{className:"preview-media-wrapper",children:f?(0,s.jsx)("img",{src:f,alt:e.fileName}):j?(0,s.jsxs)("div",{className:"preview-unsupported",children:[(0,s.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,s.jsx)("p",{children:e.fileName}),(0,s.jsx)("p",{className:"preview-unsupported-hint",children:j})]}):(0,s.jsx)("div",{className:"preview-loading",children:(0,s.jsx)("div",{className:"preview-loading-spinner"})})}),"video"===e.subtype&&(0,s.jsx)("div",{className:"preview-media-wrapper",children:f?(0,s.jsx)("video",{src:f,controls:!0}):j?(0,s.jsxs)("div",{className:"preview-unsupported",children:[(0,s.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,s.jsx)("p",{children:e.fileName}),(0,s.jsx)("p",{className:"preview-unsupported-hint",children:j})]}):(0,s.jsx)("div",{className:"preview-loading",children:(0,s.jsx)("div",{className:"preview-loading-spinner"})})}),"audio"===e.subtype&&(0,s.jsxs)("div",{className:"preview-audio",children:[(0,s.jsx)("div",{className:"preview-audio-icon",children:(0,s.jsx)(l.Music,{size:36,color:"var(--accent)"})}),(0,s.jsx)("p",{className:"preview-audio-filename",children:e.fileName}),f?(0,s.jsx)("audio",{className:"preview-audio-player",src:f,controls:!0}):(0,s.jsx)("div",{className:"preview-text-loading",children:j?(0,s.jsx)("p",{children:j}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Loader,{size:24,className:"preview-text-spinner"}),(0,s.jsx)("p",{children:"正在加载音频预览..."})]})})]}),"file"===e.subtype&&(0,s.jsxs)("div",{className:"preview-unsupported",children:[(0,s.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,s.jsx)("p",{children:e.fileName}),(0,s.jsx)("p",{className:"preview-unsupported-hint",children:"无法预览"})]}),"text"===e.subtype&&(0,s.jsxs)("div",{className:"preview-text-container",children:[(0,s.jsx)("div",{className:"preview-text-header",children:(0,s.jsx)("span",{children:e.fileName})}),p?(0,s.jsxs)("div",{className:"preview-text-loading",children:[(0,s.jsx)(r.Loader,{size:24,className:"preview-text-spinner"}),(0,s.jsx)("p",{children:"正在加载文本预览..."}),(0,s.jsx)("p",{className:"preview-text-loading-hint",children:"如果是初次预览,可能需要等待 P2P 网络同步"})]}):(0,s.jsx)("pre",{className:"preview-text",children:u||"(文件为空)"})]})]})]})}],11028);var c=e.i(64621);let d="链接格式不正确,请粘贴完整的 most://<cid>?filename=... 分享链接。",u="暂时没有发现在线种子。请确认分享者或其他下载者仍在线做种,稍后再检测。",m={"Link must be a valid most:// URL":"链接无法解析,请粘贴完整的 most://<cid>?filename=... 分享链接。","Link must use most:// protocol":"链接协议不正确,应以 most:// 开头。","Link path is not supported":"链接里不应包含路径,请使用 most://<cid>?filename=... 格式。","Invalid CID format":"CID 无效,请确认 most:// 后面的内容没有缺失或被截断。","Invalid CID format: CID v1 required":"CID 格式不符合 MostBox 要求,请确认分享链接完整。","CID digest must be 32 bytes":"CID 格式不符合 MostBox 要求,请确认分享链接完整。","filename is required":"链接缺少 filename 参数,请复制完整分享链接后再检测。"};e.s(["getDownloadCheckErrorMessageFromPayload",0,function(e={},a=""){if("TimeoutError"===a)return"检测等待超时,暂时没有等到在线种子响应。请确认分享者或其他下载者仍在线做种,稍后再检测。";if(!e.status)return"无法连接本地节点,请确认 MostBox 后端正在运行后再检测。";if(404===e.status)return"当前后端还没有检测接口,请重启 MostBox 后端后再试。";switch(e.code){case"VALIDATION_ERROR":return d;case"CONFLICT":return e.error?`${e.error},请先处理同名文件后再下载。`:"下载目录已有同名文件,请先重命名或移走后再检测。";case"PEER_NOT_FOUND":return u;case"PERMISSION_ERROR":return e.error?`下载目录不可写:${e.error}`:"下载目录不可写,请检查目录权限后再检测。";case"ENGINE_NOT_INITIALIZED":return"本地节点还没有启动完成,请稍等几秒后重新检测。"}return 503===e.status?u:e.status>=500?"本地节点检测时出错,请稍后重试或查看节点日志。":e.error?`检测未通过:${e.error}`:"检测未通过,请确认链接完整、发布者在线且本机网络正常。"},"getDownloadLinkValidationMessage",0,function(e=""){let a=String(e||"").trim();if(!a)return"请先粘贴 most:// 分享链接。";let s=function(e){let a;if(!e||"string"!=typeof e)return{cid:"",error:"Link must be a non-empty string"};try{a=new URL(e)}catch{return{cid:"",error:"Link must be a valid most:// URL"}}if("most:"!==a.protocol)return{cid:"",error:"Link must use most:// protocol"};if(a.pathname&&"/"!==a.pathname)return{cid:"",error:"Link path is not supported"};let s=a.hostname,t=a.searchParams.get("filename"),i=[...a.searchParams.keys()].find(e=>"filename"!==e),r=function(e){let a;if(!e||"string"!=typeof e)return{valid:!1,error:"CID must be a non-empty string"};try{a=c.CID.parse(e)}catch{return{valid:!1,error:"Invalid CID format"}}return 1!==a.version?{valid:!1,error:"Invalid CID format: CID v1 required"}:32!==a.multihash.digest.length?{valid:!1,error:"CID digest must be 32 bytes"}:{valid:!0}}(s);return r.valid?t&&t.trim()?i?{cid:"",error:`Unsupported query parameter: ${i}`}:{cid:s,fileName:t}:{cid:"",error:"filename is required"}:{cid:"",error:r.error}}(a);if(!s.error)return s.fileName?.trim()?null:m["filename is required"];if(s.error.startsWith("Unsupported query parameter: ")){let e=s.error.slice(29);return`链接包含暂不支持的参数 ${e},请只保留 filename。`}return m[s.error]||d}],27668)},27627,e=>{"use strict";var a=e.i(18050),s=e.i(71645),t=e.i(25981),i=e.i(35965),r=e.i(96699),l=e.i(73474),n=e.i(67927),o=e.i(26091),c=e.i(63676),d=e.i(89664),u=e.i(8734),m=e.i(62368),p=e.i(56420);let h=(0,p.default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),f=(0,p.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),x=(0,p.default)("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]);var j=e.i(66595),g=e.i(79490),v=e.i(12796),y=e.i(11241),b=e.i(10818),w=e.i(59665),k=e.i(61507),N=e.i(39626),C=e.i(27648),M=e.i(11028),S=e.i(40616);e.i(4121);var F=e.i(57667),$=e.i(88361),z=e.i(47910),L=e.i(26913),D=e.i(27668),E=e.i(3593),T=e.i(71192),I=e.i(5142),A=e.i(6933);async function R(e){let a=await (0,L.getApiErrorPayload)(e),s=e&&"object"==typeof e&&"name"in e?String(e.name):"";return(0,D.getDownloadCheckErrorMessageFromPayload)(a,s)}let U={listPublishedFiles:()=>L.api.get("/api/files").json(),listTrashFiles:()=>L.api.get("/api/trash").json(),deletePublishedFile:e=>L.api.delete(`/api/files/${e}`).json(),restoreTrashFile:e=>L.api.post(`/api/trash/${e}/restore`).json(),permanentDeleteTrashFile:e=>L.api.delete(`/api/trash/${e}`).json(),emptyTrash:()=>L.api.delete("/api/trash").json(),toggleStar:e=>L.api.post(`/api/files/${e}/star`).json(),getConfig:()=>L.api.get("/api/config").json(),getDataPath:()=>L.api.get("/api/config/data-path").json(),getNetworkAddresses:()=>L.api.get("/api/network").json(),saveConfig:e=>L.api.post("/api/config",{json:e}).json(),async publishFile(e,a){let s=new FormData;s.append("file",e,a||e.name);let t=await L.api.post("/api/publish",{body:s});if(!t.ok)throw Error((await t.json().catch(()=>({error:t.statusText}))).error||"Request failed");return t.json()},checkDownload:e=>L.api.post("/api/download/check",{json:{link:e},timeout:15e3}).json(),downloadFile:e=>L.api.post("/api/download",{json:{link:e}}).json(),cancelDownload:e=>L.api.post("/api/download/cancel",{json:{taskId:e}}).json(),getFileDownloadUrl:e=>(0,L.getApiUrl)(`/api/files/${e}/download`),moveFile:(e,a)=>L.api.post("/api/move",{json:{cid:e,newFileName:a}}).json(),renameFolder:(e,a)=>L.api.post("/api/folder/rename",{json:{oldPath:e,newPath:a}}).json()};function O(e){return!e||e<=0?"0 B":e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:e<0x40000000?`${(e/1048576).toFixed(1)} MB`:`${(e/0x40000000).toFixed(2)} GB`}function P(e){return(0,k.parseAppFileName)(e)}e.s(["default",0,function(){let e,p,q,V=(0,E.useAppStore)(e=>e.isDarkMode),B=(0,E.useAppStore)(e=>e.setIsDarkMode),H=(0,E.useAppStore)(e=>e.addToast),_=(0,E.useAppStore)(e=>e.hasBackend),W=(0,E.useAppStore)(e=>e.openConnectModal),X=(0,T.useUserStore)(e=>e.identity),G=(0,T.useUserStore)(e=>e.openLoginModal),[K,Z]=(0,s.useState)([]),[J,Q]=(0,s.useState)([]),[Y,ee]=(0,s.useState)(null),[ea,es]=(0,s.useState)("all"),[et,ei]=(0,s.useState)(!1),[er,el]=(0,s.useState)([]),[en,eo]=(0,s.useState)(null),[ec,ed]=(0,s.useState)(null),[eu,em]=(0,I.useDisclosure)(!1),[ep,eh]=(0,s.useState)(""),[ef,ex]=(0,s.useState)(null),[ej,eg]=(0,s.useState)(!1),[ev,ey]=(0,s.useState)([]),[eb,ew]=(0,I.useDisclosure)(!1),[ek,eN]=(0,s.useState)(""),{copy:eC,copied:eM}=function(e={}){let a=e.timeout??2e3,[t,i]=(0,s.useState)(null),[r,l]=(0,s.useState)(!1),n=(0,s.useRef)(null);return(0,s.useEffect)(()=>()=>{window.clearTimeout(n.current)},[]),{copy:e=>{"clipboard"in navigator?navigator.clipboard.writeText(e).then(()=>{i(null),window.clearTimeout(n.current),n.current=window.setTimeout(()=>l(!1),a),l(!0)}).catch(e=>i(e)):i(Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{l(!1),i(null),window.clearTimeout(n.current)},error:t,copied:r}}({timeout:2e3}),[eS,eF]=(0,I.useDisclosure)(!1),[e$,ez]=(0,s.useState)(null),[eL,eD]=(0,s.useState)(null),[eE,eT]=(0,s.useState)(!1),eI=!0===_,eA=Y||"",eR=(e=new Set,K.forEach(a=>{let{folder:s}=P(a.fileName),t=s.split("/").filter(Boolean),i="";for(let a of t)i+=(i?"/":"")+a,e.add(i)}),[...e].sort()),{folders:eU,files:eO}={folders:(p=eA?eA+"/":"",eR.filter(e=>{let a=e.toLowerCase().startsWith(p.toLowerCase()),s=e.substring(p.length);return a&&!s.includes("/")}).map(e=>({name:e.substring(p.length),path:e}))),files:K.filter(e=>P(e.fileName).folder===eA)};function eP(){return!!eI||(W(),!1)}function eq(){return!!X||(G(),!1)}let eV=ek?K.filter(e=>P(e.fileName).name.toLowerCase().includes(ek.toLowerCase())):eO,eB=async()=>{if(!eI||!X)return void Z([]);try{let e=await U.listPublishedFiles();Z(e||[])}catch{Z([])}},eH=async()=>{if(!eI||!X)return void Q([]);try{let e=await U.listTrashFiles();Q(e||[])}catch{Q([])}},e_=e=>{el(a=>a.includes(e)?a.filter(a=>a!==e):[...a,e])},eW=async e=>{if(eq()&&eP())try{await U.restoreTrashFile(e),H("已恢复","success"),eB(),eH()}catch(e){H(await (0,L.getApiErrorMessage)(e,"恢复失败"),"error")}},eX=async()=>{!eq()||eP()&&ez({title:"清空回收站",message:"确定要清空回收站吗?此操作不可恢复!",confirmText:"清空",danger:!0,onConfirm:async()=>{ez(null);try{await U.emptyTrash(),H("回收站已清空","success"),eH()}catch(e){H(await (0,L.getApiErrorMessage)(e,"清空失败"),"error")}}})},eG=async e=>{if(eq()&&eP())try{let a=await U.toggleStar(e);Z(s=>s.map(s=>s.cid===e?{...s,starred:a.starred}:s)),H(a.starred?"已收藏":"已取消收藏","success")}catch(e){H(await (0,L.getApiErrorMessage)(e,"操作失败"),"error")}},eK=async()=>{if(!eq()||!eP())return;let e="trash"===ea;ez({title:e?"永久删除":"批量删除",message:e?`确定要永久删除选中的 ${er.length} 个项目吗?此操作不可恢复!`:`确定要删除选中的 ${er.length} 个项目吗?`,confirmText:e?"永久删除":"删除",danger:!0,onConfirm:async()=>{ez(null);try{for(let a of er)e?await U.permanentDeleteTrashFile(a):a.startsWith("__")||await U.deletePublishedFile(a);el([]),H(e?"已永久删除":"已删除","success"),eB(),eH()}catch(e){H(await (0,L.getApiErrorMessage)(e,"删除失败"),"error")}}})},eZ=async e=>{if(eq()&&eP())try{for(let a of er){let s=K.find(e=>e.cid===a);if(!s)continue;let{name:t}=P(s.fileName),i=e?`${e}/${t}`:t;s.fileName!==i&&await U.moveFile(a,i)}el([]),eF.close(),H("已移动","success"),eB()}catch(e){H(await (0,L.getApiErrorMessage)(e,"移动失败"),"error")}},eJ=e=>{let a=!!e.path,s=a?e.name:P(e.fileName).name;eD({title:a?"重命名文件夹":"重命名文件",placeholder:"请输入新名称",defaultValue:s,confirmText:"重命名",onConfirm:async t=>{if(t!==s&&eq()&&eP()){eT(!0);try{if(a){let a=e.path.lastIndexOf("/"),s=-1!==a?e.path.substring(0,a):"",i=s?`${s}/${t}`:t;await U.renameFolder(e.path,i),H("已重命名","success"),eB(),e7(i)}else{let{folder:a}=P(e.fileName),s=a?`${a}/${t}`:t;await U.moveFile(e.cid,s),H("已重命名","success"),eB()}eD(null)}catch(e){H(await (0,L.getApiErrorMessage)(e,"重命名失败"),"error")}finally{eT(!1)}}}})},eQ=async e=>{if(!X){G(),H("请先登录后发布文件","warning");return}if(!eP())return;let a=eA?eA+"/":"",s=[];for(let t of Array.from(e)){let e=a+t.name;if(K.some(a=>a.fileName===e)){H(`${t.name} 已存在`,"warning");continue}let i=`upload_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,r={id:i,fileName:t.name,progress:0,type:"upload",status:"uploading"};s.push(r),ey(e=>[...e,r]),s.length>0&&ew.open();try{(await U.publishFile(t,e)).alreadyExists?(ey(e=>e.map(e=>e.id===i?{...e,status:"completed"}:e)),H(`${t.name} 已存在`,"warning")):(ey(e=>e.map(e=>e.id===i?{...e,progress:100,status:"completed"}:e)),H(`${t.name} 已添加到本地`,"success"))}catch(e){ey(e=>e.map(e=>e.id===i?{...e,status:"error"}:e)),H(await (0,L.getApiErrorMessage)(e,`发布失败: ${t.name}`),"error")}}setTimeout(()=>{ey(e=>e.filter(e=>"completed"!==e.status&&"error"!==e.status&&"cancelled"!==e.status))},3e3),eB()},[eY,e0]=(0,s.useState)(!1),e1=ep.trim(),e2=ef?.status==="success"&&ef.link===e1,e6=()=>{em.close(),ex(null)},e4=async()=>{let e=(0,D.getDownloadLinkValidationMessage)(e1);if(e){ex({status:"error",link:e1,message:e}),H(e,"warning");return}if(!ej&&!eY&&eq()&&eP()){eg(!0),ex(null);try{let e=await U.checkDownload(e1),a=e.alreadyExists?`${e.fileName} 已在本机`:`${e.fileName} 可下载`;ex({status:"success",link:e1,message:a}),H(e.alreadyExists?`${e.fileName} 已存在`:"检测通过",e.alreadyExists?"warning":"success")}catch(a){let e=await R(a);ex({status:"error",link:e1,message:e}),H(e,"error")}finally{eg(!1)}}},e5=async()=>{if(!X){G(),H("请先登录后下载文件","warning");return}if(!eP())return;let e=(0,D.getDownloadLinkValidationMessage)(e1);if(e)return void H(e,"warning");if(!e2)return void H("请先检测链接可用性","warning");if(!eY){e0(!0);try{let e=await U.downloadFile(e1);if(eh(""),ex(null),e6(),e.alreadyExists)H(`${e.fileName} 已存在`,"warning");else{let a={id:e.taskId,fileName:"下载文件",progress:0,type:"download",status:"downloading"};ey(e=>[...e,a]),ew.open(),H("下载已开始","info")}}catch(e){H(await (0,L.getApiErrorMessage)(e,"下载失败"),"error")}finally{e0(!1)}}},e9=async e=>{if(eq()&&eP()&&"download"===e.type&&"downloading"===e.status){ey(a=>a.map(a=>a.id===e.id?{...a,status:"cancelling"}:a));try{await U.cancelDownload(e.id)}catch(a){ey(a=>a.map(a=>a.id===e.id?{...a,status:"downloading"}:a)),H(await (0,L.getApiErrorMessage)(a,"取消失败"),"error")}}},e3=async e=>{if(eq()&&eP())try{let a=await fetch(U.getFileDownloadUrl(e.cid),{headers:await (0,L.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`)});if(!a.ok)throw Error("获取文件失败");let s=await a.blob(),t=window.showSaveFilePicker;if(t){let a=await t({suggestedName:e.fileName}),i=await a.createWritable();await i.write(s),await i.close(),H("文件已保存","success")}else{let a=URL.createObjectURL(s),t=document.createElement("a");t.href=a,t.download=e.fileName,document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(a),H("文件已下载","success")}}catch(e){"AbortError"!==e.name&&H("保存失败: "+e.message,"error")}},e7=e=>{ee(e||null),el([])};(0,s.useEffect)(()=>{if(!0!==_)return;let e=null,a=!1;return(async()=>{if(e=new WebSocket(await (0,L.getAuthenticatedWebSocketUrl)("/ws")),a)return e.close();e.onmessage=e=>{try{let{event:a,data:s}=JSON.parse(e.data);if("publish:success"===a||"download:success"===a){eB();let e=s.taskId||s.fileName;ey(a=>a.map(a=>a.id===e||a.fileName===s.fileName?{...a,progress:100,status:"completed"}:a)),"download:success"===a&&(s.alreadyExists?H(`${s.fileName} 已存在`,"warning"):H(`${s.fileName} 下载完成`,"success"),setTimeout(()=>{ey(a=>a.filter(a=>a.id!==e||"completed"!==a.status))},3e3))}"publish:progress"===a&&ey(e=>e.map(e=>{if(s.file&&e.fileName===s.file&&"upload"===e.type){let a=50;return"calculating-cid"===s.stage?a=25:"uploading"===s.stage?a=75:"complete"===s.stage&&(a=100),{...e,progress:a}}return e})),"download:progress"===a&&ey(e=>e.map(e=>e.id===s.taskId?{...e,progress:s.percent||0,loaded:s.loaded,total:s.total}:e)),"download:error"===a&&(ey(e=>e.map(e=>e.id===s.taskId?{...e,status:"error"}:e)),H(`下载失败: ${s.error}`,"error")),"download:status"===a&&ey(e=>e.map(e=>e.id===s.taskId?{...e,fileName:s.file||e.fileName}:e)),"download:cancelled"===a&&(ey(e=>e.map(e=>e.id===s.taskId?{...e,status:"cancelled"}:e)),H("下载已取消","warning"))}catch(e){console.warn("[App WS] Failed to parse message:",e.message)}}})(),()=>{a=!0,e?.close()}},[_,X?.address]),(0,s.useEffect)(()=>{if(!0===_&&X){eB(),eH();return}!1===_&&(Z([]),Q([]))},[_,X?.address]),(0,s.useEffect)(()=>{X||(el([]),eo(null),ed(null),eh(""),ex(null),ey([]),eN(""),ee(null),es("all"))},[X?.address]);let e8="all"===ea?eV:"starred"===ea?K.filter(e=>e.starred&&P(e.fileName).name.toLowerCase().includes(ek.toLowerCase())):J.filter(e=>P(e.fileName).name.toLowerCase().includes(ek.toLowerCase())),ae="starred"===ea?[]:eU.filter(e=>e.name.toLowerCase().includes(ek.toLowerCase())),aa=eA?[{path:"",name:"全部内容"},...eA.split("/").filter(Boolean).map((e,a,s)=>({path:s.slice(0,a+1).join("/"),name:e}))]:[];return(0,a.jsxs)(w.default,{sidebar:({closeSidebar:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"sidebar-header sidebar-header-link",onClick:()=>window.location.href="/",children:[(0,a.jsx)(y.ArrowLeft,{size:18}),(0,a.jsx)("h1",{children:"MOST PEOPLE"})]}),(0,a.jsx)("nav",{className:"sidebar-nav",children:[{id:"all",icon:(0,a.jsx)(x,{size:18}),label:"本地"},{id:"starred",icon:(0,a.jsx)(f,{size:18}),label:"收藏"},{id:"trash",icon:(0,a.jsx)(l.Trash2,{size:18}),label:"回收站"}].map(s=>(0,a.jsxs)("button",{onClick:()=>{es(s.id),ee(null),el([]),eN(""),e()},className:`sidebar-nav-btn ${ea===s.id?"active":""}`,children:[s.icon,(0,a.jsx)("span",{children:s.label})]},s.id))}),(0,a.jsx)(C.default,{})]}),headerTitle:(0,a.jsx)("h2",{className:"header-title",children:"all"===ea?"本地":"starred"===ea?"收藏":"回收站"}),headerRight:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"search-box",children:[(0,a.jsx)(j.Search,{size:14}),(0,a.jsx)("input",{type:"text",value:ek,onChange:e=>eN(e.target.value),placeholder:"搜索..."}),ek&&(0,a.jsx)("button",{onClick:()=>eN(""),children:(0,a.jsx)(c.X,{size:12})})]}),"trash"===ea&&J.length>0&&(0,a.jsx)("button",{onClick:eX,className:"btn btn-sm btn-empty-trash",children:"清空回收站"}),(0,a.jsx)("button",{onClick:()=>ew.open(),className:"btn btn-icon",children:(0,a.jsx)(h,{size:16})}),(0,a.jsx)("button",{onClick:()=>B(!V),className:"btn btn-icon",children:V?(0,a.jsx)(i.Sun,{size:16}):(0,a.jsx)(r.Moon,{size:16})})]}),children:["all"===ea&&(0,a.jsxs)("div",{className:"action-grid",children:[(0,a.jsxs)("div",{className:`action-card upload ${et?"drag-over":""}`,onDragOver:e=>{e.preventDefault(),ei(!0)},onDragLeave:()=>ei(!1),onDrop:e=>{e.preventDefault(),ei(!1),eq()&&eP()&&eQ(e.dataTransfer.files)},children:[(0,a.jsx)("input",{type:"file",multiple:!0,onClick:e=>{eq()&&eP()||e.preventDefault()},onChange:e=>eQ(e.target.files),className:"action-card-input"}),(0,a.jsx)(t.Upload,{size:20,className:"action-grid-icon"}),(0,a.jsx)("p",{children:"发布文件"})]}),(0,a.jsxs)("div",{className:"action-card action-card-download",onClick:()=>{eq()&&eP()&&em.open()},children:[(0,a.jsx)(m.Download,{size:20,className:"action-grid-icon"}),(0,a.jsx)("p",{children:"下载文件"})]})]}),"all"===ea&&(0,a.jsx)("div",{className:"breadcrumb",children:eA?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>e7(""),children:"全部内容"}),aa.slice(1).map((e,t)=>(0,a.jsxs)(s.default.Fragment,{children:[(0,a.jsx)(n.ChevronRight,{size:12}),(0,a.jsx)("button",{onClick:()=>e7(e.path),className:t===aa.length-2?"current":"",children:e.name}),t===aa.length-2&&(0,a.jsx)("button",{onClick:()=>eJ(e),className:"breadcrumb-edit-btn",children:(0,a.jsx)(g.Edit2,{size:12})})]},e.path))]}):null}),(0,a.jsxs)("div",{className:"content-grid",children:["trash"===ea&&(0===e8.length?(0,a.jsxs)("div",{className:"empty-state app-empty-state",children:[(0,a.jsx)("p",{children:ek?"未找到相关文件":"回收站是空的"}),(0,a.jsx)(N.default,{label:"打开文件导航"})]}):(0,a.jsx)("div",{className:"file-grid",children:e8.map(e=>{var s;return(0,a.jsxs)("div",{onClick:()=>el(a=>a.includes(e.cid)?a.filter(a=>a!==e.cid):[...a,e.cid]),onDoubleClick:()=>eW(e.cid),className:`card ${er.includes(e.cid)?"selected":""}`,children:[(0,a.jsx)("div",{className:"card-icon trash",children:(0,a.jsx)(o.FileText,{size:24,color:"#fff"})}),(0,a.jsx)("p",{className:"card-name",children:P(e.fileName).name}),(0,a.jsxs)("p",{className:"card-date",children:["删除于 ",(s=e.deletedAt)?new Date(s).toLocaleDateString("zh-CN"):""]})]},e.cid)})})),"trash"!==ea&&(0===e8.length&&0===ae.length?(0,a.jsxs)("div",{className:"empty-state app-empty-state",children:[(0,a.jsx)("p",{children:ek?"未找到相关文件":"starred"===ea?"暂无的收藏":"暂无本地文件"}),(0,a.jsx)(N.default,{label:"打开文件导航"})]}):(0,a.jsxs)("div",{className:"file-grid",children:[ae.map(e=>(0,a.jsx)(k.FolderCard,{folder:e,onClick:()=>e7(e.path)},e.path)),e8.map(e=>(0,a.jsx)(k.FileCard,{file:e,isSelected:er.includes(e.cid),onSelect:e_,onPreview:e=>eo({...e,subtype:(0,A.getFileSubtype)(e.fileName)})},e.cid))]}))]}),e$&&(0,a.jsx)($.ConfirmModal,{title:e$.title,message:e$.message,confirmText:e$.confirmText,danger:e$.danger,closeOnOverlayClick:e$.danger,onConfirm:e$.onConfirm,onClose:()=>ez(null)}),eL&&(0,a.jsx)(z.InputModal,{title:eL.title,placeholder:eL.placeholder,defaultValue:eL.defaultValue,confirmText:eL.confirmText,isLoading:eE,onConfirm:eL.onConfirm,onClose:()=>eD(null)}),eS&&(0,a.jsx)(S.MoveModal,{items:er.map(e=>K.find(a=>a.cid===e)).filter(Boolean),allFolders:eR.map(e=>({path:e,name:e.split("/").pop()})),currentPath:eA,onMove:eZ,onClose:()=>eF.close()}),ec&&(0,a.jsx)(F.ModalOverlay,{onClose:()=>ed(null),children:(0,a.jsxs)("div",{className:"share-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"分享链接"}),(0,a.jsx)("button",{onClick:()=>ed(null),className:"btn btn-icon",children:(0,a.jsx)(c.X,{size:18})})]}),(0,a.jsxs)("div",{className:"share-link-box",children:[(0,a.jsx)("div",{className:"share-link-text",children:`most://${ec.cid}?filename=${encodeURIComponent(ec.fileName)}`}),(0,a.jsx)("button",{onClick:()=>{eC(`most://${ec.cid}?filename=${encodeURIComponent(ec.fileName)}`)},className:`btn btn-circle btn-primary ${eM?"copied":""}`,children:eM?(0,a.jsx)(d.Check,{size:18}):(0,a.jsx)(u.Copy,{size:18})})]}),(0,a.jsx)("div",{className:"share-storage-note",children:(0,a.jsx)("span",{children:"本机在线时可下载;下载者完成后会默认继续做种。"})})]})}),eu&&(0,a.jsx)(F.ModalOverlay,{onClose:e6,children:(0,a.jsxs)("div",{className:"download-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"下载文件"}),(0,a.jsx)("button",{onClick:e6,className:"btn btn-icon",children:(0,a.jsx)(c.X,{size:18})})]}),(0,a.jsxs)("div",{className:"download-link-row",children:[(0,a.jsx)("input",{type:"text",className:"input",value:ep,onChange:e=>{eh(e.target.value),ex(null)},placeholder:"输入 most:// 链接"}),(0,a.jsxs)("button",{type:"button",onClick:e4,disabled:!e1||ej||eY,className:"btn btn-secondary download-check-btn",children:[ej?(0,a.jsx)(v.Loader,{size:14,className:"spin"}):e2?(0,a.jsx)(d.Check,{size:14}):(0,a.jsx)(j.Search,{size:14}),ej?"检测中...":e2?"已通过":"检测"]})]}),ef&&(0,a.jsxs)("div",{className:`download-check-status ${ef.status}`,children:["success"===ef.status?(0,a.jsx)(d.Check,{size:14}):(0,a.jsx)(b.Info,{size:14}),(0,a.jsx)("span",{children:ef.message})]}),(0,a.jsxs)("button",{onClick:e5,disabled:!e2||eY||ej,className:"btn btn-info btn-full",children:[eY?(0,a.jsx)(v.Loader,{size:14,className:"spin"}):(0,a.jsx)(m.Download,{size:14}),eY?"下载中...":"开始下载"]})]})}),en&&(0,a.jsx)(M.default,{item:en,isBackendReady:eI,getFileDownloadUrl:U.getFileDownloadUrl,onClose:()=>eo(null)}),er.length>0&&(0,a.jsxs)("div",{className:"batch-bar",children:[(0,a.jsxs)("span",{className:"batch-info",children:["已选 ",er.length," 项"]}),(0,a.jsx)("button",{onClick:()=>el([]),className:"batch-dismiss",children:(0,a.jsx)(c.X,{size:16})}),(0,a.jsx)("div",{className:"batch-divider"}),"trash"===ea?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:async()=>{!eq()||eP()&&(await Promise.all(er.map(e=>U.restoreTrashFile(e))),el([]),H("已恢复","success"),eB(),eH())},className:"btn btn-sm",children:"恢复"}),(0,a.jsx)("button",{onClick:eK,className:"btn btn-sm btn-danger",children:"永久删除"})]}):(0,a.jsxs)(a.Fragment,{children:[1===er.length&&(q=K.find(e=>e.cid===er[0]))&&"file"!==(0,A.getFileSubtype)(q.fileName)&&(0,a.jsx)("button",{onClick:()=>{let e=K.find(e=>e.cid===er[0]);if(e){let a=(0,A.getFileSubtype)(e.fileName);eo({...e,subtype:a})}},className:"btn btn-sm",children:"预览"}),(0,a.jsx)("button",{onClick:()=>{let e=er.some(e=>{let a=K.find(a=>a.cid===e);return a&&!a.starred});er.forEach(a=>{let s=K.find(e=>e.cid===a);s&&(e?!s.starred:s.starred)&&eG(a)})},className:"btn btn-sm btn-star",children:"收藏"}),1===er.length&&(0,a.jsx)("button",{onClick:()=>{let e=K.find(e=>e.cid===er[0]);e&&eJ(e)},className:"btn btn-sm",children:"重命名"}),(0,a.jsx)("button",{onClick:()=>eF.open(),className:"btn btn-sm btn-move",children:"移动"}),(0,a.jsx)("button",{onClick:eK,className:"btn btn-sm btn-danger",children:"删除"}),1===er.length&&(0,a.jsx)("button",{onClick:()=>ed(K.find(e=>e.cid===er[0])),className:"btn btn-sm",children:"分享"}),1===er.length&&(0,a.jsx)("button",{onClick:()=>{let e=K.find(e=>e.cid===er[0]);e&&e3(e)},className:"btn btn-sm",children:"另存为"})]})]}),eb&&(0,a.jsx)(F.ModalOverlay,{onClose:()=>ew.close(),closeOnOverlayClick:!0,children:(0,a.jsxs)("div",{className:"transfer-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"传输"}),(0,a.jsx)("button",{onClick:()=>ew.close(),className:"btn btn-icon",children:(0,a.jsx)(c.X,{size:18})})]}),0===ev.length?(0,a.jsx)("div",{className:"empty-transfer",children:"暂无传输"}):ev.map(e=>(0,a.jsxs)("div",{className:"transfer-item",children:[(0,a.jsxs)("div",{className:"transfer-item-header",children:["upload"===e.type?(0,a.jsx)(t.Upload,{size:14}):(0,a.jsx)(m.Download,{size:14}),(0,a.jsx)("span",{className:"transfer-item-name",children:e.fileName}),"downloading"===e.status&&"download"===e.type&&(0,a.jsx)("button",{onClick:()=>e9(e),className:"transfer-item-cancel",children:(0,a.jsx)(c.X,{size:14})})]}),(0,a.jsxs)("div",{className:"transfer-progress-row",children:[(0,a.jsx)("progress",{className:`transfer-progress-meter ${"download"===e.type?"download":""} ${"error"===e.status?"error":""} ${"cancelled"===e.status?"cancelled":""}`,value:Math.max(0,Math.min(100,e.progress)),max:100,"aria-label":`${e.fileName} 传输进度`}),(0,a.jsx)("span",{className:"transfer-progress-text",children:"completed"===e.status?"完成":"error"===e.status?"失败":"cancelled"===e.status?"已取消":"cancelling"===e.status?"取消中":e.loaded&&e.total?`${O(e.loaded)}/${O(e.total)}`:`${e.progress}%`})]})]},e.id))]})})]})}],27627)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={formatUrl:function(){return i},formatWithValidation:function(){return o},urlObjectKeys:function(){return c}};for(var s in r)Object.defineProperty(a,s,{enumerable:!0,get:r[s]});let n=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:a}=e,r=e.protocol||"",s=e.pathname||"",i=e.hash||"",c=e.query||"",o=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?o=t+e.host:a&&(o=t+(~a.indexOf(":")?`[${a}]`:a),e.port&&(o+=":"+e.port)),c&&"object"==typeof c&&(c=String(n.urlQueryToSearchParams(c)));let d=e.search||c&&`?${c}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||l.test(r))&&!1!==o?(o="//"+(o||""),s&&"/"!==s[0]&&(s="/"+s)):o||(o=""),i&&"#"!==i[0]&&(i="#"+i),d&&"?"!==d[0]&&(d="?"+d),s=s.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${r}${o}${s}${d}${i}`}let c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function o(e){return i(e)}},18581,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return s}});let r=e.r(71645);function s(e,t){let a=(0,r.useRef)(null),s=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=a.current;e&&(a.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(a.current=n(e,r)),t&&(s.current=n(t,r))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},73668,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"isLocalURL",{enumerable:!0,get:function(){return n}});let r=e.r(18967),s=e.r(52817);function n(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),a=new URL(e,t);return a.origin===t&&(0,s.hasBasePath)(a.pathname)}catch(e){return!1}}},84508,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},22016,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={default:function(){return y},useLinkStatus:function(){return j}};for(var s in r)Object.defineProperty(a,s,{enumerable:!0,get:r[s]});let n=e.r(90809),l=e.r(18050),i=n._(e.r(71645)),c=e.r(95057),o=e.r(8372),d=e.r(18581),u=e.r(18967),h=e.r(5550);e.r(33525);let p=e.r(88540),f=e.r(91949),m=e.r(73668),x=e.r(9396);function y(t){var a,r;let s,n,y,[j,v]=(0,i.useOptimistic)(f.IDLE_LINK_STATUS),b=(0,i.useRef)(null),{href:g,as:M,children:N,prefetch:P=null,passHref:w,replace:S,shallow:E,scroll:O,onClick:_,onMouseEnter:C,onTouchStart:z,legacyBehavior:T=!1,onNavigate:L,transitionTypes:B,ref:q,unstable_dynamicOnHover:I,...A}=t;s=N,T&&("string"==typeof s||"number"==typeof s)&&(s=(0,l.jsx)("a",{children:s}));let R=i.default.useContext(o.AppRouterContext),H=!1!==P,D=!1!==P?null===(r=P)||"auto"===r?x.FetchStrategy.PPR:x.FetchStrategy.Full:x.FetchStrategy.PPR,W="string"==typeof(a=M||g)?a:(0,c.formatUrl)(a);if(T){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=i.default.Children.only(s)}let F=T?n&&"object"==typeof n&&n.ref:q,U=i.default.useCallback(e=>(null!==R&&(b.current=(0,f.mountLinkInstance)(e,W,R,D,H,v)),()=>{b.current&&((0,f.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,f.unmountPrefetchableInstance)(e)}),[H,W,R,D,v]),$={ref:(0,d.useMergedRef)(U,F),onClick(t){T||"function"!=typeof _||_(t),T&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!R||t.defaultPrevented||function(t,a,r,s,n,l,c){if("u">typeof window){let o,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((o=t.currentTarget.getAttribute("target"))&&"_self"!==o||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(a)){s&&(t.preventDefault(),location.replace(a));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(99781);i.default.startTransition(()=>{u(a,s?"replace":"push",!1===n?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,r.current,c)})}}(t,W,b,S,O,L,B)},onMouseEnter(e){T||"function"!=typeof C||C(e),T&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),R&&H&&(0,f.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){T||"function"!=typeof z||z(e),T&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),R&&H&&(0,f.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,u.isAbsoluteUrl)(W)?$.href=W:T&&!w&&("a"!==n.type||"href"in n.props)||($.href=(0,h.addBasePath)(W)),y=T?i.default.cloneElement(n,$):(0,l.jsx)("a",{...A,...$,children:s}),(0,l.jsx)(k.Provider,{value:j,children:y})}e.r(84508);let k=(0,i.createContext)(f.IDLE_LINK_STATUS),j=()=>(0,i.useContext)(k);("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},89664,e=>{"use strict";let t=(0,e.i(56420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],89664)},50285,e=>{"use strict";let t=(0,e.i(56420).default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["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",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);e.s(["HardDrive",0,t],50285)},10566,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["NotebookPen",0,t],10566)},70904,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Wallet",0,t],70904)},82022,e=>{"use strict";let t=(0,e.i(56420).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],82022)},96699,e=>{"use strict";let t=(0,e.i(56420).default)("moon",[["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",key:"kfwtm"}]]);e.s(["Moon",0,t],96699)},35965,e=>{"use strict";let t=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,t],35965)},62368,e=>{"use strict";let t=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],62368)},68590,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["MessageSquare",0,t],68590)},42724,58501,e=>{"use strict";var t=e.i(18050),a=e.i(71645),r=e.i(22016),s=e.i(62368),n=e.i(96699),l=e.i(35965);function i({size:e=24}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.4"}),(0,t.jsx)("rect",{x:"14",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"2",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)"})]})}e.s(["LogoIcon",0,i],58501),e.s(["Nav",0,function(){let[e,c]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=localStorage.getItem("theme"),t=window.matchMedia("(prefers-color-scheme: dark)").matches;("dark"===e||!e&&t)&&c(!0)},[]),(0,a.useEffect)(()=>{document.documentElement.setAttribute("data-theme",e?"dark":"light"),localStorage.setItem("theme",e?"dark":"light")},[e]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("nav",{className:"mkt-nav",children:(0,t.jsxs)("div",{className:"mkt-nav-inner",children:[(0,t.jsxs)(r.default,{href:"/",className:"mkt-nav-logo",children:[(0,t.jsx)(i,{}),"MOST PEOPLE"]}),(0,t.jsxs)("div",{className:"mkt-nav-cta",children:[(0,t.jsx)("button",{className:"mkt-theme-toggle",onClick:()=>c(!e),"aria-label":"切换主题",children:e?(0,t.jsx)(l.Sun,{size:16}):(0,t.jsx)(n.Moon,{size:16})}),(0,t.jsxs)(r.default,{href:"/download/",className:"btn btn-secondary mkt-nav-preview",children:[(0,t.jsx)(s.Download,{size:16}),"下载客户端"]}),(0,t.jsx)(r.default,{href:"/app/",className:"btn btn-primary",children:"开始使用"})]})]})})})}],42724)},56691,e=>{"use strict";var t=e.i(18050),a=e.i(22016);let r=[{href:"/",label:"关于"},{href:"/ping/",label:"网络"},{href:"https://github.com/most-people/most",label:"GitHub",external:!0}];e.s(["Footer",0,function(){return(0,t.jsx)("footer",{className:"mkt-footer",children:(0,t.jsx)("div",{className:"mkt-container",children:(0,t.jsxs)("div",{className:"mkt-footer-inner",children:[(0,t.jsx)("div",{className:"mkt-footer-links",children:r.map(e=>(0,t.jsx)(a.default,{href:e.href,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},children:e.label},e.href))}),(0,t.jsxs)("span",{className:"mkt-footer-copy",children:["© ",new Date().getFullYear()," MOST PEOPLE · MIT License"]})]})})})}])},40983,e=>{"use strict";var t=e.i(18050),a=e.i(42724),r=e.i(56691);e.s(["MarketingLayout",0,function({children:e}){return(0,t.jsxs)("div",{className:"mkt-layout",children:[(0,t.jsx)(a.Nav,{}),(0,t.jsx)("main",{className:"mkt-layout-main",children:e}),(0,t.jsx)(r.Footer,{})]})}])},31713,e=>{"use strict";var t=e.i(18050),a=e.i(71645),r=e.i(22016),s=e.i(56420);let n=(0,s.default)("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"}]]);var l=e.i(68590),i=e.i(10566),c=e.i(70904);let o=(0,s.default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),d=(0,s.default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);var u=e.i(89664),h=e.i(82022),p=e.i(62368),f=e.i(41220),m=e.i(50285);let x=(0,s.default)("gamepad-2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["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",key:"mfqc10"}]]);var y=e.i(3593);let k=[{id:"app",title:"MostBox",subtitle:"P2P 文件分享",icon:(0,t.jsx)(n,{size:28}),path:"/app/",requiresBackend:!0,hero:"P2P 文件分享,无需注册",desc:"基于 Hyperswarm 的去中心化文件传输,让文件分享回归点对点。MostBox 不是云盘;链接来自 CID,可用性来自当前在线种子。",features:["无需注册,打开浏览器即用","Hyperswarm P2P 直连传输","GB 级大文件流式处理","相同文件 = 相同 CID,链接可反复校验","下载完成后默认继续做种","相比微信、QQ 或网盘,不依赖中心化账号和云端托管","Web 端负责展示,完整发布、下载和持续做种依赖桌面客户端","MIT 开源,自托管,数据完全自主掌控"],steps:[{num:"1",title:"下载桌面客户端",desc:"支持 Windows、macOS 和 Linux,桌面端提供完整的 P2P 能力。",link:"/download",linkText:"前往下载页"},{num:"2",title:"安装并运行",desc:"安装后打开应用,即可使用。"},{num:"3",title:"开始分享",desc:"发布文件生成 most:// 链接,朋友下载校验通过后也会成为新的种子。"}]},{id:"chat",title:"P2P 聊天",subtitle:"频道加密通讯",icon:(0,t.jsx)(l.MessageSquare,{size:28}),path:"/chat/",requiresBackend:!0,hero:"去中心化频道聊天",desc:"基于 Hypercore 的 P2P 加密即时通讯。创建频道,邀请朋友,端到端加密,无需服务器中转。",features:["P2P 加密频道消息","本地登录身份保护消息署名","消息通过 Hyperswarm 网络同步","离线消息自动同步","无需中心化账号注册"],steps:[{num:"1",title:"下载桌面客户端",desc:"支持 Windows、macOS 和 Linux。",link:"/download",linkText:"前往下载页"},{num:"2",title:"创建频道",desc:"输入任意频道名即可加入或创建。"},{num:"3",title:"开始聊天",desc:"发送消息,P2P 网络自动同步给所有在线节点。"}]},{id:"note",title:"笔记",subtitle:"加密云备份",icon:(0,t.jsx)(i.NotebookPen,{size:28}),path:"/note/",requiresBackend:!1,hero:"Web3 加密笔记",desc:"使用本地 Web3 密钥加密 Markdown 笔记,可在浏览器本地保存并按需同步到云端备份。",features:["Markdown 块编辑器","公开 / 私密笔记切换","文件夹、搜索和移动","Web3 登录态加密","云端备份与恢复","独立于 P2P 文件分享"],steps:[{num:"1",title:"生成 Web3 账号",desc:"用用户名和密码派生本地密钥。"},{num:"2",title:"创建笔记",desc:"写 Markdown,按需切换为私密内容。"},{num:"3",title:"备份恢复",desc:"登录后可把加密笔记同步到云端。"}]},{id:"gandengyan",title:"干瞪眼",subtitle:"P2P 牌桌",icon:(0,t.jsx)(x,{size:28}),path:"/game/gandengyan/",requiresBackend:!0,hero:"常驻节点里的在线牌桌",desc:"把干瞪眼作为 MostBox 的独立页面接入,复用现有频道消息、Web3 登录身份和桌面端常驻入口。",features:["使用 MostBox 本地账号进入房间","复用 /chat/ 的频道后端,不新增游戏后端接口","房间链接可直接分享到群组","支持 1-2 副牌、2-6 人和人机陪测","游戏规则、频道事件和页面样式拆分维护"],steps:[{num:"1",title:"登录账号",desc:"使用现有 MostBox Web3 本地账号作为牌桌身份。"},{num:"2",title:"创建房间",desc:"创建房间后复制链接,发给朋友加入。"},{num:"3",title:"开始调试",desc:"可先用人机补位测试出牌、计分和房间同步。"}]},{id:"web3",title:"Web3",subtitle:"账户工具箱",icon:(0,t.jsx)(c.Wallet,{size:28}),path:"/web3/",requiresBackend:!1,hero:"确定性密钥派生工具箱",desc:"纯前端运行的 Web3 账户工具。输入用户名和密码,即可生成 Ed25519 / x25519 密钥对、助记词、以太坊地址,支持 PEM 导出和地址派生。",features:["纯前端运行,无需后端","Ed25519 / x25519 密钥对生成","BIP-39 助记词派生","以太坊地址与私钥导出","PEM 格式密钥导出","二维码展示地址与助记词"],steps:[{num:"1",title:"输入用户名",desc:"用户名 + 密码(可选)作为种子。"},{num:"2",title:"查看密钥",desc:"即时生成 Ed25519、x25519 公钥与 IPNS ID。"},{num:"3",title:"导出使用",desc:"复制地址、导出 PEM、派生子地址。"}]}];function j(){let e=(0,y.useAppStore)(e=>e.hasBackend),s=(0,y.useAppStore)(e=>e.openConnectModal),[n,l]=(0,a.useState)("app"),i=k.find(e=>e.id===n)||k[0];return(0,t.jsxs)("div",{className:"portal-page",children:[(0,t.jsx)("section",{className:"portal-hero",children:(0,t.jsxs)("div",{className:"mkt-container",children:[(0,t.jsx)("h1",{className:"portal-hero-title",children:"MOST PEOPLE"}),(0,t.jsx)("p",{className:"portal-hero-subtitle",children:"去中心化 P2P 工具箱"})]})}),(0,t.jsx)("section",{className:"portal-cards-section",children:(0,t.jsxs)("div",{className:"mkt-container",children:[(0,t.jsx)("div",{className:"portal-cards",children:k.map(a=>{let s=n===a.id,i=a.requiresBackend,c=i?!0===e?"connected":!1===e?"disconnected":"checking":"none";return(0,t.jsxs)("button",{className:`portal-card ${s?"active":""}`,onClick:()=>l(a.id),children:[(0,t.jsx)(r.default,{href:a.path,className:"btn btn-icon portal-card-open-btn",onClick:e=>e.stopPropagation(),title:`打开${a.title}`,children:(0,t.jsx)(d,{size:16})}),(0,t.jsx)("div",{className:"portal-card-icon",children:a.icon}),(0,t.jsx)("div",{className:"portal-card-title",children:a.title}),(0,t.jsx)("div",{className:"portal-card-subtitle",children:a.subtitle}),i?(0,t.jsxs)("div",{className:`ui-badge portal-card-status ${c}`,children:["checking"===c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"status-dot checking"}),"检测中"]}),"connected"===c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"status-dot connected"}),"已连接"]}),"disconnected"===c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"status-dot disconnected"}),"需连接"]})]}):(0,t.jsxs)("div",{className:"portal-card-status ready",children:[(0,t.jsx)("span",{className:"status-dot ready"}),"已就绪"]})]},a.id)})}),(0,t.jsxs)("div",{className:"portal-node-actions","aria-label":"节点入口",children:[(0,t.jsxs)("button",{onClick:s,className:"btn btn-secondary",children:[(0,t.jsx)(f.Server,{size:16}),"连接节点"]}),(0,t.jsxs)(r.default,{href:"/admin",className:"btn btn-secondary",children:[(0,t.jsx)(m.HardDrive,{size:16}),"节点管理"]})]})]})}),(0,t.jsx)("section",{className:"portal-marketing",children:(0,t.jsx)("div",{className:"mkt-container",children:(0,t.jsx)("div",{className:"portal-marketing-inner",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"portal-marketing-header",children:[(0,t.jsx)("h2",{children:i.hero}),(0,t.jsx)("p",{children:i.desc})]}),(0,t.jsx)("div",{className:"portal-marketing-features",children:i.features.map((e,a)=>(0,t.jsxs)("div",{className:"portal-feature-item",children:[(0,t.jsx)("span",{className:"portal-feature-icon",children:(0,t.jsx)(u.Check,{size:14,strokeWidth:3})}),(0,t.jsx)("span",{children:e})]},a))}),(0,t.jsx)("div",{className:"portal-marketing-steps",children:i.steps.map(e=>(0,t.jsxs)("div",{className:"portal-step",children:[(0,t.jsx)("span",{className:"portal-step-num",children:e.num}),(0,t.jsxs)("div",{className:"portal-step-content",children:[(0,t.jsx)("strong",{children:e.title}),(0,t.jsx)("p",{children:e.desc}),e.code&&(0,t.jsx)("code",{className:"portal-step-code",children:e.code}),e.link&&(0,t.jsx)("p",{className:"portal-step-link",children:(0,t.jsxs)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",children:[e.linkText," ",(0,t.jsx)(h.ExternalLink,{size:12})]})})]})]},e.num))}),(0,t.jsxs)("div",{className:"portal-actions",children:[(0,t.jsxs)(r.default,{href:i.path,className:"btn btn-primary",children:["进入 ",i.title,(0,t.jsx)(o,{size:16})]}),i.requiresBackend&&!1===e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:s,className:"btn btn-secondary",children:[(0,t.jsx)(f.Server,{size:16}),"连接节点"]}),(0,t.jsxs)(r.default,{href:"/download",className:"btn btn-secondary",children:[(0,t.jsx)(p.Download,{size:16}),"下载桌面客户端"]})]})]})]})})})})]})}var v=e.i(40983);e.s(["default",0,function(){return(0,t.jsx)(v.MarketingLayout,{children:(0,t.jsx)(j,{})})}],31713)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a={formatUrl:function(){return r},formatWithValidation:function(){return o},urlObjectKeys:function(){return c}};for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]});let n=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function r(e){let{auth:t,hostname:s}=e,a=e.protocol||"",i=e.pathname||"",r=e.hash||"",c=e.query||"",o=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?o=t+e.host:s&&(o=t+(~s.indexOf(":")?`[${s}]`:s),e.port&&(o+=":"+e.port)),c&&"object"==typeof c&&(c=String(n.urlQueryToSearchParams(c)));let d=e.search||c&&`?${c}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||l.test(a))&&!1!==o?(o="//"+(o||""),i&&"/"!==i[0]&&(i="/"+i)):o||(o=""),r&&"#"!==r[0]&&(r="#"+r),d&&"?"!==d[0]&&(d="?"+d),i=i.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${a}${o}${i}${d}${r}`}let c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function o(e){return r(e)}},18581,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"useMergedRef",{enumerable:!0,get:function(){return i}});let a=e.r(71645);function i(e,t){let s=(0,a.useRef)(null),i=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=s.current;e&&(s.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(s.current=n(e,a)),t&&(i.current=n(t,a))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let s=e(t);return"function"==typeof s?s:()=>e(null)}}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},73668,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"isLocalURL",{enumerable:!0,get:function(){return n}});let a=e.r(18967),i=e.r(52817);function n(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),s=new URL(e,t);return s.origin===t&&(0,i.hasBasePath)(s.pathname)}catch(e){return!1}}},84508,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},22016,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a={default:function(){return f},useLinkStatus:function(){return b}};for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]});let n=e.r(90809),l=e.r(18050),r=n._(e.r(71645)),c=e.r(95057),o=e.r(8372),d=e.r(18581),h=e.r(18967),u=e.r(5550);e.r(33525);let m=e.r(88540),p=e.r(91949),x=e.r(73668),j=e.r(9396);function f(t){var s,a;let i,n,f,[b,v]=(0,r.useOptimistic)(p.IDLE_LINK_STATUS),k=(0,r.useRef)(null),{href:N,as:g,children:C,prefetch:M=null,passHref:w,replace:z,shallow:S,scroll:P,onClick:O,onMouseEnter:L,onTouchStart:F,legacyBehavior:T=!1,onNavigate:E,transitionTypes:A,ref:I,unstable_dynamicOnHover:B,...D}=t;i=C,T&&("string"==typeof i||"number"==typeof i)&&(i=(0,l.jsx)("a",{children:i}));let _=r.default.useContext(o.AppRouterContext),$=!1!==M,U=!1!==M?null===(a=M)||"auto"===a?j.FetchStrategy.PPR:j.FetchStrategy.Full:j.FetchStrategy.PPR,R="string"==typeof(s=g||N)?s:(0,c.formatUrl)(s);if(T){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=r.default.Children.only(i)}let q=T?n&&"object"==typeof n&&n.ref:I,K=r.default.useCallback(e=>(null!==_&&(k.current=(0,p.mountLinkInstance)(e,R,_,U,$,v)),()=>{k.current&&((0,p.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,p.unmountPrefetchableInstance)(e)}),[$,R,_,U,v]),H={ref:(0,d.useMergedRef)(K,q),onClick(t){T||"function"!=typeof O||O(t),T&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!_||t.defaultPrevented||function(t,s,a,i,n,l,c){if("u">typeof window){let o,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((o=t.currentTarget.getAttribute("target"))&&"_self"!==o||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,x.isLocalURL)(s)){i&&(t.preventDefault(),location.replace(s));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:h}=e.r(99781);r.default.startTransition(()=>{h(s,i?"replace":"push",!1===n?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,a.current,c)})}}(t,R,k,z,P,E,A)},onMouseEnter(e){T||"function"!=typeof L||L(e),T&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),_&&$&&(0,p.onNavigationIntent)(e.currentTarget,!0===B)},onTouchStart:function(e){T||"function"!=typeof F||F(e),T&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),_&&$&&(0,p.onNavigationIntent)(e.currentTarget,!0===B)}};return(0,h.isAbsoluteUrl)(R)?H.href=R:T&&!w&&("a"!==n.type||"href"in n.props)||(H.href=(0,u.addBasePath)(R)),f=T?r.default.cloneElement(n,H):(0,l.jsx)("a",{...D,...H,children:i}),(0,l.jsx)(y.Provider,{value:b,children:f})}e.r(84508);let y=(0,r.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,r.useContext)(y);("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},89664,e=>{"use strict";let t=(0,e.i(56420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],89664)},31214,e=>{"use strict";let t=(0,e.i(56420).default)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);e.s(["Cloud",0,t],31214)},11241,e=>{"use strict";let t=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],11241)},96699,e=>{"use strict";let t=(0,e.i(56420).default)("moon",[["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",key:"kfwtm"}]]);e.s(["Moon",0,t],96699)},35965,e=>{"use strict";let t=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,t],35965)},27648,e=>{"use strict";var t=e.i(18050),s=e.i(93957),a=e.i(71192);e.s(["default",0,function({className:e=""}){let i=(0,a.useUserStore)(e=>e.identity),n=(0,a.useUserStore)(e=>e.openLoginModal),l=(0,a.useUserStore)(e=>e.logoutUser);return(0,t.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,t.jsxs)("div",{className:"user-info",children:[(0,t.jsx)("img",{className:"user-avatar-img",src:(0,s.generateAvatar)(i?.address,i?.avatar),alt:"avatar"}),(0,t.jsx)("span",{className:"user-name",title:i?.address,children:i?.displayName||"未登录"})]}),i?(0,t.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:l,children:"退出"}):(0,t.jsx)("button",{className:"btn btn-primary login-btn",onClick:n,children:"登录"})]})}])},8734,e=>{"use strict";let t=(0,e.i(56420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],8734)},66627,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Wifi",0,t],66627)},68590,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["MessageSquare",0,t],68590)},56691,e=>{"use strict";var t=e.i(18050),s=e.i(22016);let a=[{href:"/",label:"关于"},{href:"/ping/",label:"网络"},{href:"https://github.com/most-people/most",label:"GitHub",external:!0}];e.s(["Footer",0,function(){return(0,t.jsx)("footer",{className:"mkt-footer",children:(0,t.jsx)("div",{className:"mkt-container",children:(0,t.jsxs)("div",{className:"mkt-footer-inner",children:[(0,t.jsx)("div",{className:"mkt-footer-links",children:a.map(e=>(0,t.jsx)(s.default,{href:e.href,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},children:e.label},e.href))}),(0,t.jsxs)("span",{className:"mkt-footer-copy",children:["© ",new Date().getFullYear()," MOST PEOPLE · MIT License"]})]})})})}])},42724,58501,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016),i=e.i(62368),n=e.i(96699),l=e.i(35965);function r({size:e=24}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.4"}),(0,t.jsx)("rect",{x:"14",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"2",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)"})]})}e.s(["LogoIcon",0,r],58501),e.s(["Nav",0,function(){let[e,c]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=localStorage.getItem("theme"),t=window.matchMedia("(prefers-color-scheme: dark)").matches;("dark"===e||!e&&t)&&c(!0)},[]),(0,s.useEffect)(()=>{document.documentElement.setAttribute("data-theme",e?"dark":"light"),localStorage.setItem("theme",e?"dark":"light")},[e]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("nav",{className:"mkt-nav",children:(0,t.jsxs)("div",{className:"mkt-nav-inner",children:[(0,t.jsxs)(a.default,{href:"/",className:"mkt-nav-logo",children:[(0,t.jsx)(r,{}),"MOST PEOPLE"]}),(0,t.jsxs)("div",{className:"mkt-nav-cta",children:[(0,t.jsx)("button",{className:"mkt-theme-toggle",onClick:()=>c(!e),"aria-label":"切换主题",children:e?(0,t.jsx)(l.Sun,{size:16}):(0,t.jsx)(n.Moon,{size:16})}),(0,t.jsxs)(a.default,{href:"/download/",className:"btn btn-secondary mkt-nav-preview",children:[(0,t.jsx)(i.Download,{size:16}),"下载客户端"]}),(0,t.jsx)(a.default,{href:"/app/",className:"btn btn-primary",children:"开始使用"})]})]})})})}],42724)},58072,e=>{"use strict";let t=(0,e.i(56420).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,t],58072)},16327,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],16327)},16306,23165,24851,64830,16546,e=>{"use strict";let t=(0,e.i(56420).default)("shield-alert",[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,t],16306);var s=e.i(18050),a=e.i(71645),i=e.i(89664),n=e.i(8734);function l({text:e,label:t,copiedLabel:r="已复制",className:c="btn btn-icon",iconSize:o=14}){let[d,h]=(0,a.useState)(!1);async function u(){try{await navigator.clipboard.writeText(e),h(!0),setTimeout(()=>h(!1),1500)}catch{}}return(0,s.jsxs)("button",{type:"button",className:c,onClick:u,title:d?r:t||"复制",children:[d?(0,s.jsx)(i.Check,{size:o}):(0,s.jsx)(n.Copy,{size:o}),t?d?r:t:null]})}e.s(["CopyButton",0,l],23165),e.s(["EmptyState",0,function({icon:e,message:t,className:a="empty-state glass"}){return(0,s.jsxs)("div",{className:a,children:[(0,s.jsx)("div",{className:"empty-state-icon",children:e}),(0,s.jsx)("p",{children:t})]})}],24851),e.s(["KeyCard",0,function({title:e,icon:t,children:a,accent:i=!1}){return(0,s.jsxs)("div",{className:`web3-key-card ${i?"accent":""}`,children:[(0,s.jsxs)("div",{className:"web3-key-card-header",children:[(0,s.jsx)("span",{className:"web3-key-card-icon",children:t}),(0,s.jsx)("span",{className:"web3-key-card-title",children:e})]}),(0,s.jsx)("div",{className:"web3-key-card-body",children:a})]})}],64830);var r=e.i(62368);e.s(["PemBlock",0,function({label:e,pem:t,filename:a}){return(0,s.jsxs)("div",{className:"web3-pem-block",children:[(0,s.jsxs)("div",{className:"web3-pem-header",children:[(0,s.jsx)("span",{className:"web3-pem-label",children:e}),(0,s.jsxs)("div",{className:"web3-pem-actions",children:[(0,s.jsx)(l,{text:t,label:"复制",className:"btn btn-sm",iconSize:14}),(0,s.jsxs)("button",{type:"button",className:"btn btn-sm btn-primary",onClick:function(){let e=new Blob([t],{type:"text/plain"}),s=URL.createObjectURL(e),i=document.createElement("a");i.href=s,i.download=a,i.click(),URL.revokeObjectURL(s)},title:"下载",children:[(0,s.jsx)(r.Download,{size:14}),"下载"]})]})]}),(0,s.jsx)("textarea",{className:"textarea mono",value:t,readOnly:!0,rows:6})]})}],16546)},62368,e=>{"use strict";let t=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],62368)},66595,e=>{"use strict";let t=(0,e.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],66595)},51921,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Music",0,t],51921)},80796,e=>{"use strict";let t=(0,e.i(56420).default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);e.s(["Film",0,t],80796)},15170,e=>{"use strict";let t=(0,e.i(56420).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);e.s(["Image",0,t],15170)},12796,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Loader",0,t],12796)},6933,e=>{"use strict";e.s(["getFileSubtype",0,function(e){let t=String(e||"").split(".").pop()?.toLowerCase()||"";return["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","heic","heif"].includes(t)?"image":["mp4","webm","mov","avi","mkv","flv","wmv","m4v","mpeg","3gp"].includes(t)?"video":["mp3","wav","ogg","flac","aac","m4a","wma","opus"].includes(t)?"audio":["txt","md","js","ts","jsx","tsx","css","scss","less","json","xml","html","htm","yaml","yml","toml","ini","cfg","conf","log","sh","bash","py","rb","go","rs","java","c","cpp","h","hpp","cs","php","sql","graphql","env","gitignore","dockerfile","readme"].includes(t)?"text":"file"}])},26091,e=>{"use strict";let t=(0,e.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],26091)},77071,e=>{"use strict";let t=(0,e.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},99847,e=>{"use strict";let t=(0,e.i(56420).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],99847)},77685,e=>{"use strict";var t=e.i(18050),s=e.i(99847),a=e.i(62368),i=e.i(72382),n=e.i(26091),l=e.i(80796),r=e.i(15170),c=e.i(12796),o=e.i(51921);function d(e){let t=String(e||"").split("/");return t[t.length-1]||e}e.s(["ChatAttachmentCard",0,function({attachment:e,status:h="idle",pending:u=!1,onOpen:m}){var p,x;let j="checking"===h,f=["ui-file-action","chat-attachment-action","error"===h?"error":"","available"===h?"available":""].filter(Boolean).join(" "),y=((p=e.size)&&!(p<=0)?p<1024?`${p} B`:p<1048576?`${(p/1024).toFixed(1)} KB`:p<0x40000000?`${(p/1048576).toFixed(1)} MB`:`${(p/0x40000000).toFixed(2)} GB`:"")||"MostBox 文件";return(0,t.jsxs)("button",{type:"button",className:"ui-file-card chat-attachment-card",onClick:()=>m?.(e),disabled:u||j,title:e.link,children:[(0,t.jsx)("span",{className:`ui-file-icon chat-attachment-icon ${e.kind}`,children:j?(0,t.jsx)(c.Loader,{size:20,className:"ui-spinner chat-attachment-spinner"}):"image"===(x=e.kind)?(0,t.jsx)(r.Image,{size:20}):"video"===x?(0,t.jsx)(l.Film,{size:20}):"audio"===x?(0,t.jsx)(o.Music,{size:20}):(0,t.jsx)(n.FileText,{size:20})}),(0,t.jsxs)("span",{className:"ui-file-info chat-attachment-info",children:[(0,t.jsx)("span",{className:"ui-file-name chat-attachment-name",children:d(e.fileName)}),(0,t.jsx)("span",{className:"ui-file-meta chat-attachment-meta",children:u?"发送中...":y})]}),(0,t.jsx)("span",{className:f,children:j?"检测中":"available"===h?(0,t.jsx)(i.Eye,{size:16}):"error"===h?(0,t.jsx)(s.AlertCircle,{size:17}):(0,t.jsx)(a.Download,{size:16})})]})},"getAttachmentBaseFileName",0,d])},26067,e=>{"use strict";let t=(0,e.i(56420).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,t],26067)},25981,67927,e=>{"use strict";var t=e.i(56420);let s=(0,t.default)("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"}]]);e.s(["Upload",0,s],25981);let a=(0,t.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,a],67927)},10818,61507,40616,e=>{"use strict";let t=(0,e.i(56420).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,t],10818);var s=e.i(18050),a=e.i(26091),i=e.i(80796),n=e.i(26067),l=e.i(15170),r=e.i(51921),c=e.i(6933);function o(e){let t=e.lastIndexOf("/");return -1===t?{folder:"",name:e}:{folder:e.substring(0,t),name:e.substring(t+1)}}e.s(["FileCard",0,function({file:e,isSelected:t,onSelect:n,onPreview:d}){let h=(0,c.getFileSubtype)(e.fileName),u=(0,s.jsx)(a.FileText,{size:24,color:"#fff"});return"image"===h?u=(0,s.jsx)(l.Image,{size:24,color:"#fff"}):"video"===h?u=(0,s.jsx)(i.Film,{size:24,color:"#fff"}):"audio"===h&&(u=(0,s.jsx)(r.Music,{size:24,color:"#fff"})),(0,s.jsxs)("div",{"data-id":e.cid,onClick:()=>n(e.cid),onDoubleClick:()=>d(e),className:`card ${t?"selected":""}`,children:[(0,s.jsx)("div",{className:`card-icon ${e.starred?"starred":"file"}`,children:u}),(0,s.jsx)("p",{className:"card-name",children:o(e.fileName).name})]})},"FolderCard",0,function({folder:e,onClick:t}){return(0,s.jsxs)("div",{onClick:t,className:"card",children:[(0,s.jsx)("div",{className:"card-icon folder",children:(0,s.jsx)(n.Folder,{size:28,color:"#fff"})}),(0,s.jsx)("p",{className:"card-name",children:e.name})]})},"parseAppFileName",0,o],61507);var d=e.i(71645),h=e.i(63676);e.i(4121);var u=e.i(57667);e.s(["MoveModal",0,function({items:e,allFolders:t,currentPath:a,onMove:i,onClose:l}){let[r,c]=(0,d.useState)(""),[o,m]=(0,d.useState)(a),p=r?[{path:"",name:"全部内容"},...r.split("/").filter(Boolean).map((e,t,s)=>({path:s.slice(0,t+1).join("/"),name:e}))]:[],x=t.filter(e=>{if(""===r)return!e.path.includes("/");let t=r+"/";return!!e.path.startsWith(t)&&!e.path.substring(t.length).includes("/")});return(0,s.jsx)(u.ModalOverlay,{onClose:l,children:(0,s.jsxs)("div",{className:"move-modal",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"modal-header",children:[(0,s.jsx)("h3",{children:"移动到"}),(0,s.jsx)("button",{type:"button",onClick:l,className:"btn btn-icon",children:(0,s.jsx)(h.X,{size:18})})]}),(0,s.jsxs)("p",{className:"move-modal-desc",children:["已选 ",e.length," 个项目"]}),(0,s.jsx)("div",{className:"move-new-folder",children:(0,s.jsx)("input",{type:"text",className:"input",value:o,onChange:e=>m(e.target.value),placeholder:"输入路径创建嵌套文件夹"})}),(0,s.jsx)("p",{className:"move-modal-hint",children:"如 图片/壁纸"}),(0,s.jsx)("div",{className:"move-breadcrumb",children:p.map((e,t)=>(0,s.jsxs)(d.default.Fragment,{children:[t>0&&(0,s.jsx)("span",{className:"breadcrumb-separator",children:"/"}),(0,s.jsx)("button",{type:"button",onClick:()=>{c(e.path),m(e.path)},className:`move-breadcrumb-btn ${r===e.path&&!o?"active":""}`,children:e.name})]},e.path))}),(0,s.jsxs)("div",{className:"move-folder-list",children:[0===x.length&&(0,s.jsx)("p",{className:"move-modal-empty",children:"该目录下没有子文件夹"}),x.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>c(e.path),className:`move-folder-item ${r===e.path&&!o?"selected":""}`,children:[(0,s.jsx)(n.Folder,{size:16}),(0,s.jsx)("span",{children:e.name})]},e.path))]}),(0,s.jsxs)("div",{className:"modal-actions",children:[(0,s.jsx)("button",{type:"button",onClick:l,className:"btn btn-secondary",children:"取消"}),(0,s.jsx)("button",{type:"button",onClick:function(){i(r||o.trim())},className:"btn btn-primary",children:"移动"})]})]})})}],40616)},53138,51757,e=>{"use strict";var t=e.i(56420);let s=(0,t.default)("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"}]]);e.s(["AlertTriangle",0,s],53138);let a=(0,t.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,a],51757)},32391,60923,86512,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(53138),i=e.i(51757),n=e.i(31214),l=e.i(62368);let r=(0,e.i(56420).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);var c=e.i(25981),o=e.i(71192);e.s(["NoteMoreMenu",0,function({sync:e}){let d=(0,s.useRef)(null),[h,u]=(0,s.useState)(!1),m=(0,o.useUserStore)(e=>e.wallet),p=null!==e.action;async function x(e){u(!1),await e()}return(0,s.useEffect)(()=>{if(h)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){d.current?.contains(e.target)||u(!1)}},[h]),(0,t.jsxs)("div",{className:"note-more",ref:d,children:[(0,t.jsx)("button",{className:"btn btn-icon note-more-trigger",onClick:()=>u(e=>!e),title:"更多","aria-label":"更多",children:(0,t.jsx)(r,{size:16})}),h&&(0,t.jsxs)("div",{className:"note-more-menu",children:[(0,t.jsxs)("div",{className:`ui-notice note-sync-status ${e.hasConflict?"warning conflict":""}`,children:[(0,t.jsx)("span",{className:`ui-icon-tile note-sync-status-icon ${e.hasConflict?"warning":""}`,children:e.hasConflict?(0,t.jsx)(a.AlertTriangle,{size:16}):"synced"===e.status?(0,t.jsx)(i.CheckCircle2,{size:16}):(0,t.jsx)(n.Cloud,{size:16})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"云同步"}),(0,t.jsx)("small",{children:e.statusLabel})]})]}),(0,t.jsxs)("button",{className:"note-more-item",onClick:()=>x(e.exportLocalBackup),disabled:!m||p,children:[(0,t.jsx)(c.Upload,{size:16}),"本地导出"]}),(0,t.jsxs)("button",{className:"note-more-item",onClick:()=>x(e.importLocalBackup),disabled:!m||p,children:[(0,t.jsx)(l.Download,{size:16}),"本地导入"]})]})]})}],32391);var d=e.i(16327),h=e.i(67927),u=e.i(26067),m=e.i(63676);e.i(4121);var p=e.i(57667),x=e.i(3789);e.s(["NoteMoveModal",0,function({target:e,directories:a,onMove:i,onClose:n}){let l=(0,x.normalizeNotePath)(e.path||""),r="directory"===e.type?(0,x.normalizeNotePath)(e.path?`${e.path}/${e.name}`:e.name):(0,x.getNoteFullPath)(e),c=a.filter(t=>"directory"!==e.type||t.path!==r&&!t.path.startsWith(`${r}/`)),[o,j]=(0,s.useState)(l),[f,y]=(0,s.useState)(""),[b,v]=(0,s.useState)(new Set),k=(0,x.normalizeNotePath)(f),N=f.trim()?k:o,g=(0,x.normalizeNotePath)(N)===l,C=new Map;for(let e of c){let t=C.get(e.parentPath)||[];t.push(e),C.set(e.parentPath,t)}let M=c.filter(e=>{if(!e.parentPath)return!0;let t=e.parentPath.split("/").filter(Boolean);return t.every((e,s)=>b.has(t.slice(0,s+1).join("/")))}),w=[{label:"全部笔记",path:""},...o.split("/").filter(Boolean).map((e,t,s)=>({label:e,path:s.slice(0,t+1).join("/")}))];function z(e){j((0,x.normalizeNotePath)(e)),y("")}return(0,t.jsx)(p.ModalOverlay,{onClose:n,children:(0,t.jsxs)("div",{className:"note-move-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h3",{children:"移动笔记"}),(0,t.jsx)("button",{className:"btn btn-icon",onClick:n,children:(0,t.jsx)(m.X,{size:18})})]}),(0,t.jsxs)("div",{className:"note-move-target",children:[(0,t.jsx)("span",{children:"正在移动"}),(0,t.jsx)("strong",{children:e.name})]}),(0,t.jsx)("div",{className:"note-move-path",children:w.map((e,a)=>(0,t.jsxs)(s.default.Fragment,{children:[a>0&&(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("button",{type:"button",onClick:()=>z(e.path),children:e.label})]},e.path||"root"))}),(0,t.jsxs)("div",{className:"note-move-folder-list",children:[(0,t.jsxs)("button",{type:"button",className:`note-move-folder-item ${""===o?"selected":""}`,onClick:()=>z(""),children:[(0,t.jsx)("span",{className:"note-move-folder-spacer"}),(0,t.jsx)(u.Folder,{className:"note-move-folder-icon",size:16}),(0,t.jsx)("span",{children:"全部笔记"})]}),0===c.length?(0,t.jsx)("p",{className:"note-move-empty",children:"还没有可选文件夹"}):M.map(e=>{let s=C.has(e.path),a=b.has(e.path);return(0,t.jsxs)("button",{type:"button",className:`note-move-folder-item note-move-depth-${Math.min(e.depth,4)} ${o===e.path?"selected":""}`,onClick:()=>{var t;z(t=e.path),C.has(t)&&v(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},children:[s?a?(0,t.jsx)(d.ChevronDown,{className:"note-move-expander",size:14}):(0,t.jsx)(h.ChevronRight,{className:"note-move-expander",size:14}):(0,t.jsx)("span",{className:"note-move-folder-spacer"}),(0,t.jsx)(u.Folder,{className:"note-move-folder-icon",size:16}),(0,t.jsx)("span",{children:e.name}),e.parentPath&&(0,t.jsx)("small",{children:e.parentPath})]},e.path)})]}),(0,t.jsx)("input",{className:"input input-compact",value:f,onChange:e=>y(e.target.value),placeholder:"或输入新目录路径,如 文章/摘录"}),(0,t.jsxs)("div",{className:"note-move-destination",children:["目标位置:",N||"全部笔记"]}),(0,t.jsxs)("div",{className:"modal-actions",children:[(0,t.jsx)("button",{className:"btn btn-secondary",onClick:n,children:"取消"}),(0,t.jsx)("button",{className:"btn btn-primary",onClick:function(){g||i(N)},disabled:g,children:"移动"})]})]})})}],60923);var j=e.i(11241),f=e.i(27648);e.s(["NoteSidebar",0,function({children:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"sidebar-header sidebar-header-link",onClick:()=>{window.location.href="/"},children:[(0,t.jsx)(j.ArrowLeft,{size:18}),(0,t.jsx)("h1",{children:"MOST PEOPLE"})]}),e,(0,t.jsx)(f.default,{})]})}],86512)},38999,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(53138),i=e.i(11241),n=e.i(56420);let l=(0,n.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);var r=e.i(51757),c=e.i(31214),o=e.i(58072),d=e.i(72382),h=e.i(26091),u=e.i(26067),m=e.i(10818);let p=(0,n.default)("log-in",[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]);var x=e.i(68590),j=e.i(96699);let f=(0,n.default)("mouse-pointer-click",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]),y=(0,n.default)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);var b=e.i(77071),v=e.i(66595),k=e.i(41220),N=e.i(16306);let g=(0,n.default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);var C=e.i(35965);let M=(0,n.default)("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]);var w=e.i(66627),z=e.i(3593),S=e.i(71192),P=e.i(23165),O=e.i(77685),L=e.i(19767),F=e.i(24851),T=e.i(56691),E=e.i(61507),A=e.i(58501),I=e.i(64830),B=e.i(40616),D=e.i(42724),_=e.i(32391),$=e.i(60923),U=e.i(86512),R=e.i(16546);e.i(4121);var q=e.i(88361),K=e.i(47910),H=e.i(57667),V=e.i(80809),W=e.i(79952);let G={name:"产品计划.md",cid:"bafy-demo-note",path:"产品/计划",content:"# MostBox Demo",size:2048,type:"file",created_at:17645472e5,updated_at:17645472e5},X=[{path:"产品",name:"产品",parentPath:"",depth:0},{path:"产品/计划",name:"计划",parentPath:"产品",depth:1},{path:"产品/摘录",name:"摘录",parentPath:"产品",depth:1},{path:"灵感",name:"灵感",parentPath:"",depth:0}];function Y({id:e,icon:s,eyebrow:a,title:i,description:n,children:l}){return(0,t.jsxs)("section",{className:"demo-section",id:e,children:[(0,t.jsxs)("div",{className:"demo-section-heading",children:[(0,t.jsx)("div",{className:"demo-section-icon",children:s}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"demo-eyebrow",children:a}),(0,t.jsx)("h2",{children:i}),(0,t.jsx)("p",{children:n})]})]}),l]})}function Z({title:e,children:s,className:a=""}){let i=a?`demo-surface ${a}`:"demo-surface";return(0,t.jsxs)("article",{className:i,children:[(0,t.jsx)("h3",{children:e}),s]})}e.s(["default",0,function(){let[e,n]=(0,s.useState)("r2"),[J,Q]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(!1),[es,ea]=(0,s.useState)(!1),[ei,en]=(0,s.useState)(!1),[el,er]=(0,s.useState)(!1),[ec,eo]=(0,s.useState)([]),ed=(0,z.useAppStore)(e=>e.isDarkMode),eh=(0,z.useAppStore)(e=>e.setIsDarkMode),eu=(0,z.useAppStore)(e=>e.openConnectModal),em=(0,S.useUserStore)(e=>e.openLoginModal);function ep(e,t){eo(s=>[...s.slice(-4),{id:Date.now(),type:e,message:t}])}return(0,t.jsxs)("main",{className:"demo-page",children:[(0,t.jsxs)("header",{className:"demo-topbar",children:[(0,t.jsxs)("a",{className:"mkt-nav-logo",href:"/",children:[(0,t.jsx)(i.ArrowLeft,{size:18}),(0,t.jsx)("span",{children:"MOST PEOPLE"})]}),(0,t.jsx)("button",{type:"button",className:"mkt-theme-toggle",onClick:()=>eh(!ed),"aria-label":"切换主题",title:"切换主题",children:ed?(0,t.jsx)(C.Sun,{size:16}):(0,t.jsx)(j.Moon,{size:16})})]}),(0,t.jsx)("section",{className:"demo-hero",children:(0,t.jsxs)("div",{className:"demo-hero-copy",children:[(0,t.jsx)("p",{className:"demo-eyebrow",children:"Shared Component Library"}),(0,t.jsx)("h1",{children:"共享组件检查页"}),(0,t.jsx)("p",{children:"把基础样式、全局 UI 片段和已迁入 components 的共享组件按用途集中展示, 方便以后改 UI 时直接从这里检查联动效果。"})]})}),(0,t.jsx)(Y,{id:"foundation",icon:(0,t.jsx)(y,{size:18}),eyebrow:"Foundation",title:"基础样式",description:"全局按钮、输入框、开关、分段控件和状态反馈。",children:(0,t.jsxs)("div",{className:"demo-grid demo-grid-two",children:[(0,t.jsx)(Z,{title:"默认按钮",children:(0,t.jsxs)("div",{className:"demo-control-row",children:[(0,t.jsxs)("button",{className:"btn btn-primary",children:[(0,t.jsx)(r.CheckCircle2,{size:16}),"Primary"]}),(0,t.jsxs)("button",{className:"btn btn-secondary",children:[(0,t.jsx)(m.Info,{size:16}),"Secondary"]}),(0,t.jsxs)("button",{className:"btn btn-ghost",children:[(0,t.jsx)(g,{size:16}),"Ghost"]}),(0,t.jsxs)("button",{className:"btn btn-danger",children:[(0,t.jsx)(N.ShieldAlert,{size:16}),"Danger"]}),(0,t.jsx)("button",{className:"btn btn-primary",disabled:!0,children:"Disabled"}),(0,t.jsxs)("button",{type:"button",className:"ui-action-dashed",children:[(0,t.jsx)(b.Plus,{size:16}),"Dashed"]})]})}),(0,t.jsx)(Z,{title:"小号按钮",children:(0,t.jsxs)("div",{className:"demo-control-row",children:[(0,t.jsxs)("button",{className:"btn btn-sm btn-primary",children:[(0,t.jsx)(r.CheckCircle2,{size:14}),"Primary"]}),(0,t.jsxs)("button",{className:"btn btn-sm btn-secondary",children:[(0,t.jsx)(m.Info,{size:14}),"Secondary"]}),(0,t.jsxs)("button",{className:"btn btn-sm btn-ghost",children:[(0,t.jsx)(g,{size:14}),"Ghost"]}),(0,t.jsxs)("button",{className:"btn btn-sm btn-danger",children:[(0,t.jsx)(N.ShieldAlert,{size:14}),"Danger"]}),(0,t.jsx)("button",{className:"btn btn-sm btn-icon","aria-label":"小号图标按钮",children:(0,t.jsx)(l,{size:14})}),(0,t.jsx)("button",{className:"btn btn-sm btn-primary",disabled:!0,children:"Disabled"}),(0,t.jsxs)("button",{type:"button",className:"ui-action-dashed ui-action-dashed-sm",children:[(0,t.jsx)(b.Plus,{size:14}),"Dashed"]})]})}),(0,t.jsx)(Z,{title:"输入控件",children:(0,t.jsxs)("div",{className:"demo-input-grid",children:[(0,t.jsx)("input",{className:"input",value:"标准输入框",readOnly:!0}),(0,t.jsx)("input",{className:"input input-compact",value:"紧凑输入框",readOnly:!0}),(0,t.jsx)("input",{className:"input input-pill",value:"胶囊输入框",readOnly:!0}),(0,t.jsx)("textarea",{className:"textarea",value:"多行输入框",rows:3,readOnly:!0}),(0,t.jsxs)("div",{className:"ui-input-control",children:[(0,t.jsx)(v.Search,{className:"ui-input-icon",size:15}),(0,t.jsx)("input",{className:"input input-compact",placeholder:"带图标搜索",readOnly:!0})]})]})}),(0,t.jsx)(Z,{title:"开关、分段与徽标",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsxs)("label",{className:"setting-switch",children:[(0,t.jsx)("span",{children:"显示 #地址后四位"}),(0,t.jsx)("input",{type:"checkbox",defaultChecked:!0})]}),(0,t.jsxs)("label",{className:"setting-switch",children:[(0,t.jsx)("span",{children:"自动同步"}),(0,t.jsx)("input",{type:"checkbox"})]}),(0,t.jsxs)("div",{className:"ui-segmented-control download-source-tabs demo-download-source-tabs",role:"tablist","aria-label":"下载来源",children:[(0,t.jsxs)("button",{type:"button",className:"r2"===e?"ui-segmented-option download-source-tab is-active":"ui-segmented-option download-source-tab",role:"tab","aria-selected":"r2"===e,onClick:()=>n("r2"),children:[(0,t.jsx)(c.Cloud,{size:15}),"R2"]}),(0,t.jsxs)("button",{type:"button",className:"github"===e?"ui-segmented-option download-source-tab is-active":"ui-segmented-option download-source-tab",role:"tab","aria-selected":"github"===e,onClick:()=>n("github"),children:[(0,t.jsx)(o.Code,{size:15}),"GitHub"]})]}),(0,t.jsxs)("div",{className:"demo-control-row",children:[(0,t.jsxs)("span",{className:"ui-badge success",children:[(0,t.jsx)("span",{className:"status-dot success"}),"已连接"]}),(0,t.jsxs)("span",{className:"ui-badge warning",children:[(0,t.jsx)("span",{className:"status-dot warning"}),"检测中"]}),(0,t.jsxs)("span",{className:"ui-badge danger",children:[(0,t.jsx)("span",{className:"status-dot danger"}),"不可用"]}),(0,t.jsxs)("span",{className:"ui-badge info",children:[(0,t.jsx)("span",{className:"status-dot info"}),"已就绪"]})]})]})})]})}),(0,t.jsx)(Y,{id:"brand",icon:(0,t.jsx)(M,{size:18}),eyebrow:"Brand",title:"品牌与导航",description:"Logo、营销导航和页脚放在独立预览面板里,避免和 demo 容器互相挤压。",children:(0,t.jsxs)("div",{className:"demo-grid demo-brand-grid",children:[(0,t.jsx)(Z,{title:"LogoIcon",children:(0,t.jsxs)("div",{className:"demo-logo-row",children:[(0,t.jsx)(A.LogoIcon,{size:24}),(0,t.jsx)(A.LogoIcon,{size:36}),(0,t.jsx)(A.LogoIcon,{size:52})]})}),(0,t.jsx)(Z,{title:"Nav",className:"demo-nav-preview",children:(0,t.jsx)(D.Nav,{})}),(0,t.jsx)(Z,{title:"Footer",className:"demo-footer-preview",children:(0,t.jsx)(T.Footer,{})})]})}),(0,t.jsx)(Y,{id:"feedback",icon:(0,t.jsx)(f,{size:18}),eyebrow:"Feedback",title:"弹窗与反馈",description:"弹窗、Toast、连接和登录入口都使用按钮触发,页面加载时不主动打开。",children:(0,t.jsx)(Z,{title:"触发式组件",children:(0,t.jsxs)("div",{className:"demo-control-row",children:[(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:()=>Q(!0),children:[(0,t.jsx)(d.Eye,{size:16}),"ModalOverlay"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:()=>et(!0),children:[(0,t.jsx)(N.ShieldAlert,{size:16}),"ConfirmModal"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:()=>ea(!0),children:[(0,t.jsx)(M,{size:16}),"InputModal"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:()=>ep("info","这是一条本地 demo toast"),children:[(0,t.jsx)(l,{size:16}),"Toast"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:eu,children:[(0,t.jsx)(k.Server,{size:16}),"ConnectModal"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:em,children:[(0,t.jsx)(p,{size:16}),"UserLoginModal"]})]})})}),(0,t.jsx)(Y,{id:"patterns",icon:(0,t.jsx)(g,{size:18}),eyebrow:"Patterns",title:"全局样式片段",description:"页面里反复复用的全局 class 和组合形态。",children:(0,t.jsxs)("div",{className:"demo-grid demo-grid-two",children:[(0,t.jsx)(Z,{title:"文件行",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsx)(O.ChatAttachmentCard,{attachment:{kind:"text",cid:"bafy-demo-text",fileName:"demo-preview.txt",link:"most://bafy-demo-text?filename=demo-preview.txt",size:12697},status:"available"}),(0,t.jsx)(O.ChatAttachmentCard,{attachment:{kind:"video",cid:"bafy-demo-video",fileName:"movie-sample.mp4",link:"most://bafy-demo-video?filename=movie-sample.mp4",size:0},status:"checking"})]})}),(0,t.jsx)(Z,{title:"空状态",children:(0,t.jsxs)("div",{className:"ui-empty-state demo-empty-preview",children:[(0,t.jsx)("div",{className:"ui-empty-icon",children:(0,t.jsx)(x.MessageSquare,{size:28})}),(0,t.jsx)("h4",{className:"ui-empty-title",children:"暂无消息"}),(0,t.jsx)("p",{className:"ui-empty-desc",children:"开始聊天或选择一个频道。"})]})}),(0,t.jsx)(Z,{title:"列表与元信息",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsx)("article",{className:"ui-list-item active",children:(0,t.jsxs)("button",{type:"button",className:"ui-list-item-main",children:[(0,t.jsx)("span",{className:"ui-list-icon",children:(0,t.jsx)(h.FileText,{size:18})}),(0,t.jsxs)("span",{className:"ui-list-copy",children:[(0,t.jsx)("span",{className:"ui-list-title",children:"产品计划.md"}),(0,t.jsx)("span",{className:"ui-list-desc",children:"CID、下载和做种说明"})]}),(0,t.jsx)("span",{className:"ui-list-meta",children:"今天"})]})}),(0,t.jsx)("article",{className:"ui-list-item",children:(0,t.jsxs)("button",{type:"button",className:"ui-list-item-main",children:[(0,t.jsx)("span",{className:"ui-list-icon warning",children:(0,t.jsx)(u.Folder,{size:18})}),(0,t.jsxs)("span",{className:"ui-list-copy",children:[(0,t.jsx)("span",{className:"ui-list-title",children:"归档"}),(0,t.jsx)("span",{className:"ui-list-desc",children:"文件夹"})]}),(0,t.jsx)("span",{className:"ui-list-meta",children:"12 篇"})]})}),(0,t.jsx)("div",{className:"ui-meta-box",children:"频道 ID:general"}),(0,t.jsx)("div",{className:"ui-empty-inline",children:"暂无成员"})]})}),(0,t.jsx)(Z,{title:"通知、标签与代码",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsxs)("p",{className:"ui-notice success",children:[(0,t.jsx)(r.CheckCircle2,{size:14}),"同步完成,所有内容已更新。"]}),(0,t.jsxs)("p",{className:"ui-notice warning",children:[(0,t.jsx)(a.AlertTriangle,{size:14}),"节点正在检测中,请稍候。"]}),(0,t.jsxs)("ul",{className:"ui-chip-list demo-chip-preview",children:[(0,t.jsx)("li",{className:"ui-chip",children:"MostBox"}),(0,t.jsx)("li",{className:"ui-chip",children:"P2P"}),(0,t.jsx)("li",{className:"ui-chip",children:"CID"}),(0,t.jsx)("li",{className:"ui-chip",children:"Hyperdrive"})]}),(0,t.jsx)("code",{className:"ui-code-box",children:"most://bafy-demo-cid?filename=demo.txt"}),(0,t.jsxs)("div",{className:"ui-peer-info demo-peer-info",children:[(0,t.jsx)("span",{className:"peer-dot"}),(0,t.jsx)("span",{className:"peer-id",children:"12D3KooW...demo"}),(0,t.jsx)(w.Wifi,{size:14})]})]})})]})}),(0,t.jsx)(Y,{id:"shared",icon:(0,t.jsx)(h.FileText,{size:18}),eyebrow:"Shared Components",title:"共享组件",description:"已迁入 components 的页面组件,只展示外观和轻交互。",children:(0,t.jsxs)("div",{className:"demo-grid demo-grid-two",children:[(0,t.jsx)(Z,{title:"Web3 小组件",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsx)(I.KeyCard,{title:"Ed25519 公钥",icon:(0,t.jsx)(N.ShieldAlert,{size:18}),children:(0,t.jsxs)("div",{className:"mono-row",children:[(0,t.jsx)("code",{className:"mono",children:"ed25519-demo-public-key"}),(0,t.jsx)(P.CopyButton,{text:"ed25519-demo-public-key"})]})}),(0,t.jsx)(F.EmptyState,{icon:(0,t.jsx)(p,{size:32}),message:"请输入用户名和密码以查看身份信息"})]})}),(0,t.jsx)(Z,{title:"PEM 与复制",className:"demo-pem-preview",children:(0,t.jsx)(R.PemBlock,{label:"demo.pub",filename:"demo.pub",pem:"-----BEGIN PUBLIC KEY-----\nMOSTBOXDEMO\n-----END PUBLIC KEY-----"})}),(0,t.jsxs)(Z,{title:"文件管理卡片",children:[(0,t.jsxs)("div",{className:"demo-app-card-grid",children:[(0,t.jsx)(E.FolderCard,{folder:{name:"图片",path:"图片"},onClick:()=>ep("info","FolderCard demo")}),(0,t.jsx)(E.FileCard,{file:{cid:"bafy-demo-file",fileName:"图片/demo.png",starred:!0},isSelected:!0,onSelect:()=>ep("info","FileCard select"),onPreview:()=>ep("info","FileCard preview")})]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary demo-move-trigger",onClick:()=>en(!0),children:[(0,t.jsx)(u.Folder,{size:16}),"MoveModal"]})]}),(0,t.jsx)(Z,{title:"笔记组件",children:(0,t.jsxs)("div",{className:"demo-note-shell",children:[(0,t.jsxs)("div",{className:"demo-note-header",children:[(0,t.jsx)("span",{children:"笔记"}),(0,t.jsx)(_.NoteMoreMenu,{sync:{action:null,status:"synced",statusLabel:"已同步",hasConflict:!1,uploadNow:async()=>!0,restoreFromCloud:async()=>!0,exportLocalBackup:()=>ep("info","本地导出"),importLocalBackup:()=>ep("info","本地导入")}})]}),(0,t.jsx)("div",{className:"sidebar demo-note-sidebar",children:(0,t.jsx)(U.NoteSidebar,{children:(0,t.jsx)("div",{className:"sidebar-empty-state",children:(0,t.jsx)("p",{children:"NoteSidebar 已迁入 components"})})})}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary demo-move-trigger",onClick:()=>er(!0),children:[(0,t.jsx)(u.Folder,{size:16}),"NoteMoveModal"]})]})})]})}),ec.map((e,s)=>(0,t.jsx)(V.Toast,{message:e.message,type:e.type,index:s,onDone:()=>{var t;return t=e.id,void eo(e=>e.filter(e=>e.id!==t))}},e.id)),J&&(0,t.jsx)(H.ModalOverlay,{onClose:()=>Q(!1),closeOnOverlayClick:!0,children:(0,t.jsxs)("div",{className:"demo-basic-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("h3",{children:"ModalOverlay"}),(0,t.jsx)("p",{children:"这是基础容器示例,用来检查玻璃背景、居中和关闭行为。"}),(0,t.jsx)("button",{type:"button",className:"btn btn-primary",onClick:()=>Q(!1),children:"关闭"})]})}),ee&&(0,t.jsx)(q.ConfirmModal,{title:"确认弹窗示例",message:"用于检查标题、正文、按钮和危险态之外的默认确认状态。",confirmText:"确认",onConfirm:()=>{et(!1),ep("success","ConfirmModal 已确认")},onClose:()=>et(!1),closeOnOverlayClick:!0}),es&&(0,t.jsx)(K.InputModal,{title:"输入弹窗示例",placeholder:"输入任意文本",confirmText:"保存",defaultValue:"MostBox",onConfirm:e=>{ea(!1),ep("success",`InputModal: ${e}`)},onClose:()=>ea(!1),validate:e=>e.length<2?"至少输入 2 个字符":""}),ei&&(0,t.jsx)(B.MoveModal,{items:[{cid:"bafy-demo-file"}],allFolders:[{name:"图片",path:"图片"},{name:"壁纸",path:"图片/壁纸"},{name:"文档",path:"文档"}],currentPath:"图片",onMove:e=>{en(!1),ep("success",`MoveModal: ${e||"根目录"}`)},onClose:()=>en(!1)}),el&&(0,t.jsx)($.NoteMoveModal,{target:G,directories:X,onMove:e=>{er(!1),ep("success",`NoteMoveModal: ${e||"全部笔记"}`)},onClose:()=>er(!1)}),(0,t.jsx)(L.default,{}),(0,t.jsx)(W.default,{})]})}],38999)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31214,e=>{"use strict";let t=(0,e.i(56420).default)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);e.s(["Cloud",0,t],31214)},11241,e=>{"use strict";let t=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],11241)},96699,e=>{"use strict";let t=(0,e.i(56420).default)("moon",[["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",key:"kfwtm"}]]);e.s(["Moon",0,t],96699)},35965,e=>{"use strict";let t=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,t],35965)},59665,5142,e=>{"use strict";var t=e.i(18050),n=e.i(71645);let a=(0,e.i(56420).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);function r(e=!1,t={}){let[a,s]=(0,n.useState)(e),i=(0,n.useCallback)(()=>{s(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),l=(0,n.useCallback)(()=>{s(e=>e?(t.onClose?.(),!1):e)},[t.onClose]);return[a,{open:i,close:l,toggle:(0,n.useCallback)(()=>{a?l():i()},[l,i,a]),set:s}]}e.s(["useDisclosure",0,r],5142);let s=(0,n.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:i,headerRight:l,children:o}){let[c,u]=r(!1),[d,h]=(0,n.useState)(!1),p=function(e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){let[a,r]=(0,n.useState)(t?void 0:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,n.useEffect)(()=>{try{if("matchMedia"in window){let t=window.matchMedia(e);r(t.matches);let n=e=>r(e.matches);return t.addEventListener("change",n),()=>{t.removeEventListener("change",n)}}}catch(e){return}},[e]),a||!1}("(max-width: 768px)"),f=()=>{p?u.open():h(!1)};return(0,t.jsx)(s.Provider,{value:{closeSidebar:u.close,openSidebar:f,isSidebarVisible:p?c:!d},children:(0,t.jsxs)("div",{className:"app-layout",children:[(0,t.jsx)("div",{className:`sidebar-overlay ${c?"visible":""}`,onClick:()=>u.close()}),(0,t.jsx)("div",{className:`sidebar ${c?"open":""} ${d?"collapsed":""}`,children:e({closeSidebar:u.close,openSidebar:f})}),(0,t.jsxs)("div",{className:"main-content",children:[(0,t.jsxs)("header",{className:"app-header",children:[(0,t.jsxs)("div",{className:"header-left",children:[(0,t.jsx)("button",{onClick:()=>{p?u.toggle():h(!d)},className:"btn btn-icon sidebar-toggle-btn","aria-label":p?"打开菜单":d?"展开侧边栏":"收起侧边栏",children:(0,t.jsx)(a,{size:16})}),i]}),(0,t.jsx)("div",{className:"header-right",children:l})]}),o]})]})})},"useAppShell",0,function(){let e=(0,n.useContext)(s);if(!e)throw Error("useAppShell must be used within AppShell");return e}],59665)},27648,e=>{"use strict";var t=e.i(18050),n=e.i(93957),a=e.i(71192);e.s(["default",0,function({className:e=""}){let r=(0,a.useUserStore)(e=>e.identity),s=(0,a.useUserStore)(e=>e.openLoginModal),i=(0,a.useUserStore)(e=>e.logoutUser);return(0,t.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,t.jsxs)("div",{className:"user-info",children:[(0,t.jsx)("img",{className:"user-avatar-img",src:(0,n.generateAvatar)(r?.address,r?.avatar),alt:"avatar"}),(0,t.jsx)("span",{className:"user-name",title:r?.address,children:r?.displayName||"未登录"})]}),r?(0,t.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:i,children:"退出"}):(0,t.jsx)("button",{className:"btn btn-primary login-btn",onClick:s,children:"登录"})]})}])},39626,e=>{"use strict";var t=e.i(18050);let n=(0,e.i(56420).default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var a=e.i(59665);e.s(["default",0,function({label:e="打开侧边栏",className:r="",variant:s="primary"}){let{isSidebarVisible:i,openSidebar:l}=(0,a.useAppShell)();return i?null:(0,t.jsxs)("button",{type:"button",className:`btn ${"primary"===s?"btn-primary":""} sidebar-open-hint ${r}`.trim(),onClick:l,children:[(0,t.jsx)(n,{size:16}),e]})}],39626)},10566,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["NotebookPen",0,t],10566)},53138,51757,e=>{"use strict";var t=e.i(56420);let n=(0,t.default)("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"}]]);e.s(["AlertTriangle",0,n],53138);let a=(0,t.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,a],51757)},73474,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Trash2",0,t],73474)},56522,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Save",0,t],56522)},22315,(e,t,n)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",n="minute",a="hour",r="week",s="month",i="quarter",l="year",o="date",c="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=function(e,t,n){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(n)+e},p="en",f={};f[p]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}};var m="$isDayjsObject",y=function(e){return e instanceof v||!(!e||!e[m])},x=function e(t,n,a){var r;if(!t)return p;if("string"==typeof t){var s=t.toLowerCase();f[s]&&(r=s),n&&(f[s]=n,r=s);var i=t.split("-");if(!r&&i.length>1)return e(i[0])}else{var l=t.name;f[l]=t,r=l}return!a&&r&&(p=r),r||!a&&p},j=function(e,t){if(y(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new v(n)},b={s:h,z:function(e){var t=-e.utcOffset(),n=Math.abs(t);return(t<=0?"+":"-")+h(Math.floor(n/60),2,"0")+":"+h(n%60,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var a=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(a,s),i=n-r<0,l=t.clone().add(a+(i?-1:1),s);return+(-(a+(n-r)/(i?r-l:l-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(c){return({M:s,y:l,w:r,d:"day",D:o,h:a,m:n,s:t,ms:e,Q:i})[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};b.l=x,b.i=y,b.w=function(e,t){return j(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var v=function(){function h(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[m]=!0}var p=h.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(b.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var a=t.match(u);if(a){var r=a[2]-1||0,s=(a[7]||"0").substring(0,3);return n?new Date(Date.UTC(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,s)):new Date(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,s)}}return new Date(t)}(e),this.init()},p.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return this.$d.toString()!==c},p.isSame=function(e,t){var n=j(e);return this.startOf(t)<=n&&n<=this.endOf(t)},p.isAfter=function(e,t){return j(e)<this.startOf(t)},p.isBefore=function(e,t){return this.endOf(t)<j(e)},p.$g=function(e,t,n){return b.u(e)?this[t]:this.set(n,e)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(e,i){var c=this,u=!!b.u(i)||i,d=b.p(e),h=function(e,t){var n=b.w(c.$u?Date.UTC(c.$y,t,e):new Date(c.$y,t,e),c);return u?n:n.endOf("day")},p=function(e,t){return b.w(c.toDate()[e].apply(c.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(t)),c)},f=this.$W,m=this.$M,y=this.$D,x="set"+(this.$u?"UTC":"");switch(d){case l:return u?h(1,0):h(31,11);case s:return u?h(1,m):h(0,m+1);case r:var j=this.$locale().weekStart||0,v=(f<j?f+7:f)-j;return h(u?y-v:y+(6-v),m);case"day":case o:return p(x+"Hours",0);case a:return p(x+"Minutes",1);case n:return p(x+"Seconds",2);case t:return p(x+"Milliseconds",3);default:return this.clone()}},p.endOf=function(e){return this.startOf(e,!1)},p.$set=function(r,i){var c,u=b.p(r),d="set"+(this.$u?"UTC":""),h=((c={}).day=d+"Date",c[o]=d+"Date",c[s]=d+"Month",c[l]=d+"FullYear",c[a]=d+"Hours",c[n]=d+"Minutes",c[t]=d+"Seconds",c[e]=d+"Milliseconds",c)[u],p="day"===u?this.$D+(i-this.$W):i;if(u===s||u===l){var f=this.clone().set(o,1);f.$d[h](p),f.init(),this.$d=f.set(o,Math.min(this.$D,f.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},p.set=function(e,t){return this.clone().$set(e,t)},p.get=function(e){return this[b.p(e)]()},p.add=function(e,i){var o,c=this;e=Number(e);var u=b.p(i),d=function(t){var n=j(c);return b.w(n.date(n.date()+Math.round(t*e)),c)};if(u===s)return this.set(s,this.$M+e);if(u===l)return this.set(l,this.$y+e);if("day"===u)return d(1);if(u===r)return d(7);var h=((o={})[n]=6e4,o[a]=36e5,o[t]=1e3,o)[u]||1,p=this.$d.getTime()+e*h;return b.w(p,this)},p.subtract=function(e,t){return this.add(-1*e,t)},p.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||c;var a=e||"YYYY-MM-DDTHH:mm:ssZ",r=b.z(this),s=this.$H,i=this.$m,l=this.$M,o=n.weekdays,u=n.months,h=n.meridiem,p=function(e,n,r,s){return e&&(e[n]||e(t,a))||r[n].slice(0,s)},f=function(e){return b.s(s%12||12,e,"0")},m=h||function(e,t,n){var a=e<12?"AM":"PM";return n?a.toLowerCase():a};return a.replace(d,function(e,a){return a||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return b.s(t.$y,4,"0");case"M":return l+1;case"MM":return b.s(l+1,2,"0");case"MMM":return p(n.monthsShort,l,u,3);case"MMMM":return p(u,l);case"D":return t.$D;case"DD":return b.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(n.weekdaysMin,t.$W,o,2);case"ddd":return p(n.weekdaysShort,t.$W,o,3);case"dddd":return o[t.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(s,i,!0);case"A":return m(s,i,!1);case"m":return String(i);case"mm":return b.s(i,2,"0");case"s":return String(t.$s);case"ss":return b.s(t.$s,2,"0");case"SSS":return b.s(t.$ms,3,"0");case"Z":return r}return null}(e)||r.replace(":","")})},p.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},p.diff=function(e,o,c){var u,d=this,h=b.p(o),p=j(e),f=(p.utcOffset()-this.utcOffset())*6e4,m=this-p,y=function(){return b.m(d,p)};switch(h){case l:u=y()/12;break;case s:u=y();break;case i:u=y()/3;break;case r:u=(m-f)/6048e5;break;case"day":u=(m-f)/864e5;break;case a:u=m/36e5;break;case n:u=m/6e4;break;case t:u=m/1e3;break;default:u=m}return c?u:b.a(u)},p.daysInMonth=function(){return this.endOf(s).$D},p.$locale=function(){return f[this.$L]},p.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),a=x(e,t,!0);return a&&(n.$L=a),n},p.clone=function(){return b.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},h}(),g=v.prototype;return j.prototype=g,[["$ms",e],["$s",t],["$m",n],["$H",a],["$W","day"],["$M",s],["$y",l],["$D",o]].forEach(function(e){g[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),j.extend=function(e,t){return e.$i||(e(t,v,j),e.$i=!0),j},j.locale=x,j.isDayjs=y,j.unix=function(e){return j(1e3*e)},j.en=f[p],j.Ls=f,j.p={},j}()},16327,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],16327)},6537,77816,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Lock",0,t],6537);var n=e.i(22315);function a(e){let t;if(!e)return"";let a=(0,n.default)(Number(e)),r=a.hour();return t=r>=0&&r<3?"凌晨":r>=3&&r<6?"拂晓":r>=6&&r<9?"早晨":r>=9&&r<12?"上午":r>=12&&r<15?"下午":r>=15&&r<18?"傍晚":r>=18&&r<21?"晚上":"深夜",a.format(`YYYY年M月D日 ${t}h:m`)}e.s(["formatDate",0,a,"formatTime",0,a],77816)},26091,e=>{"use strict";let t=(0,e.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],26091)},62368,e=>{"use strict";let t=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],62368)},66595,e=>{"use strict";let t=(0,e.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],66595)},77071,e=>{"use strict";let t=(0,e.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},26067,e=>{"use strict";let t=(0,e.i(56420).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,t],26067)},25981,67927,e=>{"use strict";var t=e.i(56420);let n=(0,t.default)("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"}]]);e.s(["Upload",0,n],25981);let a=(0,t.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,a],67927)},32391,60923,86512,e=>{"use strict";var t=e.i(18050),n=e.i(71645),a=e.i(53138),r=e.i(51757),s=e.i(31214),i=e.i(62368);let l=(0,e.i(56420).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);var o=e.i(25981),c=e.i(71192);e.s(["NoteMoreMenu",0,function({sync:e}){let u=(0,n.useRef)(null),[d,h]=(0,n.useState)(!1),p=(0,c.useUserStore)(e=>e.wallet),f=null!==e.action;async function m(e){h(!1),await e()}return(0,n.useEffect)(()=>{if(d)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){u.current?.contains(e.target)||h(!1)}},[d]),(0,t.jsxs)("div",{className:"note-more",ref:u,children:[(0,t.jsx)("button",{className:"btn btn-icon note-more-trigger",onClick:()=>h(e=>!e),title:"更多","aria-label":"更多",children:(0,t.jsx)(l,{size:16})}),d&&(0,t.jsxs)("div",{className:"note-more-menu",children:[(0,t.jsxs)("div",{className:`ui-notice note-sync-status ${e.hasConflict?"warning conflict":""}`,children:[(0,t.jsx)("span",{className:`ui-icon-tile note-sync-status-icon ${e.hasConflict?"warning":""}`,children:e.hasConflict?(0,t.jsx)(a.AlertTriangle,{size:16}):"synced"===e.status?(0,t.jsx)(r.CheckCircle2,{size:16}):(0,t.jsx)(s.Cloud,{size:16})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"云同步"}),(0,t.jsx)("small",{children:e.statusLabel})]})]}),(0,t.jsxs)("button",{className:"note-more-item",onClick:()=>m(e.exportLocalBackup),disabled:!p||f,children:[(0,t.jsx)(o.Upload,{size:16}),"本地导出"]}),(0,t.jsxs)("button",{className:"note-more-item",onClick:()=>m(e.importLocalBackup),disabled:!p||f,children:[(0,t.jsx)(i.Download,{size:16}),"本地导入"]})]})]})}],32391);var u=e.i(16327),d=e.i(67927),h=e.i(26067),p=e.i(63676);e.i(4121);var f=e.i(57667),m=e.i(3789);e.s(["NoteMoveModal",0,function({target:e,directories:a,onMove:r,onClose:s}){let i=(0,m.normalizeNotePath)(e.path||""),l="directory"===e.type?(0,m.normalizeNotePath)(e.path?`${e.path}/${e.name}`:e.name):(0,m.getNoteFullPath)(e),o=a.filter(t=>"directory"!==e.type||t.path!==l&&!t.path.startsWith(`${l}/`)),[c,y]=(0,n.useState)(i),[x,j]=(0,n.useState)(""),[b,v]=(0,n.useState)(new Set),g=(0,m.normalizeNotePath)(x),k=x.trim()?g:c,w=(0,m.normalizeNotePath)(k)===i,N=new Map;for(let e of o){let t=N.get(e.parentPath)||[];t.push(e),N.set(e.parentPath,t)}let S=o.filter(e=>{if(!e.parentPath)return!0;let t=e.parentPath.split("/").filter(Boolean);return t.every((e,n)=>b.has(t.slice(0,n+1).join("/")))}),M=[{label:"全部笔记",path:""},...c.split("/").filter(Boolean).map((e,t,n)=>({label:e,path:n.slice(0,t+1).join("/")}))];function $(e){y((0,m.normalizeNotePath)(e)),j("")}return(0,t.jsx)(f.ModalOverlay,{onClose:s,children:(0,t.jsxs)("div",{className:"note-move-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h3",{children:"移动笔记"}),(0,t.jsx)("button",{className:"btn btn-icon",onClick:s,children:(0,t.jsx)(p.X,{size:18})})]}),(0,t.jsxs)("div",{className:"note-move-target",children:[(0,t.jsx)("span",{children:"正在移动"}),(0,t.jsx)("strong",{children:e.name})]}),(0,t.jsx)("div",{className:"note-move-path",children:M.map((e,a)=>(0,t.jsxs)(n.default.Fragment,{children:[a>0&&(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("button",{type:"button",onClick:()=>$(e.path),children:e.label})]},e.path||"root"))}),(0,t.jsxs)("div",{className:"note-move-folder-list",children:[(0,t.jsxs)("button",{type:"button",className:`note-move-folder-item ${""===c?"selected":""}`,onClick:()=>$(""),children:[(0,t.jsx)("span",{className:"note-move-folder-spacer"}),(0,t.jsx)(h.Folder,{className:"note-move-folder-icon",size:16}),(0,t.jsx)("span",{children:"全部笔记"})]}),0===o.length?(0,t.jsx)("p",{className:"note-move-empty",children:"还没有可选文件夹"}):S.map(e=>{let n=N.has(e.path),a=b.has(e.path);return(0,t.jsxs)("button",{type:"button",className:`note-move-folder-item note-move-depth-${Math.min(e.depth,4)} ${c===e.path?"selected":""}`,onClick:()=>{var t;$(t=e.path),N.has(t)&&v(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},children:[n?a?(0,t.jsx)(u.ChevronDown,{className:"note-move-expander",size:14}):(0,t.jsx)(d.ChevronRight,{className:"note-move-expander",size:14}):(0,t.jsx)("span",{className:"note-move-folder-spacer"}),(0,t.jsx)(h.Folder,{className:"note-move-folder-icon",size:16}),(0,t.jsx)("span",{children:e.name}),e.parentPath&&(0,t.jsx)("small",{children:e.parentPath})]},e.path)})]}),(0,t.jsx)("input",{className:"input input-compact",value:x,onChange:e=>j(e.target.value),placeholder:"或输入新目录路径,如 文章/摘录"}),(0,t.jsxs)("div",{className:"note-move-destination",children:["目标位置:",k||"全部笔记"]}),(0,t.jsxs)("div",{className:"modal-actions",children:[(0,t.jsx)("button",{className:"btn btn-secondary",onClick:s,children:"取消"}),(0,t.jsx)("button",{className:"btn btn-primary",onClick:function(){w||r(k)},disabled:w,children:"移动"})]})]})})}],60923);var y=e.i(11241),x=e.i(27648);e.s(["NoteSidebar",0,function({children:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"sidebar-header sidebar-header-link",onClick:()=>{window.location.href="/"},children:[(0,t.jsx)(y.ArrowLeft,{size:18}),(0,t.jsx)("h1",{children:"MOST PEOPLE"})]}),e,(0,t.jsx)(x.default,{})]})}],86512)},67585,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return r}});let a=e.r(32061);function r({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,n)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return a}})},52157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(18050),r=e.r(74080),s=e.r(63599),i=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=s.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;n.push(...e)}}if(0===n.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,r.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return c}});let a=e.r(18050),r=e.r(71645),s=e.r(67585),i=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},n=(0,r.lazy)(()=>t.loader().then(l)),c=t.loading;function u(e){let l=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,u=o?r.Suspense:r.Fragment,d=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(n,{...e})]}):(0,a.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(n,{...e})});return(0,a.jsx)(u,{...o?{fallback:l}:{},children:d})}return u.displayName="LoadableComponent",u}},70703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r}});let a=e.r(55682)._(e.r(69093));function r(e,t){let n={};"function"==typeof e&&(n.loader=e);let r={...n,...t};return(0,a.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},58559,e=>{"use strict";var t=e.i(18050),n=e.i(71645),a=e.i(70703),r=e.i(18566),s=e.i(56420);let i=(0,s.default)("pencil-ruler",[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13",key:"orapub"}],["path",{d:"m8 6 2-2",key:"115y1s"}],["path",{d:"m18 16 2-2",key:"ee94s4"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17",key:"cfq27r"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);var l=e.i(72382),o=e.i(26091),c=e.i(26067);let u=(0,s.default)("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]);var d=e.i(6537),h=e.i(96699),p=e.i(10566),f=e.i(77071),m=e.i(56522),y=e.i(66595),x=e.i(35965),j=e.i(73474),b=e.i(63676),v=e.i(59665),g=e.i(39626);e.i(4121);var k=e.i(88361),w=e.i(47910),N=e.i(3593),S=e.i(71192),M=e.i(66112),$=e.i(77816),C=e.i(3789),z=e.i(32391),D=e.i(60923),P=e.i(86512);let O="https://api.most.box/auth/backup";async function A(e,t){let n=await e.clone().json().catch(()=>null);return n?.error||t}function T(e,t){return(0,M.mostEncode)(JSON.stringify({notes:e||[]}),t)}function _(e,t){if(!String(e||"").startsWith("mp://1"))throw Error("无效的备份数据格式");let n=(0,M.mostDecode)(e,t);if(!n)throw Error("解密失败,请确认当前 Web3 登录账号正确");let a=JSON.parse(n);if(!Array.isArray(a.notes))throw Error("备份数据缺少 notes");return a}async function L(e){return(0,C.calculateNoteCid)(JSON.stringify({notes:e||[]}))}async function E(e,t,n=O){let a=Date.now().toString(),r=new URL(n).pathname,s=`${a}:${String(t).toUpperCase()}:${r}`,{address:i,signature:l}=await (0,M.mostSignMessage)(e.danger,s);return{Authorization:`${i},${a},${l}`}}async function U(e,t){let n=JSON.stringify({notes:t||[]}),a=await (0,C.calculateNoteCid)(n);return{cid:a,body:T(t,e.danger),headers:{"Content-Type":"text/plain","x-backup-cid":a,...await E(e,"PUT",O)}}}async function R(e,t,n=O){let a=await U(e,t),r=await fetch(n,{method:"PUT",headers:a.headers,body:a.body});if(!r.ok)throw Error(await A(r,"云备份失败"));return{cid:a.cid}}async function H(e,t=O){let n=await fetch(t,{method:"GET",headers:await E(e,"GET",t)});if(404===n.status)return{found:!1,cid:"",time:0,notes:[]};if(!n.ok)throw Error(await A(n,"云端恢复失败"));let a=await n.text();if(!a)throw Error("云端无备份数据");let r=_(a,e.danger);return{found:!0,cid:n.headers.get("x-backup-cid")||"",time:Number(n.headers.get("x-backup-time")||0),notes:r.notes}}let F=!1,W="",Y="";function I(e,t){return e instanceof Error?e.message:t}let B=(0,a.default)(()=>e.A(71504).then(e=>e.MilkdownEditor),{loadableGenerated:{modules:[36975]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"note-editor-loading",children:"加载编辑器..."})});function V(e,t){return e instanceof Error?e.message:t}function q(){let e=(0,r.useRouter)(),a=(0,r.useSearchParams)(),s=(0,n.useRef)(null),O=function(){let e=(0,S.useUserStore)(e=>e.wallet),t=(0,S.useUserStore)(e=>e.openLoginModal),a=(0,N.useAppStore)(e=>e.addToast),r=(0,N.useAppStore)(e=>e.notes),s=(0,N.useAppStore)(e=>e.importNotes),i=(0,N.useAppStore)(e=>e.localDataReady),[l,o]=(0,n.useState)(null),[c,u]=(0,n.useState)(e?"idle":"disabled"),[d,h]=(0,n.useState)(F),[p,f]=(0,n.useState)(!1),m=(0,n.useRef)(0),y=(0,n.useCallback)(e=>{F=e,h(e)},[]),x=(0,n.useCallback)((e=!1)=>{let n=S.useUserStore.getState().wallet;return n||(e||t(),null)},[a,t]),j=(0,n.useCallback)(async(e={})=>{let{silent:t=!1,confirmConflict:n=!0}=e,r=x(t);if(!r)return u("disabled"),!1;if(F&&n&&!window.confirm("本地数据与云端不一致,本地修改将会覆盖云端数据,是否继续?"))return t||a("已取消同步","info"),u("conflict"),!1;o("save"),u("uploading");try{let e=N.useAppStore.getState().notes;return W=(await R(r,e)).cid,Y=r.address,y(!1),u("synced"),t||a("云端备份已更新","success"),!0}catch(e){return u("error"),t?console.info(I(e,"云备份失败")):a(I(e,"云备份失败"),"error"),!1}finally{o(null)}},[a,x,y]),b=(0,n.useCallback)(async(e={})=>{let{manual:t=!1,uploadWhenMissing:n=!1}=e,r=x(!t);if(!r)return u("disabled"),!1;o(t?"restore":"sync"),u(t?"restoring":"checking");try{let e=await H(r),i=N.useAppStore.getState().notes;if(!e.found){if(y(!1),Y=r.address,n&&i.length>0)return o(null),j({silent:!0,confirmConflict:!1});return u(i.length>0?"idle":"synced"),t&&a("云端暂无备份","info"),!1}let l=e.notes||[],c=await L(i),d=e.cid||await L(l);if(i.length>0&&c!==d&&!window.confirm("云端备份与本地笔记不一致。恢复会覆盖本地笔记,是否继续?"))return y(!0),u("conflict"),t&&a("已取消恢复","info"),!1;return c!==d&&s(l),W=d,Y=r.address,y(!1),u("synced"),t&&a("已从云端恢复","success"),!0}catch(e){return u("error"),t?a(I(e,"云端恢复失败"),"error"):console.info(I(e,"云端恢复失败")),!1}finally{o(null)}},[a,s,x,y,j]),v=(0,n.useCallback)(()=>{let e=x(!1);if(e)try{let t=N.useAppStore.getState().notes,n=T(t,e.danger),r=new Blob([n],{type:"text/plain"}),s=URL.createObjectURL(r),i=document.createElement("a");i.href=s,i.download=`${e.address.slice(-4)}-most-notes-${new Date().toISOString().slice(0,10)}.txt`,i.click(),URL.revokeObjectURL(s),a("笔记已导出到本地","success")}catch(e){a(I(e,"导出失败"),"error")}},[a,x]),g=(0,n.useCallback)(()=>{let e=x(!1);if(!e)return;let t=document.createElement("input");t.type="file",t.accept=".txt",t.onchange=t=>{let n=t.target.files?.[0];if(!n)return;let r=new FileReader;r.onload=async()=>{try{let t=r.result,n=_(t,e.danger);if(N.useAppStore.getState().notes.length>0&&!window.confirm("恢复将覆盖当前本地笔记,是否继续?"))return void a("已取消恢复","info");s(n.notes),a("已从本地恢复笔记","success"),await j({silent:!0})}catch(e){a(I(e,"导入失败"),"error")}},r.readAsText(n)},t.click()},[a,s,x,j]);(0,n.useEffect)(()=>{if(!i)return;if(!e){Y="",W="",f(!1),y(!1),u("disabled");return}if(Y===e.address){f(!0),u(F?"conflict":"synced");return}let t=!1;return f(!1),b({manual:!1,uploadWhenMissing:!0}).finally(()=>{t||f(!0)}),()=>{t=!0}},[i,b,y,e]),(0,n.useEffect)(()=>{if(!e||!i||!p||(m.current+=1,m.current<=1))return;let t=window.setTimeout(async()=>{let e=N.useAppStore.getState().notes;await L(e)!==W&&await j({silent:!0})},900);return()=>window.clearTimeout(t)},[p,i,r,j,e]);let k=(0,n.useMemo)(()=>(function(e){switch(e){case"disabled":return"未登录";case"checking":return"检查中";case"uploading":return"同步中";case"restoring":return"恢复中";case"synced":return"已同步";case"conflict":return"有冲突";case"error":return"同步失败";default:return"待同步"}})(c),[c]);return{action:l,status:c,statusLabel:k,hasConflict:d,uploadNow:j,restoreFromCloud:b,exportLocalBackup:v,importLocalBackup:g}}(),A=(0,N.useAppStore)(e=>e.addToast),E=(0,N.useAppStore)(e=>e.isDarkMode),U=(0,N.useAppStore)(e=>e.setIsDarkMode),q=(0,S.useUserStore)(e=>e.wallet),J=(0,S.useUserStore)(e=>e.openLoginModal),Z=(0,N.useAppStore)(e=>e.notes),G=(0,N.useAppStore)(e=>e.notesPath),K=(0,N.useAppStore)(e=>e.setNotesPath),X=(0,N.useAppStore)(e=>e.saveNote),Q=(0,N.useAppStore)(e=>e.deleteNote),ee=(0,N.useAppStore)(e=>e.renameNote),et=(0,N.useAppStore)(e=>e.localDataReady),en=a.get("cid")||"",ea=Z.find(e=>e.cid===en),er=!!en,es=er&&"edit"===a.get("mode"),[ei,el]=(0,n.useState)(""),[eo,ec]=(0,n.useState)(null),[eu,ed]=(0,n.useState)(null),[eh,ep]=(0,n.useState)(null),[ef,em]=(0,n.useState)(""),[ey,ex]=(0,n.useState)(""),[ej,eb]=(0,n.useState)(""),[ev,eg]=(0,n.useState)(""),[ek,ew]=(0,n.useState)(""),[eN,eS]=(0,n.useState)(""),[eM,e$]=(0,n.useState)(!1),[eC,ez]=(0,n.useState)(""),[eD,eP]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(!en){em(""),ex("");return}if(!ea){em(""),ex(et?"笔记不存在":"");return}if(ea.content.startsWith("mp://1")){if(!q){em(""),ex("请先登录 Web3 账号以解密此笔记");return}let e=(0,M.mostDecode)(ea.content,q.danger);if(!e){em(""),ex("无法解密,请确认当前 Web3 账号正确");return}em(e),ex("");return}em(ea.content||""),ex("")},[en,et,ea,q]),(0,n.useEffect)(()=>{if(!es)return void eP(!1);if(!en||!ea){eg(""),ew(""),eS(""),e$(!1),ez(et?"笔记不存在":"");return}if(eg(ea.name),ew(ea.path||""),e$(!0===ea.isSecret||ea.content.startsWith("mp://1")),ea.content.startsWith("mp://1")){if(!q){eS(""),ez("请先登录 Web3 账号以解密此笔记");return}let e=(0,M.mostDecode)(ea.content,q.danger);if(!e){eS(""),ez("无法解密,请确认当前 Web3 账号正确");return}eS(e),ez("");return}eS(ea.content||""),ez("")},[en,es,et,ea,q]),(0,n.useEffect)(()=>{eb(ea?.name||"")},[ea?.cid,ea?.name]);let eO=(0,n.useMemo)(()=>(0,C.filterNotesByPath)(Z,G,ei),[Z,G,ei]),eA=eO.filter(e=>"file"===e.type).length,eT=ea?.isSecret===!0||ea?.content.startsWith("mp://1")===!0,e_=(0,n.useMemo)(()=>{let e=G.split("/").filter(Boolean);return[{label:"全部笔记",path:""},...e.map((t,n)=>({label:t,path:e.slice(0,n+1).join("/")}))]},[G]),eL=(0,n.useMemo)(()=>(function(e){let t=new Set;for(let n of e){let e=(0,C.normalizeNotePath)(n.path).split("/").filter(Boolean);for(let n=0;n<e.length;n+=1)t.add(e.slice(0,n+1).join("/"))}return Array.from(t).sort((e,t)=>e.localeCompare(t,"zh-CN")).map(e=>{let t=e.split("/");return{path:e,name:t[t.length-1]||e,parentPath:t.slice(0,-1).join("/"),depth:Math.max(t.length-1,0)}})})(Z),[Z]);function eE(){return!!q||(J(),!1)}async function eU(){if(eE()){if(!ea)return void A("笔记不存在","error");if(!ev.trim())return void A("请输入笔记名称","warning");eP(!0);try{let t=s.current?.getMarkdown()??eN,n=eM?(0,M.mostEncode)(t,q.danger):t,a=await X({cid:ea.cid,name:ev,path:ek,content:n,isSecret:eM});eS(t),A("笔记已保存","success"),await O.uploadNow({silent:!0}),e.replace(`/note/?cid=${encodeURIComponent(a)}`)}catch(e){A(V(e,"保存失败"),"error")}finally{eP(!1)}}}async function eR(){if(!eE()||!ea)return;let e=ej.trim();if(!e){eb(ea.name),A("请输入笔记名称","warning");return}if(e!==ea.name)try{ee((0,C.getNoteFullPath)(ea),ea.path,e),A("已重命名","success"),await O.uploadNow({silent:!0})}catch(e){eb(ea.name),A(V(e,"重命名失败"),"error")}}async function eH(e){if(eh)try{ee("directory"===eh.type?(0,C.normalizeNotePath)(eh.path?`${eh.path}/${eh.name}`:eh.name):(0,C.getNoteFullPath)(eh),e,eh.name),ep(null),A("已移动","success"),await O.uploadNow({silent:!0})}catch(e){A(V(e,"移动失败"),"error")}}let eF=(0,t.jsxs)("div",{className:"note-header-title",children:[(0,t.jsx)("h2",{className:"header-title",children:"笔记"}),(0,t.jsxs)("span",{children:[Z.length," 篇"]})]}),eW=(0,t.jsxs)("div",{className:"note-theme-wrap",children:[(0,t.jsx)("button",{className:"btn btn-icon",onClick:()=>U(!E),title:"切换主题","aria-label":"切换主题",children:E?(0,t.jsx)(x.Sun,{size:16}):(0,t.jsx)(h.Moon,{size:16})}),(0,t.jsx)(z.NoteMoreMenu,{sync:O})]}),eY=(0,t.jsxs)("section",{className:"note-list-panel note-sidebar-list","aria-label":"笔记列表",children:[(0,t.jsxs)("div",{className:"note-list-header",children:[(0,t.jsx)("div",{className:"note-current-location",children:(0,t.jsx)("div",{className:"note-breadcrumbs",children:e_.map((e,a)=>(0,t.jsxs)(n.Fragment,{children:[a>0&&(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("button",{onClick:()=>K(e.path),children:e.label})]},e.path||"root"))})}),(0,t.jsxs)("span",{className:"note-count",children:[eA," 篇"]})]}),(0,t.jsxs)("div",{className:"note-search",children:[(0,t.jsx)(y.Search,{size:16}),(0,t.jsx)("input",{className:"input input-flex",value:ei,onChange:e=>el(e.target.value),placeholder:"搜索笔记"})]}),0===eO.length?(0,t.jsxs)("div",{className:"ui-empty-state note-empty-state",children:[(0,t.jsx)(p.NotebookPen,{size:32}),(0,t.jsx)("p",{children:ei?"未找到笔记":"还没有笔记"})]}):(0,t.jsx)("div",{className:"note-list",children:eO.map(n=>(0,t.jsx)("article",{className:`ui-list-item note-list-item ${"file"===n.type&&n.cid===en?"active":""}`,children:(0,t.jsxs)("button",{className:`ui-list-item-main note-list-item-main ${"directory"===n.type?"folder":""}`,onClick:()=>{if("directory"===n.type)K((0,C.normalizeNotePath)(n.path?`${n.path}/${n.name}`:n.name));else e.push(`/note/?cid=${encodeURIComponent(n.cid)}`)},children:[(0,t.jsx)("span",{className:`ui-list-icon note-list-icon ${"directory"===n.type?"warning":""}`,children:"directory"===n.type?(0,t.jsx)(c.Folder,{size:18}):n.isSecret?(0,t.jsx)(d.Lock,{size:18}):(0,t.jsx)(o.FileText,{size:18})}),(0,t.jsxs)("span",{className:"ui-list-copy note-list-copy",children:[(0,t.jsx)("span",{className:"ui-list-title note-list-name",children:n.name}),"file"===n.type?(0,t.jsx)("span",{className:"ui-list-desc note-list-preview",children:n.isSecret||n.content.startsWith("mp://1")?"私密内容已加密":String(n.content||"").replace(/```[\s\S]*?```/g," ").replace(/!\[[^\]]*]\([^)]*\)/g," ").replace(/\[([^\]]+)]\([^)]*\)/g,"$1").replace(/[#>*_`~|-]/g," ").replace(/\s+/g," ").trim()||"空白笔记"}):(0,t.jsx)("span",{className:"ui-list-desc note-list-preview",children:"文件夹"})]}),"file"===n.type&&(0,t.jsx)("span",{className:"ui-list-meta note-list-date",children:(0,$.formatDate)(n.updated_at)})]})},`${n.cid}:${n.path}:${n.name}`))}),(0,t.jsx)("div",{className:"note-create-btn",children:(0,t.jsxs)("button",{className:"btn",onClick:function(){eE()&&ec({title:"新建笔记",placeholder:"笔记名称",confirmText:"创建",onConfirm:async t=>{if(eE())try{let n=await X({name:t,path:G,content:"",isSecret:!1});ec(null),A("笔记已创建","success"),await O.uploadNow({silent:!0}),e.push(`/note/?cid=${encodeURIComponent(n)}&mode=edit`)}catch(e){A(V(e,"创建失败"),"error")}}})},children:[(0,t.jsx)(f.Plus,{size:16}),"新笔记"]})})]});return(0,t.jsxs)(v.default,{sidebar:()=>(0,t.jsx)(P.NoteSidebar,{children:eY}),headerTitle:eF,headerRight:eW,children:[(0,t.jsx)("main",{className:`note-page note-browser-page ${er?"has-editor":""}`,children:(0,t.jsx)("section",{className:"note-workspace",children:(0,t.jsx)("section",{className:"note-editor-panel","aria-label":es?"笔记编辑器":"笔记阅读器",children:er?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"note-editor-panel-header",children:[(0,t.jsxs)("div",{className:"note-editor-title-area",children:[es?(0,t.jsx)("input",{className:"note-title-input",value:ev,onChange:e=>eg(e.target.value),placeholder:"笔记名称",disabled:!ea}):ea?(0,t.jsx)("input",{className:"note-title-input",value:ej,onBlur:eR,onChange:e=>eb(e.target.value),onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur(),"Escape"===e.key&&(eb(ea.name),e.currentTarget.blur())},placeholder:"笔记名称",title:"重命名"}):(0,t.jsx)("h3",{children:"未命名笔记"}),ea&&(0,t.jsxs)("div",{className:"note-editor-info",children:[(0,t.jsx)("span",{children:es?"编辑模式":"阅读模式"}),(0,t.jsx)("span",{children:es?eM?"私密":"公开":eT?"私密":"公开"}),(0,t.jsx)("span",{children:(0,$.formatDate)(ea.updated_at)})]})]}),(0,t.jsxs)("div",{className:"note-editor-actions",children:[(0,t.jsx)("button",{type:"button",className:"btn btn-icon",onClick:es?function(){e.push(ea?`/note/?cid=${encodeURIComponent(ea.cid)}`:"/note/")}:()=>e.push("/note/"),title:es?"取消":"关闭","aria-label":es?"取消":"关闭",children:(0,t.jsx)(b.X,{size:16})}),es?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{className:`btn btn-sm ${eM?"btn-warning":"btn-secondary"}`,onClick:()=>e$(!eM),disabled:!ea,children:[eM?(0,t.jsx)(d.Lock,{size:16}):(0,t.jsx)(l.Eye,{size:16}),eM?"私密":"公开"]}),(0,t.jsxs)("button",{className:"btn btn-sm btn-primary",onClick:eU,disabled:eD||!!eC||!ea,children:[(0,t.jsx)(m.Save,{size:16}),eD?"保存中":"保存"]})]}):ea&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"btn btn-icon",onClick:()=>{eE()&&ep(ea)},title:"移动","aria-label":"移动",children:(0,t.jsx)(u,{size:16})}),(0,t.jsx)("button",{type:"button",className:"btn btn-icon note-editor-action-danger",onClick:()=>(function(t){if(!eE())return;let n="directory"===t.type;ed({title:n?"删除文件夹":"删除笔记",message:`确定要删除「${t.name}」吗?此操作不可撤销。`,confirmText:"删除",onConfirm:async()=>{Q(n?void 0:t.cid,t.path,t.name),ed(null),A("已删除","success"),await O.uploadNow({silent:!0}),"file"===t.type&&t.cid===en&&e.push("/note/")}})})(ea),title:"删除","aria-label":"删除",children:(0,t.jsx)(j.Trash2,{size:16})}),(0,t.jsxs)("button",{type:"button",className:"btn btn-sm btn-primary",onClick:()=>{e.push(`/note/?cid=${encodeURIComponent(ea.cid)}&mode=edit`)},disabled:!!ey,title:"编辑","aria-label":"编辑",children:[(0,t.jsx)(i,{size:16}),"编辑"]})]})]})]}),es?eC?(0,t.jsxs)("div",{className:"note-empty-state editor-error",children:[(0,t.jsx)(d.Lock,{size:36}),(0,t.jsx)("p",{children:eC})]}):ea?(0,t.jsx)("div",{className:"note-editor-frame editing",children:(0,t.jsx)(B,{ref:s,content:eN,onChange:eS,className:"milkdown-editor"})}):(0,t.jsxs)("div",{className:"note-empty-state editor-error",children:[(0,t.jsx)(p.NotebookPen,{size:36}),(0,t.jsx)("p",{children:et?"笔记不存在":"加载中..."})]}):ey?(0,t.jsxs)("div",{className:"ui-empty-state note-empty-state editor-error",children:[(0,t.jsx)(d.Lock,{size:36}),(0,t.jsx)("p",{children:ey})]}):ea?(0,t.jsx)("div",{className:"note-editor-frame reading",children:(0,t.jsx)(B,{content:ef,readOnly:!0,className:"milkdown-editor"})}):(0,t.jsxs)("div",{className:"ui-empty-state note-empty-state editor-error",children:[(0,t.jsx)(p.NotebookPen,{size:36}),(0,t.jsx)("p",{children:et?"笔记不存在":"加载中..."})]})]}):(0,t.jsxs)("div",{className:"ui-empty-state note-editor-empty",children:[(0,t.jsx)("div",{className:"ui-empty-icon note-editor-empty-icon",children:(0,t.jsx)(p.NotebookPen,{size:32})}),(0,t.jsx)("h3",{className:"ui-empty-title",children:"没有打开的笔记"}),(0,t.jsx)("p",{className:"ui-empty-desc",children:Z.length>0?"选择一篇笔记继续":"创建第一篇笔记"}),(0,t.jsx)(g.default,{label:"打开笔记列表",variant:"default"})]})})})}),eo&&(0,t.jsx)(w.InputModal,{title:eo.title,placeholder:eo.placeholder,defaultValue:eo.defaultValue,confirmText:eo.confirmText,onConfirm:eo.onConfirm,onClose:()=>ec(null)}),eu&&(0,t.jsx)(k.ConfirmModal,{title:eu.title,message:eu.message,confirmText:eu.confirmText,danger:!0,onConfirm:eu.onConfirm,onClose:()=>ed(null)}),eh&&(0,t.jsx)(D.NoteMoveModal,{target:eh,directories:eL,onMove:eH,onClose:()=>ep(null)})]})}e.s(["default",0,function(){return(0,t.jsx)(n.Suspense,{fallback:(0,t.jsx)("div",{className:"note-editor-loading",children:"加载中..."}),children:(0,t.jsx)(q,{})})}],58559)},71504,e=>{e.v(t=>Promise.all(["static/chunks/3r5wf57k0gys9.js","static/chunks/0o-o9af-grvj8.js","static/chunks/2uget3ephe4e3.js","static/chunks/3fj0amtzqae6f.js"].map(t=>e.l(t))).then(()=>t(36975)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return s}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:n}=e,r=e.protocol||"",i=e.pathname||"",o=e.hash||"",s=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:n&&(c=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(c+=":"+e.port)),s&&"object"==typeof s&&(s=String(a.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||l.test(r))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),i=i.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${r}${c}${i}${u}${o}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=e.r(71645);function i(e,t){let n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(n.current=a(e,r)),t&&(i.current=a(t,r))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return a}});let r=e.r(18967),i=e.r(52817);function a(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,i.hasBasePath)(n.pathname)}catch(e){return!1}}},84508,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},22016,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return y},useLinkStatus:function(){return x}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(90809),l=e.r(18050),o=a._(e.r(71645)),s=e.r(95057),c=e.r(8372),u=e.r(18581),f=e.r(18967),d=e.r(5550);e.r(33525);let h=e.r(88540),p=e.r(91949),g=e.r(73668),m=e.r(9396);function y(t){var n,r;let i,a,y,[x,k]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:j,as:w,children:M,prefetch:S=null,passHref:E,replace:O,shallow:T,scroll:N,onClick:C,onMouseEnter:z,onTouchStart:P,legacyBehavior:L=!1,onNavigate:_,transitionTypes:I,ref:A,unstable_dynamicOnHover:F,...R}=t;i=M,L&&("string"==typeof i||"number"==typeof i)&&(i=(0,l.jsx)("a",{children:i}));let $=o.default.useContext(c.AppRouterContext),U=!1!==S,D=!1!==S?null===(r=S)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,H="string"==typeof(n=w||j)?n:(0,s.formatUrl)(n);if(L){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(i)}let q=L?a&&"object"==typeof a&&a.ref:A,V=o.default.useCallback(e=>(null!==$&&(v.current=(0,p.mountLinkInstance)(e,H,$,D,U,k)),()=>{v.current&&((0,p.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,H,$,D,k]),B={ref:(0,u.useMergedRef)(V,q),onClick(t){L||"function"!=typeof C||C(t),L&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,n,r,i,a,l,s){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(n)){i&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);o.default.startTransition(()=>{f(n,i?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,r.current,s)})}}(t,H,v,O,N,_,I)},onMouseEnter(e){L||"function"!=typeof z||z(e),L&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){L||"function"!=typeof P||P(e),L&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,f.isAbsoluteUrl)(H)?B.href=H:L&&!E&&("a"!==a.type||"href"in a.props)||(B.href=(0,d.addBasePath)(H)),y=L?o.default.cloneElement(a,B):(0,l.jsx)("a",{...R,...B,children:i}),(0,l.jsx)(b.Provider,{value:x,children:y})}e.r(84508);let b=(0,o.createContext)(p.IDLE_LINK_STATUS),x=()=>(0,o.useContext)(b);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},31214,e=>{"use strict";let t=(0,e.i(56420).default)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);e.s(["Cloud",0,t],31214)},96699,e=>{"use strict";let t=(0,e.i(56420).default)("moon",[["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",key:"kfwtm"}]]);e.s(["Moon",0,t],96699)},35965,e=>{"use strict";let t=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,t],35965)},62368,e=>{"use strict";let t=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],62368)},66595,e=>{"use strict";let t=(0,e.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],66595)},51921,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Music",0,t],51921)},21357,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Play",0,t],21357)},66627,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Wifi",0,t],66627)},30274,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["Send",0,t],30274)},68590,e=>{"use strict";let t=(0,e.i(56420).default)("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"}]]);e.s(["MessageSquare",0,t],68590)},42724,58501,e=>{"use strict";var t=e.i(18050),n=e.i(71645),r=e.i(22016),i=e.i(62368),a=e.i(96699),l=e.i(35965);function o({size:e=24}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.4"}),(0,t.jsx)("rect",{x:"14",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"2",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)"})]})}e.s(["LogoIcon",0,o],58501),e.s(["Nav",0,function(){let[e,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=localStorage.getItem("theme"),t=window.matchMedia("(prefers-color-scheme: dark)").matches;("dark"===e||!e&&t)&&s(!0)},[]),(0,n.useEffect)(()=>{document.documentElement.setAttribute("data-theme",e?"dark":"light"),localStorage.setItem("theme",e?"dark":"light")},[e]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("nav",{className:"mkt-nav",children:(0,t.jsxs)("div",{className:"mkt-nav-inner",children:[(0,t.jsxs)(r.default,{href:"/",className:"mkt-nav-logo",children:[(0,t.jsx)(o,{}),"MOST PEOPLE"]}),(0,t.jsxs)("div",{className:"mkt-nav-cta",children:[(0,t.jsx)("button",{className:"mkt-theme-toggle",onClick:()=>s(!e),"aria-label":"切换主题",children:e?(0,t.jsx)(l.Sun,{size:16}):(0,t.jsx)(a.Moon,{size:16})}),(0,t.jsxs)(r.default,{href:"/download/",className:"btn btn-secondary mkt-nav-preview",children:[(0,t.jsx)(i.Download,{size:16}),"下载客户端"]}),(0,t.jsx)(r.default,{href:"/app/",className:"btn btn-primary",children:"开始使用"})]})]})})})}],42724)},56691,e=>{"use strict";var t=e.i(18050),n=e.i(22016);let r=[{href:"/",label:"关于"},{href:"/ping/",label:"网络"},{href:"https://github.com/most-people/most",label:"GitHub",external:!0}];e.s(["Footer",0,function(){return(0,t.jsx)("footer",{className:"mkt-footer",children:(0,t.jsx)("div",{className:"mkt-container",children:(0,t.jsxs)("div",{className:"mkt-footer-inner",children:[(0,t.jsx)("div",{className:"mkt-footer-links",children:r.map(e=>(0,t.jsx)(n.default,{href:e.href,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},children:e.label},e.href))}),(0,t.jsxs)("span",{className:"mkt-footer-copy",children:["© ",new Date().getFullYear()," MOST PEOPLE · MIT License"]})]})})})}])},40983,e=>{"use strict";var t=e.i(18050),n=e.i(42724),r=e.i(56691);e.s(["MarketingLayout",0,function({children:e}){return(0,t.jsxs)("div",{className:"mkt-layout",children:[(0,t.jsx)(n.Nav,{}),(0,t.jsx)("main",{className:"mkt-layout-main",children:e}),(0,t.jsx)(r.Footer,{})]})}])},23449,e=>{"use strict";let t;var n,r=e.i(18050),i=e.i(71645);let a=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...a,...l}),s=Object.freeze({...o,body:"",hidden:!1});function c(e,t){let n,r,i=(n={},!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0),(r=((e.rotate||0)+(t.rotate||0))%4)&&(n.rotate=r),n);for(let n in s)n in l?n in e&&!(n in i)&&(i[n]=l[n]):n in t?i[n]=t[n]:n in e&&(i[n]=e[n]);return i}function u(e,t){let n,r,i,a=[];if("object"!=typeof e||"object"!=typeof e.icons)return a;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),a.push(e)});let l=(n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null),Object.keys(n).concat(Object.keys(r)).forEach(function e(t){if(n[t])return i[t]=[];if(!(t in i)){i[t]=null;let n=r[t]&&r[t].parent,a=n&&e(n);a&&(i[t]=[n].concat(a))}return i[t]}),i);for(let n in l){let r=l[n];r&&(t(n,function(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function l(e){a=c(r[e]||i[e],a)}return l(t),n.forEach(l),c(e,a)}(e,n,r)),a.push(n))}return a}let f={provider:"",aliases:{},not_found:{},...a};function d(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function h(e){if("object"!=typeof e||null===e||"string"!=typeof e.prefix||!e.icons||"object"!=typeof e.icons||!d(e,f))return null;let t=e.icons;for(let e in t){let n=t[e];if(!e||"string"!=typeof n.body||!d(n,s))return null}let n=e.aliases||Object.create(null);for(let e in n){let r=n[e],i=r.parent;if(!e||"string"!=typeof i||!t[i]&&!n[i]||!d(r,s))return null}return e}let p=Object.create(null);function g(e,t){let n=p[e]||(p[e]=Object.create(null));return n[t]||(n[t]={provider:e,prefix:t,icons:Object.create(null),missing:new Set})}function m(e,t){return h(t)?u(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}let y=/^[a-z0-9]+(-[a-z0-9]+)*$/,b=(e,t,n,r="")=>{let i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!x(a)?null:a}let a=i[0],l=a.split("-");if(l.length>1){let e={provider:r,prefix:l.shift(),name:l.join("-")};return t&&!x(e)?null:e}if(n&&""===r){let e={provider:r,prefix:"",name:a};return t&&!x(e,n)?null:e}return null},x=(e,t)=>!!e&&!!((t&&""===e.prefix||e.prefix)&&e.name),k=!1;function v(e){return"boolean"==typeof e&&(k=e),k}function j(e){let t="string"==typeof e?b(e,!0,k):e;if(t){let e=g(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}let w=Object.freeze({width:null,height:null}),M=Object.freeze({...w,...l}),S=/(-?[0-9.]*[0-9]+[0-9.]*)/g,E=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function O(e,t,n){if(1===t)return e;if(n=n||100,"number"==typeof e)return Math.ceil(e*t*n)/n;if("string"!=typeof e)return e;let r=e.split(S);if(null===r||!r.length)return e;let i=[],a=r.shift(),l=E.test(a);for(;;){if(l){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(void 0===(a=r.shift()))return i.join("");l=!l}}let T=/\sid="(\S+)"/g,N="IconifyId"+Date.now().toString(16)+(0x1000000*Math.random()|0).toString(16),C=0,z=Object.create(null);function P(e){return z[e]||z[""]}function L(e){let t;if("string"==typeof e.resources)t=[e.resources];else if(!((t=e.resources)instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}let _=Object.create(null),I=["https://api.simplesvg.com","https://api.unisvg.com"],A=[];for(;I.length>0;)1===I.length||Math.random()>.5?A.push(I.shift()):A.push(I.pop());_[""]=L({resources:["https://api.iconify.design"].concat(A)});let F=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(e){}})();function R(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}let $=0,U={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function D(e){let t={...U,...e},n=[];function r(){n=n.filter(e=>"pending"===e().status)}return{query:function(e,i,a){let l=function(e,t,n,r){let i,a,l=e.resources.length,o=e.random?Math.floor(Math.random()*l):e.index;if(e.random){let t=e.resources.slice(0);for(i=[];t.length>1;){let e=Math.floor(Math.random()*t.length);i.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}i=i.concat(t)}else i=e.resources.slice(o).concat(e.resources.slice(0,o));let s=Date.now(),c="pending",u=0,f=null,d=[],h=[];function p(){f&&(clearTimeout(f),f=null)}function g(){"pending"===c&&(c="aborted"),p(),d.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),d=[]}function m(e,t){t&&(h=[]),"function"==typeof e&&h.push(e)}function y(){c="failed",h.forEach(e=>{e(void 0,a)})}function b(){d.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),d=[]}return"function"==typeof r&&h.push(r),setTimeout(function r(){if("pending"!==c)return;p();let l=i.shift();if(void 0===l){if(d.length){f=setTimeout(()=>{p(),"pending"===c&&(b(),y())},e.timeout);return}y();return}let o={status:"pending",resource:l,callback:(t,n)=>{!function(t,n,l){let o="success"!==n;switch(d=d.filter(e=>e!==t),c){case"pending":break;case"failed":if(o||!e.dataAfterTimeout)return;break;default:return}if("abort"===n){a=l,y();return}if(o){a=l,d.length||(i.length?r():y());return}if(p(),b(),!e.random){let n=e.resources.indexOf(t.resource);-1!==n&&n!==e.index&&(e.index=n)}c="completed",h.forEach(e=>{e(l)})}(o,t,n)}};d.push(o),u++,f=setTimeout(r,e.rotate),n(l,t,o.callback)}),function(){return{startTime:s,payload:t,status:c,queriesSent:u,queriesPending:d.length,subscribe:m,abort:g}}}(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(l),l},find:function(e){return n.find(t=>e(t))||null},setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}let H=Object.create(null);function q(){}function V(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&"object"==typeof n)try{if(!m(e,n).length)return void r()}catch(e){console.error(e)}r(),e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,l=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let l=t.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else{if(!e.missing.has(l))return n=!0,!0;a.missing.push({provider:r,prefix:i,name:l})}return!1}),a.pending.length!==l&&(n||R([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}))}function B(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}let K=/[\s,]+/,W={...M,inline:!1},G={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Q={display:"inline-block"},X={backgroundColor:"currentColor"},J={backgroundColor:"transparent"},Y={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Z={WebkitMask:X,mask:X,background:J};for(let e in Z){let t=Z[e];for(let n in Y)t[e+n]=Y[n]}let ee={...W,inline:!0};function et(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}if(v(!0),n={prepare:(e,t,n)=>{let r=[],i=function(e,t){let n,r=_[e];if(!r)return 0;if(r.maxURL){let e=0;r.resources.forEach(t=>{e=Math.max(e,t.length)}),n=r.maxURL-e-r.path.length-(t+".json?icons=").length}else n=0;return n}(e,t),a="icons",l={type:a,provider:e,prefix:t,icons:[]},o=0;return n.forEach((n,s)=>{(o+=n.length+1)>=i&&s>0&&(r.push(l),l={type:a,provider:e,prefix:t,icons:[]},o=n.length),l.icons.push(n)}),r.push(l),r},send:(e,t,n)=>{if(!F)return void n("abort",424);let r=function(e){if("string"==typeof e){let t=_[e];if(t)return t.path}return"/"}(t.provider);switch(t.type){case"icons":r+=t.prefix+".json?"+new URLSearchParams({icons:t.icons.join(",")}).toString();break;case"custom":{let e=t.uri;r+="/"===e.slice(0,1)?e.slice(1):e;break}default:n("abort",400);return}let i=503;F(e+r).then(e=>{let t=e.status;return 200!==t?void setTimeout(()=>{n(404===t?"abort":"next",t)}):(i=501,e.json())}).then(e=>{"object"!=typeof e||null===e?setTimeout(()=>{404===e?n("abort",e):n("next",i)}):setTimeout(()=>{n("success",e)})}).catch(()=>{n("next",i)})}},z[""]=n,"u">typeof document&&"u">typeof window){let e=window;if(void 0!==e.IconifyPreload){let t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof t&&null!==t&&(t instanceof Array?t:[t]).forEach(e=>{try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!function(e,t){if("object"!=typeof e)return!1;if("string"!=typeof t&&(t=e.provider||""),k&&!t&&!e.prefix){let t=!1;return h(e)&&(e.prefix="",u(e,(e,n)=>{(function(e,t){let n=b(e,!0,k);if(!n)return!1;let r=g(n.provider,n.prefix);if(!t)return r.missing.add(n.name),!0;var i=n.name;try{if("string"==typeof t.body)return r.icons[i]={...t},!0}catch(e){}return!1})(e,n)&&(t=!0)})),t}let n=e.prefix;return!!x({prefix:n,name:"a"})&&!!m(g(t,n),e)}(e))&&console.error(n)}catch(e){console.error(n)}})}if(void 0!==e.IconifyProviders){let t=e.IconifyProviders;if("object"==typeof t&&null!==t)for(let e in t){let n="IconifyProviders["+e+"] is invalid.";try{let r=t[e];if("object"!=typeof r||!r||void 0===r.resources)continue;!function(e,t){let n=L(t);return null!==n&&(_[e]=n,!0)}(e,r)&&console.error(n)}catch(e){console.error(n)}}}}function en(e){let[n,r]=(0,i.useState)(!!e.ssr),[a,l]=(0,i.useState)({}),[s,c]=(0,i.useState)(function(t){if(t){let t=e.icon;if("object"==typeof t)return{name:"",data:t};let n=j(t);if(n)return{name:t,data:n}}return{name:""}}(!!e.ssr));function u(){let e=a.callback;e&&(e(),l({}))}function f(e){if(JSON.stringify(s)!==JSON.stringify(e))return u(),c(e),!0}(0,i.useEffect)(()=>(r(!0),u),[]),(0,i.useEffect)(()=>{n&&function t(){var n;let r=e.icon;if("object"==typeof r)return void f({name:"",data:r});let i=j(r);f({name:r,data:i})&&(void 0===i?l({callback:((e,t)=>{var n;let r,i,a,l,o,s=(n=function(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i="string"==typeof e?b(e,t,n):e;i&&r.push(i)}),r}(e,!0,v()),a={loaded:[],missing:[],pending:[]},l=Object.create(null),n.sort((e,t)=>e.provider!==t.provider?e.provider.localeCompare(t.provider):e.prefix!==t.prefix?e.prefix.localeCompare(t.prefix):e.name.localeCompare(t.name)),o={provider:"",prefix:"",name:""},n.forEach(e=>{if(o.name===e.name&&o.prefix===e.prefix&&o.provider===e.provider)return;o=e;let t=e.provider,n=e.prefix,r=e.name,i=l[t]||(l[t]=Object.create(null)),s=i[n]||(i[n]=g(t,n));(r in s.icons?a.loaded:""===n||s.missing.has(r)?a.missing:a.pending).push({provider:t,prefix:n,name:r})}),a);if(!s.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(s.loaded,s.missing,s.pending,q)}),()=>{e=!1}}let c=Object.create(null),u=[];return s.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===i&&t===r)return;r=t,i=n,u.push(g(t,n));let a=c[t]||(c[t]=Object.create(null));a[n]||(a[n]=[])}),s.pending.forEach(e=>{let{provider:t,prefix:n,name:r}=e,i=g(t,n),a=i.pendingIcons||(i.pendingIcons=new Set);a.has(r)||(a.add(r),c[t][n].push(r))}),u.forEach(e=>{let t=c[e.provider][e.prefix];t.length&&(e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{let t,n;e.iconsQueueFlag=!1;let{provider:r,prefix:i}=e,a=e.iconsToLoad;if(delete e.iconsToLoad,!a||!a.length)return;let l=e.loadIcon;if(e.loadIcons&&(a.length>1||!l))return void B(e.loadIcons(a,i,r),t=>{V(e,a,t)});if(l)return void a.forEach(t=>{B(l(t,i,r),n=>{let r=n?{prefix:i,icons:{[t]:n}}:null;V(e,[t],r)})});let{valid:o,invalid:s}=(t=[],n=[],a.forEach(e=>{(e.match(y)?t:n).push(e)}),{valid:t,invalid:n});if(s.length&&V(e,s,null),!o.length)return;let c=i.match(y)?P(r):null;c?c.prepare(r,i,o).forEach(t=>{!function(e,t,n){let r,i;if("string"==typeof e){let t=P(e);if(!t)return n(void 0,424);i=t.send;let a=function(e){if(!H[e]){let t=_[e];if(!t)return;let n=D(t);H[e]={config:t,redundancy:n}}return H[e]}(e);a&&(r=a.redundancy)}else{let t=L(e);if(t){r=D(t);let n=P(e.resources?e.resources[0]:"");n&&(i=n.send)}}r&&i?r.query(t,i,n)().abort:n(void 0,424)}(r,t,n=>{V(e,t.icons,n)})}):V(e,o,null)})))}),t?function(e,t,n){let r=$++,i=R.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(a)}),i}(t,s,u):q})([r],t)}):i&&(null==(n=e.onLoad)||n.call(e,r)))}()},[e.icon,n]);let{name:d,data:h}=s;return h?((e,n,r)=>{var a;let l,s,c,u,f,d,h,p,g,m,y,x,k,v=n.inline?ee:W,j=function(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in w?(null===r||r&&("string"===i||"number"===i))&&(n[e]=r):i===typeof n[e]&&(n[e]="rotate"===e?r%4:r)}return n}(v,n),S=n.mode||"svg",E={},z=n.style||{},P={..."svg"===S?G:{}};if(r){let e=b(r,!1,!0);if(e){let t=["iconify"];for(let n of["provider","prefix"])e[n]&&t.push("iconify--"+e[n]);P.className=t.join(" ")}}for(let e in n){let t=n[e];if(void 0!==t)switch(e){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":P.ref=t;break;case"className":P[e]=(P[e]?P[e]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":j[e]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&function(e,t){t.split(K).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}(j,t);break;case"color":E.color=t;break;case"rotate":"string"==typeof t?j[e]=function(e,t=0){let n=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===n){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case"%":t=25;break;case"deg":t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t)%1==0?r(i):0}}return t}(t):"number"==typeof t&&(j[e]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete P["aria-hidden"];break;default:void 0===v[e]&&(P[e]=t)}}let L=(c={...o,...e},u={...M,...j},f={left:c.left,top:c.top,width:c.width,height:c.height},d=c.body,[c,u].forEach(e=>{var t,n,r,i;let a,l,o=[],s=e.hFlip,c=e.vFlip,u=e.rotate;switch(s?c?u+=2:(o.push("translate("+(f.width+f.left).toString()+" "+(0-f.top).toString()+")"),o.push("scale(-1 1)"),f.top=f.left=0):c&&(o.push("translate("+(0-f.left).toString()+" "+(f.height+f.top).toString()+")"),o.push("scale(1 -1)"),f.top=f.left=0),u<0&&(u-=4*Math.floor(u/4)),u%=4){case 1:o.unshift("rotate(90 "+(a=f.height/2+f.top).toString()+" "+a.toString()+")");break;case 2:o.unshift("rotate(180 "+(f.width/2+f.left).toString()+" "+(f.height/2+f.top).toString()+")");break;case 3:o.unshift("rotate(-90 "+(a=f.width/2+f.left).toString()+" "+a.toString()+")")}u%2==1&&(f.left!==f.top&&(a=f.left,f.left=f.top,f.top=a),f.width!==f.height&&(a=f.width,f.width=f.height,f.height=a)),o.length&&(t=d,n='<g transform="'+o.join(" ")+'">',r=(l=function(e,t="defs"){let n="",r=e.indexOf("<"+t);for(;r>=0;){let i=e.indexOf(">",r),a=e.indexOf("</"+t);if(-1===i||-1===a)break;let l=e.indexOf(">",a);if(-1===l)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(l+1)}return{defs:n,content:e}}(t)).defs,i=n+l.content+"</g>",d=r?"<defs>"+r+"</defs>"+i:i)}),h=u.width,p=u.height,g=f.width,m=f.height,null===h?l=O(s=null===p?"1em":"auto"===p?m:p,g/m):(l="auto"===h?g:h,s=null===p?O(l,m/g):"auto"===p?m:p),y={},(x=(e,t)=>{"unset"!==t&&"undefined"!==t&&"none"!==t&&(y[e]=t.toString())})("width",l),x("height",s),y.viewBox=(k=[f.left,f.top,g,m]).join(" "),{attributes:y,viewBox:k,body:d}),_=L.attributes;if(j.inline&&(E.verticalAlign="-0.125em"),"svg"===S){P.style={...E,...z},Object.assign(P,_);let e=0,r=n.id;return"string"==typeof r&&(r=r.replace(/-/g,"_")),P.dangerouslySetInnerHTML={__html:(a=function(e,t=N){let n,r=[];for(;n=T.exec(e);)r.push(n[1]);if(!r.length)return e;let i="suffix"+(0x1000000*Math.random()|Date.now()).toString(16);return r.forEach(n=>{let r="function"==typeof t?t(n):t+(C++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),e=e.replace(RegExp(i,"g"),"")}(L.body,r?()=>r+"ID"+e++:"iconifyReact"),void 0===t&&function(){try{t=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){t=null}}(),t?t.createHTML(a):a)},(0,i.createElement)("svg",P)}let{body:I,width:A,height:F}=e,R="mask"===S||"bg"!==S&&-1!==I.indexOf("currentColor"),$=function(e,t){let n=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let e in t)n+=" "+e+'="'+t[e]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}(I,{..._,width:A+"",height:F+""});return P.style={...E,"--svg":'url("data:image/svg+xml,'+$.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")+'")',width:et(_.width),height:et(_.height),...Q,...R?X:J,...z},(0,i.createElement)("span",P)})({...o,...h},e,d):e.children?e.children:e.fallback?e.fallback:(0,i.createElement)("span",{})}let er=(0,i.forwardRef)((e,t)=>en({...e,_ref:t}));(0,i.forwardRef)((e,t)=>en({inline:!0,...e,_ref:t}));var ei=e.i(66595),ea=e.i(31214),el=e.i(21357),eo=e.i(56420);let es=(0,eo.default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),ec=(0,eo.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),eu=(0,eo.default)("at-sign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]),ef=(0,eo.default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);var ed=e.i(68590);let eh=(0,eo.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),ep=(0,eo.default)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);var eg=e.i(30274);let em=(0,eo.default)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]);var ey=e.i(51921);let eb=(0,eo.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),ex=(0,eo.default)("triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]),ek=(0,eo.default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var ev=e.i(66627);let ej=[{name:"Google",host:"google.com",icon:"simple-icons:google",fallback:(0,r.jsx)(ei.Search,{size:20})},{name:"Cloudflare",host:"cloudflare.com",icon:"simple-icons:cloudflare",fallback:(0,r.jsx)(ea.Cloud,{size:20})},{name:"YouTube",host:"youtube.com",icon:"simple-icons:youtube",fallback:(0,r.jsx)(el.Play,{size:20})},{name:"GitHub",host:"github.com",icon:"simple-icons:github",fallback:(0,r.jsx)(es,{size:20})},{name:"ChatGPT",host:"chatgpt.com",icon:"simple-icons:openai",fallback:(0,r.jsx)(ec,{size:20})},{name:"X",host:"x.com",icon:"simple-icons:x",fallback:(0,r.jsx)(eu,{size:20})},{name:"Instagram",host:"instagram.com",icon:"simple-icons:instagram",fallback:(0,r.jsx)(ef,{size:20})},{name:"Reddit",host:"reddit.com",icon:"simple-icons:reddit",fallback:(0,r.jsx)(ed.MessageSquare,{size:20})},{name:"Wikipedia",host:"wikipedia.org",icon:"simple-icons:wikipedia",fallback:(0,r.jsx)(eh,{size:20})},{name:"Apple",host:"apple.com",icon:"simple-icons:apple",fallback:(0,r.jsx)(ep,{size:20})},{name:"Telegram",host:"telegram.org",icon:"simple-icons:telegram",fallback:(0,r.jsx)(eg.Send,{size:20})},{name:"Discord",host:"discord.com",icon:"simple-icons:discord",fallback:(0,r.jsx)(em,{size:20})},{name:"TikTok",host:"tiktok.com",icon:"simple-icons:tiktok",fallback:(0,r.jsx)(ey.Music,{size:20})},{name:"npm",host:"npmjs.com",icon:"simple-icons:npm",fallback:(0,r.jsx)(eb,{size:20})},{name:"Vercel",host:"vercel.com",icon:"simple-icons:vercel",fallback:(0,r.jsx)(ex,{size:20})}];function ew({icon:e,fallback:t}){let[n,a]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let t=new Image;t.onload=()=>a(!0),t.onerror=()=>a(!1),t.src=`https://api.iconify.design/${e.replace(":","/")}.svg`},[e]),(0,r.jsxs)("span",{className:"brand-icon-wrap",children:[(0,r.jsx)("span",{className:`brand-icon-fallback ${n?"hidden":""}`,children:t}),(0,r.jsx)("span",{className:`brand-icon-real ${n?"visible":""}`,children:(0,r.jsx)(er,{icon:e,width:20,height:20})})]})}function eM(){let[e,t]=(0,i.useState)(new Map),[n,a]=(0,i.useState)(!1),l=(0,i.useRef)(new Map),o=(0,i.useCallback)(e=>{t(t=>{let n=new Map(t);return n.set(e,{status:"pending",latency:0}),n});let n=new AbortController;l.current.set(e,n);let r=performance.now(),i=(n,r)=>{t(t=>{let i=new Map(t);return i.set(e,{status:n,latency:r}),i})},a=setTimeout(()=>{n.abort()},5e3);fetch(`https://${e}/`,{method:"HEAD",mode:"no-cors",cache:"no-store",signal:n.signal}).then(()=>{clearTimeout(a),i("ok",Math.round(performance.now()-r))}).catch(()=>{clearTimeout(a),i("timeout",0)})},[]),s=(0,i.useCallback)(()=>{a(!0);let e=new Map;ej.forEach(t=>{e.set(t.host,{status:"pending",latency:0})}),t(e);let n=new Set(ej.map(e=>e.host));ej.forEach(e=>{let r=new AbortController;l.current.set(e.host,r);let i=performance.now(),o=(r,i)=>{n.has(e.host)&&(n.delete(e.host),t(t=>{let n=new Map(t);return n.set(e.host,{status:r,latency:i}),n}),0===n.size&&a(!1))},s=setTimeout(()=>{r.abort()},5e3);fetch(`https://${e.host}/`,{method:"HEAD",mode:"no-cors",cache:"no-store",signal:r.signal}).then(()=>{clearTimeout(s),o("ok",Math.round(performance.now()-i))}).catch(()=>{clearTimeout(s),o("timeout",0)})})},[]);return(0,i.useEffect)(()=>(s(),()=>{l.current.forEach(e=>e.abort()),l.current.clear()}),[s]),(0,r.jsxs)("div",{className:"ping-page",children:[(0,r.jsxs)("div",{className:"ping-header",children:[(0,r.jsxs)("div",{className:"ping-title-wrap",children:[(0,r.jsx)(ev.Wifi,{size:28,className:"ping-title-icon"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"ping-title",children:"网络连通性"}),(0,r.jsx)("p",{className:"ping-subtitle",children:"通过向对应网站发送请求进行测试,延迟值仅供参考。"})]})]}),(0,r.jsx)("button",{className:"btn btn-icon",onClick:s,disabled:n,"aria-label":"重新测试全部",title:"重新测试全部",children:(0,r.jsx)(ek,{size:18,className:n?"ping-spin":""})})]}),(0,r.jsx)("div",{className:"ping-grid",children:ej.map(t=>{let n=e.get(t.host),i=!n||"pending"===n.status,a=n?.status==="timeout";return(0,r.jsxs)("div",{className:`ping-card ${i?"pending":""}`,children:[(0,r.jsxs)("div",{className:"ping-card-top",children:[(0,r.jsx)("span",{className:"ping-card-icon",children:(0,r.jsx)(ew,{icon:t.icon,fallback:t.fallback})}),(0,r.jsx)("a",{href:`https://${t.host}`,target:"_blank",rel:"noreferrer",className:"ping-card-name",children:t.name}),(0,r.jsx)("button",{className:"ping-card-refresh",onClick:()=>o(t.host),disabled:i,"aria-label":`重新测试 ${t.name}`,title:"重新测试",children:(0,r.jsx)(ek,{size:13,className:i?"ping-spin":""})})]}),(0,r.jsxs)("div",{className:"ping-card-bottom",children:[i?(0,r.jsx)("span",{className:"ping-pulse-dot"}):(0,r.jsx)("span",{className:`ping-status-label ${a?"is-error":"is-success"}`,children:a?"不可用":"可用"}),(0,r.jsx)("span",{className:`ping-latency ${i?"is-muted":a?"is-error":"is-success"}`,children:i?"--":a?"超时":`${n.latency} ms`})]})]},t.host)})})]})}var eS=e.i(40983);e.s(["default",0,function(){return(0,r.jsx)(eS.MarketingLayout,{children:(0,r.jsx)(eM,{})})}],23449)}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|