PageSourceSearch

https://www.apiseven.com/_next/static/chunks/pages/blog/[slug]-f7ea69d0c3d5ad0b.js

js apiseven.com collected 2026-10-03 22:17:26 UTC 16,288 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2492],{27484:function(n){var t;t=function(){"use strict";var n="millisecond",t="second",e="minute",i="hour",r="week",a="month",s="quarter",o="year",u="date",c="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,l=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=function(n,t,e){var i=String(n);return!i||i.length>=t?n:""+Array(t+1-i.length).join(e)+n},f="en",p={};p[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var t=["th","st","nd","rd"],e=n%100;return"["+n+(t[(e-20)%10]||t[e]||"th")+"]"}};var g="$isDayjsObject",m=function(n){return n instanceof w||!(!n||!n[g])},x=function n(t,e,i){var r;if(!t)return f;if("string"==typeof t){var a=t.toLowerCase();p[a]&&(r=a),e&&(p[a]=e,r=a);var s=t.split("-");if(!r&&s.length>1)return n(s[0])}else{var o=t.name;p[o]=t,r=o}return!i&&r&&(f=r),r||!i&&f},b=function(n,t){if(m(n))return n.clone();var e="object"==typeof t?t:{};return e.date=n,e.args=arguments,new w(e)},y={s:h,z:function(n){var t=-n.utcOffset(),e=Math.abs(t);return(t<=0?"+":"-")+h(Math.floor(e/60),2,"0")+":"+h(e%60,2,"0")},m:function n(t,e){if(t.date()<e.date())return-n(e,t);var i=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(i,a),s=e-r<0,o=t.clone().add(i+(s?-1:1),a);return+(-(i+(e-r)/(s?r-o:o-r))||0)},a:function(n){return n<0?Math.ceil(n)||0:Math.floor(n)},p:function(c){return({M:a,y:o,w:r,d:"day",D:u,h:i,m:e,s:t,ms:n,Q:s})[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(n){return void 0===n}};y.l=x,y.i=m,y.w=function(n,t){return b(n,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var w=function(){function h(n){this.$L=x(n.locale,null,!0),this.parse(n),this.$x=this.$x||n.x||{},this[g]=!0}var f=h.prototype;return f.parse=function(n){this.$d=function(n){var t=n.date,e=n.utc;if(null===t)return new Date(NaN);if(y.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(d);if(i){var r=i[2]-1||0,a=(i[7]||"0").substring(0,3);return e?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(t)}(n),this.init()},f.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},f.$utils=function(){return y},f.isValid=function(){return this.$d.toString()!==c},f.isSame=function(n,t){var e=b(n);return this.startOf(t)<=e&&e<=this.endOf(t)},f.isAfter=function(n,t){return b(n)<this.startOf(t)},f.isBefore=function(n,t){return this.endOf(t)<b(n)},f.$g=function(n,t,e){return y.u(n)?this[t]:this.set(e,n)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(n,s){var c=this,d=!!y.u(s)||s,l=y.p(n),h=function(n,t){var e=y.w(c.$u?Date.UTC(c.$y,t,n):new Date(c.$y,t,n),c);return d?e:e.endOf("day")},f=function(n,t){return y.w(c.toDate()[n].apply(c.toDate("s"),(d?[0,0,0,0]:[23,59,59,999]).slice(t)),c)},p=this.$W,g=this.$M,m=this.$D,x="set"+(this.$u?"UTC":"");switch(l){case o:return d?h(1,0):h(31,11);case a:return d?h(1,g):h(0,g+1);case r:var b=this.$locale().weekStart||0,w=(p<b?p+7:p)-b;return h(d?m-w:m+(6-w),g);case"day":case u:return f(x+"Hours",0);case i:return f(x+"Minutes",1);case e:return f(x+"Seconds",2);case t:return f(x+"Milliseconds",3);default:return this.clone()}},f.endOf=function(n){return this.startOf(n,!1)},f.$set=function(r,s){var c,d=y.p(r),l="set"+(this.$u?"UTC":""),h=((c={}).day=l+"Date",c[u]=l+"Date",c[a]=l+"Month",c[o]=l+"FullYear",c[i]=l+"Hours",c[e]=l+"Minutes",c[t]=l+"Seconds",c[n]=l+"Milliseconds",c)[d],f="day"===d?this.$D+(s-this.$W):s;if(d===a||d===o){var p=this.clone().set(u,1);p.$d[h](f),p.init(),this.$d=p.set(u,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](f);return this.init(),this},f.set=function(n,t){return this.clone().$set(n,t)},f.get=function(n){return this[y.p(n)]()},f.add=function(n,s){var u,c=this;n=Number(n);var d=y.p(s),l=function(t){var e=b(c);return y.w(e.date(e.date()+Math.round(t*n)),c)};if(d===a)return this.set(a,this.$M+n);if(d===o)return this.set(o,this.$y+n);if("day"===d)return l(1);if(d===r)return l(7);var h=((u={})[e]=6e4,u[i]=36e5,u[t]=1e3,u)[d]||1,f=this.$d.getTime()+n*h;return y.w(f,this)},f.subtract=function(n,t){return this.add(-1*n,t)},f.format=function(n){var t=this,e=this.$locale();
1if(!this.isValid())return e.invalidDate||c;var i=n||"YYYY-MM-DDTHH:mm:ssZ",r=y.z(this),a=this.$H,s=this.$m,o=this.$M,u=e.weekdays,d=e.months,h=e.meridiem,f=function(n,e,r,a){return n&&(n[e]||n(t,i))||r[e].slice(0,a)},p=function(n){return y.s(a%12||12,n,"0")},g=h||function(n,t,e){var i=n<12?"AM":"PM";return e?i.toLowerCase():i};return i.replace(l,function(n,i){return i||function(n){switch(n){case"YY":return String(t.$y).slice(-2);case"YYYY":return y.s(t.$y,4,"0");case"M":return o+1;case"MM":return y.s(o+1,2,"0");case"MMM":return f(e.monthsShort,o,d,3);case"MMMM":return f(d,o);case"D":return t.$D;case"DD":return y.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(e.weekdaysMin,t.$W,u,2);case"ddd":return f(e.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(a);case"HH":return y.s(a,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return g(a,s,!0);case"A":return g(a,s,!1);case"m":return String(s);case"mm":return y.s(s,2,"0");case"s":return String(t.$s);case"ss":return y.s(t.$s,2,"0");case"SSS":return y.s(t.$ms,3,"0");case"Z":return r}return null}(n)||r.replace(":","")})},f.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},f.diff=function(n,u,c){var d,l=this,h=y.p(u),f=b(n),p=(f.utcOffset()-this.utcOffset())*6e4,g=this-f,m=function(){return y.m(l,f)};switch(h){case o:d=m()/12;break;case a:d=m();break;case s:d=m()/3;break;case r:d=(g-p)/6048e5;break;case"day":d=(g-p)/864e5;break;case i:d=g/36e5;break;case e:d=g/6e4;break;case t:d=g/1e3;break;default:d=g}return c?d:y.a(d)},f.daysInMonth=function(){return this.endOf(a).$D},f.$locale=function(){return p[this.$L]},f.locale=function(n,t){if(!n)return this.$L;var e=this.clone(),i=x(n,t,!0);return i&&(e.$L=i),e},f.clone=function(){return y.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},h}(),$=w.prototype;return b.prototype=$,[["$ms",n],["$s",t],["$m",e],["$H",i],["$W","day"],["$M",a],["$y",o],["$D",u]].forEach(function(n){$[n[1]]=function(t){return this.$g(t,n[0],n[1])}}),b.extend=function(n,t){return n.$i||(n(t,w,b),n.$i=!0),b},b.locale=x,b.isDayjs=m,b.unix=function(n){return b(1e3*n)},b.en=p[f],b.Ls=p,b.p={},b},n.exports=t()},41127:function(n,t,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog/[slug]",function(){return e(57725)}])},44042:function(n,t,e){"use strict";var i=e(85893);e(67294);var r=e(30724),a=e.n(r),s=e(82809),o=e(10043),u=e.n(o),c=e(11163),d=e(91008),l=e(67630);let h=n=>{let{language:t,value:e}=n;return(0,i.jsx)(s.Z,{showLineNumbers:!0,language:t,children:e})};t.Z=n=>{let{isSimple:t,title:e,content:r,published_at:s}=n,{locale:o,asPath:f}=(0,c.useRouter)(),p=(0,d.FC)(o);return t?(0,i.jsxs)(l.gU,{style:{maxWidth:1200,padding:"0 25px",margin:"40px auto"},children:[(0,i.jsx)("h2",{style:{textAlign:"center",marginTop:30,marginBottom:20},children:e}),(0,i.jsx)(l.ky,{children:(0,i.jsx)(a(),{linkTarget:"_blank",escapeHtml:!1,source:r,plugins:[u()],renderers:{code:h}})}),(0,i.jsxs)("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,i.jsx)("p",{style:{marginBottom:0},children:(0,i.jsx)("b",{children:"SUPPORTED BY"})}),(0,i.jsx)("a",{href:"https://www.apiseven.com/",target:"_blank",children:(0,i.jsx)("img",{style:{width:100},src:"https://static.apiseven.com/202108/1640917868852-37633689-5279-48d6-a13a-189054e4d15b.png",alt:"支流科技"})})]})]}):(0,i.jsxs)("div",{children:[(0,i.jsx)(l.YU,{children:(0,i.jsxs)(l.AM,{children:[(0,i.jsx)("h1",{children:e}),(0,i.jsx)(l.J0,{children:(0,i.jsx)("div",{className:"left",children:(0,i.jsx)("div",{children:(0,i.jsxs)("p",{children:[p("updatedAt"),"\xa0","en-US"===o?new Date(s).toLocaleDateString("en-US"):new Date(s).toLocaleDateString()]})})})})]})}),(0,i.jsx)(l.x8,{children:(0,i.jsxs)(l.gU,{children:[(0,i.jsx)(l.ky,{children:(0,i.jsx)(a(),{linkTarget:"_blank",escapeHtml:!1,source:r,plugins:[u()],renderers:{code:h}})}),f.includes("apache-con-asia-2021")&&(0,i.jsx)("img",{src:"https://static.apiseven.com/uploads/2023/05/11/zTdY9bN0_APISIX-wechat.png",style:{width:"200px"},alt:"Apache APISIX WeChat"})]})})]})}},57725:function(n,t,e){"use strict";e.r(t),e.d(t,{__N_SSG:function(){return l}});var i=e(85893);e(67294);var r=e(9008),a=e.n(r),s=e(2962),o=e(27484),u=e.n(o),c=e(44042);let d="https://www.apiseven.com";var l=!0;t.default=n=>{let{post:t}=n,{title:e,description:r,content:o,published_at:l,slug:h,cover_url:f}=t,p=(null==h?void 0:h.split("/")[2])||"",g="".concat(d,"/blog/").concat(p),m=[{"@context":"https://schema.org","@type":"BlogPosting",headline:e,description:r||(o||"").trim().substring(0,140),url:g,mainEntityOfPage:{"@type":"WebPage","@id":g},image:f||"https://static.api7.ai/uploads/2023/03/28/hnmYHcii_api7.ai.webp",inLanguage:"zh-CN",...l?{datePublished:u()(l).toISOString()}:{},...t.author_name?{author:{"@type":"Person",name:t.author_name}}:{},publisher:{"@type":"Organization",name:"支流科技",logo:{"@type":"ImageObject",url:"https://static.api7.ai/2022/10/02/63398bceeeac7.webp"}}},{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"首页",item:d},{"@type":"ListItem",position:2,name:"技术博客",item:"".concat(d,"/blog")},{"@type":"ListItem",position:3,name:e,item:g}]}];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a(),{children:m.map((n,t)=>(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n).replace(/</g,"\\u003c")}},"blog-jsonld-".concat(t)))}
1),(0,i.jsx)(s.PB,{title:t.title,description:r||(o||"").trim().substring(0,140),canonical:"https://www.apiseven.com/blog/".concat(p),openGraph:{type:"article",article:{publishedTime:l},images:f?[{url:f,width:1200,height:630,alt:e}]:[{url:"https://static.api7.ai/uploads/2023/03/28/hnmYHcii_api7.ai.webp",width:1200,height:630,alt:"API7 技术博客"}]}}),(0,i.jsx)(c.Z,{content:o,title:e,published_at:l})]})}},67630:function(n,t,e){"use strict";e.d(t,{AM:function(){return h},J0:function(){return f},YU:function(){return l},gU:function(){return g},ky:function(){return m},x8:function(){return p}});var i=e(82729),r=e(186);function a(){let n=(0,i._)(["\n  max-width: 860px;\n  transition-property: background-image, border, border-radius, box-shadow;\n  transition-duration: .3s, 0.3s, 0.3s, 0.3s;\n  transition-timing-function: ease, ease, ease, ease;\n  transition-delay: 0s, 0s, 0s, 0s;\n  position: relative;\n  display: block;\n  margin: 0 auto;\n"]);return a=function(){return n},n}function s(){let n=(0,i._)(["\n  padding: 0 1rem;\n  margin: 45px 0 24px;\n  align-items: center;\n  :after {\n    content:'';\n    min-height:inherit;\n    font-size:0;\n  }\n\n  h1 {\n    text-align: left;\n    color: rgba(41, 41, 41, 1);\n    font-family: Segoe UI;\n    font-size: 48px;\n    font-weight: 600;\n    line-height: 60px;\n  }\n\n  @media (max-width: 560px) {\n    h1 {\n      font-size: 38px;\n      line-height: 1.4em;\n    }\n  }\n"]);return s=function(){return n},n}function o(){let n=(0,i._)(['\n  display: flex;\n  margin-top: 25px;\n\n  a {\n    box-shadow: none;\n    text-decoration: none;\n    color: var(--chakra-colors-blue-500);\n    font-weight: 300;\n\n    :hover {\n      text-decoration: underline;\n      color: var(--chakra-colors-blue-600);\n    }\n  }\n\n  img {\n    width: 58px;\n    height: 58px;\n    border-radius: 50%;\n  }\n\n  p {\n    min-width: 200px;\n    color: rgba(117, 117, 117, 1);\n    font-size: 14px;\n    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;\n    line-height: 1.5;\n    font-weight: 400;\n    padding: 0 3%;\n  }\n\n  .left {\n    width: 30%;\n    display: flex;\n\n    div {\n      align-self: flex-end;\n    }\n  }\n\n  .right {\n    width: 70%;\n    align-self: flex-end;\n\n    svg {\n      width: 29px;\n      height: 29px;\n    }\n    \n    ul {\n      float: right;\n      list-style-type: none;\n      display: flex;\n      font-size: 14px;\n      padding: 0 3%;\n\n      li {\n        padding-right: 6px;\n      }\n    }\n  }\n\n  @media (max-width: 1024px) {\n    span {\n      padding-top: 5%;\n    }\n  }\n\n  @media (max-width: 560px) {\n    h1 {\n      font-size: 38px;\n      line-height: 1.4em;\n    }\n\n    span {\n      font-size: 14px;\n      line-height: 1.4em;\n    }\n  }\n']);return o=function(){return n},n}function u(){let n=(0,i._)(["\n  max-width: 860px;\n  background-color: rgba(255,255,255,.9098039215686274);\n  transition-property: background-image, border, border-radius, box-shadow;\n  transition-duration: .3s, 0.3s, 0.3s, 0.3s;\n  transition-timing-function: ease, ease, ease;\n  transition-delay: 0s, 0s, 0s, 0s;\n  margin: 0 auto;\n  position: relative;\n  background-color: transparent;\n"]);return u=function(){return n},n}function c(){let n=(0,i._)(["\n  padding: 0 1rem 1rem;\n"]);return c=function(){return n},n}function d(){let n=(0,i._)(["\n  font-size: 16px;\n  font-family: revert;\n  font-weight: 400;\n  line-height: 1.618;\n  word-break: break-word;\n  color: #292929;\n  \n  p {\n    margin: 20px 0;\n  }\n\n  h2 {\n    font-size: 1.35rem;\n    font-weight: 500;\n    line-height: 30px;\n  }\n\n  h3, h4, h5 {\n    display: flex;\n    margin: 0 0 30px;\n    font-size: 1.15rem;\n    font-weight: 600;\n    line-height: 1.5;\n  }\n\n  ol, ul {\n    margin-top: 0;\n    margin-bottom: 30px;\n    display: block;\n    margin-block-start: 1em;\n    margin-block-end: 1em;\n    margin-inline-start: 0em;\n    margin-inline-end: 0em;\n    padding-inline-start: 25px;\n  }\n\n  a {\n    box-shadow: none;\n    text-decoration: none;\n    color: var(--chakra-colors-blue-500);\n\n    :hover {\n      text-decoration: underline;\n      color: var(--chakra-colors-blue-600);\n    }\n  }\n\n  table {\n    width: 100%;\n    display: table;\n    table-layout: fixed;\n    margin: 0;\n    font-size: 16px;\n    border-spacing: 0;\n    border-collapse: collapse;\n    border-color: grey;\n    background-color: transparent !important;\n    border-bottom: 1px solid #f3f4f5;\n    margin-block-start: 1em;\n    margin-block-end: 1em;\n\n    thead {\n      font-size: 19px;\n      font-weight: 600;\n    }\n\n    tbody {\n      box-sizing: border-box;\n      display: table-row-group;\n      vertical-align: middle;\n      border-color: inherit;\n      \n      tr {\n        border-bottom: 1px solid #eee;\n        :nth-child(odd) {\n          background-color: #f3f4f5;\n        }\n\n        td {\n          padding: 12px 8px;\n\n          a {\n            -webkit-box-shadow: none;\n            box-shadow: none;\n            text-decoration: none;\n            color: #FE0000;\n          }\n        }\n      }\n    }\n  }\n\n  .iframeBox {\n    width: 100%;\n    height: 600px;\n    padding-bottom: 2em;\n  }
1\n\n  @media (max-width: 1300px) {\n    .iframeBox {\n      height: 600px;\n    }\n  }\n\n  @media (max-width: 560px) {\n    h2 {\n      font-size: 26px;\n    }\n\n    table {\n      font-size: 14px;\n    }\n\n    .iframeBox {\n      padding-top: 30px;\n      height: 550px;\n    }\n  }\n\n  @media (max-width: 420px) {\n    ol {\n      padding-inline-start: 30px;\n    }\n\n    table tbody tr td {\n      padding: 6px 4px;\n    }\n\n    .iframeBox {\n      height: 400px;\n    }\n  }\n"]);return d=function(){return n},n}let l=r.ZP.div(a()),h=r.ZP.div(s()),f=r.ZP.div(o()),p=r.ZP.div(u()),g=r.ZP.div(c()),m=r.ZP.article(d())}},function(n){n.O(0,[5905,1008,2888,9774,179],function(){return n(n.s=41127)}),_N_E=n.O()}]);

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.