Spaces:
Running
Running
Surf commited on
Commit ·
517c0ed
1
Parent(s): c928d67
feat: optimize PDF and add miniapp visual assets
Browse files- README.md +9 -9
- htlb/miniapp/tool/app.js +1 -1
- htlb/miniapp/tool/cover-3x4.jpg +3 -0
- htlb/miniapp/tool/icon.png +3 -0
- htlb/miniapp/tool/index.html +1 -1
- htlb/miniapp/tool/style.css +1 -0
- htlb/miniapp/tool/高性价比人生指南-765条建议全集.pdf +2 -2
- htlb/miniapp/高性价比人生-小工具.zip +2 -2
- htlb/pdf/高性价比人生指南-765条建议全集.pdf +2 -2
- miniapp/README.md +8 -6
README.md
CHANGED
|
@@ -12,20 +12,20 @@ pinned: false
|
|
| 12 |
|
| 13 |
## 本轮步骤
|
| 14 |
|
| 15 |
-
- [
|
| 16 |
-
- [
|
| 17 |
-
- [
|
| 18 |
-
- [
|
| 19 |
-
- [
|
| 20 |
|
| 21 |
## 本轮同步记录
|
| 22 |
|
| 23 |
| 大动作 | 状态 | 结果 |
|
| 24 |
| --- | --- | --- |
|
| 25 |
-
| 计划写入 README |
|
| 26 |
-
| PDF 压缩 |
|
| 27 |
-
| 图标与 3:4 封面 |
|
| 28 |
-
| 重新打包与验证 |
|
| 29 |
|
| 30 |
# 本轮升级计划:小红书小工具「765 条建议全集」
|
| 31 |
|
|
|
|
| 12 |
|
| 13 |
## 本轮步骤
|
| 14 |
|
| 15 |
+
- [x] **1. 资源基线**:确认原 PDF 为 311 页、10,902,263 bytes;主要体积来自 Chromium 生成的 Type3 字体 / 矢量字形流,而不是图片。
|
| 16 |
+
- [x] **2. PDF 优化**:移除原来的第 1 页封面,并用 qpdf 重新压缩对象流 / Flate 流;新 PDF 为 310 页、10,422,465 bytes(约 9.94 MiB,低于 Hugging Face 10 MiB 单文件限制),保留正文、目录、页内跳转、来源链接和中文字形。
|
| 17 |
+
- [x] **3. 视觉资产**:生成了小票 + 证据印章 + 绿色确认标记图标,以及 1086×1448 的 3:4 打印机封面;封面不依赖模型生成文字,标题和数据由界面叠加,避免乱码。
|
| 18 |
+
- [x] **4. 接入与打包**:更新 favicon 为 `icon.png`,PDF 面板接入 `cover-3x4.jpg`,重新生成 zip;同步检查相对路径和 MIME 类型。
|
| 19 |
+
- [x] **5. 验证与同步**:Node 语法、qpdf PDF 校验、310 页 / 765 条 / 34 节计数、PDF 小于 10 MiB、3:4 封面尺寸、zip 内容和本地资源路径均已通过;线上推送前还需完成一次 LFS 资源上传与线上 URL 冒烟。
|
| 20 |
|
| 21 |
## 本轮同步记录
|
| 22 |
|
| 23 |
| 大动作 | 状态 | 结果 |
|
| 24 |
| --- | --- | --- |
|
| 25 |
+
| 计划写入 README | ✅ 已完成 | 已先于资源修改同步 |
|
| 26 |
+
| PDF 压缩 | ✅ 已完成 | 310 页 / 10,422,465 bytes,低于 10 MiB |
|
| 27 |
+
| 图标与 3:4 封面 | ✅ 已完成 | 已生成并接入工具包 |
|
| 28 |
+
| 重新打包与验证 | ✅ 本地完成 | PDF 10,422,465 bytes;310 页;zip 含 9 个文件;本地校验通过,待最终线上同步 |
|
| 29 |
|
| 30 |
# 本轮升级计划:小红书小工具「765 条建议全集」
|
| 31 |
|
htlb/miniapp/tool/app.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
(()=>{function h(t,e){return(e||document).querySelector(t)}function Y(t,e){return Array.prototype.slice.call((e||document).querySelectorAll(t))}var ya={"&":"&","<":"<",">":">",'"':""","'":"'"};function T(t){return String(t).replace(/[&<>"']/g,function(e){return ya[e]})}function Bt(t,e){var a=0;return function(){var r=arguments;clearTimeout(a),a=setTimeout(function(){t.apply(null,r)},e)}}function Z(t){for(var e=2166136261,a=0;a<t.length;a++)e^=t.charCodeAt(a),e=Math.imul(e,16777619)>>>0;return e>>>0}function st(t){var e=t>>>0;return function(){e=e+1831565813>>>0;var a=e;return a=Math.imul(a^a>>>15,a|1),a^=a+Math.imul(a^a>>>7,a|61),((a^a>>>14)>>>0)/4294967296}}var wa=["日","一","二","三","四","五","六"];function fe(){var t=new Date,e=t.getFullYear(),a=t.getMonth()+1,r=t.getDate();return{key:e+"-"+a+"-"+r,dot:e+"."+de(a)+"."+de(r),cn:a+" 月 "+r+" 日",week:"星期"+wa[t.getDay()]}}function de(t){return t<10?"0"+t:String(t)}function ue(){try{return!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}catch(t){return!1}}function ve(t){requestAnimationFrame(function(){requestAnimationFrame(t)})}var _t=window.__BOOK__||{v:"",n:0,secs:[],items:[]},ye=_t.v,G=[],D={},H=[],O={},Rt=[0];_t.secs.forEach(function(t){var e={sec:t[0],title:t[1],intro:t[2],items:[],best:0};G.push(e),D[e.sec]=e});_t.items.forEach(function(t,e){var a={i:e,sec:t[0],n:t[1],id:t[0]+"-"+t[1],title:t[2],money:t[3],time:t[4],will:t[5],gain:t[6],kind:t[7],cost:t[8],plain:t[9],evRaw:t[10],py:t[11],benefit:"",src:[],note:""},r=(a.evRaw||"").charAt(0).toUpperCase();a.ev=r==="A"||r==="B"||r==="C"?r:"",a.evExtra=a.evRaw.slice(1).trim(),a.free=a.money==="0",a.best=a.money==="0"&&a.time==="少"&&a.will==="否"&&a.gain==="大",a.lc={title:q(a.title),plain:q(a.plain),cost:q(a.cost),benefit:q(a.benefit),note:q(a.note)},a.pyc=Ta(a.py),H.push(a),O[a.id]=a;var n=D[a.sec];n&&(n.items.push(a),a.best&&n.best++)});G.forEach(function(t){Rt[t.sec]=t.items.length});var lt={ready:!1},Ot=[];function we(t){lt.ready?t():Ot.push(t)}function pe(){var t=window.__BOOK_FULL__;if(!(lt.ready||!t||t.length!==H.length)){for(var e=0;e<H.length;e++){var a=H[e];a.benefit=t[e][0],a.src=t[e][1],a.note=t[e][2],a.lc.benefit=q(a.benefit),a.lc.note=q(a.note)}lt.ready=!0;var r=Ot;Ot=[],r.forEach(function(n){try{n()}catch(i){}})}}window.__BOOK_FULL__?pe():window.__htlbOnFull=pe;var Tt=H.filter(function(t){return t.best});function q(t){return Q(String(t||"").replace(/\uE000([^\uE001\uE002]*)\uE001[^\uE002]*\uE002/g,"$1").replace(/\n+/g," ")).toLowerCase()}function Q(t){return t.replace(/[!-~]/g,function(e){var a=e.charCodeAt(0)-65248,r=String.fromCharCode(a);return/[A-Za-z0-9]/.test(r)?r:e})}function Ta(t){for(var e="",a=[],r=0;r<t.length;r++)t[r]!==" "&&(e+=t[r],a.push(r));return{s:e,map:a}}var he={0:"不花钱",少:"花小钱",中:"花点钱",多:"花大钱"},be={少:"费时少",中:"费时中等",多:"费时多"},me={否:"不靠毅力",些:"要点毅力",是:"要毅力"},ge={大:"收益大",中:"收益中",小:"收益小"};function ot(t){var e=[];return he[t.money]&&e.push({k:"money",t:he[t.money],on:t.money==="0"}),be[t.time]&&e.push({k:"time",t:be[t.time],on:t.time==="少"}),me[t.will]&&e.push({k:"will",t:me[t.will],on:t.will==="否"}),ge[t.gain]&&e.push({k:"gain",t:ge[t.gain],on:t.gain==="大"}),t.kind&&e.push({k:"kind",t:"换回 · "+t.kind,on:!1}),e}function I(t){return"第 "+t.sec+" 节 · 第 "+t.n+" 条"}function W(t){return(t.sec<10?"0":"")+t.sec+"-"+(t.n<10?"0":"")+t.n}function St(t,e){return H[t.i+e]||null}var Ft={A:"有具体数字可查,出处是多项研究合并起来的荟萃分析、跟踪很多人很多年的大型队列,或者随机分组的试验(RCT),能说出降了多少(HR、RR、下降百分比)",B:"有研究支持,但说不出一个确切数字;或者只有小样本、单独一项研究撑着",C:"作者自己的经验,或者大家公认的做法,没有直接的研究文献"};var Te=/(本节)?第\s*(\d+)\s*节(?:\s*第\s*(\d+(?:\s*(?:、|到|至)\s*\d+)*)\s*条)?|(本节)?第\s*(\d+(?:\s*(?:、|到|至)\s*\d+)*)\s*条/g,Sa=/(意见|通知|章程|公约|》|号|法|例|典|定|释|则|〕|规|款|项|案)\s*$/,ka=/^\s*(([^()]{0,40}))?\s*(、|和|或|及|以及|,|,)\s*$/,xa=/(\d+)/g;function Se(t,e,a){var r=[],n=0,i=-1,s=0,l;for(Te.lastIndex=0;l=Te.exec(t);){var o=l.index,u=l[0],f=t.slice(Math.max(0,o-6),o),d=0,p=null,g=!1;if(l[2]!==void 0)d=Number(l[2]),g=!0,p=l[3]||null;else{if(!l[4]&&Sa.test(f))continue;p=l[5],l[4]?d=e:i>=0&&s&&ka.test(t.slice(i,o))?d=s:d=e}if(d>=1&&d<a.length&&a[d]){if(p){var M=!0;if(p.replace(xa,function(F){var b=Number(F);return b>=1&&b<=a[d]||(M=!1),F}),!M)continue}if(o>n&&r.push({t:"text",s:t.slice(n,o)}),!p)r.push({t:"sec",s:u,sec:d});else{for(var y=[],R=/\d+/g,k=u.lastIndexOf(p),v,L=[];v=R.exec(p);)L.push({i:k+v.index,len:v[0].length,n:Number(v[0])});for(var S=0,w=0;w<L.length;w++){var A=w===L.length-1?u.length:L[w].i+L[w].len;y.push({t:"ref",s:u.slice(S,A),sec:d,n:L[w].n}),S=A}for(var B=0;B<y.length;B++)r.push(y[B])}n=o+u.length,i=n,s=g||l[4]||d?d:0}}return n<t.length&&r.push({t:"text",s:t.slice(n)}),r}var Pt=/\uE000([^\uE001\uE002]*)\uE001([^\uE002]*)\uE002/g;function tt(t){return String(t||"").replace(Pt,"$1")}function Ea(t){var e=String(t||""),a="",r=[],n=[],i=0,s;for(Pt.lastIndex=0;s=Pt.exec(e);){var l=e.slice(i,s.index);a+=l;for(var o=0;o<l.length;o++)r.push(0);n.push(s[2]),a+=s[1];for(var u=0;u<s[1].length;u++)r.push(n.length);i=s.index+s[0].length}var f=e.slice(i);a+=f;for(var d=0;d<f.length;d++)r.push(0);return{s:a,link:r,urls:n}}var ke=/https?:\/\/[^\s<>()「」;,。]+/g,xe=/[,。、;:?!)」』》%…—·”’]/;function $(t,e){e=e||{};var a=Ea(t),r=a.s,n=r.length;if(!n)return"";var i=new Array(n),s=new Array(n),l=new Array(n),o=[];if(e.refs&&e.sec){var u=0;Se(r,e.sec,Rt).forEach(function(k){if(k.t!=="text"){o.push(k);for(var v=0;v<k.s.length;v++)i[u+v]=o.length}u+=k.s.length})}if(e.urls){var f;for(ke.lastIndex=0;f=ke.exec(r);)for(var d=0;d<f[0].length;d++)l[f.index+d]=1}jt(r,e.terms,s);function p(k){return(a.link[k]||"")+"|"+(i[k]||"")+"|"+(s[k]?"m":"")+"|"+(l[k]?"u":"")}function g(k,v,L){var S=k.split("|"),w=T(v).replace(/\n/g,"<br>");if(S[2]&&(w="<mark>"+w+"</mark>"),S[3]&&(w='<span class="url">'+w+"</span>"),S[1]){var A=o[Number(S[1])-1];w=A.t==="sec"?'<span class="xref" role="link" tabindex="0" data-act="sec" data-sec="'+A.sec+'">'+w+"</span>":'<span class="xref" role="link" tabindex="0" data-act="ref" data-id="'+A.sec+"-"+A.n+'">'+w+"</span>"}return S[0]&&(w='<span class="doc">'+w+"</span>",L&&(w+='<span class="lnk-url">'+T(a.urls[Number(S[0])-1])+"</span>")),w}function M(k,v){for(var L="",S=k;S<v;){for(var w=p(S),A=S+1;A<v&&p(A)===w;)A++;var B=a.link[A-1];L+=g(w,r.slice(S,A),B&&a.link[A]!==B),S=A}return L}var y=n;if(n>12&&!e.urls){for(y=n-1;y>0&&xe.test(r[y]);)y--;y=y-1,(y<0||i[y]||i[y+1]||a.link[y]||a.link[n-1]||/[A-Za-z0-9\n]/.test(r.slice(y,n)))&&(y=n)}var R=M(0,y);return y<n&&(R+='<span class="nobr">'+M(y,n)+"</span>"),R}function Aa(t){var e=[];return String(t||"").split(/\n+/).forEach(function(a){if(a=a.trim(),!!a){if(a.length<=170)return e.push(a);for(var r=[],n=0,i="",s=0;s<a.length;s++){var l=a[s];if(i+=l,"「『((“《".indexOf(l)!==-1?n++:"」』))”》".indexOf(l)!==-1&&n>0&&n--,n===0&&(l==="。"||l==="!"||l==="?")){for(;s+1<a.length&&"」』))”".indexOf(a[s+1])!==-1;)i+=a[++s];r.push(i),i=""}}i&&r.push(i);var o="";r.forEach(function(u,f){o+=u;for(var d=0,p=f+1;p<r.length;p++)d+=r[p].length;o.length>=90&&d>=40&&(e.push(o.trim()),o="")}),o.trim()&&e.push(o.trim())}}),e}function Dt(t,e){return Aa(t).map(function(a){return"<p>"+$(a,e)+"</p>"}).join("")}function jt(t,e,a){if(!e||!e.length)return!1;var r=Q(t).toLowerCase(),n=!1;return e.forEach(function(i){if(i)for(var s=0,l;(l=r.indexOf(i,s))!==-1;){for(var o=0;o<i.length;o++)a[l+o]=1;s=l+i.length,n=!0}}),n}function kt(t,e){var a=t.title,r=new Array(a.length);return e&&e.length&&(jt(a,e,r),e.forEach(function(n){if(/^[a-z]+$/.test(n)&&Q(a).toLowerCase().indexOf(n)===-1){var i=t.pyc.s.indexOf(n);if(i!==-1)for(var s=0;s<n.length;s++)r[t.pyc.map[i+s]]=1}})),Ee(a,r,!0)}function Ee(t,e,a){var r=t.length;if(a&&t.length>6)for(r=t.length-2;r>0&&xe.test(t[r]);)r--;function n(s,l){for(var o="",u=s;u<l;){for(var f=!!e[u],d=u;d<l&&!!e[d]===f;)d++;var p=T(t.slice(u,d));o+=f?"<mark>"+p+"</mark>":p,u=d}return o}var i=n(0,r);return r<t.length&&(i+='<span class="nobr">'+n(r,t.length)+"</span>"),i}function zt(t,e,a){var r=tt(t).replace(/\n+/g," ");a=a||64;var n=new Array(r.length),i=jt(r,e,n),s=0;if(i){for(var l=0;l<n.length;l++)if(n[l]){s=Math.max(0,l-14);break}}var o=Math.min(r.length,s+a);return o-s<a&&(s=Math.max(0,o-a)),{html:(s>0?"…":"")+Ee(r.slice(s,o),n.slice(s,o),!1)+(o<r.length?"…":""),hit:i}}function Ma(t){var e=Q(String(t||"")).toLowerCase().replace(/[\s ,,、]+/g," ").trim();if(!e)return[];var a={};return e.split(" ").filter(function(r){return!r||a[r]?!1:(a[r]=1,!0)})}var Yt={title:100,plain:30,cost:12,benefit:8,note:6},Ae=["title","plain","cost","benefit","note"];function La(t,e){for(var a=0,r=null,n=0;n<e.length;n++){for(var i=e[n],s=0,l=null,o=0;o<Ae.length;o++){var u=Ae[o],f=t.lc[u].indexOf(i);if(f!==-1){var d=Yt[u];u==="title"&&f===0&&(d+=20),d>s&&(s=d,l=u),a+=d*.05}}if(/^[a-z]{2,}$/.test(i)&&t.pyc.s.indexOf(i)!==-1){var p=t.pyc.s.indexOf(i)===0?70:60;p>s&&(s=p,l="title")}if(!s)return null;a+=s,(!r||Yt[l]>Yt[r])&&(r=l)}return{score:a,where:r}}function Ha(t,e){return!(e.best&&!t.best||e.free&&!t.free||K(e.ev)&&!e.ev[t.ev]||K(e.kinds)&&!e.kinds[t.kind]||K(e.secs)&&!e.secs[t.sec])}function K(t){for(var e in t)if(t[e])return!0;return!1}function qt(t,e){for(var a=Ma(t),r=[],n=0;n<H.length;n++){var i=H[n];if(Ha(i,e)){if(!a.length){r.push({it:i,score:0,where:null});continue}var s=La(i,a);s&&r.push({it:i,score:s.score,where:s.where})}}return a.length&&r.sort(function(l,o){return o.score-l.score||l.it.i-o.it.i}),{terms:a,list:r}}var Ca=9460,ct="htlb_";function He(){var t=window.xhs;return t&&t.miniTool||null}function Me(t){var e=t&&t.miniToolEnv;return Number(e&&e.buildVersion)||0}function At(t,e){return new Promise(function(a,r){var n=!1,i=setTimeout(function(){n||(n=!0,r(new Error("timeout")))},e);Promise.resolve(t).then(function(s){n||(n=!0,clearTimeout(i),a(s))},function(s){n||(n=!0,clearTimeout(i),r(s))})})}var xt=null;function Ia(){return xt||(xt=async function(){try{var t=window.xhs,e=Me(t&&t.launchOptions);if(e)return e;var a=He();if(!a||typeof a.getLaunchOptions!="function")return 0;var r=await At(a.getLaunchOptions(),1500);return Me(r)}catch(n){return 0}}(),xt)}async function Ce(t){var e=He();if(!e||typeof e[t]!="function")return null;var a=await Ia();return Math.floor(a/1e3)<Ca?null:e}function Gt(t){try{return window.localStorage?window.localStorage.getItem(ct+t):null}catch(e){return null}}function Le(t,e){try{return window.localStorage?(window.localStorage.setItem(ct+t,e),!0):!1}catch(a){return!1}}function Et(t){if(typeof t!="string"||!t)return null;try{return JSON.parse(t)}catch(e){return null}}async function Wt(t,e){var a;try{a=JSON.stringify(e)}catch(n){return!1}if(typeof a!="string")return!1;var r=null;try{r=await Ce("setStorage")}catch(n){r=null}if(r)try{return await At(r.setStorage({key:ct+t,data:a}),3e3),!0}catch(n){return Le(t,a)}return Le(t,a)}async function $t(t){var e=null;try{e=await Ce("getStorage")}catch(i){e=null}if(e)try{var a=await At(e.getStorage({key:ct+t}),3e3),r=Et(a&&a.data);if(r!==null)return r;var n=Et(Gt(t));if(n!==null)try{await At(e.setStorage({key:ct+t,data:JSON.stringify(n)}),3e3)}catch(i){}return n}catch(i){return Et(Gt(t))}return Et(Gt(t))}var V=1080,et=1440,Ie="#F6F1E7",j="#17171B",Ne="#FF2442",Kt="#E0002A",Be="#0B7A57",Na="#FFD43B",dt="#FFFFFF",vt='-apple-system, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif',Vt='"SFMono-Regular", Menlo, "Roboto Mono", "Courier New", monospace';function _(t){return"rgba(23,23,27,"+t+")"}function x(t,e,a){return t+" "+Math.round(e)+"px "+(a||vt)}var Oe=/[,。、;:?!)」』》〉】%…—·,.;:?!)\]]/,Ba=/[(「『《〈【(\[“‘]/;function ft(t,e,a){for(var r=e.match(/[A-Za-z0-9][A-Za-z0-9.%+\-/:_]*\s?|\s+|[\s\S]/g)||[],n=[],i="",s=0,l=0;l<r.length;l++){var o=r[l],u=t.measureText(o).width;if(i&&s+u>a){if(Oe.test(o.charAt(0))){i+=o,s+=u;continue}if(i.length>1&&Ba.test(i.charAt(i.length-1))){var f=i.charAt(i.length-1);n.push(i.slice(0,-1)),i=f+o,s=t.measureText(i).width;continue}n.push(i.replace(/\s+$/,"")),i=o.replace(/^\s+/,""),s=t.measureText(i).width}else i+=o,s+=u}i&&n.push(i);var d=n.length;if(d>1&&n[d-1].replace(/[,。、;:?!)」』》]/g,"").length<=1&&n[d-2].length>3){var p=n[d-2],g=p.length-1;Oe.test(p.charAt(g))&&g>1&&g--,n[d-1]=p.slice(g)+n[d-1],n[d-2]=p.slice(0,g)}return n}function ut(t,e,a,r){if(e.length<=a)return e;for(var n=e.slice(0,a),i=n[a-1];i&&t.measureText(i+"…").width>r;)i=i.slice(0,-1);return n[a-1]=i.replace(/[,。、;:]$/,"")+"…",n}function Ut(t,e,a,r,n,i){t.beginPath(),t.moveTo(e+i,a),t.lineTo(e+r-i,a),t.arcTo(e+r,a,e+r,a+i,i),t.lineTo(e+r,a+n-i),t.arcTo(e+r,a+n,e+r-i,a+n,i),t.lineTo(e+i,a+n),t.arcTo(e,a+n,e,a+n-i,i),t.lineTo(e,a+i),t.arcTo(e,a,e+i,a,i),t.closePath()}function Xt(t,e,a,r){t.save(),t.strokeStyle=_(.28),t.lineWidth=3,t.setLineDash([12,10]),t.beginPath(),t.moveTo(e,r),t.lineTo(a,r),t.stroke(),t.restore()}function Oa(t,e,a){var r=document.createElement("canvas");r.width=e,r.height=e;var n=r.getContext("2d"),i=e/2-e*.04,s=e/2;n.strokeStyle=Ne,n.fillStyle=Ne,n.lineWidth=e*.045,n.beginPath(),n.arc(s,s,i-n.lineWidth/2,0,Math.PI*2),n.stroke(),n.lineWidth=e*.016,n.beginPath(),n.arc(s,s,i*.8,0,Math.PI*2),n.stroke(),n.textAlign="center",n.textBaseline="middle",n.font=x(900,e*.46,vt),n.fillText(t,s,s+e*.02),n.font=x(800,e*.1,vt),n.fillText("证 据",s,s-e*.29),n.fillText("等 级",s,s+e*.3);var l=st(a);n.globalCompositeOperation="destination-out";for(var o=0;o<260;o++){var u=l()*Math.PI*2,f=Math.sqrt(l())*i,d=l()*e*.012+e*.003;n.globalAlpha=.35+l()*.65,n.beginPath(),n.arc(s+Math.cos(u)*f,s+Math.sin(u)*f,d,0,Math.PI*2),n.fill()}n.globalAlpha=.5,n.lineWidth=e*.05,n.beginPath();var p=l()*Math.PI*2;return n.arc(s,s,i-e*.02,p,p+.5),n.stroke(),r}function _a(t,e,a,r,n,i){var s=st(i),l=e;for(t.fillStyle=j;l<e+r;){var o=[3,3,5,8][Math.floor(s()*4)];if(l+o>e+r)break;s()>.32&&t.fillRect(l,a,o,n),l+=o+[3,4,6][Math.floor(s()*3)]}}function _e(t,e,a,r,n){t.save(),t.font=x(800,n.size,vt);var i=t.measureText(r).width,s=n.size*.75,l=n.size*1.9,o=i+s*2;return t.translate(e+o/2,a+l/2),t.rotate((n.rot||0)*Math.PI/180),t.shadowColor=_(.14),t.shadowBlur=14,t.shadowOffsetY=4,t.fillStyle=dt,Ut(t,-o/2-6,-l/2-6,o+12,l+12,(l+12)/2),t.fill(),t.shadowColor="transparent",t.fillStyle=n.bg,Ut(t,-o/2,-l/2,o,l,l/2),t.fill(),n.border&&(t.strokeStyle=n.border,t.lineWidth=2,t.stroke()),t.fillStyle=n.fg,t.textAlign="center",t.textBaseline="middle",t.fillText(r,0,1),t.restore(),o+12}function Ra(t,e,a){return t.font=x(800,a,vt),t.measureText(e).width+a*1.5+12}var m={areaTop:170,areaBottom:et-118,padTop:54,headLine:44,secLine:40,cutGap:38,titleLH:1.32,afterTitle:22,tagRow:50,afterTags:24,bodyLH:1.6,rowGap:22,evRow:76,afterEv:14,barGap:24,barH:46,padBottom:40},Re=m.padTop+m.headLine+m.secLine+m.cutGap+m.afterTitle+m.tagRow+m.afterTags+m.cutGap+m.rowGap*2+m.evRow+m.afterEv+m.barGap+m.barH+m.padBottom;function Pe(t,e){var a=document.createElement("canvas");a.width=V,a.height=et;var r=a.getContext("2d"),n=Z(t.id);r.fillStyle=Ie,r.fillRect(0,0,V,et),r.fillStyle=_(.07);for(var i=30;i<et;i+=40)for(var s=30;s<V;s+=40)r.fillRect(s,i,3,3);_e(r,80,58,"高性价比人生",{size:34,bg:Kt,fg:dt,rot:-4}),r.fillStyle=_(.62),r.font=x(700,28,Vt),r.textAlign="right",r.textBaseline="middle",r.fillText(e.date||"",V-92,98),r.textAlign="left";var l=84,o=V-l*2,u=62,f=l+u,d=o-u*2,p=112,g=d-p,M=tt(t.cost),y=tt(t.plain),R=D[t.sec],k=m.areaBottom-m.areaTop,v=null,L;for(L=1;L>=.78&&(v=Fe(r,t,L,d,g,M,y,0),!(v.h<=k));L-=.04);v.h>k&&(v=Fe(r,t,.78,d,g,M,y,k));try{window.__htlbShareFit={h:Math.round(v.h),avail:k,scale:Math.round(v.s*100)/100,clamped:!!v.clamped}}catch(C){}var S=m.areaTop+Math.max(0,Math.floor((k-v.h)/2)),w=S+v.h;r.save(),r.shadowColor=_(.16),r.shadowBlur=40,r.shadowOffsetY=14,r.fillStyle=dt,r.beginPath(),r.moveTo(l,S+18),r.arcTo(l,S,l+18,S,18),r.lineTo(l+o-18,S),r.arcTo(l+o,S,l+o,S+18,18),r.lineTo(l+o,w);for(var A=Math.floor(o/24),B=o/A,F=A-1;F>=0;F--)r.lineTo(l+F*B+B/2,w+16),r.lineTo(l+F*B,w);r.closePath(),r.fill(),r.restore(),r.textBaseline="alphabetic";var b=S+m.padTop;r.fillStyle=j,r.font=x(900,36),r.fillText(I(t),f,b+32),r.textAlign="right",r.fillStyle=_(.55),r.font=x(700,28,Vt),r.fillText("No."+W(t),f+d,b+30),r.textAlign="left",b+=m.headLine,r.fillStyle=_(.62),r.font=x(500,27);var gt=ut(r,ft(r,R?R.title:"",d),1,d)[0]||"";r.fillText(gt,f,b+28),b+=m.secLine,Xt(r,f,f+d,b),r.fillStyle=Ie,r.beginPath(),r.arc(l,b,18,0,Math.PI*2),r.arc(l+o,b,18,0,Math.PI*2),r.fill(),b+=m.cutGap;var it=v.titleSize*m.titleLH;r.font=x(900,v.titleSize);var yt=v.title.length-1,P=r.measureText(v.title[yt]||"").width,va=b+v.titleSize*.98+yt*it;r.fillStyle=Na,Ut(r,f-8,va-v.titleSize*.36,P+16,v.titleSize*.46,8),r.fill(),r.fillStyle=j,v.title.forEach(function(C,z){r.fillText(C,f,b+v.titleSize*.98+z*it)}),b+=v.titleH+m.afterTitle;var se=f;v.tags.forEach(function(C){_e(r,se,b+2,C.t,C.best?{size:24,bg:Kt,fg:dt,rot:-2}:{size:24,bg:dt,fg:C.on?Be:j,border:C.on?"rgba(11,122,87,0.4)":_(.18),rot:0}),se+=C.w+8}),b+=m.tagRow+m.afterTags,Xt(r,f,f+d,b),b+=m.cutGap;function Nt(C,z,ga){r.font=x(900,30),r.fillStyle=z,r.fillText(C,f,ga)}var pa=v.bodySize*m.bodyLH;Nt("花掉",j,b+v.bodySize*1.02),r.fillStyle=j,r.font=x(500,v.bodySize),v.cost.forEach(function(C,z){r.fillText(C,f+p,b+v.bodySize*1.02+z*pa)}),b+=v.costH+m.rowGap;var ha=v.saySize*m.bodyLH;Nt("换回",Be,b+v.saySize*1.02),r.fillStyle=j,r.font=x(700,v.saySize),v.say.forEach(function(C,z){r.fillText(C,f+p,b+v.saySize*1.02+z*ha)}),b+=v.sayH+m.rowGap,Nt("证据",Kt,b+36),r.fillStyle=j,r.font=x(900,36);var le=(t.ev||"–")+" 级";if(r.fillText(le,f+p,b+36),t.evExtra){var oe=r.measureText(le).width,ce=g-oe-200;r.font=x(500,26),r.fillStyle=_(.62),r.fillText(ut(r,ft(r,t.evExtra,ce),1,ce)[0],f+p+oe+14,b+34)}var ba=b;if(b+=m.evRow+m.afterEv,Xt(r,f,f+d,b),b+=m.barGap,_a(r,f,b,d*.5,m.barH,n),r.fillStyle=_(.55),r.font=x(700,22,Vt),r.fillText("HTLB·"+W(t),f+d*.5+24,b+18),r.fillText(e.date||"",f+d*.5+24,b+46),t.ev){var wt=168,ma=Oa(t.ev,wt,n);r.save(),r.globalAlpha=.92,r.translate(f+d-wt/2+4,ba+46),r.rotate((-8-n%9)*Math.PI/180),r.drawImage(ma,-wt/2,-wt/2),r.restore()}return r.textAlign="center",r.fillStyle=_(.8),r.font=x(800,30),r.fillText("高性价比人生 · 出自《高性价比人生指南》CC BY 4.0",V/2,et-70),r.fillStyle=_(.55),r.font=x(500,22),r.fillText("github.com/eternity4719/HowToLiveBetter · 内容可能过时,以当地部门、医生、律师为准",V/2,et-32),r.textAlign="left",a}function Fe(t,e,a,r,n,i,s,l){var o=Math.round(64*a);t.font=x(900,o);var u=ft(t,e.title,r),f=Math.round(32*a);t.font=x(500,f);var d=ft(t,i,n),p=Math.round(34*a);t.font=x(700,p);var g=ft(t,s,n),M=f*m.bodyLH,y=p*m.bodyLH,R=o*m.titleLH,k=!1;if(l){t.font=x(900,o),u.length>3&&(u=ut(t,u,3,r),k=!0);var v=l-Re-u.length*R,L=Math.max(2,Math.floor((v-2*M)/y)),S=Math.min(g.length,L,Math.max(2,Math.floor(v*.6/y))),w=Math.min(d.length,Math.max(2,Math.floor((v-S*y)/M)));w===d.length&&(S=Math.min(g.length,Math.max(2,Math.floor((v-w*M)/y)))),(S<g.length||w<d.length)&&(k=!0),t.font=x(500,f),d=ut(t,d,w,n),t.font=x(700,p),g=ut(t,g,S,n)}var A=[];e.best&&A.push({t:"性价比极高",best:!0}),ot(e).forEach(function(P){A.push({t:P.t,best:!1,on:P.on})});var B=[],F=0;A.forEach(function(P){P.w=Ra(t,P.t,24),F+P.w<=r&&(B.push(P),F+=P.w+8)});var b=u.length*R,gt=d.length*M,it=g.length*y,yt=Re+b+gt+it;return{s:a,h:yt,title:u,titleSize:o,titleH:b,bodySize:f,cost:d,costH:gt,saySize:p,say:g,sayH:it,tags:B,clamped:k}}function De(t){var e=Array.from(t.title);return e.length<=20?t.title:e.slice(0,19).join("")+"…"}function je(t){var e=[t.title,"","花掉:"+tt(t.cost),"换回:"+tt(t.plain),"证据:"+(t.evRaw||"–")+" 级","","来自小工具「高性价比人生」,出自《高性价比人生指南》"+I(t).replace(/ · /,"")+"(CC BY 4.0,github.com/eternity4719/HowToLiveBetter)。书里内容可能过时,各地执行不一,真去办事、看病、打官司以当地部门、医生、律师为准。","","#高性价比人生 #高性价比人生指南 #人生建议 #生活常识 #健康急救 #防骗指南 #理财避坑 #时间管理 #开源阅读 #安全意识 #自我提升 #证据思维"],a=e.join(`
|
| 2 |
-
`),r=Array.from(a);return r.length>1e3&&(a=r.slice(0,999).join("")+"…"),a}var Fa=Date.now(),Pa=window.performance&&performance.now?Math.round(performance.now()):0,J=ue(),Xe=["担保","借钱","被骗","体检","保险","租房","急救","加班","彩礼","二次验证"],Ue=["死亡率","金钱","自由","时间"],ze=["today","all","toc","fav"],Mt=fe(),c={tab:"today",q:"",terms:[],fl:Jt(),favs:[],favSet:{},pool:"best",curId:"",drawn:[],scroll:{today:0,all:0,toc:0,fav:0},allBuilt:!1,tocBuilt:!1,favDirty:!0};function Jt(){return{secs:{},ev:{},free:!1,best:!1,kinds:{}}}function E(t,e){return'<svg class="ic'+(e?" "+e:"")+'" aria-hidden="true"><use href="#'+t+'"></use></svg>'}function Ye(t){return-6-Z(t)%11}function ee(t,e){return t.ev?'<span class="stamp-wrap'+(e?" "+e:"")+'" style="-webkit-transform:rotate('+Ye(t.id)+"deg);transform:rotate("+Ye(t.id)+'deg)">'+Je(t.ev)+"</span>":""}function Je(t){return'<svg class="stamp" viewBox="0 0 100 100" role="img" aria-label="证据 '+t+' 级"><g mask="url(#mottle)" fill="none" stroke="currentColor"><circle cx="50" cy="50" r="45" stroke-width="5"></circle><circle cx="50" cy="50" r="36.5" stroke-width="1.6"></circle><text class="st-letter" x="50" y="66" font-size="44" text-anchor="middle" stroke="none">'+t+'</text><text class="st-small" x="50" y="29" font-size="10" text-anchor="middle" stroke="none">证据</text><text class="st-small" x="50" y="80" font-size="10" text-anchor="middle" stroke="none">等级</text></g></svg>'}function Ze(t){for(var e=st(Z(t.id)^2654435769),a=0,r="";a<150;){var n=[1.5,1.5,2.5,4][Math.floor(e()*4)];if(a+n>150)break;e()>.3&&(r+='<rect x="'+a.toFixed(1)+'" y="0" width="'+n+'" height="30"></rect>'),a+=n+[1.5,2,3][Math.floor(e()*3)]}return'<svg class="barcode" viewBox="0 0 150 30" preserveAspectRatio="none" aria-hidden="true" fill="currentColor">'+r+"</svg>"}function Qe(t){var e="";return t.best&&(e+='<span class="tag best">性价比极高</span>'),ot(t).forEach(function(a){e+='<span class="tag'+(a.on?" on":"")+'">'+T(a.t)+"</span>"}),'<div class="tags">'+e+"</div>"}function Da(t,e){var a=!!c.favSet[t.id];return'<button class="fav-btn'+(a?" is-on":"")+(e?" "+e:"")+'" type="button" data-act="fav" data-id="'+t.id+'" aria-pressed="'+a+'" aria-label="'+(a?"取消收藏":"收藏")+'">'+E(a?"i-heart-f":"i-heart")+"</button>"}function ta(t,e,a){var r={sec:t.sec,refs:e,terms:a};return'<dl class="t-rows"><div class="t-row"><dt class="lb-cost">花掉</dt><dd class="rich">'+$(t.cost,r)+'</dd></div><div class="t-row say"><dt class="lb-gain">换回</dt><dd class="rich">'+$(t.plain,r)+'</dd></div><div class="t-row ev"><dt class="lb-ev">证据</dt><dd><span class="ev-grade">'+(t.ev?t.ev+" 级":T(t.evRaw||"未标注"))+"</span>"+(t.evExtra?'<span class="ev-extra">'+T(t.evExtra)+"</span>":"")+(e&&t.ev?'<p class="ev-note">'+T(Ft[t.ev])+"</p>":"")+"</dd>"+ee(t,"stamp-in")+"</div></dl>"}function ja(t){var e=D[t.sec];return'<div class="ticket-wrap"><article class="ticket big" data-act="open" data-id="'+t.id+'" role="button" tabindex="0" aria-label="'+T(I(t)+":"+t.title+",点开看全文")+'"><div class="t-pad"><div class="t-head"><span class="t-no">'+I(t)+'</span><span class="t-serial mono">No.'+W(t)+'</span></div><div class="t-sec">'+T(e?e.title:"")+'</div></div><div class="t-cut"></div><div class="t-pad" style="padding-top:0"><h2 class="t-title">'+kt(t)+"</h2>"+Qe(t)+'</div><div class="t-cut" style="margin-top:6px"></div>'+ta(t,!1)+'<div class="t-cut" style="margin-top:4px"></div><div class="t-foot">'+Ze(t)+'<span class="t-more">点开看全文'+E("i-right")+"</span></div></article></div>"}var qe={cost:"花掉",benefit:"收益",note:"备注"};function ae(t,e,a,r){var n=D[t.sec],i,s="换回",l=!1;if(e&&e.length&&a&&qe[a]){var o=a==="cost"?t.cost:a==="benefit"?t.benefit:t.note;i=zt(o,e,70).html,s=qe[a],l=!0}else i=zt(t.plain,e,90).html;var u=ot(t).slice(0,4).map(function(d){return d.on?'<span class="on">'+T(d.t)+"</span>":T(d.t)}).join(" · "),f=r!==void 0&&r<8&&!J?' rise" style="-webkit-animation-delay:'+r*28+"ms;animation-delay:"+r*28+"ms":"";return'<article class="card'+f+'" data-act="open" data-id="'+t.id+'" role="button" tabindex="0"><div class="c-head"><span class="c-no">'+I(t)+'</span><span class="c-sec">'+T(n?n.title:"")+"</span>"+(t.best?'<span class="c-best">性价比极高</span>':"")+'</div><div class="c-cut"></div><div class="c-body"><h3 class="c-title">'+kt(t,e)+'</h3><p class="c-snip"><span class="lb'+(l?" other":"")+'">'+s+"</span>"+i+'</p></div><div class="c-foot"><span class="c-tags">'+u+"</span>"+Da(t)+"</div>"+ee(t)+"</article>"}var at=typeof WeakMap=="function"?new WeakMap:null;function re(t,e,a,r){var n=at&&at.get(t);n&&n.stop(),t.innerHTML="";var i=0,s=null,l=0,o=document.createElement("div");o.className="sentinel";var u=!1;function f(g){if(!u){for(var M=Math.min(e.length,i+g),y="";i<M;i++)y+=a(e[i],i);y&&t.insertAdjacentHTML("beforeend",y),i>=e.length&&d()}}function d(){s&&s.disconnect(),o.parentNode&&o.parentNode.removeChild(o),r&&e.length>6&&t.insertAdjacentHTML("beforeend",'<div class="list-end">'+r+"</div>"),u=!0}f(14),u||(t.appendChild(o),"IntersectionObserver"in window?(s=new IntersectionObserver(function(g){for(var M=0;M<g.length;M++)if(g[M].isIntersecting){f(30),u||t.appendChild(o);break}},{rootMargin:"800px 0px"}),s.observe(o)):function g(){f(40),u||(l=setTimeout(g,60))}());var p={stop:function(){u=!0,s&&s.disconnect(),clearTimeout(l)}};return at&&at.set(t,p),p}function ne(){return c.pool==="all"?H:Tt}function rt(){var t=ne();return t[Z("htlb|"+Mt.key+"|"+c.pool)%t.length]}function ht(t){var e=O[c.curId]||rt();c.curId=e.id;var a=e.id===rt().id&&!c.drawn.length,r=D[e.sec],n=h("#view-today"),i=ne(),s='<div class="hero"><div class="hero-row"><div class="hero-l"><div class="hero-date"><span class="mono">'+Mt.dot+"</span>"+Mt.week+'</div><h1 class="hero-title">'+(a?'今日<span class="hl">一条</span>':'再抽<span class="hl">一张</span>')+'</h1></div><div class="seg" role="radiogroup" aria-label="从哪里抽"><button type="button" role="radio" data-act="pool" data-v="best" aria-checked="'+(c.pool==="best")+'">精选 '+Tt.length+'</button><button type="button" role="radio" data-act="pool" data-v="all" aria-checked="'+(c.pool==="all")+'">全部 '+H.length+'</button></div></div><p class="hero-sub">'+(c.pool==="best"?"从「性价比极高」的 "+i.length+" 条里抽:不花钱、费时少、不靠毅力、收益大":"从全书 "+i.length+" 条建议里抽,什么都可能抽到")+'</p></div><div class="printer" aria-hidden="true"></div><div class="print-window" id="print-window">'+ja(e)+'</div><div class="today-actions"><button class="btn btn-primary" type="button" data-act="redraw">'+E("i-dice")+'再抽一张</button><button class="btn btn-ghost'+(c.favSet[e.id]?" is-on":"")+'" type="button" data-act="fav" data-id="'+e.id+'" aria-pressed="'+!!c.favSet[e.id]+'" aria-label="'+(c.favSet[e.id]?"取消收藏":"收藏")+'">'+E(c.favSet[e.id]?"i-heart-f":"i-heart")+'<span class="lbl">'+(c.favSet[e.id]?"已收藏":"收藏")+'</span></button><button class="btn btn-ghost" type="button" data-act="share" data-id="'+e.id+'" aria-label="生成分享图">'+E("i-share")+'<span class="lbl">分享图</span></button></div><div class="today-meta">'+(a?'<span class="draw-count">今天打开都是这一张</span>':'<button class="link-btn" type="button" data-act="back-today">'+E("i-back","ic-s")+" 回到今日这张</button>")+'<button class="link-btn muted" type="button" data-act="sec" data-sec="'+e.sec+'">第 '+e.sec+" 节共 "+(r?r.items.length:0)+" 条"+E("i-right")+"</button></div>"+pdfCard()+ea();n.innerHTML=s;var l=h("#print-window");t==="print"&&!J?(l.className="print-window is-printing",h(".ticket-wrap",l).className+=" late-stamp",setTimeout(function(){l.className="print-window"},700)):t==="rise"&&!J&&(h(".ticket-wrap",l).className+=" rise")}function ea(){return'<footer class="foot"><p><b>出处</b> 开源书《高性价比人生指南》,作者 eternity4719,github.com/eternity4719/HowToLiveBetter。正文按 CC BY 4.0 许可,本工具原样收录 '+H.length+' 条,未改写原文。</p><p><b>免责</b> 书里的内容可能过时,也可能有错,不少政策各地执行不一样。真去办事、看病、打官司时,以当地部门、医生和律师的说法为准。</p><p><b>声明</b> 本书项目从未发行、也不会发行任何代币或数字资产。用它名字发的币都和它无关,看到请当作骗局。</p><button class="link-btn" type="button" data-act="about">关于、许可与证据等级'+E("i-right")+"</button></footer>"}function za(){buzz();var t=ne(),e={};e[c.curId]=1,c.drawn.forEach(function(n){e[n]=1});var a=t.filter(function(n){return!e[n.id]});a.length||(c.drawn=[],a=t.filter(function(n){return n.id!==c.curId}));var r=a[Math.floor(Math.random()*a.length)];c.drawn.push(c.curId),c.curId=r.id,ht("print")}function Ya(){var t=h("#view-all"),e='<button class="chip" type="button" data-act="secpick" id="chip-sec"><span class="chip-in">选节'+E("i-down")+'</span></button><span class="chip-sep"></span><button class="chip red" type="button" data-act="chip" data-f="best"><span class="chip-in">性价比极高</span></button><button class="chip" type="button" data-act="chip" data-f="free"><span class="chip-in">不花钱</span></button><span class="chip-sep"></span><span class="chip-cap">证据</span>'+["A","B","C"].map(function(a){return'<button class="chip" type="button" data-act="chip" data-f="ev" data-v="'+a+'" aria-label="证据 '+a+' 级"><span class="chip-in">'+a+" 级</span></button>"}).join("")+'<span class="chip-sep"></span><span class="chip-cap">换回</span>'+Ue.map(function(a){return'<button class="chip" type="button" data-act="chip" data-f="kinds" data-v="'+a+'"><span class="chip-in">'+a+"</span></button>"}).join("");t.innerHTML='<div class="fbar" id="fbar"><div class="chips" id="chips">'+e+'</div><div class="countbar"><span class="count" id="count"></span><button class="clear-btn" type="button" data-act="clear" id="clear-btn" hidden>清空筛选</button></div></div><div class="hot" id="hot"><p class="hot-cap">大家常搜</p><div class="hot-list">'+aa()+'</div></div><div class="list" id="all-list"></div>',c.allBuilt=!0}function aa(t){return(t||Xe).map(function(e){return'<button class="hot-chip" type="button" data-act="hot" data-v="'+T(e)+'"><span>'+T(e)+"</span></button>"}).join("")}function qa(){var t=c.fl,e=[],a=Object.keys(t.secs).filter(function(i){return t.secs[i]});a.length===1?e.push("第 "+a[0]+" 节"):a.length>1&&e.push(a.length+" 个节"),t.best&&e.push("性价比极高"),t.free&&e.push("不花钱");var r=["A","B","C"].filter(function(i){return t.ev[i]});r.length&&e.push(r.join("/")+" 级");var n=Ue.filter(function(i){return t.kinds[i]});return n.length&&e.push("换回"+n.join("/")),e}function pt(){var t=c.fl;return t.best||t.free||K(t.ev)||K(t.kinds)||K(t.secs)}function X(){c.allBuilt||Ya();var t=c.fl;Y('#chips [data-act="chip"]').forEach(function(f){var d=f.getAttribute("data-f"),p=f.getAttribute("data-v"),g=p?!!t[d][p]:!!t[d];f.className="chip"+(d==="best"?" red":"")+(g?" on":""),f.setAttribute("aria-pressed",g)});var e=Object.keys(t.secs).filter(function(f){return t.secs[f]}),a=h("#chip-sec");a.className="chip"+(e.length?" on":""),h(".chip-in",a).innerHTML=(e.length===1?"第 "+e[0]+" 节":e.length?e.length+" 个节":"选节")+E("i-down");var r=qt(c.q,t);c.terms=r.terms;var n=r.list.length,i=qa(),s=r.terms.length?"找到<b>"+n+"</b>条":pt()?"筛出<b>"+n+"</b>条":"全书<b>"+n+"</b>条";i.length&&(s+=" · "+T(i.join(" · "))),h("#count").innerHTML=s,h("#clear-btn").hidden=!pt(),h("#hot").style.display=r.terms.length||pt()?"none":"";var l=h("#all-list");if(!n){var o=at&&at.get(l);o&&o.stop(),l.innerHTML=Ga(r.terms);return}var u=r.terms;re(l,r.list,function(f,d){return ae(f.it,u,f.where,d)},"— 到底了 · 共 "+n+" 条 —")}function Ga(t){var e=t.join(" "),a=Xe.filter(function(r){return t.indexOf(r)===-1}).slice(0,6);return'<div class="empty fade"><div class="empty-ticket"><i></i><i></i><i></i>'+ee({id:"empty",ev:"无"})+"</div><h3>"+(e?"没找到和「"+T(e)+"」有关的小票":"这样筛下来,一条也没有")+"</h3><p>"+(e?(t.length>1?"多个词要同时命中,试试少输一个词,或":"换个说法试试,或")+"用拼音首字母(比如 aqd)":"少选几个条件试试")+(pt()?";也可能是筛选条件太多了":"")+'</p><div class="hot-list">'+aa(a)+"</div>"+(pt()||e?'<button class="btn btn-line btn-sm" type="button" data-act="clear-all">清空搜索和筛选</button>':"")+"</div>"}function Wa(t,e){e?c.fl[t][e]=!c.fl[t][e]:c.fl[t]=!c.fl[t],X(),Lt()}function Lt(){var t=h("#fbar");if(t){var e=t.getBoundingClientRect().top+window.pageYOffset-fa();window.pageYOffset>e&&window.scrollTo(0,Math.max(0,e-4))}}function $a(){var t=h("#view-toc"),e=G.map(function(a){return'<button class="toc-row" type="button" data-act="sec" data-sec="'+a.sec+'"><span class="toc-num">'+(a.sec<10?"0":"")+a.sec+'</span><span class="toc-txt"><span class="toc-title" style="display:block">'+T(a.title)+'</span><span class="toc-meta" style="display:block">'+a.items.length+" 条"+(a.best?' · <span class="r">性价比极高 '+a.best+" 条</span>":"")+"</span></span>"+E("i-right")+"</button>"}).join("");t.innerHTML='<div class="view-head"><div><h1 class="view-title">目录</h1><p class="view-sub">'+G.length+" 节 · "+H.length+' 条建议</p></div></div><div class="toc">'+e+"</div>"+ea(),c.tocBuilt=!0}function ra(){var t=h("#view-fav"),e=c.favs.map(function(r){return O[r]}).filter(Boolean),a='<div class="view-head"><div><h1 class="view-title">收藏</h1><p class="view-sub">'+(e.length?"已收 "+e.length+" 张小票,按收藏时间排":"收藏只存在这台手机上")+"</p></div></div>";e.length?(t.innerHTML=a+'<div class="list" id="fav-list"></div>',re(h("#fav-list"),e,function(r,n){return ae(r,null,null,n)},"— 共 "+e.length+" 张 —")):t.innerHTML=a+'<div class="empty fade"><div class="empty-ticket"><i></i><i></i><i></i></div><h3>还没有收藏的小票</h3><p>看到有用的,点小票上的心形就能存下来。</p><button class="btn btn-primary btn-sm" type="button" data-act="tab" data-tab="today" style="flex:none;margin-top:16px">去抽一张</button></div>',c.favDirty=!1}function na(){var t=h("#fav-badge");t.textContent=c.favs.length>99?"99+":String(c.favs.length),t.hidden=!c.favs.length}function ia(t,e){var a=!!c.favSet[t];Y('[data-act="fav"][data-id="'+t+'"]').forEach(function(r){var n=r.classList.contains("btn"),i=r.className.replace(/\s*is-on|\s*pop/g,"");r.className=i+(a?" is-on":"")+(a&&!e&&!J?" pop":""),r.setAttribute("aria-pressed",a),r.setAttribute("aria-label",a?"取消收藏":"收藏");var s=h("use",r);s&&s.setAttribute("href",a?"#i-heart-f":"#i-heart");var l=h(".lbl",r);l&&n&&(l.textContent=a?"已收藏":"收藏")})}var Ka=Bt(function(){Wt("favs",{v:1,ids:c.favs}).then(function(t){t||bt("收藏没存进本机,关掉后可能丢失")})},60);function Va(t){buzz();O[t]&&(c.favSet[t]?(delete c.favSet[t],c.favs=c.favs.filter(function(e){return e!==t}),bt("已取消收藏")):(c.favSet[t]=1,c.favs.unshift(t),bt("已收进���收藏」")),ia(t),na(),c.favDirty=!0,c.tab,Ka())}var N=[];function mt(t,e){e=e||{};var a=h("#layers"),r=60+N.length*3,n=null,i=null;e.drawer&&(n=document.createElement("div"),n.className="scrim",n.style.zIndex=r,a.appendChild(n),i=document.createElement("div"),i.className="scrim-hit",i.style.zIndex=r,i.setAttribute("data-act","close"),i.setAttribute("aria-hidden","true"),a.appendChild(i));var s=document.createElement("div");s.className="sheet"+(e.drawer?" drawer":""),s.style.zIndex=r+1,s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),e.label&&s.setAttribute("aria-label",e.label),a.appendChild(s);var l={kind:t,el:s,scrim:n,hit:i,data:e.data||{}};return N.push(l),document.body.classList.add("is-locked"),e.render&&e.render(l),J?(s.classList.add("on"),n&&n.classList.add("on")):ve(function(){s.classList.add("on"),n&&n.classList.add("on")}),l}function U(t){var e=N.indexOf(t);if(e!==-1){N.splice(e,1),t.el.style.transform="",t.el.style.webkitTransform="",t.el.classList.remove("on"),t.scrim&&t.scrim.classList.remove("on"),t.hit&&t.hit.parentNode&&t.hit.parentNode.removeChild(t.hit);var a=function(){t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.scrim&&t.scrim.parentNode&&t.scrim.parentNode.removeChild(t.scrim)};setTimeout(a,J?0:360),N.length||document.body.classList.remove("is-locked")}}function Ht(){return N[N.length-1]||null}function sa(t){for(var e=N.length-1;e>=0;e--)if(N[e].el.contains(t))return N[e];return null}function ie(t,e){return'<div class="sb"><div class="sb-title">'+t+(e?"<small>"+e+"</small>":"")+"</div></div>"}function la(t,e){return'<div class="sb" data-drag="1"><span class="grip" aria-hidden="true"></span><div class="sb-title">'+t+(e?"<small>"+e+"</small>":"")+"</div></div>"}function oa(t,e){return'<button class="foot-back" type="button" data-act="close" aria-label="'+T(e||"返回")+'">'+E("i-left")+"<span>"+T(t||"返回")+"</span></button>"}function ca(){return'<button class="foot-close" type="button" data-act="close" aria-label="关闭">'+E("i-x")+"<span>关闭</span></button>"}function Xa(){var t=null;document.addEventListener("touchstart",function(a){var r=a.target.closest?a.target.closest("[data-drag]"):null;if(!(!r||!a.touches||a.touches.length!==1)){var n=sa(r);n&&(t={L:n,y0:a.touches[0].clientY,dy:0},n.el.style.transition="none")}},{passive:!0}),document.addEventListener("touchmove",function(a){t&&(t.dy=Math.max(0,a.touches[0].clientY-t.y0),t.L.el.style.transform="translateY("+t.dy+"px)",t.L.el.style.webkitTransform="translateY("+t.dy+"px)")},{passive:!0});function e(){if(t){var a=t.L;a.el.style.transition="",t.dy>90?U(a):(a.el.style.transform="",a.el.style.webkitTransform=""),t=null}}document.addEventListener("touchend",e),document.addEventListener("touchcancel",e)}function Ge(t,e){O[t]&&mt("detail",{label:"建议详情",data:{id:t,hist:[],terms:e||[]},render:Ct})}function Ua(t,e){var a=t.src||[];if(!a.length)return"";var r=3,n=a.map(function(i,s){var l=i[0],o=i[1],u=i[2]||[];return"<li"+(s>=r?' class="src-more" hidden':"")+">"+(l?'<b class="src-a">'+$(l,{terms:e})+"</b>":"")+(o?'<span class="src-t">'+$(o,{terms:e})+"</span>":"")+u.map(function(f){return'<span class="src-u">'+T(f)+"</span>"}).join("")+"</li>"}).join("");return'<section class="d-block"><h2 class="d-cap red">来源 · '+a.length+' 条</h2><ol class="src-list" id="d-src">'+n+"</ol>"+(a.length>r?'<button class="more-btn" type="button" data-act="src-more">展开其余 '+(a.length-r)+" 条来源"+E("i-down")+"</button>":"")+'<p class="ev-note">网址只以文字显示,小工具内不能跳转外部网页。</p></section>'}function Ct(t,e){var a=O[t.data.id],r=D[a.sec],n=t.data.terms,i=t.data.hist,s=St(a,-1),l=St(a,1),o=i.length?O[i[i.length-1].id]:null,u={sec:a.sec,refs:!0,terms:n},f=!!c.favSet[a.id],d=ie(I(a),T(r?r.title:""))+'<div class="sheet-body" id="d-body"><div class="'+(e?"rise":"")+'"><article class="d-ticket"><div class="t-pad"><div class="t-head"><span class="t-no">'+I(a)+'</span><span class="t-serial mono">No.'+W(a)+'</span></div><button class="sec-link" type="button" data-act="sec" data-sec="'+a.sec+'">'+T(r?r.title:"")+E("i-right")+'</button></div><div class="t-cut"></div><div class="t-pad" style="padding-top:0"><h1 class="d-title">'+kt(a,n)+"</h1>"+Qe(a)+'</div><div class="t-cut" style="margin-top:6px"></div>'+ta(a,!0,n)+'<div class="t-cut" style="margin-top:4px"></div>'+(lt.ready?"":'<section class="d-block"><p class="ev-note">正在载入收益原文、备注和来源…</p></section>')+(a.benefit?'<section class="d-block"><h2 class="d-cap gain">收益 · 原文</h2><div class="d-text">'+Dt(a.benefit,u)+"</div></section>":"")+(a.note?'<section class="d-block"><h2 class="d-cap">备注</h2><div class="d-text">'+Dt(a.note,u)+"</div></section>":"")+Ua(a,n)+'<div class="t-foot">'+Ze(a)+'<span class="t-serial mono">HTLB·'+W(a)+'</span></div></article><button class="btn btn-line share-inline" type="button" data-act="share" data-id="'+a.id+'">'+E("i-share")+'生成分享图</button><p class="d-license">原文出自《高性价比人生指南》'+I(a).replace(" · ","")+' · 作者 eternity4719 · CC BY 4.0<br>本工具原样收录,只做排版与互链;内容可能过时,以当地部门、医生、律师为准</p></div></div><div class="dbar"><button class="foot-back" type="button" data-act="d-back" aria-label="'+(o?"返回 "+I(o):"返回")+'">'+E("i-left")+"<span>返回"+(o?"<small>"+o.sec+"-"+o.n+"</small>":"")+'</span></button><button class="pn-btn" type="button" data-act="d-step" data-d="-1" aria-label="上一条'+(s?" "+I(s):"")+'"'+(s?"":" disabled")+">"+E("i-left","ic-s")+'<span>上一条</span></button><button class="pn-btn" type="button" data-act="d-step" data-d="1" aria-label="下一条'+(l?" "+I(l):"")+'"'+(l?"":" disabled")+"><span>下一条</span>"+E("i-right","ic-s")+'</button><button class="fav-btn'+(f?" is-on":"")+'" type="button" data-act="fav" data-id="'+a.id+'" aria-pressed="'+f+'" aria-label="'+(f?"取消收藏":"收藏")+'">'+E(f?"i-heart-f":"i-heart")+"</button></div>";t.el.innerHTML=d}function We(t,e,a){O[e]&&(a&&t.data.hist.push({id:t.data.id,y:h("#d-body",t.el)?h("#d-body",t.el).scrollTop:0}),t.data.id=e,t.data.terms=[],Ct(t,!0))}function Ja(t){var e=t.data.hist.pop();if(!e)return U(t);t.data.id=e.id,Ct(t,!0);var a=h("#d-body",t.el);a&&(a.scrollTop=e.y||0)}function Za(t){var e=D[t];e&&mt("section",{label:"第 "+t+" 节",data:{sec:t},render:function(a){a.el.innerHTML=ie("第 "+t+" 节",e.items.length+" 条")+'<div class="sheet-body"><div class="sec-hero"><div class="sec-big">'+(t<10?"0":"")+t+"<small>/ "+G.length+' 节</small></div><h1 class="sec-title">'+T(e.title)+"</h1>"+(e.intro?'<p class="sec-intro is-clip" id="sec-intro">'+$(e.intro,{sec:t,refs:!1})+'</p><button class="more-btn" type="button" data-act="intro-more">展开导语'+E("i-down")+"</button>":"")+'<div class="sec-stats"><span class="tag">'+e.items.length+" 条</span>"+(e.best?'<span class="tag best">性价比极高 '+e.best+" 条</span>":"")+'</div></div><div class="list" id="sec-list-'+t+'"></div></div><div class="dbar">'+oa("返回","返回上一页")+'<span class="dbar-info">第 '+t+" 节 · "+T(e.title)+"</span></div>",re(h("#sec-list-"+t,a.el),e.items,function(r,n){return ae(r,null,null,n)},"— 第 "+t+" 节完 —")}})}function Qa(){var t={};for(var e in c.fl.secs)c.fl.secs[e]&&(t[e]=1);mt("secpick",{drawer:!0,label:"按节筛选",data:{tmp:t},render:function(a){a.el.innerHTML=la("按节筛选","可多选 · 下拉关闭")+'<div class="sheet-body" style="padding-top:6px"><div class="secgrid">'+G.map(function(r){return'<button class="sec-opt'+(t[r.sec]?" on":"")+'" type="button" data-act="sec-opt" data-sec="'+r.sec+'" aria-pressed="'+!!t[r.sec]+'"><span class="n">'+r.sec+'</span><span class="t">'+T(r.title)+'</span><span class="c">'+r.items.length+"</span></button>"}).join("")+'</div></div><div class="drawer-foot"><button class="btn btn-line" type="button" data-act="sec-reset">不限节</button><button class="btn btn-primary" type="button" data-act="sec-apply" id="sec-apply"></button>'+ca()+"</div>",Zt(a)}})}function Zt(t){var e={};for(var a in c.fl)e[a]=c.fl[a];e.secs=t.data.tmp;var r=qt(c.q,e).list.length,n=h("#sec-apply",t.el);n&&(n.textContent="看 "+r+" 条")}function da(){var t=window.xhs;return t&&t.miniTool||null}var PDF_URL="./高性价比人生指南-765条建议全集.pdf",PDF_NAME="高性价比人生指南-765条建议全集.pdf",pdfBusy=!1,followBusy=!1,followState=null;function buzz(){var t=da();try{t&&typeof t.vibrateShort==="function"&&t.vibrateShort({type:"light"})}catch(e){}}function followed(t){return t===!0||!!(t&&(t.isFollowed===!0||t.followed===!0||t.followStatus==="followed"||t.status==="followed"||t.status===1))}async function getFollow(){var t=da();if(!t||typeof t.getFollowStatus!=="function")return null;try{return followed(await At(t.getFollowStatus(),2500))}catch(e){return!1}}async function ensureFollow(){var t=da();if(!t)return!0;if(followState===!0)return!0;if(typeof t.getFollowStatus!=="function"){bt("当前版本无法确认关注状态,请升级小红书后重试");return!1}var e=await getFollow();if(e){followState=!0;return!0}if(followBusy)return!1;followBusy=!0;bt("关注作者后即可导出 765 条全集");try{if(typeof t.followAuthor!=="function"){bt("请先关注作者,再点击导出");return!1}await At(t.followAuthor(),5000);var a=await getFollow();if(a){followState=!0;bt("已关注,正在准备全集 PDF");return!0}bt("还未检测到关注,请完成关注后再试")}catch(r){bt("请完成关注后再试")}finally{followBusy=!1}return!1}function pdfPath(t){return t||PDF_URL}function pdfCard(){return'<section class="pdf-card"><div><span class="pdf-kicker">全集资料包</span><h2>导出 765 条建议 · PDF</h2><p>311 页 · 34 节 · A4 排版,适合收藏、打印,也可以分享给微信好友。</p></div><button class="btn btn-primary btn-sm" type="button" data-act="pdf">导出全集</button></section>'}function pdfPanel(){var t=mt("pdf",{drawer:!0,label:"导出 765 条建议全集 PDF",render:function(e){e.el.innerHTML=la("765 条建议全集 PDF","A4 · 311 页 · 34 节")+'<div class="sheet-body pdf-body"><div class="pdf-cover"><span class="pdf-count">765</span><b>条建议全集</b><small>《高性价比人生指南》 · CC BY 4.0</small></div><div class="pdf-copy"><h2>把 765 笔人生账带走</h2><p>按原书章节完整收录,适合离线阅读、打印和转发。导出文件前需要先关注作者。</p><ul><li>全书 765 条 · 34 节</li><li>A4 · 311 页 · 含目录与页内跳转</li><li>不会上传收藏、搜索或个人信息</li></ul></div><div class="pdf-status" id="pdf-status">准备好后点击下方按钮</div></div><div class="drawer-foot pdf-foot"><button class="btn btn-ghost" type="button" data-act="pdf-share">分享给微信</button><button class="btn btn-primary" type="button" data-act="pdf-export">关注后导出</button>'+ca()+"</div>"}});return t}function pdfFile(t){return pdfPath(t)}async function exportPdf(){if(pdfBusy)return;buzz();pdfBusy=!0;var t=da(),e=await ensureFollow();if(!e){pdfBusy=!1;return}var a=h("#pdf-status");a&&(a.textContent="正在准备 PDF…");try{var r=await pdfFile(t);if(t&&typeof t.saveFile==="function")await At(t.saveFile({filePath:r}),8000);else if(t&&typeof t.openDocument==="function")await At(t.openDocument({filePath:r}),8000);else if(!t)location.href=PDF_URL;else throw new Error("unsupported");a&&(a.textContent="导出完成,可在文件或微信中分享");bt("765 条建议全集已准备好")}catch(n){a&&(a.textContent="导出失败,请重试");bt("PDF 导出失败,请稍后重试")}finally{pdfBusy=!1}}async function sharePdf(){if(pdfBusy)return;buzz();pdfBusy=!0;var t=da(),e=await ensureFollow();if(!e){pdfBusy=!1;return}try{if(!t){location.href=PDF_URL;bt("已打开 PDF,可用浏览器或微信分享");return}var a=await pdfFile(t);if(typeof t.shareFile==="function")await At(t.shareFile({filePath:a,title:PDF_NAME}),8000);else if(typeof t.share==="function")await At(t.share({title:PDF_NAME,content:"《高性价比人生指南》765 条建议全集 PDF"}),8000);else throw new Error("unsupported");bt("已打开分享面板,可发送给微信好友")}catch(r){bt("当前版本暂不支持文件分享,请先导出 PDF 后分享")}finally{pdfBusy=!1}}function tr(t){buzz();var e=O[t];if(e){var a=da(),r=mt("share",{drawer:!0,label:"分享图",data:{id:t},render:function(n){n.el.innerHTML=la("分享图","1080 × 1440 · 3:4")+'<div class="sheet-body" id="share-body"><div class="printing"><div class="mini-printer"></div><div class="mini-paper"><i></i><i></i><i></i><i></i></div><p>正在打印小票…</p></div></div><div class="drawer-foot" id="share-foot">'+(a?'<button class="btn btn-ghost" type="button" data-act="save-img" disabled>'+E("i-save")+'存到相册</button><button class="btn btn-primary" type="button" data-act="post-note" disabled>'+E("i-pen")+"发成笔记</button>":'<span class="foot-note">长按保存不可用,请在小红书 App 内使用</span>')+ca()+"</div>"}});setTimeout(function(){var n="",i=0,s=0;try{var l=Pe(e,{date:Mt.dot});i=l.width,s=l.height,n=l.toDataURL("image/png")}catch(u){n=""}r.data.url=n;var o=h("#share-body",r.el);if(o){if(!n){o.innerHTML='<div class="empty"><h3>分享图没画出来</h3><p>这台设备的画布不可用,请稍后再试。</p></div>';return}Y("#share-foot [disabled]",r.el).forEach(function(u){u.disabled=!1}),o.innerHTML='<div class="share-stage fade"><img class="share-img" id="share-img" alt="'+T(I(e)+" 分享图")+'" width="'+i+'" height="'+s+'" src="'+n+'"></div>'+(a?'<p class="share-note">图上已注明出处与 CC BY 4.0 许可</p>':'<p class="share-note"><b>长按保存不可用,请在小红书 App 内使用</b><br>在小红书 App 里打开这个小工具,就能一键存到相册或发成笔记。</p>')}},J?0:260)}}async function $e(t,e){var a=da(),r=O[t.data.id];if(!(!a||!t.data.url||!r)){var n=t.data.url;try{if(typeof a.writeTempFile=="function"){var i=await a.writeTempFile({data:t.data.url});i&&i.filePath&&(n=i.filePath)}}catch(s){n=t.data.url}try{if(e==="save"){if(typeof a.saveImageToPhotosAlbum!="function")throw new Error("unsupported");await a.saveImageToPhotosAlbum({filePath:n}),bt("已存到相册")}else{if(typeof a.postNote!="function")throw new Error("unsupported");await a.postNote({title:De(r),content:je(r),pageType:"photo_publish",mediaInfo:{image_resources:[{url:n}]}})}}catch(s){bt(e==="save"?"没存上:可能没开相册权限,或客户端版本太旧":"没能打开发笔记页,请稍后再试")}}}function er(){mt("about",{label:"关于高性价比人生",render:function(t){var e=["A","B","C"].map(function(a){return'<div class="ev-line"><span class="stamp-wrap" style="transform:rotate(-10deg);-webkit-transform:rotate(-10deg)">'+Je(a)+"</span><p><b>"+a+" 级</b> "+T(Ft[a])+"。</p></div>"}).join("");t.el.innerHTML=ie("关于高性价比人生","出处 · 许可 · 免责")+'<div class="sheet-body about"><h2>这是什么</h2><div class="box"><p><b>高性价比人生</b>是一个小红书小工具:把开源书《高性价比人生指南》里的 '+H.length+' 条建议,做成一张张小票:每天抽一张,也能搜、能筛、能收藏、能生成分享图。书的主旨是「用最少的钱、时间和精力,换回最多的���命、金钱和人身自由」。</p></div><h2>怎么读一张小票</h2><div class="box"><p><b>花掉</b>=原书的「成本」;<b>换回</b>=原书的「说人话」;<b>证据</b>=原书的「证据等级」。点开小票能看到收益原文、备注和来源。</p><p style="margin-top:8px"><b>性价比极高</b>=不花钱、费时少、不靠毅力、收益大,四项同时满足,全书共 '+Tt.length+' 条。原书说:「用时少」指一次花几分钟以内,或顺手就能做。</p></div><div class="box">'+e+'<p class="fine" style="margin-top:6px">原书补充:A 级只说明「有具体数字、出处可核」,不说明这个数字一定是因果。法律和政策类条目的 A 级,指的是引到了法条或官方文件原文。</p></div><h2>出处与许可</h2><div class="box"><p>内容来自开源书《高性价比人生指南》,作者 eternity4719,仓库 github.com/eternity4719/HowToLiveBetter。</p><p>正文以 CC BY 4.0 发布(creativecommons.org/licenses/by/4.0/),允许转载、改编、商用,但须写明出处。</p><p class="fine" style="margin-top:6px">改动说明:本工具没有改写正文,只做了排版、截断显示、检索高亮和条目互链;数据同步于 '+T(ye||"—")+'。书里的法条、补贴标准和截止日期经常更新,以原仓库为准。</p></div><h2>免责声明</h2><div class="box warn"><p>书里的内容可能过时,也可能有错,不少政策各地执行不一样。真去办事、看病、打官司时,以当地部门、医生和律师的说法为准。</p></div><h2>关于代币</h2><div class="box warn"><p>原书作者声明:本项目从未发行、也不会发行任何代币或数字资产。用本项目名字发的币都和本项目无关,作者不领取、不认领任何相关收益。看到这类币请当作骗局,别买。</p></div><h2>隐私</h2><div class="box"><p>收藏和偏好只存在这台手机上(小红书小工具本地缓存;低版本客户端用浏览器本地存储),不上传。清理数据后可能丢失。</p></div><p class="fine" style="text-align:center;margin:20px 0 6px">高性价比人生 · 小红书小工具</p></div><div class="dbar">'+oa("返回","关闭关于页")+'<span class="dbar-info">高性价比人生</span></div>'}})}var Ke=0;function bt(t){var e=h("#toast");e.textContent=t,e.classList.add("on"),clearTimeout(Ke),Ke=setTimeout(function(){e.classList.remove("on")},1800)}function fa(){var t=h("#top").offsetHeight;return t}function Qt(t){if(ze.indexOf(t)!==-1){for(;N.length;)U(N[N.length-1]);if(t===c.tab){window.scrollTo(0,0);return}c.scroll[c.tab]=window.pageYOffset,c.tab=t,ze.forEach(function(e){h("#view-"+e).className="view"+(e===t?" is-on":"")}),Y(".tab").forEach(function(e){var a=e.getAttribute("data-tab")===t;e.className="tab"+(a?" is-on":""),a?e.setAttribute("aria-current","page"):e.removeAttribute("aria-current")}),t==="all"&&It(),t==="toc"&&!c.tocBuilt&&$a(),t==="fav"&&c.favDirty&&ra(),window.scrollTo(0,c.scroll[t]||0)}}var nt=!0;function It(){(nt||!c.allBuilt)&&(X(),nt=!1)}function ar(t){var e=t.target.closest?t.target.closest("[data-act]"):null;if(!(!e||e.disabled)){var a=e.getAttribute("data-act"),r=e.getAttribute("data-id"),n=sa(e);switch(a){case"tab":Qt(e.getAttribute("data-tab"));break;case"about":er();break;case"pdf":pdfPanel();break;case"pdf-export":exportPdf();break;case"pdf-share":sharePdf();break;case"open":Ge(r,c.tab==="all"&&!n?c.terms:[]);break;case"fav":t.stopPropagation(),Va(r);break;case"share":tr(r);break;case"redraw":za();break;case"back-today":c.drawn=[],c.curId=rt().id,ht("rise");break;case"pool":var i=e.getAttribute("data-v");i!==c.pool&&(c.pool=i,c.drawn=[],c.curId=rt().id,ht("print"),Wt("prefs",{pool:c.pool}));break;case"chip":Wa(e.getAttribute("data-f"),e.getAttribute("data-v"));break;case"secpick":Qa();break;case"clear":c.fl=Jt(),X();break;case"clear-all":c.fl=Jt(),te(""),X();break;case"hot":te(e.getAttribute("data-v")),nt=!0,c.tab!=="all"?Qt("all"):It(),Lt();break;case"sec":Za(Number(e.getAttribute("data-sec")));break;case"ref":n&&n.kind==="detail"?We(n,r,!0):Ge(r);break;case"d-back":n&&Ja(n);break;case"d-step":if(n){var s=O[n.data.id],l=St(s,Number(e.getAttribute("data-d")));l&&We(n,l.id,!1);var o=h("#d-body",n.el);o&&(o.scrollTop=0)}break;case"close":n?U(n):Ht()&&U(Ht());break;case"src-more":Y("#d-src .src-more",n?n.el:document).forEach(function(d){d.hidden=!1}),e.parentNode.removeChild(e);break;case"intro-more":var u=h("#sec-intro",n?n.el:document);u&&u.classList.remove("is-clip"),e.parentNode.removeChild(e);break;case"sec-opt":if(n){var f=e.getAttribute("data-sec");n.data.tmp[f]?delete n.data.tmp[f]:n.data.tmp[f]=1,e.className="sec-opt"+(n.data.tmp[f]?" on":""),e.setAttribute("aria-pressed",!!n.data.tmp[f]),Zt(n)}break;case"sec-reset":n&&(n.data.tmp={},Y(".sec-opt",n.el).forEach(function(d){d.className="sec-opt",d.setAttribute("aria-pressed","false")}),Zt(n));break;case"sec-apply":n&&(c.fl.secs=n.data.tmp,U(n),X(),Lt());break;case"save-img":n&&$e(n,"save");break;case"post-note":n&&$e(n,"note");break}}}function te(t){var e=h("#q");e.value=t,c.q=t,h("#q-clear").hidden=!t}var Ve=Bt(function(){c.q=h("#q").value,nt=!0,c.tab!=="all"?Qt("all"):It(),Lt()},120);function rr(){document.addEventListener("click",ar),Xa(),document.addEventListener("keydown",function(n){var i=n.key;i==="Tab"&&document.documentElement.classList.add("kbd"),(i==="Enter"||i===" ")&&n.target&&n.target.getAttribute&&/^(button|link)$/.test(n.target.getAttribute("role")||"")&&(n.preventDefault(),n.target.click()),i==="Escape"&&Ht()&&U(Ht())});var t=h("#q"),e=!1;t.addEventListener("compositionstart",function(){e=!0}),t.addEventListener("compositionend",function(){e=!1,Ve()}),t.addEventListener("input",function(){h("#q-clear").hidden=!t.value,e||Ve()}),t.addEventListener("keydown",function(n){n.key==="Enter"&&t.blur()}),t.addEventListener("focus",function(){h("#search").className="search is-focus"}),t.addEventListener("blur",function(){h("#search").className="search"}),h("#q-clear").addEventListener("click",function(){te(""),X(),t.focus()});var a=h("#top"),r=!1;window.addEventListener("scroll",function(){r||(r=!0,requestAnimationFrame(function(){r=!1;var n=window.pageYOffset>2;n!==a.classList.contains("is-scrolled")&&a.classList.toggle("is-scrolled",n)}))},{passive:!0}),window.addEventListener("resize",ua)}function ua(){document.documentElement.style.setProperty("--top-h",fa()+"px")}function nr(){rr(),ua(),c.curId=rt().id,ht("rise"),window.__htlbReady=Date.now()-Fa;try{window.__htlbReadyAt=Math.round(performance.now()),window.__htlbAppStart=Pa}catch(t){}$t("prefs").then(function(t){t&&(t.pool==="all"||t.pool==="best")&&t.pool!==c.pool&&!c.drawn.length&&(c.pool=t.pool,c.curId=rt().id,ht())}),$t("favs").then(function(t){var e=t&&t.ids&&t.ids.filter?t.ids:[];e=e.filter(function(r){return typeof r=="string"&&O[r]});var a=c.favs.slice();e.forEach(function(r){a.indexOf(r)===-1&&a.push(r)}),c.favs=a,c.favSet={},a.forEach(function(r){c.favSet[r]=1}),a.forEach(function(r){ia(r,!0)}),na(),c.favDirty=!0,c.tab==="fav"&&ra()}),we(function(){try{window.__htlbFullAt=Math.round(performance.now())}catch(t){}c.q&&(nt=!0,c.tab==="all"&&It()),N.forEach(function(t){if(t.kind==="detail"){var e=h("#d-body",t.el),a=e?e.scrollTop:0;Ct(t),e=h("#d-body",t.el),e&&(e.scrollTop=a)}})}),setTimeout(function(){c.allBuilt||(X(),nt=!1)},400)}H.length?nr():h("#view-today").innerHTML='<div class="empty"><h3>数据没有加载出来</h3><p>请重新打开小工具。</p></div>';})();
|
|
|
|
| 1 |
(()=>{function h(t,e){return(e||document).querySelector(t)}function Y(t,e){return Array.prototype.slice.call((e||document).querySelectorAll(t))}var ya={"&":"&","<":"<",">":">",'"':""","'":"'"};function T(t){return String(t).replace(/[&<>"']/g,function(e){return ya[e]})}function Bt(t,e){var a=0;return function(){var r=arguments;clearTimeout(a),a=setTimeout(function(){t.apply(null,r)},e)}}function Z(t){for(var e=2166136261,a=0;a<t.length;a++)e^=t.charCodeAt(a),e=Math.imul(e,16777619)>>>0;return e>>>0}function st(t){var e=t>>>0;return function(){e=e+1831565813>>>0;var a=e;return a=Math.imul(a^a>>>15,a|1),a^=a+Math.imul(a^a>>>7,a|61),((a^a>>>14)>>>0)/4294967296}}var wa=["日","一","二","三","四","五","六"];function fe(){var t=new Date,e=t.getFullYear(),a=t.getMonth()+1,r=t.getDate();return{key:e+"-"+a+"-"+r,dot:e+"."+de(a)+"."+de(r),cn:a+" 月 "+r+" 日",week:"星期"+wa[t.getDay()]}}function de(t){return t<10?"0"+t:String(t)}function ue(){try{return!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}catch(t){return!1}}function ve(t){requestAnimationFrame(function(){requestAnimationFrame(t)})}var _t=window.__BOOK__||{v:"",n:0,secs:[],items:[]},ye=_t.v,G=[],D={},H=[],O={},Rt=[0];_t.secs.forEach(function(t){var e={sec:t[0],title:t[1],intro:t[2],items:[],best:0};G.push(e),D[e.sec]=e});_t.items.forEach(function(t,e){var a={i:e,sec:t[0],n:t[1],id:t[0]+"-"+t[1],title:t[2],money:t[3],time:t[4],will:t[5],gain:t[6],kind:t[7],cost:t[8],plain:t[9],evRaw:t[10],py:t[11],benefit:"",src:[],note:""},r=(a.evRaw||"").charAt(0).toUpperCase();a.ev=r==="A"||r==="B"||r==="C"?r:"",a.evExtra=a.evRaw.slice(1).trim(),a.free=a.money==="0",a.best=a.money==="0"&&a.time==="少"&&a.will==="否"&&a.gain==="大",a.lc={title:q(a.title),plain:q(a.plain),cost:q(a.cost),benefit:q(a.benefit),note:q(a.note)},a.pyc=Ta(a.py),H.push(a),O[a.id]=a;var n=D[a.sec];n&&(n.items.push(a),a.best&&n.best++)});G.forEach(function(t){Rt[t.sec]=t.items.length});var lt={ready:!1},Ot=[];function we(t){lt.ready?t():Ot.push(t)}function pe(){var t=window.__BOOK_FULL__;if(!(lt.ready||!t||t.length!==H.length)){for(var e=0;e<H.length;e++){var a=H[e];a.benefit=t[e][0],a.src=t[e][1],a.note=t[e][2],a.lc.benefit=q(a.benefit),a.lc.note=q(a.note)}lt.ready=!0;var r=Ot;Ot=[],r.forEach(function(n){try{n()}catch(i){}})}}window.__BOOK_FULL__?pe():window.__htlbOnFull=pe;var Tt=H.filter(function(t){return t.best});function q(t){return Q(String(t||"").replace(/\uE000([^\uE001\uE002]*)\uE001[^\uE002]*\uE002/g,"$1").replace(/\n+/g," ")).toLowerCase()}function Q(t){return t.replace(/[!-~]/g,function(e){var a=e.charCodeAt(0)-65248,r=String.fromCharCode(a);return/[A-Za-z0-9]/.test(r)?r:e})}function Ta(t){for(var e="",a=[],r=0;r<t.length;r++)t[r]!==" "&&(e+=t[r],a.push(r));return{s:e,map:a}}var he={0:"不花钱",少:"花小钱",中:"花点钱",多:"花大钱"},be={少:"费时少",中:"费时中等",多:"费时多"},me={否:"不靠毅力",些:"要点毅力",是:"要毅力"},ge={大:"收益大",中:"收益中",小:"收益小"};function ot(t){var e=[];return he[t.money]&&e.push({k:"money",t:he[t.money],on:t.money==="0"}),be[t.time]&&e.push({k:"time",t:be[t.time],on:t.time==="少"}),me[t.will]&&e.push({k:"will",t:me[t.will],on:t.will==="否"}),ge[t.gain]&&e.push({k:"gain",t:ge[t.gain],on:t.gain==="大"}),t.kind&&e.push({k:"kind",t:"换回 · "+t.kind,on:!1}),e}function I(t){return"第 "+t.sec+" 节 · 第 "+t.n+" 条"}function W(t){return(t.sec<10?"0":"")+t.sec+"-"+(t.n<10?"0":"")+t.n}function St(t,e){return H[t.i+e]||null}var Ft={A:"有具体数字可查,出处是多项研究合并起来的荟萃分析、跟踪很多人很多年的大型队列,或者随机分组的试验(RCT),能说出降了多少(HR、RR、下降百分比)",B:"有研究支持,但说不出一个确切数字;或者只有小样本、单独一项研究撑着",C:"作者自己的经验,或者大家公认的做法,没有直接的研究文献"};var Te=/(本节)?第\s*(\d+)\s*节(?:\s*第\s*(\d+(?:\s*(?:、|到|至)\s*\d+)*)\s*条)?|(本节)?第\s*(\d+(?:\s*(?:、|到|至)\s*\d+)*)\s*条/g,Sa=/(意见|通知|章程|公约|》|号|法|例|典|定|释|则|〕|规|款|项|案)\s*$/,ka=/^\s*(([^()]{0,40}))?\s*(、|和|或|及|以及|,|,)\s*$/,xa=/(\d+)/g;function Se(t,e,a){var r=[],n=0,i=-1,s=0,l;for(Te.lastIndex=0;l=Te.exec(t);){var o=l.index,u=l[0],f=t.slice(Math.max(0,o-6),o),d=0,p=null,g=!1;if(l[2]!==void 0)d=Number(l[2]),g=!0,p=l[3]||null;else{if(!l[4]&&Sa.test(f))continue;p=l[5],l[4]?d=e:i>=0&&s&&ka.test(t.slice(i,o))?d=s:d=e}if(d>=1&&d<a.length&&a[d]){if(p){var M=!0;if(p.replace(xa,function(F){var b=Number(F);return b>=1&&b<=a[d]||(M=!1),F}),!M)continue}if(o>n&&r.push({t:"text",s:t.slice(n,o)}),!p)r.push({t:"sec",s:u,sec:d});else{for(var y=[],R=/\d+/g,k=u.lastIndexOf(p),v,L=[];v=R.exec(p);)L.push({i:k+v.index,len:v[0].length,n:Number(v[0])});for(var S=0,w=0;w<L.length;w++){var A=w===L.length-1?u.length:L[w].i+L[w].len;y.push({t:"ref",s:u.slice(S,A),sec:d,n:L[w].n}),S=A}for(var B=0;B<y.length;B++)r.push(y[B])}n=o+u.length,i=n,s=g||l[4]||d?d:0}}return n<t.length&&r.push({t:"text",s:t.slice(n)}),r}var Pt=/\uE000([^\uE001\uE002]*)\uE001([^\uE002]*)\uE002/g;function tt(t){return String(t||"").replace(Pt,"$1")}function Ea(t){var e=String(t||""),a="",r=[],n=[],i=0,s;for(Pt.lastIndex=0;s=Pt.exec(e);){var l=e.slice(i,s.index);a+=l;for(var o=0;o<l.length;o++)r.push(0);n.push(s[2]),a+=s[1];for(var u=0;u<s[1].length;u++)r.push(n.length);i=s.index+s[0].length}var f=e.slice(i);a+=f;for(var d=0;d<f.length;d++)r.push(0);return{s:a,link:r,urls:n}}var ke=/https?:\/\/[^\s<>()「」;,。]+/g,xe=/[,。、;:?!)」』》%…—·”’]/;function $(t,e){e=e||{};var a=Ea(t),r=a.s,n=r.length;if(!n)return"";var i=new Array(n),s=new Array(n),l=new Array(n),o=[];if(e.refs&&e.sec){var u=0;Se(r,e.sec,Rt).forEach(function(k){if(k.t!=="text"){o.push(k);for(var v=0;v<k.s.length;v++)i[u+v]=o.length}u+=k.s.length})}if(e.urls){var f;for(ke.lastIndex=0;f=ke.exec(r);)for(var d=0;d<f[0].length;d++)l[f.index+d]=1}jt(r,e.terms,s);function p(k){return(a.link[k]||"")+"|"+(i[k]||"")+"|"+(s[k]?"m":"")+"|"+(l[k]?"u":"")}function g(k,v,L){var S=k.split("|"),w=T(v).replace(/\n/g,"<br>");if(S[2]&&(w="<mark>"+w+"</mark>"),S[3]&&(w='<span class="url">'+w+"</span>"),S[1]){var A=o[Number(S[1])-1];w=A.t==="sec"?'<span class="xref" role="link" tabindex="0" data-act="sec" data-sec="'+A.sec+'">'+w+"</span>":'<span class="xref" role="link" tabindex="0" data-act="ref" data-id="'+A.sec+"-"+A.n+'">'+w+"</span>"}return S[0]&&(w='<span class="doc">'+w+"</span>",L&&(w+='<span class="lnk-url">'+T(a.urls[Number(S[0])-1])+"</span>")),w}function M(k,v){for(var L="",S=k;S<v;){for(var w=p(S),A=S+1;A<v&&p(A)===w;)A++;var B=a.link[A-1];L+=g(w,r.slice(S,A),B&&a.link[A]!==B),S=A}return L}var y=n;if(n>12&&!e.urls){for(y=n-1;y>0&&xe.test(r[y]);)y--;y=y-1,(y<0||i[y]||i[y+1]||a.link[y]||a.link[n-1]||/[A-Za-z0-9\n]/.test(r.slice(y,n)))&&(y=n)}var R=M(0,y);return y<n&&(R+='<span class="nobr">'+M(y,n)+"</span>"),R}function Aa(t){var e=[];return String(t||"").split(/\n+/).forEach(function(a){if(a=a.trim(),!!a){if(a.length<=170)return e.push(a);for(var r=[],n=0,i="",s=0;s<a.length;s++){var l=a[s];if(i+=l,"「『((“《".indexOf(l)!==-1?n++:"」』))”》".indexOf(l)!==-1&&n>0&&n--,n===0&&(l==="。"||l==="!"||l==="?")){for(;s+1<a.length&&"」』))”".indexOf(a[s+1])!==-1;)i+=a[++s];r.push(i),i=""}}i&&r.push(i);var o="";r.forEach(function(u,f){o+=u;for(var d=0,p=f+1;p<r.length;p++)d+=r[p].length;o.length>=90&&d>=40&&(e.push(o.trim()),o="")}),o.trim()&&e.push(o.trim())}}),e}function Dt(t,e){return Aa(t).map(function(a){return"<p>"+$(a,e)+"</p>"}).join("")}function jt(t,e,a){if(!e||!e.length)return!1;var r=Q(t).toLowerCase(),n=!1;return e.forEach(function(i){if(i)for(var s=0,l;(l=r.indexOf(i,s))!==-1;){for(var o=0;o<i.length;o++)a[l+o]=1;s=l+i.length,n=!0}}),n}function kt(t,e){var a=t.title,r=new Array(a.length);return e&&e.length&&(jt(a,e,r),e.forEach(function(n){if(/^[a-z]+$/.test(n)&&Q(a).toLowerCase().indexOf(n)===-1){var i=t.pyc.s.indexOf(n);if(i!==-1)for(var s=0;s<n.length;s++)r[t.pyc.map[i+s]]=1}})),Ee(a,r,!0)}function Ee(t,e,a){var r=t.length;if(a&&t.length>6)for(r=t.length-2;r>0&&xe.test(t[r]);)r--;function n(s,l){for(var o="",u=s;u<l;){for(var f=!!e[u],d=u;d<l&&!!e[d]===f;)d++;var p=T(t.slice(u,d));o+=f?"<mark>"+p+"</mark>":p,u=d}return o}var i=n(0,r);return r<t.length&&(i+='<span class="nobr">'+n(r,t.length)+"</span>"),i}function zt(t,e,a){var r=tt(t).replace(/\n+/g," ");a=a||64;var n=new Array(r.length),i=jt(r,e,n),s=0;if(i){for(var l=0;l<n.length;l++)if(n[l]){s=Math.max(0,l-14);break}}var o=Math.min(r.length,s+a);return o-s<a&&(s=Math.max(0,o-a)),{html:(s>0?"…":"")+Ee(r.slice(s,o),n.slice(s,o),!1)+(o<r.length?"…":""),hit:i}}function Ma(t){var e=Q(String(t||"")).toLowerCase().replace(/[\s ,,、]+/g," ").trim();if(!e)return[];var a={};return e.split(" ").filter(function(r){return!r||a[r]?!1:(a[r]=1,!0)})}var Yt={title:100,plain:30,cost:12,benefit:8,note:6},Ae=["title","plain","cost","benefit","note"];function La(t,e){for(var a=0,r=null,n=0;n<e.length;n++){for(var i=e[n],s=0,l=null,o=0;o<Ae.length;o++){var u=Ae[o],f=t.lc[u].indexOf(i);if(f!==-1){var d=Yt[u];u==="title"&&f===0&&(d+=20),d>s&&(s=d,l=u),a+=d*.05}}if(/^[a-z]{2,}$/.test(i)&&t.pyc.s.indexOf(i)!==-1){var p=t.pyc.s.indexOf(i)===0?70:60;p>s&&(s=p,l="title")}if(!s)return null;a+=s,(!r||Yt[l]>Yt[r])&&(r=l)}return{score:a,where:r}}function Ha(t,e){return!(e.best&&!t.best||e.free&&!t.free||K(e.ev)&&!e.ev[t.ev]||K(e.kinds)&&!e.kinds[t.kind]||K(e.secs)&&!e.secs[t.sec])}function K(t){for(var e in t)if(t[e])return!0;return!1}function qt(t,e){for(var a=Ma(t),r=[],n=0;n<H.length;n++){var i=H[n];if(Ha(i,e)){if(!a.length){r.push({it:i,score:0,where:null});continue}var s=La(i,a);s&&r.push({it:i,score:s.score,where:s.where})}}return a.length&&r.sort(function(l,o){return o.score-l.score||l.it.i-o.it.i}),{terms:a,list:r}}var Ca=9460,ct="htlb_";function He(){var t=window.xhs;return t&&t.miniTool||null}function Me(t){var e=t&&t.miniToolEnv;return Number(e&&e.buildVersion)||0}function At(t,e){return new Promise(function(a,r){var n=!1,i=setTimeout(function(){n||(n=!0,r(new Error("timeout")))},e);Promise.resolve(t).then(function(s){n||(n=!0,clearTimeout(i),a(s))},function(s){n||(n=!0,clearTimeout(i),r(s))})})}var xt=null;function Ia(){return xt||(xt=async function(){try{var t=window.xhs,e=Me(t&&t.launchOptions);if(e)return e;var a=He();if(!a||typeof a.getLaunchOptions!="function")return 0;var r=await At(a.getLaunchOptions(),1500);return Me(r)}catch(n){return 0}}(),xt)}async function Ce(t){var e=He();if(!e||typeof e[t]!="function")return null;var a=await Ia();return Math.floor(a/1e3)<Ca?null:e}function Gt(t){try{return window.localStorage?window.localStorage.getItem(ct+t):null}catch(e){return null}}function Le(t,e){try{return window.localStorage?(window.localStorage.setItem(ct+t,e),!0):!1}catch(a){return!1}}function Et(t){if(typeof t!="string"||!t)return null;try{return JSON.parse(t)}catch(e){return null}}async function Wt(t,e){var a;try{a=JSON.stringify(e)}catch(n){return!1}if(typeof a!="string")return!1;var r=null;try{r=await Ce("setStorage")}catch(n){r=null}if(r)try{return await At(r.setStorage({key:ct+t,data:a}),3e3),!0}catch(n){return Le(t,a)}return Le(t,a)}async function $t(t){var e=null;try{e=await Ce("getStorage")}catch(i){e=null}if(e)try{var a=await At(e.getStorage({key:ct+t}),3e3),r=Et(a&&a.data);if(r!==null)return r;var n=Et(Gt(t));if(n!==null)try{await At(e.setStorage({key:ct+t,data:JSON.stringify(n)}),3e3)}catch(i){}return n}catch(i){return Et(Gt(t))}return Et(Gt(t))}var V=1080,et=1440,Ie="#F6F1E7",j="#17171B",Ne="#FF2442",Kt="#E0002A",Be="#0B7A57",Na="#FFD43B",dt="#FFFFFF",vt='-apple-system, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif',Vt='"SFMono-Regular", Menlo, "Roboto Mono", "Courier New", monospace';function _(t){return"rgba(23,23,27,"+t+")"}function x(t,e,a){return t+" "+Math.round(e)+"px "+(a||vt)}var Oe=/[,。、;:?!)」』》〉】%…—·,.;:?!)\]]/,Ba=/[(「『《〈【(\[“‘]/;function ft(t,e,a){for(var r=e.match(/[A-Za-z0-9][A-Za-z0-9.%+\-/:_]*\s?|\s+|[\s\S]/g)||[],n=[],i="",s=0,l=0;l<r.length;l++){var o=r[l],u=t.measureText(o).width;if(i&&s+u>a){if(Oe.test(o.charAt(0))){i+=o,s+=u;continue}if(i.length>1&&Ba.test(i.charAt(i.length-1))){var f=i.charAt(i.length-1);n.push(i.slice(0,-1)),i=f+o,s=t.measureText(i).width;continue}n.push(i.replace(/\s+$/,"")),i=o.replace(/^\s+/,""),s=t.measureText(i).width}else i+=o,s+=u}i&&n.push(i);var d=n.length;if(d>1&&n[d-1].replace(/[,。、;:?!)」』》]/g,"").length<=1&&n[d-2].length>3){var p=n[d-2],g=p.length-1;Oe.test(p.charAt(g))&&g>1&&g--,n[d-1]=p.slice(g)+n[d-1],n[d-2]=p.slice(0,g)}return n}function ut(t,e,a,r){if(e.length<=a)return e;for(var n=e.slice(0,a),i=n[a-1];i&&t.measureText(i+"…").width>r;)i=i.slice(0,-1);return n[a-1]=i.replace(/[,。、;:]$/,"")+"…",n}function Ut(t,e,a,r,n,i){t.beginPath(),t.moveTo(e+i,a),t.lineTo(e+r-i,a),t.arcTo(e+r,a,e+r,a+i,i),t.lineTo(e+r,a+n-i),t.arcTo(e+r,a+n,e+r-i,a+n,i),t.lineTo(e+i,a+n),t.arcTo(e,a+n,e,a+n-i,i),t.lineTo(e,a+i),t.arcTo(e,a,e+i,a,i),t.closePath()}function Xt(t,e,a,r){t.save(),t.strokeStyle=_(.28),t.lineWidth=3,t.setLineDash([12,10]),t.beginPath(),t.moveTo(e,r),t.lineTo(a,r),t.stroke(),t.restore()}function Oa(t,e,a){var r=document.createElement("canvas");r.width=e,r.height=e;var n=r.getContext("2d"),i=e/2-e*.04,s=e/2;n.strokeStyle=Ne,n.fillStyle=Ne,n.lineWidth=e*.045,n.beginPath(),n.arc(s,s,i-n.lineWidth/2,0,Math.PI*2),n.stroke(),n.lineWidth=e*.016,n.beginPath(),n.arc(s,s,i*.8,0,Math.PI*2),n.stroke(),n.textAlign="center",n.textBaseline="middle",n.font=x(900,e*.46,vt),n.fillText(t,s,s+e*.02),n.font=x(800,e*.1,vt),n.fillText("证 据",s,s-e*.29),n.fillText("等 级",s,s+e*.3);var l=st(a);n.globalCompositeOperation="destination-out";for(var o=0;o<260;o++){var u=l()*Math.PI*2,f=Math.sqrt(l())*i,d=l()*e*.012+e*.003;n.globalAlpha=.35+l()*.65,n.beginPath(),n.arc(s+Math.cos(u)*f,s+Math.sin(u)*f,d,0,Math.PI*2),n.fill()}n.globalAlpha=.5,n.lineWidth=e*.05,n.beginPath();var p=l()*Math.PI*2;return n.arc(s,s,i-e*.02,p,p+.5),n.stroke(),r}function _a(t,e,a,r,n,i){var s=st(i),l=e;for(t.fillStyle=j;l<e+r;){var o=[3,3,5,8][Math.floor(s()*4)];if(l+o>e+r)break;s()>.32&&t.fillRect(l,a,o,n),l+=o+[3,4,6][Math.floor(s()*3)]}}function _e(t,e,a,r,n){t.save(),t.font=x(800,n.size,vt);var i=t.measureText(r).width,s=n.size*.75,l=n.size*1.9,o=i+s*2;return t.translate(e+o/2,a+l/2),t.rotate((n.rot||0)*Math.PI/180),t.shadowColor=_(.14),t.shadowBlur=14,t.shadowOffsetY=4,t.fillStyle=dt,Ut(t,-o/2-6,-l/2-6,o+12,l+12,(l+12)/2),t.fill(),t.shadowColor="transparent",t.fillStyle=n.bg,Ut(t,-o/2,-l/2,o,l,l/2),t.fill(),n.border&&(t.strokeStyle=n.border,t.lineWidth=2,t.stroke()),t.fillStyle=n.fg,t.textAlign="center",t.textBaseline="middle",t.fillText(r,0,1),t.restore(),o+12}function Ra(t,e,a){return t.font=x(800,a,vt),t.measureText(e).width+a*1.5+12}var m={areaTop:170,areaBottom:et-118,padTop:54,headLine:44,secLine:40,cutGap:38,titleLH:1.32,afterTitle:22,tagRow:50,afterTags:24,bodyLH:1.6,rowGap:22,evRow:76,afterEv:14,barGap:24,barH:46,padBottom:40},Re=m.padTop+m.headLine+m.secLine+m.cutGap+m.afterTitle+m.tagRow+m.afterTags+m.cutGap+m.rowGap*2+m.evRow+m.afterEv+m.barGap+m.barH+m.padBottom;function Pe(t,e){var a=document.createElement("canvas");a.width=V,a.height=et;var r=a.getContext("2d"),n=Z(t.id);r.fillStyle=Ie,r.fillRect(0,0,V,et),r.fillStyle=_(.07);for(var i=30;i<et;i+=40)for(var s=30;s<V;s+=40)r.fillRect(s,i,3,3);_e(r,80,58,"高性价比人生",{size:34,bg:Kt,fg:dt,rot:-4}),r.fillStyle=_(.62),r.font=x(700,28,Vt),r.textAlign="right",r.textBaseline="middle",r.fillText(e.date||"",V-92,98),r.textAlign="left";var l=84,o=V-l*2,u=62,f=l+u,d=o-u*2,p=112,g=d-p,M=tt(t.cost),y=tt(t.plain),R=D[t.sec],k=m.areaBottom-m.areaTop,v=null,L;for(L=1;L>=.78&&(v=Fe(r,t,L,d,g,M,y,0),!(v.h<=k));L-=.04);v.h>k&&(v=Fe(r,t,.78,d,g,M,y,k));try{window.__htlbShareFit={h:Math.round(v.h),avail:k,scale:Math.round(v.s*100)/100,clamped:!!v.clamped}}catch(C){}var S=m.areaTop+Math.max(0,Math.floor((k-v.h)/2)),w=S+v.h;r.save(),r.shadowColor=_(.16),r.shadowBlur=40,r.shadowOffsetY=14,r.fillStyle=dt,r.beginPath(),r.moveTo(l,S+18),r.arcTo(l,S,l+18,S,18),r.lineTo(l+o-18,S),r.arcTo(l+o,S,l+o,S+18,18),r.lineTo(l+o,w);for(var A=Math.floor(o/24),B=o/A,F=A-1;F>=0;F--)r.lineTo(l+F*B+B/2,w+16),r.lineTo(l+F*B,w);r.closePath(),r.fill(),r.restore(),r.textBaseline="alphabetic";var b=S+m.padTop;r.fillStyle=j,r.font=x(900,36),r.fillText(I(t),f,b+32),r.textAlign="right",r.fillStyle=_(.55),r.font=x(700,28,Vt),r.fillText("No."+W(t),f+d,b+30),r.textAlign="left",b+=m.headLine,r.fillStyle=_(.62),r.font=x(500,27);var gt=ut(r,ft(r,R?R.title:"",d),1,d)[0]||"";r.fillText(gt,f,b+28),b+=m.secLine,Xt(r,f,f+d,b),r.fillStyle=Ie,r.beginPath(),r.arc(l,b,18,0,Math.PI*2),r.arc(l+o,b,18,0,Math.PI*2),r.fill(),b+=m.cutGap;var it=v.titleSize*m.titleLH;r.font=x(900,v.titleSize);var yt=v.title.length-1,P=r.measureText(v.title[yt]||"").width,va=b+v.titleSize*.98+yt*it;r.fillStyle=Na,Ut(r,f-8,va-v.titleSize*.36,P+16,v.titleSize*.46,8),r.fill(),r.fillStyle=j,v.title.forEach(function(C,z){r.fillText(C,f,b+v.titleSize*.98+z*it)}),b+=v.titleH+m.afterTitle;var se=f;v.tags.forEach(function(C){_e(r,se,b+2,C.t,C.best?{size:24,bg:Kt,fg:dt,rot:-2}:{size:24,bg:dt,fg:C.on?Be:j,border:C.on?"rgba(11,122,87,0.4)":_(.18),rot:0}),se+=C.w+8}),b+=m.tagRow+m.afterTags,Xt(r,f,f+d,b),b+=m.cutGap;function Nt(C,z,ga){r.font=x(900,30),r.fillStyle=z,r.fillText(C,f,ga)}var pa=v.bodySize*m.bodyLH;Nt("花掉",j,b+v.bodySize*1.02),r.fillStyle=j,r.font=x(500,v.bodySize),v.cost.forEach(function(C,z){r.fillText(C,f+p,b+v.bodySize*1.02+z*pa)}),b+=v.costH+m.rowGap;var ha=v.saySize*m.bodyLH;Nt("换回",Be,b+v.saySize*1.02),r.fillStyle=j,r.font=x(700,v.saySize),v.say.forEach(function(C,z){r.fillText(C,f+p,b+v.saySize*1.02+z*ha)}),b+=v.sayH+m.rowGap,Nt("证据",Kt,b+36),r.fillStyle=j,r.font=x(900,36);var le=(t.ev||"–")+" 级";if(r.fillText(le,f+p,b+36),t.evExtra){var oe=r.measureText(le).width,ce=g-oe-200;r.font=x(500,26),r.fillStyle=_(.62),r.fillText(ut(r,ft(r,t.evExtra,ce),1,ce)[0],f+p+oe+14,b+34)}var ba=b;if(b+=m.evRow+m.afterEv,Xt(r,f,f+d,b),b+=m.barGap,_a(r,f,b,d*.5,m.barH,n),r.fillStyle=_(.55),r.font=x(700,22,Vt),r.fillText("HTLB·"+W(t),f+d*.5+24,b+18),r.fillText(e.date||"",f+d*.5+24,b+46),t.ev){var wt=168,ma=Oa(t.ev,wt,n);r.save(),r.globalAlpha=.92,r.translate(f+d-wt/2+4,ba+46),r.rotate((-8-n%9)*Math.PI/180),r.drawImage(ma,-wt/2,-wt/2),r.restore()}return r.textAlign="center",r.fillStyle=_(.8),r.font=x(800,30),r.fillText("高性价比人生 · 出自《高性价比人生指南》CC BY 4.0",V/2,et-70),r.fillStyle=_(.55),r.font=x(500,22),r.fillText("github.com/eternity4719/HowToLiveBetter · 内容可能过时,以当地部门、医生、律师为准",V/2,et-32),r.textAlign="left",a}function Fe(t,e,a,r,n,i,s,l){var o=Math.round(64*a);t.font=x(900,o);var u=ft(t,e.title,r),f=Math.round(32*a);t.font=x(500,f);var d=ft(t,i,n),p=Math.round(34*a);t.font=x(700,p);var g=ft(t,s,n),M=f*m.bodyLH,y=p*m.bodyLH,R=o*m.titleLH,k=!1;if(l){t.font=x(900,o),u.length>3&&(u=ut(t,u,3,r),k=!0);var v=l-Re-u.length*R,L=Math.max(2,Math.floor((v-2*M)/y)),S=Math.min(g.length,L,Math.max(2,Math.floor(v*.6/y))),w=Math.min(d.length,Math.max(2,Math.floor((v-S*y)/M)));w===d.length&&(S=Math.min(g.length,Math.max(2,Math.floor((v-w*M)/y)))),(S<g.length||w<d.length)&&(k=!0),t.font=x(500,f),d=ut(t,d,w,n),t.font=x(700,p),g=ut(t,g,S,n)}var A=[];e.best&&A.push({t:"性价比极高",best:!0}),ot(e).forEach(function(P){A.push({t:P.t,best:!1,on:P.on})});var B=[],F=0;A.forEach(function(P){P.w=Ra(t,P.t,24),F+P.w<=r&&(B.push(P),F+=P.w+8)});var b=u.length*R,gt=d.length*M,it=g.length*y,yt=Re+b+gt+it;return{s:a,h:yt,title:u,titleSize:o,titleH:b,bodySize:f,cost:d,costH:gt,saySize:p,say:g,sayH:it,tags:B,clamped:k}}function De(t){var e=Array.from(t.title);return e.length<=20?t.title:e.slice(0,19).join("")+"…"}function je(t){var e=[t.title,"","花掉:"+tt(t.cost),"换回:"+tt(t.plain),"证据:"+(t.evRaw||"–")+" 级","","来自小工具「高性价比人生」,出自《高性价比人生指南》"+I(t).replace(/ · /,"")+"(CC BY 4.0,github.com/eternity4719/HowToLiveBetter)。书里内容可能过时,各地执行不一,真去办事、看病、打官司以当地部门、医生、律师为准。","","#高性价比人生 #高性价比人生指南 #人生建议 #生活常识 #健康急救 #防骗指南 #理财避坑 #时间管理 #开源阅读 #安全意识 #自我提升 #证据思维"],a=e.join(`
|
| 2 |
+
`),r=Array.from(a);return r.length>1e3&&(a=r.slice(0,999).join("")+"…"),a}var Fa=Date.now(),Pa=window.performance&&performance.now?Math.round(performance.now()):0,J=ue(),Xe=["担保","借钱","被骗","体检","保险","租房","急救","加班","彩礼","二次验证"],Ue=["死亡率","金钱","自由","时间"],ze=["today","all","toc","fav"],Mt=fe(),c={tab:"today",q:"",terms:[],fl:Jt(),favs:[],favSet:{},pool:"best",curId:"",drawn:[],scroll:{today:0,all:0,toc:0,fav:0},allBuilt:!1,tocBuilt:!1,favDirty:!0};function Jt(){return{secs:{},ev:{},free:!1,best:!1,kinds:{}}}function E(t,e){return'<svg class="ic'+(e?" "+e:"")+'" aria-hidden="true"><use href="#'+t+'"></use></svg>'}function Ye(t){return-6-Z(t)%11}function ee(t,e){return t.ev?'<span class="stamp-wrap'+(e?" "+e:"")+'" style="-webkit-transform:rotate('+Ye(t.id)+"deg);transform:rotate("+Ye(t.id)+'deg)">'+Je(t.ev)+"</span>":""}function Je(t){return'<svg class="stamp" viewBox="0 0 100 100" role="img" aria-label="证据 '+t+' 级"><g mask="url(#mottle)" fill="none" stroke="currentColor"><circle cx="50" cy="50" r="45" stroke-width="5"></circle><circle cx="50" cy="50" r="36.5" stroke-width="1.6"></circle><text class="st-letter" x="50" y="66" font-size="44" text-anchor="middle" stroke="none">'+t+'</text><text class="st-small" x="50" y="29" font-size="10" text-anchor="middle" stroke="none">证据</text><text class="st-small" x="50" y="80" font-size="10" text-anchor="middle" stroke="none">等级</text></g></svg>'}function Ze(t){for(var e=st(Z(t.id)^2654435769),a=0,r="";a<150;){var n=[1.5,1.5,2.5,4][Math.floor(e()*4)];if(a+n>150)break;e()>.3&&(r+='<rect x="'+a.toFixed(1)+'" y="0" width="'+n+'" height="30"></rect>'),a+=n+[1.5,2,3][Math.floor(e()*3)]}return'<svg class="barcode" viewBox="0 0 150 30" preserveAspectRatio="none" aria-hidden="true" fill="currentColor">'+r+"</svg>"}function Qe(t){var e="";return t.best&&(e+='<span class="tag best">性价比极高</span>'),ot(t).forEach(function(a){e+='<span class="tag'+(a.on?" on":"")+'">'+T(a.t)+"</span>"}),'<div class="tags">'+e+"</div>"}function Da(t,e){var a=!!c.favSet[t.id];return'<button class="fav-btn'+(a?" is-on":"")+(e?" "+e:"")+'" type="button" data-act="fav" data-id="'+t.id+'" aria-pressed="'+a+'" aria-label="'+(a?"取消收藏":"收藏")+'">'+E(a?"i-heart-f":"i-heart")+"</button>"}function ta(t,e,a){var r={sec:t.sec,refs:e,terms:a};return'<dl class="t-rows"><div class="t-row"><dt class="lb-cost">花掉</dt><dd class="rich">'+$(t.cost,r)+'</dd></div><div class="t-row say"><dt class="lb-gain">换回</dt><dd class="rich">'+$(t.plain,r)+'</dd></div><div class="t-row ev"><dt class="lb-ev">证据</dt><dd><span class="ev-grade">'+(t.ev?t.ev+" 级":T(t.evRaw||"��标注"))+"</span>"+(t.evExtra?'<span class="ev-extra">'+T(t.evExtra)+"</span>":"")+(e&&t.ev?'<p class="ev-note">'+T(Ft[t.ev])+"</p>":"")+"</dd>"+ee(t,"stamp-in")+"</div></dl>"}function ja(t){var e=D[t.sec];return'<div class="ticket-wrap"><article class="ticket big" data-act="open" data-id="'+t.id+'" role="button" tabindex="0" aria-label="'+T(I(t)+":"+t.title+",点开看全文")+'"><div class="t-pad"><div class="t-head"><span class="t-no">'+I(t)+'</span><span class="t-serial mono">No.'+W(t)+'</span></div><div class="t-sec">'+T(e?e.title:"")+'</div></div><div class="t-cut"></div><div class="t-pad" style="padding-top:0"><h2 class="t-title">'+kt(t)+"</h2>"+Qe(t)+'</div><div class="t-cut" style="margin-top:6px"></div>'+ta(t,!1)+'<div class="t-cut" style="margin-top:4px"></div><div class="t-foot">'+Ze(t)+'<span class="t-more">点开看全文'+E("i-right")+"</span></div></article></div>"}var qe={cost:"花掉",benefit:"收益",note:"备注"};function ae(t,e,a,r){var n=D[t.sec],i,s="换回",l=!1;if(e&&e.length&&a&&qe[a]){var o=a==="cost"?t.cost:a==="benefit"?t.benefit:t.note;i=zt(o,e,70).html,s=qe[a],l=!0}else i=zt(t.plain,e,90).html;var u=ot(t).slice(0,4).map(function(d){return d.on?'<span class="on">'+T(d.t)+"</span>":T(d.t)}).join(" · "),f=r!==void 0&&r<8&&!J?' rise" style="-webkit-animation-delay:'+r*28+"ms;animation-delay:"+r*28+"ms":"";return'<article class="card'+f+'" data-act="open" data-id="'+t.id+'" role="button" tabindex="0"><div class="c-head"><span class="c-no">'+I(t)+'</span><span class="c-sec">'+T(n?n.title:"")+"</span>"+(t.best?'<span class="c-best">性价比极高</span>':"")+'</div><div class="c-cut"></div><div class="c-body"><h3 class="c-title">'+kt(t,e)+'</h3><p class="c-snip"><span class="lb'+(l?" other":"")+'">'+s+"</span>"+i+'</p></div><div class="c-foot"><span class="c-tags">'+u+"</span>"+Da(t)+"</div>"+ee(t)+"</article>"}var at=typeof WeakMap=="function"?new WeakMap:null;function re(t,e,a,r){var n=at&&at.get(t);n&&n.stop(),t.innerHTML="";var i=0,s=null,l=0,o=document.createElement("div");o.className="sentinel";var u=!1;function f(g){if(!u){for(var M=Math.min(e.length,i+g),y="";i<M;i++)y+=a(e[i],i);y&&t.insertAdjacentHTML("beforeend",y),i>=e.length&&d()}}function d(){s&&s.disconnect(),o.parentNode&&o.parentNode.removeChild(o),r&&e.length>6&&t.insertAdjacentHTML("beforeend",'<div class="list-end">'+r+"</div>"),u=!0}f(14),u||(t.appendChild(o),"IntersectionObserver"in window?(s=new IntersectionObserver(function(g){for(var M=0;M<g.length;M++)if(g[M].isIntersecting){f(30),u||t.appendChild(o);break}},{rootMargin:"800px 0px"}),s.observe(o)):function g(){f(40),u||(l=setTimeout(g,60))}());var p={stop:function(){u=!0,s&&s.disconnect(),clearTimeout(l)}};return at&&at.set(t,p),p}function ne(){return c.pool==="all"?H:Tt}function rt(){var t=ne();return t[Z("htlb|"+Mt.key+"|"+c.pool)%t.length]}function ht(t){var e=O[c.curId]||rt();c.curId=e.id;var a=e.id===rt().id&&!c.drawn.length,r=D[e.sec],n=h("#view-today"),i=ne(),s='<div class="hero"><div class="hero-row"><div class="hero-l"><div class="hero-date"><span class="mono">'+Mt.dot+"</span>"+Mt.week+'</div><h1 class="hero-title">'+(a?'今日<span class="hl">一条</span>':'再抽<span class="hl">一张</span>')+'</h1></div><div class="seg" role="radiogroup" aria-label="从哪里抽"><button type="button" role="radio" data-act="pool" data-v="best" aria-checked="'+(c.pool==="best")+'">精选 '+Tt.length+'</button><button type="button" role="radio" data-act="pool" data-v="all" aria-checked="'+(c.pool==="all")+'">全部 '+H.length+'</button></div></div><p class="hero-sub">'+(c.pool==="best"?"从「性价比极高」的 "+i.length+" 条里抽:不花钱、费时少、不靠毅力、收益大":"从全书 "+i.length+" 条建议里抽,什么都可能抽到")+'</p></div><div class="printer" aria-hidden="true"></div><div class="print-window" id="print-window">'+ja(e)+'</div><div class="today-actions"><button class="btn btn-primary" type="button" data-act="redraw">'+E("i-dice")+'再抽一张</button><button class="btn btn-ghost'+(c.favSet[e.id]?" is-on":"")+'" type="button" data-act="fav" data-id="'+e.id+'" aria-pressed="'+!!c.favSet[e.id]+'" aria-label="'+(c.favSet[e.id]?"取消收藏":"收藏")+'">'+E(c.favSet[e.id]?"i-heart-f":"i-heart")+'<span class="lbl">'+(c.favSet[e.id]?"已收藏":"收藏")+'</span></button><button class="btn btn-ghost" type="button" data-act="share" data-id="'+e.id+'" aria-label="生成分享图">'+E("i-share")+'<span class="lbl">分享图</span></button></div><div class="today-meta">'+(a?'<span class="draw-count">今天打开都是这一张</span>':'<button class="link-btn" type="button" data-act="back-today">'+E("i-back","ic-s")+" 回到今日这张</button>")+'<button class="link-btn muted" type="button" data-act="sec" data-sec="'+e.sec+'">第 '+e.sec+" 节共 "+(r?r.items.length:0)+" 条"+E("i-right")+"</button></div>"+pdfCard()+ea();n.innerHTML=s;var l=h("#print-window");t==="print"&&!J?(l.className="print-window is-printing",h(".ticket-wrap",l).className+=" late-stamp",setTimeout(function(){l.className="print-window"},700)):t==="rise"&&!J&&(h(".ticket-wrap",l).className+=" rise")}function ea(){return'<footer class="foot"><p><b>出处</b> 开源书《高性价比人生指南》,作者 eternity4719,github.com/eternity4719/HowToLiveBetter。正文按 CC BY 4.0 许可,本工具原样收录 '+H.length+' 条,未改写原文。</p><p><b>免责</b> 书里的内容可能过时,也可能有错,不少政策各地执行不一样。真去办事、看病、打官司时,以当地部门、医生和律师的说法为准。</p><p><b>声明</b> 本书项目从未发行、也不会发行任何代币或数字资产。用它名字发的币都和它无关,看到请当作骗局。</p><button class="link-btn" type="button" data-act="about">关于、许可与证据等级'+E("i-right")+"</button></footer>"}function za(){buzz();var t=ne(),e={};e[c.curId]=1,c.drawn.forEach(function(n){e[n]=1});var a=t.filter(function(n){return!e[n.id]});a.length||(c.drawn=[],a=t.filter(function(n){return n.id!==c.curId}));var r=a[Math.floor(Math.random()*a.length)];c.drawn.push(c.curId),c.curId=r.id,ht("print")}function Ya(){var t=h("#view-all"),e='<button class="chip" type="button" data-act="secpick" id="chip-sec"><span class="chip-in">选节'+E("i-down")+'</span></button><span class="chip-sep"></span><button class="chip red" type="button" data-act="chip" data-f="best"><span class="chip-in">性价比极高</span></button><button class="chip" type="button" data-act="chip" data-f="free"><span class="chip-in">不花钱</span></button><span class="chip-sep"></span><span class="chip-cap">证据</span>'+["A","B","C"].map(function(a){return'<button class="chip" type="button" data-act="chip" data-f="ev" data-v="'+a+'" aria-label="证据 '+a+' 级"><span class="chip-in">'+a+" 级</span></button>"}).join("")+'<span class="chip-sep"></span><span class="chip-cap">换回</span>'+Ue.map(function(a){return'<button class="chip" type="button" data-act="chip" data-f="kinds" data-v="'+a+'"><span class="chip-in">'+a+"</span></button>"}).join("");t.innerHTML='<div class="fbar" id="fbar"><div class="chips" id="chips">'+e+'</div><div class="countbar"><span class="count" id="count"></span><button class="clear-btn" type="button" data-act="clear" id="clear-btn" hidden>清空筛选</button></div></div><div class="hot" id="hot"><p class="hot-cap">大家常搜</p><div class="hot-list">'+aa()+'</div></div><div class="list" id="all-list"></div>',c.allBuilt=!0}function aa(t){return(t||Xe).map(function(e){return'<button class="hot-chip" type="button" data-act="hot" data-v="'+T(e)+'"><span>'+T(e)+"</span></button>"}).join("")}function qa(){var t=c.fl,e=[],a=Object.keys(t.secs).filter(function(i){return t.secs[i]});a.length===1?e.push("第 "+a[0]+" 节"):a.length>1&&e.push(a.length+" 个节"),t.best&&e.push("性价比极高"),t.free&&e.push("不花钱");var r=["A","B","C"].filter(function(i){return t.ev[i]});r.length&&e.push(r.join("/")+" 级");var n=Ue.filter(function(i){return t.kinds[i]});return n.length&&e.push("换回"+n.join("/")),e}function pt(){var t=c.fl;return t.best||t.free||K(t.ev)||K(t.kinds)||K(t.secs)}function X(){c.allBuilt||Ya();var t=c.fl;Y('#chips [data-act="chip"]').forEach(function(f){var d=f.getAttribute("data-f"),p=f.getAttribute("data-v"),g=p?!!t[d][p]:!!t[d];f.className="chip"+(d==="best"?" red":"")+(g?" on":""),f.setAttribute("aria-pressed",g)});var e=Object.keys(t.secs).filter(function(f){return t.secs[f]}),a=h("#chip-sec");a.className="chip"+(e.length?" on":""),h(".chip-in",a).innerHTML=(e.length===1?"第 "+e[0]+" 节":e.length?e.length+" 个节":"选节")+E("i-down");var r=qt(c.q,t);c.terms=r.terms;var n=r.list.length,i=qa(),s=r.terms.length?"找到<b>"+n+"</b>条":pt()?"筛出<b>"+n+"</b>条":"全书<b>"+n+"</b>条";i.length&&(s+=" · "+T(i.join(" · "))),h("#count").innerHTML=s,h("#clear-btn").hidden=!pt(),h("#hot").style.display=r.terms.length||pt()?"none":"";var l=h("#all-list");if(!n){var o=at&&at.get(l);o&&o.stop(),l.innerHTML=Ga(r.terms);return}var u=r.terms;re(l,r.list,function(f,d){return ae(f.it,u,f.where,d)},"— 到底了 · 共 "+n+" 条 —")}function Ga(t){var e=t.join(" "),a=Xe.filter(function(r){return t.indexOf(r)===-1}).slice(0,6);return'<div class="empty fade"><div class="empty-ticket"><i></i><i></i><i></i>'+ee({id:"empty",ev:"无"})+"</div><h3>"+(e?"没找到和「"+T(e)+"」有关的小票":"这样筛下来,一条也没有")+"</h3><p>"+(e?(t.length>1?"多个词要同时命中,试试少输一个词,或":"换个说法试试,或")+"用拼音首字母(比如 aqd)":"少选几个条件试试")+(pt()?";也可能是筛选条件太多了":"")+'</p><div class="hot-list">'+aa(a)+"</div>"+(pt()||e?'<button class="btn btn-line btn-sm" type="button" data-act="clear-all">清空搜索和筛选</button>':"")+"</div>"}function Wa(t,e){e?c.fl[t][e]=!c.fl[t][e]:c.fl[t]=!c.fl[t],X(),Lt()}function Lt(){var t=h("#fbar");if(t){var e=t.getBoundingClientRect().top+window.pageYOffset-fa();window.pageYOffset>e&&window.scrollTo(0,Math.max(0,e-4))}}function $a(){var t=h("#view-toc"),e=G.map(function(a){return'<button class="toc-row" type="button" data-act="sec" data-sec="'+a.sec+'"><span class="toc-num">'+(a.sec<10?"0":"")+a.sec+'</span><span class="toc-txt"><span class="toc-title" style="display:block">'+T(a.title)+'</span><span class="toc-meta" style="display:block">'+a.items.length+" 条"+(a.best?' · <span class="r">性价比极高 '+a.best+" 条</span>":"")+"</span></span>"+E("i-right")+"</button>"}).join("");t.innerHTML='<div class="view-head"><div><h1 class="view-title">目录</h1><p class="view-sub">'+G.length+" 节 · "+H.length+' 条建议</p></div></div><div class="toc">'+e+"</div>"+ea(),c.tocBuilt=!0}function ra(){var t=h("#view-fav"),e=c.favs.map(function(r){return O[r]}).filter(Boolean),a='<div class="view-head"><div><h1 class="view-title">收藏</h1><p class="view-sub">'+(e.length?"已收 "+e.length+" 张小票,按收藏时间排":"收藏只存在这台手机上")+"</p></div></div>";e.length?(t.innerHTML=a+'<div class="list" id="fav-list"></div>',re(h("#fav-list"),e,function(r,n){return ae(r,null,null,n)},"— 共 "+e.length+" 张 —")):t.innerHTML=a+'<div class="empty fade"><div class="empty-ticket"><i></i><i></i><i></i></div><h3>还没有收藏的小票</h3><p>看到有用的,点小票上的心形就能存下来。</p><button class="btn btn-primary btn-sm" type="button" data-act="tab" data-tab="today" style="flex:none;margin-top:16px">去抽一张</button></div>',c.favDirty=!1}function na(){var t=h("#fav-badge");t.textContent=c.favs.length>99?"99+":String(c.favs.length),t.hidden=!c.favs.length}function ia(t,e){var a=!!c.favSet[t];Y('[data-act="fav"][data-id="'+t+'"]').forEach(function(r){var n=r.classList.contains("btn"),i=r.className.replace(/\s*is-on|\s*pop/g,"");r.className=i+(a?" is-on":"")+(a&&!e&&!J?" pop":""),r.setAttribute("aria-pressed",a),r.setAttribute("aria-label",a?"取消收藏":"收藏");var s=h("use",r);s&&s.setAttribute("href",a?"#i-heart-f":"#i-heart");var l=h(".lbl",r);l&&n&&(l.textContent=a?"已收藏":"收藏")})}var Ka=Bt(function(){Wt("favs",{v:1,ids:c.favs}).then(function(t){t||bt("收藏没存进本机,关掉后可能丢失")})},60);function Va(t){buzz();O[t]&&(c.favSet[t]?(delete c.favSet[t],c.favs=c.favs.filter(function(e){return e!==t}),bt("已取消收藏")):(c.favSet[t]=1,c.favs.unshift(t),bt("已收进「收藏」")),ia(t),na(),c.favDirty=!0,c.tab,Ka())}var N=[];function mt(t,e){e=e||{};var a=h("#layers"),r=60+N.length*3,n=null,i=null;e.drawer&&(n=document.createElement("div"),n.className="scrim",n.style.zIndex=r,a.appendChild(n),i=document.createElement("div"),i.className="scrim-hit",i.style.zIndex=r,i.setAttribute("data-act","close"),i.setAttribute("aria-hidden","true"),a.appendChild(i));var s=document.createElement("div");s.className="sheet"+(e.drawer?" drawer":""),s.style.zIndex=r+1,s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),e.label&&s.setAttribute("aria-label",e.label),a.appendChild(s);var l={kind:t,el:s,scrim:n,hit:i,data:e.data||{}};return N.push(l),document.body.classList.add("is-locked"),e.render&&e.render(l),J?(s.classList.add("on"),n&&n.classList.add("on")):ve(function(){s.classList.add("on"),n&&n.classList.add("on")}),l}function U(t){var e=N.indexOf(t);if(e!==-1){N.splice(e,1),t.el.style.transform="",t.el.style.webkitTransform="",t.el.classList.remove("on"),t.scrim&&t.scrim.classList.remove("on"),t.hit&&t.hit.parentNode&&t.hit.parentNode.removeChild(t.hit);var a=function(){t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.scrim&&t.scrim.parentNode&&t.scrim.parentNode.removeChild(t.scrim)};setTimeout(a,J?0:360),N.length||document.body.classList.remove("is-locked")}}function Ht(){return N[N.length-1]||null}function sa(t){for(var e=N.length-1;e>=0;e--)if(N[e].el.contains(t))return N[e];return null}function ie(t,e){return'<div class="sb"><div class="sb-title">'+t+(e?"<small>"+e+"</small>":"")+"</div></div>"}function la(t,e){return'<div class="sb" data-drag="1"><span class="grip" aria-hidden="true"></span><div class="sb-title">'+t+(e?"<small>"+e+"</small>":"")+"</div></div>"}function oa(t,e){return'<button class="foot-back" type="button" data-act="close" aria-label="'+T(e||"返回")+'">'+E("i-left")+"<span>"+T(t||"返回")+"</span></button>"}function ca(){return'<button class="foot-close" type="button" data-act="close" aria-label="关闭">'+E("i-x")+"<span>关闭</span></button>"}function Xa(){var t=null;document.addEventListener("touchstart",function(a){var r=a.target.closest?a.target.closest("[data-drag]"):null;if(!(!r||!a.touches||a.touches.length!==1)){var n=sa(r);n&&(t={L:n,y0:a.touches[0].clientY,dy:0},n.el.style.transition="none")}},{passive:!0}),document.addEventListener("touchmove",function(a){t&&(t.dy=Math.max(0,a.touches[0].clientY-t.y0),t.L.el.style.transform="translateY("+t.dy+"px)",t.L.el.style.webkitTransform="translateY("+t.dy+"px)")},{passive:!0});function e(){if(t){var a=t.L;a.el.style.transition="",t.dy>90?U(a):(a.el.style.transform="",a.el.style.webkitTransform=""),t=null}}document.addEventListener("touchend",e),document.addEventListener("touchcancel",e)}function Ge(t,e){O[t]&&mt("detail",{label:"建议详情",data:{id:t,hist:[],terms:e||[]},render:Ct})}function Ua(t,e){var a=t.src||[];if(!a.length)return"";var r=3,n=a.map(function(i,s){var l=i[0],o=i[1],u=i[2]||[];return"<li"+(s>=r?' class="src-more" hidden':"")+">"+(l?'<b class="src-a">'+$(l,{terms:e})+"</b>":"")+(o?'<span class="src-t">'+$(o,{terms:e})+"</span>":"")+u.map(function(f){return'<span class="src-u">'+T(f)+"</span>"}).join("")+"</li>"}).join("");return'<section class="d-block"><h2 class="d-cap red">来源 · '+a.length+' 条</h2><ol class="src-list" id="d-src">'+n+"</ol>"+(a.length>r?'<button class="more-btn" type="button" data-act="src-more">展开其余 '+(a.length-r)+" 条来源"+E("i-down")+"</button>":"")+'<p class="ev-note">网址只以文字显示,小工具内不能跳转外部网页。</p></section>'}function Ct(t,e){var a=O[t.data.id],r=D[a.sec],n=t.data.terms,i=t.data.hist,s=St(a,-1),l=St(a,1),o=i.length?O[i[i.length-1].id]:null,u={sec:a.sec,refs:!0,terms:n},f=!!c.favSet[a.id],d=ie(I(a),T(r?r.title:""))+'<div class="sheet-body" id="d-body"><div class="'+(e?"rise":"")+'"><article class="d-ticket"><div class="t-pad"><div class="t-head"><span class="t-no">'+I(a)+'</span><span class="t-serial mono">No.'+W(a)+'</span></div><button class="sec-link" type="button" data-act="sec" data-sec="'+a.sec+'">'+T(r?r.title:"")+E("i-right")+'</button></div><div class="t-cut"></div><div class="t-pad" style="padding-top:0"><h1 class="d-title">'+kt(a,n)+"</h1>"+Qe(a)+'</div><div class="t-cut" style="margin-top:6px"></div>'+ta(a,!0,n)+'<div class="t-cut" style="margin-top:4px"></div>'+(lt.ready?"":'<section class="d-block"><p class="ev-note">正在载入收益原文、备注和来源…</p></section>')+(a.benefit?'<section class="d-block"><h2 class="d-cap gain">收益 · 原文</h2><div class="d-text">'+Dt(a.benefit,u)+"</div></section>":"")+(a.note?'<section class="d-block"><h2 class="d-cap">备注</h2><div class="d-text">'+Dt(a.note,u)+"</div></section>":"")+Ua(a,n)+'<div class="t-foot">'+Ze(a)+'<span class="t-serial mono">HTLB·'+W(a)+'</span></div></article><button class="btn btn-line share-inline" type="button" data-act="share" data-id="'+a.id+'">'+E("i-share")+'生成分享图</button><p class="d-license">原文出自《高性价比人生指南》'+I(a).replace(" · ","")+' · 作者 eternity4719 · CC BY 4.0<br>本工具原样收录,只做排版与互链;内容可能过时,以当地部门、医生、律师为准</p></div></div><div class="dbar"><button class="foot-back" type="button" data-act="d-back" aria-label="'+(o?"返回 "+I(o):"返回")+'">'+E("i-left")+"<span>返回"+(o?"<small>"+o.sec+"-"+o.n+"</small>":"")+'</span></button><button class="pn-btn" type="button" data-act="d-step" data-d="-1" aria-label="上一条'+(s?" "+I(s):"")+'"'+(s?"":" disabled")+">"+E("i-left","ic-s")+'<span>上一条</span></button><button class="pn-btn" type="button" data-act="d-step" data-d="1" aria-label="下一条'+(l?" "+I(l):"")+'"'+(l?"":" disabled")+"><span>下一条</span>"+E("i-right","ic-s")+'</button><button class="fav-btn'+(f?" is-on":"")+'" type="button" data-act="fav" data-id="'+a.id+'" aria-pressed="'+f+'" aria-label="'+(f?"取消收藏":"收藏")+'">'+E(f?"i-heart-f":"i-heart")+"</button></div>";t.el.innerHTML=d}function We(t,e,a){O[e]&&(a&&t.data.hist.push({id:t.data.id,y:h("#d-body",t.el)?h("#d-body",t.el).scrollTop:0}),t.data.id=e,t.data.terms=[],Ct(t,!0))}function Ja(t){var e=t.data.hist.pop();if(!e)return U(t);t.data.id=e.id,Ct(t,!0);var a=h("#d-body",t.el);a&&(a.scrollTop=e.y||0)}function Za(t){var e=D[t];e&&mt("section",{label:"第 "+t+" 节",data:{sec:t},render:function(a){a.el.innerHTML=ie("第 "+t+" 节",e.items.length+" 条")+'<div class="sheet-body"><div class="sec-hero"><div class="sec-big">'+(t<10?"0":"")+t+"<small>/ "+G.length+' 节</small></div><h1 class="sec-title">'+T(e.title)+"</h1>"+(e.intro?'<p class="sec-intro is-clip" id="sec-intro">'+$(e.intro,{sec:t,refs:!1})+'</p><button class="more-btn" type="button" data-act="intro-more">展开导语'+E("i-down")+"</button>":"")+'<div class="sec-stats"><span class="tag">'+e.items.length+" 条</span>"+(e.best?'<span class="tag best">性价比极高 '+e.best+" 条</span>":"")+'</div></div><div class="list" id="sec-list-'+t+'"></div></div><div class="dbar">'+oa("返回","返回上一页")+'<span class="dbar-info">第 '+t+" 节 · "+T(e.title)+"</span></div>",re(h("#sec-list-"+t,a.el),e.items,function(r,n){return ae(r,null,null,n)},"— 第 "+t+" 节完 —")}})}function Qa(){var t={};for(var e in c.fl.secs)c.fl.secs[e]&&(t[e]=1);mt("secpick",{drawer:!0,label:"按节筛选",data:{tmp:t},render:function(a){a.el.innerHTML=la("按节筛选","可多选 · 下拉关闭")+'<div class="sheet-body" style="padding-top:6px"><div class="secgrid">'+G.map(function(r){return'<button class="sec-opt'+(t[r.sec]?" on":"")+'" type="button" data-act="sec-opt" data-sec="'+r.sec+'" aria-pressed="'+!!t[r.sec]+'"><span class="n">'+r.sec+'</span><span class="t">'+T(r.title)+'</span><span class="c">'+r.items.length+"</span></button>"}).join("")+'</div></div><div class="drawer-foot"><button class="btn btn-line" type="button" data-act="sec-reset">不限节</button><button class="btn btn-primary" type="button" data-act="sec-apply" id="sec-apply"></button>'+ca()+"</div>",Zt(a)}})}function Zt(t){var e={};for(var a in c.fl)e[a]=c.fl[a];e.secs=t.data.tmp;var r=qt(c.q,e).list.length,n=h("#sec-apply",t.el);n&&(n.textContent="看 "+r+" 条")}function da(){var t=window.xhs;return t&&t.miniTool||null}var PDF_URL="./高性价比人生指南-765条建议全集.pdf",PDF_NAME="高性价比人生指南-765条建议全集.pdf",pdfBusy=!1,followBusy=!1,followState=null;function buzz(){var t=da();try{t&&typeof t.vibrateShort==="function"&&t.vibrateShort({type:"light"})}catch(e){}}function followed(t){return t===!0||!!(t&&(t.isFollowed===!0||t.followed===!0||t.followStatus==="followed"||t.status==="followed"||t.status===1))}async function getFollow(){var t=da();if(!t||typeof t.getFollowStatus!=="function")return null;try{return followed(await At(t.getFollowStatus(),2500))}catch(e){return!1}}async function ensureFollow(){var t=da();if(!t)return!0;if(followState===!0)return!0;if(typeof t.getFollowStatus!=="function"){bt("当前版本无法确认关注状态,请升级小红书后重试");return!1}var e=await getFollow();if(e){followState=!0;return!0}if(followBusy)return!1;followBusy=!0;bt("关注作者后即可导出 765 条全集");try{if(typeof t.followAuthor!=="function"){bt("请先关注作者,再点击导出");return!1}await At(t.followAuthor(),5000);var a=await getFollow();if(a){followState=!0;bt("已关注,正在准备全集 PDF");return!0}bt("还未检测到关注,请完成关注后再试")}catch(r){bt("请完成关注后再试")}finally{followBusy=!1}return!1}function pdfPath(t){return t||PDF_URL}function pdfCard(){return'<section class="pdf-card"><div><span class="pdf-kicker">全集资料包</span><h2>导出 765 条建议 · PDF</h2><p>310 页 · 34 节 · A4 排版,适合收藏、打印,也可以分享给微信好友。</p></div><button class="btn btn-primary btn-sm" type="button" data-act="pdf">导出全集</button></section>'}function pdfPanel(){var t=mt("pdf",{drawer:!0,label:"导出 765 条建议全集 PDF",render:function(e){e.el.innerHTML=la("765 条建议全集 PDF","A4 · 310 页 · 34 节")+'<div class="sheet-body pdf-body"><img class="pdf-cover-img" src="./cover-3x4.jpg" alt="高性价比人生 765 条建议全集 3:4 封面" width="1086" height="1448"><div class="pdf-cover"><span class="pdf-count">765</span><b>条建议全集</b><small>《高性价比人生指南》 · CC BY 4.0</small></div><div class="pdf-copy"><h2>把 765 笔人生账带走</h2><p>按原书章节完整收录,适合离线阅读、打印和转发。导出文件前需要先关注作者。</p><ul><li>全书 765 条 · 34 节</li><li>A4 · 310 页 · 含目录与页内跳转</li><li>不会上传收藏、搜索或个人信息</li></ul></div><div class="pdf-status" id="pdf-status">准备好后点击下方按钮</div></div><div class="drawer-foot pdf-foot"><button class="btn btn-ghost" type="button" data-act="pdf-share">分享给微信</button><button class="btn btn-primary" type="button" data-act="pdf-export">关注后导出</button>'+ca()+"</div>"}});return t}function pdfFile(t){return pdfPath(t)}async function exportPdf(){if(pdfBusy)return;buzz();pdfBusy=!0;var t=da(),e=await ensureFollow();if(!e){pdfBusy=!1;return}var a=h("#pdf-status");a&&(a.textContent="正在准备 PDF…");try{var r=await pdfFile(t);if(t&&typeof t.saveFile==="function")await At(t.saveFile({filePath:r}),8000);else if(t&&typeof t.openDocument==="function")await At(t.openDocument({filePath:r}),8000);else if(!t)location.href=PDF_URL;else throw new Error("unsupported");a&&(a.textContent="导出完成,可在文件或微信中分享");bt("765 条建议全集已准备好")}catch(n){a&&(a.textContent="导出失败,请重试");bt("PDF 导出失败,请稍后重试")}finally{pdfBusy=!1}}async function sharePdf(){if(pdfBusy)return;buzz();pdfBusy=!0;var t=da(),e=await ensureFollow();if(!e){pdfBusy=!1;return}try{if(!t){location.href=PDF_URL;bt("已打开 PDF,可用浏览器或微信分享");return}var a=await pdfFile(t);if(typeof t.shareFile==="function")await At(t.shareFile({filePath:a,title:PDF_NAME}),8000);else if(typeof t.share==="function")await At(t.share({title:PDF_NAME,content:"《高性价比人生指南》765 条建议全集 PDF"}),8000);else throw new Error("unsupported");bt("已打开分享面板,可发送给微信好友")}catch(r){bt("当前版本暂不支持文件分享,请先导出 PDF 后分享")}finally{pdfBusy=!1}}function tr(t){buzz();var e=O[t];if(e){var a=da(),r=mt("share",{drawer:!0,label:"分享图",data:{id:t},render:function(n){n.el.innerHTML=la("分享图","1080 × 1440 · 3:4")+'<div class="sheet-body" id="share-body"><div class="printing"><div class="mini-printer"></div><div class="mini-paper"><i></i><i></i><i></i><i></i></div><p>正在打印小票…</p></div></div><div class="drawer-foot" id="share-foot">'+(a?'<button class="btn btn-ghost" type="button" data-act="save-img" disabled>'+E("i-save")+'存到相册</button><button class="btn btn-primary" type="button" data-act="post-note" disabled>'+E("i-pen")+"发成笔记</button>":'<span class="foot-note">长按保存��可用,请在小红书 App 内使用</span>')+ca()+"</div>"}});setTimeout(function(){var n="",i=0,s=0;try{var l=Pe(e,{date:Mt.dot});i=l.width,s=l.height,n=l.toDataURL("image/png")}catch(u){n=""}r.data.url=n;var o=h("#share-body",r.el);if(o){if(!n){o.innerHTML='<div class="empty"><h3>分享图没画出来</h3><p>这台设备的画布不可用,请稍后再试。</p></div>';return}Y("#share-foot [disabled]",r.el).forEach(function(u){u.disabled=!1}),o.innerHTML='<div class="share-stage fade"><img class="share-img" id="share-img" alt="'+T(I(e)+" 分享图")+'" width="'+i+'" height="'+s+'" src="'+n+'"></div>'+(a?'<p class="share-note">图上已注明出处与 CC BY 4.0 许可</p>':'<p class="share-note"><b>长按保存不可用,请在小红书 App 内使用</b><br>在小红书 App 里打开这个小工具,就能一键存到相册或发成笔记。</p>')}},J?0:260)}}async function $e(t,e){var a=da(),r=O[t.data.id];if(!(!a||!t.data.url||!r)){var n=t.data.url;try{if(typeof a.writeTempFile=="function"){var i=await a.writeTempFile({data:t.data.url});i&&i.filePath&&(n=i.filePath)}}catch(s){n=t.data.url}try{if(e==="save"){if(typeof a.saveImageToPhotosAlbum!="function")throw new Error("unsupported");await a.saveImageToPhotosAlbum({filePath:n}),bt("已存到相册")}else{if(typeof a.postNote!="function")throw new Error("unsupported");await a.postNote({title:De(r),content:je(r),pageType:"photo_publish",mediaInfo:{image_resources:[{url:n}]}})}}catch(s){bt(e==="save"?"没存上:可能没开相册权限,或客户端版本太旧":"没能打开发笔记页,请稍后再试")}}}function er(){mt("about",{label:"关于高性价比人生",render:function(t){var e=["A","B","C"].map(function(a){return'<div class="ev-line"><span class="stamp-wrap" style="transform:rotate(-10deg);-webkit-transform:rotate(-10deg)">'+Je(a)+"</span><p><b>"+a+" 级</b> "+T(Ft[a])+"。</p></div>"}).join("");t.el.innerHTML=ie("关于高性价比人生","出处 · 许可 · 免责")+'<div class="sheet-body about"><h2>这是什么</h2><div class="box"><p><b>高性价比人生</b>是一个小红书小工具:把开源书《高性价比人生指南》里的 '+H.length+' 条建议,做成一张张小票:每天抽一张,也能搜、能筛、能收藏、能生成分享图。书的主旨是「用最少的钱、时间和精力,换回最多的寿命、金钱和人身自由」。</p></div><h2>怎么读一张小票</h2><div class="box"><p><b>花掉</b>=原书的「成本」;<b>换回</b>=原书的「说人话」;<b>证据</b>=原书的「证据等级」。点开小票能看到收益原文、备注和来源。</p><p style="margin-top:8px"><b>性价比极高</b>=不花钱、费时少、不靠毅力、收益大,四项同时满足,全书共 '+Tt.length+' 条。原书说:「用时少」指一次花几分钟以内,或顺手就能做。</p></div><div class="box">'+e+'<p class="fine" style="margin-top:6px">原书补充:A 级只说明「有具体数字、出处可核」,不说明这个数字一定是因果。法律和政策类条目的 A 级,指的是引到了法条或官方文件原文。</p></div><h2>出处与许可</h2><div class="box"><p>内容来自开源书《高性价比人生指南》,作者 eternity4719,仓库 github.com/eternity4719/HowToLiveBetter。</p><p>正文以 CC BY 4.0 发布(creativecommons.org/licenses/by/4.0/),允许转载、改编、商用,但须写明出处。</p><p class="fine" style="margin-top:6px">改动说明:本工具没有改写正文,只做了排版、截断显示、检索高亮和条目互链;数据同步于 '+T(ye||"—")+'。书里的法条、补贴标准和截止日期经常更新,以原仓库为准。</p></div><h2>免责声明</h2><div class="box warn"><p>书里的内容可能过时,也可能有错,不少政策各地执行不一样。真去办事、看病、打官司时,以当地部门、医生和律师的说法为准。</p></div><h2>关于代币</h2><div class="box warn"><p>原书作者声明:本项目从未发行、也不会发行任何代币或数字资产。用本项目名字发的币都和本项目无关,作者不领取、不认领任何相关收益。看到这类币请当作骗局,别买。</p></div><h2>隐私</h2><div class="box"><p>收藏和偏好只存在这台手机上(小红书小工具本地缓存;低版本客户端用浏览器本地存储),不上传。清理数据后可能丢失。</p></div><p class="fine" style="text-align:center;margin:20px 0 6px">高性价比人生 · 小红书小工具</p></div><div class="dbar">'+oa("返回","关闭关于页")+'<span class="dbar-info">高性价比人生</span></div>'}})}var Ke=0;function bt(t){var e=h("#toast");e.textContent=t,e.classList.add("on"),clearTimeout(Ke),Ke=setTimeout(function(){e.classList.remove("on")},1800)}function fa(){var t=h("#top").offsetHeight;return t}function Qt(t){if(ze.indexOf(t)!==-1){for(;N.length;)U(N[N.length-1]);if(t===c.tab){window.scrollTo(0,0);return}c.scroll[c.tab]=window.pageYOffset,c.tab=t,ze.forEach(function(e){h("#view-"+e).className="view"+(e===t?" is-on":"")}),Y(".tab").forEach(function(e){var a=e.getAttribute("data-tab")===t;e.className="tab"+(a?" is-on":""),a?e.setAttribute("aria-current","page"):e.removeAttribute("aria-current")}),t==="all"&&It(),t==="toc"&&!c.tocBuilt&&$a(),t==="fav"&&c.favDirty&&ra(),window.scrollTo(0,c.scroll[t]||0)}}var nt=!0;function It(){(nt||!c.allBuilt)&&(X(),nt=!1)}function ar(t){var e=t.target.closest?t.target.closest("[data-act]"):null;if(!(!e||e.disabled)){var a=e.getAttribute("data-act"),r=e.getAttribute("data-id"),n=sa(e);switch(a){case"tab":Qt(e.getAttribute("data-tab"));break;case"about":er();break;case"pdf":pdfPanel();break;case"pdf-export":exportPdf();break;case"pdf-share":sharePdf();break;case"open":Ge(r,c.tab==="all"&&!n?c.terms:[]);break;case"fav":t.stopPropagation(),Va(r);break;case"share":tr(r);break;case"redraw":za();break;case"back-today":c.drawn=[],c.curId=rt().id,ht("rise");break;case"pool":var i=e.getAttribute("data-v");i!==c.pool&&(c.pool=i,c.drawn=[],c.curId=rt().id,ht("print"),Wt("prefs",{pool:c.pool}));break;case"chip":Wa(e.getAttribute("data-f"),e.getAttribute("data-v"));break;case"secpick":Qa();break;case"clear":c.fl=Jt(),X();break;case"clear-all":c.fl=Jt(),te(""),X();break;case"hot":te(e.getAttribute("data-v")),nt=!0,c.tab!=="all"?Qt("all"):It(),Lt();break;case"sec":Za(Number(e.getAttribute("data-sec")));break;case"ref":n&&n.kind==="detail"?We(n,r,!0):Ge(r);break;case"d-back":n&&Ja(n);break;case"d-step":if(n){var s=O[n.data.id],l=St(s,Number(e.getAttribute("data-d")));l&&We(n,l.id,!1);var o=h("#d-body",n.el);o&&(o.scrollTop=0)}break;case"close":n?U(n):Ht()&&U(Ht());break;case"src-more":Y("#d-src .src-more",n?n.el:document).forEach(function(d){d.hidden=!1}),e.parentNode.removeChild(e);break;case"intro-more":var u=h("#sec-intro",n?n.el:document);u&&u.classList.remove("is-clip"),e.parentNode.removeChild(e);break;case"sec-opt":if(n){var f=e.getAttribute("data-sec");n.data.tmp[f]?delete n.data.tmp[f]:n.data.tmp[f]=1,e.className="sec-opt"+(n.data.tmp[f]?" on":""),e.setAttribute("aria-pressed",!!n.data.tmp[f]),Zt(n)}break;case"sec-reset":n&&(n.data.tmp={},Y(".sec-opt",n.el).forEach(function(d){d.className="sec-opt",d.setAttribute("aria-pressed","false")}),Zt(n));break;case"sec-apply":n&&(c.fl.secs=n.data.tmp,U(n),X(),Lt());break;case"save-img":n&&$e(n,"save");break;case"post-note":n&&$e(n,"note");break}}}function te(t){var e=h("#q");e.value=t,c.q=t,h("#q-clear").hidden=!t}var Ve=Bt(function(){c.q=h("#q").value,nt=!0,c.tab!=="all"?Qt("all"):It(),Lt()},120);function rr(){document.addEventListener("click",ar),Xa(),document.addEventListener("keydown",function(n){var i=n.key;i==="Tab"&&document.documentElement.classList.add("kbd"),(i==="Enter"||i===" ")&&n.target&&n.target.getAttribute&&/^(button|link)$/.test(n.target.getAttribute("role")||"")&&(n.preventDefault(),n.target.click()),i==="Escape"&&Ht()&&U(Ht())});var t=h("#q"),e=!1;t.addEventListener("compositionstart",function(){e=!0}),t.addEventListener("compositionend",function(){e=!1,Ve()}),t.addEventListener("input",function(){h("#q-clear").hidden=!t.value,e||Ve()}),t.addEventListener("keydown",function(n){n.key==="Enter"&&t.blur()}),t.addEventListener("focus",function(){h("#search").className="search is-focus"}),t.addEventListener("blur",function(){h("#search").className="search"}),h("#q-clear").addEventListener("click",function(){te(""),X(),t.focus()});var a=h("#top"),r=!1;window.addEventListener("scroll",function(){r||(r=!0,requestAnimationFrame(function(){r=!1;var n=window.pageYOffset>2;n!==a.classList.contains("is-scrolled")&&a.classList.toggle("is-scrolled",n)}))},{passive:!0}),window.addEventListener("resize",ua)}function ua(){document.documentElement.style.setProperty("--top-h",fa()+"px")}function nr(){rr(),ua(),c.curId=rt().id,ht("rise"),window.__htlbReady=Date.now()-Fa;try{window.__htlbReadyAt=Math.round(performance.now()),window.__htlbAppStart=Pa}catch(t){}$t("prefs").then(function(t){t&&(t.pool==="all"||t.pool==="best")&&t.pool!==c.pool&&!c.drawn.length&&(c.pool=t.pool,c.curId=rt().id,ht())}),$t("favs").then(function(t){var e=t&&t.ids&&t.ids.filter?t.ids:[];e=e.filter(function(r){return typeof r=="string"&&O[r]});var a=c.favs.slice();e.forEach(function(r){a.indexOf(r)===-1&&a.push(r)}),c.favs=a,c.favSet={},a.forEach(function(r){c.favSet[r]=1}),a.forEach(function(r){ia(r,!0)}),na(),c.favDirty=!0,c.tab==="fav"&&ra()}),we(function(){try{window.__htlbFullAt=Math.round(performance.now())}catch(t){}c.q&&(nt=!0,c.tab==="all"&&It()),N.forEach(function(t){if(t.kind==="detail"){var e=h("#d-body",t.el),a=e?e.scrollTop:0;Ct(t),e=h("#d-body",t.el),e&&(e.scrollTop=a)}})}),setTimeout(function(){c.allBuilt||(X(),nt=!1)},400)}H.length?nr():h("#view-today").innerHTML='<div class="empty"><h3>数据没有加载出来</h3><p>请重新打开小工具。</p></div>';})();
|
htlb/miniapp/tool/cover-3x4.jpg
ADDED
|
Git LFS Details
|
htlb/miniapp/tool/icon.png
ADDED
|
|
Git LFS Details
|
htlb/miniapp/tool/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
<meta name="theme-color" content="#F6F1E7">
|
| 7 |
<meta name="format-detection" content="telephone=no">
|
| 8 |
<title>高性价比人生</title>
|
| 9 |
-
<link rel="icon" href="./icon.
|
| 10 |
<link rel="stylesheet" href="./style.css">
|
| 11 |
</head>
|
| 12 |
<body>
|
|
|
|
| 6 |
<meta name="theme-color" content="#F6F1E7">
|
| 7 |
<meta name="format-detection" content="telephone=no">
|
| 8 |
<title>高性价比人生</title>
|
| 9 |
+
<link rel="icon" href="./icon.png" type="image/png">
|
| 10 |
<link rel="stylesheet" href="./style.css">
|
| 11 |
</head>
|
| 12 |
<body>
|
htlb/miniapp/tool/style.css
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
:root{--paper: #F6F1E7;--ink: #17171B;--red: #FF2442;--red-d: #E0002A;--mint: #12B886;--mint-d: #0B7A57;--yellow: #FFD43B;--white: #FFFFFF;--muted: rgba(23, 23, 27, .66);--faint: rgba(23, 23, 27, .5);--line: rgba(23, 23, 27, .14);--dash: rgba(23, 23, 27, .26);--sticker: 0 0 0 1px rgba(23, 23, 27, .04), 0 1px 2px rgba(23, 23, 27, .08), 0 4px 12px -2px rgba(23, 23, 27, .12);--lift: 0 0 0 1px rgba(23, 23, 27, .04), 0 2px 6px rgba(23, 23, 27, .06), 0 12px 28px -10px rgba(23, 23, 27, .22);--spring: cubic-bezier(.34, 1.56, .64, 1);--ease: cubic-bezier(.2, .9, .25, 1);--sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;--mono: "SFMono-Regular", Menlo, "Roboto Mono", "DejaVu Sans Mono", monospace;--top-h: 64px;--safe-t: 0px;--safe-b: 0px}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}html,body{margin:0;padding:0}body{min-height:100vh;background-color:var(--paper);background-image:radial-gradient(rgba(23,23,27,.075) 1px,transparent 1.4px);background-size:18px 18px;color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.7;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;overflow-wrap:break-word;word-wrap:break-word;line-break:strict;-webkit-line-break:strict;overflow-x:hidden}body.is-locked{overflow:hidden}img,svg{display:block}button{font:inherit;color:inherit;background:none;border:0;margin:0;padding:0;cursor:pointer;-webkit-appearance:none;appearance:none;touch-action:manipulation}button:focus,input:focus,[tabindex]:focus{outline:none}.kbd button:focus,.kbd [tabindex]:focus{outline:2px solid var(--ink);outline-offset:2px}h1,h2,h3,h4,p,dl,dd,dt{margin:0}.mono{font-family:var(--mono);letter-spacing:0}.nobr{white-space:nowrap}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.ic{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.ic-s{width:18px;height:18px}.ic-fill{fill:currentColor;stroke:none}.p,.rich{text-wrap:pretty;text-spacing-trim:space-first}mark{color:var(--ink);background-color:transparent;background-image:linear-gradient(transparent 54%,var(--yellow) 54%,var(--yellow) 94%,transparent 94%);padding:0 1px;margin:0 -1px;-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:2px}.hl{background-image:linear-gradient(transparent 58%,var(--yellow) 58%,var(--yellow) 92%,transparent 92%);padding:0 2px;margin:0 -2px;color:var(--ink)}.top{position:-webkit-sticky;position:sticky;top:0;z-index:30;background:var(--paper);padding-top:0;padding-top:env(safe-area-inset-top,0px);transition:box-shadow .2s}.top.is-scrolled{box-shadow:0 1px 0 var(--line),0 6px 16px -10px rgba(23,23,27,.25)}.navzone{height:56px;display:flex;align-items:center;justify-content:center;padding:0 100px;pointer-events:none}.nav-title{display:flex;align-items:center;font-size:16px;font-weight:900;letter-spacing:1px;white-space:nowrap}.nav-title .logo-in{width:24px;height:24px;line-height:24px;font-size:13px;border-radius:7px;margin-right:7px;box-shadow:0 0 0 2px var(--white),0 2px 5px rgba(23,23,27,.2)}.top-in{display:flex;align-items:center;padding:0 8px 8px 16px}.logo-in{width:36px;height:36px;border-radius:11px;background:var(--red-d);color:var(--white);font-weight:900;font-size:19px;line-height:36px;text-align:center;box-shadow:0 0 0 2.5px var(--white),0 3px 8px rgba(23,23,27,.2);transform:rotate(-6deg);display:inline-block}.search{flex:1;min-width:0;height:44px;margin:0 4px 0 0;display:flex;align-items:center;background:var(--white);border-radius:22px;box-shadow:0 0 0 1.5px rgba(23,23,27,.12),0 2px rgba(23,23,27,.04),0 6px 14px -6px rgba(23,23,27,.18);padding-left:13px;transition:box-shadow .2s}.search.is-focus{box-shadow:0 0 0 2px var(--ink),0 6px 14px -6px rgba(23,23,27,.25)}.search .ic{color:var(--muted);width:20px;height:20px}.search input{flex:1;min-width:0;height:44px;border:0;background:transparent;outline:none;font:inherit;font-size:16px;color:var(--ink);padding:0 4px 0 8px;margin:0;-webkit-appearance:none;appearance:none;border-radius:0}.search input::-webkit-search-cancel-button,.search input::-webkit-search-decoration{-webkit-appearance:none;display:none}.search input::-webkit-input-placeholder{color:rgba(23,23,27,.45)}.search input::placeholder{color:rgba(23,23,27,.45)}.search-x{width:44px;height:44px;display:flex;align-items:center;justify-content:center;color:var(--muted);flex-shrink:0}.search-x[hidden]{display:none}.search-x .dot{width:22px;height:22px;border-radius:11px;background:rgba(23,23,27,.1);display:flex;align-items:center;justify-content:center}.icon-btn{width:44px;height:44px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:22px}.icon-btn:active{background:rgba(23,23,27,.06)}.views{padding-bottom:84px;padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}.view{display:none;padding:4px 16px 16px}.view.is-on{display:block}.view-head{display:flex;align-items:flex-end;justify-content:space-between;padding:10px 2px 12px}.view-title{font-size:26px;font-weight:900;line-height:1.25;letter-spacing:.5px}.view-sub{font-size:13px;color:var(--muted);font-weight:600}.hero{padding:4px 2px 10px}.hero-row{display:flex;align-items:flex-end;justify-content:space-between}.hero-l{min-width:0}.hero-date{font-size:12.5px;color:var(--muted);font-weight:700;display:flex;align-items:center;line-height:1.5}.hero-date .mono{font-weight:700;margin-right:8px;color:var(--ink)}.hero-title{font-size:30px;line-height:1.3;font-weight:900;letter-spacing:1px;white-space:nowrap}.hero-sub{font-size:12.5px;line-height:1.6;color:var(--muted);margin-top:6px}.seg{display:flex;flex-shrink:0;background:rgba(23,23,27,.07);border-radius:24px;padding:2px}.seg button{height:44px;min-width:44px;padding:0 12px;border-radius:22px;font-size:13px;font-weight:800;color:var(--muted);white-space:nowrap;transition:background .2s,color .2s,box-shadow .2s}.seg button[aria-checked=true]{background:var(--white);color:var(--ink);box-shadow:0 1px 2px rgba(23,23,27,.12),0 3px 8px -2px rgba(23,23,27,.18)}.seg-wrap{position:relative;padding-top:3px;padding-bottom:3px}.printer{position:relative;z-index:2;height:22px;border-radius:11px;background:var(--ink);margin:6px 0 0;box-shadow:0 6px 12px -6px rgba(23,23,27,.6)}.printer:before{content:"";position:absolute;left:16px;right:16px;top:12px;height:3px;border-radius:2px;background:rgba(255,255,255,.22)}.printer:after{content:"";position:absolute;right:14px;top:6px;width:6px;height:6px;border-radius:3px;background:var(--mint);box-shadow:-12px 0 rgba(255,255,255,.3)}.print-window{position:relative;z-index:1;margin:-10px -2px 0;padding:0 12px 24px;overflow:hidden}.print-window.is-printing .ticket-wrap{-webkit-animation:print .62s cubic-bezier(.3,.7,.35,1.06) both;animation:print .62s cubic-bezier(.3,.7,.35,1.06) both}@-webkit-keyframes print{0%{-webkit-transform:translateY(-100%)}30%{-webkit-transform:translateY(-66%)}34%{-webkit-transform:translateY(-64%)}64%{-webkit-transform:translateY(-20%)}68%{-webkit-transform:translateY(-17%)}to{-webkit-transform:translateY(0)}}@keyframes print{0%{transform:translateY(-100%)}30%{transform:translateY(-66%)}34%{transform:translateY(-64%)}64%{transform:translateY(-20%)}68%{transform:translateY(-17%)}to{transform:translateY(0)}}.today-actions{display:flex;align-items:stretch;margin:-6px -16px 0;padding:14px 16px 8px;position:-webkit-sticky;position:sticky;z-index:5;bottom:60px;bottom:calc(60px + env(safe-area-inset-bottom,0px));background:linear-gradient(rgba(246,241,231,0),#f6f1e7 34%)}.btn{height:52px;padding:0 18px;border-radius:26px;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:800;white-space:nowrap;transition:-webkit-transform .15s;transition:transform .15s}.btn:active{-webkit-transform:scale(.97);transform:scale(.97)}.btn .ic{margin-right:7px}.btn-primary{flex:1;background:var(--red-d);color:var(--white);box-shadow:0 0 0 3px var(--white),0 8px 18px -6px rgba(224,0,42,.55)}.btn-ghost{background:var(--white);color:var(--ink);box-shadow:0 0 0 3px var(--white),var(--sticker);margin-left:12px;padding:0 15px}.btn-ghost.is-on{color:var(--red-d)}.btn-line{background:transparent;box-shadow:inset 0 0 0 1.5px rgba(23,23,27,.2);height:48px;border-radius:24px;font-size:15px}.btn-ink{background:var(--ink);color:var(--white)}.btn-sm{height:44px;border-radius:22px;font-size:14px;padding:0 16px}.btn[disabled]{opacity:.5}.today-meta{display:flex;align-items:center;justify-content:space-between;margin-top:6px;min-height:44px}.link-btn{min-height:44px;display:inline-flex;align-items:center;font-size:14px;font-weight:700;color:var(--ink);padding:0 2px}.link-btn .ic{width:16px;height:16px;margin-left:2px}.link-btn.muted{color:var(--muted)}.draw-count{font-size:13px;color:var(--muted);font-weight:600}.ticket-wrap{position:relative;-webkit-filter:drop-shadow(0 10px 16px rgba(23,23,27,.13));filter:drop-shadow(0 10px 16px rgba(23,23,27,.13))}.ticket{position:relative;background:var(--white);border-radius:6px 6px 0 0;cursor:pointer}.ticket:after{content:"";position:absolute;left:0;right:0;bottom:-11px;height:12px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M0 0h16L8 11z' fill='%23fff'/%3E%3C/svg%3E");background-repeat:repeat-x;background-size:16px 12px}.t-pad{padding:18px 20px 0}.t-head{display:flex;align-items:baseline;justify-content:space-between}.t-no{font-size:15px;font-weight:900;letter-spacing:.5px}.t-serial{font-size:12px;color:var(--muted);font-weight:700}.t-sec{font-size:13px;color:var(--muted);font-weight:600;margin-top:2px;line-height:1.5}.t-cut{position:relative;height:0;margin:16px 0;border-top:2px dashed var(--dash)}.t-cut:before,.t-cut:after{content:"";position:absolute;top:-10px;width:18px;height:18px;border-radius:9px;background:var(--paper)}.t-cut:before{left:-9px}.t-cut:after{right:-9px}.t-title{font-size:23px;line-height:1.45;font-weight:900;letter-spacing:.3px}.ticket.big .t-title{font-size:24px}.tags{display:flex;flex-wrap:wrap;margin:12px -3px 0}.tag{display:inline-block;height:28px;line-height:24px;padding:0 10px;margin:0 3px 7px;border-radius:14px;font-size:12.5px;font-weight:700;white-space:nowrap;background:var(--white);color:var(--ink);border:2px solid var(--white);box-shadow:0 0 0 1px rgba(23,23,27,.14),0 2px 5px -1px rgba(23,23,27,.14)}.tag.on{background:rgba(18,184,134,.12);color:var(--mint-d);box-shadow:0 0 0 1px rgba(11,122,87,.28),0 2px 5px -1px rgba(23,23,27,.12)}.tag.best{background:var(--red-d);color:var(--white);box-shadow:0 2px 6px -1px rgba(224,0,42,.45);-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.t-rows{padding:0 20px}.t-row{display:flex;align-items:flex-start;padding:4px 0 10px}.t-row dt{flex-shrink:0;width:44px;margin-right:12px;margin-top:2px;height:24px;line-height:20px;border-radius:6px;text-align:center;font-size:13px;font-weight:900;letter-spacing:1px;border:2px solid currentColor}.t-row dd{flex:1;min-width:0;font-size:15.5px;line-height:1.72}.lb-cost{color:var(--ink)}.lb-gain{color:var(--mint-d)}.lb-ev{color:var(--red-d)}.t-row.say dd{font-weight:600}.t-row.ev{min-height:76px}.t-row.ev dd{padding-right:84px}.ev-grade{font-weight:900}.ev-extra{color:var(--muted);font-size:13.5px;margin-left:4px}.t-foot{display:flex;align-items:center;justify-content:space-between;padding:0 20px 18px}.barcode{height:30px;width:46%;max-width:150px;color:var(--ink)}.t-more{min-height:44px;display:inline-flex;align-items:center;font-size:13px;font-weight:800;color:var(--ink)}.t-more .ic{width:16px;height:16px}.stamp-wrap{position:absolute;display:block;pointer-events:none}.stamp{width:100%;height:100%;color:var(--red);mix-blend-mode:multiply;opacity:.92}.stamp text{font-family:var(--sans);fill:currentColor}.stamp .st-letter{font-weight:900}.stamp .st-small{font-weight:800;letter-spacing:1px}.t-row.ev{position:relative}.t-row.ev .stamp-wrap{width:80px;height:80px;right:-6px;top:-8px}.late-stamp .stamp-in .stamp{-webkit-animation-delay:.62s;animation-delay:.62s}.stamp-in .stamp{-webkit-animation:stampDown .34s var(--spring) .28s both;animation:stampDown .34s var(--spring) .28s both}@-webkit-keyframes stampDown{0%{opacity:0;-webkit-transform:scale(1.5)}60%{opacity:.95;-webkit-transform:scale(.9)}to{opacity:.92;-webkit-transform:scale(1)}}@keyframes stampDown{0%{opacity:0;transform:scale(1.5)}60%{opacity:.95;transform:scale(.9)}to{opacity:.92;transform:scale(1)}}.rise{-webkit-animation:rise .32s var(--spring) both;animation:rise .32s var(--spring) both}@-webkit-keyframes rise{0%{opacity:0;-webkit-transform:translateY(14px)}to{opacity:1;-webkit-transform:none}}@keyframes rise{0%{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}.fade{-webkit-animation:fade .24s ease both;animation:fade .24s ease both}@-webkit-keyframes fade{0%{opacity:0}to{opacity:1}}@keyframes fade{0%{opacity:0}to{opacity:1}}.list{padding-top:2px}.card{position:relative;display:block;background:var(--white);border-radius:14px;box-shadow:var(--lift);margin:0 0 14px;cursor:pointer;-webkit-transition:-webkit-transform .15s;transition:transform .15s}.card:active{-webkit-transform:scale(.985);transform:scale(.985)}.c-head{display:flex;align-items:center;padding:11px 50px 9px 16px;min-height:22px}.c-no{font-size:12.5px;font-weight:800;white-space:nowrap}.c-sec{font-size:12px;color:var(--muted);margin-left:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}.c-best{flex-shrink:0;margin-left:6px;font-size:11px;font-weight:800;color:var(--white);background:var(--red-d);border-radius:10px;height:20px;line-height:20px;padding:0 7px;-webkit-transform:rotate(-3deg);transform:rotate(-3deg)}.c-cut{position:relative;border-top:1.5px dashed var(--dash);margin:0 14px}.c-cut:before,.c-cut:after{content:"";position:absolute;top:-8px;width:14px;height:14px;border-radius:7px;background:var(--paper)}.c-cut:before{left:-21px}.c-cut:after{right:-21px}.c-body{padding:10px 16px 4px}.c-title{font-size:17px;line-height:1.5;font-weight:800;padding-right:30px}.c-snip{font-size:14px;line-height:1.65;color:rgba(23,23,27,.78);margin-top:6px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.c-snip .lb{font-weight:900;color:var(--mint-d);margin-right:6px;font-size:12.5px}.c-snip .lb.other{color:var(--ink)}.c-foot{display:flex;align-items:center;padding:0 4px 0 16px;min-height:44px}.c-tags{flex:1;min-width:0;font-size:12px;color:var(--muted);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.c-tags .on{color:var(--mint-d)}.card .stamp-wrap{width:48px;height:48px;top:6px;right:8px}.fav-btn{width:44px;height:44px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:rgba(23,23,27,.45);border-radius:22px}.fav-btn.is-on{color:var(--red)}.fav-btn.pop .ic{-webkit-animation:pop .34s var(--spring);animation:pop .34s var(--spring)}@-webkit-keyframes pop{0%{-webkit-transform:scale(.6)}to{-webkit-transform:scale(1)}}@keyframes pop{0%{transform:scale(.6)}to{transform:scale(1)}}.sentinel{height:1px}.list-end{text-align:center;color:var(--faint);font-size:12px;font-weight:700;padding:8px 0 4px;letter-spacing:2px}.fbar{position:-webkit-sticky;position:sticky;top:var(--top-h);z-index:20;background:var(--paper);margin:0 -16px;padding:0 0 2px}.fbar.is-stuck{box-shadow:0 6px 12px -10px rgba(23,23,27,.35)}.chips{display:flex;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding:2px 12px;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}.chip{flex-shrink:0;height:44px;padding:0 3px;display:flex;align-items:center}.chip-in{display:flex;align-items:center;height:34px;padding:0 13px;border-radius:17px;background:var(--white);font-size:14px;font-weight:700;white-space:nowrap;box-shadow:0 0 0 1px rgba(23,23,27,.12),0 2px 4px -1px rgba(23,23,27,.12);transition:background .18s,color .18s,box-shadow .18s}.chip-in .ic{width:16px;height:16px;margin-left:3px}.chip.on .chip-in{background:var(--ink);color:var(--white);box-shadow:0 3px 8px -3px rgba(23,23,27,.6)}.chip.on.red .chip-in{background:var(--red-d);box-shadow:0 3px 8px -3px rgba(224,0,42,.6)}.chip-sep{flex-shrink:0;width:1px;height:18px;background:var(--line);margin:13px 5px}.chip-cap{flex-shrink:0;font-size:12px;font-weight:800;color:var(--faint);align-self:center;margin:0 2px 0 4px;white-space:nowrap}.countbar{display:flex;align-items:center;justify-content:space-between;padding:0 16px;min-height:44px}.count{font-size:14px;font-weight:700;color:var(--muted);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.count b{color:var(--ink);font-size:18px;font-weight:900;margin:0 3px;font-family:var(--mono)}.clear-btn{min-height:44px;min-width:44px;padding:0 4px 0 12px;font-size:14px;font-weight:800;color:var(--red-d);flex-shrink:0}.clear-btn[hidden]{display:none}.hot{margin:4px 0 18px}.hot-cap{font-size:13px;font-weight:800;color:var(--muted);margin:0 2px 6px}.hot-list{display:flex;flex-wrap:wrap;margin:0 -4px}.hot-chip{height:44px;padding:0 4px;display:flex;align-items:center}.hot-chip span{display:block;height:34px;line-height:30px;padding:0 13px;border-radius:17px;background:var(--white);border:2px solid var(--white);font-size:14px;font-weight:700;box-shadow:0 0 0 1px rgba(23,23,27,.1),0 3px 8px -2px rgba(23,23,27,.16)}.hot-chip:nth-child(3n+1) span{-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.hot-chip:nth-child(3n+2) span{-webkit-transform:rotate(1.5deg);transform:rotate(1.5deg)}.hot-chip:nth-child(4n) span{-webkit-transform:rotate(-1deg);transform:rotate(-1deg)}.hot-chip:active span{-webkit-transform:scale(.95);transform:scale(.95)}.empty{text-align:center;padding:26px 8px 10px}.empty-ticket{position:relative;width:196px;margin:0 auto 22px;background:var(--white);border-radius:6px 6px 0 0;padding:18px 18px 22px;-webkit-filter:drop-shadow(0 8px 12px rgba(23,23,27,.12));filter:drop-shadow(0 8px 12px rgba(23,23,27,.12));-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.empty-ticket:after{content:"";position:absolute;left:0;right:0;bottom:-11px;height:12px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M0 0h16L8 11z' fill='%23fff'/%3E%3C/svg%3E");background-repeat:repeat-x;background-size:16px 12px}.empty-ticket i{display:block;height:8px;border-radius:4px;background:rgba(23,23,27,.08);margin:0 0 10px}.empty-ticket i:nth-child(2){width:70%}.empty-ticket i:nth-child(3){width:86%}.empty-ticket .stamp-wrap{width:76px;height:76px;right:-14px;bottom:-6px}.empty h3{font-size:18px;font-weight:900;line-height:1.5}.empty p{font-size:14px;color:var(--muted);margin-top:6px}.empty .hot-list{justify-content:center;margin-top:12px}.empty .btn{margin:14px auto 0;display:inline-flex}.toc{background:var(--white);border-radius:16px;box-shadow:var(--lift);overflow:hidden}.toc-row{display:flex;align-items:center;width:100%;text-align:left;min-height:64px;padding:8px 8px 8px 12px;border-top:1px dashed var(--line)}.toc-row:first-child{border-top:0}.toc-row:active{background:rgba(23,23,27,.04)}.toc-num{width:40px;height:40px;flex-shrink:0;border-radius:12px;background:var(--paper);font-family:var(--mono);font-weight:900;font-size:16px;line-height:40px;text-align:center;margin-right:12px;box-shadow:inset 0 0 0 1.5px rgba(23,23,27,.1)}.toc-txt{flex:1;min-width:0}.toc-title{font-size:15.5px;font-weight:800;line-height:1.45}.toc-meta{font-size:12px;color:var(--muted);font-weight:600;margin-top:1px}.toc-meta .r{color:var(--red-d);font-weight:800}.toc-row .ic{color:var(--faint);width:18px;height:18px}.foot{margin:30px 2px 6px;padding:16px 0 0;border-top:2px dashed var(--dash);font-size:12.5px;line-height:1.75;color:var(--muted)}.foot p{margin-bottom:6px}.foot b{color:var(--ink);font-weight:800}.foot .link-btn{font-size:13px}.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;background:var(--white);box-shadow:0 -1px 0 var(--line),0 -8px 20px -14px rgba(23,23,27,.35);padding-bottom:0;padding-bottom:env(safe-area-inset-bottom,0px)}.tab{flex:1;height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:rgba(23,23,27,.55);position:relative}.tab .ic{width:24px;height:24px;position:relative;z-index:1}.tab span{font-size:11px;font-weight:700;line-height:1.3;margin-top:3px;position:relative;z-index:1}.tab:before{content:"";position:absolute;top:8px;left:50%;width:30px;height:18px;margin-left:-12px;border-radius:9px;background:var(--yellow);opacity:0;-webkit-transform:scale(.4);transform:scale(.4);transition:opacity .2s,-webkit-transform .28s var(--spring);transition:opacity .2s,transform .28s var(--spring)}.tab.is-on{color:var(--ink)}.tab.is-on span{font-weight:900}.tab.is-on:before{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.tab .badge{position:absolute;top:5px;left:50%;margin-left:8px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--red-d);color:var(--white);font-size:11px;font-weight:800;line-height:18px;text-align:center;z-index:2;box-shadow:0 0 0 2px var(--white);margin-top:0}.tab .badge[hidden]{display:none}.scrim{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(23,23,27,.42);opacity:0;transition:opacity .26s;pointer-events:none}.scrim.on{opacity:1}.scrim-hit{position:fixed;left:0;right:0;bottom:0;top:56px;top:calc(env(safe-area-inset-top,0px) + 56px)}.sheet{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;background:var(--paper);background-image:radial-gradient(rgba(23,23,27,.075) 1px,transparent 1.4px);background-size:18px 18px;-webkit-transform:translateY(102%);transform:translateY(102%);transition:-webkit-transform .34s var(--ease);transition:transform .34s var(--ease);will-change:transform}.sheet.on{-webkit-transform:none;transform:none}.sheet.drawer{top:auto;border-radius:20px 20px 0 0;background:var(--paper);box-shadow:0 -10px 30px -10px rgba(23,23,27,.35);max-height:86%;max-height:calc(100% - 64px);max-height:calc(100% - 64px - env(safe-area-inset-top,0px))}.sb{flex-shrink:0;display:flex;align-items:center;justify-content:center;height:56px;box-sizing:content-box;padding:0 100px;padding-top:env(safe-area-inset-top,0px);background:var(--paper);box-shadow:0 1px 0 var(--line);pointer-events:none}.drawer .sb{position:relative;height:60px;padding:0 20px;border-radius:20px 20px 0 0;box-shadow:none;pointer-events:auto;touch-action:none}.drawer .grip{position:absolute;top:8px;left:50%;width:40px;height:5px;margin-left:-20px;border-radius:3px;background:rgba(23,23,27,.2)}.sb-title{min-width:0;text-align:center;font-size:15px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4}.sb-title small{display:block;font-size:11px;color:var(--muted);font-weight:700;line-height:1.3;overflow:hidden;text-overflow:ellipsis}.sheet-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:16px 16px 24px}.dbar{flex-shrink:0;display:flex;align-items:center;padding:8px 10px;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 8px);background:var(--paper);box-shadow:0 -1px 0 var(--line),0 -8px 18px -14px rgba(23,23,27,.35)}.foot-back{flex-shrink:0;height:48px;min-width:76px;padding:0 14px 0 8px;margin-right:6px;border-radius:24px;display:flex;align-items:center;justify-content:center;background:var(--ink);color:var(--white);font-size:15px;font-weight:800}.foot-back .ic{width:20px;height:20px;margin-right:2px}.foot-back span{line-height:1.15;text-align:left;white-space:nowrap}.foot-back small{display:block;font-size:10.5px;font-weight:700;opacity:.75;font-family:var(--mono)}.foot-back:active,.pn-btn:active,.foot-close:active{-webkit-transform:scale(.96);transform:scale(.96)}.pn-btn{flex:1;min-width:0;height:48px;margin:0 3px;border-radius:14px;background:var(--white);box-shadow:var(--sticker);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;white-space:nowrap}.pn-btn[disabled]{opacity:.4}.pn-btn .ic{margin:0 1px}.dbar .fav-btn{width:48px;height:48px;border-radius:24px;margin-left:4px;background:var(--white);box-shadow:var(--sticker)}.dbar-info{flex:1;min-width:0;text-align:center;font-size:13px;font-weight:700;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 6px}.foot-close{flex-shrink:0;height:48px;min-width:64px;padding:0 12px;margin-left:10px;border-radius:24px;display:flex;align-items:center;justify-content:center;background:var(--white);box-shadow:var(--sticker);font-size:14px;font-weight:800}.foot-close .ic{width:18px;height:18px;margin-right:3px}.foot-note{flex:1;min-width:0;font-size:12.5px;font-weight:700;color:var(--muted);line-height:1.5;align-self:center}.share-inline{display:flex;margin:0 auto 6px;padding:0 22px}.d-ticket{position:relative;background:var(--white);border-radius:6px 6px 0 0;margin:0 2px 20px;-webkit-filter:drop-shadow(0 10px 16px rgba(23,23,27,.12));filter:drop-shadow(0 10px 16px rgba(23,23,27,.12))}.d-ticket:after{content:"";position:absolute;left:0;right:0;bottom:-11px;height:12px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M0 0h16L8 11z' fill='%23fff'/%3E%3C/svg%3E");background-repeat:repeat-x;background-size:16px 12px}.sec-link{display:inline-flex;align-items:center;min-height:44px;margin:-10px 0 -12px -2px;padding:0 2px;font-size:13px;color:var(--muted);font-weight:700;text-align:left;line-height:1.45}.sec-link .ic{width:15px;height:15px;margin-left:2px;flex-shrink:0}.d-title{font-size:25px;line-height:1.45;font-weight:900;letter-spacing:.3px}.d-block{padding:0 20px;margin:0 0 18px}.d-cap{display:flex;align-items:center;font-size:12.5px;font-weight:900;letter-spacing:1.5px;color:var(--ink);margin-bottom:6px}.d-cap:before{content:"";width:8px;height:8px;border-radius:2px;background:var(--ink);margin-right:8px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.d-cap.gain:before{background:var(--mint)}.d-cap.red:before{background:var(--red)}.d-text{font-size:15.5px;line-height:1.8;font-variant-numeric:tabular-nums;overflow-wrap:break-word;word-wrap:break-word}.d-text p{margin:0;text-align:justify;text-justify:inter-ideograph}.d-text p+p{margin-top:.8em}.t-row dd{font-variant-numeric:tabular-nums}.src-list{list-style:none;margin:0;padding:0;counter-reset:src}.src-list li{position:relative;padding:0 0 0 30px;margin:0 0 12px;counter-increment:src;font-size:13px;line-height:1.65;overflow-wrap:break-word;word-wrap:break-word}.src-list li[hidden]{display:none}.src-list li:before{content:counter(src);position:absolute;left:0;top:1px;width:21px;height:21px;border-radius:11px;font-family:var(--mono);font-size:11px;font-weight:800;line-height:21px;text-align:center;background:var(--paper);color:var(--ink);box-shadow:inset 0 0 0 1px rgba(23,23,27,.14)}.src-a{display:block;font-weight:800;color:var(--ink);font-variant-numeric:tabular-nums}.src-t{display:block;color:rgba(23,23,27,.74)}.src-u,.lnk-url{display:block;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:rgba(23,23,27,.5);word-break:break-all;margin-top:2px;-webkit-user-select:text;user-select:text}.lnk-url{margin:1px 0 3px;font-weight:400}.more-btn{min-height:44px;font-size:13.5px;font-weight:800;color:var(--ink);display:inline-flex;align-items:center}.more-btn .ic{width:16px;height:16px;margin-left:2px}.ev-note{font-size:13px;line-height:1.65;color:var(--muted);margin-top:4px}.xref{color:var(--red-d);font-weight:700;border-bottom:1.5px solid rgba(224,0,42,.35);padding:3px 0 1px;cursor:pointer}.xref:active{background:rgba(255,36,66,.1)}.doc{border-bottom:1px dashed rgba(23,23,27,.35)}.url{font-family:var(--mono);font-size:.92em;word-break:break-all;color:rgba(23,23,27,.6)}.d-license{font-size:12px;line-height:1.7;color:var(--faint);text-align:center;padding:10px 12px 4px}.sec-hero{position:relative;padding:4px 4px 16px}.sec-big{font-family:var(--mono);font-size:54px;line-height:1;font-weight:900;color:var(--ink);letter-spacing:-2px}.sec-big small{font-family:var(--sans);font-size:14px;letter-spacing:1px;margin-left:6px;font-weight:800;color:var(--muted)}.sec-title{font-size:24px;font-weight:900;line-height:1.4;margin-top:8px}.sec-intro{font-size:14px;line-height:1.75;color:rgba(23,23,27,.78);margin-top:8px}.sec-intro.is-clip{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.sec-stats{display:flex;margin-top:10px}.sec-stats .tag{margin-left:0;margin-right:8px}.secgrid{display:grid;grid-template-columns:1fr 1fr;grid-gap:8px}.sec-opt{display:flex;align-items:center;min-height:52px;padding:6px 10px;border-radius:12px;background:var(--white);text-align:left;box-shadow:0 0 0 1px rgba(23,23,27,.08);transition:background .15s,color .15s}.sec-opt .n{font-family:var(--mono);font-weight:900;font-size:14px;width:26px;flex-shrink:0}.sec-opt .t{flex:1;min-width:0;font-size:13px;font-weight:700;line-height:1.4}.sec-opt .c{font-size:11px;color:var(--muted);font-weight:700;margin-left:4px;flex-shrink:0}.sec-opt.on{background:var(--ink);color:var(--white);box-shadow:none}.sec-opt.on .c{color:rgba(255,255,255,.7)}.drawer-foot{flex-shrink:0;display:flex;align-items:center;padding:10px 16px;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 10px);box-shadow:0 -1px 0 var(--line);background:var(--paper)}.drawer-foot .btn-line{flex:0 0 auto;margin-right:10px;padding:0 18px}.drawer-foot .btn{height:48px}.drawer-foot .btn-ghost{margin-left:0;margin-right:10px;flex:1}.drawer-foot .btn-primary{height:48px;box-shadow:0 6px 14px -6px rgba(224,0,42,.55)}.share-stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:240px}.share-img{width:76%;max-width:320px;height:auto;border-radius:6px;box-shadow:var(--lift);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background:var(--white)}.share-note{font-size:13px;color:var(--muted);text-align:center;line-height:1.7;margin:14px 8px 0}.share-note b{color:var(--ink)}.share-actions{display:flex;margin-top:16px}.share-actions .btn{flex:1;margin:0 5px;height:50px}.share-actions .btn-ghost{margin:0 5px}.printing{text-align:center;padding:20px 0}.printing .mini-printer{width:160px;height:16px;border-radius:8px;background:var(--ink);margin:0 auto;position:relative;z-index:1}.printing .mini-paper{width:132px;height:120px;margin:-6px auto 0;background:var(--white);border-radius:0 0 4px 4px;box-shadow:var(--sticker);overflow:hidden;-webkit-transform-origin:top;transform-origin:top;-webkit-animation:feed 1s ease-in-out infinite alternate;animation:feed 1s ease-in-out infinite alternate}.printing .mini-paper i{display:block;height:6px;border-radius:3px;background:rgba(23,23,27,.12);margin:14px 14px 0}.printing p{font-size:14px;font-weight:800;margin-top:14px}@-webkit-keyframes feed{0%{-webkit-transform:scaleY(.3)}to{-webkit-transform:scaleY(1)}}@keyframes feed{0%{transform:scaleY(.3)}to{transform:scaleY(1)}}.about h2{font-size:17px;font-weight:900;margin:22px 0 8px}.about h2:first-child{margin-top:4px}.about p,.about li{font-size:14.5px;line-height:1.8}.about ul{margin:0;padding:0 0 0 1.2em}.about .box{background:var(--white);border-radius:14px;padding:14px 16px;box-shadow:var(--sticker)}.about .box+.box{margin-top:10px}.about .ev-line{display:flex;align-items:flex-start;margin-bottom:8px}.about .ev-line:last-child{margin-bottom:0}.about .ev-line .stamp-wrap{position:relative;width:40px;height:40px;flex-shrink:0;margin-right:10px}.about .warn{border-left:4px solid var(--red)}.about .fine{font-size:12.5px;color:var(--muted)}.toast{position:fixed;left:50%;bottom:84px;bottom:calc(84px + env(safe-area-inset-bottom,0px));z-index:100;max-width:86%;padding:11px 18px;border-radius:22px;background:var(--ink);color:var(--white);font-size:14px;font-weight:700;line-height:1.5;text-align:center;-webkit-transform:translate(-50%,16px);transform:translate(-50%,16px);opacity:0;pointer-events:none;transition:opacity .2s,-webkit-transform .28s var(--spring);transition:opacity .2s,transform .28s var(--spring);box-shadow:0 8px 20px -8px rgba(23,23,27,.6)}.toast.on{opacity:1;-webkit-transform:translate(-50%,0);transform:translate(-50%)}.skel{height:360px;margin:0 10px;background:var(--white);border-radius:6px;opacity:.7}@media (max-width: 370px){.pn-btn{font-size:13px}.foot-back{min-width:68px;padding:0 10px 0 6px}.drawer-foot .btn-line{padding:0 12px}.hero-title{font-size:26px}.seg button{padding:0 9px;font-size:12.5px}.t-title{font-size:21px}.ticket.big .t-title{font-size:22px}.btn-ghost{padding:0 12px}.btn-ghost .lbl{display:none}.btn-ghost .ic{margin-right:0}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{-webkit-animation-duration:.01ms!important;animation-duration:.01ms!important;-webkit-animation-delay:0s!important;animation-delay:0s!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
|
| 2 |
.pdf-card{margin:18px 10px 8px;padding:16px;background:var(--white);border-radius:16px;box-shadow:var(--lift);display:flex;align-items:center;justify-content:space-between;position:relative;overflow:hidden}.pdf-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--red)}.pdf-card>div{min-width:0;padding-right:10px}.pdf-kicker{display:inline-block;color:var(--red-d);font-size:12px;font-weight:900;letter-spacing:1px;margin-bottom:2px}.pdf-card h2{font-size:18px;line-height:1.35;font-weight:900}.pdf-card p{font-size:12.5px;line-height:1.6;color:var(--muted);margin-top:4px}.pdf-card .btn{flex:0 0 auto;white-space:nowrap}.pdf-body{padding:16px}.pdf-cover{background:var(--red-d);color:var(--white);padding:22px 18px;border-radius:14px;box-shadow:var(--lift);display:flex;flex-direction:column;align-items:flex-start;position:relative;overflow:hidden}.pdf-cover:after{content:"";position:absolute;width:130px;height:130px;border:18px solid rgba(255,255,255,.12);border-radius:50%;right:-38px;top:-38px}.pdf-count{font-family:var(--mono);font-size:64px;line-height:.9;font-weight:900;letter-spacing:-4px}.pdf-cover b{font-size:22px;margin-top:8px}.pdf-cover small{font-size:12px;opacity:.82;margin-top:8px;line-height:1.5}.pdf-copy{margin-top:18px}.pdf-copy h2{font-size:20px;font-weight:900}.pdf-copy p{font-size:14px;line-height:1.75;margin-top:6px}.pdf-copy ul{padding-left:20px;margin:10px 0 0;color:var(--muted);font-size:13px;line-height:1.85}.pdf-status{margin-top:16px;padding:10px 12px;background:rgba(18,184,134,.1);border-radius:10px;color:var(--mint-d);font-size:13px;font-weight:700}.pdf-foot{flex-wrap:wrap}.pdf-foot .btn{min-width:0;flex:1;margin-right:8px}.pdf-foot .btn:last-of-type{margin-right:8px}.pdf-foot .foot-close{flex:0 0 auto}
|
|
|
|
|
|
| 1 |
:root{--paper: #F6F1E7;--ink: #17171B;--red: #FF2442;--red-d: #E0002A;--mint: #12B886;--mint-d: #0B7A57;--yellow: #FFD43B;--white: #FFFFFF;--muted: rgba(23, 23, 27, .66);--faint: rgba(23, 23, 27, .5);--line: rgba(23, 23, 27, .14);--dash: rgba(23, 23, 27, .26);--sticker: 0 0 0 1px rgba(23, 23, 27, .04), 0 1px 2px rgba(23, 23, 27, .08), 0 4px 12px -2px rgba(23, 23, 27, .12);--lift: 0 0 0 1px rgba(23, 23, 27, .04), 0 2px 6px rgba(23, 23, 27, .06), 0 12px 28px -10px rgba(23, 23, 27, .22);--spring: cubic-bezier(.34, 1.56, .64, 1);--ease: cubic-bezier(.2, .9, .25, 1);--sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;--mono: "SFMono-Regular", Menlo, "Roboto Mono", "DejaVu Sans Mono", monospace;--top-h: 64px;--safe-t: 0px;--safe-b: 0px}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}html,body{margin:0;padding:0}body{min-height:100vh;background-color:var(--paper);background-image:radial-gradient(rgba(23,23,27,.075) 1px,transparent 1.4px);background-size:18px 18px;color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.7;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;overflow-wrap:break-word;word-wrap:break-word;line-break:strict;-webkit-line-break:strict;overflow-x:hidden}body.is-locked{overflow:hidden}img,svg{display:block}button{font:inherit;color:inherit;background:none;border:0;margin:0;padding:0;cursor:pointer;-webkit-appearance:none;appearance:none;touch-action:manipulation}button:focus,input:focus,[tabindex]:focus{outline:none}.kbd button:focus,.kbd [tabindex]:focus{outline:2px solid var(--ink);outline-offset:2px}h1,h2,h3,h4,p,dl,dd,dt{margin:0}.mono{font-family:var(--mono);letter-spacing:0}.nobr{white-space:nowrap}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.ic{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.ic-s{width:18px;height:18px}.ic-fill{fill:currentColor;stroke:none}.p,.rich{text-wrap:pretty;text-spacing-trim:space-first}mark{color:var(--ink);background-color:transparent;background-image:linear-gradient(transparent 54%,var(--yellow) 54%,var(--yellow) 94%,transparent 94%);padding:0 1px;margin:0 -1px;-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:2px}.hl{background-image:linear-gradient(transparent 58%,var(--yellow) 58%,var(--yellow) 92%,transparent 92%);padding:0 2px;margin:0 -2px;color:var(--ink)}.top{position:-webkit-sticky;position:sticky;top:0;z-index:30;background:var(--paper);padding-top:0;padding-top:env(safe-area-inset-top,0px);transition:box-shadow .2s}.top.is-scrolled{box-shadow:0 1px 0 var(--line),0 6px 16px -10px rgba(23,23,27,.25)}.navzone{height:56px;display:flex;align-items:center;justify-content:center;padding:0 100px;pointer-events:none}.nav-title{display:flex;align-items:center;font-size:16px;font-weight:900;letter-spacing:1px;white-space:nowrap}.nav-title .logo-in{width:24px;height:24px;line-height:24px;font-size:13px;border-radius:7px;margin-right:7px;box-shadow:0 0 0 2px var(--white),0 2px 5px rgba(23,23,27,.2)}.top-in{display:flex;align-items:center;padding:0 8px 8px 16px}.logo-in{width:36px;height:36px;border-radius:11px;background:var(--red-d);color:var(--white);font-weight:900;font-size:19px;line-height:36px;text-align:center;box-shadow:0 0 0 2.5px var(--white),0 3px 8px rgba(23,23,27,.2);transform:rotate(-6deg);display:inline-block}.search{flex:1;min-width:0;height:44px;margin:0 4px 0 0;display:flex;align-items:center;background:var(--white);border-radius:22px;box-shadow:0 0 0 1.5px rgba(23,23,27,.12),0 2px rgba(23,23,27,.04),0 6px 14px -6px rgba(23,23,27,.18);padding-left:13px;transition:box-shadow .2s}.search.is-focus{box-shadow:0 0 0 2px var(--ink),0 6px 14px -6px rgba(23,23,27,.25)}.search .ic{color:var(--muted);width:20px;height:20px}.search input{flex:1;min-width:0;height:44px;border:0;background:transparent;outline:none;font:inherit;font-size:16px;color:var(--ink);padding:0 4px 0 8px;margin:0;-webkit-appearance:none;appearance:none;border-radius:0}.search input::-webkit-search-cancel-button,.search input::-webkit-search-decoration{-webkit-appearance:none;display:none}.search input::-webkit-input-placeholder{color:rgba(23,23,27,.45)}.search input::placeholder{color:rgba(23,23,27,.45)}.search-x{width:44px;height:44px;display:flex;align-items:center;justify-content:center;color:var(--muted);flex-shrink:0}.search-x[hidden]{display:none}.search-x .dot{width:22px;height:22px;border-radius:11px;background:rgba(23,23,27,.1);display:flex;align-items:center;justify-content:center}.icon-btn{width:44px;height:44px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:22px}.icon-btn:active{background:rgba(23,23,27,.06)}.views{padding-bottom:84px;padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}.view{display:none;padding:4px 16px 16px}.view.is-on{display:block}.view-head{display:flex;align-items:flex-end;justify-content:space-between;padding:10px 2px 12px}.view-title{font-size:26px;font-weight:900;line-height:1.25;letter-spacing:.5px}.view-sub{font-size:13px;color:var(--muted);font-weight:600}.hero{padding:4px 2px 10px}.hero-row{display:flex;align-items:flex-end;justify-content:space-between}.hero-l{min-width:0}.hero-date{font-size:12.5px;color:var(--muted);font-weight:700;display:flex;align-items:center;line-height:1.5}.hero-date .mono{font-weight:700;margin-right:8px;color:var(--ink)}.hero-title{font-size:30px;line-height:1.3;font-weight:900;letter-spacing:1px;white-space:nowrap}.hero-sub{font-size:12.5px;line-height:1.6;color:var(--muted);margin-top:6px}.seg{display:flex;flex-shrink:0;background:rgba(23,23,27,.07);border-radius:24px;padding:2px}.seg button{height:44px;min-width:44px;padding:0 12px;border-radius:22px;font-size:13px;font-weight:800;color:var(--muted);white-space:nowrap;transition:background .2s,color .2s,box-shadow .2s}.seg button[aria-checked=true]{background:var(--white);color:var(--ink);box-shadow:0 1px 2px rgba(23,23,27,.12),0 3px 8px -2px rgba(23,23,27,.18)}.seg-wrap{position:relative;padding-top:3px;padding-bottom:3px}.printer{position:relative;z-index:2;height:22px;border-radius:11px;background:var(--ink);margin:6px 0 0;box-shadow:0 6px 12px -6px rgba(23,23,27,.6)}.printer:before{content:"";position:absolute;left:16px;right:16px;top:12px;height:3px;border-radius:2px;background:rgba(255,255,255,.22)}.printer:after{content:"";position:absolute;right:14px;top:6px;width:6px;height:6px;border-radius:3px;background:var(--mint);box-shadow:-12px 0 rgba(255,255,255,.3)}.print-window{position:relative;z-index:1;margin:-10px -2px 0;padding:0 12px 24px;overflow:hidden}.print-window.is-printing .ticket-wrap{-webkit-animation:print .62s cubic-bezier(.3,.7,.35,1.06) both;animation:print .62s cubic-bezier(.3,.7,.35,1.06) both}@-webkit-keyframes print{0%{-webkit-transform:translateY(-100%)}30%{-webkit-transform:translateY(-66%)}34%{-webkit-transform:translateY(-64%)}64%{-webkit-transform:translateY(-20%)}68%{-webkit-transform:translateY(-17%)}to{-webkit-transform:translateY(0)}}@keyframes print{0%{transform:translateY(-100%)}30%{transform:translateY(-66%)}34%{transform:translateY(-64%)}64%{transform:translateY(-20%)}68%{transform:translateY(-17%)}to{transform:translateY(0)}}.today-actions{display:flex;align-items:stretch;margin:-6px -16px 0;padding:14px 16px 8px;position:-webkit-sticky;position:sticky;z-index:5;bottom:60px;bottom:calc(60px + env(safe-area-inset-bottom,0px));background:linear-gradient(rgba(246,241,231,0),#f6f1e7 34%)}.btn{height:52px;padding:0 18px;border-radius:26px;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:800;white-space:nowrap;transition:-webkit-transform .15s;transition:transform .15s}.btn:active{-webkit-transform:scale(.97);transform:scale(.97)}.btn .ic{margin-right:7px}.btn-primary{flex:1;background:var(--red-d);color:var(--white);box-shadow:0 0 0 3px var(--white),0 8px 18px -6px rgba(224,0,42,.55)}.btn-ghost{background:var(--white);color:var(--ink);box-shadow:0 0 0 3px var(--white),var(--sticker);margin-left:12px;padding:0 15px}.btn-ghost.is-on{color:var(--red-d)}.btn-line{background:transparent;box-shadow:inset 0 0 0 1.5px rgba(23,23,27,.2);height:48px;border-radius:24px;font-size:15px}.btn-ink{background:var(--ink);color:var(--white)}.btn-sm{height:44px;border-radius:22px;font-size:14px;padding:0 16px}.btn[disabled]{opacity:.5}.today-meta{display:flex;align-items:center;justify-content:space-between;margin-top:6px;min-height:44px}.link-btn{min-height:44px;display:inline-flex;align-items:center;font-size:14px;font-weight:700;color:var(--ink);padding:0 2px}.link-btn .ic{width:16px;height:16px;margin-left:2px}.link-btn.muted{color:var(--muted)}.draw-count{font-size:13px;color:var(--muted);font-weight:600}.ticket-wrap{position:relative;-webkit-filter:drop-shadow(0 10px 16px rgba(23,23,27,.13));filter:drop-shadow(0 10px 16px rgba(23,23,27,.13))}.ticket{position:relative;background:var(--white);border-radius:6px 6px 0 0;cursor:pointer}.ticket:after{content:"";position:absolute;left:0;right:0;bottom:-11px;height:12px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M0 0h16L8 11z' fill='%23fff'/%3E%3C/svg%3E");background-repeat:repeat-x;background-size:16px 12px}.t-pad{padding:18px 20px 0}.t-head{display:flex;align-items:baseline;justify-content:space-between}.t-no{font-size:15px;font-weight:900;letter-spacing:.5px}.t-serial{font-size:12px;color:var(--muted);font-weight:700}.t-sec{font-size:13px;color:var(--muted);font-weight:600;margin-top:2px;line-height:1.5}.t-cut{position:relative;height:0;margin:16px 0;border-top:2px dashed var(--dash)}.t-cut:before,.t-cut:after{content:"";position:absolute;top:-10px;width:18px;height:18px;border-radius:9px;background:var(--paper)}.t-cut:before{left:-9px}.t-cut:after{right:-9px}.t-title{font-size:23px;line-height:1.45;font-weight:900;letter-spacing:.3px}.ticket.big .t-title{font-size:24px}.tags{display:flex;flex-wrap:wrap;margin:12px -3px 0}.tag{display:inline-block;height:28px;line-height:24px;padding:0 10px;margin:0 3px 7px;border-radius:14px;font-size:12.5px;font-weight:700;white-space:nowrap;background:var(--white);color:var(--ink);border:2px solid var(--white);box-shadow:0 0 0 1px rgba(23,23,27,.14),0 2px 5px -1px rgba(23,23,27,.14)}.tag.on{background:rgba(18,184,134,.12);color:var(--mint-d);box-shadow:0 0 0 1px rgba(11,122,87,.28),0 2px 5px -1px rgba(23,23,27,.12)}.tag.best{background:var(--red-d);color:var(--white);box-shadow:0 2px 6px -1px rgba(224,0,42,.45);-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.t-rows{padding:0 20px}.t-row{display:flex;align-items:flex-start;padding:4px 0 10px}.t-row dt{flex-shrink:0;width:44px;margin-right:12px;margin-top:2px;height:24px;line-height:20px;border-radius:6px;text-align:center;font-size:13px;font-weight:900;letter-spacing:1px;border:2px solid currentColor}.t-row dd{flex:1;min-width:0;font-size:15.5px;line-height:1.72}.lb-cost{color:var(--ink)}.lb-gain{color:var(--mint-d)}.lb-ev{color:var(--red-d)}.t-row.say dd{font-weight:600}.t-row.ev{min-height:76px}.t-row.ev dd{padding-right:84px}.ev-grade{font-weight:900}.ev-extra{color:var(--muted);font-size:13.5px;margin-left:4px}.t-foot{display:flex;align-items:center;justify-content:space-between;padding:0 20px 18px}.barcode{height:30px;width:46%;max-width:150px;color:var(--ink)}.t-more{min-height:44px;display:inline-flex;align-items:center;font-size:13px;font-weight:800;color:var(--ink)}.t-more .ic{width:16px;height:16px}.stamp-wrap{position:absolute;display:block;pointer-events:none}.stamp{width:100%;height:100%;color:var(--red);mix-blend-mode:multiply;opacity:.92}.stamp text{font-family:var(--sans);fill:currentColor}.stamp .st-letter{font-weight:900}.stamp .st-small{font-weight:800;letter-spacing:1px}.t-row.ev{position:relative}.t-row.ev .stamp-wrap{width:80px;height:80px;right:-6px;top:-8px}.late-stamp .stamp-in .stamp{-webkit-animation-delay:.62s;animation-delay:.62s}.stamp-in .stamp{-webkit-animation:stampDown .34s var(--spring) .28s both;animation:stampDown .34s var(--spring) .28s both}@-webkit-keyframes stampDown{0%{opacity:0;-webkit-transform:scale(1.5)}60%{opacity:.95;-webkit-transform:scale(.9)}to{opacity:.92;-webkit-transform:scale(1)}}@keyframes stampDown{0%{opacity:0;transform:scale(1.5)}60%{opacity:.95;transform:scale(.9)}to{opacity:.92;transform:scale(1)}}.rise{-webkit-animation:rise .32s var(--spring) both;animation:rise .32s var(--spring) both}@-webkit-keyframes rise{0%{opacity:0;-webkit-transform:translateY(14px)}to{opacity:1;-webkit-transform:none}}@keyframes rise{0%{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}.fade{-webkit-animation:fade .24s ease both;animation:fade .24s ease both}@-webkit-keyframes fade{0%{opacity:0}to{opacity:1}}@keyframes fade{0%{opacity:0}to{opacity:1}}.list{padding-top:2px}.card{position:relative;display:block;background:var(--white);border-radius:14px;box-shadow:var(--lift);margin:0 0 14px;cursor:pointer;-webkit-transition:-webkit-transform .15s;transition:transform .15s}.card:active{-webkit-transform:scale(.985);transform:scale(.985)}.c-head{display:flex;align-items:center;padding:11px 50px 9px 16px;min-height:22px}.c-no{font-size:12.5px;font-weight:800;white-space:nowrap}.c-sec{font-size:12px;color:var(--muted);margin-left:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}.c-best{flex-shrink:0;margin-left:6px;font-size:11px;font-weight:800;color:var(--white);background:var(--red-d);border-radius:10px;height:20px;line-height:20px;padding:0 7px;-webkit-transform:rotate(-3deg);transform:rotate(-3deg)}.c-cut{position:relative;border-top:1.5px dashed var(--dash);margin:0 14px}.c-cut:before,.c-cut:after{content:"";position:absolute;top:-8px;width:14px;height:14px;border-radius:7px;background:var(--paper)}.c-cut:before{left:-21px}.c-cut:after{right:-21px}.c-body{padding:10px 16px 4px}.c-title{font-size:17px;line-height:1.5;font-weight:800;padding-right:30px}.c-snip{font-size:14px;line-height:1.65;color:rgba(23,23,27,.78);margin-top:6px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.c-snip .lb{font-weight:900;color:var(--mint-d);margin-right:6px;font-size:12.5px}.c-snip .lb.other{color:var(--ink)}.c-foot{display:flex;align-items:center;padding:0 4px 0 16px;min-height:44px}.c-tags{flex:1;min-width:0;font-size:12px;color:var(--muted);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.c-tags .on{color:var(--mint-d)}.card .stamp-wrap{width:48px;height:48px;top:6px;right:8px}.fav-btn{width:44px;height:44px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:rgba(23,23,27,.45);border-radius:22px}.fav-btn.is-on{color:var(--red)}.fav-btn.pop .ic{-webkit-animation:pop .34s var(--spring);animation:pop .34s var(--spring)}@-webkit-keyframes pop{0%{-webkit-transform:scale(.6)}to{-webkit-transform:scale(1)}}@keyframes pop{0%{transform:scale(.6)}to{transform:scale(1)}}.sentinel{height:1px}.list-end{text-align:center;color:var(--faint);font-size:12px;font-weight:700;padding:8px 0 4px;letter-spacing:2px}.fbar{position:-webkit-sticky;position:sticky;top:var(--top-h);z-index:20;background:var(--paper);margin:0 -16px;padding:0 0 2px}.fbar.is-stuck{box-shadow:0 6px 12px -10px rgba(23,23,27,.35)}.chips{display:flex;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding:2px 12px;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}.chip{flex-shrink:0;height:44px;padding:0 3px;display:flex;align-items:center}.chip-in{display:flex;align-items:center;height:34px;padding:0 13px;border-radius:17px;background:var(--white);font-size:14px;font-weight:700;white-space:nowrap;box-shadow:0 0 0 1px rgba(23,23,27,.12),0 2px 4px -1px rgba(23,23,27,.12);transition:background .18s,color .18s,box-shadow .18s}.chip-in .ic{width:16px;height:16px;margin-left:3px}.chip.on .chip-in{background:var(--ink);color:var(--white);box-shadow:0 3px 8px -3px rgba(23,23,27,.6)}.chip.on.red .chip-in{background:var(--red-d);box-shadow:0 3px 8px -3px rgba(224,0,42,.6)}.chip-sep{flex-shrink:0;width:1px;height:18px;background:var(--line);margin:13px 5px}.chip-cap{flex-shrink:0;font-size:12px;font-weight:800;color:var(--faint);align-self:center;margin:0 2px 0 4px;white-space:nowrap}.countbar{display:flex;align-items:center;justify-content:space-between;padding:0 16px;min-height:44px}.count{font-size:14px;font-weight:700;color:var(--muted);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.count b{color:var(--ink);font-size:18px;font-weight:900;margin:0 3px;font-family:var(--mono)}.clear-btn{min-height:44px;min-width:44px;padding:0 4px 0 12px;font-size:14px;font-weight:800;color:var(--red-d);flex-shrink:0}.clear-btn[hidden]{display:none}.hot{margin:4px 0 18px}.hot-cap{font-size:13px;font-weight:800;color:var(--muted);margin:0 2px 6px}.hot-list{display:flex;flex-wrap:wrap;margin:0 -4px}.hot-chip{height:44px;padding:0 4px;display:flex;align-items:center}.hot-chip span{display:block;height:34px;line-height:30px;padding:0 13px;border-radius:17px;background:var(--white);border:2px solid var(--white);font-size:14px;font-weight:700;box-shadow:0 0 0 1px rgba(23,23,27,.1),0 3px 8px -2px rgba(23,23,27,.16)}.hot-chip:nth-child(3n+1) span{-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.hot-chip:nth-child(3n+2) span{-webkit-transform:rotate(1.5deg);transform:rotate(1.5deg)}.hot-chip:nth-child(4n) span{-webkit-transform:rotate(-1deg);transform:rotate(-1deg)}.hot-chip:active span{-webkit-transform:scale(.95);transform:scale(.95)}.empty{text-align:center;padding:26px 8px 10px}.empty-ticket{position:relative;width:196px;margin:0 auto 22px;background:var(--white);border-radius:6px 6px 0 0;padding:18px 18px 22px;-webkit-filter:drop-shadow(0 8px 12px rgba(23,23,27,.12));filter:drop-shadow(0 8px 12px rgba(23,23,27,.12));-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.empty-ticket:after{content:"";position:absolute;left:0;right:0;bottom:-11px;height:12px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M0 0h16L8 11z' fill='%23fff'/%3E%3C/svg%3E");background-repeat:repeat-x;background-size:16px 12px}.empty-ticket i{display:block;height:8px;border-radius:4px;background:rgba(23,23,27,.08);margin:0 0 10px}.empty-ticket i:nth-child(2){width:70%}.empty-ticket i:nth-child(3){width:86%}.empty-ticket .stamp-wrap{width:76px;height:76px;right:-14px;bottom:-6px}.empty h3{font-size:18px;font-weight:900;line-height:1.5}.empty p{font-size:14px;color:var(--muted);margin-top:6px}.empty .hot-list{justify-content:center;margin-top:12px}.empty .btn{margin:14px auto 0;display:inline-flex}.toc{background:var(--white);border-radius:16px;box-shadow:var(--lift);overflow:hidden}.toc-row{display:flex;align-items:center;width:100%;text-align:left;min-height:64px;padding:8px 8px 8px 12px;border-top:1px dashed var(--line)}.toc-row:first-child{border-top:0}.toc-row:active{background:rgba(23,23,27,.04)}.toc-num{width:40px;height:40px;flex-shrink:0;border-radius:12px;background:var(--paper);font-family:var(--mono);font-weight:900;font-size:16px;line-height:40px;text-align:center;margin-right:12px;box-shadow:inset 0 0 0 1.5px rgba(23,23,27,.1)}.toc-txt{flex:1;min-width:0}.toc-title{font-size:15.5px;font-weight:800;line-height:1.45}.toc-meta{font-size:12px;color:var(--muted);font-weight:600;margin-top:1px}.toc-meta .r{color:var(--red-d);font-weight:800}.toc-row .ic{color:var(--faint);width:18px;height:18px}.foot{margin:30px 2px 6px;padding:16px 0 0;border-top:2px dashed var(--dash);font-size:12.5px;line-height:1.75;color:var(--muted)}.foot p{margin-bottom:6px}.foot b{color:var(--ink);font-weight:800}.foot .link-btn{font-size:13px}.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;background:var(--white);box-shadow:0 -1px 0 var(--line),0 -8px 20px -14px rgba(23,23,27,.35);padding-bottom:0;padding-bottom:env(safe-area-inset-bottom,0px)}.tab{flex:1;height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:rgba(23,23,27,.55);position:relative}.tab .ic{width:24px;height:24px;position:relative;z-index:1}.tab span{font-size:11px;font-weight:700;line-height:1.3;margin-top:3px;position:relative;z-index:1}.tab:before{content:"";position:absolute;top:8px;left:50%;width:30px;height:18px;margin-left:-12px;border-radius:9px;background:var(--yellow);opacity:0;-webkit-transform:scale(.4);transform:scale(.4);transition:opacity .2s,-webkit-transform .28s var(--spring);transition:opacity .2s,transform .28s var(--spring)}.tab.is-on{color:var(--ink)}.tab.is-on span{font-weight:900}.tab.is-on:before{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.tab .badge{position:absolute;top:5px;left:50%;margin-left:8px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--red-d);color:var(--white);font-size:11px;font-weight:800;line-height:18px;text-align:center;z-index:2;box-shadow:0 0 0 2px var(--white);margin-top:0}.tab .badge[hidden]{display:none}.scrim{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(23,23,27,.42);opacity:0;transition:opacity .26s;pointer-events:none}.scrim.on{opacity:1}.scrim-hit{position:fixed;left:0;right:0;bottom:0;top:56px;top:calc(env(safe-area-inset-top,0px) + 56px)}.sheet{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;background:var(--paper);background-image:radial-gradient(rgba(23,23,27,.075) 1px,transparent 1.4px);background-size:18px 18px;-webkit-transform:translateY(102%);transform:translateY(102%);transition:-webkit-transform .34s var(--ease);transition:transform .34s var(--ease);will-change:transform}.sheet.on{-webkit-transform:none;transform:none}.sheet.drawer{top:auto;border-radius:20px 20px 0 0;background:var(--paper);box-shadow:0 -10px 30px -10px rgba(23,23,27,.35);max-height:86%;max-height:calc(100% - 64px);max-height:calc(100% - 64px - env(safe-area-inset-top,0px))}.sb{flex-shrink:0;display:flex;align-items:center;justify-content:center;height:56px;box-sizing:content-box;padding:0 100px;padding-top:env(safe-area-inset-top,0px);background:var(--paper);box-shadow:0 1px 0 var(--line);pointer-events:none}.drawer .sb{position:relative;height:60px;padding:0 20px;border-radius:20px 20px 0 0;box-shadow:none;pointer-events:auto;touch-action:none}.drawer .grip{position:absolute;top:8px;left:50%;width:40px;height:5px;margin-left:-20px;border-radius:3px;background:rgba(23,23,27,.2)}.sb-title{min-width:0;text-align:center;font-size:15px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4}.sb-title small{display:block;font-size:11px;color:var(--muted);font-weight:700;line-height:1.3;overflow:hidden;text-overflow:ellipsis}.sheet-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:16px 16px 24px}.dbar{flex-shrink:0;display:flex;align-items:center;padding:8px 10px;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 8px);background:var(--paper);box-shadow:0 -1px 0 var(--line),0 -8px 18px -14px rgba(23,23,27,.35)}.foot-back{flex-shrink:0;height:48px;min-width:76px;padding:0 14px 0 8px;margin-right:6px;border-radius:24px;display:flex;align-items:center;justify-content:center;background:var(--ink);color:var(--white);font-size:15px;font-weight:800}.foot-back .ic{width:20px;height:20px;margin-right:2px}.foot-back span{line-height:1.15;text-align:left;white-space:nowrap}.foot-back small{display:block;font-size:10.5px;font-weight:700;opacity:.75;font-family:var(--mono)}.foot-back:active,.pn-btn:active,.foot-close:active{-webkit-transform:scale(.96);transform:scale(.96)}.pn-btn{flex:1;min-width:0;height:48px;margin:0 3px;border-radius:14px;background:var(--white);box-shadow:var(--sticker);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;white-space:nowrap}.pn-btn[disabled]{opacity:.4}.pn-btn .ic{margin:0 1px}.dbar .fav-btn{width:48px;height:48px;border-radius:24px;margin-left:4px;background:var(--white);box-shadow:var(--sticker)}.dbar-info{flex:1;min-width:0;text-align:center;font-size:13px;font-weight:700;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 6px}.foot-close{flex-shrink:0;height:48px;min-width:64px;padding:0 12px;margin-left:10px;border-radius:24px;display:flex;align-items:center;justify-content:center;background:var(--white);box-shadow:var(--sticker);font-size:14px;font-weight:800}.foot-close .ic{width:18px;height:18px;margin-right:3px}.foot-note{flex:1;min-width:0;font-size:12.5px;font-weight:700;color:var(--muted);line-height:1.5;align-self:center}.share-inline{display:flex;margin:0 auto 6px;padding:0 22px}.d-ticket{position:relative;background:var(--white);border-radius:6px 6px 0 0;margin:0 2px 20px;-webkit-filter:drop-shadow(0 10px 16px rgba(23,23,27,.12));filter:drop-shadow(0 10px 16px rgba(23,23,27,.12))}.d-ticket:after{content:"";position:absolute;left:0;right:0;bottom:-11px;height:12px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M0 0h16L8 11z' fill='%23fff'/%3E%3C/svg%3E");background-repeat:repeat-x;background-size:16px 12px}.sec-link{display:inline-flex;align-items:center;min-height:44px;margin:-10px 0 -12px -2px;padding:0 2px;font-size:13px;color:var(--muted);font-weight:700;text-align:left;line-height:1.45}.sec-link .ic{width:15px;height:15px;margin-left:2px;flex-shrink:0}.d-title{font-size:25px;line-height:1.45;font-weight:900;letter-spacing:.3px}.d-block{padding:0 20px;margin:0 0 18px}.d-cap{display:flex;align-items:center;font-size:12.5px;font-weight:900;letter-spacing:1.5px;color:var(--ink);margin-bottom:6px}.d-cap:before{content:"";width:8px;height:8px;border-radius:2px;background:var(--ink);margin-right:8px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.d-cap.gain:before{background:var(--mint)}.d-cap.red:before{background:var(--red)}.d-text{font-size:15.5px;line-height:1.8;font-variant-numeric:tabular-nums;overflow-wrap:break-word;word-wrap:break-word}.d-text p{margin:0;text-align:justify;text-justify:inter-ideograph}.d-text p+p{margin-top:.8em}.t-row dd{font-variant-numeric:tabular-nums}.src-list{list-style:none;margin:0;padding:0;counter-reset:src}.src-list li{position:relative;padding:0 0 0 30px;margin:0 0 12px;counter-increment:src;font-size:13px;line-height:1.65;overflow-wrap:break-word;word-wrap:break-word}.src-list li[hidden]{display:none}.src-list li:before{content:counter(src);position:absolute;left:0;top:1px;width:21px;height:21px;border-radius:11px;font-family:var(--mono);font-size:11px;font-weight:800;line-height:21px;text-align:center;background:var(--paper);color:var(--ink);box-shadow:inset 0 0 0 1px rgba(23,23,27,.14)}.src-a{display:block;font-weight:800;color:var(--ink);font-variant-numeric:tabular-nums}.src-t{display:block;color:rgba(23,23,27,.74)}.src-u,.lnk-url{display:block;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:rgba(23,23,27,.5);word-break:break-all;margin-top:2px;-webkit-user-select:text;user-select:text}.lnk-url{margin:1px 0 3px;font-weight:400}.more-btn{min-height:44px;font-size:13.5px;font-weight:800;color:var(--ink);display:inline-flex;align-items:center}.more-btn .ic{width:16px;height:16px;margin-left:2px}.ev-note{font-size:13px;line-height:1.65;color:var(--muted);margin-top:4px}.xref{color:var(--red-d);font-weight:700;border-bottom:1.5px solid rgba(224,0,42,.35);padding:3px 0 1px;cursor:pointer}.xref:active{background:rgba(255,36,66,.1)}.doc{border-bottom:1px dashed rgba(23,23,27,.35)}.url{font-family:var(--mono);font-size:.92em;word-break:break-all;color:rgba(23,23,27,.6)}.d-license{font-size:12px;line-height:1.7;color:var(--faint);text-align:center;padding:10px 12px 4px}.sec-hero{position:relative;padding:4px 4px 16px}.sec-big{font-family:var(--mono);font-size:54px;line-height:1;font-weight:900;color:var(--ink);letter-spacing:-2px}.sec-big small{font-family:var(--sans);font-size:14px;letter-spacing:1px;margin-left:6px;font-weight:800;color:var(--muted)}.sec-title{font-size:24px;font-weight:900;line-height:1.4;margin-top:8px}.sec-intro{font-size:14px;line-height:1.75;color:rgba(23,23,27,.78);margin-top:8px}.sec-intro.is-clip{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.sec-stats{display:flex;margin-top:10px}.sec-stats .tag{margin-left:0;margin-right:8px}.secgrid{display:grid;grid-template-columns:1fr 1fr;grid-gap:8px}.sec-opt{display:flex;align-items:center;min-height:52px;padding:6px 10px;border-radius:12px;background:var(--white);text-align:left;box-shadow:0 0 0 1px rgba(23,23,27,.08);transition:background .15s,color .15s}.sec-opt .n{font-family:var(--mono);font-weight:900;font-size:14px;width:26px;flex-shrink:0}.sec-opt .t{flex:1;min-width:0;font-size:13px;font-weight:700;line-height:1.4}.sec-opt .c{font-size:11px;color:var(--muted);font-weight:700;margin-left:4px;flex-shrink:0}.sec-opt.on{background:var(--ink);color:var(--white);box-shadow:none}.sec-opt.on .c{color:rgba(255,255,255,.7)}.drawer-foot{flex-shrink:0;display:flex;align-items:center;padding:10px 16px;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 10px);box-shadow:0 -1px 0 var(--line);background:var(--paper)}.drawer-foot .btn-line{flex:0 0 auto;margin-right:10px;padding:0 18px}.drawer-foot .btn{height:48px}.drawer-foot .btn-ghost{margin-left:0;margin-right:10px;flex:1}.drawer-foot .btn-primary{height:48px;box-shadow:0 6px 14px -6px rgba(224,0,42,.55)}.share-stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:240px}.share-img{width:76%;max-width:320px;height:auto;border-radius:6px;box-shadow:var(--lift);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background:var(--white)}.share-note{font-size:13px;color:var(--muted);text-align:center;line-height:1.7;margin:14px 8px 0}.share-note b{color:var(--ink)}.share-actions{display:flex;margin-top:16px}.share-actions .btn{flex:1;margin:0 5px;height:50px}.share-actions .btn-ghost{margin:0 5px}.printing{text-align:center;padding:20px 0}.printing .mini-printer{width:160px;height:16px;border-radius:8px;background:var(--ink);margin:0 auto;position:relative;z-index:1}.printing .mini-paper{width:132px;height:120px;margin:-6px auto 0;background:var(--white);border-radius:0 0 4px 4px;box-shadow:var(--sticker);overflow:hidden;-webkit-transform-origin:top;transform-origin:top;-webkit-animation:feed 1s ease-in-out infinite alternate;animation:feed 1s ease-in-out infinite alternate}.printing .mini-paper i{display:block;height:6px;border-radius:3px;background:rgba(23,23,27,.12);margin:14px 14px 0}.printing p{font-size:14px;font-weight:800;margin-top:14px}@-webkit-keyframes feed{0%{-webkit-transform:scaleY(.3)}to{-webkit-transform:scaleY(1)}}@keyframes feed{0%{transform:scaleY(.3)}to{transform:scaleY(1)}}.about h2{font-size:17px;font-weight:900;margin:22px 0 8px}.about h2:first-child{margin-top:4px}.about p,.about li{font-size:14.5px;line-height:1.8}.about ul{margin:0;padding:0 0 0 1.2em}.about .box{background:var(--white);border-radius:14px;padding:14px 16px;box-shadow:var(--sticker)}.about .box+.box{margin-top:10px}.about .ev-line{display:flex;align-items:flex-start;margin-bottom:8px}.about .ev-line:last-child{margin-bottom:0}.about .ev-line .stamp-wrap{position:relative;width:40px;height:40px;flex-shrink:0;margin-right:10px}.about .warn{border-left:4px solid var(--red)}.about .fine{font-size:12.5px;color:var(--muted)}.toast{position:fixed;left:50%;bottom:84px;bottom:calc(84px + env(safe-area-inset-bottom,0px));z-index:100;max-width:86%;padding:11px 18px;border-radius:22px;background:var(--ink);color:var(--white);font-size:14px;font-weight:700;line-height:1.5;text-align:center;-webkit-transform:translate(-50%,16px);transform:translate(-50%,16px);opacity:0;pointer-events:none;transition:opacity .2s,-webkit-transform .28s var(--spring);transition:opacity .2s,transform .28s var(--spring);box-shadow:0 8px 20px -8px rgba(23,23,27,.6)}.toast.on{opacity:1;-webkit-transform:translate(-50%,0);transform:translate(-50%)}.skel{height:360px;margin:0 10px;background:var(--white);border-radius:6px;opacity:.7}@media (max-width: 370px){.pn-btn{font-size:13px}.foot-back{min-width:68px;padding:0 10px 0 6px}.drawer-foot .btn-line{padding:0 12px}.hero-title{font-size:26px}.seg button{padding:0 9px;font-size:12.5px}.t-title{font-size:21px}.ticket.big .t-title{font-size:22px}.btn-ghost{padding:0 12px}.btn-ghost .lbl{display:none}.btn-ghost .ic{margin-right:0}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{-webkit-animation-duration:.01ms!important;animation-duration:.01ms!important;-webkit-animation-delay:0s!important;animation-delay:0s!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
|
| 2 |
.pdf-card{margin:18px 10px 8px;padding:16px;background:var(--white);border-radius:16px;box-shadow:var(--lift);display:flex;align-items:center;justify-content:space-between;position:relative;overflow:hidden}.pdf-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--red)}.pdf-card>div{min-width:0;padding-right:10px}.pdf-kicker{display:inline-block;color:var(--red-d);font-size:12px;font-weight:900;letter-spacing:1px;margin-bottom:2px}.pdf-card h2{font-size:18px;line-height:1.35;font-weight:900}.pdf-card p{font-size:12.5px;line-height:1.6;color:var(--muted);margin-top:4px}.pdf-card .btn{flex:0 0 auto;white-space:nowrap}.pdf-body{padding:16px}.pdf-cover{background:var(--red-d);color:var(--white);padding:22px 18px;border-radius:14px;box-shadow:var(--lift);display:flex;flex-direction:column;align-items:flex-start;position:relative;overflow:hidden}.pdf-cover:after{content:"";position:absolute;width:130px;height:130px;border:18px solid rgba(255,255,255,.12);border-radius:50%;right:-38px;top:-38px}.pdf-count{font-family:var(--mono);font-size:64px;line-height:.9;font-weight:900;letter-spacing:-4px}.pdf-cover b{font-size:22px;margin-top:8px}.pdf-cover small{font-size:12px;opacity:.82;margin-top:8px;line-height:1.5}.pdf-copy{margin-top:18px}.pdf-copy h2{font-size:20px;font-weight:900}.pdf-copy p{font-size:14px;line-height:1.75;margin-top:6px}.pdf-copy ul{padding-left:20px;margin:10px 0 0;color:var(--muted);font-size:13px;line-height:1.85}.pdf-status{margin-top:16px;padding:10px 12px;background:rgba(18,184,134,.1);border-radius:10px;color:var(--mint-d);font-size:13px;font-weight:700}.pdf-foot{flex-wrap:wrap}.pdf-foot .btn{min-width:0;flex:1;margin-right:8px}.pdf-foot .btn:last-of-type{margin-right:8px}.pdf-foot .foot-close{flex:0 0 auto}
|
| 3 |
+
.pdf-cover-img{display:block;width:100%;max-width:310px;height:auto;max-height:360px;object-fit:cover;object-position:center;margin:0 auto 14px;border-radius:14px;box-shadow:var(--lift);background:var(--paper)}
|
htlb/miniapp/tool/高性价比人生指南-765条建议全集.pdf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a122564fbe972f04b3ff2e58a148553b364776abc490a481a0a5616a3881eeb
|
| 3 |
+
size 10422465
|
htlb/miniapp/高性价比人生-小工具.zip
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:104d92865933ac4fc3592f3c2f11114f5649c49ee701dda30f77e7d864996d4c
|
| 3 |
+
size 11305115
|
htlb/pdf/高性价比人生指南-765条建议全集.pdf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a122564fbe972f04b3ff2e58a148553b364776abc490a481a0a5616a3881eeb
|
| 3 |
+
size 10422465
|
miniapp/README.md
CHANGED
|
@@ -37,7 +37,7 @@
|
|
| 37 |
| 5 | **详情** | 全屏弹出。完整显示 标题、标签、花掉(成本)、换回(说人话)、证据等级(含原书对 A/B/C 的定义)、收益原文(分段)、备注(分段)、来源(编号列表)。正文里「见第 X 节第 Y 条」「见本节第 Y 条」「第 Y 条(…)」「第 4 节第 15、16 条」「见第 13 节」都能点击跳转(法条「《…》第 N 条」「〔…〕号第 N 条」「该意见第 N 条」等自动排除);跳转有返回栈;底部操作条:返回 / 上一条 / 下一条 / 收藏。 |
|
| 38 |
| 6 | **收藏** | 心形按钮(今日、列表、详情三处同步),收藏页按收藏时间倒序,底部导航角标显示数量。客户端 ≥ 9.46 用 `xhs.miniTool.setStorage/getStorage`(JSON 字符串),否则降级 `localStorage`,全部 try/catch,写失败有提示;升级时自动迁移旧数据。 |
|
| 39 |
| 7 | **分享图** | Canvas 2D 画 1080×1440(3:4)小票:左上「高性价比人生」贴纸、日期、节条号、标题(末行垫马克笔黄)、标签贴纸、花掉 / 换回 / 证据 + 斑驳印章、条码、锯齿底边,页脚「高性价比人生 · 出自《高性价比人生指南》CC BY 4.0」+ 仓库地址 + 免责短句。中文逐字换行、拉丁词不拆、避头尾标点、避免末行孤字,字号 100% → 78% 自动缩放,仍放不下再按预算截断并加省略号。有 `window.xhs.miniTool` 时:「存到相册」(`writeTempFile` → `saveImageToPhotosAlbum({filePath})`,失败回退 data URL)、「发成笔记」(`postNote`,title 截到 20 字,content ≤ 1000 字,`photo_publish`)。没有时用 `<img>` 预览并提示「长按保存不可用,请在小红书 App 内使用」。 |
|
| 40 |
-
| 8 | **765 条建议全集 PDF** | 今日页新增「全集资料包」卡片,进入后展示 **
|
| 41 |
| 9 | **触感与互动** | 「再抽一张」、收藏、分享图、全集导出 / 分享按钮都有轻触反馈或明确状态反馈;`vibrateShort` 不存在或失败时静默降级;导出过程防重复点击。笔记标签扩展到健康急救、防骗、理财避坑、时间管理、开源阅读、安全意识等相关主题。 |
|
| 42 |
| 8 | **页脚 / 关于** | 页脚:出处与 CC BY 4.0、免责声明、代币声明。关于页:小票怎么读、A/B/C 证据等级原文定义、「性价比极高」口径、出处与许可(作者 eternity4719、仓库、许可证地址、改动说明与数据同步日期)、免责声明、代币声明(「本项目从未发行、也不会发行任何代币或数字资产」)、隐私说明。 |
|
| 43 |
| 9 | **状态与性能** | 无结果:空白小票 +「无」字印章 + 原因 + 建议词 + 「清空搜索和筛选」;收藏为空有引导。列表分批渲染(首批 14 张,IntersectionObserver 提前 800px 每次追加 30 张)。数据两包:`data.js`(478 KB,首屏字段)同步加载,`data-full.js`(1.79 MB,收益 / 来源 / 备注)`async` 加载,到位后自动补全打开着的详情、重算搜索。 |
|
|
@@ -64,11 +64,11 @@
|
|
| 64 |
|
| 65 |
## 本轮升级:全集 PDF、关注门槛与分享互动
|
| 66 |
|
| 67 |
-
- 今日页新增「全集资料包」卡片,点击后进入 765 条建议全集面板,展示 **765 条 / 34 节 /
|
| 68 |
- 小红书容器中导出前执行 `getFollowStatus`;未关注则提示并调用 `followAuthor`,关注状态二次确认成功才允许导出。旧客户端没有关注能力时不伪造成功,明确提示升级;普通浏览器不具备关注 API,则直接打开本地 PDF 预览,由系统提供保存 / 分享。
|
| 69 |
- PDF 已随工具包离线打包,文件链路直接把包内相对文件路径交给 `openDocument` 或 `saveFile`;「分享给微信」按 `shareFile` / `share` 能力检测。所有调用都有判空、超时、防重复点击和失败提示;不会把 PDF 路径误当作文本写入临时文件。
|
| 70 |
- `vibrateShort({type:"light"})` 接入再抽、收藏、分享图、PDF 导出 / 分享;不支持时静默降级。分享笔记标签扩展为健康急救、防骗指南、理财避坑、时间管理、开源阅读、安全意识、自我提升等相关主题,并保留 CC BY 4.0 出处与免责声明。
|
| 71 |
-
- PDF 资源为 `高性价比人生指南-765条建议全集.pdf`(A4、
|
| 72 |
|
| 73 |
## 文件清单与大小
|
| 74 |
|
|
@@ -81,9 +81,11 @@
|
|
| 81 |
| `app.js` | 57.4 KB | IIFE;新增 PDF 关注门槛、导出 / 分享能力检测、触感反馈与错误态,无 source map |
|
| 82 |
| `data.js` | 478.4 KB | `window.__BOOK__ = JSON.parse("…")`:34 节 + 765 条的标题 / 标签 / 成本 / 说人话 / 证据等级 / 拼音首字母(已清洗) |
|
| 83 |
| `data-full.js` | 1786.6 KB | `window.__BOOK_FULL__ = JSON.parse("…")`:收益原文 / 结构化来源 / 备注(已清洗) |
|
| 84 |
-
| `icon.svg` | 0.3 KB | 图标 |
|
| 85 |
-
| `
|
| 86 |
-
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
- 上传包:`/workspaces/frontend/public/htlb/miniapp/高性价比人生-小工具.zip` —— **11154.2 KB**(根目录直接是上面 7 个文件;旧的 `人生小票-小工具.zip` 已删除)
|
| 89 |
- 网页演示副本:`/workspaces/frontend/public/htlb/miniapp/tool/`(与 dist 逐字节相同)
|
|
|
|
| 37 |
| 5 | **详情** | 全屏弹出。完整显示 标题、标签、花掉(成本)、换回(说人话)、证据等级(含原书对 A/B/C 的定义)、收益原文(分段)、备注(分段)、来源(编号列表)。正文里「见第 X 节第 Y 条」「见本节第 Y 条」「第 Y 条(…)」「第 4 节第 15、16 条」「见第 13 节」都能点击跳转(法条「《…》第 N 条」「〔…〕号第 N 条」「该意见第 N 条」等自动排除);跳转有返回栈;底部操作条:返回 / 上一条 / 下一条 / 收藏。 |
|
| 38 |
| 6 | **收藏** | 心形按钮(今日、列表、详情三处同步),收藏页按收藏时间倒序,底部导航角标显示数量。客户端 ≥ 9.46 用 `xhs.miniTool.setStorage/getStorage`(JSON 字符串),否则降级 `localStorage`,全部 try/catch,写失败有提示;升级时自动迁移旧数据。 |
|
| 39 |
| 7 | **分享图** | Canvas 2D 画 1080×1440(3:4)小票:左上「高性价比人生」贴纸、日期、节条号、标题(末行垫马克笔黄)、标签贴纸、花掉 / 换回 / 证据 + 斑驳印章、条码、锯齿底边,页脚「高性价比人生 · 出自《高性价比人生指南》CC BY 4.0」+ 仓库地址 + 免责短句。中文逐字换行、拉丁词不拆、避头尾标点、避免末行孤字,字号 100% → 78% 自动缩放,仍放不下再按预算截断并加省略号。有 `window.xhs.miniTool` 时:「存到相册」(`writeTempFile` → `saveImageToPhotosAlbum({filePath})`,失败回退 data URL)、「发成笔记」(`postNote`,title 截到 20 字,content ≤ 1000 字,`photo_publish`)。没有时用 `<img>` 预览并提示「长按保存不可用,请在小红书 App 内使用」。 |
|
| 40 |
+
| 8 | **765 条建议全集 PDF** | 今日页新增「全集资料包」卡片,进入后展示 **310 页 / 34 节 / 765 条**;原来的第 1 页封面已移除,正文从原第 2 页开始。导出前在小红书容器内先 `getFollowStatus`,未关注时调用 `followAuthor`,再次确认成功才继续;用 `openDocument` / `saveFile` 打开或保存,均判空、超时、可重试。原生能力不可用时,普通浏览器打开同目录 PDF 预览(浏览器自己的保存 / 微信分享能力由系统提供)。另有「分享给微信」入口,按 `shareFile` / `share` 能力逐级降级。 |
|
| 41 |
| 9 | **触感与互动** | 「再抽一张」、收藏、分享图、全集导出 / 分享按钮都有轻触反馈或明确状态反馈;`vibrateShort` 不存在或失败时静默降级;导出过程防重复点击。笔记标签扩展到健康急救、防骗、理财避坑、时间管理、开源阅读、安全意识等相关主题。 |
|
| 42 |
| 8 | **页脚 / 关于** | 页脚:出处与 CC BY 4.0、免责声明、代币声明。关于页:小票怎么读、A/B/C 证据等级原文定义、「性价比极高」口径、出处与许可(作者 eternity4719、仓库、许可证地址、改动说明与数据同步日期)、免责声明、代币声明(「本项目从未发行、也不会发行任何代币或数字资产」)、隐私说明。 |
|
| 43 |
| 9 | **状态与性能** | 无结果:空白小票 +「无」字印章 + 原因 + 建议词 + 「清空搜索和筛选」;收藏为空有引导。列表分批渲染(首批 14 张,IntersectionObserver 提前 800px 每次追加 30 张)。数据两包:`data.js`(478 KB,首屏字段)同步加载,`data-full.js`(1.79 MB,收益 / 来源 / 备注)`async` 加载,到位后自动补全打开着的详情、重算搜索。 |
|
|
|
|
| 64 |
|
| 65 |
## 本轮升级:全集 PDF、关注门槛与分享互动
|
| 66 |
|
| 67 |
+
- 今日页新增「全集资料包」卡片,点击后进入 765 条建议全集面板,展示 **765 条 / 34 节 / 310 页**,并在面板中预览新的 3:4 封面。
|
| 68 |
- 小红书容器中导出前执行 `getFollowStatus`;未关注则提示并调用 `followAuthor`,关注状态二次确认成功才允许导出。旧客户端没有关注能力时不伪造成功,明确提示升级;普通浏览器不具备关注 API,则直接打开本地 PDF 预览,由系统提供保存 / 分享。
|
| 69 |
- PDF 已随工具包离线打包,文件链路直接把包内相对文件路径交给 `openDocument` 或 `saveFile`;「分享给微信」按 `shareFile` / `share` 能力检测。所有调用都有判空、超时、防重复点击和失败提示;不会把 PDF 路径误当作文本写入临时文件。
|
| 70 |
- `vibrateShort({type:"light"})` 接入再抽、收藏、分享图、PDF 导出 / 分享;不支持时静默降级。分享笔记标签扩展为健康急救、防骗指南、理财避坑、时间管理、开源阅读、安全意识、自我提升等相关主题,并保留 CC BY 4.0 出处与免责声明。
|
| 71 |
+
- PDF 资源为 `高性价比人生指南-765条建议全集.pdf`(A4、310 页、765 条,10,422,465 bytes),同时放入演示目录与工具上传包,离线可用,不依赖页面主动联网;原始第 1 页封面已删除。
|
| 72 |
|
| 73 |
## 文件清单与大小
|
| 74 |
|
|
|
|
| 81 |
| `app.js` | 57.4 KB | IIFE;新增 PDF 关注门槛、导出 / 分享能力检测、触感反馈与错误态,无 source map |
|
| 82 |
| `data.js` | 478.4 KB | `window.__BOOK__ = JSON.parse("…")`:34 节 + 765 条的标题 / 标签 / 成本 / 说人话 / 证据等级 / 拼音首字母(已清洗) |
|
| 83 |
| `data-full.js` | 1786.6 KB | `window.__BOOK_FULL__ = JSON.parse("…")`:收益原文 / 结构化来源 / 备注(已清洗) |
|
| 84 |
+
| `icon.svg` | 0.3 KB | SVG 图标兼容回退 |
|
| 85 |
+
| `icon.png` | 165.2 KB | 新生成的热敏小票 / 证据印章图标 |
|
| 86 |
+
| `cover-3x4.jpg` | 170.8 KB | 新生成的 3:4(1086×1448)打印机封面 |
|
| 87 |
+
| `高性价比人生指南-765条建议全集.pdf` | 10178.2 KB | A4 · 310 页 · 全书 765 条,已低于 10 MiB |
|
| 88 |
+
| **合计** | **13364.0 KB** | 工具演示目录总大小,不含压缩收益 |
|
| 89 |
|
| 90 |
- 上传包:`/workspaces/frontend/public/htlb/miniapp/高性价比人生-小工具.zip` —— **11154.2 KB**(根目录直接是上面 7 个文件;旧的 `人生小票-小工具.zip` 已删除)
|
| 91 |
- 网页演示副本:`/workspaces/frontend/public/htlb/miniapp/tool/`(与 dist 逐字节相同)
|