PageSourceSearch

https://www.jiahaoplus.com/_next/static/chunks/633.57ee3b504d2199f4.js

js jiahaoplus.com collected 2026-09-30 18:07:40 UTC 15,900 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[633,7835,70387,6140,27143,24596,78790,40055,70752,99083,79434,87897],{78790:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(85893),l=r(21384),a=r(9008),o=r.n(a),i=r(67294);function s(e){let{priority:t,id:r,src:a,alt:s,fallbackSrc:u,placeholderSrc:d,className:h,width:m,height:f,title:v,onLoad:g,onClick:p,style:_}=e,E=(0,l.JA)("IMAGE_COMPRESS_WIDTH"),O=(0,l.JA)("IMG_LAZY_LOAD_PLACEHOLDER"),w=(0,i.useRef)(null),[A,x]=(0,i.useState)(d||O),b=(0,i.useCallback)(()=>{w.current&&(w.current.src!==u&&u?w.current.src=u:w.current.src!==d&&d?w.current.src=d:w.current.src=O,w.current.classList.remove("lazy-image-placeholder"))},[O,u,d]);(0,i.useEffect)(()=>{let e=c(a,E)||O,r=w.current,n=()=>{"function"==typeof g&&g(),w.current&&w.current.classList.remove("lazy-image-placeholder")};if(t){let t=new Image;t.src=e,t.onload=()=>{x(e),n(e)},t.onerror=b;return}if(!window.IntersectionObserver){let t=new Image;t.src=e,t.onload=()=>{x(e),n(e)},t.onerror=b;return}let o=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){let r=new Image;"decoding"in r&&(r.decoding="async"),r.src=e,r.onload=()=>{x(e),n(e)},r.onerror=b,o.unobserve(t.target)}})},{rootMargin:(0,l.JA)("LAZY_LOAD_THRESHOLD","200px"),threshold:.1});return r&&o.observe(r),()=>{r&&o.unobserve(r)}},[a,E,t,O,u,b,g,d]);let N={ref:w,src:A,"data-src":a,alt:s||"Lazy loaded image",onLoad:()=>{},onError:b,className:"".concat(h||""," lazy-image-placeholder"),style:_,width:m||"auto",height:f||"auto",onClick:p,loading:t?"eager":"lazy",decoding:"async",...(0,l.JA)("WEBP_SUPPORT")&&{"data-webp":!0},...(0,l.JA)("AVIF_SUPPORT")&&{"data-avif":!0}};return(r&&(N.id=r),v&&(N.title=v),a)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{alt:N.alt,...N}),t&&(0,n.jsx)(o(),{children:(0,n.jsx)("link",{rel:"preload",as:"image",href:c(a,E)})})]}):null}let c=(e,t)=>{var r,n;if(!e)return null;let l=(null===(n=window)||void 0===n?void 0:null===(r=n.screen)||void 0===r?void 0:r.width)||t;return l>t?e:e.replace(/width=\d+/,"width=".concat(l)).replace(/w=\d+/,"w=".concat(l))}},98685:function(e,t,r){var n=r(85893),l=r(78790);t.Z=e=>{let{icon:t}=e;return t?t.startsWith("http")||t.startsWith("data:")?(0,n.jsx)(l.Z,{src:t,className:"w-8 h-8 my-auto inline mr-1"}):(0,n.jsx)("span",{className:"mr-1",children:t}):(0,n.jsx)(n.Fragment,{})}},87897:function(e,t,r){r.r(t),r.d(t,{default:function(){return j}});var n=r(85893),l=r(21384),a=r(91220);let o=/^https?:\/\//i,i=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=new Set;return t.filter(Boolean).join(" ").split(/\s+/).filter(Boolean).forEach(e=>n.add(e)),n.size>0?Array.from(n).join(" "):void 0},s=(e,t)=>{if("string"!=typeof e||!o.test(e))return!1;if(!t)return!0;try{return new URL(e).origin!==t}catch(e){return!0}},c=(e,t,r)=>"_blank"===t||s(e,r||(window.location?window.location.origin:null));var u=e=>{let{href:t,target:r,rel:l,...a}=e,o=c(t,r),s=o?"_blank":r,u=o?i(l,"noopener noreferrer"):l;return(0,n.jsx)("a",{...a,href:t,target:s,rel:u})},d=r(47935),h=r(9894);r(31392);var m=r(5152),f=r.n(m),v=r(67294),g=r(18639);let p=e=>{let t=null==e?void 0:e.block;return!!t&&Object.values(t).some(e=>{var t;return(null==e?void 0:null===(t=e.value)||void 0===t?void 0:t.type)==="code"})},_=()=>{if(d.isBrowser)for(let e of document.querySelectorAll(".notion-table a"))e.removeAttribute("href")},E=e=>{setTimeout(()=>{if(d.isBrowser){var t;let r=null===(t=document)||void 0===t?void 0:t.querySelectorAll(".notion-collection-card-cover img");if(r&&e)for(let t=0;t<r.length;t++)e.attach(r[t]);for(let e of document.getElementsByClassName("notion-collection-card"))e.removeAttribute("href")}},800)},O=()=>{setTimeout(()=>{var e,t,r;let n=null===(t=window)||void 0===t?void 0:null===(e=t.location)||void 0===e?void 0:e.hash;if(n&&n.length>0){console.log("jump to hash",n);let e=document.getElementById(n.substring(1));e&&(null==e?void 0:null===(r=e.className)||void 0===r?void 0:r.indexOf("notion"))>-1&&e.scrollIntoView({block:"start",behavior:"smooth"})}},180)},w=e=>"/"+e.replace(/-/g,""),A=f()(()=>Promise.all([r.e(15660),r.e(31794)]).then(r.bind(r,31794)).then(e=>e.Code),{loadableGenerated:{webpack:()=>[31794]},ssr:!1}),x=f()(()=>Promise.all([r.e(21265),r.e(57757)]).then(r.bind(r,57757)).then(async e=>(await Promise.all([r.e(21265),r.e(6448)]).then(r.bind(r,6448)),e.Equation)),{loadableGenerated:{webpack:()=>[6448]},ssr:!0}),b=f()(()=>r.e(26778).then(r.bind(r,26778)).then(e=>
1e.Pdf),{loadableGenerated:{webpack:()=>[26778]},ssr:!1}),N=f()(()=>Promise.all([r.e(95219),r.e(39332),r.e(15660),r.e(82703)]).then(r.bind(r,82703)),{loadableGenerated:{webpack:()=>[82703]},ssr:!1}),P=f()(()=>r.e(88079).then(r.bind(r,88079)),{loadableGenerated:{webpack:()=>[88079]},ssr:!1}),T=f()(()=>Promise.resolve().then(r.bind(r,31)).then(e=>e.AdEmbed),{loadableGenerated:{webpack:()=>[31]},ssr:!0}),R=f()(()=>r.e(1276).then(r.bind(r,10635)).then(e=>e.Collection),{loadableGenerated:{webpack:()=>[10635]},ssr:!0}),y=f()(()=>r.e(6873).then(r.bind(r,6873)).then(e=>e.Modal),{loadableGenerated:{webpack:()=>[6873]},ssr:!1}),L=e=>{let{id:t}=e;return(0,n.jsx)(P,{tweetId:t})};var j=e=>{let{post:t,className:o}=e,i=(0,l.JA)("POST_DISABLE_GALLERY_CLICK"),s=(0,l.JA)("POST_DISABLE_DATABASE_CLICK"),c=(0,l.JA)("SPOILER_TEXT_TAG"),m=(0,v.useRef)(null),f=(0,l.JA)("IMAGE_ZOOM_IN_WIDTH",1200);return(0,v.useEffect)(()=>{O()},[]),(0,v.useEffect)(()=>{i&&(!m.current&&d.isBrowser&&(m.current=(0,h.Z)({background:"rgba(0, 0, 0, 0.2)",margin:function(){let e=window.innerWidth;return e<500?8:e<800?20:e<1280?30:e<1600?40:e<1920?48:72}()})),E(null==m?void 0:m.current)),s&&_();let e=document.getElementById("notion-article")||document.body;if(!e.querySelector("img"))return;let t=new MutationObserver((e,t)=>{e.forEach(e=>{"attributes"===e.type&&"class"===e.attributeName&&e.target.classList.contains("medium-zoom-image--opened")&&setTimeout(()=>{var t,r;let n=null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.getAttribute("src");null==e||null===(r=e.target)||void 0===r||r.setAttribute("src",(0,a.h)(n,f))},800)})});return t.observe(e,{attributes:!0,subtree:!0,attributeFilter:["class"]}),()=>{t.disconnect()}},[t]),(0,v.useEffect)(()=>{c&&r.e(67429).then(r.t.bind(r,67429,23)).then(e=>{Promise.all([(0,d.loadExternalResource)("/js/spoilerText.js","js"),(0,d.loadExternalResource)("/css/spoiler-text.css","css")]).then(()=>{window.textToSpoiler&&window.textToSpoiler(e.default(c))})})},[t]),(0,n.jsxs)("div",{id:"notion-article",className:"mx-auto overflow-hidden ".concat(o||""),children:[(0,n.jsx)(g.cp,{recordMap:null==t?void 0:t.blockMap,mapPageUrl:w,mapImageUrl:a.I,components:{Code:A,Collection:R,Equation:x,Link:u,Modal:y,Pdf:b,Tweet:L}}),(0,n.jsx)(T,{}),p(null==t?void 0:t.blockMap)&&(0,n.jsx)(N,{})]})}},7835:function(e,t,r){var n=r(85893),l=r(41664),a=r.n(l),o=r(21384);let i=e=>{let{passHref:t,legacyBehavior:r,placeholderSrc:n,fallbackSrc:l,...a}=e;return a},s=e=>{let{placeholderSrc:t,fallbackSrc:r,src:n,alt:l,width:a,height:o,loading:i,decoding:s,onLoad:c,onError:u,...d}=e;return d};t.Z=e=>{let{href:t,children:r,...l}=e,c=(0,o.JA)("LINK"),u="";"string"==typeof t?u=t:"object"==typeof t&&null!==t&&"string"==typeof t.pathname&&(u=t.pathname);let d=u.startsWith("http")&&!u.startsWith(c),h=()=>{var e;let t=new URLSearchParams((null===(e=window.location.search)||void 0===e?void 0:e.slice(1))||""),r={};for(let[e,n]of t.entries())""!==n&&(r[e]=n);return r};if(d){let e="string"==typeof t?t:new URL(t.pathname,c).toString();return(0,n.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",...i(l),children:r})}let m="string"==typeof t?(e=>{if("string"!=typeof e||!e||e.startsWith("#"))return e;let t=h();if(0===Object.keys(t).length)return e;let r=e.startsWith("http://")||e.startsWith("https://"),n=new URL(e,c);return(Object.entries(t).forEach(e=>{let[t,r]=e;n.searchParams.has(t)||n.searchParams.set(t,r)}),r)?n.toString():"".concat(n.pathname).concat(n.search).concat(n.hash)})(t):(e=>{if(!e||"object"!=typeof e)return e;let t=h();return 0===Object.keys(t).length?e:{...e,query:{...t,...e.query||{}}}})(t);return(0,n.jsx)(a(),{href:m,...s(l),children:r})}},55376:function(e,t,r){var n=r(85893),l=r(21384);t.Z=e=>{let{post:t,className:r}=e;return JSON.parse((0,l.JA)("COMMENT_TWIKOO_COUNT_ENABLE"))?(0,n.jsxs)("a",{href:"".concat(t.slug,"?target=comment"),className:"mx-1 hidden comment-count-wrapper-".concat(t.id," ").concat(r||""),children:[(0,n.jsx)("i",{className:"far fa-comment mr-1"}),(0,n.jsx)("span",{className:"comment-count-text-".concat(t.id)})]}):null}},91220:function(e,t,r){r.d(t,{I:function(){return o},h:function(){return i}});var n=r(57733),l=r.n(n),a=r(21384);let o=function(e,t){var r,n;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"block",o=!(arguments.length>3)||void 0===arguments[3]||arguments[3];if(!e)return null;let s=null;if((!(0===(s=e.startsWith("/")?l().NOTION_HOST+e:e).indexOf("https://www.notion.so/image")||s.includes("notion.site/images/page-cover/"))&&("bookmark"===t.type||s.includes("secure.notion-static.com")||s.includes("prod-files-secure"))||0===s.indexOf("attachment"))&&(s=l().NOTION_HOST+"/image/"+encodeURIComponent(s)+"?table="+a+"&id="+t.id),r=s,!/[\u{1F300}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F018}-\u{1F270}\u{238C}\u{2B06}\u{2B07}\u{2B05}\u{27A1}\u{2194}-\u{2199}\u{2194}\u{21A9}\u{21AA}\u{2934}\u{2935}\u{25AA}\u{25AB}\u{25FE}\u{25FD}\u{25FB}\u{25FC}\u{25B6}\u{25C0}
1\u{1F200}-\u{1F251}]/u.test(r)&&0>s.indexOf("notion.so/images/page-cover")){if(l().RANDOM_IMAGE_URL){let e=l().RANDOM_IMAGE_REPLACE_TEXT,t=!1;e?e.split(",").forEach(e=>{s.indexOf(e)>-1&&(t=!0)}):t=!0,t&&(s=l().RANDOM_IMAGE_URL)}if(s&&s.length>4&&!s.includes("https://www.notion.so/images/")){let e=s.includes("?")?"&":"?";s="".concat(s.trim()).concat(e,"t=").concat(t.id)}}if(o){let e=null==t?void 0:null===(n=t.format)||void 0===n?void 0:n.block_width;s=i(s,e)}return s},i=function(e,t){let r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"webp";if(!e||0!==e.indexOf("http")||e.includes(".svg"))return e;t&&0!==t||(t=(0,a.JA)("IMAGE_COMPRESS_WIDTH"));try{r=new URL(e),n=new URLSearchParams(r.search)}catch(t){try{let t=decodeURIComponent(e);r=new URL(t),n=new URLSearchParams(r.search)}catch(r){return console.error("compressImage: Invalid URL:",e,t),e}}return 0===e.indexOf(l().NOTION_HOST)&&e.indexOf("amazonaws.com")>0?(n.set("width",t),n.set("cache","v2"),r.search=n.toString(),r.toString()):0===e.indexOf("https://images.unsplash.com/")?(n.set("q",o),n.set("width",t),n.set("fmt",i),n.set("fm",i),r.search=n.toString(),r.toString()):0===e.indexOf("https://your_picture_bed")?"do_somethin_here":e}},84797:function(e,t,r){r.d(t,{Z:function(){return a},x:function(){return o}});var n=r(57733),l=r.n(n);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l().LANG;if(!e||!t)return e||"";let r=new Date(e).toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"});return"zh"===t.slice(0,2).toLowerCase()?r.replace("年","-").replace("月","-").replace("日",""):r}function o(e,t){let r=new Date(e),n={"M+":r.getMonth()+1,"d+":r.getDate(),"h+":r.getHours(),"m+":r.getMinutes(),"s+":r.getSeconds(),"q+":Math.floor((r.getMonth()+3)/3),S:r.getMilliseconds()};for(let e in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(r.getFullYear()+"").substr(4-RegExp.$1.length))),n)RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?n[e]:("00"+n[e]).substr((""+n[e]).length)));return t.trim()}},30548:function(e,t,r){r.d(t,{Z:function(){return n}});function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=null,n=0,l=null;return function(){for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];let s=Date.now(),c=t-(s-n);if(l=o,c<=0){r&&(clearTimeout(r),r=null),n=s,e(...l),l=null;return}r||(r=setTimeout(()=>{r=null,n=Date.now(),l&&(e(...l),l=null)},c))}}},99083:function(e,t,r){r.r(t),r.d(t,{BlogItem:function(){return h}});var n=r(85893),l=r(78790),a=r(98685),o=r(87897);r(55376);var i=r(21384),s=r(76966),c=r(84797),u=r(7835),d=r(79434);let h=e=>{var t,r;let{post:h}=e,{NOTION_CONFIG:m}=(0,s.Og)(),f=(0,i.JA)("TYPOGRAPHY_POST_COVER_ENABLE",!1,d.default),v=(0,i.JA)("POST_LIST_PREVIEW",!1,m)&&h.blockMap;return(0,n.jsx)("div",{className:"h-42 mt-6 mb-10",children:(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("div",{className:"article-cover h-full",children:f&&(0,n.jsx)("div",{className:"overflow-hidden mr-2 w-56 h-full",children:(0,n.jsx)(u.Z,{href:h.href,passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(l.Z,{src:null==h?void 0:h.pageCoverThumbnail,className:"w-56 h-full object-cover object-center group-hover:scale-110 duration-500"})})})}),(0,n.jsxs)("article",{className:"article-info",children:[(0,n.jsx)("h2",{className:"mb-2",children:(0,n.jsxs)(u.Z,{href:h.href,className:"text-xl underline decoration-2 font-bold text-[var(--primary-color)] dark:text-white dark:hover:bg-white dark:hover:text-[var(--primary-color)]  duration-200 transition-all rounded-sm",children:[(0,i.JA)("POST_TITLE_ICON")&&(0,n.jsx)(a.Z,{icon:h.pageIcon}),h.title]})}),(0,n.jsxs)("header",{className:"text-md text-[var(--primary-color)] dark:text-gray-300 flex-wrap flex items-center leading-6",children:[(0,n.jsx)("div",{className:"space-x-2",children:(0,n.jsxs)("span",{className:"text-sm",children:["发布于",(0,n.jsx)(u.Z,{className:"p-1 hover:text-red-400 transition-all duration-200",href:"/archive#".concat((0,c.x)(null==h?void 0:h.publishDate,"yyyy-MM")),children:(null===(t=h.date)||void 0===t?void 0:t.start_date)||h.createdTime})]})}),(0,n.jsx)("div",{className:"text-sm",children:(null==h?void 0:h.tags)&&(null==h?void 0:null===(r=h.tags)||void 0===r?void 0:r.length)>0&&(null==h?void 0:h.tags.map(e=>(0,n.jsx)(u.Z,{href:"/tag/".concat(e),className:" hover:text-red-400 transition-all duration-200",children:(0,n.jsxs)("span",{children:[" #",e]})},e)))})]}),(0,n.jsxs)("main",{className:"text-[var(--primary-color)] dark:text-gray-300 line-clamp-4 overflow-hidden text-ellipsis relative leading-[1.7]",children:[!v&&(0,n.jsx)(n.Fragment,{children:h.summary}),v&&(null==h?void 0:h.blockMap)&&(0,n.jsxs)("div",{className:"line-clamp-4 overflow-hidden",children:[(0,n.jsx)(o.default,{post:h}),(0,n.jsx)("hr",{className:"border-dashed py-4"})]})]})]})]})},h.id)}},633:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=r(85893),l=r(21384),a=r(76966),o=r(30548),i=r(67294),s=r(99083);function c(e){let{posts:t}=e,{locale:r,NOTION_CONFIG:c}=(0,a.Og)(),[u,d]=(0,i.useState)(1),h=(0,l.JA)("POSTS_PER_PAGE",null,c),m=!1,f=t?Object.assign(t).slice(0,h*u):[];t&&(m=u*h<t.length);let v=()=>{m&&d(u+1)},g=(0,i.useRef)(null),p=(0,i.useCallback)((0,o.Z)(()=>{window.scrollY+window.outerHeight>
1(g&&g.current?g.current.clientHeight:0)+100&&v()},500));return(0,i.useEffect)(()=>(window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)})),(0,n.jsxs)("div",{id:"posts-wrapper",className:"w-full md:pr-8 mb-12",ref:g,children:[f.map(e=>(0,n.jsx)(s.BlogItem,{post:e},e.id)),(0,n.jsxs)("div",{onClick:v,className:"w-full my-4 py-4 text-center cursor-pointer ",children:[" ",m?r.COMMON.MORE:"".concat(r.COMMON.NO_MORE," \uD83D\uDE30")," "]})]})}},79434:function(e,t,r){r.r(t);var n=r(83454);let l={TYPOGRAPHY_BLOG_NAME:n.env.NEXT_PUBLIC_TYPOGRAPHY_BLOG_NAME||"活字印刷",TYPOGRAPHY_BLOG_NAME_EN:n.env.NEXT_PUBLIC_TYPOGRAPHY_BLOG_NAME_EN||n.env.NEXT_PUBLIC_TYPOGRAPHY_BLOG_NAME||"Typography",TYPOGRAPHY_POST_AD_ENABLE:n.env.NEXT_PUBLIC_TYPOGRAPHY_POST_AD_ENABLE||!1,TYPOGRAPHY_POST_COVER_ENABLE:n.env.NEXT_PUBLIC_TYPOGRAPHY_POST_COVER_ENABLE||!1,TYPOGRAPHY_ARTICLE_RECOMMEND_POSTS:n.env.NEXT_PUBLIC_TYPOGRAPHY_ARTICLE_RECOMMEND_POSTS||!0,TYPOGRAPHY_MENU_CATEGORY:!0,TYPOGRAPHY_MENU_TAG:!0,TYPOGRAPHY_MENU_ARCHIVE:!0};t.default=l}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.