const fs=require('fs'),path=require('path'),root=__dirname; const pages=[['login','登录','Login'],['albums','相册管理','Albums'],['photos','相册照片','Album photos'],['members','相册成员','Members'],['categories','分类管理','Categories'],['watermark','水印配置','Watermark'],['sharing','相册分享','Sharing'],['create-album','新建相册','New album'],['edit-album','编辑相册','Edit album'],['users','账号管理','Accounts'],['user-sync','用户同步','User sync'],['usage','存储与用量','Storage & usage'],['embed-slots','网站展示位','Embed widgets'],['embed-editor','配置展示位','Widget configuration'],['branding','宣传图与资产','Album branding'],['photo-viewer','照片大图','Photo details'],['403','无权限','Access restricted'],['404','页面不存在','Page not found'],['500','服务异常','Server error'],['sync-detail','同步批次详情','Sync run details']].map(([slug,zh,en],i)=>({id:i+1,file:String(i+1).padStart(2,'0')+'-'+slug+'.html',zh,en})); fs.mkdirSync(path.join(root,'assets'),{recursive:true});fs.copyFileSync(path.join(root,'../admin-redesign-concept-2026-09-22.png'),path.join(root,'assets/photo-reference.png'));fs.copyFileSync(path.join(root,'../app-preview-2026-09-22/assets/demo-qr.svg'),path.join(root,'assets/demo-qr.svg')); const app=fs.readFileSync(path.join(root,'../app-preview-2026-09-22/app.js'),'utf8');const paths=app.match(/const paths=(\{.*?\});/s)[1];fs.writeFileSync(path.join(root,'icons.js'),'window.ICONS='+paths+';');fs.writeFileSync(path.join(root,'pages.js'),'window.ADMIN_PAGES='+JSON.stringify(pages,null,2)+';'); const html=p=>`