1 line
34 KiB
JavaScript
1 line
34 KiB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75254,e=>{"use strict";var t=e.i(71645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:s="",children:l,iconNode:u,...c},d)=>(0,t.createElement)("svg",{ref:d,...i,width:n,height:n,stroke:e,strokeWidth:a?24*Number(o)/Number(n):o,className:r("lucide",s),...c},[...u.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(l)?l:[l]])),o=(e,i)=>{let o=(0,t.forwardRef)(({className:o,...a},s)=>(0,t.createElement)(n,{ref:s,iconNode:i,className:r(`lucide-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,o),...a}));return o.displayName=`${e}`,o};e.s(["default",()=>o],75254)},98400,e=>{"use strict";function t(e){return 9.9}let r=[{id:"part-1",number:"01",title:"真实的人",subtitle:"人性观察与社交逻辑",chapters:[{id:"chapter-1",title:"人与人之间的底层逻辑",sections:[{id:"1.1",title:"自行车荷总:一个行业做到极致是什么样",price:1,isFree:!0,filePath:"book/_第一篇|真实的人/第1章|人与人之间的底层逻辑/1.1 自行车荷总:一个行业做到极致是什么样.md"},{id:"1.2",title:"老墨:资源整合高手的社交方法",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/_第一篇|真实的人/第1章|人与人之间的底层逻辑/1.2 老墨:资源整合高手的社交方法.md"},{id:"1.3",title:"笑声背后的MBTI:为什么ENTJ适合做资源,INTP适合做系统",price:1,isFree:!1,filePath:"book/_第一篇|真实的人/第1章|人与人之间的底层逻辑/1.3 笑声背后的MBTI:为什么ENTJ适合做资源,INTP适合做系统.md"},{id:"1.4",title:"人性的三角结构:情绪、价值、利益",price:1,isFree:!1,filePath:"book/_第一篇|真实的人/第1章|人与人之间的底层逻辑/1.4 人性的三角结构:情绪、价值、利益.md"},{id:"1.5",title:"为什么99%的合作死在沟通差而不是能力差",price:1,isFree:!1,filePath:"book/_第一篇|真实的人/第1章|人与人之间的底层逻辑/1.5 为什么99%的合作死在沟通差而不是能力差.md"}]},{id:"chapter-2",title:"人性困境案例",sections:[{id:"2.1",title:"相亲故事:你以为找的是人,实际是在找模式",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/_第一篇|真实的人/第2章|人性困境案例/2.1 相亲故事:你以为找的是人,实际是在找模式.md"},{id:"2.2",title:"找工作迷茫者:为什么简历解决不了人生",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/_第一篇|真实的人/第2章|人性困境案例/2.2 找工作迷茫者:为什么简历解决不了人生.md"},{id:"2.3",title:"撸运费险:小钱困住大脑的真实心理",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/_第一篇|真实的人/第2章|人性困境案例/2.3 撸运费险:小钱困住大脑的真实心理.md"},{id:"2.4",title:"游戏上瘾的年轻人:不是游戏吸引他,是生活没吸引力",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/_第一篇|真实的人/第2章|人性困境案例/2.4 游戏上瘾的年轻人:不是游戏吸引他,是生活没吸引力.md"},{id:"2.5",title:"健康焦虑(我的糖尿病经历):疾病是人生的第一次清醒",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/_第一篇|真实的人/第2章|人性困境案例/2.5 健康焦虑(我的糖尿病经历):疾病是人生的第一次清醒.md"}]}]},{id:"part-2",number:"02",title:"真实的行业",subtitle:"社会运作的底层规则",chapters:[{id:"chapter-3",title:"电商篇",sections:[{id:"3.1",title:"电商财税窗口:我错过的第一桶金",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第3章|电商篇/3.1 电商财税窗口:我错过的第一桶金.md"},{id:"3.2",title:"3000万流水如何跑出来(退税模式解析)",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第3章|电商篇/3.2 3000万流水如何跑出来(退税模式解析).md"},{id:"3.3",title:"供应链之王vs打工人:利润不在前端",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第3章|电商篇/3.3 供应链之王 vs 打工人:利润不在前端.md"},{id:"3.4",title:"社区团购的底层逻辑",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第3章|电商篇/3.4 社区团购的底层逻辑.md"},{id:"3.5",title:"跨境电商与退税套利",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第3章|电商篇/3.5 跨境电商与退税套利.md"}]},{id:"chapter-4",title:"内容商业篇",sections:[{id:"4.1",title:"旅游号:30天10万粉的真实逻辑",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第4章|内容商业篇/4.1 旅游号:30天10万粉的真实逻辑.md"},{id:"4.2",title:"做号工厂:如何让一个号变成一个机器",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第4章|内容商业篇/4.2 做号工厂:如何让一个号变成一个机器.md"},{id:"4.3",title:"情绪内容为什么比专业内容更赚钱",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第4章|内容商业篇/4.3 情绪内容为什么比专业内容更赚钱.md"},{id:"4.4",title:"猫与宠物号:为什么宠物赛道永不过时",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第4章|内容商业篇/4.4 猫与宠物号:为什么宠物赛道永不过时.md"},{id:"4.5",title:"直播间里的三种人:演员、技术工、系统流",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第4章|内容商业篇/4.5 直播间里的三种人:演员、技术工、系统流.md"}]},{id:"chapter-5",title:"传统行业篇",sections:[{id:"5.1",title:"羽毛球馆:为什么体育培训是最稳定的现金流",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第5章|传统行业篇/5.1 羽毛球馆:为什么体育培训是最稳定的现金流.md"},{id:"5.2",title:"旅游供应链:资源越老越值钱",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第5章|传统行业篇/5.2 旅游供应链:资源越老越值钱.md"},{id:"5.3",title:"景区联盟:门票不是目的,是流量入口",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第5章|传统行业篇/5.3 景区联盟:门票不是目的,是流量入口.md"},{id:"5.4",title:"拍卖行抱朴:我人生错过的4件大钱机会(完整版)",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第5章|传统行业篇/5.4 拍卖行抱朴:我人生错过的4件大钱机会(完整版).md"},{id:"5.5",title:"飞机票供应链:为什么越便宜越亏",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第二篇|真实的行业/第5章|传统行业篇/5.5 飞机票供应链:为什么越便宜越亏.md"}]}]},{id:"part-3",number:"03",title:"真实的错误",subtitle:"错过机会比失败更贵",chapters:[{id:"chapter-6",title:"我人生错过的4件大钱",sections:[{id:"6.1",title:"错过电商财税(2016-2017)",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第三篇|真实的错误/第6章|我人生错过的4件大钱/6.1 错过电商财税(2016-2017).md"},{id:"6.2",title:"错过供应链(2017-2018)",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第三篇|真实的错误/第6章|我人生错过的4件大钱/6.2 错过供应链(2017-2018).md"},{id:"6.3",title:"错过内容红利(2018-2019)",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第三篇|真实的错误/第6章|我人生错过的4件大钱/6.3 错过内容红利(2018-2019).md"},{id:"6.4",title:"错过资源资产化(2019-2020)",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第三篇|真实的错误/第6章|我人生错过的4件大钱/6.4 错过资源资产化(2019-2020).md"}]},{id:"chapter-7",title:"别人犯的错误",sections:[{id:"7.1",title:"投资房年轻人的迷茫:资金vs能力",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第三篇|真实的错误/第7章|别人犯的错误/7.1 投资房年轻人的迷茫:资金 vs 能力.md"},{id:"7.2",title:"信息差骗局:永远有人靠卖学习赚钱",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第三篇|真实的错误/第7章|别人犯的错误/7.2 信息差骗局:永远有人靠卖学习赚钱.md"},{id:"7.3",title:"在Soul找恋爱但想赚钱的人",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第三篇|真实的错误/第7章|别人犯的错误/7.3 在Soul找恋爱但想赚钱的人.md"},{id:"7.4",title:"创业者的三种死法:冲动、轻信、没结构",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第三篇|真实的错误/第7章|别人犯的错误/7.4 创业者的三种死法:冲动、轻信、没结构.md"},{id:"7.5",title:"人情生意的终点:关系越多亏得越多",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第三篇|真实的错误/第7章|别人犯的错误/7.5 人情生意的终点:关系越多亏得越多.md"}]}]},{id:"part-4",number:"04",title:"真实的赚钱",subtitle:"所有行业的杠杆结构",chapters:[{id:"chapter-8",title:"底层结构",sections:[{id:"8.1",title:"流量杠杆:抖音、Soul、飞书",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第8章|底层结构/8.1 流量杠杆:抖音、Soul、飞书.md"},{id:"8.2",title:"价格杠杆:供应链与信息差",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第8章|底层结构/8.2 价格杠杆:供应链与信息差.md"},{id:"8.3",title:"时间杠杆:自动化+AI",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第8章|底层结构/8.3 时间杠杆:自动化 + AI.md"},{id:"8.4",title:"情绪杠杆:咨询、婚恋、生意场",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第8章|底层结构/8.4 情绪杠杆:咨询、婚恋、生意场.md"},{id:"8.5",title:"社交杠杆:认识谁比你会什么更重要",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第8章|底层结构/8.5 社交杠杆:认识谁比你会什么更重要.md"},{id:"8.6",title:"云阿米巴:分不属于自己的钱",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第8章|底层结构/8.6 云阿米巴:分不属于自己的钱.md"}]},{id:"chapter-9",title:"我在Soul上亲访的赚钱案例",sections:[{id:"9.1",title:"游戏账号私域:账号即资产",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第9章|我在Soul上亲访的赚钱案例/9.1 游戏账号私域:账号即资产.md"},{id:"9.2",title:"健康包模式:高复购、高毛利",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第9章|我在Soul上亲访的赚钱案例/9.2 健康包模式:高复购、高毛利.md"},{id:"9.3",title:"药物私域:长期关系赛道",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第9章|我在Soul上亲访的赚钱案例/9.3 药物私域:长期关系赛道.md"},{id:"9.4",title:"残疾机构合作:退税×AI×人力成本",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第9章|我在Soul上亲访的赚钱案例/9.4 残疾机构合作:退税 × AI × 人力成本.md"},{id:"9.5",title:"私域银行:粉丝即小股东",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第9章|我在Soul上亲访的赚钱案例/9.5 私域银行:粉丝即小股东.md"},{id:"9.6",title:"Soul派对房:陌生人成交的最快场景",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第9章|我在Soul上亲访的赚钱案例/9.6 Soul派对房:陌生人成交的最快场景.md"},{id:"9.7",title:"飞书中台:从聊天到成交的流程化体系",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第四篇|真实的赚钱/第9章|我在Soul上亲访的赚钱案例/9.7 飞书中台:从聊天到成交的流程化体系.md"}]}]},{id:"part-5",number:"05",title:"真实的未来",subtitle:"人与系统的关系",chapters:[{id:"chapter-10",title:"未来职业的变化趋势",sections:[{id:"10.1",title:"AI代聊与岗位替换",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第五篇|真实的社会/第10章|未来职业的变化趋势/10.1 AI代聊与岗位替换.md"},{id:"10.2",title:"系统化工作vs杂乱工作",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第五篇|真实的社会/第10章|未来职业的变化趋势/10.2 系统化工作 vs 杂乱工作.md"},{id:"10.3",title:"为什么链接能力会成为第一价值",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第五篇|真实的社会/第10章|未来职业的变化趋势/10.3 为什么链接能力会成为第一价值.md"},{id:"10.4",title:"新型公司:Soul-飞书-线下的三位一体",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第五篇|真实的社会/第10章|未来职业的变化趋势/10.4 新型公司:Soul-飞书-线下的三位一体.md"}]},{id:"chapter-11",title:"中国社会商业生态的未来",sections:[{id:"11.1",title:"城市之间的模式差",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第五篇|真实的社会/第11章|中国社会商业生态的未来/11.1 城市之间的模式差.md"},{id:"11.2",title:"厦门样本:低成本高效率经济",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第五篇|真实的社会/第11章|中国社会商业生态的未来/11.2 厦门样本:低成本高效率经济.md"},{id:"11.3",title:"流量红利的终局",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第五篇|真实的社会/第11章|中国社会商业生态的未来/11.3 流量红利的终局.md"},{id:"11.4",title:"大模型+供应链的组合拳",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第五篇|真实的社会/第11章|中国社会商业生态的未来/11.4 大模型 + 供应链的组合拳.md"},{id:"11.5",title:"社会分层的最终逻辑",price:1,isFree:!1,unlockAfterDays:3,filePath:"book/第五篇|真实的社会/第11章|中国社会商业生态的未来/11.5 社会分层的最终逻辑.md"}]}]}];function i(){let e=[];{let t=JSON.parse(localStorage.getItem("custom_sections")||"[]");e.push(...t)}return r.forEach(t=>{t.chapters.forEach(t=>{e.push(...t.sections)})}),e}function n(e){if(e.isFree)return!0;if(!e.unlockAfterDays||!e.createdAt)return!1;let t=new Date(new Date(e.createdAt).getTime()+24*e.unlockAfterDays*36e5);return new Date>=t}e.s(["bookData",0,r,"getAllSections",()=>i,"getFullBookPrice",()=>t,"isSectionUnlocked",()=>n,"specialSections",0,{preface:{id:"preface",title:"序言|为什么我每天早上6点在Soul开播?",price:0,isFree:!0,filePath:"book/序言|为什么我每天早上6点在Soul开播?.md"},epilogue:{id:"epilogue",title:"尾声|终极答案:努力不是关键,选择才是",price:0,isFree:!0,filePath:"book/尾声|终极答案:努力不是关键,选择才是.md"}}])},4421,e=>{"use strict";let t,r,i,n;var o,a=e.i(71645);let s=e=>{let t,r=new Set,i=(e,i)=>{let n="function"==typeof e?e(t):e;if(!Object.is(n,t)){let e=t;t=(null!=i?i:"object"!=typeof n||null===n)?n:Object.assign({},t,n),r.forEach(r=>r(t,e))}},n=()=>t,o={setState:i,getState:n,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e))},a=t=e(i,n,o);return o},l=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>l(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>l(t)(e)}}};var u=e.i(98400);let c={distributorShare:90,authorShare:10,paymentMethods:{wechat:{enabled:!0,qrCode:"",account:"",websiteAppId:"",websiteAppSecret:"",serviceAppId:"",serviceAppSecret:"",mpVerifyCode:"",merchantId:"",apiKey:""},alipay:{enabled:!0,qrCode:"",account:"",partnerId:"",securityKey:"",mobilePayEnabled:!0,paymentInterface:"official"},usdt:{enabled:!0,network:"TRC20",address:"",exchangeRate:7.2},paypal:{enabled:!1,email:"",exchangeRate:7.2}},sectionPrice:1,baseBookPrice:9.9,pricePerSection:1,qrCodes:[{id:"default",name:"Soul派对群",url:"https://soul.cn/party",imageUrl:"/images/image.png",weight:1,enabled:!0}],liveQRCodes:[{id:"party-group",name:"派对群活码",urls:["https://soul.cn/party1","https://soul.cn/party2","https://soul.cn/party3"],imageUrl:"/images/image.png",redirectType:"random",clickCount:0,enabled:!0}],feishuSync:{enabled:!1,docUrl:"",autoSync:!1,syncInterval:60},authorInfo:{name:"卡若",description:"连续创业者,私域运营专家,每天早上6-9点在Soul派对房分享真实商业故事",liveTime:"06:00-09:00",platform:"Soul派对房"}},d=(i=(o=(t=(e,t)=>({user:null,isLoggedIn:!1,purchases:[],withdrawals:[],settings:c,login:async(t,r)=>{if("123456"!==r)return!1;let i=JSON.parse(localStorage.getItem("users")||"[]").find(e=>e.phone===t);return!!i&&(e({user:i,isLoggedIn:!0}),!0)},logout:()=>{e({user:null,isLoggedIn:!1})},register:async(t,r,i)=>{let n=JSON.parse(localStorage.getItem("users")||"[]");if(n.find(e=>e.phone===t))return!1;let o={id:`user_${Date.now()}`,phone:t,nickname:r,isAdmin:!1,purchasedSections:[],hasFullBook:!1,referralCode:`REF${Date.now().toString(36).toUpperCase()}`,referredBy:i,earnings:0,pendingEarnings:0,withdrawnEarnings:0,referralCount:0,createdAt:new Date().toISOString()};if(i){let e=n.find(e=>e.referralCode===i);e&&(e.referralCount=(e.referralCount||0)+1,localStorage.setItem("users",JSON.stringify(n)))}return n.push(o),localStorage.setItem("users",JSON.stringify(n)),e({user:o,isLoggedIn:!0}),!0},purchaseSection:async(r,i,n)=>{let{user:o,settings:a}=t();if(!o)return!1;let s=a.sectionPrice,l={id:`purchase_${Date.now()}`,userId:o.id,userPhone:o.phone,userNickname:o.nickname,type:"section",sectionId:r,sectionTitle:i,amount:s,paymentMethod:n,referralCode:o.referredBy,status:"completed",createdAt:new Date().toISOString()},u={...o,purchasedSections:[...o.purchasedSections,r]},c=JSON.parse(localStorage.getItem("users")||"[]"),d=c.findIndex(e=>e.id===o.id);if(-1!==d&&(c[d]=u,localStorage.setItem("users",JSON.stringify(c))),o.referredBy){let e=c.find(e=>e.referralCode===o.referredBy);if(e){let t=s*(a.distributorShare/100);e.earnings+=t,e.pendingEarnings=(e.pendingEarnings||0)+t,l.referrerEarnings=t,localStorage.setItem("users",JSON.stringify(c))}}let f=JSON.parse(localStorage.getItem("all_purchases")||"[]");return f.push(l),localStorage.setItem("all_purchases",JSON.stringify(f)),e({user:u,purchases:[...t().purchases,l]}),!0},purchaseFullBook:async r=>{let{user:i,settings:n}=t();if(!i)return!1;let o=(0,u.getFullBookPrice)(),a={id:`purchase_${Date.now()}`,userId:i.id,userPhone:i.phone,userNickname:i.nickname,type:"fullbook",amount:o,paymentMethod:r,referralCode:i.referredBy,status:"completed",createdAt:new Date().toISOString()},s={...i,hasFullBook:!0},l=JSON.parse(localStorage.getItem("users")||"[]"),c=l.findIndex(e=>e.id===i.id);if(-1!==c&&(l[c]=s,localStorage.setItem("users",JSON.stringify(l))),i.referredBy){let e=l.find(e=>e.referralCode===i.referredBy);if(e){let t=o*(n.distributorShare/100);e.earnings+=t,e.pendingEarnings=(e.pendingEarnings||0)+t,a.referrerEarnings=t,localStorage.setItem("users",JSON.stringify(l))}}let d=JSON.parse(localStorage.getItem("all_purchases")||"[]");return d.push(a),localStorage.setItem("all_purchases",JSON.stringify(d)),e({user:s,purchases:[...t().purchases,a]}),!0},hasPurchased:e=>{let{user:r}=t();return!!r&&(!!r.hasFullBook||r.purchasedSections.includes(e))},adminLogin:(t,r)=>"admin"===t.toLowerCase()&&"key123456"===r&&(e({user:{id:"admin",phone:"admin",nickname:"管理员",isAdmin:!0,purchasedSections:[],hasFullBook:!0,referralCode:"ADMIN",earnings:0,pendingEarnings:0,withdrawnEarnings:0,referralCount:0,createdAt:new Date().toISOString()},isLoggedIn:!0}),!0),updateSettings:r=>{let{settings:i}=t(),n={...i,...r};void 0!==r.distributorShare&&(n.authorShare=100-r.distributorShare),e({settings:n}),localStorage.setItem("app_settings",JSON.stringify(n))},getAllUsers:()=>JSON.parse(localStorage.getItem("users")||"[]"),getAllPurchases:()=>JSON.parse(localStorage.getItem("all_purchases")||"[]"),addUser:e=>{let t=JSON.parse(localStorage.getItem("users")||"[]"),r={id:`user_${Date.now()}`,phone:e.phone||"",nickname:e.nickname||"新用户",isAdmin:!1,purchasedSections:[],hasFullBook:!1,referralCode:`REF${Date.now().toString(36).toUpperCase()}`,earnings:0,pendingEarnings:0,withdrawnEarnings:0,referralCount:0,createdAt:new Date().toISOString(),...e};return t.push(r),localStorage.setItem("users",JSON.stringify(t)),r},updateUser:(e,t)=>{let r=JSON.parse(localStorage.getItem("users")||"[]"),i=r.findIndex(t=>t.id===e);-1!==i&&(r[i]={...r[i],...t},localStorage.setItem("users",JSON.stringify(r)))},deleteUser:e=>{let t=JSON.parse(localStorage.getItem("users")||"[]").filter(t=>t.id!==e);localStorage.setItem("users",JSON.stringify(t))},addPurchase:t=>e(e=>{let r={id:Math.random().toString(36).substring(2,9),createdAt:new Date().toISOString(),...t};if(e.user&&t.userId===e.user.id){let i={...e.user};return"fullbook"===t.type?i.hasFullBook=!0:t.sectionId&&(i.purchasedSections=[...i.purchasedSections,t.sectionId]),e.users?.map(e=>e.id===i.id?i:e),{purchases:[...e.purchases,r],user:i}}return{purchases:[...e.purchases,r]}}),requestWithdrawal:(t,r,i,n)=>e(e=>{if(!e.user||e.user.earnings<t)return{};let o={id:Math.random().toString(36).substring(2,9),userId:e.user.id,amount:t,method:r,account:i,name:n,status:"pending",createdAt:new Date().toISOString()},a={...e.user,earnings:e.user.earnings-t,pendingEarnings:e.user.pendingEarnings+t};return{withdrawals:[...e.withdrawals||[],o],user:a}}),completeWithdrawal:t=>e(e=>{let r=e.withdrawals||[],i=r.findIndex(e=>e.id===t);if(-1===i)return{};let n=r[i];if("pending"!==n.status)return{};let o=[...r];return o[i]={...n,status:"completed",completedAt:new Date().toISOString()},{withdrawals:o}}),updateLiveQRCode:t=>e(e=>{let{settings:r}=e,i=r.liveQRCodes.map(e=>e.id===t.id?{...e,...t}:e);return{settings:{...r,liveQRCodes:i}}}),getRandomQRCode:()=>{let{settings:e}=t(),r=e.qrCodes.filter(e=>e.enabled);if(0===r.length)return null;let i=Math.random()*r.reduce((e,t)=>e+t.weight,0);for(let e of r)if((i-=e.weight)<=0)return e;return r[0]},getLiveQRCodeUrl:e=>{let{settings:r}=t(),i=r.liveQRCodes.find(t=>t.id===e&&t.enabled);if(!i||0===i.urls.length)return null;if(i.clickCount++,"random"===i.redirectType){let e=Math.floor(Math.random()*i.urls.length);return i.urls[e]}if("sequential"===i.redirectType){let e=i.clickCount%i.urls.length;return i.urls[e]}if("weighted"===i.redirectType&&i.weights){let e=Math.random()*i.weights.reduce((e,t)=>e+t,0);for(let t=0;t<i.urls.length;t++)if((e-=i.weights[t]||1)<=0)return i.urls[t]}return i.urls[0]},exportData:()=>{let{user:e,purchases:r,settings:i}=t();return JSON.stringify({user:e,purchases:r,settings:i,exportDate:new Date().toISOString()},null,2)},fetchSettings:async()=>{try{let r=await fetch("/api/config");if(!r.ok)throw Error("Failed to fetch config");let i=await r.json(),{settings:n}=t(),o={paymentMethods:{...n.paymentMethods,wechat:{...n.paymentMethods.wechat,...i.paymentMethods?.wechat},alipay:{...n.paymentMethods.alipay,...i.paymentMethods?.alipay},usdt:{...n.paymentMethods.usdt,...i.paymentMethods?.usdt},paypal:{...n.paymentMethods.paypal,...i.paymentMethods?.paypal}},authorInfo:{...n.authorInfo,...i.authorInfo}};e({settings:{...n,...o}})}catch(e){console.error("Failed to sync settings:",e)}}}),r={name:"soul-experiment-storage"},(e,i,n)=>{let o,a={storage:function(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var t;let i=e=>null===e?null:JSON.parse(e,void 0),n=null!=(t=r.getItem(e))?t:null;return n instanceof Promise?n.then(i):i(n)},setItem:(e,t)=>r.setItem(e,JSON.stringify(t,void 0)),removeItem:e=>r.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...r},s=!1,u=new Set,c=new Set,d=a.storage;if(!d)return t((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),e(...t)},i,n);let f=()=>{let e=a.partialize({...i()});return d.setItem(a.name,{state:e,version:a.version})},p=n.setState;n.setState=(e,t)=>(p(e,t),f());let h=t((...t)=>(e(...t),f()),i,n);n.getInitialState=()=>h;let g=()=>{var t,r;if(!d)return;s=!1,u.forEach(e=>{var t;return e(null!=(t=i())?t:h)});let n=(null==(r=a.onRehydrateStorage)?void 0:r.call(a,null!=(t=i())?t:h))||void 0;return l(d.getItem.bind(d))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(t=>{var r;let[n,s]=t;if(e(o=a.merge(s,null!=(r=i())?r:h),!0),n)return f()}).then(()=>{null==n||n(o,void 0),o=i(),s=!0,c.forEach(e=>e(o))}).catch(e=>{null==n||n(void 0,e)})};return n.persist={setOptions:e=>{a={...a,...e},e.storage&&(d=e.storage)},clearStorage:()=>{null==d||d.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>s,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},a.skipHydration||g(),o||h}))?s(o):s,Object.assign(n=e=>(function(e,t=e=>e){let r=a.default.useSyncExternalStore(e.subscribe,a.default.useCallback(()=>t(e.getState()),[e,t]),a.default.useCallback(()=>t(e.getInitialState()),[e,t]));return a.default.useDebugValue(r),r})(i,e),i),n);e.s(["useStore",0,d],4421)},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={assign:function(){return l},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return s}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});function o(e){let t={};for(let[r,i]of e.entries()){let e=t[r];void 0===e?t[r]=i:Array.isArray(e)?e.push(i):t[r]=[e,i]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let e of i)t.append(r,a(e));else t.set(r,a(i));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,i]of r.entries())e.append(t,i)}return e}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let o=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,i=e.protocol||"",n=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return i&&!i.endsWith(":")&&(i+=":"),e.slashes||(!i||a.test(i))&&!1!==u?(u="//"+(u||""),n&&"/"!==n[0]&&(n="/"+n)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),n=n.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${i}${u}${n}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let i=e.r(71645);function n(e,t){let r=(0,i.useRef)(null),n=(0,i.useRef)(null);return(0,i.useCallback)(i=>{if(null===i){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=o(e,i)),t&&(n.current=o(t,i))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return P},MissingStaticPage:function(){return k},NormalizeError:function(){return S},PageNotFoundError:function(){return b},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return o},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return A}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...i)=>(r||(r=!0,t=e(...i)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let i=await e.getInitialProps(t);if(r&&f(r))return i;if(!i)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${i}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return i}let g="undefined"!=typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class S extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class k extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class P extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function A(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let i=e.r(18967),n=e.r(52817);function o(e){if(!(0,i.isAbsoluteUrl)(e))return!0;try{let t=(0,i.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return i}});let i=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={default:function(){return y},useLinkStatus:function(){return b}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let o=e.r(90809),a=e.r(43476),s=o._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550);e.r(33525);let p=e.r(91949),h=e.r(73668),g=e.r(9396);function m(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function y(t){var r;let i,n,o,[l,y]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,s.useRef)(null),{href:k,as:P,children:A,prefetch:I=null,passHref:v,replace:w,shallow:D,scroll:F,onClick:O,onMouseEnter:E,onTouchStart:C,legacyBehavior:N=!1,onNavigate:_,ref:T,unstable_dynamicOnHover:R,...M}=t;i=A,N&&("string"==typeof i||"number"==typeof i)&&(i=(0,a.jsx)("a",{children:i}));let j=s.default.useContext(u.AppRouterContext),x=!1!==I,L=!1!==I?null===(r=I)||"auto"===r?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,{href:J,as:U}=s.default.useMemo(()=>{let e=m(k);return{href:e,as:P?m(P):e}},[k,P]);if(N){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=s.default.Children.only(i)}let B=N?n&&"object"==typeof n&&n.ref:T,$=s.default.useCallback(e=>(null!==j&&(b.current=(0,p.mountLinkInstance)(e,J,j,L,x,y)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[x,J,j,L,y]),K={ref:(0,c.useMergedRef)($,B),onClick(t){N||"function"!=typeof O||O(t),N&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!j||t.defaultPrevented||function(t,r,i,n,o,a,l){if("undefined"!=typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);s.default.startTransition(()=>{d(i||r,o?"replace":"push",a??!0,n.current)})}}(t,J,U,b,w,F,_)},onMouseEnter(e){N||"function"!=typeof E||E(e),N&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),j&&x&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)},onTouchStart:function(e){N||"function"!=typeof C||C(e),N&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),j&&x&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)}};return(0,d.isAbsoluteUrl)(U)?K.href=U:N&&!v&&("a"!==n.type||"href"in n.props)||(K.href=(0,f.addBasePath)(U)),o=N?s.default.cloneElement(n,K):(0,a.jsx)("a",{...M,...K,children:i}),(0,a.jsx)(S.Provider,{value:l,children:o})}e.r(84508);let S=(0,s.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(S);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]); |