diff --git a/085cfcd9.667c1f13.js b/085cfcd9.667c1f13.js deleted file mode 100644 index c126c0c67..000000000 --- a/085cfcd9.667c1f13.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{148:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return r})),n.d(t,"metadata",(function(){return i})),n.d(t,"rightToc",(function(){return o})),n.d(t,"default",(function(){return p}));var a=n(1),c=n(9),b=(n(0),n(265)),r={last_modified_on:"2020-03-14",id:"announcing-gnet-v1-cn",title:"\u5b98\u5ba3 gnet v1.0.0",description:"\u6700\u5feb\u7684 Go \u7f51\u7edc\u6846\u67b6 gnet \u6765\u5566\uff01",author_github:"https://github.com/panjf2000",tags:["type: \u5b98\u5ba3","domain: \u5c55\u793a"]},i={permalink:"/blog/announcing-gnet-v1-cn",source:"@site/blog/2020-03-14-announcing-gnet-v1-cn.md",description:"\u6700\u5feb\u7684 Go \u7f51\u7edc\u6846\u67b6 gnet \u6765\u5566\uff01",date:"2020-03-14T00:00:00.000Z",tags:[{label:"type: \u5b98\u5ba3",permalink:"/blog/tags/type-\u5b98\u5ba3"},{label:"domain: \u5c55\u793a",permalink:"/blog/tags/domain-\u5c55\u793a"}],title:"\u5b98\u5ba3 gnet v1.0.0",readingTime:1.56,truncated:!1,prevItem:{title:"Announcing gnet v2.0.0",permalink:"/blog/announcing-gnet-v2"},nextItem:{title:"Announcing gnet v1.0.0",permalink:"/blog/announcing-gnet-v1"}},o=[{value:"\u4eca\u5929\uff0cgnet v1.0.0 \u6b63\u5f0f\u7248\u672c\u53d1\u5e03\uff0c\u4eab\u53d7\u8fd9\u4e2a\u9ad8\u6027\u80fd\u7684\u7f51\u7edc\u6846\u67b6\u5427\uff01",id:"\u4eca\u5929\uff0cgnet-v100-\u6b63\u5f0f\u7248\u672c\u53d1\u5e03\uff0c\u4eab\u53d7\u8fd9\u4e2a\u9ad8\u6027\u80fd\u7684\u7f51\u7edc\u6846\u67b6\u5427\uff01",children:[]},{value:"\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b",id:"\u591a\u7ebf\u7a0bgo\u7a0b\u7f51\u7edc\u6a21\u578b",children:[{value:"\u4e3b\u4ece\u591a Reactors",id:"\u4e3b\u4ece\u591a-reactors",children:[]},{value:"\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60",id:"\u4e3b\u4ece\u591a-reactors--\u7ebf\u7a0bgo\u7a0b\u6c60",children:[]}]},{value:"\u53ef\u91cd\u7528\u4e14\u81ea\u52a8\u6269\u5bb9\u7684 Ring-Buffer",id:"\u53ef\u91cd\u7528\u4e14\u81ea\u52a8\u6269\u5bb9\u7684-ring-buffer",children:[]}],l={rightToc:o};function p(e){var t=e.components,n=Object(c.a)(e,["components"]);return Object(b.b)("wrapper",Object(a.a)({},l,n,{components:t,mdxType:"MDXLayout"}),Object(b.b)("h2",{id:"\u4eca\u5929\uff0cgnet-v100-\u6b63\u5f0f\u7248\u672c\u53d1\u5e03\uff0c\u4eab\u53d7\u8fd9\u4e2a\u9ad8\u6027\u80fd\u7684\u7f51\u7edc\u6846\u67b6\u5427\uff01"},"\u4eca\u5929\uff0cgnet v1.0.0 \u6b63\u5f0f\u7248\u672c\u53d1\u5e03\uff0c\u4eab\u53d7\u8fd9\u4e2a\u9ad8\u6027\u80fd\u7684\u7f51\u7edc\u6846\u67b6\u5427\uff01"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/logos/master/gnet/logo.png",alt:"gnet"})),Object(b.b)("h1",{id:"-\u7b80\u4ecb"},"\ud83d\udcd6 \u7b80\u4ecb"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u662f\u4e00\u4e2a\u57fa\u4e8e\u4e8b\u4ef6\u9a71\u52a8\u7684\u9ad8\u6027\u80fd\u548c\u8f7b\u91cf\u7ea7\u7f51\u7edc\u6846\u67b6\u3002\u5b83\u76f4\u63a5\u4f7f\u7528 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Epoll"}),"epoll")," \u548c ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Kqueue"}),"kqueue")," \u7cfb\u7edf\u8c03\u7528\u800c\u975e\u6807\u51c6 Go \u7f51\u7edc\u5305\uff1a",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," \u6765\u6784\u5efa\u7f51\u7edc\u5e94\u7528\uff0c\u5b83\u7684\u5de5\u4f5c\u539f\u7406\u7c7b\u4f3c\u4e24\u4e2a\u5f00\u6e90\u7684\u7f51\u7edc\u5e93\uff1a",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/netty/netty"}),"netty")," \u548c ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/libuv/libuv"}),"libuv"),"\uff0c\u8fd9\u4e5f\u4f7f\u5f97 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8fbe\u5230\u4e86\u4e00\u4e2a\u8fdc\u8d85 Go ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," \u7684\u6027\u80fd\u8868\u73b0\u3002"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8bbe\u8ba1\u5f00\u53d1\u7684\u521d\u8877\u4e0d\u662f\u4e3a\u4e86\u53d6\u4ee3 Go \u7684\u6807\u51c6\u7f51\u7edc\u5e93\uff1a",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net"),"\uff0c\u800c\u662f\u4e3a\u4e86\u521b\u9020\u51fa\u4e00\u4e2a\u7c7b\u4f3c\u4e8e ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"http://redis.io"}),"Redis"),"\u3001",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"http://www.haproxy.org"}),"Haproxy")," \u80fd\u9ad8\u6548\u5904\u7406\u7f51\u7edc\u5305\u7684 Go \u8bed\u8a00\u7f51\u7edc\u670d\u52a1\u5668\u6846\u67b6\u3002"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u5356\u70b9\u5728\u4e8e\u5b83\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u3001\u8f7b\u91cf\u7ea7\u3001\u975e\u963b\u585e\u7684\u7eaf Go \u5b9e\u73b0\u7684\u4f20\u8f93\u5c42\uff08TCP/UDP/Unix Domain Socket\uff09\u7f51\u7edc\u6846\u67b6\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u6765\u5b9e\u73b0\u81ea\u5df1\u7684\u5e94\u7528\u5c42\u7f51\u7edc\u534f\u8bae(HTTP\u3001RPC\u3001Redis\u3001WebSocket \u7b49\u7b49)\uff0c\u4ece\u800c\u6784\u5efa\u51fa\u81ea\u5df1\u7684\u5e94\u7528\u5c42\u7f51\u7edc\u5e94\u7528\uff1a\u6bd4\u5982\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4e0a\u5b9e\u73b0 HTTP \u534f\u8bae\u5c31\u53ef\u4ee5\u521b\u5efa\u51fa\u4e00\u4e2a HTTP \u670d\u52a1\u5668 \u6216\u8005 Web \u5f00\u53d1\u6846\u67b6\uff0c\u5b9e\u73b0 Redis \u534f\u8bae\u5c31\u53ef\u4ee5\u521b\u5efa\u51fa\u81ea\u5df1\u7684 Redis \u670d\u52a1\u5668\u7b49\u7b49\u3002"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},Object(b.b)("inlineCode",{parentName:"strong"},"gnet")," \u884d\u751f\u81ea\u53e6\u4e00\u4e2a\u9879\u76ee\uff1a",Object(b.b)("inlineCode",{parentName:"strong"},"evio"),"\uff0c\u4f46\u62e5\u6709\u66f4\u4e30\u5bcc\u7684\u529f\u80fd\u7279\u6027\uff0c\u4e14\u6027\u80fd\u8fdc\u80dc\u4e4b\u3002")),Object(b.b)("h1",{id:"-\u529f\u80fd"},"\ud83d\ude80 \u529f\u80fd"),Object(b.b)("ul",{className:"contains-task-list"},Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ",Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/blob/v1.0.0/README_ZH.md#-%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95"}),"\u9ad8\u6027\u80fd")," \u7684\u57fa\u4e8e\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b\u7684 event-loop \u4e8b\u4ef6\u9a71\u52a8"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5185\u7f6e Round-Robin \u8f6e\u8be2\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5185\u7f6e goroutine \u6c60\uff0c\u7531\u5f00\u6e90\u5e93 ",Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/ants"}),"ants")," \u63d0\u4f9b\u652f\u6301"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5185\u7f6e bytes \u5185\u5b58\u6c60\uff0c\u7531\u5f00\u6e90\u5e93 ",Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/valyala/bytebufferpool"}),"bytebufferpool")," \u63d0\u4f9b\u652f\u6301"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u7b80\u6d01\u7684 APIs"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u57fa\u4e8e Ring-Buffer \u7684\u9ad8\u6548\u5185\u5b58\u5229\u7528"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u652f\u6301\u591a\u79cd\u7f51\u7edc\u534f\u8bae/IPC \u673a\u5236\uff1aTCP\u3001UDP \u548c Unix Domain Socket"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u652f\u6301\u4e24\u79cd\u4e8b\u4ef6\u9a71\u52a8\u673a\u5236\uff1aLinux \u91cc\u7684 epoll \u4ee5\u53ca FreeBSD \u91cc\u7684 kqueue"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u652f\u6301\u5f02\u6b65\u5199\u64cd\u4f5c"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u7075\u6d3b\u7684\u4e8b\u4ef6\u5b9a\u65f6\u5668"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","SO_REUSEPORT \u7aef\u53e3\u91cd\u7528"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5185\u7f6e\u591a\u79cd\u7f16\u89e3\u7801\u5668\uff0c\u652f\u6301\u5bf9 TCP \u6570\u636e\u6d41\u5206\u5305\uff1aLineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec \u548c LengthFieldBasedFrameCodec\uff0c\u53c2\u8003\u81ea ",Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://netty.io/4.1/api/io/netty/handler/codec/package-summary.html"}),"netty codec"),"\uff0c\u800c\u4e14\u652f\u6301\u81ea\u5b9a\u5236\u7f16\u89e3\u7801\u5668"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u652f\u6301 Windows \u5e73\u53f0\uff0c\u57fa\u4e8e ",Object(b.b)("del",{parentName:"li"},"IOCP \u4e8b\u4ef6\u9a71\u52a8\u673a\u5236")," Go \u6807\u51c6\u7f51\u7edc\u5e93"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","\u52a0\u5165\u66f4\u591a\u7684\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\uff1a\u968f\u673a\u3001\u6700\u5c11\u8fde\u63a5\u3001\u4e00\u81f4\u6027\u54c8\u5e0c\u7b49\u7b49"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","\u652f\u6301 TLS"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","\u5b9e\u73b0 ",Object(b.b)("inlineCode",{parentName:"li"},"gnet")," \u5ba2\u6237\u7aef")),Object(b.b)("h1",{id:"-\u6838\u5fc3\u8bbe\u8ba1"},"\ud83d\udca1 \u6838\u5fc3\u8bbe\u8ba1"),Object(b.b)("h2",{id:"\u591a\u7ebf\u7a0bgo\u7a0b\u7f51\u7edc\u6a21\u578b"},"\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b"),Object(b.b)("h3",{id:"\u4e3b\u4ece\u591a-reactors"},"\u4e3b\u4ece\u591a Reactors"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u91cd\u65b0\u8bbe\u8ba1\u5f00\u53d1\u4e86\u4e00\u4e2a\u65b0\u5185\u7f6e\u7684\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b\uff1a\u300e\u4e3b\u4ece\u591a Reactors\u300f\uff0c\u8fd9\u4e5f\u662f ",Object(b.b)("inlineCode",{parentName:"p"},"netty")," \u9ed8\u8ba4\u7684\u591a\u7ebf\u7a0b\u7f51\u7edc\u6a21\u578b\uff0c\u4e0b\u9762\u662f\u8fd9\u4e2a\u6a21\u578b\u7684\u539f\u7406\u56fe\uff1a"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{alt:"multi_reactor",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors.png"})),Object(b.b)("p",null,"\u5b83\u7684\u8fd0\u884c\u6d41\u7a0b\u5982\u4e0b\u9762\u7684\u65f6\u5e8f\u56fe\uff1a"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{alt:"reactor",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors-sequence-diagram.png"})),Object(b.b)("h3",{id:"\u4e3b\u4ece\u591a-reactors--\u7ebf\u7a0bgo\u7a0b\u6c60"},"\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60"),Object(b.b)("p",null,"\u4f60\u53ef\u80fd\u4f1a\u95ee\u4e00\u4e2a\u95ee\u9898\uff1a\u5982\u679c\u6211\u7684\u4e1a\u52a1\u903b\u8f91\u662f\u963b\u585e\u7684\uff0c\u90a3\u4e48\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u6ce8\u518c\u65b9\u6cd5\u91cc\u7684\u903b\u8f91\u4e5f\u4f1a\u963b\u585e\uff0c\u4ece\u800c\u5bfc\u81f4\u963b\u585e event-loop \u7ebf\u7a0b\uff0c\u8fd9\u65f6\u5019\u600e\u4e48\u529e\uff1f"),Object(b.b)("p",null,"\u6b63\u5982\u4f60\u6240\u77e5\uff0c\u57fa\u4e8e ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7f16\u5199\u4f60\u7684\u7f51\u7edc\u670d\u52a1\u5668\u6709\u4e00\u6761\u6700\u91cd\u8981\u7684\u539f\u5219\uff1a\u6c38\u8fdc\u4e0d\u80fd\u8ba9\u4f60\u4e1a\u52a1\u903b\u8f91\uff08\u4e00\u822c\u5199\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u91cc\uff09\u963b\u585e event-loop \u7ebf\u7a0b\uff0c\u8fd9\u4e5f\u662f ",Object(b.b)("inlineCode",{parentName:"p"},"netty")," \u7684\u4e00\u6761\u6700\u91cd\u8981\u7684\u539f\u5219\uff0c\u5426\u5219\u7684\u8bdd\u5c06\u4f1a\u6781\u5927\u5730\u964d\u4f4e\u670d\u52a1\u5668\u7684\u541e\u5410\u91cf\u3002"),Object(b.b)("p",null,"\u6211\u7684\u56de\u7b54\u662f\uff0c\u57fa\u4e8e",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u53e6\u4e00\u79cd\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b\uff1a\u300e\u5e26\u7ebf\u7a0b/Go\u7a0b\u6c60\u7684\u4e3b\u4ece\u591a Reactors\u300f\u53ef\u4ee5\u89e3\u51b3\u963b\u585e\u95ee\u9898\uff0c\u8fd9\u4e2a\u65b0\u7f51\u7edc\u6a21\u578b\u901a\u8fc7\u5f15\u5165\u4e00\u4e2a worker pool \u6765\u89e3\u51b3\u4e1a\u52a1\u903b\u8f91\u963b\u585e\u7684\u95ee\u9898\uff1a\u5b83\u4f1a\u5728\u542f\u52a8\u7684\u65f6\u5019\u521d\u59cb\u5316\u4e00\u4e2a worker pool\uff0c\u7136\u540e\u5728\u628a ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React"),"\u91cc\u9762\u7684\u963b\u585e\u4ee3\u7801\u653e\u5230 worker pool \u91cc\u6267\u884c\uff0c\u4ece\u800c\u907f\u514d\u963b\u585e event-loop \u7ebf\u7a0b\u3002"),Object(b.b)("p",null,"\u6a21\u578b\u7684\u67b6\u6784\u56fe\u5982\u4e0b\u6240\u793a\uff1a"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{alt:"multi_reactor_thread_pool",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors%2Bthread-pool.png"})),Object(b.b)("p",null,"\u5b83\u7684\u8fd0\u884c\u6d41\u7a0b\u5982\u4e0b\u9762\u7684\u65f6\u5e8f\u56fe\uff1a"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{alt:"multi-reactors",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors%2Bthread-pool-sequence-diagram.png"})),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u901a\u8fc7\u5229\u7528 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/ants"}),"ants")," goroutine \u6c60\uff08\u4e00\u4e2a\u57fa\u4e8e Go \u5f00\u53d1\u7684\u9ad8\u6027\u80fd\u7684 goroutine \u6c60 \uff0c\u5b9e\u73b0\u4e86\u5bf9\u5927\u89c4\u6a21 goroutines \u7684\u8c03\u5ea6\u7ba1\u7406\u3001goroutines \u590d\u7528\uff09\u6765\u5b9e\u73b0\u300e\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60\u300f\u7f51\u7edc\u6a21\u578b\u3002\u5173\u4e8e ",Object(b.b)("inlineCode",{parentName:"p"},"ants")," \u7684\u5168\u90e8\u529f\u80fd\u548c\u4f7f\u7528\uff0c\u53ef\u4ee5\u5728 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/ants/v2?tab=doc"}),"ants \u6587\u6863")," \u91cc\u627e\u5230\u3002"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5185\u90e8\u96c6\u6210\u4e86 ",Object(b.b)("inlineCode",{parentName:"p"},"ants")," \u4ee5\u53ca\u63d0\u4f9b\u4e86 ",Object(b.b)("inlineCode",{parentName:"p"},"pool.goroutine.Default()")," \u65b9\u6cd5\u6765\u521d\u59cb\u5316\u4e00\u4e2a ",Object(b.b)("inlineCode",{parentName:"p"},"ants")," goroutine \u6c60\uff0c\u7136\u540e\u4f60\u53ef\u4ee5\u628a ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u4e2d\u963b\u585e\u7684\u4e1a\u52a1\u903b\u8f91\u63d0\u4ea4\u5230 goroutine \u6c60\u91cc\u6267\u884c\uff0c\u6700\u540e\u5728 goroutine \u6c60\u91cc\u7684\u4ee3\u7801\u8c03\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Conn.AsyncWrite([]byte)")," \u65b9\u6cd5\u628a\u5904\u7406\u5b8c\u963b\u585e\u903b\u8f91\u4e4b\u540e\u5f97\u5230\u7684\u8f93\u51fa\u6570\u636e\u5f02\u6b65\u5199\u56de\u5ba2\u6237\u7aef\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u907f\u514d\u963b\u585e event-loop \u7ebf\u7a0b\u3002"),Object(b.b)("p",null,"\u6709\u5173\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u91cc\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"ants")," goroutine \u6c60\u7684\u7ec6\u8282\u53ef\u4ee5\u5230",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"#%E5%B8%A6%E9%98%BB%E5%A1%9E%E9%80%BB%E8%BE%91%E7%9A%84-echo-%E6%9C%8D%E5%8A%A1%E5%99%A8"}),"\u8fd9\u91cc"),"\u8fdb\u4e00\u6b65\u4e86\u89e3\u3002"),Object(b.b)("h2",{id:"\u53ef\u91cd\u7528\u4e14\u81ea\u52a8\u6269\u5bb9\u7684-ring-buffer"},"\u53ef\u91cd\u7528\u4e14\u81ea\u52a8\u6269\u5bb9\u7684 Ring-Buffer"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5185\u7f6e\u4e86inbound \u548c outbound \u4e24\u4e2a buffers\uff0c\u57fa\u4e8e Ring-Buffer \u539f\u7406\u5b9e\u73b0\uff0c\u5206\u522b\u7528\u6765\u7f13\u51b2\u8f93\u5165\u8f93\u51fa\u7684\u7f51\u7edc\u6570\u636e\u4ee5\u53ca\u7ba1\u7406\u5185\u5b58\uff0cgnet \u91cc\u9762\u7684 ring buffer \u80fd\u591f\u91cd\u7528\u5185\u5b58\u4ee5\u53ca\u6309\u9700\u6269\u5bb9\u3002"),Object(b.b)("p",null,"\u5bf9\u4e8e TCP \u534f\u8bae\u7684\u6d41\u6570\u636e\uff0c\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4e0d\u9700\u8981\u4e1a\u52a1\u65b9\u4e3a\u4e86\u89e3\u6790\u5e94\u7528\u5c42\u534f\u8bae\u800c\u81ea\u5df1\u7ef4\u62a4\u548c\u7ba1\u7406 buffers\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4f1a\u66ff\u4e1a\u52a1\u65b9\u5b8c\u6210\u7f13\u51b2\u548c\u7ba1\u7406\u7f51\u7edc\u6570\u636e\u7684\u4efb\u52a1\uff0c\u964d\u4f4e\u4e1a\u52a1\u4ee3\u7801\u7684\u590d\u6742\u6027\u4ee5\u53ca\u964d\u4f4e\u5f00\u53d1\u8005\u7684\u5fc3\u667a\u8d1f\u62c5\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u80fd\u591f\u4e13\u6ce8\u4e8e\u4e1a\u52a1\u903b\u8f91\u800c\u975e\u4e00\u4e9b\u5e95\u5c42\u5b9e\u73b0\u3002"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/ring-buffer.gif"})))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return O}));var a=n(0),c=n.n(a);function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var l=c.a.createContext({}),p=function(e){var t=c.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},s=function(e){var t=p(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,b=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),s=p(n),u=a,O=s["".concat(r,".").concat(u)]||s[u]||m[u]||b;return n?c.a.createElement(O,i({ref:t},l,{components:n})):c.a.createElement(O,i({ref:t},l))}));function O(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var b=n.length,r=new Array(b);r[0]=u;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:a,r[1]=i;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),b=r,g=u["".concat(i,".").concat(b)]||u[b]||f[b]||o;return n?a.a.createElement(g,c({ref:t},p,{components:n})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),b=r,g=u["".concat(i,".").concat(b)]||u[b]||f[b]||o;return n?a.a.createElement(g,c({ref:t},p,{components:n})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p0 to compute geomean\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(o.b)("p",null,"While we have performed sufficient testing on ",Object(o.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(o.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(o.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(o.b)("p",null,"Another significant leap is ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(o.b)("p",null,"Visit the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0"}),"release notes")," for more details."))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),s=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return n?r.a.createElement(f,c({ref:t},p,{components:n})):r.a.createElement(f,c({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var p=2;p0 to compute geomean\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(o.b)("p",null,"While we have performed sufficient testing on ",Object(o.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(o.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(o.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(o.b)("p",null,"Another significant leap is ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(o.b)("p",null,"Visit the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0"}),"release notes")," for more details."))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),s=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return n?r.a.createElement(f,c({ref:t},p,{components:n})):r.a.createElement(f,c({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var p=2;p8 procs, for 15s: tcp://127.0.0.1:7002\nAggregated Function Time : count 5795008 avg 0.0025874045 +/- 0.003243 min 1.1692e-05 max 0.093107062 sum 14994.0299\n# target 50% 0.00169983\n# target 75% 0.00399017\n# target 90% 0.00655109\n# target 99% 0.0141534\n# target 99.9% 0.0266069\nSockets used: 1000 (for perfect no error run, would be 1000)\nTotal Bytes sent: 5935112192, received: 5935112192\ntcp OK : 5795008 (100.0 %)\nAll done 5795008 calls (plus 1000 warmup) 2.587 ms avg, 386287.8 qps\n")),Object(o.b)("h4",{id:"v200"},"v2.0.0"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),"--- GNET ---\n\nWarming up for 1 seconds...\n2022/02/27 17:17:32 echo server with multi-core=true is listening on tcp://:7002\n\n--- BENCHMARK START ---\n*** 1000 connections, 15 seconds, packet size: 1024 bytes\n\nFortio dev running at 0 queries per second, 8->8 procs, for 15s: tcp://127.0.0.1:7002\nAggregated Function Time : count 6729707 avg 0.0022276692 +/- 0.00317 min 1.1902e-05 max 0.07715059 sum 14991.5608\n# target 50% 0.00132464\n# target 75% 0.00241054\n# target 90% 0.00502497\n# target 99% 0.016105\n# target 99.9% 0.0291019\nSockets used: 1000 (for perfect no error run, would be 1000)\nTotal Bytes sent: 6892243968, received: 6892243968\ntcp OK : 6729707 (100.0 %)\nAll done 6729707 calls (plus 1000 warmup) 2.228 ms avg, 448593.2 qps\n")),Object(o.b)("p",null,"The result shows that the performance of v2 is improved by about 16% compared to v1.x."),Object(o.b)("p",null,"Note that this is only a rough benchmark test result and it is done with the simple protocol -- echo, besides, with the benefits from vectored I/O, the performance ought to achieve even higher when it comes to some more complex scenarios, later we will do a more comprehensive benchmark test to get some more accurate results."))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},s=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,l=b(e,["components","mdxType","originalType","parentName"]),s=p(n),d=r,u=s["".concat(c,".").concat(d)]||s[d]||m[d]||o;return n?a.a.createElement(u,i({ref:t},l,{components:n})):a.a.createElement(u,i({ref:t},l))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,c=new Array(o);c[0]=d;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var l=2;l8 procs, for 15s: tcp://127.0.0.1:7002\nAggregated Function Time : count 5795008 avg 0.0025874045 +/- 0.003243 min 1.1692e-05 max 0.093107062 sum 14994.0299\n# target 50% 0.00169983\n# target 75% 0.00399017\n# target 90% 0.00655109\n# target 99% 0.0141534\n# target 99.9% 0.0266069\nSockets used: 1000 (for perfect no error run, would be 1000)\nTotal Bytes sent: 5935112192, received: 5935112192\ntcp OK : 5795008 (100.0 %)\nAll done 5795008 calls (plus 1000 warmup) 2.587 ms avg, 386287.8 qps\n")),Object(o.b)("h4",{id:"v200"},"v2.0.0"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),"--- GNET ---\n\nWarming up for 1 seconds...\n2022/02/27 17:17:32 echo server with multi-core=true is listening on tcp://:7002\n\n--- BENCHMARK START ---\n*** 1000 connections, 15 seconds, packet size: 1024 bytes\n\nFortio dev running at 0 queries per second, 8->8 procs, for 15s: tcp://127.0.0.1:7002\nAggregated Function Time : count 6729707 avg 0.0022276692 +/- 0.00317 min 1.1902e-05 max 0.07715059 sum 14991.5608\n# target 50% 0.00132464\n# target 75% 0.00241054\n# target 90% 0.00502497\n# target 99% 0.016105\n# target 99.9% 0.0291019\nSockets used: 1000 (for perfect no error run, would be 1000)\nTotal Bytes sent: 6892243968, received: 6892243968\ntcp OK : 6729707 (100.0 %)\nAll done 6729707 calls (plus 1000 warmup) 2.228 ms avg, 448593.2 qps\n")),Object(o.b)("p",null,"The result shows that the performance of v2 is improved by about 16% compared to v1.x."),Object(o.b)("p",null,"Note that this is only a rough benchmark test result and it is done with the simple protocol -- echo, besides, with the benefits from vectored I/O, the performance ought to achieve even higher when it comes to some more complex scenarios, later we will do a more comprehensive benchmark test to get some more accurate results."))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},s=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,l=b(e,["components","mdxType","originalType","parentName"]),s=p(n),d=r,u=s["".concat(c,".").concat(d)]||s[d]||m[d]||o;return n?a.a.createElement(u,i({ref:t},l,{components:n})):a.a.createElement(u,i({ref:t},l))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,c=new Array(o);c[0]=d;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),f=r,m=u["".concat(i,".").concat(f)]||u[f]||b[f]||o;return n?a.a.createElement(m,c({ref:t},p,{components:n})):a.a.createElement(m,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),f=r,m=u["".concat(i,".").concat(f)]||u[f]||b[f]||o;return n?a.a.createElement(m,c({ref:t},p,{components:n})):a.a.createElement(m,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p0 to compute geomean\n")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(r.b)("p",null,"While we have performed sufficient testing on ",Object(r.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(r.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(r.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(r.b)("p",null,"Another significant leap is ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(r.b)("p",null,"Visit the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0"}),"release notes")," for more details."))}u.isMDXComponent=!0},265:function(e,n,t){"use strict";t.d(n,"a",(function(){return s})),t.d(n,"b",(function(){return g}));var a=t(0),o=t.n(a);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function c(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=o.a.createContext({}),u=function(e){var n=o.a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):c({},n,{},e)),t},s=function(e){var n=u(e.components);return o.a.createElement(l.Provider,{value:n},e.children)},b={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},m=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(t),m=a,g=s["".concat(i,".").concat(m)]||s[m]||b[m]||r;return t?o.a.createElement(g,c({ref:n},l,{components:t})):o.a.createElement(g,c({ref:n},l))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,i=new Array(r);i[0]=m;var c={};for(var p in n)hasOwnProperty.call(n,p)&&(c[p]=n[p]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var l=2;l0 to compute geomean\n")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(r.b)("p",null,"While we have performed sufficient testing on ",Object(r.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(r.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(r.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(r.b)("p",null,"Another significant leap is ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(r.b)("p",null,"Visit the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0"}),"release notes")," for more details."))}u.isMDXComponent=!0},265:function(e,n,t){"use strict";t.d(n,"a",(function(){return s})),t.d(n,"b",(function(){return g}));var a=t(0),o=t.n(a);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function c(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=o.a.createContext({}),u=function(e){var n=o.a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):c({},n,{},e)),t},s=function(e){var n=u(e.components);return o.a.createElement(l.Provider,{value:n},e.children)},b={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},m=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(t),m=a,g=s["".concat(i,".").concat(m)]||s[m]||b[m]||r;return t?o.a.createElement(g,c({ref:n},l,{components:t})):o.a.createElement(g,c({ref:n},l))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,i=new Array(r);i[0]=m;var c={};for(var p in n)hasOwnProperty.call(n,p)&&(c[p]=n[p]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var l=2;l=0&&s<=a&&(t=l),e+=1}return t}();if(c){var i=0,o=!1;for(l=document.getElementsByClassName(e);i<","<").replace(">",">");return l.a.createElement("li",{key:e.id},l.a.createElement("a",{href:"#"+e.id,className:"contents__link",dangerouslySetInnerHTML:{__html:t}}),l.a.createElement(f,{isChild:!0,headings:e.children}))})))}function h(e){var t=e.values,a=Object(v.a)().siteConfig,n=(void 0===a?{}:a).customFields.metadata.event_types,s=[];return n.forEach((function(e){t.includes(e)?s.push(l.a.createElement("span",{key:e,className:"text--primary"},o.a.capitalize(e))):s.push(l.a.createElement("del",{key:e,className:"text--warning"},o.a.capitalize(e))),s.push(l.a.createElement("span",{key:e+"-comma"},", "))})),s.pop(),s}function _(e){var t=e.operatingSystems,a=e.unsupportedOperatingSystems,n=[];return(t||[]).forEach((function(e){n.push(l.a.createElement("span",{key:e,className:"text--primary"},e)),n.push(l.a.createElement("span",{key:e+"-comma"},", "))})),(a||[]).forEach((function(e){n.push(l.a.createElement("del",{key:e,className:"text--warning"},e)),n.push(l.a.createElement("span",{key:e+"-comma"},", "))})),n.pop(),n}function y(e){var t=e.deliveryGuarantee,a=e.eventTypes,n=e.operatingSystems,s=e.status,c=e.unsupportedOperatingSystems;return s||t||n||c?l.a.createElement("div",{className:"section"},l.a.createElement("div",{className:"title"},"Support"),"beta"==s&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/guarantees/#beta",className:"text--warning",title:"This component is in beta and is not recommended for production environments. Click to learn more."},l.a.createElement("i",{className:"feather icon-alert-triangle"})," Beta Status")),"prod-ready"==s&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/guarantees/#prod-ready",className:"text--primary",title:"This component has passed reliability standards that make it production ready. Click to learn more."},l.a.createElement("i",{className:"feather icon-award"})," Prod-Ready Status")),"best_effort"==t&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/guarantees/#best-effort",className:"text--warning",title:"This component makes a best-effort delivery guarantee, and in rare cases can lose data. Click to learn more."},l.a.createElement("i",{className:"feather icon-shield-off"})," Best-Effort Delivery")),"at_least_once"==t&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/guarantees/#at-least-once",className:"text--primary",title:"This component offers an at-least-once delivery guarantee. Click to learn more."},l.a.createElement("i",{className:"feather icon-shield"})," At-Least-Once")),a&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/data-model/",title:"This component works on the these event types."},l.a.createElement("i",{className:"feather icon-database"})," ",l.a.createElement(h,{values:a}))),n&&c&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/setup/installation/operating-systems/",title:"This component works on the "+n.join(", ")+" operating systems."},l.a.createElement("i",{className:"feather icon-cpu"})," ",l.a.createElement(_,{operatingSystems:n,unsupportedOperatingSystems:c})))):null}t.default=function(e){var t=Object(v.a)().siteConfig,a=void 0===t?{}:t,n=a.title,i=a.url,o=e.content,m=o.metadata,d=m.description,g=m.editUrl,h=m.image,_=m.keywords,N=m.lastUpdatedAt,b=m.lastUpdatedBy,k=m.permalink,w=m.title,C=m.version,x=o.frontMatter,S=(x.component_title,x.delivery_guarantee),O=x.event_types,T=x.function_category,L=(x.hide_title,x.hide_table_of_contents,x.issues_url),B=x.operating_systems,j=x.posts_path,I=x.source_url,P=x.status,z=x.unsupported_operating_systems,A=i+Object(E.a)(h);return l.a.createElement("div",null,l.a.createElement(s.a,null,w&&l.a.createElement("title",null,w," | Docs | ",n),d&&l.a.createElement("meta",{name:"description",content:d}),d&&l.a.createElement("meta",{property:"og:description",content:d}),_&&_.length&&l.a.createElement("meta",{name:"keywords",content:_.join(",")}),h&&l.a.createElement("meta",{property:"og:image",content:A}),h&&l.a.createElement("meta",{property:"twitter:image",content:A}),h&&l.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+w}),k&&l.a.createElement("meta",{property:"og:url",content:i+k})),l.a.createElement("div",{className:p.a.container},l.a.createElement("div",{className:p.a.leftCol},l.a.createElement("div",{className:"docItemContainer_"},l.a.createElement("article",null,C&&l.a.createElement("span",{style:{verticalAlign:"top"},className:"badge badge--info"},"Version: ",C),!m.hide_title&&l.a.createElement("header",null,l.a.createElement("div",{className:"badges"},T&&l.a.createElement(r.a,{to:"/components?functions[]="+T,className:"badge badge--primary"},T)),l.a.createElement("h1",{className:p.a.docTitle},m.title)),l.a.createElement("div",{className:"markdown"},l.a.createElement(o,null)))),!m.hide_pagination&&(m.next||m.previous)&&l.a.createElement("div",{className:p.a.paginator},l.a.createElement(c.a,{next:m.next,previous:m.previous}))),o.rightToc&&l.a.createElement("div",{className:p.a.rightCol},l.a.createElement("div",{className:u()("table-of-contents",p.a.tableOfContents)},l.a.createElement(y,{deliveryGuarantee:S,eventTypes:O,operatingSystems:B,status:P,unsupportedOperatingSystems:z}),o.rightToc.length>0&&l.a.createElement("div",{className:"section"},l.a.createElement("div",{className:"title"},"Contents"),l.a.createElement(f,{headings:o.rightToc})),l.a.createElement("div",{className:"section"},l.a.createElement("div",{className:"title"},"Resources"),l.a.createElement("ul",{className:"contents"},g&&l.a.createElement("li",null,l.a.createElement("a",{href:g,className:"contents__link",target:"_blank"},l.a.createElement("i",{className:"feather icon-edit-1"})," Edit this page")),j&&l.a.createElement("li",null,l.a.createElement(r.a,{to:j,className:"contents__link"},l.a.createElement("i",{className:"feather icon-book-open"})," View Blog Posts")),L&&l.a.createElement("li",null,l.a.createElement("a",{href:L,className:"contents__link",target:"_blank"},l.a.createElement("i",{className:"feather icon-message-circle"})," View Issues")),I&&l.a.createElement("li",null,l.a.createElement("a",{href:I,className:"contents__link",target:"_blank"},l.a.createElement("i",{className:"feather icon-github"})," View Source")))),(N||b)&&l.a.createElement("div",{className:"section"},"Last updated"," ",N&&l.a.createElement(l.a.Fragment,null,"on"," ",l.a.createElement("strong",null,new Date(1e3*N).toLocaleDateString()),b&&" "),b&&l.a.createElement(l.a.Fragment,null,"by ",l.a.createElement("strong",null,b)))))))}},295:function(e,t,a){"use strict";var n=a(12),l=a(82)(!0);n(n.P,"Array",{includes:function(e){return l(this,e,arguments.length>1?arguments[1]:void 0)}}),a(80)("includes")},296:function(e,t,a){"use strict";var n=a(12),l=a(321);n(n.P+n.F*a(322)("includes"),"String",{includes:function(e){return!!~l(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},339:function(e,t,a){"use strict";var n=a(0),l=a.n(n),s=a(268),r=a(266),c=a.n(r);a(142);t.a=function(e){var t=e.className,a=e.previous,n=e.next;return l.a.createElement("nav",{className:c()("pagination-nav",t)},a&&l.a.createElement("div",{className:"pagination-nav__item"},l.a.createElement(s.a,{className:"pagination-nav__link",to:a.permalink},l.a.createElement("h5",{className:"pagination-nav__link--sublabel"},"Previous"),l.a.createElement("h4",{className:"pagination-nav__link--label"},"\xab ",a.title))),n&&l.a.createElement("div",{className:"pagination-nav__item pagination-nav__item--next"},l.a.createElement(s.a,{className:"pagination-nav__link",to:n.permalink},l.a.createElement("h5",{className:"pagination-nav__link--sublabel"},"Next"),l.a.createElement("h4",{className:"pagination-nav__link--label"},n.title," \xbb"))))}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{262:function(e,t,a){"use strict";a.r(t);a(295),a(296),a(26),a(20),a(19),a(79);var n=a(0),l=a.n(n),s=a(271),r=a(268),c=a(339),i=a(305),o=a.n(i),m=a(266),u=a.n(m),d=a(154),p=a.n(d),E=a(269),v=a(267);var g=function(e,t,a){var l=Object(n.useState)(void 0),s=l[0],r=l[1];Object(n.useEffect)((function(){var n=[],l=[];function c(){var c=function(){var e=0,t=null;for(n=document.getElementsByClassName("anchor");e=0&&s<=a&&(t=l),e+=1}return t}();if(c){var i=0,o=!1;for(l=document.getElementsByClassName(e);i<","<").replace(">",">");return l.a.createElement("li",{key:e.id},l.a.createElement("a",{href:"#"+e.id,className:"contents__link",dangerouslySetInnerHTML:{__html:t}}),l.a.createElement(f,{isChild:!0,headings:e.children}))})))}function h(e){var t=e.values,a=Object(v.a)().siteConfig,n=(void 0===a?{}:a).customFields.metadata.event_types,s=[];return n.forEach((function(e){t.includes(e)?s.push(l.a.createElement("span",{key:e,className:"text--primary"},o.a.capitalize(e))):s.push(l.a.createElement("del",{key:e,className:"text--warning"},o.a.capitalize(e))),s.push(l.a.createElement("span",{key:e+"-comma"},", "))})),s.pop(),s}function _(e){var t=e.operatingSystems,a=e.unsupportedOperatingSystems,n=[];return(t||[]).forEach((function(e){n.push(l.a.createElement("span",{key:e,className:"text--primary"},e)),n.push(l.a.createElement("span",{key:e+"-comma"},", "))})),(a||[]).forEach((function(e){n.push(l.a.createElement("del",{key:e,className:"text--warning"},e)),n.push(l.a.createElement("span",{key:e+"-comma"},", "))})),n.pop(),n}function y(e){var t=e.deliveryGuarantee,a=e.eventTypes,n=e.operatingSystems,s=e.status,c=e.unsupportedOperatingSystems;return s||t||n||c?l.a.createElement("div",{className:"section"},l.a.createElement("div",{className:"title"},"Support"),"beta"==s&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/guarantees/#beta",className:"text--warning",title:"This component is in beta and is not recommended for production environments. Click to learn more."},l.a.createElement("i",{className:"feather icon-alert-triangle"})," Beta Status")),"prod-ready"==s&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/guarantees/#prod-ready",className:"text--primary",title:"This component has passed reliability standards that make it production ready. Click to learn more."},l.a.createElement("i",{className:"feather icon-award"})," Prod-Ready Status")),"best_effort"==t&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/guarantees/#best-effort",className:"text--warning",title:"This component makes a best-effort delivery guarantee, and in rare cases can lose data. Click to learn more."},l.a.createElement("i",{className:"feather icon-shield-off"})," Best-Effort Delivery")),"at_least_once"==t&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/guarantees/#at-least-once",className:"text--primary",title:"This component offers an at-least-once delivery guarantee. Click to learn more."},l.a.createElement("i",{className:"feather icon-shield"})," At-Least-Once")),a&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/about/data-model/",title:"This component works on the these event types."},l.a.createElement("i",{className:"feather icon-database"})," ",l.a.createElement(h,{values:a}))),n&&c&&l.a.createElement("div",null,l.a.createElement(r.a,{to:"/docs/setup/installation/operating-systems/",title:"This component works on the "+n.join(", ")+" operating systems."},l.a.createElement("i",{className:"feather icon-cpu"})," ",l.a.createElement(_,{operatingSystems:n,unsupportedOperatingSystems:c})))):null}t.default=function(e){var t=Object(v.a)().siteConfig,a=void 0===t?{}:t,n=a.title,i=a.url,o=e.content,m=o.metadata,d=m.description,g=m.editUrl,h=m.image,_=m.keywords,N=m.lastUpdatedAt,b=m.lastUpdatedBy,k=m.permalink,w=m.title,C=m.version,x=o.frontMatter,S=(x.component_title,x.delivery_guarantee),O=x.event_types,T=x.function_category,L=(x.hide_title,x.hide_table_of_contents,x.issues_url),B=x.operating_systems,j=x.posts_path,I=x.source_url,P=x.status,z=x.unsupported_operating_systems,A=i+Object(E.a)(h);return l.a.createElement("div",null,l.a.createElement(s.a,null,w&&l.a.createElement("title",null,w," | Docs | ",n),d&&l.a.createElement("meta",{name:"description",content:d}),d&&l.a.createElement("meta",{property:"og:description",content:d}),_&&_.length&&l.a.createElement("meta",{name:"keywords",content:_.join(",")}),h&&l.a.createElement("meta",{property:"og:image",content:A}),h&&l.a.createElement("meta",{property:"twitter:image",content:A}),h&&l.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+w}),k&&l.a.createElement("meta",{property:"og:url",content:i+k})),l.a.createElement("div",{className:p.a.container},l.a.createElement("div",{className:p.a.leftCol},l.a.createElement("div",{className:"docItemContainer_"},l.a.createElement("article",null,C&&l.a.createElement("span",{style:{verticalAlign:"top"},className:"badge badge--info"},"Version: ",C),!m.hide_title&&l.a.createElement("header",null,l.a.createElement("div",{className:"badges"},T&&l.a.createElement(r.a,{to:"/components?functions[]="+T,className:"badge badge--primary"},T)),l.a.createElement("h1",{className:p.a.docTitle},m.title)),l.a.createElement("div",{className:"markdown"},l.a.createElement(o,null)))),!m.hide_pagination&&(m.next||m.previous)&&l.a.createElement("div",{className:p.a.paginator},l.a.createElement(c.a,{next:m.next,previous:m.previous}))),o.rightToc&&l.a.createElement("div",{className:p.a.rightCol},l.a.createElement("div",{className:u()("table-of-contents",p.a.tableOfContents)},l.a.createElement(y,{deliveryGuarantee:S,eventTypes:O,operatingSystems:B,status:P,unsupportedOperatingSystems:z}),o.rightToc.length>0&&l.a.createElement("div",{className:"section"},l.a.createElement("div",{className:"title"},"Contents"),l.a.createElement(f,{headings:o.rightToc})),l.a.createElement("div",{className:"section"},l.a.createElement("div",{className:"title"},"Resources"),l.a.createElement("ul",{className:"contents"},g&&l.a.createElement("li",null,l.a.createElement("a",{href:g,className:"contents__link",target:"_blank"},l.a.createElement("i",{className:"feather icon-edit-1"})," Edit this page")),j&&l.a.createElement("li",null,l.a.createElement(r.a,{to:j,className:"contents__link"},l.a.createElement("i",{className:"feather icon-book-open"})," View Blog Posts")),L&&l.a.createElement("li",null,l.a.createElement("a",{href:L,className:"contents__link",target:"_blank"},l.a.createElement("i",{className:"feather icon-message-circle"})," View Issues")),I&&l.a.createElement("li",null,l.a.createElement("a",{href:I,className:"contents__link",target:"_blank"},l.a.createElement("i",{className:"feather icon-github"})," View Source")))),(N||b)&&l.a.createElement("div",{className:"section"},"Last updated"," ",N&&l.a.createElement(l.a.Fragment,null,"on"," ",l.a.createElement("strong",null,new Date(1e3*N).toLocaleDateString()),b&&" "),b&&l.a.createElement(l.a.Fragment,null,"by ",l.a.createElement("strong",null,b)))))))}},295:function(e,t,a){"use strict";var n=a(12),l=a(82)(!0);n(n.P,"Array",{includes:function(e){return l(this,e,arguments.length>1?arguments[1]:void 0)}}),a(80)("includes")},296:function(e,t,a){"use strict";var n=a(12),l=a(321);n(n.P+n.F*a(322)("includes"),"String",{includes:function(e){return!!~l(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},339:function(e,t,a){"use strict";var n=a(0),l=a.n(n),s=a(268),r=a(266),c=a.n(r);a(142);t.a=function(e){var t=e.className,a=e.previous,n=e.next;return l.a.createElement("nav",{className:c()("pagination-nav",t)},a&&l.a.createElement("div",{className:"pagination-nav__item"},l.a.createElement(s.a,{className:"pagination-nav__link",to:a.permalink},l.a.createElement("h5",{className:"pagination-nav__link--sublabel"},"Previous"),l.a.createElement("h4",{className:"pagination-nav__link--label"},"\xab ",a.title))),n&&l.a.createElement("div",{className:"pagination-nav__item pagination-nav__item--next"},l.a.createElement(s.a,{className:"pagination-nav__link",to:n.permalink},l.a.createElement("h5",{className:"pagination-nav__link--sublabel"},"Next"),l.a.createElement("h4",{className:"pagination-nav__link--label"},n.title," \xbb"))))}}}]); \ No newline at end of file diff --git a/1be78505.a46084f6.js b/1be78505.f5159772.js similarity index 99% rename from 1be78505.a46084f6.js rename to 1be78505.f5159772.js index badde7984..ea4b13cd9 100644 --- a/1be78505.a46084f6.js +++ b/1be78505.f5159772.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15,119],{261:function(e,t,a){"use strict";a.r(t);a(26),a(20),a(19),a(53),a(274);var n=a(0),r=a.n(n),l=a(265),c=a(266),i=a.n(c),o=a(267),s=a(69),m=a(273),u=a(1),d=(a(78),a(295),a(296),a(268)),b=a(270),f=a.n(b);a(269);var h=a(280),g=a(281),p=a(156),v=a.n(p);a(157);function E(e){var t=e.item,a=e.level,l=e.onItemClick,c=e.collapsible,o=t.items,s=t.href,m=t.label,b=t.type,f=Object(n.useState)(t.collapsed),h=f[0],g=f[1],p=Object(n.useState)(null),v=p[0],k=p[1];switch(t.collapsed!==v&&(k(t.collapsed),g(t.collapsed)),b){case"category":if(0==o.length)return!1;if(1==a)return r.a.createElement("li",{className:i()("menu__list-item"),key:m},r.a.createElement("div",{className:"title"},m),r.a.createElement("ul",{className:"menu__list"},o.map((function(e){return r.a.createElement(E,{key:e.label,item:e,level:a+1,onItemClick:l,collapsible:c})}))));var y=o[0].href;return r.a.createElement("li",{className:i()("menu__list-item",{"menu__list-item--collapsed":h}),key:m},r.a.createElement(d.a,{activeClassName:"menu__link--active",className:i()("menu__link",{"menu__link--sublist":c}),to:y+"/",onClick:c&&"#!"==y?function(){return g(!h)}:void 0},m),r.a.createElement("ul",{className:"menu__list"},o.map((function(e){return r.a.createElement(E,{key:e.label,item:e,level:a+1,onItemClick:l,collapsible:c})}))));case"link":default:var _=[],N=m;if(m.includes("|")){var O=m.split("|",2);N=O[0],_=JSON.parse(O[1])}var w="hidden"==N;return r.a.createElement("li",{className:i()("menu__list-item",w&&"menu__list-item-hidden"),key:m},r.a.createElement(d.a,Object(u.a)({className:"menu__link",to:s+"/"},/^\/(?!\/)/.test(s)?{activeClassName:"menu__link--active",exact:!0,onClick:l}:{target:"_blank",rel:"noreferrer noopener"}),N,_.length>0&&r.a.createElement("span",{className:"badges"},_.includes("log")&&r.a.createElement("span",{className:"badge badge--secondary",title:"This component works with log events."},"L"),_.includes("metric")&&r.a.createElement("span",{className:"badge badge--secondary",title:"This component works with metric events."},"M"))))}}var k=function(e){var t=Object(n.useState)(!1),a=t[0],l=t[1],c=Object(o.a)(),s=c.siteConfig,m=(s=void 0===s?{}:s).themeConfig.navbar,b=(m=void 0===m?{}:m).title,p=c.isClient,k=Object(g.a)(),y=k.logoLink,_=k.logoLinkProps,N=k.logoImageUrl,O=k.logoAlt,w=e.docsSidebars,j=e.path,C=e.sidebar,T=e.sidebarCollapsible;if(Object(h.a)(a),!C)return null;var x=w[C];if(!x)throw new Error('Cannot find the sidebar "'+C+'" in the sidebar config!');return T&&x.forEach((function(e){return function e(t,a){var n=t.items,r=t.href;switch(t.type){case"category":var l=n.map((function(t){return e(t,a)})).filter((function(e){return e})).length>0;return t.collapsed=!l,l;case"link":default:return r===a}}(e,j)})),r.a.createElement("div",{className:i()("docs-sidebar",v.a.sidebar)},r.a.createElement(d.a,Object(u.a)({className:v.a.sidebarLogo,to:y},_),null!=N&&r.a.createElement(f.a,{key:p,src:N,alt:O}),null!=b&&r.a.createElement("strong",null,b)),r.a.createElement("div",{className:i()("menu","menu--responsive",v.a.menu,{"menu--show":a})},r.a.createElement("button",{"aria-label":a?"Close Menu":"Open Menu",className:"button button--secondary button--sm menu__button",type:"button",onClick:function(){l(!a)}},a?r.a.createElement("span",{className:i()(v.a.sidebarMenuIcon,v.a.sidebarMenuCloseIcon)},"\xd7"):r.a.createElement("svg",{className:v.a.sidebarMenuIcon,xmlns:"http://www.w3.org/2000/svg",height:24,width:24,viewBox:"0 0 32 32",role:"img",focusable:"false"},r.a.createElement("title",null,"Menu"),r.a.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))),r.a.createElement("ul",{className:"menu__list"},x.map((function(e){return e.items.length>0&&r.a.createElement(E,{key:e.label,item:e,level:1,onItemClick:function(){l(!1)},collapsible:T})})))))},y=a(299),_=a(347),N=a(324),O=a(158),w=a.n(O);t.default=function(e){var t=e.route,a=e.docsMetadata,n=e.location,c=t.routes.find((function(e){return Object(N.b)(n.pathname,e)}))||{},u=a.permalinkToSidebar,d=a.docsSidebars,b=a.version,f=u[c.path],h=Object(o.a)(),g=h.siteConfig,p=(g=void 0===g?{}:g).themeConfig,v=void 0===p?{}:p,E=h.isClient,O=v.sidebarCollapsible,j=void 0===O||O;return 0===Object.keys(c).length?r.a.createElement(_.default,e):r.a.createElement(m.a,{version:b,key:E},r.a.createElement("div",{className:i()(w.a.container,"container","container--l")},f&&r.a.createElement("div",{className:i()(w.a.sidebar)},r.a.createElement(k,{docsSidebars:d,path:c.path,sidebar:f,sidebarCollapsible:j})),r.a.createElement("main",{className:w.a.main},r.a.createElement(l.a,{components:y.a},Object(s.a)(t.routes)))))}},265:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return f}));var n=a(0),r=a.n(n);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function c(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=r.a.createContext({}),m=function(e){var t=r.a.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},u=function(e){var t=m(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},b=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),u=m(a),b=n,f=u["".concat(c,".").concat(b)]||u[b]||d[b]||l;return a?r.a.createElement(f,i({ref:t},s,{components:a})):r.a.createElement(f,i({ref:t},s))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,c=new Array(l);c[0]=b;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var s=2;s0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(u.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(M,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(B,e))}))):null)}))),(s||l)&&r.a.createElement("div",{className:"text--center"},s&&s.src&&r.a.createElement("div",{className:"margin-bottom--sm"},s.href?r.a.createElement("a",{href:s.href,target:"_blank",rel:"noopener noreferrer",className:D.a.footerLogoLink},r.a.createElement(A,{alt:s.alt,url:m})):r.a.createElement(A,{alt:s.alt,url:m}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:D.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),l,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},F=a(290),W=a(291),V=a(3);a(135);t.a=function(e){var t=Object(f.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,i=(a.tagline,a.title),o=a.themeConfig.image,s=a.url,m=e.children,u=e.title,d=e.noFooter,b=e.description,h=e.image,g=e.keywords,p=(e.permalink,e.version),v=u?u+" | "+i:i,E=h||o,k=s+Object(N.a)(E),y=Object(N.a)(n),_=Object(V.h)(),O=_?"https://gnet.host"+(_.pathname.endsWith("/")?_.pathname:_.pathname+"/"):null;return r.a.createElement(W.a,null,r.a.createElement(F.a,null,r.a.createElement(c.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),v&&r.a.createElement("title",null,v),v&&r.a.createElement("meta",{property:"og:title",content:v}),n&&r.a.createElement("link",{rel:"shortcut icon",href:y}),b&&r.a.createElement("meta",{name:"description",content:b}),b&&r.a.createElement("meta",{property:"og:description",content:b}),p&&r.a.createElement("meta",{name:"docsearch:version",content:p}),g&&g.length&&r.a.createElement("meta",{name:"keywords",content:g.join(",")}),E&&r.a.createElement("meta",{property:"og:image",content:k}),E&&r.a.createElement("meta",{property:"twitter:image",content:k}),E&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+v}),E&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),E&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),O&&r.a.createElement("meta",{property:"og:url",content:O}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),O&&r.a.createElement("link",{rel:"canonical",href:O})),r.a.createElement(l.a,null),r.a.createElement(P,null),r.a.createElement("div",{className:"main-wrapper"},m),!d&&r.a.createElement(R,null)))}},297:function(e,t,a){"use strict";(function(e){var n=a(1),r=(a(295),a(296),a(78),a(79),a(306),a(0)),l=a.n(r),c=a(307),i=a.n(c),o=a(320),s=a(52),m=a(266),u=a.n(m),d=a(315),b=a(308),f=a.n(b),h=a(267),g=a(276),p=a(136),v=a.n(p);(void 0!==e?e:window).Prism=s.a,a(309),a(310),a(311),a(312),a(313),a(314);var E=/{([\d,-]+)}/,k=/title=".*"/;t.a=function(e){var t=e.children,a=e.className,c=e.metastring,s=Object(h.a)().siteConfig.themeConfig.prism,m=void 0===s?{}:s,b=Object(r.useState)(!1),p=b[0],y=b[1],_=Object(r.useState)(!1),N=_[0],O=_[1];Object(r.useEffect)((function(){O(!0)}),[]);var w=Object(r.useRef)(null),j=Object(r.useRef)(null),C=[],T="",x=Object(g.a)().isDarkTheme,S=m.theme||d.a,P=m.darkTheme||S,L=x?P:S;if(c&&E.test(c)){var M=c.match(E)[1];C=f.a.parse(M).filter((function(e){return e>0}))}c&&k.test(c)&&(T=c.match(k)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return j.current&&(e=new i.a(j.current,{target:function(){return w.current}})),function(){e&&e.destroy()}}),[j.current,w.current]);var I=a&&a.replace(/language-/,"");!I&&m.defaultLanguage&&(I=m.defaultLanguage);var D=function(){window.getSelection().empty(),y(!0),setTimeout((function(){return y(!1)}),2e3)};return l.a.createElement(o.a,Object(n.a)({},o.b,{key:N,theme:L,code:t.trim(),language:I}),(function(e){var t,a,r=e.className,c=e.style,i=e.tokens,o=e.getLineProps,s=e.getTokenProps;return l.a.createElement(l.a.Fragment,null,T&&l.a.createElement("div",{style:c,className:v.a.codeBlockTitle},T),l.a.createElement("div",{className:v.a.codeBlockContent},l.a.createElement("button",{ref:j,type:"button","aria-label":"Copy code to clipboard",className:u()(v.a.copyButton,(t={},t[v.a.copyButtonWithTitle]=T,t)),onClick:D},p?"Copied":"Copy"),l.a.createElement("pre",{className:u()(r,v.a.codeBlock,(a={},a[v.a.codeBlockWithTitle]=T,a))},l.a.createElement("div",{ref:w,className:v.a.codeBlockLines,style:c},i.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=o({line:e,key:t});return C.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),l.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return l.a.createElement("span",Object(n.a)({key:t},s({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),l=a.n(r),c=a(268),i=a(297),o=a(278),s=a(141),m=a.n(s);t.a={code:function(e){var t=e.children;return"string"==typeof t?l.a.createElement(i.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?l.a.createElement("a",e):l.a.createElement(c.a,e)},pre:function(e){return l.a.createElement("div",Object(n.a)({className:m.a.mdxCodeBlock},e))},h1:Object(o.a)("h1"),h2:Object(o.a)("h2"),h3:Object(o.a)("h3"),h4:Object(o.a)("h4"),h5:Object(o.a)("h5"),h6:Object(o.a)("h6")}},347:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),l=a(273);t.default=function(){return r.a.createElement(l.a,{title:"Page Not Found"},r.a.createElement("div",{className:"container margin-vert--xl"},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col col--6 col--offset-3"},r.a.createElement("h1",{className:"hero__title"},"Page Not Found"),r.a.createElement("p",null,"We could not find what you were looking for."),r.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[14,119],{261:function(e,t,a){"use strict";a.r(t);a(26),a(20),a(19),a(53),a(274);var n=a(0),r=a.n(n),l=a(265),c=a(266),i=a.n(c),o=a(267),s=a(69),m=a(273),u=a(1),d=(a(78),a(295),a(296),a(268)),b=a(270),f=a.n(b);a(269);var h=a(280),g=a(281),p=a(155),v=a.n(p);a(156);function E(e){var t=e.item,a=e.level,l=e.onItemClick,c=e.collapsible,o=t.items,s=t.href,m=t.label,b=t.type,f=Object(n.useState)(t.collapsed),h=f[0],g=f[1],p=Object(n.useState)(null),v=p[0],k=p[1];switch(t.collapsed!==v&&(k(t.collapsed),g(t.collapsed)),b){case"category":if(0==o.length)return!1;if(1==a)return r.a.createElement("li",{className:i()("menu__list-item"),key:m},r.a.createElement("div",{className:"title"},m),r.a.createElement("ul",{className:"menu__list"},o.map((function(e){return r.a.createElement(E,{key:e.label,item:e,level:a+1,onItemClick:l,collapsible:c})}))));var y=o[0].href;return r.a.createElement("li",{className:i()("menu__list-item",{"menu__list-item--collapsed":h}),key:m},r.a.createElement(d.a,{activeClassName:"menu__link--active",className:i()("menu__link",{"menu__link--sublist":c}),to:y+"/",onClick:c&&"#!"==y?function(){return g(!h)}:void 0},m),r.a.createElement("ul",{className:"menu__list"},o.map((function(e){return r.a.createElement(E,{key:e.label,item:e,level:a+1,onItemClick:l,collapsible:c})}))));case"link":default:var _=[],N=m;if(m.includes("|")){var O=m.split("|",2);N=O[0],_=JSON.parse(O[1])}var w="hidden"==N;return r.a.createElement("li",{className:i()("menu__list-item",w&&"menu__list-item-hidden"),key:m},r.a.createElement(d.a,Object(u.a)({className:"menu__link",to:s+"/"},/^\/(?!\/)/.test(s)?{activeClassName:"menu__link--active",exact:!0,onClick:l}:{target:"_blank",rel:"noreferrer noopener"}),N,_.length>0&&r.a.createElement("span",{className:"badges"},_.includes("log")&&r.a.createElement("span",{className:"badge badge--secondary",title:"This component works with log events."},"L"),_.includes("metric")&&r.a.createElement("span",{className:"badge badge--secondary",title:"This component works with metric events."},"M"))))}}var k=function(e){var t=Object(n.useState)(!1),a=t[0],l=t[1],c=Object(o.a)(),s=c.siteConfig,m=(s=void 0===s?{}:s).themeConfig.navbar,b=(m=void 0===m?{}:m).title,p=c.isClient,k=Object(g.a)(),y=k.logoLink,_=k.logoLinkProps,N=k.logoImageUrl,O=k.logoAlt,w=e.docsSidebars,j=e.path,C=e.sidebar,T=e.sidebarCollapsible;if(Object(h.a)(a),!C)return null;var x=w[C];if(!x)throw new Error('Cannot find the sidebar "'+C+'" in the sidebar config!');return T&&x.forEach((function(e){return function e(t,a){var n=t.items,r=t.href;switch(t.type){case"category":var l=n.map((function(t){return e(t,a)})).filter((function(e){return e})).length>0;return t.collapsed=!l,l;case"link":default:return r===a}}(e,j)})),r.a.createElement("div",{className:i()("docs-sidebar",v.a.sidebar)},r.a.createElement(d.a,Object(u.a)({className:v.a.sidebarLogo,to:y},_),null!=N&&r.a.createElement(f.a,{key:p,src:N,alt:O}),null!=b&&r.a.createElement("strong",null,b)),r.a.createElement("div",{className:i()("menu","menu--responsive",v.a.menu,{"menu--show":a})},r.a.createElement("button",{"aria-label":a?"Close Menu":"Open Menu",className:"button button--secondary button--sm menu__button",type:"button",onClick:function(){l(!a)}},a?r.a.createElement("span",{className:i()(v.a.sidebarMenuIcon,v.a.sidebarMenuCloseIcon)},"\xd7"):r.a.createElement("svg",{className:v.a.sidebarMenuIcon,xmlns:"http://www.w3.org/2000/svg",height:24,width:24,viewBox:"0 0 32 32",role:"img",focusable:"false"},r.a.createElement("title",null,"Menu"),r.a.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))),r.a.createElement("ul",{className:"menu__list"},x.map((function(e){return e.items.length>0&&r.a.createElement(E,{key:e.label,item:e,level:1,onItemClick:function(){l(!1)},collapsible:T})})))))},y=a(299),_=a(347),N=a(324),O=a(157),w=a.n(O);t.default=function(e){var t=e.route,a=e.docsMetadata,n=e.location,c=t.routes.find((function(e){return Object(N.b)(n.pathname,e)}))||{},u=a.permalinkToSidebar,d=a.docsSidebars,b=a.version,f=u[c.path],h=Object(o.a)(),g=h.siteConfig,p=(g=void 0===g?{}:g).themeConfig,v=void 0===p?{}:p,E=h.isClient,O=v.sidebarCollapsible,j=void 0===O||O;return 0===Object.keys(c).length?r.a.createElement(_.default,e):r.a.createElement(m.a,{version:b,key:E},r.a.createElement("div",{className:i()(w.a.container,"container","container--l")},f&&r.a.createElement("div",{className:i()(w.a.sidebar)},r.a.createElement(k,{docsSidebars:d,path:c.path,sidebar:f,sidebarCollapsible:j})),r.a.createElement("main",{className:w.a.main},r.a.createElement(l.a,{components:y.a},Object(s.a)(t.routes)))))}},265:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return f}));var n=a(0),r=a.n(n);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function c(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=r.a.createContext({}),m=function(e){var t=r.a.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},u=function(e){var t=m(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},b=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),u=m(a),b=n,f=u["".concat(c,".").concat(b)]||u[b]||d[b]||l;return a?r.a.createElement(f,i({ref:t},s,{components:a})):r.a.createElement(f,i({ref:t},s))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,c=new Array(l);c[0]=b;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var s=2;s0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(u.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(M,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(B,e))}))):null)}))),(s||l)&&r.a.createElement("div",{className:"text--center"},s&&s.src&&r.a.createElement("div",{className:"margin-bottom--sm"},s.href?r.a.createElement("a",{href:s.href,target:"_blank",rel:"noopener noreferrer",className:D.a.footerLogoLink},r.a.createElement(A,{alt:s.alt,url:m})):r.a.createElement(A,{alt:s.alt,url:m}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:D.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),l,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},F=a(290),W=a(291),V=a(3);a(135);t.a=function(e){var t=Object(f.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,i=(a.tagline,a.title),o=a.themeConfig.image,s=a.url,m=e.children,u=e.title,d=e.noFooter,b=e.description,h=e.image,g=e.keywords,p=(e.permalink,e.version),v=u?u+" | "+i:i,E=h||o,k=s+Object(N.a)(E),y=Object(N.a)(n),_=Object(V.h)(),O=_?"https://gnet.host"+(_.pathname.endsWith("/")?_.pathname:_.pathname+"/"):null;return r.a.createElement(W.a,null,r.a.createElement(F.a,null,r.a.createElement(c.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),v&&r.a.createElement("title",null,v),v&&r.a.createElement("meta",{property:"og:title",content:v}),n&&r.a.createElement("link",{rel:"shortcut icon",href:y}),b&&r.a.createElement("meta",{name:"description",content:b}),b&&r.a.createElement("meta",{property:"og:description",content:b}),p&&r.a.createElement("meta",{name:"docsearch:version",content:p}),g&&g.length&&r.a.createElement("meta",{name:"keywords",content:g.join(",")}),E&&r.a.createElement("meta",{property:"og:image",content:k}),E&&r.a.createElement("meta",{property:"twitter:image",content:k}),E&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+v}),E&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),E&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),O&&r.a.createElement("meta",{property:"og:url",content:O}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),O&&r.a.createElement("link",{rel:"canonical",href:O})),r.a.createElement(l.a,null),r.a.createElement(P,null),r.a.createElement("div",{className:"main-wrapper"},m),!d&&r.a.createElement(R,null)))}},297:function(e,t,a){"use strict";(function(e){var n=a(1),r=(a(295),a(296),a(78),a(79),a(306),a(0)),l=a.n(r),c=a(307),i=a.n(c),o=a(320),s=a(52),m=a(266),u=a.n(m),d=a(315),b=a(308),f=a.n(b),h=a(267),g=a(276),p=a(136),v=a.n(p);(void 0!==e?e:window).Prism=s.a,a(309),a(310),a(311),a(312),a(313),a(314);var E=/{([\d,-]+)}/,k=/title=".*"/;t.a=function(e){var t=e.children,a=e.className,c=e.metastring,s=Object(h.a)().siteConfig.themeConfig.prism,m=void 0===s?{}:s,b=Object(r.useState)(!1),p=b[0],y=b[1],_=Object(r.useState)(!1),N=_[0],O=_[1];Object(r.useEffect)((function(){O(!0)}),[]);var w=Object(r.useRef)(null),j=Object(r.useRef)(null),C=[],T="",x=Object(g.a)().isDarkTheme,S=m.theme||d.a,P=m.darkTheme||S,L=x?P:S;if(c&&E.test(c)){var M=c.match(E)[1];C=f.a.parse(M).filter((function(e){return e>0}))}c&&k.test(c)&&(T=c.match(k)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return j.current&&(e=new i.a(j.current,{target:function(){return w.current}})),function(){e&&e.destroy()}}),[j.current,w.current]);var I=a&&a.replace(/language-/,"");!I&&m.defaultLanguage&&(I=m.defaultLanguage);var D=function(){window.getSelection().empty(),y(!0),setTimeout((function(){return y(!1)}),2e3)};return l.a.createElement(o.a,Object(n.a)({},o.b,{key:N,theme:L,code:t.trim(),language:I}),(function(e){var t,a,r=e.className,c=e.style,i=e.tokens,o=e.getLineProps,s=e.getTokenProps;return l.a.createElement(l.a.Fragment,null,T&&l.a.createElement("div",{style:c,className:v.a.codeBlockTitle},T),l.a.createElement("div",{className:v.a.codeBlockContent},l.a.createElement("button",{ref:j,type:"button","aria-label":"Copy code to clipboard",className:u()(v.a.copyButton,(t={},t[v.a.copyButtonWithTitle]=T,t)),onClick:D},p?"Copied":"Copy"),l.a.createElement("pre",{className:u()(r,v.a.codeBlock,(a={},a[v.a.codeBlockWithTitle]=T,a))},l.a.createElement("div",{ref:w,className:v.a.codeBlockLines,style:c},i.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=o({line:e,key:t});return C.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),l.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return l.a.createElement("span",Object(n.a)({key:t},s({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),l=a.n(r),c=a(268),i=a(297),o=a(278),s=a(141),m=a.n(s);t.a={code:function(e){var t=e.children;return"string"==typeof t?l.a.createElement(i.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?l.a.createElement("a",e):l.a.createElement(c.a,e)},pre:function(e){return l.a.createElement("div",Object(n.a)({className:m.a.mdxCodeBlock},e))},h1:Object(o.a)("h1"),h2:Object(o.a)("h2"),h3:Object(o.a)("h3"),h4:Object(o.a)("h4"),h5:Object(o.a)("h5"),h6:Object(o.a)("h6")}},347:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),l=a(273);t.default=function(){return r.a.createElement(l.a,{title:"Page Not Found"},r.a.createElement("div",{className:"container margin-vert--xl"},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col col--6 col--offset-3"},r.a.createElement("h1",{className:"hero__title"},"Page Not Found"),r.a.createElement("p",null,"We could not find what you were looking for."),r.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}}}]); \ No newline at end of file diff --git a/1e5f449e.9d5d35e3.js b/1e5f449e.0a9897d0.js similarity index 99% rename from 1e5f449e.9d5d35e3.js rename to 1e5f449e.0a9897d0.js index b3499f3a3..26b97daf3 100644 --- a/1e5f449e.9d5d35e3.js +++ b/1e5f449e.0a9897d0.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{159:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return i})),t.d(n,"metadata",(function(){return c})),t.d(n,"rightToc",(function(){return p})),t.d(n,"default",(function(){return u}));var a=t(1),o=t(9),r=(t(0),t(265)),i={last_modified_on:"2023-07-01",id:"announcing-gnet-v2-3-0",title:"Announcing gnet v2.3.0",description:"Hello World! We present you, gnet v2.3.0!",author_github:"https://github.com/panjf2000",tags:["type: announcement","domain: presentation"]},c={permalink:"/blog/announcing-gnet-v2-3-0",source:"@site/blog/2023-07-01-announcing-gnet-v2-3-0.md",description:"Hello World! We present you, gnet v2.3.0!",date:"2023-07-01T00:00:00.000Z",tags:[{label:"type: announcement",permalink:"/blog/tags/type-announcement"},{label:"domain: presentation",permalink:"/blog/tags/domain-presentation"}],title:"Announcing gnet v2.3.0",readingTime:1.94,truncated:!1,prevItem:{title:"Announcing gnet v2.5.0",permalink:"/blog/announcing-gnet-v2-5-0"},nextItem:{title:"Announcing gnet v2.0.0",permalink:"/blog/announcing-gnet-v2"}},p=[{value:"Intro",id:"intro",children:[]}],l={rightToc:p};function u(e){var n=e.components,t=Object(o.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},l,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("p",null,"Today, I'm thrilled to announce the official release of ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0"}),"gnet v2.3.0"),"."),Object(r.b)("p",null,"P.S. Follow me on Twitter ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://twitter.com/panjf2000"}),"@panjf2000")," to get the latest updates about gnet!"),Object(r.b)("h2",{id:"intro"},"Intro"),Object(r.b)("p",null,"The two major updates in this release are ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/460"}),"#460")," and ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),"."),Object(r.b)("p",null,"We introduced a new data structure ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," in ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/460"}),"#460")," to displace the default ",Object(r.b)("inlineCode",{parentName:"p"},"map")," for managing connections internally, with the help of this new data structure, we can eliminate the pointers in ",Object(r.b)("inlineCode",{parentName:"p"},"map")," and store connections in the form of a matrix (an array of slices), which will significantly reduce GC (Garbage Collection) latency:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"goos: darwin\ngoarch: arm64\npkg: github.com/panjf2000/gnet/v2\n \u2502 old \u2502 new \u2502\n \u2502 sec/op \u2502 sec/op vs base \u2502\nGC4El100k/Run-4-eventloop-100000-10 30.74m \xb1 3% 19.68m \xb1 10% -35.98% (p=0.000 n=10)\nGC4El200k/Run-4-eventloop-200000-10 63.64m \xb1 3% 38.16m \xb1 11% -40.04% (p=0.000 n=10)\nGC4El500k/Run-4-eventloop-500000-10 177.28m \xb1 8% 95.21m \xb1 4% -46.29% (p=0.000 n=10)\ngeomean 70.26m 41.51m -40.92%\n\n \u2502 old \u2502 new \u2502\n \u2502 B/op \u2502 B/op vs base \u2502\nGC4El100k/Run-4-eventloop-100000-10 27.50 \xb1 35% 25.50 \xb1 33% ~ (p=0.423 n=10)\nGC4El200k/Run-4-eventloop-200000-10 27.50 \xb1 53% 20.50 \xb1 66% ~ (p=0.642 n=10)\nGC4El500k/Run-4-eventloop-500000-10 16.00 \xb1 ? 18.00 \xb1 ? ~ (p=0.357 n=10)\ngeomean 22.96 21.11 -8.04%\n\n \u2502 old \u2502 new \u2502\n \u2502 allocs/op \u2502 allocs/op vs base \u2502\nGC4El100k/Run-4-eventloop-100000-10 0.000 \xb1 0% 0.000 \xb1 0% ~ (p=1.000 n=10) \xb9\nGC4El200k/Run-4-eventloop-200000-10 0.000 \xb1 0% 0.000 \xb1 0% ~ (p=1.000 n=10) \xb9\nGC4El500k/Run-4-eventloop-500000-10 0.000 \xb1 0% 0.000 \xb1 0% ~ (p=1.000 n=10) \xb9\ngeomean \xb2 +0.00% \xb2\n\xb9 all samples are equal\n\xb2 summaries must be >0 to compute geomean\n")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(r.b)("p",null,"While we have performed sufficient testing on ",Object(r.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(r.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(r.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(r.b)("p",null,"Another significant leap is ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(r.b)("p",null,"Visit the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0"}),"release notes")," for more details."))}u.isMDXComponent=!0},265:function(e,n,t){"use strict";t.d(n,"a",(function(){return s})),t.d(n,"b",(function(){return g}));var a=t(0),o=t.n(a);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function c(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=o.a.createContext({}),u=function(e){var n=o.a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):c({},n,{},e)),t},s=function(e){var n=u(e.components);return o.a.createElement(l.Provider,{value:n},e.children)},b={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},m=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(t),m=a,g=s["".concat(i,".").concat(m)]||s[m]||b[m]||r;return t?o.a.createElement(g,c({ref:n},l,{components:t})):o.a.createElement(g,c({ref:n},l))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,i=new Array(r);i[0]=m;var c={};for(var p in n)hasOwnProperty.call(n,p)&&(c[p]=n[p]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var l=2;l0 to compute geomean\n")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(r.b)("p",null,"While we have performed sufficient testing on ",Object(r.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(r.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(r.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(r.b)("p",null,"Another significant leap is ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(r.b)("p",null,"Visit the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0"}),"release notes")," for more details."))}u.isMDXComponent=!0},265:function(e,n,t){"use strict";t.d(n,"a",(function(){return s})),t.d(n,"b",(function(){return g}));var a=t(0),o=t.n(a);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function c(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=o.a.createContext({}),u=function(e){var n=o.a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):c({},n,{},e)),t},s=function(e){var n=u(e.components);return o.a.createElement(l.Provider,{value:n},e.children)},b={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},m=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(t),m=a,g=s["".concat(i,".").concat(m)]||s[m]||b[m]||r;return t?o.a.createElement(g,c({ref:n},l,{components:t})):o.a.createElement(g,c({ref:n},l))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,i=new Array(r);i[0]=m;var c={};for(var p in n)hasOwnProperty.call(n,p)&&(c[p]=n[p]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var l=2;l0&&n.a.createElement("div",{className:"row footer__links"},n.a.createElement("div",{className:"col col--5 footer__col"},n.a.createElement("div",{className:"margin-bottom--md"},n.a.createElement(m.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),n.a.createElement("div",{className:"margin-bottom--md"},n.a.createElement(T,{description:!1,width:"150px"})),n.a.createElement("div",null,n.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},n.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",n.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},n.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",n.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},n.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),u.map((function(e,t){return n.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?n.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?n.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?n.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):n.a.createElement("li",{key:e.href||e.to,className:"footer__item"},n.a.createElement(P,e))}))):null)}))),(c||i)&&n.a.createElement("div",{className:"text--center"},c&&c.src&&n.a.createElement("div",{className:"margin-bottom--sm"},c.href?n.a.createElement("a",{href:c.href,target:"_blank",rel:"noopener noreferrer",className:M.a.footerLogoLink},n.a.createElement(B,{alt:c.alt,url:s})):n.a.createElement(B,{alt:c.alt,url:s}),n.a.createElement("br",null),n.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:M.a.footerLogoLink},n.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),i,n.a.createElement("br",null),n.a.createElement("small",null,n.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",n.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},H=a(290),I=a(291),z=a(3);a(135);t.a=function(e){var t=Object(d.a)().siteConfig,a=void 0===t?{}:t,r=a.favicon,u=(a.tagline,a.title),l=a.themeConfig.image,c=a.url,s=e.children,m=e.title,D=e.noFooter,f=e.description,p=e.image,h=e.keywords,g=(e.permalink,e.version),y=m?m+" | "+u:u,b=p||l,v=c+Object(w.a)(b),E=Object(w.a)(r),F=Object(z.h)(),C=F?"https://gnet.host"+(F.pathname.endsWith("/")?F.pathname:F.pathname+"/"):null;return n.a.createElement(I.a,null,n.a.createElement(H.a,null,n.a.createElement(o.a,null,n.a.createElement("html",{lang:"en"}),n.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),y&&n.a.createElement("title",null,y),y&&n.a.createElement("meta",{property:"og:title",content:y}),r&&n.a.createElement("link",{rel:"shortcut icon",href:E}),f&&n.a.createElement("meta",{name:"description",content:f}),f&&n.a.createElement("meta",{property:"og:description",content:f}),g&&n.a.createElement("meta",{name:"docsearch:version",content:g}),h&&h.length&&n.a.createElement("meta",{name:"keywords",content:h.join(",")}),b&&n.a.createElement("meta",{property:"og:image",content:v}),b&&n.a.createElement("meta",{property:"twitter:image",content:v}),b&&n.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+y}),b&&n.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),b&&n.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),C&&n.a.createElement("meta",{property:"og:url",content:C}),n.a.createElement("meta",{name:"twitter:card",content:"summary"}),C&&n.a.createElement("link",{rel:"canonical",href:C})),n.a.createElement(i.a,null),n.a.createElement(_,null),n.a.createElement("div",{className:"main-wrapper"},s),!D&&n.a.createElement(L,null)))}},274:function(e,t,a){"use strict";var r=a(12),n=a(301)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),a(80)("find")},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));a(79),a(298),a(274),a(78);var r=a(279),n=a.n(r);function i(e,t){var a=new n.a;return e.map((function(e){var r=e;return"string"==typeof e&&(r={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),r=a[0],n=a[1],i="primary";switch(r){case"domain":i="blue";break;case"type":i="pink";break;default:i="primary"}return{category:r,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:i,value:n}}(r)}))}},277:function(e,t,a){var r=a(24).f,n=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in n||a(10)&&r(n,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},278:function(e,t,a){"use strict";var r=a(9),n=a(0),i=a.n(n),o=a(266),u=a.n(o),l=a(267),c=(a(139),a(140)),s=a.n(c);t.a=function(e){return function(t){var a,n=t.id,o=Object(r.a)(t,["id"]),c=Object(l.a)().siteConfig,m=(c=void 0===c?{}:c).themeConfig,D=(m=void 0===m?{}:m).navbar,f=(D=void 0===D?{}:D).hideOnScroll,d=void 0!==f&&f;return n?i.a.createElement(e,o,i.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:u()("anchor",(a={},a[s.a.enhancedAnchor]=!d,a)),id:n}),i.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+n,title:"Direct link to heading"},"#"),o.children):i.a.createElement(e,o)}}},279:function(e,t,a){var r=a(288);e.exports=u;var n=Object.hasOwnProperty,i=/\s/g,o=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function u(){if(!(this instanceof u))return new u;this.reset()}function l(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(o,"").replace(r(),"").replace(i,"-"))}u.prototype.slug=function(e,t){for(var a=l(e,!0===t),r=a;n.call(this.occurrences,a);)this.occurrences[r]++,a=r+"-"+this.occurrences[r];return this.occurrences[a]=0,a},u.prototype.reset=function(){this.occurrences=Object.create(null)},u.slug=l},287:function(e,t,a){"use strict";var r=a(0),n=a.n(r),i=a(268),o=a(266),u=a.n(o);t.a=function(e){var t=e.count,a=e.label,r=e.permalink,o=e.style,l=e.value,c=e.valueOnly;return n.a.createElement(i.a,{to:r+"/",className:u()("badge","badge--rounded","badge--"+o)},c?l:a,t&&n.a.createElement(n.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var r=a(0),n=a.n(r),i=a(266),o=a.n(i),u=a(267);a(137);t.a=function(e){var t,a=e.bio,r=e.className,i=e.github,l=e.nameSuffix,c=e.rel,s=e.size,m=e.subTitle,D=e.vertical,f=Object(u.a)().siteConfig,d=(void 0===f?{}:f).customFields.metadata.team,p=d.find((function(e){return e.github==i}))||d.find((function(e){return"ben"==e.id}));return n.a.createElement("div",{className:o()("avatar",r,(t={},t["avatar--"+s]=s,t["avatar--vertical"]=D,t))},n.a.createElement("img",{className:o()("avatar__photo","avatar__photo--"+s),src:p.avatar}),n.a.createElement("div",{className:"avatar__intro"},n.a.createElement("div",{className:"avatar__name"},n.a.createElement("a",{href:p.github,target:"_blank",rel:c},p.name),l),m&&n.a.createElement("small",{className:"avatar__subtitle"},m),!m&&a&&n.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:p.bio}})))}},293:function(e,t,a){"use strict";var r=a(1),n=a(0),i=a.n(n),o=(a(268),a(287)),u=a(266),l=a.n(u),c=a(275),s=a(138),m=a.n(s);t.a=function(e){var t,a=e.block,n=e.colorProfile,u=e.tags,s=e.valuesOnly,D=Object(c.a)(u,n);return i.a.createElement("span",{className:l()(m.a.tags,(t={},t[m.a.tagsBlock]=a,t))},D.map((function(e,t){return i.a.createElement(o.a,Object(r.a)({key:t,valueOnly:s},e))})))}},294:function(e,t,a){var r;!function(n){"use strict";var i,o,u,l=(i=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,o=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,u=/[^-+\dA-Z]/g,function(e,t,a,r){if(1!==arguments.length||"string"!==D(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var n=(t=String(l.masks[t]||t||l.masks.default)).slice(0,4);"UTC:"!==n&&"GMT:"!==n||(t=t.slice(4),a=!0,"GMT:"===n&&(r=!0));var f=a?"getUTC":"get",d=e[f+"Date"](),p=e[f+"Day"](),h=e[f+"Month"](),g=e[f+"FullYear"](),y=e[f+"Hours"](),b=e[f+"Minutes"](),v=e[f+"Seconds"](),E=e[f+"Milliseconds"](),F=a?0:e.getTimezoneOffset(),w=s(e),C=m(e),N={d:d,dd:c(d),ddd:l.i18n.dayNames[p],dddd:l.i18n.dayNames[p+7],m:h+1,mm:c(h+1),mmm:l.i18n.monthNames[h],mmmm:l.i18n.monthNames[h+12],yy:String(g).slice(2),yyyy:g,h:y%12||12,hh:c(y%12||12),H:y,HH:c(y),M:b,MM:c(b),s:v,ss:c(v),l:c(E,3),L:c(Math.round(E/10)),t:y<12?l.i18n.timeNames[0]:l.i18n.timeNames[1],tt:y<12?l.i18n.timeNames[2]:l.i18n.timeNames[3],T:y<12?l.i18n.timeNames[4]:l.i18n.timeNames[5],TT:y<12?l.i18n.timeNames[6]:l.i18n.timeNames[7],Z:r?"GMT":a?"UTC":(String(e).match(o)||[""]).pop().replace(u,""),o:(F>0?"-":"+")+c(100*Math.floor(Math.abs(F)/60)+Math.abs(F)%60,4),S:["th","st","nd","rd"][d%10>3?0:(d%100-d%10!=10)*d%10],W:w,N:C};return t.replace(i,(function(e){return e in N?N[e]:e.slice(1,e.length-1)}))});function c(e,t){for(e=String(e),t=t||2;e.length1?arguments[1]:void 0)}}),a(80)("includes")},296:function(e,t,a){"use strict";var r=a(12),n=a(321);r(r.P+r.F*a(322)("includes"),"String",{includes:function(e){return!!~n(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},301:function(e,t,a){var r=a(28),n=a(54),i=a(25),o=a(27),u=a(302);e.exports=function(e,t){var a=1==e,l=2==e,c=3==e,s=4==e,m=6==e,D=5==e||m,f=t||u;return function(t,u,d){for(var p,h,g=i(t),y=n(g),b=r(u,d,3),v=o(y.length),E=0,F=a?f(t,v):l?f(t,0):void 0;v>E;E++)if((D||E in y)&&(h=b(p=y[E],E,g),e))if(a)F[E]=h;else if(h)switch(e){case 3:return!0;case 5:return p;case 6:return E;case 2:F.push(p)}else if(s)return!1;return m?-1:c||s?s:F}}},302:function(e,t,a){var r=a(303);e.exports=function(e,t){return new(r(e))(t)}},303:function(e,t,a){var r=a(14),n=a(323),i=a(2)("species");e.exports=function(e){var t;return n(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!n(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},325:function(e,t,a){"use strict";var r=a(12),n=a(30),i=a(25),o=a(13),u=[].sort,l=[1,2,3];r(r.P+r.F*(o((function(){l.sort(void 0)}))||!o((function(){l.sort(null)}))||!a(326)(u)),"Array",{sort:function(e){return void 0===e?u.call(i(this)):u.call(i(this),n(e))}})},326:function(e,t,a){"use strict";var r=a(13);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},327:function(e,t,a){e.exports=function(){var e=[],t=[],a={},r={},n={};function i(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function o(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function u(e,t){return e.replace(/\$(\d{1,2})/g,(function(e,a){return t[a]||""}))}function l(e,t){return e.replace(t[0],(function(a,r){var n=u(t[1],arguments);return o(""===a?e[r-1]:a,n)}))}function c(e,t,r){if(!e.length||a.hasOwnProperty(e))return t;for(var n=r.length;n--;){var i=r[n];if(i[0].test(t))return l(t,i)}return t}function s(e,t,a){return function(r){var n=r.toLowerCase();return t.hasOwnProperty(n)?o(r,n):e.hasOwnProperty(n)?o(r,e[n]):c(n,r,a)}}function m(e,t,a,r){return function(r){var n=r.toLowerCase();return!!t.hasOwnProperty(n)||!e.hasOwnProperty(n)&&c(n,n,a)===n}}function D(e,t,a){return(a?t+" ":"")+(1===t?D.singular(e):D.plural(e))}return D.plural=s(n,r,e),D.isPlural=m(n,r,e),D.singular=s(r,n,t),D.isSingular=m(r,n,t),D.addPluralRule=function(t,a){e.push([i(t),a])},D.addSingularRule=function(e,a){t.push([i(e),a])},D.addUncountableRule=function(e){"string"!=typeof e?(D.addPluralRule(e,"$0"),D.addSingularRule(e,"$0")):a[e.toLowerCase()]=!0},D.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),n[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return D.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return D.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return D.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\xe9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(D.addUncountableRule),D}()},333:function(e,t,a){"use strict";var r=a(0),n=a.n(r),i=["second","minute","hour","day","week","month","year"],o=["\u79d2","\u5206\u949f","\u5c0f\u65f6","\u5929","\u5468","\u4e2a\u6708","\u5e74"],u={},l=function(e,t){u[e]=t},c=function(e){return u[e]||u.en_US},s=[60,60,24,7,365/7/12,12];function m(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function D(e,t){for(var a=e<0?1:0,r=e=Math.abs(e),n=0;e>=s[n]&&n(0===(n*=2)?9:1)&&(n+=1),t(e,n,r)[a].replace("%s",e.toString())}function f(e,t){return(+(t?m(t):new Date)-+m(e))/1e3}function d(e){return parseInt(e.getAttribute("timeago-id"))}var p={},h=function(e){clearTimeout(e),delete p[e]};function g(e,t,a,r){h(d(e));var n=r.relativeDate,i=r.minInterval,o=f(t,n);e.innerText=D(o,a);var u=setTimeout((function(){g(e,t,a,r)}),Math.min(1e3*Math.max(function(e){for(var t=1,a=0,r=Math.abs(e);e>=s[a]&&a1&&(a+="s"),[e+" "+a+" ago","in "+e+" "+a]})),l("zh_CN",(function(e,t){if(0===t)return["\u521a\u521a","\u7247\u523b\u540e"];var a=o[~~(t/2)];return[e+" "+a+"\u524d",e+" "+a+"\u540e"]}));var b,v=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),E=function(){return(E=Object.assign||function(e){for(var t,a=1,r=arguments.length;a1;){var t=e.pop(),a=t.obj[t.prop];if(n(a)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122?n+=r.charAt(o):u<128?n+=i[u]:u<2048?n+=i[192|u>>6]+i[128|63&u]:u<55296||u>=57344?n+=i[224|u>>12]+i[128|u>>6&63]+i[128|63&u]:(o+=1,u=65536+((1023&u)<<10|1023&r.charCodeAt(o)),n+=i[240|u>>18]+i[128|u>>12&63]+i[128|u>>6&63]+i[128|63&u])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(n(e)){for(var a=[],r=0;r0&&i.a.createElement("div",null,i.a.createElement(c.a,{colorProfile:"blog",tags:F}))))},g=a(279),y=a.n(g),b=a(327),v=a.n(b),E=/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i,F=/[^\s:\u2013\u2014-]+|./g,w=/\s/,C=/.(?=[A-Z]|\..)/,N=/[A-Za-z0-9\u00C0-\u00FF]/;function k(e){for(var t,a="";null!==(t=F.exec(e));){var r=t[0],n=t.index;C.test(r)||E.test(r)&&0!==n&&n+r.length!==e.length||":"===e.charAt(n+r.length)&&!w.test(e.charAt(n+r.length+1))?a+=r:a+=r.replace(N,(function(e){return e.toUpperCase()}))}return a}Object(o.a)("h2");var O=Object(o.a)("h3");function j(e){var t=e.groupBy,a=e.group,r=new y.a;switch(t){case"release":return i.a.createElement("li",{className:"header sticky"},i.a.createElement("h3",null,i.a.createElement(l.a,{to:"/releases/"+a+"/"},k(a))));case"type":var n=null,o=v()(k(a)),u=null;switch(a){case"breaking change":n="alert-triangle",u="danger";break;case"enhancement":n="arrow-up-circle",u="pink";break;case"new feature":n="gift",u="primary";break;case"performance":n="zap",o="Performance Improvements",u="warning"}return i.a.createElement("li",{className:"header sticky"},i.a.createElement(O,{id:r.slug(a+"-highlights"),className:"text--"+u},n&&i.a.createElement("i",{className:"feather icon-"+n})," ",o));default:throw Error("unknown group: "+t)}}t.a=function(e){var t=e.author,a=(e.clean,e.colorize),n=e.groupBy,o=e.items,u=e.tags,l=e.timeline,c=n||"release",s=function(e){return e.map((function(e){if(e.content){var t=e.content,a=t.frontMatter,r=t.metadata,n=a.author_github,i=a.pr_numbers,o=a.release,u=a.title,l=r.date,c=r.description,s=r.permalink,m=r.tags,D={};return D.authorGithub=n,D.dateString=l,D.description=c,D.permalink=s,D.prNumbers=i,D.release=o,D.tags=m,D.title=u,D}return e}))}(o),m=_.groupBy(s,c),f=!1!==l?Object.keys(m):Object.keys(m).sort();return i.a.createElement("ul",{className:D()("connected-list","connected-list--clean")},f.map((function(e,n){var o=m[e];return i.a.createElement(i.a.Fragment,null,i.a.createElement(j,{groupBy:c,group:e}),i.a.createElement("ul",{className:D()("connected-list",{"connected-list--timeline":!1!==l})},o.map((function(e,n){return i.a.createElement("li",{key:n},i.a.createElement(h,Object(r.a)({},e,{colorize:a,hideAuthor:0==t,hideTags:0==u})))}))))})))}},353:function(e,t,a){"use strict";var r=String.prototype.replace,n=/%20/g,i=a(343),o={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:o.RFC3986,formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return String(e)}}},o)},383:function(e,t,a){"use strict";var r=a(384),n=a(385),i=a(353);e.exports={formats:i,parse:n,stringify:r}},384:function(e,t,a){"use strict";var r=a(343),n=a(353),i=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,l=Array.prototype.push,c=function(e,t){l.apply(e,u(t)?t:[t])},s=Date.prototype.toISOString,m=n.default,D={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:m,formatter:n.formatters[m],indices:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(t,a,n,i,o,l,s,m,f,d,p,h,g){var y,b=t;if("function"==typeof s?b=s(a,b):b instanceof Date?b=d(b):"comma"===n&&u(b)&&(b=r.maybeMap(b,(function(e){return e instanceof Date?d(e):e})).join(",")),null===b){if(i)return l&&!h?l(a,D.encoder,g,"key"):a;b=""}if("string"==typeof(y=b)||"number"==typeof y||"boolean"==typeof y||"symbol"==typeof y||"bigint"==typeof y||r.isBuffer(b))return l?[p(h?a:l(a,D.encoder,g,"key"))+"="+p(l(b,D.encoder,g,"value"))]:[p(a)+"="+p(String(b))];var v,E=[];if(void 0===b)return E;if(u(s))v=s;else{var F=Object.keys(b);v=m?F.sort(m):F}for(var w=0;w0?y+g:""}},385:function(e,t,a){"use strict";var r=a(343),n=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},u=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,a,r){if(e){var i=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,u=a.depth>0&&/(\[[^[\]]*])/.exec(i),c=u?i.slice(0,u.index):i,s=[];if(c){if(!a.plainObjects&&n.call(Object.prototype,c)&&!a.allowPrototypes)return;s.push(c)}for(var m=0;a.depth>0&&null!==(u=o.exec(i))&&m=0;--i){var o,u=e[i];if("[]"===u&&a.parseArrays)o=[].concat(n);else{o=a.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);a.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(o=[])[s]=n:o[c]=n:o={0:n}}n=o}return n}(s,t,a,r)}};e.exports=function(e,t){var a=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null==e)return a.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var a,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,m=t.parameterLimit===1/0?void 0:t.parameterLimit,D=s.split(t.delimiter,m),f=-1,d=t.charset;if(t.charsetSentinel)for(a=0;a-1&&(h=i(h)?[h]:h),n.call(c,p)?c[p]=r.combine(c[p],h):c[p]=h}return c}(e,a):e,m=a.plainObjects?Object.create(null):{},D=Object.keys(s),f=0;f0&&n.a.createElement("div",{className:"row footer__links"},n.a.createElement("div",{className:"col col--5 footer__col"},n.a.createElement("div",{className:"margin-bottom--md"},n.a.createElement(m.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),n.a.createElement("div",{className:"margin-bottom--md"},n.a.createElement(T,{description:!1,width:"150px"})),n.a.createElement("div",null,n.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},n.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",n.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},n.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",n.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},n.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),u.map((function(e,t){return n.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?n.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?n.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?n.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):n.a.createElement("li",{key:e.href||e.to,className:"footer__item"},n.a.createElement(P,e))}))):null)}))),(c||i)&&n.a.createElement("div",{className:"text--center"},c&&c.src&&n.a.createElement("div",{className:"margin-bottom--sm"},c.href?n.a.createElement("a",{href:c.href,target:"_blank",rel:"noopener noreferrer",className:M.a.footerLogoLink},n.a.createElement(B,{alt:c.alt,url:s})):n.a.createElement(B,{alt:c.alt,url:s}),n.a.createElement("br",null),n.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:M.a.footerLogoLink},n.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),i,n.a.createElement("br",null),n.a.createElement("small",null,n.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",n.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},H=a(290),I=a(291),z=a(3);a(135);t.a=function(e){var t=Object(d.a)().siteConfig,a=void 0===t?{}:t,r=a.favicon,u=(a.tagline,a.title),l=a.themeConfig.image,c=a.url,s=e.children,m=e.title,D=e.noFooter,f=e.description,p=e.image,h=e.keywords,g=(e.permalink,e.version),y=m?m+" | "+u:u,b=p||l,v=c+Object(w.a)(b),E=Object(w.a)(r),F=Object(z.h)(),C=F?"https://gnet.host"+(F.pathname.endsWith("/")?F.pathname:F.pathname+"/"):null;return n.a.createElement(I.a,null,n.a.createElement(H.a,null,n.a.createElement(o.a,null,n.a.createElement("html",{lang:"en"}),n.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),y&&n.a.createElement("title",null,y),y&&n.a.createElement("meta",{property:"og:title",content:y}),r&&n.a.createElement("link",{rel:"shortcut icon",href:E}),f&&n.a.createElement("meta",{name:"description",content:f}),f&&n.a.createElement("meta",{property:"og:description",content:f}),g&&n.a.createElement("meta",{name:"docsearch:version",content:g}),h&&h.length&&n.a.createElement("meta",{name:"keywords",content:h.join(",")}),b&&n.a.createElement("meta",{property:"og:image",content:v}),b&&n.a.createElement("meta",{property:"twitter:image",content:v}),b&&n.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+y}),b&&n.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),b&&n.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),C&&n.a.createElement("meta",{property:"og:url",content:C}),n.a.createElement("meta",{name:"twitter:card",content:"summary"}),C&&n.a.createElement("link",{rel:"canonical",href:C})),n.a.createElement(i.a,null),n.a.createElement(_,null),n.a.createElement("div",{className:"main-wrapper"},s),!D&&n.a.createElement(L,null)))}},274:function(e,t,a){"use strict";var r=a(12),n=a(301)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),a(80)("find")},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));a(79),a(298),a(274),a(78);var r=a(279),n=a.n(r);function i(e,t){var a=new n.a;return e.map((function(e){var r=e;return"string"==typeof e&&(r={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),r=a[0],n=a[1],i="primary";switch(r){case"domain":i="blue";break;case"type":i="pink";break;default:i="primary"}return{category:r,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:i,value:n}}(r)}))}},277:function(e,t,a){var r=a(24).f,n=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in n||a(10)&&r(n,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},278:function(e,t,a){"use strict";var r=a(9),n=a(0),i=a.n(n),o=a(266),u=a.n(o),l=a(267),c=(a(139),a(140)),s=a.n(c);t.a=function(e){return function(t){var a,n=t.id,o=Object(r.a)(t,["id"]),c=Object(l.a)().siteConfig,m=(c=void 0===c?{}:c).themeConfig,D=(m=void 0===m?{}:m).navbar,f=(D=void 0===D?{}:D).hideOnScroll,d=void 0!==f&&f;return n?i.a.createElement(e,o,i.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:u()("anchor",(a={},a[s.a.enhancedAnchor]=!d,a)),id:n}),i.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+n,title:"Direct link to heading"},"#"),o.children):i.a.createElement(e,o)}}},279:function(e,t,a){var r=a(288);e.exports=u;var n=Object.hasOwnProperty,i=/\s/g,o=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function u(){if(!(this instanceof u))return new u;this.reset()}function l(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(o,"").replace(r(),"").replace(i,"-"))}u.prototype.slug=function(e,t){for(var a=l(e,!0===t),r=a;n.call(this.occurrences,a);)this.occurrences[r]++,a=r+"-"+this.occurrences[r];return this.occurrences[a]=0,a},u.prototype.reset=function(){this.occurrences=Object.create(null)},u.slug=l},287:function(e,t,a){"use strict";var r=a(0),n=a.n(r),i=a(268),o=a(266),u=a.n(o);t.a=function(e){var t=e.count,a=e.label,r=e.permalink,o=e.style,l=e.value,c=e.valueOnly;return n.a.createElement(i.a,{to:r+"/",className:u()("badge","badge--rounded","badge--"+o)},c?l:a,t&&n.a.createElement(n.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var r=a(0),n=a.n(r),i=a(266),o=a.n(i),u=a(267);a(137);t.a=function(e){var t,a=e.bio,r=e.className,i=e.github,l=e.nameSuffix,c=e.rel,s=e.size,m=e.subTitle,D=e.vertical,f=Object(u.a)().siteConfig,d=(void 0===f?{}:f).customFields.metadata.team,p=d.find((function(e){return e.github==i}))||d.find((function(e){return"ben"==e.id}));return n.a.createElement("div",{className:o()("avatar",r,(t={},t["avatar--"+s]=s,t["avatar--vertical"]=D,t))},n.a.createElement("img",{className:o()("avatar__photo","avatar__photo--"+s),src:p.avatar}),n.a.createElement("div",{className:"avatar__intro"},n.a.createElement("div",{className:"avatar__name"},n.a.createElement("a",{href:p.github,target:"_blank",rel:c},p.name),l),m&&n.a.createElement("small",{className:"avatar__subtitle"},m),!m&&a&&n.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:p.bio}})))}},293:function(e,t,a){"use strict";var r=a(1),n=a(0),i=a.n(n),o=(a(268),a(287)),u=a(266),l=a.n(u),c=a(275),s=a(138),m=a.n(s);t.a=function(e){var t,a=e.block,n=e.colorProfile,u=e.tags,s=e.valuesOnly,D=Object(c.a)(u,n);return i.a.createElement("span",{className:l()(m.a.tags,(t={},t[m.a.tagsBlock]=a,t))},D.map((function(e,t){return i.a.createElement(o.a,Object(r.a)({key:t,valueOnly:s},e))})))}},294:function(e,t,a){var r;!function(n){"use strict";var i,o,u,l=(i=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,o=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,u=/[^-+\dA-Z]/g,function(e,t,a,r){if(1!==arguments.length||"string"!==D(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var n=(t=String(l.masks[t]||t||l.masks.default)).slice(0,4);"UTC:"!==n&&"GMT:"!==n||(t=t.slice(4),a=!0,"GMT:"===n&&(r=!0));var f=a?"getUTC":"get",d=e[f+"Date"](),p=e[f+"Day"](),h=e[f+"Month"](),g=e[f+"FullYear"](),y=e[f+"Hours"](),b=e[f+"Minutes"](),v=e[f+"Seconds"](),E=e[f+"Milliseconds"](),F=a?0:e.getTimezoneOffset(),w=s(e),C=m(e),N={d:d,dd:c(d),ddd:l.i18n.dayNames[p],dddd:l.i18n.dayNames[p+7],m:h+1,mm:c(h+1),mmm:l.i18n.monthNames[h],mmmm:l.i18n.monthNames[h+12],yy:String(g).slice(2),yyyy:g,h:y%12||12,hh:c(y%12||12),H:y,HH:c(y),M:b,MM:c(b),s:v,ss:c(v),l:c(E,3),L:c(Math.round(E/10)),t:y<12?l.i18n.timeNames[0]:l.i18n.timeNames[1],tt:y<12?l.i18n.timeNames[2]:l.i18n.timeNames[3],T:y<12?l.i18n.timeNames[4]:l.i18n.timeNames[5],TT:y<12?l.i18n.timeNames[6]:l.i18n.timeNames[7],Z:r?"GMT":a?"UTC":(String(e).match(o)||[""]).pop().replace(u,""),o:(F>0?"-":"+")+c(100*Math.floor(Math.abs(F)/60)+Math.abs(F)%60,4),S:["th","st","nd","rd"][d%10>3?0:(d%100-d%10!=10)*d%10],W:w,N:C};return t.replace(i,(function(e){return e in N?N[e]:e.slice(1,e.length-1)}))});function c(e,t){for(e=String(e),t=t||2;e.length1?arguments[1]:void 0)}}),a(80)("includes")},296:function(e,t,a){"use strict";var r=a(12),n=a(321);r(r.P+r.F*a(322)("includes"),"String",{includes:function(e){return!!~n(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},301:function(e,t,a){var r=a(28),n=a(54),i=a(25),o=a(27),u=a(302);e.exports=function(e,t){var a=1==e,l=2==e,c=3==e,s=4==e,m=6==e,D=5==e||m,f=t||u;return function(t,u,d){for(var p,h,g=i(t),y=n(g),b=r(u,d,3),v=o(y.length),E=0,F=a?f(t,v):l?f(t,0):void 0;v>E;E++)if((D||E in y)&&(h=b(p=y[E],E,g),e))if(a)F[E]=h;else if(h)switch(e){case 3:return!0;case 5:return p;case 6:return E;case 2:F.push(p)}else if(s)return!1;return m?-1:c||s?s:F}}},302:function(e,t,a){var r=a(303);e.exports=function(e,t){return new(r(e))(t)}},303:function(e,t,a){var r=a(14),n=a(323),i=a(2)("species");e.exports=function(e){var t;return n(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!n(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},325:function(e,t,a){"use strict";var r=a(12),n=a(30),i=a(25),o=a(13),u=[].sort,l=[1,2,3];r(r.P+r.F*(o((function(){l.sort(void 0)}))||!o((function(){l.sort(null)}))||!a(326)(u)),"Array",{sort:function(e){return void 0===e?u.call(i(this)):u.call(i(this),n(e))}})},326:function(e,t,a){"use strict";var r=a(13);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},327:function(e,t,a){e.exports=function(){var e=[],t=[],a={},r={},n={};function i(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function o(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function u(e,t){return e.replace(/\$(\d{1,2})/g,(function(e,a){return t[a]||""}))}function l(e,t){return e.replace(t[0],(function(a,r){var n=u(t[1],arguments);return o(""===a?e[r-1]:a,n)}))}function c(e,t,r){if(!e.length||a.hasOwnProperty(e))return t;for(var n=r.length;n--;){var i=r[n];if(i[0].test(t))return l(t,i)}return t}function s(e,t,a){return function(r){var n=r.toLowerCase();return t.hasOwnProperty(n)?o(r,n):e.hasOwnProperty(n)?o(r,e[n]):c(n,r,a)}}function m(e,t,a,r){return function(r){var n=r.toLowerCase();return!!t.hasOwnProperty(n)||!e.hasOwnProperty(n)&&c(n,n,a)===n}}function D(e,t,a){return(a?t+" ":"")+(1===t?D.singular(e):D.plural(e))}return D.plural=s(n,r,e),D.isPlural=m(n,r,e),D.singular=s(r,n,t),D.isSingular=m(r,n,t),D.addPluralRule=function(t,a){e.push([i(t),a])},D.addSingularRule=function(e,a){t.push([i(e),a])},D.addUncountableRule=function(e){"string"!=typeof e?(D.addPluralRule(e,"$0"),D.addSingularRule(e,"$0")):a[e.toLowerCase()]=!0},D.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),n[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return D.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return D.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return D.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\xe9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(D.addUncountableRule),D}()},333:function(e,t,a){"use strict";var r=a(0),n=a.n(r),i=["second","minute","hour","day","week","month","year"],o=["\u79d2","\u5206\u949f","\u5c0f\u65f6","\u5929","\u5468","\u4e2a\u6708","\u5e74"],u={},l=function(e,t){u[e]=t},c=function(e){return u[e]||u.en_US},s=[60,60,24,7,365/7/12,12];function m(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function D(e,t){for(var a=e<0?1:0,r=e=Math.abs(e),n=0;e>=s[n]&&n(0===(n*=2)?9:1)&&(n+=1),t(e,n,r)[a].replace("%s",e.toString())}function f(e,t){return(+(t?m(t):new Date)-+m(e))/1e3}function d(e){return parseInt(e.getAttribute("timeago-id"))}var p={},h=function(e){clearTimeout(e),delete p[e]};function g(e,t,a,r){h(d(e));var n=r.relativeDate,i=r.minInterval,o=f(t,n);e.innerText=D(o,a);var u=setTimeout((function(){g(e,t,a,r)}),Math.min(1e3*Math.max(function(e){for(var t=1,a=0,r=Math.abs(e);e>=s[a]&&a1&&(a+="s"),[e+" "+a+" ago","in "+e+" "+a]})),l("zh_CN",(function(e,t){if(0===t)return["\u521a\u521a","\u7247\u523b\u540e"];var a=o[~~(t/2)];return[e+" "+a+"\u524d",e+" "+a+"\u540e"]}));var b,v=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),E=function(){return(E=Object.assign||function(e){for(var t,a=1,r=arguments.length;a1;){var t=e.pop(),a=t.obj[t.prop];if(n(a)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122?n+=r.charAt(o):u<128?n+=i[u]:u<2048?n+=i[192|u>>6]+i[128|63&u]:u<55296||u>=57344?n+=i[224|u>>12]+i[128|u>>6&63]+i[128|63&u]:(o+=1,u=65536+((1023&u)<<10|1023&r.charCodeAt(o)),n+=i[240|u>>18]+i[128|u>>12&63]+i[128|u>>6&63]+i[128|63&u])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(n(e)){for(var a=[],r=0;r0&&i.a.createElement("div",null,i.a.createElement(c.a,{colorProfile:"blog",tags:F}))))},g=a(279),y=a.n(g),b=a(327),v=a.n(b),E=/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i,F=/[^\s:\u2013\u2014-]+|./g,w=/\s/,C=/.(?=[A-Z]|\..)/,N=/[A-Za-z0-9\u00C0-\u00FF]/;function k(e){for(var t,a="";null!==(t=F.exec(e));){var r=t[0],n=t.index;C.test(r)||E.test(r)&&0!==n&&n+r.length!==e.length||":"===e.charAt(n+r.length)&&!w.test(e.charAt(n+r.length+1))?a+=r:a+=r.replace(N,(function(e){return e.toUpperCase()}))}return a}Object(o.a)("h2");var O=Object(o.a)("h3");function j(e){var t=e.groupBy,a=e.group,r=new y.a;switch(t){case"release":return i.a.createElement("li",{className:"header sticky"},i.a.createElement("h3",null,i.a.createElement(l.a,{to:"/releases/"+a+"/"},k(a))));case"type":var n=null,o=v()(k(a)),u=null;switch(a){case"breaking change":n="alert-triangle",u="danger";break;case"enhancement":n="arrow-up-circle",u="pink";break;case"new feature":n="gift",u="primary";break;case"performance":n="zap",o="Performance Improvements",u="warning"}return i.a.createElement("li",{className:"header sticky"},i.a.createElement(O,{id:r.slug(a+"-highlights"),className:"text--"+u},n&&i.a.createElement("i",{className:"feather icon-"+n})," ",o));default:throw Error("unknown group: "+t)}}t.a=function(e){var t=e.author,a=(e.clean,e.colorize),n=e.groupBy,o=e.items,u=e.tags,l=e.timeline,c=n||"release",s=function(e){return e.map((function(e){if(e.content){var t=e.content,a=t.frontMatter,r=t.metadata,n=a.author_github,i=a.pr_numbers,o=a.release,u=a.title,l=r.date,c=r.description,s=r.permalink,m=r.tags,D={};return D.authorGithub=n,D.dateString=l,D.description=c,D.permalink=s,D.prNumbers=i,D.release=o,D.tags=m,D.title=u,D}return e}))}(o),m=_.groupBy(s,c),f=!1!==l?Object.keys(m):Object.keys(m).sort();return i.a.createElement("ul",{className:D()("connected-list","connected-list--clean")},f.map((function(e,n){var o=m[e];return i.a.createElement(i.a.Fragment,null,i.a.createElement(j,{groupBy:c,group:e}),i.a.createElement("ul",{className:D()("connected-list",{"connected-list--timeline":!1!==l})},o.map((function(e,n){return i.a.createElement("li",{key:n},i.a.createElement(h,Object(r.a)({},e,{colorize:a,hideAuthor:0==t,hideTags:0==u})))}))))})))}},353:function(e,t,a){"use strict";var r=String.prototype.replace,n=/%20/g,i=a(343),o={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:o.RFC3986,formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return String(e)}}},o)},383:function(e,t,a){"use strict";var r=a(384),n=a(385),i=a(353);e.exports={formats:i,parse:n,stringify:r}},384:function(e,t,a){"use strict";var r=a(343),n=a(353),i=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,l=Array.prototype.push,c=function(e,t){l.apply(e,u(t)?t:[t])},s=Date.prototype.toISOString,m=n.default,D={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:m,formatter:n.formatters[m],indices:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(t,a,n,i,o,l,s,m,f,d,p,h,g){var y,b=t;if("function"==typeof s?b=s(a,b):b instanceof Date?b=d(b):"comma"===n&&u(b)&&(b=r.maybeMap(b,(function(e){return e instanceof Date?d(e):e})).join(",")),null===b){if(i)return l&&!h?l(a,D.encoder,g,"key"):a;b=""}if("string"==typeof(y=b)||"number"==typeof y||"boolean"==typeof y||"symbol"==typeof y||"bigint"==typeof y||r.isBuffer(b))return l?[p(h?a:l(a,D.encoder,g,"key"))+"="+p(l(b,D.encoder,g,"value"))]:[p(a)+"="+p(String(b))];var v,E=[];if(void 0===b)return E;if(u(s))v=s;else{var F=Object.keys(b);v=m?F.sort(m):F}for(var w=0;w0?y+g:""}},385:function(e,t,a){"use strict";var r=a(343),n=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},u=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,a,r){if(e){var i=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,u=a.depth>0&&/(\[[^[\]]*])/.exec(i),c=u?i.slice(0,u.index):i,s=[];if(c){if(!a.plainObjects&&n.call(Object.prototype,c)&&!a.allowPrototypes)return;s.push(c)}for(var m=0;a.depth>0&&null!==(u=o.exec(i))&&m=0;--i){var o,u=e[i];if("[]"===u&&a.parseArrays)o=[].concat(n);else{o=a.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);a.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(o=[])[s]=n:o[c]=n:o={0:n}}n=o}return n}(s,t,a,r)}};e.exports=function(e,t){var a=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null==e)return a.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var a,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,m=t.parameterLimit===1/0?void 0:t.parameterLimit,D=s.split(t.delimiter,m),f=-1,d=t.charset;if(t.charsetSentinel)for(a=0;a-1&&(h=i(h)?[h]:h),n.call(c,p)?c[p]=r.combine(c[p],h):c[p]=h}return c}(e,a):e,m=a.plainObjects?Object.create(null):{},D=Object.keys(s),f=0;f0)&&!(r=a.next()).done;)i.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},l=this&&this.__spread||function(){for(var e=[],t=0;t299)throw new d.InlineSVGError("Not Found");if(!["image/svg+xml","text/plain"].some((function(e){return n.indexOf(e)>=0})))throw new d.InlineSVGError("Content type isn't valid: "+n);return e.text()})).then((function(e){if(r.handleLoad(e),n){var a=h[o];a&&(a.content=e,a.status=t.STATUS.LOADED,a.queue=a.queue.filter((function(t){return t(e),!1})))}})).catch((function(e){n&&delete h[o],r.handleError(e)}))}catch(a){r.handleError(new d.InlineSVGError(a.message))}},r.state={content:"",element:null,hasCache:!!n.cacheRequests&&!!h[n.src],status:t.STATUS.PENDING},r.hash=n.uniqueHash||d.randomString(8),r}return o(n,e),n.prototype.componentDidMount=function(){if(this._isMounted=!0,d.canUseDOM()){var e=this.state.status,n=this.props.src;try{if(e===t.STATUS.PENDING){if(!d.isSupportedEnvironment())throw new d.InlineSVGError("Browser does not support SVG");if(!n)throw new d.InlineSVGError("Missing src");this.load()}}catch(r){this.handleError(r)}}else this.handleError(new d.InlineSVGError("No DOM"))},n.prototype.componentDidUpdate=function(e,n){if(d.canUseDOM()){var r=this.state,o=r.hasCache,a=r.status,i=this.props,c=i.onLoad,l=i.src;if(n.status!==t.STATUS.READY&&a===t.STATUS.READY&&c&&c(l,o),e.src!==l){if(!l)return void this.handleError(new d.InlineSVGError("Missing src"));this.load()}}},n.prototype.componentWillUnmount=function(){this._isMounted=!1},n.prototype.processSVG=function(){var e=this.state.content,t=this.props.preProcessor;return t?t(e):e},n.prototype.updateSVGAttributes=function(e){var t=this,n=this.props,r=n.baseURL,o=void 0===r?"":r,a=n.uniquifyIDs,i=["id","href","xlink:href","xlink:role","xlink:arcrole"],c=["href","xlink:href"];return a?(l(e.children).map((function(e){if(e.attributes&&e.attributes.length){var n=Object.values(e.attributes);n.forEach((function(e){var n=e.value.match(/url\((.*?)\)/);n&&n[1]&&(e.value=e.value.replace(n[0],"url("+o+n[1]+"__"+t.hash+")"))})),i.forEach((function(e){var r,o,a=n.find((function(t){return t.name===e}));!a||(r=e,o=a.value,c.indexOf(r)>=0&&o&&o.indexOf("#")<0)||(a.value=a.value+"__"+t.hash)}))}return e.children.length&&(e=t.updateSVGAttributes(e)),e})),e):e},n.prototype.getNode=function(){var e=this.props,t=e.description,n=e.title;try{var r=this.processSVG(),o=u.default(r,{nodeOnly:!0});if(!(o&&o instanceof SVGSVGElement))throw new d.InlineSVGError("Could not convert the src to a DOM Node");var a=this.updateSVGAttributes(o);if(t){var i=a.querySelector("desc");i&&i.parentNode&&i.parentNode.removeChild(i);var c=document.createElement("desc");c.innerHTML=t,a.prepend(c)}if(n){var l=a.querySelector("title");l&&l.parentNode&&l.parentNode.removeChild(l);var s=document.createElement("title");s.innerHTML=n,a.prepend(s)}return a}catch(h){this.handleError(h)}},n.prototype.getElement=function(){try{var e=this.getNode(),n=u.default(e);if(!n||!s.isValidElement(n))throw new d.InlineSVGError("Could not convert the src to a React element");this.setState({element:n,status:t.STATUS.READY})}catch(r){this.handleError(new d.InlineSVGError(r.message))}},n.prototype.load=function(){var e=this;this._isMounted&&this.setState({content:"",element:null,status:t.STATUS.LOADING},(function(){var n=e.props,r=n.cacheRequests,o=n.src,a=r&&h[o];if(a)a.status===t.STATUS.LOADING?a.queue.push(e.handleLoad):a.status===t.STATUS.LOADED&&e.handleLoad(a.content);else{var i,c=o.match(/data:image\/svg[^,]*?(;base64)?,(.*)/);c?i=c[1]?atob(c[2]):decodeURIComponent(c[2]):o.indexOf("=0&&(i=o),i?e.handleLoad(i):e.request()}}))},n.prototype.render=function(){if(!d.canUseDOM())return null;var e=this.state,n=e.element,r=e.status,o=this.props,c=(o.baseURL,o.cacheRequests,o.children),l=void 0===c?null:c,u=(o.description,o.innerRef),h=o.loader,f=void 0===h?null:h,p=(o.onError,o.onLoad,o.preProcessor,o.src,o.title,o.uniqueHash,o.uniquifyIDs,i(o,["baseURL","cacheRequests","children","description","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs"]));return n?s.cloneElement(n,a({ref:u},p)):[t.STATUS.UNSUPPORTED,t.STATUS.FAILED].indexOf(r)>-1?l:f},n.defaultProps={cacheRequests:!0,uniquifyIDs:!1},n}(s.PureComponent);t.default=f},276:function(e,t,n){"use strict";var r=n(0),o=n(351);t.a=function(){return Object(r.useContext)(o.a)}},280:function(e,t,n){"use strict";var r=n(0);t.a=function(e){void 0===e&&(e=!0),Object(r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e])}},281:function(e,t,n){"use strict";var r=n(267),o=n(276),a=n(269),i=n(350);t.a=function(){var e=Object(r.a)().siteConfig,t=(e=void 0===e?{}:e).baseUrl,n=e.themeConfig.navbar,c=(n=void 0===n?{}:n).logo,l=void 0===c?{}:c,s=Object(o.a)().isDarkTheme,u=l.href||t,d={};l.target?d={target:l.target}:Object(i.a)(u)||(d={rel:"noopener noreferrer",target:"_blank"});var h=l.srcDark&&s?l.srcDark:l.src;return{logoLink:u,logoLinkProps:d,logoImageUrl:Object(a.a)(h),logoAlt:l.alt}}},282:function(e,t,n){"use strict";var r=n(12),o=n(27),a=n(321),i="".endsWith;r(r.P+r.F*n(322)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(t.length),c=void 0===n?r:Math.min(o(n),r),l=String(e);return i?i.call(t,l,c):t.slice(c-l.length,c)===l}})},283:function(e,t,n){"use strict";var r=n(0),o=n.n(r),a=n(267),i=n(144),c=n.n(i);t.a=function(){var e=Object(a.a)().siteConfig,t=(e=void 0===e?{}:e).themeConfig.announcementBar,n=void 0===t?{}:t,i=n.id,l=n.content,s=n.backgroundColor,u=n.textColor,d=Object(r.useState)(!0),h=d[0],f=d[1];return Object(r.useEffect)((function(){var e=localStorage.getItem("docusaurus.announcement.id"),t=i!==e;localStorage.setItem("docusaurus.announcement.id",i),t&&localStorage.setItem("docusaurus.announcement.dismiss",!1),(t||"false"===localStorage.getItem("docusaurus.announcement.dismiss"))&&f(!1)}),[]),!l||h?null:o.a.createElement("div",{className:c.a.announcementBar,style:{backgroundColor:s,color:u},role:"banner"},o.a.createElement("div",{className:c.a.announcementBarContent,dangerouslySetInnerHTML:{__html:l}}),o.a.createElement("button",{type:"button",className:c.a.announcementBarClose,onClick:function(){localStorage.setItem("docusaurus.announcement.dismiss",!0),f(!0)},"aria-label":"Close"},o.a.createElement("span",{"aria-hidden":"true"},"\xd7")))}},284:function(e,t,n){"use strict";var r=n(0);r.PureComponent},285:function(e,t,n){"use strict";n(64),n(26),n(20),n(19),n(89);var r=n(0),o=n.n(r),a=n(266),i=n.n(a),c=n(267),l=n(324);n(145);t.a=function(e){var t=Object(r.useState)(!1),a=t[0],s=t[1],u=Object(r.useRef)(null),d=Object(c.a)().siteConfig,h=(void 0===d?{}:d).themeConfig.algolia,f=Object(l.c)();var p=function(e){void 0===e&&(e=!0),a||Promise.all([n.e(118).then(n.t.bind(null,399,7)),n.e(84).then(n.t.bind(null,444,7))]).then((function(t){var n=t[0].default;s(!0),window.docsearch=n,function(e){window.docsearch({appId:h.appId,apiKey:h.apiKey,indexName:h.indexName,inputSelector:"#search_input_react",algoliaOptions:h.algoliaOptions,handleSelected:function(e,t,n){var r=document.createElement("a");r.href=n.url;var o="#__docusaurus"===r.hash?""+r.pathname:""+r.pathname+r.hash;f.push(o)}}),e&&u.current.focus()}(e)}))},g=Object(r.useCallback)((function(){p(),a&&u.current.focus(),e.handleSearchBarToggle(!e.isSearchBarExpanded)}),[e.isSearchBarExpanded]),v=Object(r.useCallback)((function(){e.handleSearchBarToggle(!e.isSearchBarExpanded)}),[e.isSearchBarExpanded]),m=Object(r.useCallback)((function(e){var t="mouseover"!==e.type;p(t)}));return o.a.createElement("div",{className:"navbar__search",key:"search-box"},o.a.createElement("span",{"aria-label":"expand searchbar",role:"button",className:i()("search-icon",{"search-icon-hidden":e.isSearchBarExpanded}),onClick:g,onKeyDown:g,tabIndex:0}),o.a.createElement("input",{id:"search_input_react",type:"search",placeholder:"Search","aria-label":"Search",className:i()("navbar__search-input",{"search-bar-expanded":e.isSearchBarExpanded},{"search-bar":!e.isSearchBarExpanded}),onMouseOver:m,onFocus:m,onBlur:v,ref:u}))}},286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;tthis.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=tn?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["className","icons"])),a=(0,c.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},n);return i.default.createElement("div",{className:a,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},i.default.createElement("div",{className:"react-toggle-track"},i.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),i.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),i.default.createElement("div",{className:"react-toggle-thumb"}),i.default.createElement("input",r({},o,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(a.PureComponent);t.default=f,f.displayName="Toggle",f.defaultProps={icons:{checked:i.default.createElement(s.default,null),unchecked:i.default.createElement(u.default,null)}},f.propTypes={checked:l.default.bool,disabled:l.default.bool,defaultChecked:l.default.bool,onChange:l.default.func,onFocus:l.default.func,onBlur:l.default.func,className:l.default.string,name:l.default.string,value:l.default.string,id:l.default.string,"aria-labelledby":l.default.string,"aria-label":l.default.string,icons:l.default.oneOfType([l.default.bool,l.default.shape({checked:l.default.node,unchecked:l.default.node})])}},289:function(e,t,n){"use strict";var r=n(0),o=n(324);var a=function(e){var t=Object(r.useState)(e),n=t[0],o=t[1];return Object(r.useEffect)((function(){var e=function(){return o(window.location.hash)};return window.addEventListener("hashchange",e),function(){return window.removeEventListener("hashchange",e)}}),[]),[n,o]},i=n(35),c=n.n(i),l=function(){return{scrollX:c.a.canUseDOM?window.pageXOffset:0,scrollY:c.a.canUseDOM?window.pageYOffset:0}},s=function(e,t){void 0===t&&(t=[]);var n=Object(r.useState)(l()),o=n[0],a=n[1],i=function(){var t=l();a(t),e&&e(t)};return Object(r.useEffect)((function(){return window.addEventListener("scroll",i),function(){return window.removeEventListener("scroll",i,{passive:!0})}}),t),o};t.a=function(e){var t=Object(r.useState)(!0),n=t[0],i=t[1],c=Object(r.useState)(!1),l=c[0],u=c[1],d=Object(r.useState)(0),h=d[0],f=d[1],p=Object(r.useState)(0),g=p[0],v=p[1],m=Object(r.useCallback)((function(e){null!==e&&v(e.getBoundingClientRect().height)}),[]),b=Object(o.d)(),y=a(b.hash),k=y[0],w=y[1];return s((function(t){var n=t.scrollY;if(e&&(0===n&&i(!0),!(n=h?i(!1):n+o'}}},heart:{heights:{16:{width:16,path:''}}},eye:{heights:{16:{width:16,path:''}}},star:{heights:{16:{width:16,path:''}}},"repo-forked":{heights:{16:{width:16,path:''}}},"repo-template":{heights:{16:{width:16,path:''}}},"issue-opened":{heights:{16:{width:16,path:''}}},download:{heights:{16:{width:16,path:''}}}},k=function(e,t){e=u(e).replace(/^octicon-/,""),s(y,e)||(e="mark-github");var n=t>=24&&24 in y[e].heights?24:16,r=y[e].heights[n];return'"},w={},x=function(e,t){var n=w[e]||(w[e]=[]);if(!(n.push(t)>1)){var r=function(e){var t;return function(){t||(t=1,e.apply(this,arguments))}}((function(){for(delete w[e];t=n.shift();)t.apply(null,arguments)}));if(h){var o=new i;p(o,"abort",r),p(o,"error",r),p(o,"load",(function(){var e;try{e=JSON.parse(o.responseText)}catch(t){return void r(t)}r(200!==o.status,e)})),o.open("GET",e),o.send()}else{var a=this||window;a._=function(e){a._=null,r(200!==e.meta.status,e.data)};var l=c(a.document)("script",{async:!0,src:e+(-1!==e.indexOf("?")?"&":"?")+"callback=_"}),s=function(){a._&&a._({meta:{}})};p(l,"load",s),p(l,"error",s),l.readyState&&function(e,t,n){var r=function(o){if(t.test(e.readyState))return g(e,"readystatechange",r),n(o)};p(e,"readystatechange",r)}(l,/de|m/,s),a.document.getElementsByTagName("head")[0].appendChild(l)}}},S=function(e,t,n){var r=c(e.ownerDocument),o=e.appendChild(r("style",{type:"text/css"})),a="body{margin:0}a{text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:0;line-height:0;white-space:nowrap}.btn,.social-count{position:relative;display:inline-block;height:14px;padding:2px 5px;font-size:11px;font-weight:600;line-height:14px;vertical-align:bottom;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-repeat:repeat-x;background-position:-1px -1px;background-size:110% 110%;border:1px solid}.btn{border-radius:.25em}.btn:not(:last-child){border-radius:.25em 0 0 .25em}.social-count{border-left:0;border-radius:0 .25em .25em 0}.widget-lg .btn,.widget-lg .social-count{height:20px;padding:3px 10px;font-size:12px;line-height:20px}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor}"+b(t["data-color-scheme"]);o.styleSheet?o.styleSheet.cssText=a:o.appendChild(e.ownerDocument.createTextNode(a));var i="large"===u(t["data-size"]),l=r("a",{className:"btn",href:t.href,rel:"noopener",target:"_blank",title:t.title||void 0,"aria-label":t["aria-label"]||void 0,innerHTML:k(t["data-icon"],i?16:14)},[" ",r("span",{},[t["data-text"]||""])]),s=e.appendChild(r("div",{className:"widget"+(i?" widget-lg":"")},[l])),h=l.hostname.replace(/\.$/,"");if(h.length1?o.ceil(o.round(e*E)/E*2)/2:o.ceil(e))||0},C=function(e,t){e.style.width=t[0]+"px",e.style.height=t[1]+"px"},T=function(e,t){if(null!=e&&null!=t)if(e.getAttribute&&(e=function(e){for(var t={href:e.href,title:e.title,"aria-label":e.getAttribute("aria-label")},n=["icon","color-scheme","text","size","show-count"],r=0,o=n.length;r0){var n=t[0];return{x:n.clientX,y:n.clientY}}var r=e.pageX;if(void 0!==r)return{x:r,y:e.pageY}}return{x:0,y:0}}},445:function(e,t,n){"use strict";n.r(t),n.d(t,"convertFromNode",(function(){return d})),n.d(t,"convertFromString",(function(){return h})),n.d(t,"default",(function(){return f}));var r=n(0),o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},a=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],i={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"},c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=a.next()).done;)i.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},s=function(){for(var e=[],t=0;t *":o,i=t.type,c=void 0===i?"text/html":i;try{var l=(new DOMParser).parseFromString(e,c).querySelector(a);if(!(l instanceof Node))throw new Error("Error parsing input");return r?l:d(l,t)}catch(s){0}return null}function f(e,t){return void 0===t&&(t={}),"string"==typeof e?h(e,t):e instanceof Node?d(e,t):null}}}]); \ No newline at end of file +/*! For license information please see 2.e30239ec.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{270:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=a.next()).done;)i.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},l=this&&this.__spread||function(){for(var e=[],t=0;t299)throw new d.InlineSVGError("Not Found");if(!["image/svg+xml","text/plain"].some((function(e){return n.indexOf(e)>=0})))throw new d.InlineSVGError("Content type isn't valid: "+n);return e.text()})).then((function(e){if(r.handleLoad(e),n){var a=h[o];a&&(a.content=e,a.status=t.STATUS.LOADED,a.queue=a.queue.filter((function(t){return t(e),!1})))}})).catch((function(e){n&&delete h[o],r.handleError(e)}))}catch(a){r.handleError(new d.InlineSVGError(a.message))}},r.state={content:"",element:null,hasCache:!!n.cacheRequests&&!!h[n.src],status:t.STATUS.PENDING},r.hash=n.uniqueHash||d.randomString(8),r}return o(n,e),n.prototype.componentDidMount=function(){if(this._isMounted=!0,d.canUseDOM()){var e=this.state.status,n=this.props.src;try{if(e===t.STATUS.PENDING){if(!d.isSupportedEnvironment())throw new d.InlineSVGError("Browser does not support SVG");if(!n)throw new d.InlineSVGError("Missing src");this.load()}}catch(r){this.handleError(r)}}else this.handleError(new d.InlineSVGError("No DOM"))},n.prototype.componentDidUpdate=function(e,n){if(d.canUseDOM()){var r=this.state,o=r.hasCache,a=r.status,i=this.props,c=i.onLoad,l=i.src;if(n.status!==t.STATUS.READY&&a===t.STATUS.READY&&c&&c(l,o),e.src!==l){if(!l)return void this.handleError(new d.InlineSVGError("Missing src"));this.load()}}},n.prototype.componentWillUnmount=function(){this._isMounted=!1},n.prototype.processSVG=function(){var e=this.state.content,t=this.props.preProcessor;return t?t(e):e},n.prototype.updateSVGAttributes=function(e){var t=this,n=this.props,r=n.baseURL,o=void 0===r?"":r,a=n.uniquifyIDs,i=["id","href","xlink:href","xlink:role","xlink:arcrole"],c=["href","xlink:href"];return a?(l(e.children).map((function(e){if(e.attributes&&e.attributes.length){var n=Object.values(e.attributes);n.forEach((function(e){var n=e.value.match(/url\((.*?)\)/);n&&n[1]&&(e.value=e.value.replace(n[0],"url("+o+n[1]+"__"+t.hash+")"))})),i.forEach((function(e){var r,o,a=n.find((function(t){return t.name===e}));!a||(r=e,o=a.value,c.indexOf(r)>=0&&o&&o.indexOf("#")<0)||(a.value=a.value+"__"+t.hash)}))}return e.children.length&&(e=t.updateSVGAttributes(e)),e})),e):e},n.prototype.getNode=function(){var e=this.props,t=e.description,n=e.title;try{var r=this.processSVG(),o=u.default(r,{nodeOnly:!0});if(!(o&&o instanceof SVGSVGElement))throw new d.InlineSVGError("Could not convert the src to a DOM Node");var a=this.updateSVGAttributes(o);if(t){var i=a.querySelector("desc");i&&i.parentNode&&i.parentNode.removeChild(i);var c=document.createElement("desc");c.innerHTML=t,a.prepend(c)}if(n){var l=a.querySelector("title");l&&l.parentNode&&l.parentNode.removeChild(l);var s=document.createElement("title");s.innerHTML=n,a.prepend(s)}return a}catch(h){this.handleError(h)}},n.prototype.getElement=function(){try{var e=this.getNode(),n=u.default(e);if(!n||!s.isValidElement(n))throw new d.InlineSVGError("Could not convert the src to a React element");this.setState({element:n,status:t.STATUS.READY})}catch(r){this.handleError(new d.InlineSVGError(r.message))}},n.prototype.load=function(){var e=this;this._isMounted&&this.setState({content:"",element:null,status:t.STATUS.LOADING},(function(){var n=e.props,r=n.cacheRequests,o=n.src,a=r&&h[o];if(a)a.status===t.STATUS.LOADING?a.queue.push(e.handleLoad):a.status===t.STATUS.LOADED&&e.handleLoad(a.content);else{var i,c=o.match(/data:image\/svg[^,]*?(;base64)?,(.*)/);c?i=c[1]?atob(c[2]):decodeURIComponent(c[2]):o.indexOf("=0&&(i=o),i?e.handleLoad(i):e.request()}}))},n.prototype.render=function(){if(!d.canUseDOM())return null;var e=this.state,n=e.element,r=e.status,o=this.props,c=(o.baseURL,o.cacheRequests,o.children),l=void 0===c?null:c,u=(o.description,o.innerRef),h=o.loader,f=void 0===h?null:h,p=(o.onError,o.onLoad,o.preProcessor,o.src,o.title,o.uniqueHash,o.uniquifyIDs,i(o,["baseURL","cacheRequests","children","description","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs"]));return n?s.cloneElement(n,a({ref:u},p)):[t.STATUS.UNSUPPORTED,t.STATUS.FAILED].indexOf(r)>-1?l:f},n.defaultProps={cacheRequests:!0,uniquifyIDs:!1},n}(s.PureComponent);t.default=f},276:function(e,t,n){"use strict";var r=n(0),o=n(351);t.a=function(){return Object(r.useContext)(o.a)}},280:function(e,t,n){"use strict";var r=n(0);t.a=function(e){void 0===e&&(e=!0),Object(r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e])}},281:function(e,t,n){"use strict";var r=n(267),o=n(276),a=n(269),i=n(350);t.a=function(){var e=Object(r.a)().siteConfig,t=(e=void 0===e?{}:e).baseUrl,n=e.themeConfig.navbar,c=(n=void 0===n?{}:n).logo,l=void 0===c?{}:c,s=Object(o.a)().isDarkTheme,u=l.href||t,d={};l.target?d={target:l.target}:Object(i.a)(u)||(d={rel:"noopener noreferrer",target:"_blank"});var h=l.srcDark&&s?l.srcDark:l.src;return{logoLink:u,logoLinkProps:d,logoImageUrl:Object(a.a)(h),logoAlt:l.alt}}},282:function(e,t,n){"use strict";var r=n(12),o=n(27),a=n(321),i="".endsWith;r(r.P+r.F*n(322)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(t.length),c=void 0===n?r:Math.min(o(n),r),l=String(e);return i?i.call(t,l,c):t.slice(c-l.length,c)===l}})},283:function(e,t,n){"use strict";var r=n(0),o=n.n(r),a=n(267),i=n(144),c=n.n(i);t.a=function(){var e=Object(a.a)().siteConfig,t=(e=void 0===e?{}:e).themeConfig.announcementBar,n=void 0===t?{}:t,i=n.id,l=n.content,s=n.backgroundColor,u=n.textColor,d=Object(r.useState)(!0),h=d[0],f=d[1];return Object(r.useEffect)((function(){var e=localStorage.getItem("docusaurus.announcement.id"),t=i!==e;localStorage.setItem("docusaurus.announcement.id",i),t&&localStorage.setItem("docusaurus.announcement.dismiss",!1),(t||"false"===localStorage.getItem("docusaurus.announcement.dismiss"))&&f(!1)}),[]),!l||h?null:o.a.createElement("div",{className:c.a.announcementBar,style:{backgroundColor:s,color:u},role:"banner"},o.a.createElement("div",{className:c.a.announcementBarContent,dangerouslySetInnerHTML:{__html:l}}),o.a.createElement("button",{type:"button",className:c.a.announcementBarClose,onClick:function(){localStorage.setItem("docusaurus.announcement.dismiss",!0),f(!0)},"aria-label":"Close"},o.a.createElement("span",{"aria-hidden":"true"},"\xd7")))}},284:function(e,t,n){"use strict";var r=n(0);r.PureComponent},285:function(e,t,n){"use strict";n(64),n(26),n(20),n(19),n(89);var r=n(0),o=n.n(r),a=n(266),i=n.n(a),c=n(267),l=n(324);n(145);t.a=function(e){var t=Object(r.useState)(!1),a=t[0],s=t[1],u=Object(r.useRef)(null),d=Object(c.a)().siteConfig,h=(void 0===d?{}:d).themeConfig.algolia,f=Object(l.c)();var p=function(e){void 0===e&&(e=!0),a||Promise.all([n.e(118).then(n.t.bind(null,399,7)),n.e(81).then(n.t.bind(null,444,7))]).then((function(t){var n=t[0].default;s(!0),window.docsearch=n,function(e){window.docsearch({appId:h.appId,apiKey:h.apiKey,indexName:h.indexName,inputSelector:"#search_input_react",algoliaOptions:h.algoliaOptions,handleSelected:function(e,t,n){var r=document.createElement("a");r.href=n.url;var o="#__docusaurus"===r.hash?""+r.pathname:""+r.pathname+r.hash;f.push(o)}}),e&&u.current.focus()}(e)}))},g=Object(r.useCallback)((function(){p(),a&&u.current.focus(),e.handleSearchBarToggle(!e.isSearchBarExpanded)}),[e.isSearchBarExpanded]),v=Object(r.useCallback)((function(){e.handleSearchBarToggle(!e.isSearchBarExpanded)}),[e.isSearchBarExpanded]),m=Object(r.useCallback)((function(e){var t="mouseover"!==e.type;p(t)}));return o.a.createElement("div",{className:"navbar__search",key:"search-box"},o.a.createElement("span",{"aria-label":"expand searchbar",role:"button",className:i()("search-icon",{"search-icon-hidden":e.isSearchBarExpanded}),onClick:g,onKeyDown:g,tabIndex:0}),o.a.createElement("input",{id:"search_input_react",type:"search",placeholder:"Search","aria-label":"Search",className:i()("navbar__search-input",{"search-bar-expanded":e.isSearchBarExpanded},{"search-bar":!e.isSearchBarExpanded}),onMouseOver:m,onFocus:m,onBlur:v,ref:u}))}},286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;tthis.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=tn?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["className","icons"])),a=(0,c.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},n);return i.default.createElement("div",{className:a,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},i.default.createElement("div",{className:"react-toggle-track"},i.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),i.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),i.default.createElement("div",{className:"react-toggle-thumb"}),i.default.createElement("input",r({},o,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(a.PureComponent);t.default=f,f.displayName="Toggle",f.defaultProps={icons:{checked:i.default.createElement(s.default,null),unchecked:i.default.createElement(u.default,null)}},f.propTypes={checked:l.default.bool,disabled:l.default.bool,defaultChecked:l.default.bool,onChange:l.default.func,onFocus:l.default.func,onBlur:l.default.func,className:l.default.string,name:l.default.string,value:l.default.string,id:l.default.string,"aria-labelledby":l.default.string,"aria-label":l.default.string,icons:l.default.oneOfType([l.default.bool,l.default.shape({checked:l.default.node,unchecked:l.default.node})])}},289:function(e,t,n){"use strict";var r=n(0),o=n(324);var a=function(e){var t=Object(r.useState)(e),n=t[0],o=t[1];return Object(r.useEffect)((function(){var e=function(){return o(window.location.hash)};return window.addEventListener("hashchange",e),function(){return window.removeEventListener("hashchange",e)}}),[]),[n,o]},i=n(35),c=n.n(i),l=function(){return{scrollX:c.a.canUseDOM?window.pageXOffset:0,scrollY:c.a.canUseDOM?window.pageYOffset:0}},s=function(e,t){void 0===t&&(t=[]);var n=Object(r.useState)(l()),o=n[0],a=n[1],i=function(){var t=l();a(t),e&&e(t)};return Object(r.useEffect)((function(){return window.addEventListener("scroll",i),function(){return window.removeEventListener("scroll",i,{passive:!0})}}),t),o};t.a=function(e){var t=Object(r.useState)(!0),n=t[0],i=t[1],c=Object(r.useState)(!1),l=c[0],u=c[1],d=Object(r.useState)(0),h=d[0],f=d[1],p=Object(r.useState)(0),g=p[0],v=p[1],m=Object(r.useCallback)((function(e){null!==e&&v(e.getBoundingClientRect().height)}),[]),b=Object(o.d)(),y=a(b.hash),k=y[0],w=y[1];return s((function(t){var n=t.scrollY;if(e&&(0===n&&i(!0),!(n=h?i(!1):n+o'}}},heart:{heights:{16:{width:16,path:''}}},eye:{heights:{16:{width:16,path:''}}},star:{heights:{16:{width:16,path:''}}},"repo-forked":{heights:{16:{width:16,path:''}}},"repo-template":{heights:{16:{width:16,path:''}}},"issue-opened":{heights:{16:{width:16,path:''}}},download:{heights:{16:{width:16,path:''}}}},k=function(e,t){e=u(e).replace(/^octicon-/,""),s(y,e)||(e="mark-github");var n=t>=24&&24 in y[e].heights?24:16,r=y[e].heights[n];return'"},w={},x=function(e,t){var n=w[e]||(w[e]=[]);if(!(n.push(t)>1)){var r=function(e){var t;return function(){t||(t=1,e.apply(this,arguments))}}((function(){for(delete w[e];t=n.shift();)t.apply(null,arguments)}));if(h){var o=new i;p(o,"abort",r),p(o,"error",r),p(o,"load",(function(){var e;try{e=JSON.parse(o.responseText)}catch(t){return void r(t)}r(200!==o.status,e)})),o.open("GET",e),o.send()}else{var a=this||window;a._=function(e){a._=null,r(200!==e.meta.status,e.data)};var l=c(a.document)("script",{async:!0,src:e+(-1!==e.indexOf("?")?"&":"?")+"callback=_"}),s=function(){a._&&a._({meta:{}})};p(l,"load",s),p(l,"error",s),l.readyState&&function(e,t,n){var r=function(o){if(t.test(e.readyState))return g(e,"readystatechange",r),n(o)};p(e,"readystatechange",r)}(l,/de|m/,s),a.document.getElementsByTagName("head")[0].appendChild(l)}}},S=function(e,t,n){var r=c(e.ownerDocument),o=e.appendChild(r("style",{type:"text/css"})),a="body{margin:0}a{text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:0;line-height:0;white-space:nowrap}.btn,.social-count{position:relative;display:inline-block;height:14px;padding:2px 5px;font-size:11px;font-weight:600;line-height:14px;vertical-align:bottom;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-repeat:repeat-x;background-position:-1px -1px;background-size:110% 110%;border:1px solid}.btn{border-radius:.25em}.btn:not(:last-child){border-radius:.25em 0 0 .25em}.social-count{border-left:0;border-radius:0 .25em .25em 0}.widget-lg .btn,.widget-lg .social-count{height:20px;padding:3px 10px;font-size:12px;line-height:20px}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor}"+b(t["data-color-scheme"]);o.styleSheet?o.styleSheet.cssText=a:o.appendChild(e.ownerDocument.createTextNode(a));var i="large"===u(t["data-size"]),l=r("a",{className:"btn",href:t.href,rel:"noopener",target:"_blank",title:t.title||void 0,"aria-label":t["aria-label"]||void 0,innerHTML:k(t["data-icon"],i?16:14)},[" ",r("span",{},[t["data-text"]||""])]),s=e.appendChild(r("div",{className:"widget"+(i?" widget-lg":"")},[l])),h=l.hostname.replace(/\.$/,"");if(h.length1?o.ceil(o.round(e*E)/E*2)/2:o.ceil(e))||0},C=function(e,t){e.style.width=t[0]+"px",e.style.height=t[1]+"px"},T=function(e,t){if(null!=e&&null!=t)if(e.getAttribute&&(e=function(e){for(var t={href:e.href,title:e.title,"aria-label":e.getAttribute("aria-label")},n=["icon","color-scheme","text","size","show-count"],r=0,o=n.length;r0){var n=t[0];return{x:n.clientX,y:n.clientY}}var r=e.pageX;if(void 0!==r)return{x:r,y:e.pageY}}return{x:0,y:0}}},445:function(e,t,n){"use strict";n.r(t),n.d(t,"convertFromNode",(function(){return d})),n.d(t,"convertFromString",(function(){return h})),n.d(t,"default",(function(){return f}));var r=n(0),o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},a=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],i={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"},c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=a.next()).done;)i.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},s=function(){for(var e=[],t=0;t *":o,i=t.type,c=void 0===i?"text/html":i;try{var l=(new DOMParser).parseFromString(e,c).querySelector(a);if(!(l instanceof Node))throw new Error("Error parsing input");return r?l:d(l,t)}catch(s){0}return null}function f(e,t){return void 0===t&&(t={}),"string"==typeof e?h(e,t):e instanceof Node?d(e,t):null}}}]); \ No newline at end of file diff --git a/2.7ca37cf9.js.LICENSE.txt b/2.e30239ec.js.LICENSE.txt similarity index 100% rename from 2.7ca37cf9.js.LICENSE.txt rename to 2.e30239ec.js.LICENSE.txt diff --git a/20ac7829.24151c41.js b/20ac7829.c05d33e4.js similarity index 95% rename from 20ac7829.24151c41.js rename to 20ac7829.c05d33e4.js index 5b4ca571a..439e87e39 100644 --- a/20ac7829.24151c41.js +++ b/20ac7829.c05d33e4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{161:function(e){e.exports=JSON.parse('{"docsSidebars":{"docs":[{"type":"category","label":"About","items":[{"type":"category","label":"About","items":[{"type":"link","label":"Overview","href":"/docs/about/overview"},{"type":"link","label":"\u9884\u89c8","href":"/docs/about/overview-cn"}]}]},{"type":"category","label":"Quickstart","items":[{"type":"link","label":"Quickstart","href":"/docs/quickstart"}]},{"type":"category","label":"Tutorial","items":[{"type":"category","label":"Tutorial","items":[{"type":"link","label":"Best practices","href":"/docs/tutorial/best-practices"}]}]},{"type":"category","label":"Benchmark","items":[{"type":"link","label":"Benchmark","href":"/docs/benchmark"}]},{"type":"category","label":"v1.x","items":[{"type":"category","label":"v1.x","items":[{"type":"link","label":"Doc for gnet v1","href":"/docs/v1.x/doc-for-gnet-v1"},{"type":"link","label":"gnet v1 \u6587\u6863","href":"/docs/v1.x/doc-for-gnet-v1-cn"}]}]},{"type":"category","label":"FAQ","items":[{"type":"link","label":"FAQ","href":"/docs/faq"}]}]},"permalinkToSidebar":{"/docs/about/overview":"docs","/docs/about/overview-cn":"docs","/docs/benchmark":"docs","/docs/faq":"docs","/docs/quickstart":"docs","/docs/tutorial/best-practices":"docs","/docs/v1.x/doc-for-gnet-v1":"docs","/docs/v1.x/doc-for-gnet-v1-cn":"docs"}}')}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{160:function(e){e.exports=JSON.parse('{"docsSidebars":{"docs":[{"type":"category","label":"About","items":[{"type":"category","label":"About","items":[{"type":"link","label":"Overview","href":"/docs/about/overview"},{"type":"link","label":"\u9884\u89c8","href":"/docs/about/overview-cn"}]}]},{"type":"category","label":"Quickstart","items":[{"type":"link","label":"Quickstart","href":"/docs/quickstart"}]},{"type":"category","label":"Tutorial","items":[{"type":"category","label":"Tutorial","items":[{"type":"link","label":"Best practices","href":"/docs/tutorial/best-practices"}]}]},{"type":"category","label":"Benchmark","items":[{"type":"link","label":"Benchmark","href":"/docs/benchmark"}]},{"type":"category","label":"v1.x","items":[{"type":"category","label":"v1.x","items":[{"type":"link","label":"Doc for gnet v1","href":"/docs/v1.x/doc-for-gnet-v1"},{"type":"link","label":"gnet v1 \u6587\u6863","href":"/docs/v1.x/doc-for-gnet-v1-cn"}]}]},{"type":"category","label":"FAQ","items":[{"type":"link","label":"FAQ","href":"/docs/faq"}]}]},"permalinkToSidebar":{"/docs/about/overview":"docs","/docs/about/overview-cn":"docs","/docs/benchmark":"docs","/docs/faq":"docs","/docs/quickstart":"docs","/docs/tutorial/best-practices":"docs","/docs/v1.x/doc-for-gnet-v1":"docs","/docs/v1.x/doc-for-gnet-v1-cn":"docs"}}')}}]); \ No newline at end of file diff --git a/2515fe5a.394eac9a.js b/2515fe5a.a50d0ba0.js similarity index 73% rename from 2515fe5a.394eac9a.js rename to 2515fe5a.a50d0ba0.js index e9f045222..32b6236eb 100644 --- a/2515fe5a.394eac9a.js +++ b/2515fe5a.a50d0ba0.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{162:function(n){n.exports=JSON.parse('{"allTagsPath":"/blog/tags","slug":"type-announcement","name":"type: announcement","count":5,"permalink":"/blog/tags/type-announcement"}')}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{161:function(n){n.exports=JSON.parse('{"allTagsPath":"/blog/tags","slug":"type-announcement","name":"type: announcement","count":5,"permalink":"/blog/tags/type-announcement"}')}}]); \ No newline at end of file diff --git a/25acf9b6.c4999628.js b/25acf9b6.82e4aca8.js similarity index 98% rename from 25acf9b6.c4999628.js rename to 25acf9b6.82e4aca8.js index 06500eb88..e562c6b11 100644 --- a/25acf9b6.c4999628.js +++ b/25acf9b6.82e4aca8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{163:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return p}));var r=n(1),a=n(9),o=(n(0),n(265)),i={last_modified_on:"2022-12-03",$schema:"/.meta/.schemas/highlights.json",title:"Release of gnet v2.2.0",description:"Release of the official stable version of v2.2.0",author_github:"https://github.com/panjf2000",pr_numbers:["d9024a0"],release:"2.2.0",hide_on_release_notes:!1,tags:["type: tag","domain: v2.2.0"]},c={date:"2022-12-03T00:00:00.000Z",description:"Release of the official stable version of v2.2.0",permalink:"/highlights/2022-12-03-release-of-gnet-v2-2-0",readingTime:"1 min read",source:"@site/highlights/2022-12-03-release-of-gnet-v2-2-0.md",tags:[{label:"type: tag",permalink:"/highlights/tags/type-tag"},{label:"domain: v2.2.0",permalink:"/highlights/tags/domain-v-2-2-0"}],title:"Release of gnet v2.2.0",truncated:!1,prevItem:{title:"Release candidate for gnet v2.3.0",permalink:"/highlights/2023-05-19-release-candidate-for-gnet-v2-3-0"},nextItem:{title:"Release of gnet v2.0.0",permalink:"/highlights/2022-02-27-release-of-gnet-v2"}},l=[],s={rightToc:l};function p(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},s,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,Object(o.b)("img",Object(r.a)({parentName:"p"},{src:"/img/gnet-v2-2-0.jpg",alt:null}))),Object(o.b)("p",null,"The release of ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.2.0"}),"v2.2.0")," predominantly focuses on bug fixes and feature implementations."),Object(o.b)("p",null,"It's worth noting that breaking changes have been made to the API, so please refer to the ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.2.0"}),"release notes")," for more information."))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return m}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),p=function(e){var t=a.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},f=function(e){var t=p(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(n),g=r,m=f["".concat(i,".").concat(g)]||f[g]||u[g]||o;return n?a.a.createElement(m,c({ref:t},s,{components:n})):a.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),p=function(e){var t=a.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},f=function(e){var t=p(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(n),g=r,m=f["".concat(i,".").concat(g)]||f[g]||u[g]||o;return n?a.a.createElement(m,c({ref:t},s,{components:n})):a.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var b=i.a.createContext({}),s=function(e){var t=i.a.useContext(b),a=t;return e&&(a="function"==typeof e?e(t):l({},t,{},e)),a},p=function(e){var t=s(e.components);return i.a.createElement(b.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,c=e.originalType,r=e.parentName,b=o(e,["components","mdxType","originalType","parentName"]),p=s(a),d=n,u=p["".concat(r,".").concat(d)]||p[d]||m[d]||c;return a?i.a.createElement(u,l({ref:t},b,{components:a})):i.a.createElement(u,l({ref:t},b))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=a.length,r=new Array(c);r[0]=d;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l.mdxType="string"==typeof e?e:n,r[1]=l;for(var b=2;b=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var b=i.a.createContext({}),s=function(e){var t=i.a.useContext(b),a=t;return e&&(a="function"==typeof e?e(t):l({},t,{},e)),a},p=function(e){var t=s(e.components);return i.a.createElement(b.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,c=e.originalType,r=e.parentName,b=o(e,["components","mdxType","originalType","parentName"]),p=s(a),d=n,u=p["".concat(r,".").concat(d)]||p[d]||m[d]||c;return a?i.a.createElement(u,l({ref:t},b,{components:a})):i.a.createElement(u,l({ref:t},b))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=a.length,r=new Array(c);r[0]=d;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l.mdxType="string"==typeof e?e:n,r[1]=l;for(var b=2;b=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var b=i.a.createContext({}),s=function(e){var t=i.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=s(e.components);return i.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),p=s(n),d=a,m=p["".concat(o,".").concat(d)]||p[d]||u[d]||r;return n?i.a.createElement(m,c({ref:t},b,{components:n})):i.a.createElement(m,c({ref:t},b))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var b=2;b=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var b=i.a.createContext({}),s=function(e){var t=i.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=s(e.components);return i.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),p=s(n),d=a,m=p["".concat(o,".").concat(d)]||p[d]||u[d]||r;return n?i.a.createElement(m,c({ref:t},b,{components:n})):i.a.createElement(m,c({ref:t},b))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var b=2;bconn")," is introduced to help retrieve connections by file descriptors returned from pollers, but now the user can run ",Object(i.b)("inlineCode",{parentName:"p"},"go build")," with build tags ",Object(i.b)("inlineCode",{parentName:"p"},"poll_opt"),", like this: ",Object(i.b)("inlineCode",{parentName:"p"},"go build -tags=poll_opt"),", and ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," then switch to the optimized implementations of pollers that invoke the system calls of ",Object(i.b)("inlineCode",{parentName:"p"},"epoll")," or ",Object(i.b)("inlineCode",{parentName:"p"},"kqueue")," directly and add file descriptors to the interest list along with storing the corresponding connection pointers into ",Object(i.b)("inlineCode",{parentName:"p"},"epoll_data")," or ",Object(i.b)("inlineCode",{parentName:"p"},"kevent"),", in which case ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," can get rid of the HASH MAP of ",Object(i.b)("inlineCode",{parentName:"p"},"fd->conn")," and regain each connection pointer by the conversion of ",Object(i.b)("inlineCode",{parentName:"p"},"void*")," pointer in the I/O event-looping. In theory, it ought to achieve a higher performance with this optimization. "),Object(i.b)("p",null,"See ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/230"}),"#230")," for code details."),Object(i.b)("h3",{id:"about-ring-buffer"},"About ring-buffer"),Object(i.b)("p",null,"Adjust the growth strategy of ring-buffer, make it go more smoothly rather than simply doubling up (which may waste a huge amount of memory) in each buffer scaling. ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/commit/ccd37ff254e47ed4fff3feee79d88849d9444502"}),"ccd37f")," ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/commit/fd8d27ba98237a44c8d37ca9c9ecf02a7365ad44"}),"fd8d27")))}b.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f}));var r=n(0),a=n.n(r);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),b=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},s=function(e){var t=b(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),s=b(n),u=r,f=s["".concat(o,".").concat(u)]||s[u]||d[u]||i;return n?a.a.createElement(f,c({ref:t},p,{components:n})):a.a.createElement(f,c({ref:t},p))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,o[1]=c;for(var p=2;pconn")," is introduced to help retrieve connections by file descriptors returned from pollers, but now the user can run ",Object(i.b)("inlineCode",{parentName:"p"},"go build")," with build tags ",Object(i.b)("inlineCode",{parentName:"p"},"poll_opt"),", like this: ",Object(i.b)("inlineCode",{parentName:"p"},"go build -tags=poll_opt"),", and ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," then switch to the optimized implementations of pollers that invoke the system calls of ",Object(i.b)("inlineCode",{parentName:"p"},"epoll")," or ",Object(i.b)("inlineCode",{parentName:"p"},"kqueue")," directly and add file descriptors to the interest list along with storing the corresponding connection pointers into ",Object(i.b)("inlineCode",{parentName:"p"},"epoll_data")," or ",Object(i.b)("inlineCode",{parentName:"p"},"kevent"),", in which case ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," can get rid of the HASH MAP of ",Object(i.b)("inlineCode",{parentName:"p"},"fd->conn")," and regain each connection pointer by the conversion of ",Object(i.b)("inlineCode",{parentName:"p"},"void*")," pointer in the I/O event-looping. In theory, it ought to achieve a higher performance with this optimization. "),Object(i.b)("p",null,"See ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/230"}),"#230")," for code details."),Object(i.b)("h3",{id:"about-ring-buffer"},"About ring-buffer"),Object(i.b)("p",null,"Adjust the growth strategy of ring-buffer, make it go more smoothly rather than simply doubling up (which may waste a huge amount of memory) in each buffer scaling. ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/commit/ccd37ff254e47ed4fff3feee79d88849d9444502"}),"ccd37f")," ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/commit/fd8d27ba98237a44c8d37ca9c9ecf02a7365ad44"}),"fd8d27")))}b.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f}));var r=n(0),a=n.n(r);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),b=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},s=function(e){var t=b(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),s=b(n),u=r,f=s["".concat(o,".").concat(u)]||s[u]||d[u]||i;return n?a.a.createElement(f,c({ref:t},p,{components:n})):a.a.createElement(f,c({ref:t},p))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,o[1]=c;for(var p=2;p= 1.9\u3002"),Object(b.b)("h2",{id:"\u5b89\u88c5"},"\u5b89\u88c5"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"go get -u github.com/panjf2000/gnet\n")),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u652f\u6301\u4f5c\u4e3a\u4e00\u4e2a Go module \u88ab\u5bfc\u5165\uff0c\u57fa\u4e8e ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/golang/go/wiki/Modules"}),"Go 1.11 Modules")," (Go 1.11+)\uff0c\u53ea\u9700\u8981\u5728\u4f60\u7684\u9879\u76ee\u91cc\u76f4\u63a5 ",Object(b.b)("inlineCode",{parentName:"p"},'import "github.com/panjf2000/gnet"'),"\uff0c\u7136\u540e\u8fd0\u884c ",Object(b.b)("inlineCode",{parentName:"p"},"go [build|run|test]")," \u81ea\u52a8\u4e0b\u8f7d\u548c\u6784\u5efa\u9700\u8981\u7684\u4f9d\u8d56\u5305\u3002"),Object(b.b)("h2",{id:"\u4f7f\u7528\u793a\u4f8b"},"\u4f7f\u7528\u793a\u4f8b"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"\u8be6\u7ec6\u7684\u6587\u6863\u5728\u8fd9\u91cc: ",Object(b.b)("a",Object(a.a)({parentName:"strong"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc"}),"gnet \u63a5\u53e3\u6587\u6863"),"\uff0c\u4e0d\u8fc7\u4e0b\u9762\u6211\u4eec\u5148\u6765\u4e86\u89e3\u4e0b\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"strong"},"gnet")," \u7684\u7b80\u7565\u65b9\u6cd5\u3002")),Object(b.b)("p",null,"\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u6765\u6784\u5efa\u7f51\u7edc\u670d\u52a1\u5668\u662f\u975e\u5e38\u7b80\u5355\u7684\uff0c\u53ea\u9700\u8981\u5b9e\u73b0 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.EventHandler"),"\u63a5\u53e3\u7136\u540e\u628a\u4f60\u5173\u5fc3\u7684\u4e8b\u4ef6\u51fd\u6570\u6ce8\u518c\u5230\u91cc\u9762\uff0c\u6700\u540e\u628a\u5b83\u8fde\u540c\u76d1\u542c\u5730\u5740\u4e00\u8d77\u4f20\u9012\u7ed9 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Serve")," \u51fd\u6570\u5c31\u5b8c\u6210\u4e86\u3002\u5728\u670d\u52a1\u5668\u5f00\u59cb\u5de5\u4f5c\u4e4b\u540e\uff0c\u6bcf\u4e00\u6761\u5230\u6765\u7684\u7f51\u7edc\u8fde\u63a5\u4f1a\u5728\u5404\u4e2a\u4e8b\u4ef6\u4e4b\u95f4\u4f20\u9012\uff0c\u5982\u679c\u4f60\u60f3\u5728\u67d0\u4e2a\u4e8b\u4ef6\u4e2d\u5173\u95ed\u67d0\u6761\u8fde\u63a5\u6216\u8005\u5173\u6389\u6574\u4e2a\u670d\u52a1\u5668\u7684\u8bdd\uff0c\u76f4\u63a5\u5728\u4e8b\u4ef6\u51fd\u6570\u91cc\u628a ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Action")," \u8bbe\u7f6e\u6210 ",Object(b.b)("inlineCode",{parentName:"p"},"Close")," \u6216\u8005 ",Object(b.b)("inlineCode",{parentName:"p"},"Shutdown")," \u5c31\u884c\u4e86\u3002"),Object(b.b)("p",null,"Echo \u670d\u52a1\u5668\u662f\u4e00\u79cd\u6700\u7b80\u5355\u7f51\u7edc\u670d\u52a1\u5668\uff0c\u628a\u5b83\u4f5c\u4e3a ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u5165\u95e8\u4f8b\u5b50\u5728\u518d\u5408\u9002\u4e0d\u8fc7\u4e86\uff0c\u4e0b\u9762\u662f\u4e00\u4e2a\u6700\u7b80\u5355\u7684 echo server\uff0c\u5b83\u76d1\u542c\u4e86 9000 \u7aef\u53e3\uff1a"),Object(b.b)("h3",{id:"\u4e0d\u5e26\u963b\u585e\u903b\u8f91\u7684-echo-\u670d\u52a1\u5668"},"\u4e0d\u5e26\u963b\u585e\u903b\u8f91\u7684 echo \u670d\u52a1\u5668"),Object(b.b)("details",null,Object(b.b)("summary",null," Old version(<=v1.0.0-rc.4) "),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'package main\n\nimport (\n "log"\n\n "github.com/panjf2000/gnet"\n)\n\ntype echoServer struct {\n gnet.EventServer\n}\n\nfunc (es *echoServer) React(c gnet.Conn) (out []byte, action gnet.Action) {\n out = c.Read()\n c.ResetBuffer()\n return\n}\n\nfunc main() {\n echo := new(echoServer)\n log.Fatal(gnet.Serve(echo, "tcp://:9000", gnet.WithMulticore(true)))\n}\n'))),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'package main\n\nimport (\n "log"\n\n "github.com/panjf2000/gnet"\n)\n\ntype echoServer struct {\n gnet.EventServer\n}\n\nfunc (es *echoServer) React(frame []byte, c gnet.Conn) (out []byte, action gnet.Action) {\n out = frame\n return\n}\n\nfunc main() {\n echo := new(echoServer)\n log.Fatal(gnet.Serve(echo, "tcp://:9000", gnet.WithMulticore(true)))\n}\n')),Object(b.b)("p",null,"\u6b63\u5982\u4f60\u6240\u89c1\uff0c\u4e0a\u9762\u7684\u4f8b\u5b50\u91cc ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5b9e\u4f8b\u53ea\u6ce8\u518c\u4e86\u4e00\u4e2a ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u4e8b\u4ef6\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u4e3b\u8981\u7684\u4e1a\u52a1\u903b\u8f91\u4ee3\u7801\u4f1a\u5199\u5728\u8fd9\u4e2a\u4e8b\u4ef6\u65b9\u6cd5\u91cc\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u4f1a\u5728\u670d\u52a1\u5668\u63a5\u6536\u5230\u5ba2\u6237\u7aef\u5199\u8fc7\u6765\u7684\u6570\u636e\u4e4b\u65f6\u88ab\u8c03\u7528\uff0c\u6b64\u65f6\u7684\u8f93\u5165\u53c2\u6570: ",Object(b.b)("inlineCode",{parentName:"p"},"frame")," \u5df2\u7ecf\u662f\u89e3\u7801\u8fc7\u540e\u7684\u4e00\u4e2a\u5b8c\u6574\u7684\u7f51\u7edc\u6570\u636e\u5305\uff0c\u4e00\u822c\u6765\u8bf4\u4f60\u9700\u8981\u5b9e\u73b0 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc#ICodec"}),"codec \u63a5\u53e3"),"\u4f5c\u4e3a\u4f60\u81ea\u5df1\u7684\u4e1a\u52a1\u7f16\u89e3\u7801\u5668\u6765\u5904\u7406 TCP \u7ec4\u5305\u548c\u5206\u5305\u7684\u95ee\u9898\uff0c\u5982\u679c\u4f60\u4e0d\u5b9e\u73b0\u90a3\u4e2a\u63a5\u53e3\u7684\u8bdd\uff0c\u90a3\u4e48 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5c06\u4f1a\u4f7f\u7528",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc#BuiltInFrameCodec"}),"\u9ed8\u8ba4\u7684 codec"),"\uff0c\u8fd9\u610f\u5473\u7740\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u88ab\u89e6\u53d1\u8c03\u7528\u4e4b\u65f6\u8f93\u5165\u53c2\u6570: ",Object(b.b)("inlineCode",{parentName:"p"},"frame")," \u91cc\u5b58\u50a8\u7684\u662f\u6240\u6709\u7f51\u7edc\u6570\u636e\uff1a\u5305\u62ec\u6700\u65b0\u7684\u4ee5\u53ca\u8fd8\u5728 buffer \u91cc\u7684\u65e7\u6570\u636e\uff0c\u7136\u540e\u5904\u7406\u8f93\u5165\u6570\u636e\uff08\u8fd9\u91cc\u53ea\u662f\u628a\u6570\u636e echo \u56de\u53bb\uff09\u5e76\u4e14\u5728\u5904\u7406\u5b8c\u4e4b\u540e\u628a\u9700\u8981\u8f93\u51fa\u7684\u6570\u636e\u8d4b\u503c\u7ed9 ",Object(b.b)("inlineCode",{parentName:"p"},"out")," \u53d8\u91cf\u5e76\u8fd4\u56de\uff0c\u63a5\u7740\u8f93\u51fa\u7684\u6570\u636e\u4f1a\u7ecf\u8fc7\u7f16\u7801\uff0c\u6700\u540e\u88ab\u5199\u56de\u5ba2\u6237\u7aef\u3002"),Object(b.b)("h3",{id:"\u5e26\u963b\u585e\u903b\u8f91\u7684-echo-\u670d\u52a1\u5668"},"\u5e26\u963b\u585e\u903b\u8f91\u7684 echo \u670d\u52a1\u5668"),Object(b.b)("details",null,Object(b.b)("summary",null," Old version(<=v1.0.0-rc.4) "),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'package main\n\nimport (\n "log"\n "time"\n\n "github.com/panjf2000/gnet"\n "github.com/panjf2000/gnet/pool/goroutine"\n)\n\ntype echoServer struct {\n gnet.EventServer\n pool *goroutine.Pool\n}\n\nfunc (es *echoServer) React(c gnet.Conn) (out []byte, action gnet.Action) {\n data := append([]byte{}, c.Read()...)\n c.ResetBuffer()\n\n // Use ants pool to unblock the event-loop.\n _ = es.pool.Submit(func() {\n time.Sleep(1 * time.Second)\n c.AsyncWrite(data)\n })\n\n return\n}\n\nfunc main() {\n p := goroutine.Default()\n defer p.Release()\n\n echo := &echoServer{pool: p}\n log.Fatal(gnet.Serve(echo, "tcp://:9000", gnet.WithMulticore(true)))\n}\n'))),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'package main\n\nimport (\n "log"\n "time"\n\n "github.com/panjf2000/gnet"\n "github.com/panjf2000/gnet/pool/goroutine"\n)\n\ntype echoServer struct {\n gnet.EventServer\n pool *goroutine.Pool\n}\n\nfunc (es *echoServer) React(frame []byte, c gnet.Conn) (out []byte, action gnet.Action) {\n data := append([]byte{}, frame...)\n\n // Use ants pool to unblock the event-loop.\n _ = es.pool.Submit(func() {\n time.Sleep(1 * time.Second)\n c.AsyncWrite(data)\n })\n\n return\n}\n\nfunc main() {\n p := goroutine.Default()\n defer p.Release()\n\n echo := &echoServer{pool: p}\n log.Fatal(gnet.Serve(echo, "tcp://:9000", gnet.WithMulticore(true)))\n}\n')),Object(b.b)("p",null,"\u6b63\u5982\u6211\u5728\u300e\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60\u300f\u90a3\u4e00\u8282\u6240\u8bf4\u7684\u90a3\u6837\uff0c\u5982\u679c\u4f60\u7684\u4e1a\u52a1\u903b\u8f91\u91cc\u5305\u542b\u963b\u585e\u4ee3\u7801\uff0c\u90a3\u4e48\u4f60\u5e94\u8be5\u628a\u8fd9\u4e9b\u963b\u585e\u4ee3\u7801\u53d8\u6210\u975e\u963b\u585e\u7684\uff0c\u6bd4\u5982\u901a\u8fc7\u628a\u8fd9\u90e8\u5206\u4ee3\u7801\u653e\u5230\u72ec\u7acb\u7684 goroutines \u53bb\u8fd0\u884c\uff0c\u4f46\u662f\u8981\u6ce8\u610f\u4e00\u70b9\uff0c\u5982\u679c\u4f60\u7684\u670d\u52a1\u5668\u5904\u7406\u7684\u6d41\u91cf\u8db3\u591f\u7684\u5927\uff0c\u90a3\u4e48\u8fd9\u79cd\u505a\u6cd5\u5c06\u4f1a\u5bfc\u81f4\u521b\u5efa\u5927\u91cf\u7684 goroutines \u6781\u5927\u5730\u6d88\u8017\u7cfb\u7edf\u8d44\u6e90\uff0c\u6240\u4ee5\u6211\u4e00\u822c\u5efa\u8bae\u4f60\u7528 goroutine pool \u6765\u505a goroutines \u7684\u590d\u7528\u548c\u7ba1\u7406\uff0c\u4ee5\u53ca\u8282\u7701\u7cfb\u7edf\u8d44\u6e90\u3002"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"\u5404\u79cd gnet \u793a\u4f8b:")),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("p",{parentName:"li"},Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples/tree/984eed8bda54282f0d6cb2005ff48e529ae8980d"}),"v1.6.0 \u7248\u672c\u4e4b\u524d\u7684\u793a\u4f8b"))),Object(b.b)("li",{parentName:"ul"},Object(b.b)("p",{parentName:"li"},Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples/tree/master"}),"v1.6.x \u7cfb\u5217\u7684\u793a\u4f8b"))),Object(b.b)("li",{parentName:"ul"},Object(b.b)("p",{parentName:"li"},Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples"}),"v2.x.x \u7cfb\u5217\u7684\u793a\u4f8b")))),Object(b.b)("h2",{id:"io-\u4e8b\u4ef6"},"I/O \u4e8b\u4ef6"),Object(b.b)("p",null," ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u76ee\u524d\u652f\u6301\u7684 I/O \u4e8b\u4ef6\u5982\u4e0b\uff1a"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnInitComplete")," \u5f53 server \u521d\u59cb\u5316\u5b8c\u6210\u4e4b\u540e\u8c03\u7528\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnOpened")," \u5f53\u8fde\u63a5\u88ab\u6253\u5f00\u7684\u65f6\u5019\u8c03\u7528\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnClosed")," \u5f53\u8fde\u63a5\u88ab\u5173\u95ed\u7684\u4e4b\u540e\u8c03\u7528\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.React")," \u5f53 server \u7aef\u63a5\u6536\u5230\u4ece client \u7aef\u53d1\u9001\u6765\u7684\u6570\u636e\u7684\u65f6\u5019\u8c03\u7528\u3002\uff08\u4f60\u7684\u6838\u5fc3\u4e1a\u52a1\u4ee3\u7801\u4e00\u822c\u662f\u5199\u5728\u8fd9\u4e2a\u65b9\u6cd5\u91cc\uff09"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.Tick")," \u670d\u52a1\u5668\u542f\u52a8\u7684\u65f6\u5019\u4f1a\u8c03\u7528\u4e00\u6b21\uff0c\u4e4b\u540e\u5c31\u4ee5\u7ed9\u5b9a\u7684\u65f6\u95f4\u95f4\u9694\u5b9a\u65f6\u8c03\u7528\u4e00\u6b21\uff0c\u662f\u4e00\u4e2a\u5b9a\u65f6\u5668\u65b9\u6cd5\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.PreWrite")," \u9884\u5148\u5199\u6570\u636e\u65b9\u6cd5\uff0c\u5728 server \u7aef\u5199\u6570\u636e\u56de client \u7aef\u4e4b\u524d\u8c03\u7528\u3002")),Object(b.b)("h2",{id:"poll_opt-\u6a21\u5f0f"},"poll_opt \u6a21\u5f0f"),Object(b.b)("p",null,"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4f7f\u7528\u5b98\u65b9\u5305 ",Object(b.b)("inlineCode",{parentName:"p"},"golang.org/x/sys/unix")," \u5b9e\u73b0\u57fa\u4e8e ",Object(b.b)("inlineCode",{parentName:"p"},"epoll")," \u548c ",Object(b.b)("inlineCode",{parentName:"p"},"kqueue")," \u7684\u7f51\u7edc\u8f6e\u8be2\u5668 poller\uff0c\u8fd9\u79cd\u5b9e\u73b0\u9700\u8981\u5f15\u5165\u4e00\u4e2a ",Object(b.b)("inlineCode",{parentName:"p"},"fd->conn")," \u54c8\u5e0c\u8868\uff0c\u901a\u8fc7\u5b83\u53ef\u4ee5\u7528\u6587\u4ef6\u63cf\u8ff0\u7b26 ",Object(b.b)("inlineCode",{parentName:"p"},"fd")," \u627e\u5230\u5bf9\u5e94\u7684 ",Object(b.b)("inlineCode",{parentName:"p"},"connection")," \u7ed3\u6784\u4f53\uff0c\u4f46\u73b0\u5728\u7528\u6237\u53ef\u4ee5\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"go build")," \u7f16\u8bd1\u9879\u76ee\u7684\u65f6\u5019\u52a0\u5165\u6784\u5efa\u6807\u7b7e ",Object(b.b)("inlineCode",{parentName:"p"},"poll_opt"),"\uff0c\u50cf\u8fd9\u6837\uff1a",Object(b.b)("inlineCode",{parentName:"p"},"go build -tags=poll_opt"),"\uff0c\u7136\u540e ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4f1a\u5207\u6362\u5230\u53e6\u4e00\u79cd\u4f18\u5316\u7684\u5b9e\u73b0\uff0c\u76f4\u63a5\u8c03\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"epoll")," \u6216 ",Object(b.b)("inlineCode",{parentName:"p"},"kqueue")," \u7684\u7cfb\u7edf\u8c03\u7528\uff0c\u5c06\u6587\u4ef6\u63cf\u8ff0\u7b26\u6dfb\u52a0\u5230\u76d1\u63a7\u5217\u8868\u4e2d\uff0c\u540c\u65f6\u5c06\u76f8\u5e94\u7684 connection \u7ed3\u6784\u4f53\u6307\u9488\u5b58\u50a8\u5230 ",Object(b.b)("inlineCode",{parentName:"p"},"epoll_data")," \u6216 ",Object(b.b)("inlineCode",{parentName:"p"},"kevent")," \u4e2d\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5c31\u80fd\u5728 I/O \u4e8b\u4ef6\u5faa\u73af\u4e2d\u6446\u8131\u6389 ",Object(b.b)("inlineCode",{parentName:"p"},"fd->conn")," \u54c8\u5e0c\u8868\uff0c\u5c06 ",Object(b.b)("inlineCode",{parentName:"p"},"void*")," \u6307\u9488\u8f6c\u6362\u6210 ",Object(b.b)("inlineCode",{parentName:"p"},"connection")," \u7ed3\u6784\u4f53\u6307\u9488\uff0c\u901a\u8fc7\u8fd9\u79cd\u4f18\u5316\uff0c\u7406\u8bba\u4e0a\u5e94\u8be5\u53ef\u4ee5\u5f97\u5230\u66f4\u9ad8\u7684\u6027\u80fd\u3002"),Object(b.b)("p",null,"\u4ee3\u7801\u7ec6\u8282\u8bf7\u6d4f\u89c8 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/230"}),"#230"),"\u3002"),Object(b.b)("h2",{id:"\u5b9a\u65f6\u5668"},"\u5b9a\u65f6\u5668"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.Tick")," \u4f1a\u6bcf\u9694\u4e00\u6bb5\u65f6\u95f4\u89e6\u53d1\u4e00\u6b21\uff0c\u95f4\u9694\u65f6\u95f4\u4f60\u53ef\u4ee5\u81ea\u5df1\u63a7\u5236\uff0c\u8bbe\u5b9a\u8fd4\u56de\u7684 ",Object(b.b)("inlineCode",{parentName:"p"},"delay")," \u53d8\u91cf\u5c31\u884c\u3002"),Object(b.b)("p",null,"\u5b9a\u65f6\u5668\u7684\u7b2c\u4e00\u6b21\u89e6\u53d1\u662f\u5728 gnet server \u542f\u52a8\u4e4b\u540e\uff0c\u5982\u679c\u4f60\u8981\u8bbe\u7f6e\u5b9a\u65f6\u5668\uff0c\u522b\u5fd8\u4e86\u8bbe\u7f6e option \u9009\u9879\uff1a",Object(b.b)("inlineCode",{parentName:"p"},"WithTicker(true)"),"\u3002"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'events.Tick = func() (delay time.Duration, action Action){\n log.Printf("tick")\n delay = time.Second\n return\n}\n')),Object(b.b)("h2",{id:"udp-\u652f\u6301"},"UDP \u652f\u6301"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u652f\u6301 UDP \u534f\u8bae\uff0c\u6240\u4ee5\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Serve")," \u91cc\u7ed1\u5b9a\u5141\u8bb8\u7ed1\u5b9a UDP \u5730\u5740\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684 UDP \u652f\u6301\u6709\u5982\u4e0b\u7684\u7279\u6027\uff1a"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},"\u7f51\u7edc\u6570\u636e\u7684\u8bfb\u5165\u548c\u5199\u51fa\u4e0d\u505a\u7f13\u51b2\uff0c\u4f1a\u4e00\u6b21\u6027\u8bfb\u5199\u5ba2\u6237\u7aef\uff0c\u4e5f\u5c31\u662f\u8bf4 ",Object(b.b)("inlineCode",{parentName:"li"},"gnet.Conn")," \u6240\u6709\u90a3\u4e9b\u64cd\u4f5c\u5185\u90e8\u7684 buffer \u7684\u51fd\u6570\u90fd\u4e0d\u53ef\u7528\uff0c\u6bd4\u5982 ",Object(b.b)("inlineCode",{parentName:"li"},"c.Read()"),", ",Object(b.b)("inlineCode",{parentName:"li"},"c.ResetBuffer()"),", ",Object(b.b)("inlineCode",{parentName:"li"},"c.BufferLength()")," \u548c\u5176\u4ed6 buffer \u76f8\u5173\u7684\u51fd\u6570\uff1b\u4f7f\u7528\u8005\u4e0d\u80fd\u8c03\u7528\u4e0a\u8ff0\u90a3\u4e9b\u51fd\u6570\u53bb\u64cd\u4f5c\u6570\u636e\uff0c\u800c\u5e94\u8be5\u76f4\u63a5\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"li"},"gnet.React(frame []byte, c gnet.Conn)")," \u51fd\u6570\u5165\u53c2\u4e2d\u7684 ",Object(b.b)("inlineCode",{parentName:"li"},"frame []byte")," \u4f5c\u4e3a UDP \u6570\u636e\u5305\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnOpened")," \u548c ",Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnClosed")," \u8fd9\u4e24\u4e2a\u4e8b\u4ef6\u5728 UDP \u4e0b\u4e0d\u53ef\u7528\uff0c\u552f\u4e00\u53ef\u7528\u7684\u4e8b\u4ef6\u662f ",Object(b.b)("inlineCode",{parentName:"li"},"React"),"\u3002"),Object(b.b)("li",{parentName:"ul"},"TCP \u91cc\u7684\u5f02\u6b65\u5199\u64cd\u4f5c\u662f ",Object(b.b)("inlineCode",{parentName:"li"},"AsyncWrite([]byte)")," \u65b9\u6cd5\uff0c\u800c\u5728 UDP \u91cc\u5bf9\u5e94\u7684\u65b9\u6cd5\u662f ",Object(b.b)("inlineCode",{parentName:"li"},"SendTo([]byte)"),"\u3002")),Object(b.b)("h2",{id:"unix-domain-socket-\u652f\u6301"},"Unix Domain Socket \u652f\u6301"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet"),' \u8fd8\u652f\u6301 UDS(Unix Domain Socket) \u673a\u5236\uff0c\u53ea\u9700\u8981\u628a\u7c7b\u4f3c "unix://xxx" \u7684 UDS \u5730\u5740\u4f20\u53c2\u7ed9 ',Object(b.b)("inlineCode",{parentName:"p"},"gnet.Serve")," \u51fd\u6570\u7ed1\u5b9a\u5c31\u884c\u4e86\u3002"),Object(b.b)("p",null,"\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u91cc\u4f7f\u7528 UDS \u548c\u4f7f\u7528 TCP \u6ca1\u6709\u4ec0\u4e48\u4e0d\u540c\uff0c\u6240\u6709 TCP \u534f\u8bae\u4e0b\u53ef\u4ee5\u4f7f\u7528\u7684\u4e8b\u4ef6\u51fd\u6570\u90fd\u53ef\u4ee5\u5728 UDS \u4e2d\u4f7f\u7528\u3002"),Object(b.b)("h2",{id:"\u4f7f\u7528\u591a\u6838"},"\u4f7f\u7528\u591a\u6838"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet.WithMulticore(true)")," \u53c2\u6570\u6307\u5b9a\u4e86 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u662f\u5426\u4f1a\u4f7f\u7528\u591a\u6838\u6765\u8fdb\u884c\u670d\u52a1\uff0c\u5982\u679c\u662f ",Object(b.b)("inlineCode",{parentName:"p"},"true")," \u7684\u8bdd\u5c31\u4f1a\u4f7f\u7528\u591a\u6838\uff0c\u5426\u5219\u5c31\u662f\u5355\u6838\u8fd0\u884c\uff0c\u5229\u7528\u7684\u6838\u5fc3\u6570\u4e00\u822c\u662f\u673a\u5668\u7684 CPU \u6570\u91cf\u3002"),Object(b.b)("h2",{id:"\u8d1f\u8f7d\u5747\u8861"},"\u8d1f\u8f7d\u5747\u8861"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u76ee\u524d\u652f\u6301\u4e09\u79cd\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\uff1a",Object(b.b)("inlineCode",{parentName:"p"},"Round-Robin(\u8f6e\u8be2)"),"\u3001",Object(b.b)("inlineCode",{parentName:"p"},"Source-Addr-Hash(\u6e90\u5730\u5740\u54c8\u5e0c)")," \u548c ",Object(b.b)("inlineCode",{parentName:"p"},"Least-Connections(\u6700\u5c11\u8fde\u63a5\u6570)"),"\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4f20\u9012 functional option \u7684 ",Object(b.b)("inlineCode",{parentName:"p"},"LB")," (RoundRobin/LeastConnections/SourceAddrHash) \u7684\u503c\u7ed9 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Serve")," \u6765\u6307\u5b9a\u8981\u4f7f\u7528\u7684\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\u3002"),Object(b.b)("p",null,"\u5982\u679c\u6ca1\u6709\u663e\u793a\u5730\u6307\u5b9a\uff0c\u90a3\u4e48 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5c06\u4f1a\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"Round-Robin")," \u4f5c\u4e3a\u9ed8\u8ba4\u7684\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\u3002"),Object(b.b)("h2",{id:"so_reuseport-\u7aef\u53e3\u590d\u7528"},"SO_REUSEPORT \u7aef\u53e3\u590d\u7528"),Object(b.b)("p",null,"\u670d\u52a1\u5668\u652f\u6301 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://lwn.net/Articles/542629/"}),"SO_REUSEPORT")," \u7aef\u53e3\u590d\u7528\u7279\u6027\uff0c\u5141\u8bb8\u591a\u4e2a sockets \u76d1\u542c\u540c\u4e00\u4e2a\u7aef\u53e3\uff0c\u7136\u540e\u5185\u6838\u4f1a\u5e2e\u4f60\u505a\u597d\u8d1f\u8f7d\u5747\u8861\uff0c\u6bcf\u6b21\u53ea\u5524\u9192\u4e00\u4e2a socket \u6765\u5904\u7406 ",Object(b.b)("inlineCode",{parentName:"p"},"connect")," \u8bf7\u6c42\uff0c\u907f\u514d\u60ca\u7fa4\u6548\u5e94\u3002"),Object(b.b)("p",null,"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4e0d\u4f1a\u6709\u60ca\u7fa4\u6548\u5e94\uff0c\u56e0\u4e3a ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u9ed8\u8ba4\u7684\u7f51\u7edc\u6a21\u578b\u662f\u4e3b\u4ece\u591a Reactors\uff0c\u53ea\u4f1a\u6709\u4e00\u4e2a\u4e3b reactor \u5728\u76d1\u542c\u7aef\u53e3\u4ee5\u53ca\u63a5\u6536\u65b0\u8fde\u63a5\u3002\u6240\u4ee5\uff0c\u5f00\u4e0d\u5f00\u542f ",Object(b.b)("inlineCode",{parentName:"p"},"SO_REUSEPORT")," \u9009\u9879\u662f\u65e0\u5173\u7d27\u8981\u7684\uff0c\u53ea\u662f\u5f00\u542f\u4e86\u8fd9\u4e2a\u9009\u9879\u4e4b\u540e ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u7f51\u7edc\u6a21\u578b\u5c06\u4f1a\u5207\u6362\u6210 ",Object(b.b)("inlineCode",{parentName:"p"},"evio")," \u7684\u65e7\u7f51\u7edc\u6a21\u578b\uff0c\u8fd9\u4e00\u70b9\u9700\u8981\u6ce8\u610f\u4e00\u4e0b\u3002"),Object(b.b)("p",null,"\u5f00\u542f\u8fd9\u4e2a\u529f\u80fd\u4e5f\u5f88\u7b80\u5355\uff0c\u4f7f\u7528 functional options \u8bbe\u7f6e\u4e00\u4e0b\u5373\u53ef\uff1a"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'gnet.Serve(events, "tcp://:9000", gnet.WithMulticore(true), gnet.WithReusePort(true)))\n')),Object(b.b)("h2",{id:"\u591a\u79cd\u5185\u7f6e\u7684-tcp-\u6d41\u7f16\u89e3\u7801\u5668"},"\u591a\u79cd\u5185\u7f6e\u7684 TCP \u6d41\u7f16\u89e3\u7801\u5668"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5185\u7f6e\u4e86\u591a\u79cd\u7528\u4e8e TCP \u6d41\u5206\u5305\u7684\u7f16\u89e3\u7801\u5668\u3002"),Object(b.b)("p",null,"\u76ee\u524d\u4e00\u5171\u5b9e\u73b0\u4e86 4 \u79cd\u5e38\u89c1\u7684\u7f16\u89e3\u7801\u5668\uff1aLineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec \u548c LengthFieldBasedFrameCodec\uff0c\u57fa\u672c\u4e0a\u80fd\u6ee1\u8db3\u5927\u591a\u6570\u5e94\u7528\u573a\u666f\u7684\u9700\u6c42\u4e86\uff1b\u800c\u4e14 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8fd8\u5141\u8bb8\u7528\u6237\u5b9e\u73b0\u81ea\u5df1\u7684\u7f16\u89e3\u7801\u5668\uff1a\u53ea\u9700\u8981\u5b9e\u73b0 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc#ICodec"}),"gnet.ICodec")," \u63a5\u53e3\uff0c\u5e76\u901a\u8fc7 functional options \u66ff\u6362\u6389\u5185\u90e8\u9ed8\u8ba4\u7684\u7f16\u89e3\u7801\u5668\u5373\u53ef\u3002"),Object(b.b)("p",null,"\u8fd9\u91cc\u6709\u4e00\u4e2a\u4f7f\u7528\u7f16\u89e3\u7801\u5668\u5bf9 TCP \u6d41\u5206\u5305\u7684",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples/tree/master/examples/codec"}),"\u4f8b\u5b50"),"\u3002"),Object(b.b)("h1",{id:"-\u6027\u80fd\u6d4b\u8bd5"},"\ud83d\udcca \u6027\u80fd\u6d4b\u8bd5"),Object(b.b)("h2",{id:"techempower-\u6027\u80fd\u6d4b\u8bd5"},"TechEmpower \u6027\u80fd\u6d4b\u8bd5"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),'# \u786c\u4ef6\u73af\u5883\n* 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 3.20GHz\n* 32GB RAM\n* Dedicated Cisco 10-gigabit Ethernet switch\n* Debian 12 "bookworm"\n* Go1.19.x linux/amd64\n')),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-top50-light.jpg",alt:null}))),Object(b.b)("p",null,"\u8fd9\u662f\u5305\u542b\u5168\u90e8\u7f16\u7a0b\u8bed\u8a00\u6846\u67b6\u7684\u6027\u80fd\u6392\u540d",Object(b.b)("strong",{parentName:"p"},Object(b.b)("em",{parentName:"strong"},"\u524d 50"))," \u7684\u7ed3\u679c\uff0c\u603b\u699c\u5355\u5305\u542b\u4e86\u5168\u4e16\u754c\u5171\u8ba1 ",Object(b.b)("strong",{parentName:"p"},Object(b.b)("em",{parentName:"strong"},"486"))," \u4e2a\u6846\u67b6\uff0c\u5176\u4e2d ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u6392\u540d",Object(b.b)("strong",{parentName:"p"},Object(b.b)("em",{parentName:"strong"},"\u7b2c\u4e00")),"\u3002"),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-topN-go-light.png",alt:null}))),Object(b.b)("p",null,"\u8fd9\u662f Go \u8bed\u8a00\u5206\u7c7b\u4e0b\u7684\u5168\u90e8\u6392\u540d\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8d85\u8d8a\u4e86\u5176\u4ed6\u6240\u6709\u6846\u67b6\uff0c\u4f4d\u5217\u7b2c\u4e00\uff0c\u662f",Object(b.b)("strong",{parentName:"p"},Object(b.b)("em",{parentName:"strong"},"\u6700\u5feb")),"\u7684 Go \u7f51\u7edc\u6846\u67b6\u3002"),Object(b.b)("p",null,"\u5b8c\u6574\u7684\u6392\u884c\u53ef\u4ee5\u901a\u8fc7 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.techempower.com/benchmarks/#hw=ph&test=plaintext§ion=data-r22"}),"TechEmpower Benchmark ",Object(b.b)("strong",{parentName:"a"},"Round 22"))," \u67e5\u770b\u3002"),Object(b.b)("h2",{id:"\u540c\u7c7b\u578b\u7684\u7f51\u7edc\u5e93\u6027\u80fd\u5bf9\u6bd4"},"\u540c\u7c7b\u578b\u7684\u7f51\u7edc\u5e93\u6027\u80fd\u5bf9\u6bd4"),Object(b.b)("h2",{id:"on-linux-epoll"},"On Linux (epoll)"),Object(b.b)("h3",{id:"test-environment"},"Test Environment"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"# Machine information\n OS : Ubuntu 20.04/x86_64\n CPU : 8 CPU cores, AMD EPYC 7K62 48-Core Processor\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.17.2 linux/amd64\nGOMAXPROCS : 8\n\n# Benchmark parameters\nTCP connections : 1000/2000/5000/10000\nPacket size : 512/1024/2048/4096/8192/16384/32768/65536 bytes\nTest duration : 15s\n")),Object(b.b)("h4",{id:"echo-benchmark"},Object(b.b)("a",Object(a.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_linux.png",alt:null}))),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_linux.png",alt:null}))),Object(b.b)("h2",{id:"on-macos-kqueue"},"On MacOS (kqueue)"),Object(b.b)("h3",{id:"test-environment-1"},"Test Environment"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"# Machine information\n OS : MacOS Big Sur/x86_64\n CPU : 6 CPU cores, Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.16.5 darwin/amd64\nGOMAXPROCS : 12\n\n# Benchmark parameters\nTCP connections : 300/400/500/600/700\nPacket size : 512/1024/2048/4096/8192 bytes\nTest duration : 15s\n")),Object(b.b)("h4",{id:"echo-benchmark-1"},Object(b.b)("a",Object(a.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_macos.png",alt:null}))),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_macos.png",alt:null}))),Object(b.b)("h1",{id:"\ufe0f-\u8bc1\u4e66"},"\ufe0f\ud83d\udea8 \u8bc1\u4e66"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u6e90\u7801\u5141\u8bb8\u7528\u6237\u5728\u9075\u5faa ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/blob/master/LICENSE"}),"MIT \u5f00\u6e90\u8bc1\u4e66")," \u89c4\u5219\u7684\u524d\u63d0\u4e0b\u4f7f\u7528\u3002"),Object(b.b)("h1",{id:"-\u8d21\u732e\u8005"},"\ud83d\udc4f \u8d21\u732e\u8005"),Object(b.b)("p",null,"\u8bf7\u5728\u63d0 PR \u4e4b\u524d\u4ed4\u7ec6\u9605\u8bfb ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/blob/master/CONTRIBUTING.md"}),"Contributing Guidelines"),"\uff0c\u611f\u8c22\u90a3\u4e9b\u4e3a ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8d21\u732e\u8fc7\u4ee3\u7801\u7684\u5f00\u53d1\u8005\uff01"),Object(b.b)("p",null,Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/graphs/contributors"}),Object(b.b)("img",Object(a.a)({parentName:"a"},{src:"https://opencollective.com/gnet/contributors.svg?width=890&button=false",alt:null})))),Object(b.b)("h1",{id:"-\u81f4\u8c22"},"\ud83d\ude4f \u81f4\u8c22"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/tidwall/evio"}),"evio")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/netty/netty"}),"netty")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/ants"}),"ants")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/kavu/go_reuseport"}),"go_reuseport")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/valyala/bytebufferpool"}),"bytebufferpool")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/smallnest/goframe"}),"goframe")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/smallnest/ringbuffer"}),"ringbuffer"))),Object(b.b)("h1",{id:"-\u76f8\u5173\u6587\u7ae0"},"\u2693 \u76f8\u5173\u6587\u7ae0"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://www.freecodecamp.org/news/million-websockets-and-go-cc58418460bb/"}),"A Million WebSockets and Go")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://speakerdeck.com/eranyanay/going-infinite-handling-1m-websockets-connections-in-go"}),"Going Infinite, handling 1M websockets connections in Go")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/go-netpoll-io-multiplexing-reactor"}),"Go netpoller \u539f\u751f\u7f51\u7edc\u6a21\u578b\u4e4b\u6e90\u7801\u5168\u9762\u63ed\u79d8")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/go-event-loop-networking-library-gnet"}),"gnet: \u4e00\u4e2a\u8f7b\u91cf\u7ea7\u4e14\u9ad8\u6027\u80fd\u7684 Golang \u7f51\u7edc\u5e93")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/releasing-gnet-v1-with-techempower"}),"\u6700\u5feb\u7684 Go \u7f51\u7edc\u6846\u67b6 gnet \u6765\u5566\uff01"))),Object(b.b)("h1",{id:"-\u7528\u6237\u6848\u4f8b"},"\ud83c\udfa1 \u7528\u6237\u6848\u4f8b"),Object(b.b)("p",null,"\u4ee5\u4e0b\u516c\u53f8/\u7ec4\u7ec7\u5728\u751f\u4ea7\u73af\u5883\u4e0a\u4f7f\u7528\u4e86 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4f5c\u4e3a\u5e95\u5c42\u7f51\u7edc\u670d\u52a1\u3002"),Object(b.b)("a",{href:"https://www.tencent.com"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/tencent_logo.png",width:"250",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://www.iqiyi.com",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/iqiyi-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://www.mi.com",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/mi-logo.png",width:"150",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://www.360.com",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/360-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://tieba.baidu.com/",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/baidu-tieba-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://game.qq.com/",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/tencent-games-logo.png",width:"200",align:"middle"})),Object(b.b)("p",null,"\u5982\u679c\u4f60\u7684\u9879\u76ee\u4e5f\u5728\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet"),"\uff0c\u6b22\u8fce\u7ed9\u6211\u63d0 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pulls"}),"Pull Request")," \u6765\u66f4\u65b0\u8fd9\u4efd\u7528\u6237\u6848\u4f8b\u5217\u8868\u3002"),Object(b.b)("h1",{id:"-\u652f\u6301"},"\ud83d\udcb0 \u652f\u6301"),Object(b.b)("p",null,"\u5982\u679c\u6709\u610f\u5411\uff0c\u53ef\u4ee5\u901a\u8fc7\u6bcf\u4e2a\u6708\u5b9a\u91cf\u7684\u5c11\u8bb8\u6350\u8d60\u6765\u652f\u6301\u8fd9\u4e2a\u9879\u76ee\u3002"),Object(b.b)("a",{href:"https://opencollective.com/gnet#backers",target:"_blank"},Object(b.b)("img",{src:"https://opencollective.com/gnet/backers.svg"})),Object(b.b)("h1",{id:"-\u8d5e\u52a9"},"\ud83d\udc8e \u8d5e\u52a9"),Object(b.b)("p",null,"\u6bcf\u6708\u5b9a\u91cf\u6350\u8d60 10 \u5200\u5373\u53ef\u6210\u4e3a\u672c\u9879\u76ee\u7684\u8d5e\u52a9\u8005\uff0c\u5c4a\u65f6\u60a8\u7684 logo \u6216\u8005 link \u53ef\u4ee5\u5c55\u793a\u5728\u672c\u9879\u76ee\u7684 README \u4e0a\u3002"),Object(b.b)("a",{href:"https://opencollective.com/gnet#sponsors",target:"_blank"},Object(b.b)("img",{src:"https://opencollective.com/gnet/sponsors.svg"})),Object(b.b)("h1",{id:"\ufe0f-\u6253\u8d4f"},"\u2615\ufe0f \u6253\u8d4f"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"\u5f53\u60a8\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fdb\u884c\u6350\u8d60\u65f6\uff0c\u8bf7\u52a1\u5fc5\u7559\u4e0b\u59d3\u540d\u3001Github\u8d26\u53f7\u6216\u5176\u4ed6\u793e\u4ea4\u5a92\u4f53\u8d26\u53f7\uff0c\u4ee5\u4fbf\u6211\u5c06\u5176\u6dfb\u52a0\u5230\u6350\u8d60\u8005\u540d\u5355\u4e2d\uff0c\u4ee5\u8868\u8c22\u610f\u3002")),Object(b.b)("table",null,Object(b.b)("tr",null,Object(b.b)("td",null,Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/WeChatPay.JPG",width:"250"})),Object(b.b)("td",null,Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/AliPay.JPG",width:"250"})),Object(b.b)("td",null,Object(b.b)("a",{href:"https://www.paypal.me/R136a1X",target:"_blank"},Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/PayPal.JPG",width:"250"}))))),Object(b.b)("h1",{id:"-\u8d44\u52a9\u8005"},"\ud83d\udcb4 \u8d44\u52a9\u8005"),Object(b.b)("a",{target:"_blank",href:"https://github.com/patrick-othmer"},Object(b.b)("img",{src:"https://avatars1.githubusercontent.com/u/8964313",width:"100",alt:"Patrick Othmer"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/panjf2000/gnet"},Object(b.b)("img",{src:"https://avatars2.githubusercontent.com/u/50285334",width:"100",alt:"Jimmy"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/cafra"},Object(b.b)("img",{src:"https://avatars0.githubusercontent.com/u/13758306",width:"100",alt:"ChenZhen"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/yangwenmai"},Object(b.b)("img",{src:"https://avatars0.githubusercontent.com/u/1710912",width:"100",alt:"Mai Yang"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/BeijingWks"},Object(b.b)("img",{src:"https://avatars3.githubusercontent.com/u/33656339",width:"100",alt:"\u738b\u5f00\u5e05"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/refs"},Object(b.b)("img",{src:"https://avatars3.githubusercontent.com/u/6905948",width:"100",alt:"Unger Alejandro"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/Swaggadan"},Object(b.b)("img",{src:"https://avatars.githubusercontent.com/u/137142",width:"100",alt:"Swaggadan"})),"\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/Wuvist"},Object(b.b)("img",{src:"https://avatars.githubusercontent.com/u/657796",width:"100",alt:"Weng Wei"})),Object(b.b)("h1",{id:"-jetbrains-\u5f00\u6e90\u8bc1\u4e66\u652f\u6301"},"\ud83d\udd11 JetBrains \u5f00\u6e90\u8bc1\u4e66\u652f\u6301"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u9879\u76ee\u4e00\u76f4\u4ee5\u6765\u90fd\u662f\u5728 JetBrains \u516c\u53f8\u65d7\u4e0b\u7684 GoLand \u96c6\u6210\u5f00\u53d1\u73af\u5883\u4e2d\u8fdb\u884c\u5f00\u53d1\uff0c\u57fa\u4e8e ",Object(b.b)("strong",{parentName:"p"},"free JetBrains Open Source license(s)")," \u6b63\u7248\u514d\u8d39\u6388\u6743\uff0c\u5728\u6b64\u8868\u8fbe\u6211\u7684\u8c22\u610f\u3002"),Object(b.b)("a",{href:"https://www.jetbrains.com/?from=gnet",target:"_blank"},Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/jetbrains/jetbrains-variant-4.png",width:"250",align:"middle"})),Object(b.b)("h1",{id:"-\u8d5e\u52a9\u5546"},"\ud83d\udd0b \u8d5e\u52a9\u5546"),Object(b.b)("p",null,Object(b.b)("h3",null,"\u672c\u9879\u76ee\u7531\u4ee5\u4e0b\u673a\u6784\u8d5e\u52a9\uff1a"),Object(b.b)("a",{href:"https://www.digitalocean.com/"},Object(b.b)("img",{src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg",width:"201px"}))))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return O}));var a=n(0),c=n.n(a);function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var l=c.a.createContext({}),p=function(e){var t=c.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},m=function(e){var t=p(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,b=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),m=p(n),u=a,O=m["".concat(r,".").concat(u)]||m[u]||s[u]||b;return n?c.a.createElement(O,i({ref:t},l,{components:n})):c.a.createElement(O,i({ref:t},l))}));function O(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var b=n.length,r=new Array(b);r[0]=u;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:a,r[1]=i;for(var l=2;l= 1.9\u3002"),Object(b.b)("h2",{id:"\u5b89\u88c5"},"\u5b89\u88c5"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"go get -u github.com/panjf2000/gnet\n")),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u652f\u6301\u4f5c\u4e3a\u4e00\u4e2a Go module \u88ab\u5bfc\u5165\uff0c\u57fa\u4e8e ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/golang/go/wiki/Modules"}),"Go 1.11 Modules")," (Go 1.11+)\uff0c\u53ea\u9700\u8981\u5728\u4f60\u7684\u9879\u76ee\u91cc\u76f4\u63a5 ",Object(b.b)("inlineCode",{parentName:"p"},'import "github.com/panjf2000/gnet"'),"\uff0c\u7136\u540e\u8fd0\u884c ",Object(b.b)("inlineCode",{parentName:"p"},"go [build|run|test]")," \u81ea\u52a8\u4e0b\u8f7d\u548c\u6784\u5efa\u9700\u8981\u7684\u4f9d\u8d56\u5305\u3002"),Object(b.b)("h2",{id:"\u4f7f\u7528\u793a\u4f8b"},"\u4f7f\u7528\u793a\u4f8b"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"\u8be6\u7ec6\u7684\u6587\u6863\u5728\u8fd9\u91cc: ",Object(b.b)("a",Object(a.a)({parentName:"strong"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc"}),"gnet \u63a5\u53e3\u6587\u6863"),"\uff0c\u4e0d\u8fc7\u4e0b\u9762\u6211\u4eec\u5148\u6765\u4e86\u89e3\u4e0b\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"strong"},"gnet")," \u7684\u7b80\u7565\u65b9\u6cd5\u3002")),Object(b.b)("p",null,"\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u6765\u6784\u5efa\u7f51\u7edc\u670d\u52a1\u5668\u662f\u975e\u5e38\u7b80\u5355\u7684\uff0c\u53ea\u9700\u8981\u5b9e\u73b0 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.EventHandler"),"\u63a5\u53e3\u7136\u540e\u628a\u4f60\u5173\u5fc3\u7684\u4e8b\u4ef6\u51fd\u6570\u6ce8\u518c\u5230\u91cc\u9762\uff0c\u6700\u540e\u628a\u5b83\u8fde\u540c\u76d1\u542c\u5730\u5740\u4e00\u8d77\u4f20\u9012\u7ed9 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Serve")," \u51fd\u6570\u5c31\u5b8c\u6210\u4e86\u3002\u5728\u670d\u52a1\u5668\u5f00\u59cb\u5de5\u4f5c\u4e4b\u540e\uff0c\u6bcf\u4e00\u6761\u5230\u6765\u7684\u7f51\u7edc\u8fde\u63a5\u4f1a\u5728\u5404\u4e2a\u4e8b\u4ef6\u4e4b\u95f4\u4f20\u9012\uff0c\u5982\u679c\u4f60\u60f3\u5728\u67d0\u4e2a\u4e8b\u4ef6\u4e2d\u5173\u95ed\u67d0\u6761\u8fde\u63a5\u6216\u8005\u5173\u6389\u6574\u4e2a\u670d\u52a1\u5668\u7684\u8bdd\uff0c\u76f4\u63a5\u5728\u4e8b\u4ef6\u51fd\u6570\u91cc\u628a ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Action")," \u8bbe\u7f6e\u6210 ",Object(b.b)("inlineCode",{parentName:"p"},"Close")," \u6216\u8005 ",Object(b.b)("inlineCode",{parentName:"p"},"Shutdown")," \u5c31\u884c\u4e86\u3002"),Object(b.b)("p",null,"Echo \u670d\u52a1\u5668\u662f\u4e00\u79cd\u6700\u7b80\u5355\u7f51\u7edc\u670d\u52a1\u5668\uff0c\u628a\u5b83\u4f5c\u4e3a ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u5165\u95e8\u4f8b\u5b50\u5728\u518d\u5408\u9002\u4e0d\u8fc7\u4e86\uff0c\u4e0b\u9762\u662f\u4e00\u4e2a\u6700\u7b80\u5355\u7684 echo server\uff0c\u5b83\u76d1\u542c\u4e86 9000 \u7aef\u53e3\uff1a"),Object(b.b)("h3",{id:"\u4e0d\u5e26\u963b\u585e\u903b\u8f91\u7684-echo-\u670d\u52a1\u5668"},"\u4e0d\u5e26\u963b\u585e\u903b\u8f91\u7684 echo \u670d\u52a1\u5668"),Object(b.b)("details",null,Object(b.b)("summary",null," Old version(<=v1.0.0-rc.4) "),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'package main\n\nimport (\n "log"\n\n "github.com/panjf2000/gnet"\n)\n\ntype echoServer struct {\n gnet.EventServer\n}\n\nfunc (es *echoServer) React(c gnet.Conn) (out []byte, action gnet.Action) {\n out = c.Read()\n c.ResetBuffer()\n return\n}\n\nfunc main() {\n echo := new(echoServer)\n log.Fatal(gnet.Serve(echo, "tcp://:9000", gnet.WithMulticore(true)))\n}\n'))),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'package main\n\nimport (\n "log"\n\n "github.com/panjf2000/gnet"\n)\n\ntype echoServer struct {\n gnet.EventServer\n}\n\nfunc (es *echoServer) React(frame []byte, c gnet.Conn) (out []byte, action gnet.Action) {\n out = frame\n return\n}\n\nfunc main() {\n echo := new(echoServer)\n log.Fatal(gnet.Serve(echo, "tcp://:9000", gnet.WithMulticore(true)))\n}\n')),Object(b.b)("p",null,"\u6b63\u5982\u4f60\u6240\u89c1\uff0c\u4e0a\u9762\u7684\u4f8b\u5b50\u91cc ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5b9e\u4f8b\u53ea\u6ce8\u518c\u4e86\u4e00\u4e2a ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u4e8b\u4ef6\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u4e3b\u8981\u7684\u4e1a\u52a1\u903b\u8f91\u4ee3\u7801\u4f1a\u5199\u5728\u8fd9\u4e2a\u4e8b\u4ef6\u65b9\u6cd5\u91cc\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u4f1a\u5728\u670d\u52a1\u5668\u63a5\u6536\u5230\u5ba2\u6237\u7aef\u5199\u8fc7\u6765\u7684\u6570\u636e\u4e4b\u65f6\u88ab\u8c03\u7528\uff0c\u6b64\u65f6\u7684\u8f93\u5165\u53c2\u6570: ",Object(b.b)("inlineCode",{parentName:"p"},"frame")," \u5df2\u7ecf\u662f\u89e3\u7801\u8fc7\u540e\u7684\u4e00\u4e2a\u5b8c\u6574\u7684\u7f51\u7edc\u6570\u636e\u5305\uff0c\u4e00\u822c\u6765\u8bf4\u4f60\u9700\u8981\u5b9e\u73b0 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc#ICodec"}),"codec \u63a5\u53e3"),"\u4f5c\u4e3a\u4f60\u81ea\u5df1\u7684\u4e1a\u52a1\u7f16\u89e3\u7801\u5668\u6765\u5904\u7406 TCP \u7ec4\u5305\u548c\u5206\u5305\u7684\u95ee\u9898\uff0c\u5982\u679c\u4f60\u4e0d\u5b9e\u73b0\u90a3\u4e2a\u63a5\u53e3\u7684\u8bdd\uff0c\u90a3\u4e48 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5c06\u4f1a\u4f7f\u7528",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc#BuiltInFrameCodec"}),"\u9ed8\u8ba4\u7684 codec"),"\uff0c\u8fd9\u610f\u5473\u7740\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u88ab\u89e6\u53d1\u8c03\u7528\u4e4b\u65f6\u8f93\u5165\u53c2\u6570: ",Object(b.b)("inlineCode",{parentName:"p"},"frame")," \u91cc\u5b58\u50a8\u7684\u662f\u6240\u6709\u7f51\u7edc\u6570\u636e\uff1a\u5305\u62ec\u6700\u65b0\u7684\u4ee5\u53ca\u8fd8\u5728 buffer \u91cc\u7684\u65e7\u6570\u636e\uff0c\u7136\u540e\u5904\u7406\u8f93\u5165\u6570\u636e\uff08\u8fd9\u91cc\u53ea\u662f\u628a\u6570\u636e echo \u56de\u53bb\uff09\u5e76\u4e14\u5728\u5904\u7406\u5b8c\u4e4b\u540e\u628a\u9700\u8981\u8f93\u51fa\u7684\u6570\u636e\u8d4b\u503c\u7ed9 ",Object(b.b)("inlineCode",{parentName:"p"},"out")," \u53d8\u91cf\u5e76\u8fd4\u56de\uff0c\u63a5\u7740\u8f93\u51fa\u7684\u6570\u636e\u4f1a\u7ecf\u8fc7\u7f16\u7801\uff0c\u6700\u540e\u88ab\u5199\u56de\u5ba2\u6237\u7aef\u3002"),Object(b.b)("h3",{id:"\u5e26\u963b\u585e\u903b\u8f91\u7684-echo-\u670d\u52a1\u5668"},"\u5e26\u963b\u585e\u903b\u8f91\u7684 echo \u670d\u52a1\u5668"),Object(b.b)("details",null,Object(b.b)("summary",null," Old version(<=v1.0.0-rc.4) "),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'package main\n\nimport (\n "log"\n "time"\n\n "github.com/panjf2000/gnet"\n "github.com/panjf2000/gnet/pool/goroutine"\n)\n\ntype echoServer struct {\n gnet.EventServer\n pool *goroutine.Pool\n}\n\nfunc (es *echoServer) React(c gnet.Conn) (out []byte, action gnet.Action) {\n data := append([]byte{}, c.Read()...)\n c.ResetBuffer()\n\n // Use ants pool to unblock the event-loop.\n _ = es.pool.Submit(func() {\n time.Sleep(1 * time.Second)\n c.AsyncWrite(data)\n })\n\n return\n}\n\nfunc main() {\n p := goroutine.Default()\n defer p.Release()\n\n echo := &echoServer{pool: p}\n log.Fatal(gnet.Serve(echo, "tcp://:9000", gnet.WithMulticore(true)))\n}\n'))),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'package main\n\nimport (\n "log"\n "time"\n\n "github.com/panjf2000/gnet"\n "github.com/panjf2000/gnet/pool/goroutine"\n)\n\ntype echoServer struct {\n gnet.EventServer\n pool *goroutine.Pool\n}\n\nfunc (es *echoServer) React(frame []byte, c gnet.Conn) (out []byte, action gnet.Action) {\n data := append([]byte{}, frame...)\n\n // Use ants pool to unblock the event-loop.\n _ = es.pool.Submit(func() {\n time.Sleep(1 * time.Second)\n c.AsyncWrite(data)\n })\n\n return\n}\n\nfunc main() {\n p := goroutine.Default()\n defer p.Release()\n\n echo := &echoServer{pool: p}\n log.Fatal(gnet.Serve(echo, "tcp://:9000", gnet.WithMulticore(true)))\n}\n')),Object(b.b)("p",null,"\u6b63\u5982\u6211\u5728\u300e\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60\u300f\u90a3\u4e00\u8282\u6240\u8bf4\u7684\u90a3\u6837\uff0c\u5982\u679c\u4f60\u7684\u4e1a\u52a1\u903b\u8f91\u91cc\u5305\u542b\u963b\u585e\u4ee3\u7801\uff0c\u90a3\u4e48\u4f60\u5e94\u8be5\u628a\u8fd9\u4e9b\u963b\u585e\u4ee3\u7801\u53d8\u6210\u975e\u963b\u585e\u7684\uff0c\u6bd4\u5982\u901a\u8fc7\u628a\u8fd9\u90e8\u5206\u4ee3\u7801\u653e\u5230\u72ec\u7acb\u7684 goroutines \u53bb\u8fd0\u884c\uff0c\u4f46\u662f\u8981\u6ce8\u610f\u4e00\u70b9\uff0c\u5982\u679c\u4f60\u7684\u670d\u52a1\u5668\u5904\u7406\u7684\u6d41\u91cf\u8db3\u591f\u7684\u5927\uff0c\u90a3\u4e48\u8fd9\u79cd\u505a\u6cd5\u5c06\u4f1a\u5bfc\u81f4\u521b\u5efa\u5927\u91cf\u7684 goroutines \u6781\u5927\u5730\u6d88\u8017\u7cfb\u7edf\u8d44\u6e90\uff0c\u6240\u4ee5\u6211\u4e00\u822c\u5efa\u8bae\u4f60\u7528 goroutine pool \u6765\u505a goroutines \u7684\u590d\u7528\u548c\u7ba1\u7406\uff0c\u4ee5\u53ca\u8282\u7701\u7cfb\u7edf\u8d44\u6e90\u3002"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"\u5404\u79cd gnet \u793a\u4f8b:")),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("p",{parentName:"li"},Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples/tree/984eed8bda54282f0d6cb2005ff48e529ae8980d"}),"v1.6.0 \u7248\u672c\u4e4b\u524d\u7684\u793a\u4f8b"))),Object(b.b)("li",{parentName:"ul"},Object(b.b)("p",{parentName:"li"},Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples/tree/master"}),"v1.6.x \u7cfb\u5217\u7684\u793a\u4f8b"))),Object(b.b)("li",{parentName:"ul"},Object(b.b)("p",{parentName:"li"},Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples"}),"v2.x.x \u7cfb\u5217\u7684\u793a\u4f8b")))),Object(b.b)("h2",{id:"io-\u4e8b\u4ef6"},"I/O \u4e8b\u4ef6"),Object(b.b)("p",null," ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u76ee\u524d\u652f\u6301\u7684 I/O \u4e8b\u4ef6\u5982\u4e0b\uff1a"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnInitComplete")," \u5f53 server \u521d\u59cb\u5316\u5b8c\u6210\u4e4b\u540e\u8c03\u7528\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnOpened")," \u5f53\u8fde\u63a5\u88ab\u6253\u5f00\u7684\u65f6\u5019\u8c03\u7528\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnClosed")," \u5f53\u8fde\u63a5\u88ab\u5173\u95ed\u7684\u4e4b\u540e\u8c03\u7528\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.React")," \u5f53 server \u7aef\u63a5\u6536\u5230\u4ece client \u7aef\u53d1\u9001\u6765\u7684\u6570\u636e\u7684\u65f6\u5019\u8c03\u7528\u3002\uff08\u4f60\u7684\u6838\u5fc3\u4e1a\u52a1\u4ee3\u7801\u4e00\u822c\u662f\u5199\u5728\u8fd9\u4e2a\u65b9\u6cd5\u91cc\uff09"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.Tick")," \u670d\u52a1\u5668\u542f\u52a8\u7684\u65f6\u5019\u4f1a\u8c03\u7528\u4e00\u6b21\uff0c\u4e4b\u540e\u5c31\u4ee5\u7ed9\u5b9a\u7684\u65f6\u95f4\u95f4\u9694\u5b9a\u65f6\u8c03\u7528\u4e00\u6b21\uff0c\u662f\u4e00\u4e2a\u5b9a\u65f6\u5668\u65b9\u6cd5\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.PreWrite")," \u9884\u5148\u5199\u6570\u636e\u65b9\u6cd5\uff0c\u5728 server \u7aef\u5199\u6570\u636e\u56de client \u7aef\u4e4b\u524d\u8c03\u7528\u3002")),Object(b.b)("h2",{id:"poll_opt-\u6a21\u5f0f"},"poll_opt \u6a21\u5f0f"),Object(b.b)("p",null,"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4f7f\u7528\u5b98\u65b9\u5305 ",Object(b.b)("inlineCode",{parentName:"p"},"golang.org/x/sys/unix")," \u5b9e\u73b0\u57fa\u4e8e ",Object(b.b)("inlineCode",{parentName:"p"},"epoll")," \u548c ",Object(b.b)("inlineCode",{parentName:"p"},"kqueue")," \u7684\u7f51\u7edc\u8f6e\u8be2\u5668 poller\uff0c\u8fd9\u79cd\u5b9e\u73b0\u9700\u8981\u5f15\u5165\u4e00\u4e2a ",Object(b.b)("inlineCode",{parentName:"p"},"fd->conn")," \u54c8\u5e0c\u8868\uff0c\u901a\u8fc7\u5b83\u53ef\u4ee5\u7528\u6587\u4ef6\u63cf\u8ff0\u7b26 ",Object(b.b)("inlineCode",{parentName:"p"},"fd")," \u627e\u5230\u5bf9\u5e94\u7684 ",Object(b.b)("inlineCode",{parentName:"p"},"connection")," \u7ed3\u6784\u4f53\uff0c\u4f46\u73b0\u5728\u7528\u6237\u53ef\u4ee5\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"go build")," \u7f16\u8bd1\u9879\u76ee\u7684\u65f6\u5019\u52a0\u5165\u6784\u5efa\u6807\u7b7e ",Object(b.b)("inlineCode",{parentName:"p"},"poll_opt"),"\uff0c\u50cf\u8fd9\u6837\uff1a",Object(b.b)("inlineCode",{parentName:"p"},"go build -tags=poll_opt"),"\uff0c\u7136\u540e ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4f1a\u5207\u6362\u5230\u53e6\u4e00\u79cd\u4f18\u5316\u7684\u5b9e\u73b0\uff0c\u76f4\u63a5\u8c03\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"epoll")," \u6216 ",Object(b.b)("inlineCode",{parentName:"p"},"kqueue")," \u7684\u7cfb\u7edf\u8c03\u7528\uff0c\u5c06\u6587\u4ef6\u63cf\u8ff0\u7b26\u6dfb\u52a0\u5230\u76d1\u63a7\u5217\u8868\u4e2d\uff0c\u540c\u65f6\u5c06\u76f8\u5e94\u7684 connection \u7ed3\u6784\u4f53\u6307\u9488\u5b58\u50a8\u5230 ",Object(b.b)("inlineCode",{parentName:"p"},"epoll_data")," \u6216 ",Object(b.b)("inlineCode",{parentName:"p"},"kevent")," \u4e2d\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5c31\u80fd\u5728 I/O \u4e8b\u4ef6\u5faa\u73af\u4e2d\u6446\u8131\u6389 ",Object(b.b)("inlineCode",{parentName:"p"},"fd->conn")," \u54c8\u5e0c\u8868\uff0c\u5c06 ",Object(b.b)("inlineCode",{parentName:"p"},"void*")," \u6307\u9488\u8f6c\u6362\u6210 ",Object(b.b)("inlineCode",{parentName:"p"},"connection")," \u7ed3\u6784\u4f53\u6307\u9488\uff0c\u901a\u8fc7\u8fd9\u79cd\u4f18\u5316\uff0c\u7406\u8bba\u4e0a\u5e94\u8be5\u53ef\u4ee5\u5f97\u5230\u66f4\u9ad8\u7684\u6027\u80fd\u3002"),Object(b.b)("p",null,"\u4ee3\u7801\u7ec6\u8282\u8bf7\u6d4f\u89c8 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/230"}),"#230"),"\u3002"),Object(b.b)("h2",{id:"\u5b9a\u65f6\u5668"},"\u5b9a\u65f6\u5668"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.Tick")," \u4f1a\u6bcf\u9694\u4e00\u6bb5\u65f6\u95f4\u89e6\u53d1\u4e00\u6b21\uff0c\u95f4\u9694\u65f6\u95f4\u4f60\u53ef\u4ee5\u81ea\u5df1\u63a7\u5236\uff0c\u8bbe\u5b9a\u8fd4\u56de\u7684 ",Object(b.b)("inlineCode",{parentName:"p"},"delay")," \u53d8\u91cf\u5c31\u884c\u3002"),Object(b.b)("p",null,"\u5b9a\u65f6\u5668\u7684\u7b2c\u4e00\u6b21\u89e6\u53d1\u662f\u5728 gnet server \u542f\u52a8\u4e4b\u540e\uff0c\u5982\u679c\u4f60\u8981\u8bbe\u7f6e\u5b9a\u65f6\u5668\uff0c\u522b\u5fd8\u4e86\u8bbe\u7f6e option \u9009\u9879\uff1a",Object(b.b)("inlineCode",{parentName:"p"},"WithTicker(true)"),"\u3002"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'events.Tick = func() (delay time.Duration, action Action){\n log.Printf("tick")\n delay = time.Second\n return\n}\n')),Object(b.b)("h2",{id:"udp-\u652f\u6301"},"UDP \u652f\u6301"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u652f\u6301 UDP \u534f\u8bae\uff0c\u6240\u4ee5\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Serve")," \u91cc\u7ed1\u5b9a\u5141\u8bb8\u7ed1\u5b9a UDP \u5730\u5740\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684 UDP \u652f\u6301\u6709\u5982\u4e0b\u7684\u7279\u6027\uff1a"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},"\u7f51\u7edc\u6570\u636e\u7684\u8bfb\u5165\u548c\u5199\u51fa\u4e0d\u505a\u7f13\u51b2\uff0c\u4f1a\u4e00\u6b21\u6027\u8bfb\u5199\u5ba2\u6237\u7aef\uff0c\u4e5f\u5c31\u662f\u8bf4 ",Object(b.b)("inlineCode",{parentName:"li"},"gnet.Conn")," \u6240\u6709\u90a3\u4e9b\u64cd\u4f5c\u5185\u90e8\u7684 buffer \u7684\u51fd\u6570\u90fd\u4e0d\u53ef\u7528\uff0c\u6bd4\u5982 ",Object(b.b)("inlineCode",{parentName:"li"},"c.Read()"),", ",Object(b.b)("inlineCode",{parentName:"li"},"c.ResetBuffer()"),", ",Object(b.b)("inlineCode",{parentName:"li"},"c.BufferLength()")," \u548c\u5176\u4ed6 buffer \u76f8\u5173\u7684\u51fd\u6570\uff1b\u4f7f\u7528\u8005\u4e0d\u80fd\u8c03\u7528\u4e0a\u8ff0\u90a3\u4e9b\u51fd\u6570\u53bb\u64cd\u4f5c\u6570\u636e\uff0c\u800c\u5e94\u8be5\u76f4\u63a5\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"li"},"gnet.React(frame []byte, c gnet.Conn)")," \u51fd\u6570\u5165\u53c2\u4e2d\u7684 ",Object(b.b)("inlineCode",{parentName:"li"},"frame []byte")," \u4f5c\u4e3a UDP \u6570\u636e\u5305\u3002"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnOpened")," \u548c ",Object(b.b)("inlineCode",{parentName:"li"},"EventHandler.OnClosed")," \u8fd9\u4e24\u4e2a\u4e8b\u4ef6\u5728 UDP \u4e0b\u4e0d\u53ef\u7528\uff0c\u552f\u4e00\u53ef\u7528\u7684\u4e8b\u4ef6\u662f ",Object(b.b)("inlineCode",{parentName:"li"},"React"),"\u3002"),Object(b.b)("li",{parentName:"ul"},"TCP \u91cc\u7684\u5f02\u6b65\u5199\u64cd\u4f5c\u662f ",Object(b.b)("inlineCode",{parentName:"li"},"AsyncWrite([]byte)")," \u65b9\u6cd5\uff0c\u800c\u5728 UDP \u91cc\u5bf9\u5e94\u7684\u65b9\u6cd5\u662f ",Object(b.b)("inlineCode",{parentName:"li"},"SendTo([]byte)"),"\u3002")),Object(b.b)("h2",{id:"unix-domain-socket-\u652f\u6301"},"Unix Domain Socket \u652f\u6301"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet"),' \u8fd8\u652f\u6301 UDS(Unix Domain Socket) \u673a\u5236\uff0c\u53ea\u9700\u8981\u628a\u7c7b\u4f3c "unix://xxx" \u7684 UDS \u5730\u5740\u4f20\u53c2\u7ed9 ',Object(b.b)("inlineCode",{parentName:"p"},"gnet.Serve")," \u51fd\u6570\u7ed1\u5b9a\u5c31\u884c\u4e86\u3002"),Object(b.b)("p",null,"\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u91cc\u4f7f\u7528 UDS \u548c\u4f7f\u7528 TCP \u6ca1\u6709\u4ec0\u4e48\u4e0d\u540c\uff0c\u6240\u6709 TCP \u534f\u8bae\u4e0b\u53ef\u4ee5\u4f7f\u7528\u7684\u4e8b\u4ef6\u51fd\u6570\u90fd\u53ef\u4ee5\u5728 UDS \u4e2d\u4f7f\u7528\u3002"),Object(b.b)("h2",{id:"\u4f7f\u7528\u591a\u6838"},"\u4f7f\u7528\u591a\u6838"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet.WithMulticore(true)")," \u53c2\u6570\u6307\u5b9a\u4e86 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u662f\u5426\u4f1a\u4f7f\u7528\u591a\u6838\u6765\u8fdb\u884c\u670d\u52a1\uff0c\u5982\u679c\u662f ",Object(b.b)("inlineCode",{parentName:"p"},"true")," \u7684\u8bdd\u5c31\u4f1a\u4f7f\u7528\u591a\u6838\uff0c\u5426\u5219\u5c31\u662f\u5355\u6838\u8fd0\u884c\uff0c\u5229\u7528\u7684\u6838\u5fc3\u6570\u4e00\u822c\u662f\u673a\u5668\u7684 CPU \u6570\u91cf\u3002"),Object(b.b)("h2",{id:"\u8d1f\u8f7d\u5747\u8861"},"\u8d1f\u8f7d\u5747\u8861"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u76ee\u524d\u652f\u6301\u4e09\u79cd\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\uff1a",Object(b.b)("inlineCode",{parentName:"p"},"Round-Robin(\u8f6e\u8be2)"),"\u3001",Object(b.b)("inlineCode",{parentName:"p"},"Source-Addr-Hash(\u6e90\u5730\u5740\u54c8\u5e0c)")," \u548c ",Object(b.b)("inlineCode",{parentName:"p"},"Least-Connections(\u6700\u5c11\u8fde\u63a5\u6570)"),"\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4f20\u9012 functional option \u7684 ",Object(b.b)("inlineCode",{parentName:"p"},"LB")," (RoundRobin/LeastConnections/SourceAddrHash) \u7684\u503c\u7ed9 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Serve")," \u6765\u6307\u5b9a\u8981\u4f7f\u7528\u7684\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\u3002"),Object(b.b)("p",null,"\u5982\u679c\u6ca1\u6709\u663e\u793a\u5730\u6307\u5b9a\uff0c\u90a3\u4e48 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5c06\u4f1a\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"Round-Robin")," \u4f5c\u4e3a\u9ed8\u8ba4\u7684\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\u3002"),Object(b.b)("h2",{id:"so_reuseport-\u7aef\u53e3\u590d\u7528"},"SO_REUSEPORT \u7aef\u53e3\u590d\u7528"),Object(b.b)("p",null,"\u670d\u52a1\u5668\u652f\u6301 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://lwn.net/Articles/542629/"}),"SO_REUSEPORT")," \u7aef\u53e3\u590d\u7528\u7279\u6027\uff0c\u5141\u8bb8\u591a\u4e2a sockets \u76d1\u542c\u540c\u4e00\u4e2a\u7aef\u53e3\uff0c\u7136\u540e\u5185\u6838\u4f1a\u5e2e\u4f60\u505a\u597d\u8d1f\u8f7d\u5747\u8861\uff0c\u6bcf\u6b21\u53ea\u5524\u9192\u4e00\u4e2a socket \u6765\u5904\u7406 ",Object(b.b)("inlineCode",{parentName:"p"},"connect")," \u8bf7\u6c42\uff0c\u907f\u514d\u60ca\u7fa4\u6548\u5e94\u3002"),Object(b.b)("p",null,"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4e0d\u4f1a\u6709\u60ca\u7fa4\u6548\u5e94\uff0c\u56e0\u4e3a ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u9ed8\u8ba4\u7684\u7f51\u7edc\u6a21\u578b\u662f\u4e3b\u4ece\u591a Reactors\uff0c\u53ea\u4f1a\u6709\u4e00\u4e2a\u4e3b reactor \u5728\u76d1\u542c\u7aef\u53e3\u4ee5\u53ca\u63a5\u6536\u65b0\u8fde\u63a5\u3002\u6240\u4ee5\uff0c\u5f00\u4e0d\u5f00\u542f ",Object(b.b)("inlineCode",{parentName:"p"},"SO_REUSEPORT")," \u9009\u9879\u662f\u65e0\u5173\u7d27\u8981\u7684\uff0c\u53ea\u662f\u5f00\u542f\u4e86\u8fd9\u4e2a\u9009\u9879\u4e4b\u540e ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u7f51\u7edc\u6a21\u578b\u5c06\u4f1a\u5207\u6362\u6210 ",Object(b.b)("inlineCode",{parentName:"p"},"evio")," \u7684\u65e7\u7f51\u7edc\u6a21\u578b\uff0c\u8fd9\u4e00\u70b9\u9700\u8981\u6ce8\u610f\u4e00\u4e0b\u3002"),Object(b.b)("p",null,"\u5f00\u542f\u8fd9\u4e2a\u529f\u80fd\u4e5f\u5f88\u7b80\u5355\uff0c\u4f7f\u7528 functional options \u8bbe\u7f6e\u4e00\u4e0b\u5373\u53ef\uff1a"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'gnet.Serve(events, "tcp://:9000", gnet.WithMulticore(true), gnet.WithReusePort(true)))\n')),Object(b.b)("h2",{id:"\u591a\u79cd\u5185\u7f6e\u7684-tcp-\u6d41\u7f16\u89e3\u7801\u5668"},"\u591a\u79cd\u5185\u7f6e\u7684 TCP \u6d41\u7f16\u89e3\u7801\u5668"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5185\u7f6e\u4e86\u591a\u79cd\u7528\u4e8e TCP \u6d41\u5206\u5305\u7684\u7f16\u89e3\u7801\u5668\u3002"),Object(b.b)("p",null,"\u76ee\u524d\u4e00\u5171\u5b9e\u73b0\u4e86 4 \u79cd\u5e38\u89c1\u7684\u7f16\u89e3\u7801\u5668\uff1aLineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec \u548c LengthFieldBasedFrameCodec\uff0c\u57fa\u672c\u4e0a\u80fd\u6ee1\u8db3\u5927\u591a\u6570\u5e94\u7528\u573a\u666f\u7684\u9700\u6c42\u4e86\uff1b\u800c\u4e14 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8fd8\u5141\u8bb8\u7528\u6237\u5b9e\u73b0\u81ea\u5df1\u7684\u7f16\u89e3\u7801\u5668\uff1a\u53ea\u9700\u8981\u5b9e\u73b0 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc#ICodec"}),"gnet.ICodec")," \u63a5\u53e3\uff0c\u5e76\u901a\u8fc7 functional options \u66ff\u6362\u6389\u5185\u90e8\u9ed8\u8ba4\u7684\u7f16\u89e3\u7801\u5668\u5373\u53ef\u3002"),Object(b.b)("p",null,"\u8fd9\u91cc\u6709\u4e00\u4e2a\u4f7f\u7528\u7f16\u89e3\u7801\u5668\u5bf9 TCP \u6d41\u5206\u5305\u7684",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples/tree/master/examples/codec"}),"\u4f8b\u5b50"),"\u3002"),Object(b.b)("h1",{id:"-\u6027\u80fd\u6d4b\u8bd5"},"\ud83d\udcca \u6027\u80fd\u6d4b\u8bd5"),Object(b.b)("h2",{id:"techempower-\u6027\u80fd\u6d4b\u8bd5"},"TechEmpower \u6027\u80fd\u6d4b\u8bd5"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),'# \u786c\u4ef6\u73af\u5883\n* 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 3.20GHz\n* 32GB RAM\n* Dedicated Cisco 10-gigabit Ethernet switch\n* Debian 12 "bookworm"\n* Go1.19.x linux/amd64\n')),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-top50-light.jpg",alt:null}))),Object(b.b)("p",null,"\u8fd9\u662f\u5305\u542b\u5168\u90e8\u7f16\u7a0b\u8bed\u8a00\u6846\u67b6\u7684\u6027\u80fd\u6392\u540d",Object(b.b)("strong",{parentName:"p"},Object(b.b)("em",{parentName:"strong"},"\u524d 50"))," \u7684\u7ed3\u679c\uff0c\u603b\u699c\u5355\u5305\u542b\u4e86\u5168\u4e16\u754c\u5171\u8ba1 ",Object(b.b)("strong",{parentName:"p"},Object(b.b)("em",{parentName:"strong"},"486"))," \u4e2a\u6846\u67b6\uff0c\u5176\u4e2d ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u6392\u540d",Object(b.b)("strong",{parentName:"p"},Object(b.b)("em",{parentName:"strong"},"\u7b2c\u4e00")),"\u3002"),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-topN-go-light.png",alt:null}))),Object(b.b)("p",null,"\u8fd9\u662f Go \u8bed\u8a00\u5206\u7c7b\u4e0b\u7684\u5168\u90e8\u6392\u540d\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8d85\u8d8a\u4e86\u5176\u4ed6\u6240\u6709\u6846\u67b6\uff0c\u4f4d\u5217\u7b2c\u4e00\uff0c\u662f",Object(b.b)("strong",{parentName:"p"},Object(b.b)("em",{parentName:"strong"},"\u6700\u5feb")),"\u7684 Go \u7f51\u7edc\u6846\u67b6\u3002"),Object(b.b)("p",null,"\u5b8c\u6574\u7684\u6392\u884c\u53ef\u4ee5\u901a\u8fc7 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.techempower.com/benchmarks/#hw=ph&test=plaintext§ion=data-r22"}),"TechEmpower Benchmark ",Object(b.b)("strong",{parentName:"a"},"Round 22"))," \u67e5\u770b\u3002"),Object(b.b)("h2",{id:"\u540c\u7c7b\u578b\u7684\u7f51\u7edc\u5e93\u6027\u80fd\u5bf9\u6bd4"},"\u540c\u7c7b\u578b\u7684\u7f51\u7edc\u5e93\u6027\u80fd\u5bf9\u6bd4"),Object(b.b)("h2",{id:"on-linux-epoll"},"On Linux (epoll)"),Object(b.b)("h3",{id:"test-environment"},"Test Environment"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"# Machine information\n OS : Ubuntu 20.04/x86_64\n CPU : 8 CPU cores, AMD EPYC 7K62 48-Core Processor\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.17.2 linux/amd64\nGOMAXPROCS : 8\n\n# Benchmark parameters\nTCP connections : 1000/2000/5000/10000\nPacket size : 512/1024/2048/4096/8192/16384/32768/65536 bytes\nTest duration : 15s\n")),Object(b.b)("h4",{id:"echo-benchmark"},Object(b.b)("a",Object(a.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_linux.png",alt:null}))),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_linux.png",alt:null}))),Object(b.b)("h2",{id:"on-macos-kqueue"},"On MacOS (kqueue)"),Object(b.b)("h3",{id:"test-environment-1"},"Test Environment"),Object(b.b)("pre",null,Object(b.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"# Machine information\n OS : MacOS Big Sur/x86_64\n CPU : 6 CPU cores, Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.16.5 darwin/amd64\nGOMAXPROCS : 12\n\n# Benchmark parameters\nTCP connections : 300/400/500/600/700\nPacket size : 512/1024/2048/4096/8192 bytes\nTest duration : 15s\n")),Object(b.b)("h4",{id:"echo-benchmark-1"},Object(b.b)("a",Object(a.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_macos.png",alt:null}))),Object(b.b)("p",null,Object(b.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_macos.png",alt:null}))),Object(b.b)("h1",{id:"\ufe0f-\u8bc1\u4e66"},"\ufe0f\ud83d\udea8 \u8bc1\u4e66"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u6e90\u7801\u5141\u8bb8\u7528\u6237\u5728\u9075\u5faa ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/blob/master/LICENSE"}),"MIT \u5f00\u6e90\u8bc1\u4e66")," \u89c4\u5219\u7684\u524d\u63d0\u4e0b\u4f7f\u7528\u3002"),Object(b.b)("h1",{id:"-\u8d21\u732e\u8005"},"\ud83d\udc4f \u8d21\u732e\u8005"),Object(b.b)("p",null,"\u8bf7\u5728\u63d0 PR \u4e4b\u524d\u4ed4\u7ec6\u9605\u8bfb ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/blob/master/CONTRIBUTING.md"}),"Contributing Guidelines"),"\uff0c\u611f\u8c22\u90a3\u4e9b\u4e3a ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8d21\u732e\u8fc7\u4ee3\u7801\u7684\u5f00\u53d1\u8005\uff01"),Object(b.b)("p",null,Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/graphs/contributors"}),Object(b.b)("img",Object(a.a)({parentName:"a"},{src:"https://opencollective.com/gnet/contributors.svg?width=890&button=false",alt:null})))),Object(b.b)("h1",{id:"-\u81f4\u8c22"},"\ud83d\ude4f \u81f4\u8c22"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/tidwall/evio"}),"evio")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/netty/netty"}),"netty")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/ants"}),"ants")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/kavu/go_reuseport"}),"go_reuseport")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/valyala/bytebufferpool"}),"bytebufferpool")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/smallnest/goframe"}),"goframe")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/smallnest/ringbuffer"}),"ringbuffer"))),Object(b.b)("h1",{id:"-\u76f8\u5173\u6587\u7ae0"},"\u2693 \u76f8\u5173\u6587\u7ae0"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://www.freecodecamp.org/news/million-websockets-and-go-cc58418460bb/"}),"A Million WebSockets and Go")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://speakerdeck.com/eranyanay/going-infinite-handling-1m-websockets-connections-in-go"}),"Going Infinite, handling 1M websockets connections in Go")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/go-netpoll-io-multiplexing-reactor"}),"Go netpoller \u539f\u751f\u7f51\u7edc\u6a21\u578b\u4e4b\u6e90\u7801\u5168\u9762\u63ed\u79d8")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/go-event-loop-networking-library-gnet"}),"gnet: \u4e00\u4e2a\u8f7b\u91cf\u7ea7\u4e14\u9ad8\u6027\u80fd\u7684 Golang \u7f51\u7edc\u5e93")),Object(b.b)("li",{parentName:"ul"},Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/releasing-gnet-v1-with-techempower"}),"\u6700\u5feb\u7684 Go \u7f51\u7edc\u6846\u67b6 gnet \u6765\u5566\uff01"))),Object(b.b)("h1",{id:"-\u7528\u6237\u6848\u4f8b"},"\ud83c\udfa1 \u7528\u6237\u6848\u4f8b"),Object(b.b)("p",null,"\u4ee5\u4e0b\u516c\u53f8/\u7ec4\u7ec7\u5728\u751f\u4ea7\u73af\u5883\u4e0a\u4f7f\u7528\u4e86 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4f5c\u4e3a\u5e95\u5c42\u7f51\u7edc\u670d\u52a1\u3002"),Object(b.b)("a",{href:"https://www.tencent.com"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/tencent_logo.png",width:"250",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://www.iqiyi.com",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/iqiyi-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://www.mi.com",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/mi-logo.png",width:"150",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://www.360.com",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/360-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://tieba.baidu.com/",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/baidu-tieba-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(b.b)("a",{href:"https://game.qq.com/",target:"_blank"},Object(b.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/tencent-games-logo.png",width:"200",align:"middle"})),Object(b.b)("p",null,"\u5982\u679c\u4f60\u7684\u9879\u76ee\u4e5f\u5728\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet"),"\uff0c\u6b22\u8fce\u7ed9\u6211\u63d0 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pulls"}),"Pull Request")," \u6765\u66f4\u65b0\u8fd9\u4efd\u7528\u6237\u6848\u4f8b\u5217\u8868\u3002"),Object(b.b)("h1",{id:"-\u652f\u6301"},"\ud83d\udcb0 \u652f\u6301"),Object(b.b)("p",null,"\u5982\u679c\u6709\u610f\u5411\uff0c\u53ef\u4ee5\u901a\u8fc7\u6bcf\u4e2a\u6708\u5b9a\u91cf\u7684\u5c11\u8bb8\u6350\u8d60\u6765\u652f\u6301\u8fd9\u4e2a\u9879\u76ee\u3002"),Object(b.b)("a",{href:"https://opencollective.com/gnet#backers",target:"_blank"},Object(b.b)("img",{src:"https://opencollective.com/gnet/backers.svg"})),Object(b.b)("h1",{id:"-\u8d5e\u52a9"},"\ud83d\udc8e \u8d5e\u52a9"),Object(b.b)("p",null,"\u6bcf\u6708\u5b9a\u91cf\u6350\u8d60 10 \u5200\u5373\u53ef\u6210\u4e3a\u672c\u9879\u76ee\u7684\u8d5e\u52a9\u8005\uff0c\u5c4a\u65f6\u60a8\u7684 logo \u6216\u8005 link \u53ef\u4ee5\u5c55\u793a\u5728\u672c\u9879\u76ee\u7684 README \u4e0a\u3002"),Object(b.b)("a",{href:"https://opencollective.com/gnet#sponsors",target:"_blank"},Object(b.b)("img",{src:"https://opencollective.com/gnet/sponsors.svg"})),Object(b.b)("h1",{id:"\ufe0f-\u6253\u8d4f"},"\u2615\ufe0f \u6253\u8d4f"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"\u5f53\u60a8\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fdb\u884c\u6350\u8d60\u65f6\uff0c\u8bf7\u52a1\u5fc5\u7559\u4e0b\u59d3\u540d\u3001Github\u8d26\u53f7\u6216\u5176\u4ed6\u793e\u4ea4\u5a92\u4f53\u8d26\u53f7\uff0c\u4ee5\u4fbf\u6211\u5c06\u5176\u6dfb\u52a0\u5230\u6350\u8d60\u8005\u540d\u5355\u4e2d\uff0c\u4ee5\u8868\u8c22\u610f\u3002")),Object(b.b)("table",null,Object(b.b)("tr",null,Object(b.b)("td",null,Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/WeChatPay.JPG",width:"250"})),Object(b.b)("td",null,Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/AliPay.JPG",width:"250"})),Object(b.b)("td",null,Object(b.b)("a",{href:"https://www.paypal.me/R136a1X",target:"_blank"},Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/PayPal.JPG",width:"250"}))))),Object(b.b)("h1",{id:"-\u8d44\u52a9\u8005"},"\ud83d\udcb4 \u8d44\u52a9\u8005"),Object(b.b)("a",{target:"_blank",href:"https://github.com/patrick-othmer"},Object(b.b)("img",{src:"https://avatars1.githubusercontent.com/u/8964313",width:"100",alt:"Patrick Othmer"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/panjf2000/gnet"},Object(b.b)("img",{src:"https://avatars2.githubusercontent.com/u/50285334",width:"100",alt:"Jimmy"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/cafra"},Object(b.b)("img",{src:"https://avatars0.githubusercontent.com/u/13758306",width:"100",alt:"ChenZhen"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/yangwenmai"},Object(b.b)("img",{src:"https://avatars0.githubusercontent.com/u/1710912",width:"100",alt:"Mai Yang"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/BeijingWks"},Object(b.b)("img",{src:"https://avatars3.githubusercontent.com/u/33656339",width:"100",alt:"\u738b\u5f00\u5e05"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/refs"},Object(b.b)("img",{src:"https://avatars3.githubusercontent.com/u/6905948",width:"100",alt:"Unger Alejandro"})),"\xa0\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/Swaggadan"},Object(b.b)("img",{src:"https://avatars.githubusercontent.com/u/137142",width:"100",alt:"Swaggadan"})),"\xa0",Object(b.b)("a",{target:"_blank",href:"https://github.com/Wuvist"},Object(b.b)("img",{src:"https://avatars.githubusercontent.com/u/657796",width:"100",alt:"Weng Wei"})),Object(b.b)("h1",{id:"-jetbrains-\u5f00\u6e90\u8bc1\u4e66\u652f\u6301"},"\ud83d\udd11 JetBrains \u5f00\u6e90\u8bc1\u4e66\u652f\u6301"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u9879\u76ee\u4e00\u76f4\u4ee5\u6765\u90fd\u662f\u5728 JetBrains \u516c\u53f8\u65d7\u4e0b\u7684 GoLand \u96c6\u6210\u5f00\u53d1\u73af\u5883\u4e2d\u8fdb\u884c\u5f00\u53d1\uff0c\u57fa\u4e8e ",Object(b.b)("strong",{parentName:"p"},"free JetBrains Open Source license(s)")," \u6b63\u7248\u514d\u8d39\u6388\u6743\uff0c\u5728\u6b64\u8868\u8fbe\u6211\u7684\u8c22\u610f\u3002"),Object(b.b)("a",{href:"https://www.jetbrains.com/?from=gnet",target:"_blank"},Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/jetbrains/jetbrains-variant-4.png",width:"250",align:"middle"})),Object(b.b)("h1",{id:"-\u8d5e\u52a9\u5546"},"\ud83d\udd0b \u8d5e\u52a9\u5546"),Object(b.b)("p",null,Object(b.b)("h3",null,"\u672c\u9879\u76ee\u7531\u4ee5\u4e0b\u673a\u6784\u8d5e\u52a9\uff1a"),Object(b.b)("a",{href:"https://www.digitalocean.com/"},Object(b.b)("img",{src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg",width:"201px"}))))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return O}));var a=n(0),c=n.n(a);function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var l=c.a.createContext({}),p=function(e){var t=c.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},m=function(e){var t=p(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,b=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),m=p(n),u=a,O=m["".concat(r,".").concat(u)]||m[u]||s[u]||b;return n?c.a.createElement(O,i({ref:t},l,{components:n})):c.a.createElement(O,i({ref:t},l))}));function O(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var b=n.length,r=new Array(b);r[0]=u;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:a,r[1]=i;for(var l=2;l - + - + - + @@ -32,11 +32,11 @@

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + - + - + diff --git a/43c76277.268c266c.js b/43c76277.7a4bcc1f.js similarity index 98% rename from 43c76277.268c266c.js rename to 43c76277.7a4bcc1f.js index 0e5cadfef..080c01ee9 100644 --- a/43c76277.268c266c.js +++ b/43c76277.7a4bcc1f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{174:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return s}));var r=n(1),a=n(9),o=(n(0),n(265)),i={last_modified_on:"2024-11-09",$schema:"/.meta/.schemas/highlights.json",title:"Release of gnet v2.6.0",description:"Release of the official stable version of v2.6.0",author_github:"https://github.com/panjf2000",pr_numbers:["2b0357c"],release:"2.6.0",hide_on_release_notes:!1,tags:["type: tag","domain: v2.6.0"]},c={date:"2024-11-09T00:00:00.000Z",description:"Release of the official stable version of v2.6.0",permalink:"/highlights/2024-11-09-release-of-gnet-v2-6-0",readingTime:"1 min read",source:"@site/highlights/2024-11-09-release-of-gnet-v2-6-0.md",tags:[{label:"type: tag",permalink:"/highlights/tags/type-tag"},{label:"domain: v2.6.0",permalink:"/highlights/tags/domain-v-2-6-0"}],title:"Release of gnet v2.6.0",truncated:!1,nextItem:{title:"Release of gnet v2.5.0",permalink:"/highlights/2024-04-22-release-of-gnet-v2-5-0"}},l=[],p={rightToc:l};function s(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},p,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,Object(o.b)("img",Object(r.a)({parentName:"p"},{src:"/img/gnet-v2-6-0.webp",alt:null}))),Object(o.b)("p",null,"I hereby announce the release of ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.6.0"}),"gnet v2.6.0"),", where we've added two major features of ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://man7.org/linux/man-pages/man7/socket.7.html"}),Object(o.b)("inlineCode",{parentName:"a"},"SO_BINDTODEVICE"))," and ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/646"}),"configurable edge-triggered chunk"),", along with a few bug-fixes."),Object(o.b)("p",null,"Another change to note is that starting with this release, the minimum required Go version to run ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is 1.20!"))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return g}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),b=r,g=u["".concat(i,".").concat(b)]||u[b]||f[b]||o;return n?a.a.createElement(g,c({ref:t},p,{components:n})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),b=r,g=u["".concat(i,".").concat(b)]||u[b]||f[b]||o;return n?a.a.createElement(g,c({ref:t},p,{components:n})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},u=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=p(r),f=n,h=u["".concat(i,".").concat(f)]||u[f]||m[f]||o;return r?a.a.createElement(h,c({ref:t},l,{components:r})):a.a.createElement(h,c({ref:t},l))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},u=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=p(r),f=n,h=u["".concat(i,".").concat(f)]||u[f]||m[f]||o;return r?a.a.createElement(h,c({ref:t},l,{components:r})):a.a.createElement(h,c({ref:t},l))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(n),d=r,g=u["".concat(i,".").concat(d)]||u[d]||b[d]||o;return n?a.a.createElement(g,c({ref:t},l,{components:n})):a.a.createElement(g,c({ref:t},l))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(n),d=r,g=u["".concat(i,".").concat(d)]||u[d]||b[d]||o;return n?a.a.createElement(g,c({ref:t},l,{components:n})):a.a.createElement(g,c({ref:t},l))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),s=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o({},t,{},e)),a},p=function(e){var t=s(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,c=e.originalType,i=e.parentName,l=b(e,["components","mdxType","originalType","parentName"]),p=s(a),m=n,u=p["".concat(i,".").concat(m)]||p[m]||f[m]||c;return a?r.a.createElement(u,o({ref:t},l,{components:a})):r.a.createElement(u,o({ref:t},l))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=a.length,i=new Array(c);i[0]=m;var o={};for(var b in t)hasOwnProperty.call(t,b)&&(o[b]=t[b]);o.originalType=e,o.mdxType="string"==typeof e?e:n,i[1]=o;for(var l=2;l=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),s=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o({},t,{},e)),a},p=function(e){var t=s(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,c=e.originalType,i=e.parentName,l=b(e,["components","mdxType","originalType","parentName"]),p=s(a),m=n,u=p["".concat(i,".").concat(m)]||p[m]||f[m]||c;return a?r.a.createElement(u,o({ref:t},l,{components:a})):r.a.createElement(u,o({ref:t},l))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=a.length,i=new Array(c);i[0]=m;var o={};for(var b in t)hasOwnProperty.call(t,b)&&(o[b]=t[b]);o.originalType=e,o.mdxType="string"==typeof e?e:n,i[1]=o;for(var l=2;l=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},m=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},h=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),m=s(r),h=n,u=m["".concat(i,".").concat(h)]||m[h]||b[h]||o;return r?a.a.createElement(u,c({ref:t},l,{components:r})):a.a.createElement(u,c({ref:t},l))}));function u(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=h;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},m=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},h=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),m=s(r),h=n,u=m["".concat(i,".").concat(h)]||m[h]||b[h]||o;return r?a.a.createElement(u,c({ref:t},l,{components:r})):a.a.createElement(u,c({ref:t},l))}));function u(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=h;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l0 to compute geomean\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(o.b)("p",null,"While we have performed sufficient testing on ",Object(o.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(o.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(o.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(o.b)("p",null,"Another significant leap is ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(o.b)("p",null,"Visit the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0-rc.1"}),"release notes")," for more details."))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),s=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,d=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return n?r.a.createElement(d,c({ref:t},p,{components:n})):r.a.createElement(d,c({ref:t},p))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var p=2;p0 to compute geomean\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(o.b)("p",null,"While we have performed sufficient testing on ",Object(o.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(o.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(o.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(o.b)("p",null,"Another significant leap is ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(o.b)("p",null,"Visit the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0-rc.1"}),"release notes")," for more details."))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),s=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,d=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return n?r.a.createElement(d,c({ref:t},p,{components:n})):r.a.createElement(d,c({ref:t},p))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var p=2;p8 procs, for 15s: tcp://127.0.0.1:7002\nAggregated Function Time : count 5795008 avg 0.0025874045 +/- 0.003243 min 1.1692e-05 max 0.093107062 sum 14994.0299\n# target 50% 0.00169983\n# target 75% 0.00399017\n# target 90% 0.00655109\n# target 99% 0.0141534\n# target 99.9% 0.0266069\nSockets used: 1000 (for perfect no error run, would be 1000)\nTotal Bytes sent: 5935112192, received: 5935112192\ntcp OK : 5795008 (100.0 %)\nAll done 5795008 calls (plus 1000 warmup) 2.587 ms avg, 386287.8 qps\n")),Object(o.b)("h4",{id:"v200"},"v2.0.0"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),"--- GNET ---\n\nWarming up for 1 seconds...\n2022/02/27 17:17:32 echo server with multi-core=true is listening on tcp://:7002\n\n--- BENCHMARK START ---\n*** 1000 connections, 15 seconds, packet size: 1024 bytes\n\nFortio dev running at 0 queries per second, 8->8 procs, for 15s: tcp://127.0.0.1:7002\nAggregated Function Time : count 6729707 avg 0.0022276692 +/- 0.00317 min 1.1902e-05 max 0.07715059 sum 14991.5608\n# target 50% 0.00132464\n# target 75% 0.00241054\n# target 90% 0.00502497\n# target 99% 0.016105\n# target 99.9% 0.0291019\nSockets used: 1000 (for perfect no error run, would be 1000)\nTotal Bytes sent: 6892243968, received: 6892243968\ntcp OK : 6729707 (100.0 %)\nAll done 6729707 calls (plus 1000 warmup) 2.228 ms avg, 448593.2 qps\n")),Object(o.b)("p",null,"The result shows that the performance of v2 is improved by about 16% compared to v1.x."),Object(o.b)("p",null,"Note that this is only a rough benchmark test result and it is done with the simple protocol -- echo, besides, with the benefits from vectored I/O, the performance ought to achieve even higher when it comes to some more complex scenarios, later we will do a more comprehensive benchmark test to get some more accurate results."))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},s=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,l=b(e,["components","mdxType","originalType","parentName"]),s=p(n),d=r,u=s["".concat(c,".").concat(d)]||s[d]||m[d]||o;return n?a.a.createElement(u,i({ref:t},l,{components:n})):a.a.createElement(u,i({ref:t},l))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,c=new Array(o);c[0]=d;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var l=2;l8 procs, for 15s: tcp://127.0.0.1:7002\nAggregated Function Time : count 5795008 avg 0.0025874045 +/- 0.003243 min 1.1692e-05 max 0.093107062 sum 14994.0299\n# target 50% 0.00169983\n# target 75% 0.00399017\n# target 90% 0.00655109\n# target 99% 0.0141534\n# target 99.9% 0.0266069\nSockets used: 1000 (for perfect no error run, would be 1000)\nTotal Bytes sent: 5935112192, received: 5935112192\ntcp OK : 5795008 (100.0 %)\nAll done 5795008 calls (plus 1000 warmup) 2.587 ms avg, 386287.8 qps\n")),Object(o.b)("h4",{id:"v200"},"v2.0.0"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),"--- GNET ---\n\nWarming up for 1 seconds...\n2022/02/27 17:17:32 echo server with multi-core=true is listening on tcp://:7002\n\n--- BENCHMARK START ---\n*** 1000 connections, 15 seconds, packet size: 1024 bytes\n\nFortio dev running at 0 queries per second, 8->8 procs, for 15s: tcp://127.0.0.1:7002\nAggregated Function Time : count 6729707 avg 0.0022276692 +/- 0.00317 min 1.1902e-05 max 0.07715059 sum 14991.5608\n# target 50% 0.00132464\n# target 75% 0.00241054\n# target 90% 0.00502497\n# target 99% 0.016105\n# target 99.9% 0.0291019\nSockets used: 1000 (for perfect no error run, would be 1000)\nTotal Bytes sent: 6892243968, received: 6892243968\ntcp OK : 6729707 (100.0 %)\nAll done 6729707 calls (plus 1000 warmup) 2.228 ms avg, 448593.2 qps\n")),Object(o.b)("p",null,"The result shows that the performance of v2 is improved by about 16% compared to v1.x."),Object(o.b)("p",null,"Note that this is only a rough benchmark test result and it is done with the simple protocol -- echo, besides, with the benefits from vectored I/O, the performance ought to achieve even higher when it comes to some more complex scenarios, later we will do a more comprehensive benchmark test to get some more accurate results."))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},s=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,l=b(e,["components","mdxType","originalType","parentName"]),s=p(n),d=r,u=s["".concat(c,".").concat(d)]||s[d]||m[d]||o;return n?a.a.createElement(u,i({ref:t},l,{components:n})):a.a.createElement(u,i({ref:t},l))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,c=new Array(o);c[0]=d;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var l=2;l1?t+"s":t}(s,"highlight"),' tagged with "',l,'"'),r.a.createElement("div",{className:"hero--subtitle"},r.a.createElement(o.a,{href:n},"View All Tags")))),r.a.createElement("main",{className:"container container--xs"},r.a.createElement(u.a,{items:a})))}},272:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return u}));var n=a(267);function r(){var e=Object(n.a)().siteConfig,t=(void 0===e?{}:e).customFields.metadata.latest_highlight,a=Date.parse(t.date),r=new Date,u=Math.abs(r-a),i=Math.ceil(u/864e5),o=null;return"undefined"!=typeof window&&(o=new Date(parseInt(window.localStorage.getItem("highlightsViewedAt")||"0"))),i<30&&(!o||o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(m.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(M,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),o.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(S,e))}))):null)}))),(s||u)&&r.a.createElement("div",{className:"text--center"},s&&s.src&&r.a.createElement("div",{className:"margin-bottom--sm"},s.href?r.a.createElement("a",{href:s.href,target:"_blank",rel:"noopener noreferrer",className:B.a.footerLogoLink},r.a.createElement(P,{alt:s.alt,url:c})):r.a.createElement(P,{alt:s.alt,url:c}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:B.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},H=a(290),I=a(291),z=a(3);a(135);t.a=function(e){var t=Object(h.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,o=(a.tagline,a.title),l=a.themeConfig.image,s=a.url,c=e.children,m=e.title,D=e.noFooter,d=e.description,f=e.image,g=e.keywords,p=(e.permalink,e.version),E=m?m+" | "+o:o,b=f||l,v=s+Object(C.a)(b),y=Object(C.a)(n),F=Object(z.h)(),w=F?"https://gnet.host"+(F.pathname.endsWith("/")?F.pathname:F.pathname+"/"):null;return r.a.createElement(I.a,null,r.a.createElement(H.a,null,r.a.createElement(i.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),E&&r.a.createElement("title",null,E),E&&r.a.createElement("meta",{property:"og:title",content:E}),n&&r.a.createElement("link",{rel:"shortcut icon",href:y}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),p&&r.a.createElement("meta",{name:"docsearch:version",content:p}),g&&g.length&&r.a.createElement("meta",{name:"keywords",content:g.join(",")}),b&&r.a.createElement("meta",{property:"og:image",content:v}),b&&r.a.createElement("meta",{property:"twitter:image",content:v}),b&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+E}),b&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),b&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),w&&r.a.createElement("meta",{property:"og:url",content:w}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),w&&r.a.createElement("link",{rel:"canonical",href:w})),r.a.createElement(u.a,null),r.a.createElement(T,null),r.a.createElement("div",{className:"main-wrapper"},c),!D&&r.a.createElement(L,null)))}},274:function(e,t,a){"use strict";var n=a(12),r=a(301)(5),u=!0;"find"in[]&&Array(1).find((function(){u=!1})),n(n.P+n.F*u,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a(80)("find")},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},278:function(e,t,a){"use strict";var n=a(9),r=a(0),u=a.n(r),i=a(266),o=a.n(i),l=a(267),s=(a(139),a(140)),c=a.n(s);t.a=function(e){return function(t){var a,r=t.id,i=Object(n.a)(t,["id"]),s=Object(l.a)().siteConfig,m=(s=void 0===s?{}:s).themeConfig,D=(m=void 0===m?{}:m).navbar,d=(D=void 0===D?{}:D).hideOnScroll,h=void 0!==d&&d;return r?u.a.createElement(e,i,u.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:o()("anchor",(a={},a[c.a.enhancedAnchor]=!h,a)),id:r}),u.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+r,title:"Direct link to heading"},"#"),i.children):u.a.createElement(e,i)}}},279:function(e,t,a){var n=a(288);e.exports=o;var r=Object.hasOwnProperty,u=/\s/g,i=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function o(){if(!(this instanceof o))return new o;this.reset()}function l(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(i,"").replace(n(),"").replace(u,"-"))}o.prototype.slug=function(e,t){for(var a=l(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},o.prototype.reset=function(){this.occurrences=Object.create(null)},o.slug=l},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),i=a(266),o=a.n(i);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,i=e.style,l=e.value,s=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:o()("badge","badge--rounded","badge--"+i)},s?l:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),i=a.n(u),o=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,l=e.nameSuffix,s=e.rel,c=e.size,m=e.subTitle,D=e.vertical,d=Object(o.a)().siteConfig,h=(void 0===d?{}:d).customFields.metadata.team,f=h.find((function(e){return e.github==u}))||h.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:i()("avatar",n,(t={},t["avatar--"+c]=c,t["avatar--vertical"]=D,t))},r.a.createElement("img",{className:i()("avatar__photo","avatar__photo--"+c),src:f.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:f.github,target:"_blank",rel:s},f.name),l),m&&r.a.createElement("small",{className:"avatar__subtitle"},m),!m&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:f.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),i=(a(268),a(287)),o=a(266),l=a.n(o),s=a(275),c=a(138),m=a.n(c);t.a=function(e){var t,a=e.block,r=e.colorProfile,o=e.tags,c=e.valuesOnly,D=Object(s.a)(o,r);return u.a.createElement("span",{className:l()(m.a.tags,(t={},t[m.a.tagsBlock]=a,t))},D.map((function(e,t){return u.a.createElement(i.a,Object(n.a)({key:t,valueOnly:c},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,i,o,l=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,i=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,o=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==D(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(l.masks[t]||t||l.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",h=e[d+"Date"](),f=e[d+"Day"](),g=e[d+"Month"](),p=e[d+"FullYear"](),E=e[d+"Hours"](),b=e[d+"Minutes"](),v=e[d+"Seconds"](),y=e[d+"Milliseconds"](),F=a?0:e.getTimezoneOffset(),C=c(e),w=m(e),k={d:h,dd:s(h),ddd:l.i18n.dayNames[f],dddd:l.i18n.dayNames[f+7],m:g+1,mm:s(g+1),mmm:l.i18n.monthNames[g],mmmm:l.i18n.monthNames[g+12],yy:String(p).slice(2),yyyy:p,h:E%12||12,hh:s(E%12||12),H:E,HH:s(E),M:b,MM:s(b),s:v,ss:s(v),l:s(y,3),L:s(Math.round(y/10)),t:E<12?l.i18n.timeNames[0]:l.i18n.timeNames[1],tt:E<12?l.i18n.timeNames[2]:l.i18n.timeNames[3],T:E<12?l.i18n.timeNames[4]:l.i18n.timeNames[5],TT:E<12?l.i18n.timeNames[6]:l.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(i)||[""]).pop().replace(o,""),o:(F>0?"-":"+")+s(100*Math.floor(Math.abs(F)/60)+Math.abs(F)%60,4),S:["th","st","nd","rd"][h%10>3?0:(h%100-h%10!=10)*h%10],W:C,N:w};return t.replace(u,(function(e){return e in k?k[e]:e.slice(1,e.length-1)}))});function s(e,t){for(e=String(e),t=t||2;e.lengthy;y++)if((D||y in E)&&(g=b(f=E[y],y,p),e))if(a)F[y]=g;else if(g)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:F.push(f)}else if(c)return!1;return m?-1:s||c?c:F}}},302:function(e,t,a){var n=a(303);e.exports=function(e,t){return new(n(e))(t)}},303:function(e,t,a){var n=a(14),r=a(323),u=a(2)("species");e.exports=function(e){var t;return r(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!r(t.prototype)||(t=void 0),n(t)&&null===(t=t[u])&&(t=void 0)),void 0===t?Array:t}},325:function(e,t,a){"use strict";var n=a(12),r=a(30),u=a(25),i=a(13),o=[].sort,l=[1,2,3];n(n.P+n.F*(i((function(){l.sort(void 0)}))||!i((function(){l.sort(null)}))||!a(326)(o)),"Array",{sort:function(e){return void 0===e?o.call(u(this)):o.call(u(this),r(e))}})},326:function(e,t,a){"use strict";var n=a(13);e.exports=function(e,t){return!!e&&n((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},327:function(e,t,a){e.exports=function(){var e=[],t=[],a={},n={},r={};function u(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function o(e,t){return e.replace(/\$(\d{1,2})/g,(function(e,a){return t[a]||""}))}function l(e,t){return e.replace(t[0],(function(a,n){var r=o(t[1],arguments);return i(""===a?e[n-1]:a,r)}))}function s(e,t,n){if(!e.length||a.hasOwnProperty(e))return t;for(var r=n.length;r--;){var u=n[r];if(u[0].test(t))return l(t,u)}return t}function c(e,t,a){return function(n){var r=n.toLowerCase();return t.hasOwnProperty(r)?i(n,r):e.hasOwnProperty(r)?i(n,e[r]):s(r,n,a)}}function m(e,t,a,n){return function(n){var r=n.toLowerCase();return!!t.hasOwnProperty(r)||!e.hasOwnProperty(r)&&s(r,r,a)===r}}function D(e,t,a){return(a?t+" ":"")+(1===t?D.singular(e):D.plural(e))}return D.plural=c(r,n,e),D.isPlural=m(r,n,e),D.singular=c(n,r,t),D.isSingular=m(n,r,t),D.addPluralRule=function(t,a){e.push([u(t),a])},D.addSingularRule=function(e,a){t.push([u(e),a])},D.addUncountableRule=function(e){"string"!=typeof e?(D.addPluralRule(e,"$0"),D.addSingularRule(e,"$0")):a[e.toLowerCase()]=!0},D.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),r[e]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return D.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return D.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return D.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\xe9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(D.addUncountableRule),D}()},333:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=["second","minute","hour","day","week","month","year"],i=["\u79d2","\u5206\u949f","\u5c0f\u65f6","\u5929","\u5468","\u4e2a\u6708","\u5e74"],o={},l=function(e,t){o[e]=t},s=function(e){return o[e]||o.en_US},c=[60,60,24,7,365/7/12,12];function m(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function D(e,t){for(var a=e<0?1:0,n=e=Math.abs(e),r=0;e>=c[r]&&r(0===(r*=2)?9:1)&&(r+=1),t(e,r,n)[a].replace("%s",e.toString())}function d(e,t){return(+(t?m(t):new Date)-+m(e))/1e3}function h(e){return parseInt(e.getAttribute("timeago-id"))}var f={},g=function(e){clearTimeout(e),delete f[e]};function p(e,t,a,n){g(h(e));var r=n.relativeDate,u=n.minInterval,i=d(t,r);e.innerText=D(i,a);var o=setTimeout((function(){p(e,t,a,n)}),Math.min(1e3*Math.max(function(e){for(var t=1,a=0,n=Math.abs(e);e>=c[a]&&a1&&(a+="s"),[e+" "+a+" ago","in "+e+" "+a]})),l("zh_CN",(function(e,t){if(0===t)return["\u521a\u521a","\u7247\u523b\u540e"];var a=i[~~(t/2)];return[e+" "+a+"\u524d",e+" "+a+"\u540e"]}));var b,v=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),y=function(){return(y=Object.assign||function(e){for(var t,a=1,n=arguments.length;a0&&u.a.createElement("div",null,u.a.createElement(s.a,{colorProfile:"blog",tags:F}))))},p=a(279),E=a.n(p),b=a(327),v=a.n(b),y=/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i,F=/[^\s:\u2013\u2014-]+|./g,C=/\s/,w=/.(?=[A-Z]|\..)/,k=/[A-Za-z0-9\u00C0-\u00FF]/;function N(e){for(var t,a="";null!==(t=F.exec(e));){var n=t[0],r=t.index;w.test(n)||y.test(n)&&0!==r&&r+n.length!==e.length||":"===e.charAt(r+n.length)&&!C.test(e.charAt(r+n.length+1))?a+=n:a+=n.replace(k,(function(e){return e.toUpperCase()}))}return a}Object(i.a)("h2");var $=Object(i.a)("h3");function A(e){var t=e.groupBy,a=e.group,n=new E.a;switch(t){case"release":return u.a.createElement("li",{className:"header sticky"},u.a.createElement("h3",null,u.a.createElement(l.a,{to:"/releases/"+a+"/"},N(a))));case"type":var r=null,i=v()(N(a)),o=null;switch(a){case"breaking change":r="alert-triangle",o="danger";break;case"enhancement":r="arrow-up-circle",o="pink";break;case"new feature":r="gift",o="primary";break;case"performance":r="zap",i="Performance Improvements",o="warning"}return u.a.createElement("li",{className:"header sticky"},u.a.createElement($,{id:n.slug(a+"-highlights"),className:"text--"+o},r&&u.a.createElement("i",{className:"feather icon-"+r})," ",i));default:throw Error("unknown group: "+t)}}t.a=function(e){var t=e.author,a=(e.clean,e.colorize),r=e.groupBy,i=e.items,o=e.tags,l=e.timeline,s=r||"release",c=function(e){return e.map((function(e){if(e.content){var t=e.content,a=t.frontMatter,n=t.metadata,r=a.author_github,u=a.pr_numbers,i=a.release,o=a.title,l=n.date,s=n.description,c=n.permalink,m=n.tags,D={};return D.authorGithub=r,D.dateString=l,D.description=s,D.permalink=c,D.prNumbers=u,D.release=i,D.tags=m,D.title=o,D}return e}))}(i),m=_.groupBy(c,s),d=!1!==l?Object.keys(m):Object.keys(m).sort();return u.a.createElement("ul",{className:D()("connected-list","connected-list--clean")},d.map((function(e,r){var i=m[e];return u.a.createElement(u.a.Fragment,null,u.a.createElement(A,{groupBy:s,group:e}),u.a.createElement("ul",{className:D()("connected-list",{"connected-list--timeline":!1!==l})},i.map((function(e,r){return u.a.createElement("li",{key:r},u.a.createElement(g,Object(n.a)({},e,{colorize:a,hideAuthor:0==t,hideTags:0==o})))}))))})))}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{183:function(e,t,a){"use strict";a.r(t);a(277);var n=a(0),r=a.n(n),u=a(346),i=a(273),o=a(268);t.default=function(e){var t=e.metadata,a=e.items,n=t.allTagsPath,l=t.name,s=t.count;return r.a.createElement(i.a,{title:'Highlights tagged "'+l+'"',description:'Highlight | Tagged "'+l+'"'},r.a.createElement("header",{className:"hero hero--clean"},r.a.createElement("div",{className:"container"},r.a.createElement("h1",null,s," ",function(e,t){return e>1?t+"s":t}(s,"highlight"),' tagged with "',l,'"'),r.a.createElement("div",{className:"hero--subtitle"},r.a.createElement(o.a,{href:n},"View All Tags")))),r.a.createElement("main",{className:"container container--xs"},r.a.createElement(u.a,{items:a})))}},272:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return u}));var n=a(267);function r(){var e=Object(n.a)().siteConfig,t=(void 0===e?{}:e).customFields.metadata.latest_highlight,a=Date.parse(t.date),r=new Date,u=Math.abs(r-a),i=Math.ceil(u/864e5),o=null;return"undefined"!=typeof window&&(o=new Date(parseInt(window.localStorage.getItem("highlightsViewedAt")||"0"))),i<30&&(!o||o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(m.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(M,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),o.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(S,e))}))):null)}))),(s||u)&&r.a.createElement("div",{className:"text--center"},s&&s.src&&r.a.createElement("div",{className:"margin-bottom--sm"},s.href?r.a.createElement("a",{href:s.href,target:"_blank",rel:"noopener noreferrer",className:B.a.footerLogoLink},r.a.createElement(P,{alt:s.alt,url:c})):r.a.createElement(P,{alt:s.alt,url:c}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:B.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},H=a(290),I=a(291),z=a(3);a(135);t.a=function(e){var t=Object(h.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,o=(a.tagline,a.title),l=a.themeConfig.image,s=a.url,c=e.children,m=e.title,D=e.noFooter,d=e.description,f=e.image,g=e.keywords,p=(e.permalink,e.version),E=m?m+" | "+o:o,b=f||l,v=s+Object(C.a)(b),y=Object(C.a)(n),F=Object(z.h)(),w=F?"https://gnet.host"+(F.pathname.endsWith("/")?F.pathname:F.pathname+"/"):null;return r.a.createElement(I.a,null,r.a.createElement(H.a,null,r.a.createElement(i.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),E&&r.a.createElement("title",null,E),E&&r.a.createElement("meta",{property:"og:title",content:E}),n&&r.a.createElement("link",{rel:"shortcut icon",href:y}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),p&&r.a.createElement("meta",{name:"docsearch:version",content:p}),g&&g.length&&r.a.createElement("meta",{name:"keywords",content:g.join(",")}),b&&r.a.createElement("meta",{property:"og:image",content:v}),b&&r.a.createElement("meta",{property:"twitter:image",content:v}),b&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+E}),b&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),b&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),w&&r.a.createElement("meta",{property:"og:url",content:w}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),w&&r.a.createElement("link",{rel:"canonical",href:w})),r.a.createElement(u.a,null),r.a.createElement(T,null),r.a.createElement("div",{className:"main-wrapper"},c),!D&&r.a.createElement(L,null)))}},274:function(e,t,a){"use strict";var n=a(12),r=a(301)(5),u=!0;"find"in[]&&Array(1).find((function(){u=!1})),n(n.P+n.F*u,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a(80)("find")},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},278:function(e,t,a){"use strict";var n=a(9),r=a(0),u=a.n(r),i=a(266),o=a.n(i),l=a(267),s=(a(139),a(140)),c=a.n(s);t.a=function(e){return function(t){var a,r=t.id,i=Object(n.a)(t,["id"]),s=Object(l.a)().siteConfig,m=(s=void 0===s?{}:s).themeConfig,D=(m=void 0===m?{}:m).navbar,d=(D=void 0===D?{}:D).hideOnScroll,h=void 0!==d&&d;return r?u.a.createElement(e,i,u.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:o()("anchor",(a={},a[c.a.enhancedAnchor]=!h,a)),id:r}),u.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+r,title:"Direct link to heading"},"#"),i.children):u.a.createElement(e,i)}}},279:function(e,t,a){var n=a(288);e.exports=o;var r=Object.hasOwnProperty,u=/\s/g,i=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function o(){if(!(this instanceof o))return new o;this.reset()}function l(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(i,"").replace(n(),"").replace(u,"-"))}o.prototype.slug=function(e,t){for(var a=l(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},o.prototype.reset=function(){this.occurrences=Object.create(null)},o.slug=l},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),i=a(266),o=a.n(i);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,i=e.style,l=e.value,s=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:o()("badge","badge--rounded","badge--"+i)},s?l:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),i=a.n(u),o=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,l=e.nameSuffix,s=e.rel,c=e.size,m=e.subTitle,D=e.vertical,d=Object(o.a)().siteConfig,h=(void 0===d?{}:d).customFields.metadata.team,f=h.find((function(e){return e.github==u}))||h.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:i()("avatar",n,(t={},t["avatar--"+c]=c,t["avatar--vertical"]=D,t))},r.a.createElement("img",{className:i()("avatar__photo","avatar__photo--"+c),src:f.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:f.github,target:"_blank",rel:s},f.name),l),m&&r.a.createElement("small",{className:"avatar__subtitle"},m),!m&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:f.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),i=(a(268),a(287)),o=a(266),l=a.n(o),s=a(275),c=a(138),m=a.n(c);t.a=function(e){var t,a=e.block,r=e.colorProfile,o=e.tags,c=e.valuesOnly,D=Object(s.a)(o,r);return u.a.createElement("span",{className:l()(m.a.tags,(t={},t[m.a.tagsBlock]=a,t))},D.map((function(e,t){return u.a.createElement(i.a,Object(n.a)({key:t,valueOnly:c},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,i,o,l=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,i=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,o=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==D(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(l.masks[t]||t||l.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",h=e[d+"Date"](),f=e[d+"Day"](),g=e[d+"Month"](),p=e[d+"FullYear"](),E=e[d+"Hours"](),b=e[d+"Minutes"](),v=e[d+"Seconds"](),y=e[d+"Milliseconds"](),F=a?0:e.getTimezoneOffset(),C=c(e),w=m(e),k={d:h,dd:s(h),ddd:l.i18n.dayNames[f],dddd:l.i18n.dayNames[f+7],m:g+1,mm:s(g+1),mmm:l.i18n.monthNames[g],mmmm:l.i18n.monthNames[g+12],yy:String(p).slice(2),yyyy:p,h:E%12||12,hh:s(E%12||12),H:E,HH:s(E),M:b,MM:s(b),s:v,ss:s(v),l:s(y,3),L:s(Math.round(y/10)),t:E<12?l.i18n.timeNames[0]:l.i18n.timeNames[1],tt:E<12?l.i18n.timeNames[2]:l.i18n.timeNames[3],T:E<12?l.i18n.timeNames[4]:l.i18n.timeNames[5],TT:E<12?l.i18n.timeNames[6]:l.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(i)||[""]).pop().replace(o,""),o:(F>0?"-":"+")+s(100*Math.floor(Math.abs(F)/60)+Math.abs(F)%60,4),S:["th","st","nd","rd"][h%10>3?0:(h%100-h%10!=10)*h%10],W:C,N:w};return t.replace(u,(function(e){return e in k?k[e]:e.slice(1,e.length-1)}))});function s(e,t){for(e=String(e),t=t||2;e.lengthy;y++)if((D||y in E)&&(g=b(f=E[y],y,p),e))if(a)F[y]=g;else if(g)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:F.push(f)}else if(c)return!1;return m?-1:s||c?c:F}}},302:function(e,t,a){var n=a(303);e.exports=function(e,t){return new(n(e))(t)}},303:function(e,t,a){var n=a(14),r=a(323),u=a(2)("species");e.exports=function(e){var t;return r(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!r(t.prototype)||(t=void 0),n(t)&&null===(t=t[u])&&(t=void 0)),void 0===t?Array:t}},325:function(e,t,a){"use strict";var n=a(12),r=a(30),u=a(25),i=a(13),o=[].sort,l=[1,2,3];n(n.P+n.F*(i((function(){l.sort(void 0)}))||!i((function(){l.sort(null)}))||!a(326)(o)),"Array",{sort:function(e){return void 0===e?o.call(u(this)):o.call(u(this),r(e))}})},326:function(e,t,a){"use strict";var n=a(13);e.exports=function(e,t){return!!e&&n((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},327:function(e,t,a){e.exports=function(){var e=[],t=[],a={},n={},r={};function u(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function o(e,t){return e.replace(/\$(\d{1,2})/g,(function(e,a){return t[a]||""}))}function l(e,t){return e.replace(t[0],(function(a,n){var r=o(t[1],arguments);return i(""===a?e[n-1]:a,r)}))}function s(e,t,n){if(!e.length||a.hasOwnProperty(e))return t;for(var r=n.length;r--;){var u=n[r];if(u[0].test(t))return l(t,u)}return t}function c(e,t,a){return function(n){var r=n.toLowerCase();return t.hasOwnProperty(r)?i(n,r):e.hasOwnProperty(r)?i(n,e[r]):s(r,n,a)}}function m(e,t,a,n){return function(n){var r=n.toLowerCase();return!!t.hasOwnProperty(r)||!e.hasOwnProperty(r)&&s(r,r,a)===r}}function D(e,t,a){return(a?t+" ":"")+(1===t?D.singular(e):D.plural(e))}return D.plural=c(r,n,e),D.isPlural=m(r,n,e),D.singular=c(n,r,t),D.isSingular=m(n,r,t),D.addPluralRule=function(t,a){e.push([u(t),a])},D.addSingularRule=function(e,a){t.push([u(e),a])},D.addUncountableRule=function(e){"string"!=typeof e?(D.addPluralRule(e,"$0"),D.addSingularRule(e,"$0")):a[e.toLowerCase()]=!0},D.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),r[e]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return D.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return D.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return D.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\xe9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(D.addUncountableRule),D}()},333:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=["second","minute","hour","day","week","month","year"],i=["\u79d2","\u5206\u949f","\u5c0f\u65f6","\u5929","\u5468","\u4e2a\u6708","\u5e74"],o={},l=function(e,t){o[e]=t},s=function(e){return o[e]||o.en_US},c=[60,60,24,7,365/7/12,12];function m(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function D(e,t){for(var a=e<0?1:0,n=e=Math.abs(e),r=0;e>=c[r]&&r(0===(r*=2)?9:1)&&(r+=1),t(e,r,n)[a].replace("%s",e.toString())}function d(e,t){return(+(t?m(t):new Date)-+m(e))/1e3}function h(e){return parseInt(e.getAttribute("timeago-id"))}var f={},g=function(e){clearTimeout(e),delete f[e]};function p(e,t,a,n){g(h(e));var r=n.relativeDate,u=n.minInterval,i=d(t,r);e.innerText=D(i,a);var o=setTimeout((function(){p(e,t,a,n)}),Math.min(1e3*Math.max(function(e){for(var t=1,a=0,n=Math.abs(e);e>=c[a]&&a1&&(a+="s"),[e+" "+a+" ago","in "+e+" "+a]})),l("zh_CN",(function(e,t){if(0===t)return["\u521a\u521a","\u7247\u523b\u540e"];var a=i[~~(t/2)];return[e+" "+a+"\u524d",e+" "+a+"\u540e"]}));var b,v=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),y=function(){return(y=Object.assign||function(e){for(var t,a=1,n=arguments.length;a0&&u.a.createElement("div",null,u.a.createElement(s.a,{colorProfile:"blog",tags:F}))))},p=a(279),E=a.n(p),b=a(327),v=a.n(b),y=/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i,F=/[^\s:\u2013\u2014-]+|./g,C=/\s/,w=/.(?=[A-Z]|\..)/,k=/[A-Za-z0-9\u00C0-\u00FF]/;function N(e){for(var t,a="";null!==(t=F.exec(e));){var n=t[0],r=t.index;w.test(n)||y.test(n)&&0!==r&&r+n.length!==e.length||":"===e.charAt(r+n.length)&&!C.test(e.charAt(r+n.length+1))?a+=n:a+=n.replace(k,(function(e){return e.toUpperCase()}))}return a}Object(i.a)("h2");var $=Object(i.a)("h3");function A(e){var t=e.groupBy,a=e.group,n=new E.a;switch(t){case"release":return u.a.createElement("li",{className:"header sticky"},u.a.createElement("h3",null,u.a.createElement(l.a,{to:"/releases/"+a+"/"},N(a))));case"type":var r=null,i=v()(N(a)),o=null;switch(a){case"breaking change":r="alert-triangle",o="danger";break;case"enhancement":r="arrow-up-circle",o="pink";break;case"new feature":r="gift",o="primary";break;case"performance":r="zap",i="Performance Improvements",o="warning"}return u.a.createElement("li",{className:"header sticky"},u.a.createElement($,{id:n.slug(a+"-highlights"),className:"text--"+o},r&&u.a.createElement("i",{className:"feather icon-"+r})," ",i));default:throw Error("unknown group: "+t)}}t.a=function(e){var t=e.author,a=(e.clean,e.colorize),r=e.groupBy,i=e.items,o=e.tags,l=e.timeline,s=r||"release",c=function(e){return e.map((function(e){if(e.content){var t=e.content,a=t.frontMatter,n=t.metadata,r=a.author_github,u=a.pr_numbers,i=a.release,o=a.title,l=n.date,s=n.description,c=n.permalink,m=n.tags,D={};return D.authorGithub=r,D.dateString=l,D.description=s,D.permalink=c,D.prNumbers=u,D.release=i,D.tags=m,D.title=o,D}return e}))}(i),m=_.groupBy(c,s),d=!1!==l?Object.keys(m):Object.keys(m).sort();return u.a.createElement("ul",{className:D()("connected-list","connected-list--clean")},d.map((function(e,r){var i=m[e];return u.a.createElement(u.a.Fragment,null,u.a.createElement(A,{groupBy:s,group:e}),u.a.createElement("ul",{className:D()("connected-list",{"connected-list--timeline":!1!==l})},i.map((function(e,r){return u.a.createElement("li",{key:r},u.a.createElement(g,Object(n.a)({},e,{colorize:a,hideAuthor:0==t,hideTags:0==o})))}))))})))}}}]); \ No newline at end of file diff --git a/5d1574ce.0d244604.js b/5d1574ce.9221b26f.js similarity index 99% rename from 5d1574ce.0d244604.js rename to 5d1574ce.9221b26f.js index e1ebd8660..35b2d6b17 100644 --- a/5d1574ce.0d244604.js +++ b/5d1574ce.9221b26f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{185:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),u=a(292),l=a(328),i=a(278),c=a(273),o=a(268),s=a(299),D=a(265),m=a(339),d=a(293),E=a(333),f=a(266),p=a.n(f),h=a(294),g=a.n(h),b=a(275),v=a(186),y=a.n(v),F=Object(i.a)("h2");Object(i.a)("h3");function C(e){var t=e.release;return"features"==t?r.a.createElement(r.a.Fragment,null,"This kind of change with the `new feature` tag brings new features to gnet. Feel free to have a galance through ",r.a.createElement(o.a,{to:"/releases/nightly/download/"},"all those commits")," of new features if you are interested."):r.a.createElement("p",null,"This change was made available in ",r.a.createElement(o.a,{to:"https://github.com/panjf2000/gnet/releases/tag/v"+t+"/"},t),".")}t.default=function(e){var t=e.content,a=t.frontMatter,n=t.metadata,i=a.author_github,o=a.description,f=(a.id,a.pr_numbers),h=a.release,v=a.title,N=n.date,_=n.tags,O=new Date(Date.parse(N)),k=g()(O,"mmm dS, yyyy"),w=Object(b.a)(_,"highlights");return w=w.concat(f.map((function(e){return{enriched:!0,label:r.a.createElement(r.a.Fragment,null,r.a.createElement("i",{className:"feather icon-git-pull-request"})," ",e),permalink:"https://github.com/panjf2000/gnet/commit/"+e,style:"secondary"}}))),r.a.createElement(c.a,{title:v,description:v+", in minutes, for free"},r.a.createElement("article",{className:y.a.blogPost},r.a.createElement("header",{className:p()("hero","domain-bg","domain-bg--nodes",y.a.header)},r.a.createElement("div",{className:p()("container",y.a.headerContainer)},r.a.createElement("div",{class:"hero--avatar"},r.a.createElement(u.a,{github:i,size:"lg",nameSuffix:r.a.createElement(r.a.Fragment,null," / ",k," / ",r.a.createElement(E.a,{pubdate:"pubdate",title:k,datetime:O})),rel:"author",subTitle:!1,vertical:!0})),r.a.createElement("h1",null,v),r.a.createElement("div",{class:"hero--subtitle"},o),r.a.createElement("div",{className:"hero--tags"},r.a.createElement(d.a,{colorProfile:"blog",tags:w})))),r.a.createElement("div",{className:"container container--xs margin-vert--xl"},r.a.createElement("section",{className:"markdown"},r.a.createElement(D.a,{components:s.a},r.a.createElement(t,null))),r.a.createElement("section",null,r.a.createElement(F,{id:"get"},"Get This Change"),r.a.createElement(C,{release:h})),r.a.createElement("section",null,r.a.createElement(F,{id:"cta"},"Like What You See?"),r.a.createElement(l.a,null)),(n.nextItem||n.prevItem)&&r.a.createElement("div",{className:"margin-vert--xl"},r.a.createElement(m.a,{next:n.nextItem,previous:n.prevItem})))))}},265:function(e,t,a){"use strict";a.d(t,"a",(function(){return D})),a.d(t,"b",(function(){return E}));var n=a(0),r=a.n(n);function u(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),s=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},D=function(e){var t=s(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,u=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),D=s(a),d=n,E=D["".concat(l,".").concat(d)]||D[d]||m[d]||u;return a?r.a.createElement(E,i({ref:t},o,{components:a})):r.a.createElement(E,i({ref:t},o))}));function E(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var u=a.length,l=new Array(u);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:n,l[1]=i;for(var o=2;o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(D.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(B,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(o||u)&&r.a.createElement("div",{className:"text--center"},o&&o.src&&r.a.createElement("div",{className:"margin-bottom--sm"},o.href?r.a.createElement("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement(L,{alt:o.alt,url:s})):r.a.createElement(L,{alt:o.alt,url:s}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},I=a(290),U=a(291),W=a(3);a(135);t.a=function(e){var t=Object(E.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,i=(a.tagline,a.title),c=a.themeConfig.image,o=a.url,s=e.children,D=e.title,m=e.noFooter,d=e.description,f=e.image,p=e.keywords,h=(e.permalink,e.version),g=D?D+" | "+i:i,b=f||c,v=o+Object(C.a)(b),y=Object(C.a)(n),F=Object(W.h)(),N=F?"https://gnet.host"+(F.pathname.endsWith("/")?F.pathname:F.pathname+"/"):null;return r.a.createElement(U.a,null,r.a.createElement(I.a,null,r.a.createElement(l.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),g&&r.a.createElement("title",null,g),g&&r.a.createElement("meta",{property:"og:title",content:g}),n&&r.a.createElement("link",{rel:"shortcut icon",href:y}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),h&&r.a.createElement("meta",{name:"docsearch:version",content:h}),p&&p.length&&r.a.createElement("meta",{name:"keywords",content:p.join(",")}),b&&r.a.createElement("meta",{property:"og:image",content:v}),b&&r.a.createElement("meta",{property:"twitter:image",content:v}),b&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+g}),b&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),b&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),N&&r.a.createElement("meta",{property:"og:url",content:N}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),N&&r.a.createElement("link",{rel:"canonical",href:N})),r.a.createElement(u.a,null),r.a.createElement(A,null),r.a.createElement("div",{className:"main-wrapper"},s),!m&&r.a.createElement(H,null)))}},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},279:function(e,t,a){var n=a(288);e.exports=i;var r=Object.hasOwnProperty,u=/\s/g,l=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function i(){if(!(this instanceof i))return new i;this.reset()}function c(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(l,"").replace(n(),"").replace(u,"-"))}i.prototype.slug=function(e,t){for(var a=c(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},i.prototype.reset=function(){this.occurrences=Object.create(null)},i.slug=c},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),l=a(266),i=a.n(l);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,l=e.style,c=e.value,o=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:i()("badge","badge--rounded","badge--"+l)},o?c:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),l=a.n(u),i=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,c=e.nameSuffix,o=e.rel,s=e.size,D=e.subTitle,m=e.vertical,d=Object(i.a)().siteConfig,E=(void 0===d?{}:d).customFields.metadata.team,f=E.find((function(e){return e.github==u}))||E.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:l()("avatar",n,(t={},t["avatar--"+s]=s,t["avatar--vertical"]=m,t))},r.a.createElement("img",{className:l()("avatar__photo","avatar__photo--"+s),src:f.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:f.github,target:"_blank",rel:o},f.name),c),D&&r.a.createElement("small",{className:"avatar__subtitle"},D),!D&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:f.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=(a(268),a(287)),i=a(266),c=a.n(i),o=a(275),s=a(138),D=a.n(s);t.a=function(e){var t,a=e.block,r=e.colorProfile,i=e.tags,s=e.valuesOnly,m=Object(o.a)(i,r);return u.a.createElement("span",{className:c()(D.a.tags,(t={},t[D.a.tagsBlock]=a,t))},m.map((function(e,t){return u.a.createElement(l.a,Object(n.a)({key:t,valueOnly:s},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,l,i,c=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,i=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==m(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(c.masks[t]||t||c.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",E=e[d+"Date"](),f=e[d+"Day"](),p=e[d+"Month"](),h=e[d+"FullYear"](),g=e[d+"Hours"](),b=e[d+"Minutes"](),v=e[d+"Seconds"](),y=e[d+"Milliseconds"](),F=a?0:e.getTimezoneOffset(),C=s(e),N=D(e),_={d:E,dd:o(E),ddd:c.i18n.dayNames[f],dddd:c.i18n.dayNames[f+7],m:p+1,mm:o(p+1),mmm:c.i18n.monthNames[p],mmmm:c.i18n.monthNames[p+12],yy:String(h).slice(2),yyyy:h,h:g%12||12,hh:o(g%12||12),H:g,HH:o(g),M:b,MM:o(b),s:v,ss:o(v),l:o(y,3),L:o(Math.round(y/10)),t:g<12?c.i18n.timeNames[0]:c.i18n.timeNames[1],tt:g<12?c.i18n.timeNames[2]:c.i18n.timeNames[3],T:g<12?c.i18n.timeNames[4]:c.i18n.timeNames[5],TT:g<12?c.i18n.timeNames[6]:c.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(l)||[""]).pop().replace(i,""),o:(F>0?"-":"+")+o(100*Math.floor(Math.abs(F)/60)+Math.abs(F)%60,4),S:["th","st","nd","rd"][E%10>3?0:(E%100-E%10!=10)*E%10],W:C,N:N};return t.replace(u,(function(e){return e in _?_[e]:e.slice(1,e.length-1)}))});function o(e,t){for(e=String(e),t=t||2;e.length0}))}l&&v.test(l)&&(w=l.match(v)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return O.current&&(e=new i.a(O.current,{target:function(){return _.current}})),function(){e&&e.destroy()}}),[O.current,_.current]);var S=a&&a.replace(/language-/,"");!S&&s.defaultLanguage&&(S=s.defaultLanguage);var x=function(){window.getSelection().empty(),y(!0),setTimeout((function(){return y(!1)}),2e3)};return u.a.createElement(c.a,Object(n.a)({},c.b,{key:C,theme:M,code:t.trim(),language:S}),(function(e){var t,a,r=e.className,l=e.style,i=e.tokens,c=e.getLineProps,o=e.getTokenProps;return u.a.createElement(u.a.Fragment,null,w&&u.a.createElement("div",{style:l,className:g.a.codeBlockTitle},w),u.a.createElement("div",{className:g.a.codeBlockContent},u.a.createElement("button",{ref:O,type:"button","aria-label":"Copy code to clipboard",className:D()(g.a.copyButton,(t={},t[g.a.copyButtonWithTitle]=w,t)),onClick:x},h?"Copied":"Copy"),u.a.createElement("pre",{className:D()(r,g.a.codeBlock,(a={},a[g.a.codeBlockWithTitle]=w,a))},u.a.createElement("div",{ref:_,className:g.a.codeBlockLines,style:l},i.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=c({line:e,key:t});return k.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),u.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return u.a.createElement("span",Object(n.a)({key:t},o({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=a(268),i=a(297),c=a(278),o=a(141),s=a.n(o);t.a={code:function(e){var t=e.children;return"string"==typeof t?u.a.createElement(i.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?u.a.createElement("a",e):u.a.createElement(l.a,e)},pre:function(e){return u.a.createElement("div",Object(n.a)({className:s.a.mdxCodeBlock},e))},h1:Object(c.a)("h1"),h2:Object(c.a)("h2"),h3:Object(c.a)("h3"),h4:Object(c.a)("h4"),h5:Object(c.a)("h5"),h6:Object(c.a)("h6")}},328:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(266),l=a.n(u);t.a=function(e){var t=e.github,a=e.inline,n=e.size,u=e.style,i=l()("panel","panel--button","panel--"+n,"panel--"+u,{"panel--button--inline":a});return r.a.createElement("div",{className:"row row--squished"},r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-twitter",title:"Twitter"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Follow @panjf2000"),r.a.createElement("div",{className:"panel--description"},"Get real-time updates!")))),0!=t&&r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-github"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Star panjf2000/gnet"),r.a.createElement("div",{className:"panel--description"},"Star the repo to support us.")))))}},333:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=["second","minute","hour","day","week","month","year"],l=["\u79d2","\u5206\u949f","\u5c0f\u65f6","\u5929","\u5468","\u4e2a\u6708","\u5e74"],i={},c=function(e,t){i[e]=t},o=function(e){return i[e]||i.en_US},s=[60,60,24,7,365/7/12,12];function D(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function m(e,t){for(var a=e<0?1:0,n=e=Math.abs(e),r=0;e>=s[r]&&r(0===(r*=2)?9:1)&&(r+=1),t(e,r,n)[a].replace("%s",e.toString())}function d(e,t){return(+(t?D(t):new Date)-+D(e))/1e3}function E(e){return parseInt(e.getAttribute("timeago-id"))}var f={},p=function(e){clearTimeout(e),delete f[e]};function h(e,t,a,n){p(E(e));var r=n.relativeDate,u=n.minInterval,l=d(t,r);e.innerText=m(l,a);var i=setTimeout((function(){h(e,t,a,n)}),Math.min(1e3*Math.max(function(e){for(var t=1,a=0,n=Math.abs(e);e>=s[a]&&a1&&(a+="s"),[e+" "+a+" ago","in "+e+" "+a]})),c("zh_CN",(function(e,t){if(0===t)return["\u521a\u521a","\u7247\u523b\u540e"];var a=l[~~(t/2)];return[e+" "+a+"\u524d",e+" "+a+"\u540e"]}));var b,v=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),y=function(){return(y=Object.assign||function(e){for(var t,a=1,n=arguments.length;a=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),s=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},D=function(e){var t=s(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,u=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),D=s(a),d=n,E=D["".concat(l,".").concat(d)]||D[d]||m[d]||u;return a?r.a.createElement(E,i({ref:t},o,{components:a})):r.a.createElement(E,i({ref:t},o))}));function E(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var u=a.length,l=new Array(u);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:n,l[1]=i;for(var o=2;o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(D.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(B,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(o||u)&&r.a.createElement("div",{className:"text--center"},o&&o.src&&r.a.createElement("div",{className:"margin-bottom--sm"},o.href?r.a.createElement("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement(L,{alt:o.alt,url:s})):r.a.createElement(L,{alt:o.alt,url:s}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},I=a(290),U=a(291),W=a(3);a(135);t.a=function(e){var t=Object(E.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,i=(a.tagline,a.title),c=a.themeConfig.image,o=a.url,s=e.children,D=e.title,m=e.noFooter,d=e.description,f=e.image,p=e.keywords,h=(e.permalink,e.version),g=D?D+" | "+i:i,b=f||c,v=o+Object(C.a)(b),y=Object(C.a)(n),F=Object(W.h)(),N=F?"https://gnet.host"+(F.pathname.endsWith("/")?F.pathname:F.pathname+"/"):null;return r.a.createElement(U.a,null,r.a.createElement(I.a,null,r.a.createElement(l.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),g&&r.a.createElement("title",null,g),g&&r.a.createElement("meta",{property:"og:title",content:g}),n&&r.a.createElement("link",{rel:"shortcut icon",href:y}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),h&&r.a.createElement("meta",{name:"docsearch:version",content:h}),p&&p.length&&r.a.createElement("meta",{name:"keywords",content:p.join(",")}),b&&r.a.createElement("meta",{property:"og:image",content:v}),b&&r.a.createElement("meta",{property:"twitter:image",content:v}),b&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+g}),b&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),b&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),N&&r.a.createElement("meta",{property:"og:url",content:N}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),N&&r.a.createElement("link",{rel:"canonical",href:N})),r.a.createElement(u.a,null),r.a.createElement(A,null),r.a.createElement("div",{className:"main-wrapper"},s),!m&&r.a.createElement(H,null)))}},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},279:function(e,t,a){var n=a(288);e.exports=i;var r=Object.hasOwnProperty,u=/\s/g,l=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function i(){if(!(this instanceof i))return new i;this.reset()}function c(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(l,"").replace(n(),"").replace(u,"-"))}i.prototype.slug=function(e,t){for(var a=c(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},i.prototype.reset=function(){this.occurrences=Object.create(null)},i.slug=c},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),l=a(266),i=a.n(l);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,l=e.style,c=e.value,o=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:i()("badge","badge--rounded","badge--"+l)},o?c:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),l=a.n(u),i=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,c=e.nameSuffix,o=e.rel,s=e.size,D=e.subTitle,m=e.vertical,d=Object(i.a)().siteConfig,E=(void 0===d?{}:d).customFields.metadata.team,f=E.find((function(e){return e.github==u}))||E.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:l()("avatar",n,(t={},t["avatar--"+s]=s,t["avatar--vertical"]=m,t))},r.a.createElement("img",{className:l()("avatar__photo","avatar__photo--"+s),src:f.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:f.github,target:"_blank",rel:o},f.name),c),D&&r.a.createElement("small",{className:"avatar__subtitle"},D),!D&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:f.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=(a(268),a(287)),i=a(266),c=a.n(i),o=a(275),s=a(138),D=a.n(s);t.a=function(e){var t,a=e.block,r=e.colorProfile,i=e.tags,s=e.valuesOnly,m=Object(o.a)(i,r);return u.a.createElement("span",{className:c()(D.a.tags,(t={},t[D.a.tagsBlock]=a,t))},m.map((function(e,t){return u.a.createElement(l.a,Object(n.a)({key:t,valueOnly:s},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,l,i,c=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,i=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==m(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(c.masks[t]||t||c.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",E=e[d+"Date"](),f=e[d+"Day"](),p=e[d+"Month"](),h=e[d+"FullYear"](),g=e[d+"Hours"](),b=e[d+"Minutes"](),v=e[d+"Seconds"](),y=e[d+"Milliseconds"](),F=a?0:e.getTimezoneOffset(),C=s(e),N=D(e),_={d:E,dd:o(E),ddd:c.i18n.dayNames[f],dddd:c.i18n.dayNames[f+7],m:p+1,mm:o(p+1),mmm:c.i18n.monthNames[p],mmmm:c.i18n.monthNames[p+12],yy:String(h).slice(2),yyyy:h,h:g%12||12,hh:o(g%12||12),H:g,HH:o(g),M:b,MM:o(b),s:v,ss:o(v),l:o(y,3),L:o(Math.round(y/10)),t:g<12?c.i18n.timeNames[0]:c.i18n.timeNames[1],tt:g<12?c.i18n.timeNames[2]:c.i18n.timeNames[3],T:g<12?c.i18n.timeNames[4]:c.i18n.timeNames[5],TT:g<12?c.i18n.timeNames[6]:c.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(l)||[""]).pop().replace(i,""),o:(F>0?"-":"+")+o(100*Math.floor(Math.abs(F)/60)+Math.abs(F)%60,4),S:["th","st","nd","rd"][E%10>3?0:(E%100-E%10!=10)*E%10],W:C,N:N};return t.replace(u,(function(e){return e in _?_[e]:e.slice(1,e.length-1)}))});function o(e,t){for(e=String(e),t=t||2;e.length0}))}l&&v.test(l)&&(w=l.match(v)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return O.current&&(e=new i.a(O.current,{target:function(){return _.current}})),function(){e&&e.destroy()}}),[O.current,_.current]);var S=a&&a.replace(/language-/,"");!S&&s.defaultLanguage&&(S=s.defaultLanguage);var x=function(){window.getSelection().empty(),y(!0),setTimeout((function(){return y(!1)}),2e3)};return u.a.createElement(c.a,Object(n.a)({},c.b,{key:C,theme:M,code:t.trim(),language:S}),(function(e){var t,a,r=e.className,l=e.style,i=e.tokens,c=e.getLineProps,o=e.getTokenProps;return u.a.createElement(u.a.Fragment,null,w&&u.a.createElement("div",{style:l,className:g.a.codeBlockTitle},w),u.a.createElement("div",{className:g.a.codeBlockContent},u.a.createElement("button",{ref:O,type:"button","aria-label":"Copy code to clipboard",className:D()(g.a.copyButton,(t={},t[g.a.copyButtonWithTitle]=w,t)),onClick:x},h?"Copied":"Copy"),u.a.createElement("pre",{className:D()(r,g.a.codeBlock,(a={},a[g.a.codeBlockWithTitle]=w,a))},u.a.createElement("div",{ref:_,className:g.a.codeBlockLines,style:l},i.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=c({line:e,key:t});return k.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),u.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return u.a.createElement("span",Object(n.a)({key:t},o({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=a(268),i=a(297),c=a(278),o=a(141),s=a.n(o);t.a={code:function(e){var t=e.children;return"string"==typeof t?u.a.createElement(i.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?u.a.createElement("a",e):u.a.createElement(l.a,e)},pre:function(e){return u.a.createElement("div",Object(n.a)({className:s.a.mdxCodeBlock},e))},h1:Object(c.a)("h1"),h2:Object(c.a)("h2"),h3:Object(c.a)("h3"),h4:Object(c.a)("h4"),h5:Object(c.a)("h5"),h6:Object(c.a)("h6")}},328:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(266),l=a.n(u);t.a=function(e){var t=e.github,a=e.inline,n=e.size,u=e.style,i=l()("panel","panel--button","panel--"+n,"panel--"+u,{"panel--button--inline":a});return r.a.createElement("div",{className:"row row--squished"},r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-twitter",title:"Twitter"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Follow @panjf2000"),r.a.createElement("div",{className:"panel--description"},"Get real-time updates!")))),0!=t&&r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-github"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Star panjf2000/gnet"),r.a.createElement("div",{className:"panel--description"},"Star the repo to support us.")))))}},333:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=["second","minute","hour","day","week","month","year"],l=["\u79d2","\u5206\u949f","\u5c0f\u65f6","\u5929","\u5468","\u4e2a\u6708","\u5e74"],i={},c=function(e,t){i[e]=t},o=function(e){return i[e]||i.en_US},s=[60,60,24,7,365/7/12,12];function D(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function m(e,t){for(var a=e<0?1:0,n=e=Math.abs(e),r=0;e>=s[r]&&r(0===(r*=2)?9:1)&&(r+=1),t(e,r,n)[a].replace("%s",e.toString())}function d(e,t){return(+(t?D(t):new Date)-+D(e))/1e3}function E(e){return parseInt(e.getAttribute("timeago-id"))}var f={},p=function(e){clearTimeout(e),delete f[e]};function h(e,t,a,n){p(E(e));var r=n.relativeDate,u=n.minInterval,l=d(t,r);e.innerText=m(l,a);var i=setTimeout((function(){h(e,t,a,n)}),Math.min(1e3*Math.max(function(e){for(var t=1,a=0,n=Math.abs(e);e>=s[a]&&a1&&(a+="s"),[e+" "+a+" ago","in "+e+" "+a]})),c("zh_CN",(function(e,t){if(0===t)return["\u521a\u521a","\u7247\u523b\u540e"];var a=l[~~(t/2)];return[e+" "+a+"\u524d",e+" "+a+"\u540e"]}));var b,v=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),y=function(){return(y=Object.assign||function(e){for(var t,a=1,n=arguments.length;a0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(d.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(L,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,a){return r.a.createElement("div",{key:a,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,a){return e.html?r.a.createElement("li",{key:a,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(m||l)&&r.a.createElement("div",{className:"text--center"},m&&m.src&&r.a.createElement("div",{className:"margin-bottom--sm"},m.href?r.a.createElement("a",{href:m.href,target:"_blank",rel:"noopener noreferrer",className:A.a.footerLogoLink},r.a.createElement(F,{alt:m.alt,url:s})):r.a.createElement(F,{alt:m.alt,url:s}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:A.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),l,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},V=t(290),H=t(291),J=t(3);t(135);a.a=function(e){var a=Object(g.a)().siteConfig,t=void 0===a?{}:a,n=t.favicon,i=(t.tagline,t.title),o=t.themeConfig.image,m=t.url,s=e.children,d=e.title,u=e.noFooter,h=e.description,b=e.image,E=e.keywords,v=(e.permalink,e.version),f=d?d+" | "+i:i,p=b||o,N=m+Object(w.a)(p),_=Object(w.a)(n),k=Object(J.h)(),y=k?"https://gnet.host"+(k.pathname.endsWith("/")?k.pathname:k.pathname+"/"):null;return r.a.createElement(H.a,null,r.a.createElement(V.a,null,r.a.createElement(c.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),f&&r.a.createElement("title",null,f),f&&r.a.createElement("meta",{property:"og:title",content:f}),n&&r.a.createElement("link",{rel:"shortcut icon",href:_}),h&&r.a.createElement("meta",{name:"description",content:h}),h&&r.a.createElement("meta",{property:"og:description",content:h}),v&&r.a.createElement("meta",{name:"docsearch:version",content:v}),E&&E.length&&r.a.createElement("meta",{name:"keywords",content:E.join(",")}),p&&r.a.createElement("meta",{property:"og:image",content:N}),p&&r.a.createElement("meta",{property:"twitter:image",content:N}),p&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+f}),p&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),p&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),y&&r.a.createElement("meta",{property:"og:url",content:y}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),y&&r.a.createElement("link",{rel:"canonical",href:y})),r.a.createElement(l.a,null),r.a.createElement(S,null),r.a.createElement("div",{className:"main-wrapper"},s),!u&&r.a.createElement(B,null)))}},277:function(e,a,t){var n=t(24).f,r=Function.prototype,l=/^\s*function ([^ (]*)/;"name"in r||t(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(l)[1]}catch(e){return""}}})},278:function(e,a,t){"use strict";var n=t(9),r=t(0),l=t.n(r),c=t(266),i=t.n(c),o=t(267),m=(t(139),t(140)),s=t.n(m);a.a=function(e){return function(a){var t,r=a.id,c=Object(n.a)(a,["id"]),m=Object(o.a)().siteConfig,d=(m=void 0===m?{}:m).themeConfig,u=(d=void 0===d?{}:d).navbar,h=(u=void 0===u?{}:u).hideOnScroll,g=void 0!==h&&h;return r?l.a.createElement(e,c,l.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:i()("anchor",(t={},t[s.a.enhancedAnchor]=!g,t)),id:r}),l.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+r,title:"Direct link to heading"},"#"),c.children):l.a.createElement(e,c)}}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{186:function(e,a,t){"use strict";t.r(a);t(277);var n=t(0),r=t.n(n),l=t(278),c=t(273),i=t(268),o=t(143),m=t.n(o),s=t(267),d=Object(l.a)("h2");Object(l.a)("h3");a.default=function(){var e=Object(s.a)().siteConfig,a=(void 0===e?{}:e).customFields.metadata.team;return r.a.createElement(c.a,{title:"Community",description:"Join the gnet community. Connect with other gnet users and help make gnet better."},r.a.createElement("header",{className:"hero hero--clean"},r.a.createElement("div",{className:"container container--fluid"},r.a.createElement("h1",null,"gnet Community"),r.a.createElement("div",{className:"hero--subtitle"},"Join the gnet community. Connect with other gnet users and help make gnet better."))),r.a.createElement("main",null,r.a.createElement("section",null,r.a.createElement("div",{className:"container"},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://discord.gg/UyKD7NZcfH",target:"_blank",className:"panel panel--button"},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-message-circle"})),r.a.createElement("div",{className:"panel--title"},"Chat"),r.a.createElement("div",{className:"panel--description"},"Ask questions and get help"))),r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank",className:"panel panel--button"},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-twitter",title:"Twitter"})),r.a.createElement("div",{className:"panel--title"},"@panjf2000"),r.a.createElement("div",{className:"panel--description"},"Follow me in real-time"))),r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank",className:"panel panel--button"},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-github"})),r.a.createElement("div",{className:"panel--title"},"Github panjf2000/gnet"),r.a.createElement("div",{className:"panel--description"},"Code, issues, and pull requests")))))),r.a.createElement("section",null,r.a.createElement("div",{className:"container"},r.a.createElement(d,{id:"team"},"Meet The Team"),r.a.createElement("div",{className:"sub-title"},"Andy Pan is the creator of gnet and the only core contributor at present, hoping more developers will join me in the future."),r.a.createElement("div",{className:m.a.coreTeam},a.map((function(e,a){return r.a.createElement(i.a,{key:a,to:e.github,className:"avatar avatar--vertical"},r.a.createElement("img",{className:"avatar__photo avatar__photo--xl",src:e.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("h4",{className:"avatar__name"},e.name)))})))))))}},272:function(e,a,t){"use strict";t.d(a,"a",(function(){return r})),t.d(a,"b",(function(){return l}));var n=t(267);function r(){var e=Object(n.a)().siteConfig,a=(void 0===e?{}:e).customFields.metadata.latest_highlight,t=Date.parse(a.date),r=new Date,l=Math.abs(r-t),c=Math.ceil(l/864e5),i=null;return"undefined"!=typeof window&&(i=new Date(parseInt(window.localStorage.getItem("highlightsViewedAt")||"0"))),c<30&&(!i||i0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(d.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(L,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,a){return r.a.createElement("div",{key:a,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,a){return e.html?r.a.createElement("li",{key:a,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(m||l)&&r.a.createElement("div",{className:"text--center"},m&&m.src&&r.a.createElement("div",{className:"margin-bottom--sm"},m.href?r.a.createElement("a",{href:m.href,target:"_blank",rel:"noopener noreferrer",className:A.a.footerLogoLink},r.a.createElement(F,{alt:m.alt,url:s})):r.a.createElement(F,{alt:m.alt,url:s}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:A.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),l,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},V=t(290),H=t(291),J=t(3);t(135);a.a=function(e){var a=Object(g.a)().siteConfig,t=void 0===a?{}:a,n=t.favicon,i=(t.tagline,t.title),o=t.themeConfig.image,m=t.url,s=e.children,d=e.title,u=e.noFooter,h=e.description,b=e.image,E=e.keywords,v=(e.permalink,e.version),f=d?d+" | "+i:i,p=b||o,N=m+Object(w.a)(p),_=Object(w.a)(n),k=Object(J.h)(),y=k?"https://gnet.host"+(k.pathname.endsWith("/")?k.pathname:k.pathname+"/"):null;return r.a.createElement(H.a,null,r.a.createElement(V.a,null,r.a.createElement(c.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),f&&r.a.createElement("title",null,f),f&&r.a.createElement("meta",{property:"og:title",content:f}),n&&r.a.createElement("link",{rel:"shortcut icon",href:_}),h&&r.a.createElement("meta",{name:"description",content:h}),h&&r.a.createElement("meta",{property:"og:description",content:h}),v&&r.a.createElement("meta",{name:"docsearch:version",content:v}),E&&E.length&&r.a.createElement("meta",{name:"keywords",content:E.join(",")}),p&&r.a.createElement("meta",{property:"og:image",content:N}),p&&r.a.createElement("meta",{property:"twitter:image",content:N}),p&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+f}),p&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),p&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),y&&r.a.createElement("meta",{property:"og:url",content:y}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),y&&r.a.createElement("link",{rel:"canonical",href:y})),r.a.createElement(l.a,null),r.a.createElement(S,null),r.a.createElement("div",{className:"main-wrapper"},s),!u&&r.a.createElement(B,null)))}},277:function(e,a,t){var n=t(24).f,r=Function.prototype,l=/^\s*function ([^ (]*)/;"name"in r||t(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(l)[1]}catch(e){return""}}})},278:function(e,a,t){"use strict";var n=t(9),r=t(0),l=t.n(r),c=t(266),i=t.n(c),o=t(267),m=(t(139),t(140)),s=t.n(m);a.a=function(e){return function(a){var t,r=a.id,c=Object(n.a)(a,["id"]),m=Object(o.a)().siteConfig,d=(m=void 0===m?{}:m).themeConfig,u=(d=void 0===d?{}:d).navbar,h=(u=void 0===u?{}:u).hideOnScroll,g=void 0!==h&&h;return r?l.a.createElement(e,c,l.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:i()("anchor",(t={},t[s.a.enhancedAnchor]=!g,t)),id:r}),l.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+r,title:"Direct link to heading"},"#"),c.children):l.a.createElement(e,c)}}}}]); \ No newline at end of file diff --git a/67366af7.491983ec.js b/67366af7.e202cc4c.js similarity index 73% rename from 67366af7.491983ec.js rename to 67366af7.e202cc4c.js index 14f677c48..a7a124d96 100644 --- a/67366af7.491983ec.js +++ b/67366af7.e202cc4c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{188:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-v-2-2-0","name":"domain: v2.2.0","count":1,"permalink":"/highlights/tags/domain-v-2-2-0"}')}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{187:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-v-2-2-0","name":"domain: v2.2.0","count":1,"permalink":"/highlights/tags/domain-v-2-2-0"}')}}]); \ No newline at end of file diff --git a/68624de3.6533ae36.js b/68624de3.533a92b4.js similarity index 73% rename from 68624de3.6533ae36.js rename to 68624de3.533a92b4.js index bd0e10db2..3f512d9a0 100644 --- a/68624de3.6533ae36.js +++ b/68624de3.533a92b4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{189:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-v-1-5-0","name":"domain: v1.5.0","count":1,"permalink":"/highlights/tags/domain-v-1-5-0"}')}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{188:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-v-1-5-0","name":"domain: v1.5.0","count":1,"permalink":"/highlights/tags/domain-v-1-5-0"}')}}]); \ No newline at end of file diff --git a/6875c492.e7a24973.js b/6875c492.f9d51c69.js similarity index 99% rename from 6875c492.e7a24973.js rename to 6875c492.f9d51c69.js index 1dd1489dc..41284c515 100644 --- a/6875c492.e7a24973.js +++ b/6875c492.f9d51c69.js @@ -1,2 +1,2 @@ -/*! For license information please see 6875c492.e7a24973.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{190:function(e,t,a){"use strict";a.r(t);a(277);var n=a(0),r=a.n(n),u=a(273),l=a(329),c=a(268);t.default=function(e){var t=e.metadata,a=e.items,n=t.allTagsPath,i=t.name,o=t.count;return r.a.createElement(u.a,{title:'Posts tagged "'+i+'"',description:'Blog | Tagged "'+i+'"'},r.a.createElement("div",{className:"container margin-vert--lg"},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col col--8 col--offset-2"},r.a.createElement("h1",null,o," ",function(e,t){return e>1?t+"s":t}(o,"post"),' tagged with "',i,'"'),r.a.createElement(c.a,{href:n},"View All Tags"),r.a.createElement("div",{className:"margin-vert--xl"},a.map((function(e){var t=e.content;return r.a.createElement(l.a,{key:t.metadata.permalink,frontMatter:t.frontMatter,metadata:t.metadata,truncated:!0},r.a.createElement(t,null))})))))))}},265:function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return E}));var n=a(0),r=a.n(n);function u(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),D=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):c({},t,{},e)),a},s=function(e){var t=D(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,u=e.originalType,l=e.parentName,o=i(e,["components","mdxType","originalType","parentName"]),s=D(a),d=n,E=s["".concat(l,".").concat(d)]||s[d]||m[d]||u;return a?r.a.createElement(E,c({ref:t},o,{components:a})):r.a.createElement(E,c({ref:t},o))}));function E(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var u=a.length,l=new Array(u);l[0]=d;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:n,l[1]=c;for(var o=2;o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(s.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(B,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),c.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(o||u)&&r.a.createElement("div",{className:"text--center"},o&&o.src&&r.a.createElement("div",{className:"margin-bottom--sm"},o.href?r.a.createElement("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement(H,{alt:o.alt,url:D})):r.a.createElement(H,{alt:o.alt,url:D}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},I=a(290),R=a(291),J=a(3);a(135);t.a=function(e){var t=Object(E.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,c=(a.tagline,a.title),i=a.themeConfig.image,o=a.url,D=e.children,s=e.title,m=e.noFooter,d=e.description,f=e.image,g=e.keywords,b=(e.permalink,e.version),h=s?s+" | "+c:c,p=f||i,v=o+Object(C.a)(p),F=Object(C.a)(n),y=Object(J.h)(),N=y?"https://gnet.host"+(y.pathname.endsWith("/")?y.pathname:y.pathname+"/"):null;return r.a.createElement(R.a,null,r.a.createElement(I.a,null,r.a.createElement(l.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),h&&r.a.createElement("title",null,h),h&&r.a.createElement("meta",{property:"og:title",content:h}),n&&r.a.createElement("link",{rel:"shortcut icon",href:F}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),b&&r.a.createElement("meta",{name:"docsearch:version",content:b}),g&&g.length&&r.a.createElement("meta",{name:"keywords",content:g.join(",")}),p&&r.a.createElement("meta",{property:"og:image",content:v}),p&&r.a.createElement("meta",{property:"twitter:image",content:v}),p&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+h}),p&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),p&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),N&&r.a.createElement("meta",{property:"og:url",content:N}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),N&&r.a.createElement("link",{rel:"canonical",href:N})),r.a.createElement(u.a,null),r.a.createElement(A,null),r.a.createElement("div",{className:"main-wrapper"},D),!m&&r.a.createElement(L,null)))}},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},279:function(e,t,a){var n=a(288);e.exports=c;var r=Object.hasOwnProperty,u=/\s/g,l=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function c(){if(!(this instanceof c))return new c;this.reset()}function i(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(l,"").replace(n(),"").replace(u,"-"))}c.prototype.slug=function(e,t){for(var a=i(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},c.prototype.reset=function(){this.occurrences=Object.create(null)},c.slug=i},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),l=a(266),c=a.n(l);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,l=e.style,i=e.value,o=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:c()("badge","badge--rounded","badge--"+l)},o?i:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),l=a.n(u),c=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,i=e.nameSuffix,o=e.rel,D=e.size,s=e.subTitle,m=e.vertical,d=Object(c.a)().siteConfig,E=(void 0===d?{}:d).customFields.metadata.team,f=E.find((function(e){return e.github==u}))||E.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:l()("avatar",n,(t={},t["avatar--"+D]=D,t["avatar--vertical"]=m,t))},r.a.createElement("img",{className:l()("avatar__photo","avatar__photo--"+D),src:f.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:f.github,target:"_blank",rel:o},f.name),i),s&&r.a.createElement("small",{className:"avatar__subtitle"},s),!s&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:f.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=(a(268),a(287)),c=a(266),i=a.n(c),o=a(275),D=a(138),s=a.n(D);t.a=function(e){var t,a=e.block,r=e.colorProfile,c=e.tags,D=e.valuesOnly,m=Object(o.a)(c,r);return u.a.createElement("span",{className:i()(s.a.tags,(t={},t[s.a.tagsBlock]=a,t))},m.map((function(e,t){return u.a.createElement(l.a,Object(n.a)({key:t,valueOnly:D},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,l,c,i=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==m(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(i.masks[t]||t||i.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",E=e[d+"Date"](),f=e[d+"Day"](),g=e[d+"Month"](),b=e[d+"FullYear"](),h=e[d+"Hours"](),p=e[d+"Minutes"](),v=e[d+"Seconds"](),F=e[d+"Milliseconds"](),y=a?0:e.getTimezoneOffset(),C=D(e),N=s(e),O={d:E,dd:o(E),ddd:i.i18n.dayNames[f],dddd:i.i18n.dayNames[f+7],m:g+1,mm:o(g+1),mmm:i.i18n.monthNames[g],mmmm:i.i18n.monthNames[g+12],yy:String(b).slice(2),yyyy:b,h:h%12||12,hh:o(h%12||12),H:h,HH:o(h),M:p,MM:o(p),s:v,ss:o(v),l:o(F,3),L:o(Math.round(F/10)),t:h<12?i.i18n.timeNames[0]:i.i18n.timeNames[1],tt:h<12?i.i18n.timeNames[2]:i.i18n.timeNames[3],T:h<12?i.i18n.timeNames[4]:i.i18n.timeNames[5],TT:h<12?i.i18n.timeNames[6]:i.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(l)||[""]).pop().replace(c,""),o:(y>0?"-":"+")+o(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][E%10>3?0:(E%100-E%10!=10)*E%10],W:C,N:N};return t.replace(u,(function(e){return e in O?O[e]:e.slice(1,e.length-1)}))});function o(e,t){for(e=String(e),t=t||2;e.length0}))}l&&v.test(l)&&(_=l.match(v)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return k.current&&(e=new c.a(k.current,{target:function(){return O.current}})),function(){e&&e.destroy()}}),[k.current,O.current]);var S=a&&a.replace(/language-/,"");!S&&D.defaultLanguage&&(S=D.defaultLanguage);var x=function(){window.getSelection().empty(),F(!0),setTimeout((function(){return F(!1)}),2e3)};return u.a.createElement(i.a,Object(n.a)({},i.b,{key:C,theme:M,code:t.trim(),language:S}),(function(e){var t,a,r=e.className,l=e.style,c=e.tokens,i=e.getLineProps,o=e.getTokenProps;return u.a.createElement(u.a.Fragment,null,_&&u.a.createElement("div",{style:l,className:h.a.codeBlockTitle},_),u.a.createElement("div",{className:h.a.codeBlockContent},u.a.createElement("button",{ref:k,type:"button","aria-label":"Copy code to clipboard",className:s()(h.a.copyButton,(t={},t[h.a.copyButtonWithTitle]=_,t)),onClick:x},b?"Copied":"Copy"),u.a.createElement("pre",{className:s()(r,h.a.codeBlock,(a={},a[h.a.codeBlockWithTitle]=_,a))},u.a.createElement("div",{ref:O,className:h.a.codeBlockLines,style:l},c.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=i({line:e,key:t});return w.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),u.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return u.a.createElement("span",Object(n.a)({key:t},o({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=a(268),c=a(297),i=a(278),o=a(141),D=a.n(o);t.a={code:function(e){var t=e.children;return"string"==typeof t?u.a.createElement(c.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?u.a.createElement("a",e):u.a.createElement(l.a,e)},pre:function(e){return u.a.createElement("div",Object(n.a)({className:D.a.mdxCodeBlock},e))},h1:Object(i.a)("h1"),h2:Object(i.a)("h2"),h3:Object(i.a)("h3"),h4:Object(i.a)("h4"),h5:Object(i.a)("h5"),h6:Object(i.a)("h6")}},316:function(e,t,a){"use strict";a(330);var n=a(8),r=a(81),u=a(10),l=/./.toString,c=function(e){a(15)(RegExp.prototype,"toString",e,!0)};a(13)((function(){return"/a/b"!=l.call({source:"a",flags:"b"})}))?c((function(){var e=n(this);return"/".concat(e.source,"/","flags"in e?e.flags:!u&&e instanceof RegExp?r.call(e):void 0)})):"toString"!=l.name&&c((function(){return l.call(this)}))},317:function(e,t,a){e.exports=a(331)},329:function(e,t,a){"use strict";a(274),a(316),a(19);var n=a(0),r=a.n(n),u=a(292),l=a(268),c=(a(299),a(265),a(293)),i=a(266),o=a.n(i),D=a(294),s=a.n(D),m=a(275),d=a(317),E=a.n(d);t.a=function(e){var t=e.children,a=e.frontMatter,n=e.metadata,i=(e.truncated,e.isBlogPostPage,n.date),D=n.description,d=n.permalink,f=n.tags,g=a.author_github,b=a.title,h=E()(t.toString()),p=new Date(Date.parse(i)),v=Object(m.a)(f,"blog").find((function(e){return"domain"==e.category})),F=v?v.value:null;return r.a.createElement(l.a,{to:d+"/",className:o()("panel","domain-bg","domain-bg--hover","domain-bg--"+F)},r.a.createElement("article",null,r.a.createElement("h2",null,b),r.a.createElement("div",{className:"subtitle"},D),r.a.createElement(u.a,{github:g,size:"sm",subTitle:r.a.createElement(r.a.Fragment,null,r.a.createElement("time",{pubdate:"pubdate",dateTime:p.toISOString()},s()(p,"mmm dS, yyyy"))," / ",h.text),rel:"author"}),r.a.createElement(c.a,{colorProfile:"blog",tags:f})))}},330:function(e,t,a){a(10)&&"g"!=/./g.flags&&a(24).f(RegExp.prototype,"flags",{configurable:!0,get:a(81)})},331:function(e,t,a){"use strict";function n(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}e.exports=function(e,t){var a,r,u=0,l=0,c=e.length-1;for((t=t||{}).wordsPerMinute=t.wordsPerMinute||200,a=t.wordBound||n;a(e[l]);)l++;for(;a(e[c]);)c--;for(r=l;r<=c;){for(;r<=c&&!a(e[r]);r++);for(u++;r<=c&&a(e[r]);r++);}var i=u/t.wordsPerMinute,o=60*i*1e3;return{text:Math.ceil(i.toFixed(2))+" min read",minutes:i,time:o,words:u}}}}]); \ No newline at end of file +/*! For license information please see 6875c492.f9d51c69.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{189:function(e,t,a){"use strict";a.r(t);a(277);var n=a(0),r=a.n(n),u=a(273),l=a(329),c=a(268);t.default=function(e){var t=e.metadata,a=e.items,n=t.allTagsPath,i=t.name,o=t.count;return r.a.createElement(u.a,{title:'Posts tagged "'+i+'"',description:'Blog | Tagged "'+i+'"'},r.a.createElement("div",{className:"container margin-vert--lg"},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col col--8 col--offset-2"},r.a.createElement("h1",null,o," ",function(e,t){return e>1?t+"s":t}(o,"post"),' tagged with "',i,'"'),r.a.createElement(c.a,{href:n},"View All Tags"),r.a.createElement("div",{className:"margin-vert--xl"},a.map((function(e){var t=e.content;return r.a.createElement(l.a,{key:t.metadata.permalink,frontMatter:t.frontMatter,metadata:t.metadata,truncated:!0},r.a.createElement(t,null))})))))))}},265:function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return E}));var n=a(0),r=a.n(n);function u(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),D=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):c({},t,{},e)),a},s=function(e){var t=D(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,u=e.originalType,l=e.parentName,o=i(e,["components","mdxType","originalType","parentName"]),s=D(a),d=n,E=s["".concat(l,".").concat(d)]||s[d]||m[d]||u;return a?r.a.createElement(E,c({ref:t},o,{components:a})):r.a.createElement(E,c({ref:t},o))}));function E(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var u=a.length,l=new Array(u);l[0]=d;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:n,l[1]=c;for(var o=2;o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(s.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(B,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),c.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(o||u)&&r.a.createElement("div",{className:"text--center"},o&&o.src&&r.a.createElement("div",{className:"margin-bottom--sm"},o.href?r.a.createElement("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement(H,{alt:o.alt,url:D})):r.a.createElement(H,{alt:o.alt,url:D}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},I=a(290),R=a(291),J=a(3);a(135);t.a=function(e){var t=Object(E.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,c=(a.tagline,a.title),i=a.themeConfig.image,o=a.url,D=e.children,s=e.title,m=e.noFooter,d=e.description,f=e.image,g=e.keywords,b=(e.permalink,e.version),h=s?s+" | "+c:c,p=f||i,v=o+Object(C.a)(p),F=Object(C.a)(n),y=Object(J.h)(),N=y?"https://gnet.host"+(y.pathname.endsWith("/")?y.pathname:y.pathname+"/"):null;return r.a.createElement(R.a,null,r.a.createElement(I.a,null,r.a.createElement(l.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),h&&r.a.createElement("title",null,h),h&&r.a.createElement("meta",{property:"og:title",content:h}),n&&r.a.createElement("link",{rel:"shortcut icon",href:F}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),b&&r.a.createElement("meta",{name:"docsearch:version",content:b}),g&&g.length&&r.a.createElement("meta",{name:"keywords",content:g.join(",")}),p&&r.a.createElement("meta",{property:"og:image",content:v}),p&&r.a.createElement("meta",{property:"twitter:image",content:v}),p&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+h}),p&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),p&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),N&&r.a.createElement("meta",{property:"og:url",content:N}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),N&&r.a.createElement("link",{rel:"canonical",href:N})),r.a.createElement(u.a,null),r.a.createElement(A,null),r.a.createElement("div",{className:"main-wrapper"},D),!m&&r.a.createElement(L,null)))}},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},279:function(e,t,a){var n=a(288);e.exports=c;var r=Object.hasOwnProperty,u=/\s/g,l=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function c(){if(!(this instanceof c))return new c;this.reset()}function i(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(l,"").replace(n(),"").replace(u,"-"))}c.prototype.slug=function(e,t){for(var a=i(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},c.prototype.reset=function(){this.occurrences=Object.create(null)},c.slug=i},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),l=a(266),c=a.n(l);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,l=e.style,i=e.value,o=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:c()("badge","badge--rounded","badge--"+l)},o?i:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),l=a.n(u),c=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,i=e.nameSuffix,o=e.rel,D=e.size,s=e.subTitle,m=e.vertical,d=Object(c.a)().siteConfig,E=(void 0===d?{}:d).customFields.metadata.team,f=E.find((function(e){return e.github==u}))||E.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:l()("avatar",n,(t={},t["avatar--"+D]=D,t["avatar--vertical"]=m,t))},r.a.createElement("img",{className:l()("avatar__photo","avatar__photo--"+D),src:f.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:f.github,target:"_blank",rel:o},f.name),i),s&&r.a.createElement("small",{className:"avatar__subtitle"},s),!s&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:f.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=(a(268),a(287)),c=a(266),i=a.n(c),o=a(275),D=a(138),s=a.n(D);t.a=function(e){var t,a=e.block,r=e.colorProfile,c=e.tags,D=e.valuesOnly,m=Object(o.a)(c,r);return u.a.createElement("span",{className:i()(s.a.tags,(t={},t[s.a.tagsBlock]=a,t))},m.map((function(e,t){return u.a.createElement(l.a,Object(n.a)({key:t,valueOnly:D},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,l,c,i=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==m(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(i.masks[t]||t||i.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",E=e[d+"Date"](),f=e[d+"Day"](),g=e[d+"Month"](),b=e[d+"FullYear"](),h=e[d+"Hours"](),p=e[d+"Minutes"](),v=e[d+"Seconds"](),F=e[d+"Milliseconds"](),y=a?0:e.getTimezoneOffset(),C=D(e),N=s(e),O={d:E,dd:o(E),ddd:i.i18n.dayNames[f],dddd:i.i18n.dayNames[f+7],m:g+1,mm:o(g+1),mmm:i.i18n.monthNames[g],mmmm:i.i18n.monthNames[g+12],yy:String(b).slice(2),yyyy:b,h:h%12||12,hh:o(h%12||12),H:h,HH:o(h),M:p,MM:o(p),s:v,ss:o(v),l:o(F,3),L:o(Math.round(F/10)),t:h<12?i.i18n.timeNames[0]:i.i18n.timeNames[1],tt:h<12?i.i18n.timeNames[2]:i.i18n.timeNames[3],T:h<12?i.i18n.timeNames[4]:i.i18n.timeNames[5],TT:h<12?i.i18n.timeNames[6]:i.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(l)||[""]).pop().replace(c,""),o:(y>0?"-":"+")+o(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][E%10>3?0:(E%100-E%10!=10)*E%10],W:C,N:N};return t.replace(u,(function(e){return e in O?O[e]:e.slice(1,e.length-1)}))});function o(e,t){for(e=String(e),t=t||2;e.length0}))}l&&v.test(l)&&(_=l.match(v)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return k.current&&(e=new c.a(k.current,{target:function(){return O.current}})),function(){e&&e.destroy()}}),[k.current,O.current]);var S=a&&a.replace(/language-/,"");!S&&D.defaultLanguage&&(S=D.defaultLanguage);var x=function(){window.getSelection().empty(),F(!0),setTimeout((function(){return F(!1)}),2e3)};return u.a.createElement(i.a,Object(n.a)({},i.b,{key:C,theme:M,code:t.trim(),language:S}),(function(e){var t,a,r=e.className,l=e.style,c=e.tokens,i=e.getLineProps,o=e.getTokenProps;return u.a.createElement(u.a.Fragment,null,_&&u.a.createElement("div",{style:l,className:h.a.codeBlockTitle},_),u.a.createElement("div",{className:h.a.codeBlockContent},u.a.createElement("button",{ref:k,type:"button","aria-label":"Copy code to clipboard",className:s()(h.a.copyButton,(t={},t[h.a.copyButtonWithTitle]=_,t)),onClick:x},b?"Copied":"Copy"),u.a.createElement("pre",{className:s()(r,h.a.codeBlock,(a={},a[h.a.codeBlockWithTitle]=_,a))},u.a.createElement("div",{ref:O,className:h.a.codeBlockLines,style:l},c.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=i({line:e,key:t});return w.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),u.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return u.a.createElement("span",Object(n.a)({key:t},o({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=a(268),c=a(297),i=a(278),o=a(141),D=a.n(o);t.a={code:function(e){var t=e.children;return"string"==typeof t?u.a.createElement(c.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?u.a.createElement("a",e):u.a.createElement(l.a,e)},pre:function(e){return u.a.createElement("div",Object(n.a)({className:D.a.mdxCodeBlock},e))},h1:Object(i.a)("h1"),h2:Object(i.a)("h2"),h3:Object(i.a)("h3"),h4:Object(i.a)("h4"),h5:Object(i.a)("h5"),h6:Object(i.a)("h6")}},316:function(e,t,a){"use strict";a(330);var n=a(8),r=a(81),u=a(10),l=/./.toString,c=function(e){a(15)(RegExp.prototype,"toString",e,!0)};a(13)((function(){return"/a/b"!=l.call({source:"a",flags:"b"})}))?c((function(){var e=n(this);return"/".concat(e.source,"/","flags"in e?e.flags:!u&&e instanceof RegExp?r.call(e):void 0)})):"toString"!=l.name&&c((function(){return l.call(this)}))},317:function(e,t,a){e.exports=a(331)},329:function(e,t,a){"use strict";a(274),a(316),a(19);var n=a(0),r=a.n(n),u=a(292),l=a(268),c=(a(299),a(265),a(293)),i=a(266),o=a.n(i),D=a(294),s=a.n(D),m=a(275),d=a(317),E=a.n(d);t.a=function(e){var t=e.children,a=e.frontMatter,n=e.metadata,i=(e.truncated,e.isBlogPostPage,n.date),D=n.description,d=n.permalink,f=n.tags,g=a.author_github,b=a.title,h=E()(t.toString()),p=new Date(Date.parse(i)),v=Object(m.a)(f,"blog").find((function(e){return"domain"==e.category})),F=v?v.value:null;return r.a.createElement(l.a,{to:d+"/",className:o()("panel","domain-bg","domain-bg--hover","domain-bg--"+F)},r.a.createElement("article",null,r.a.createElement("h2",null,b),r.a.createElement("div",{className:"subtitle"},D),r.a.createElement(u.a,{github:g,size:"sm",subTitle:r.a.createElement(r.a.Fragment,null,r.a.createElement("time",{pubdate:"pubdate",dateTime:p.toISOString()},s()(p,"mmm dS, yyyy"))," / ",h.text),rel:"author"}),r.a.createElement(c.a,{colorProfile:"blog",tags:f})))}},330:function(e,t,a){a(10)&&"g"!=/./g.flags&&a(24).f(RegExp.prototype,"flags",{configurable:!0,get:a(81)})},331:function(e,t,a){"use strict";function n(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}e.exports=function(e,t){var a,r,u=0,l=0,c=e.length-1;for((t=t||{}).wordsPerMinute=t.wordsPerMinute||200,a=t.wordBound||n;a(e[l]);)l++;for(;a(e[c]);)c--;for(r=l;r<=c;){for(;r<=c&&!a(e[r]);r++);for(u++;r<=c&&a(e[r]);r++);}var i=u/t.wordsPerMinute,o=60*i*1e3;return{text:Math.ceil(i.toFixed(2))+" min read",minutes:i,time:o,words:u}}}}]); \ No newline at end of file diff --git a/6875c492.e7a24973.js.LICENSE.txt b/6875c492.f9d51c69.js.LICENSE.txt similarity index 100% rename from 6875c492.e7a24973.js.LICENSE.txt rename to 6875c492.f9d51c69.js.LICENSE.txt diff --git a/8d648d3a.dc548f2d.js b/69432dc9.6b99b0d6.js similarity index 99% rename from 8d648d3a.dc548f2d.js rename to 69432dc9.6b99b0d6.js index d7a4ea8c6..a29f2dc2b 100644 --- a/8d648d3a.dc548f2d.js +++ b/69432dc9.6b99b0d6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{211:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return r})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return s}));var a=n(1),o=n(9),i=(n(0),n(265)),r={last_modified_on:"2020-03-13",id:"announcing-gnet-v1",title:"Announcing gnet v1.0.0",description:"Hello World! We present you, gnet!",author_github:"https://github.com/panjf2000",tags:["type: announcement","domain: presentation"]},c={permalink:"/blog/announcing-gnet-v1",source:"@site/blog/2020-03-13-announcing-gnet-v1.md",description:"Hello World! We present you, gnet!",date:"2020-03-13T00:00:00.000Z",tags:[{label:"type: announcement",permalink:"/blog/tags/type-announcement"},{label:"domain: presentation",permalink:"/blog/tags/domain-presentation"}],title:"Announcing gnet v1.0.0",readingTime:4.08,truncated:!1,prevItem:{title:"\u5b98\u5ba3 gnet v1.0.0",permalink:"/blog/announcing-gnet-v1-cn"}},l=[{value:"Today, we are release gnet v1.0.0, enjoy this ultra-fast framework of networking!",id:"today-we-are-release-gnet-v100-enjoy-this-ultra-fast-framework-of-networking",children:[]},{value:"Networking Model of Multiple Threads/Goroutines",id:"networking-model-of-multiple-threadsgoroutines",children:[{value:"Multiple Reactors",id:"multiple-reactors",children:[]},{value:"Multiple Reactors + Goroutine Pool",id:"multiple-reactors--goroutine-pool",children:[]}]},{value:"Reusable and auto-scaling Ring Buffer",id:"reusable-and-auto-scaling-ring-buffer",children:[]}],b={rightToc:l};function s(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(i.b)("wrapper",Object(a.a)({},b,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h2",{id:"today-we-are-release-gnet-v100-enjoy-this-ultra-fast-framework-of-networking"},"Today, we are release gnet v1.0.0, enjoy this ultra-fast framework of networking!"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/logos/master/gnet/logo.png",alt:"gnet"})),Object(i.b)("h1",{id:"-introduction"},"\ud83d\udcd6 Introduction"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," is an event-driven networking framework that is fast and lightweight. It makes direct ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Epoll"}),"epoll")," and ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Kqueue"}),"kqueue")," syscalls rather than using the standard Go ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," package and works in a similar manner as ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/netty/netty"}),"netty")," and ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/libuv/libuv"}),"libuv"),", which makes ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," achieve a much higher performance than Go ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net"),"."),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," is not designed to displace the standard Go ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," package, but to create a networking server framework for Go that performs on par with ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"http://redis.io"}),"Redis")," and ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"http://www.haproxy.org"}),"Haproxy")," for networking packets handling."),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," sells itself as a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go which works on transport layer with TCP/UDP protocols and Unix Domain Socket , so it allows developers to implement their own protocols(HTTP, RPC, WebSocket, Redis, etc.) of application layer upon ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," for building diversified network applications, for instance, you get an HTTP Server or Web Framework if you implement HTTP protocol upon ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," while you have a Redis Server done with the implementation of Redis protocol upon ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," and so on."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},Object(i.b)("inlineCode",{parentName:"strong"},"gnet")," derives from the project: ",Object(i.b)("inlineCode",{parentName:"strong"},"evio")," while having a much higher performance and more features.")),Object(i.b)("h1",{id:"-features"},"\ud83d\ude80 Features"),Object(i.b)("ul",{className:"contains-task-list"},Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/blob/v1.0.0/README.md#-performance"}),"High-performance")," event-loop under networking model of multiple threads/goroutines"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Built-in load balancing algorithm: Round-Robin"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Built-in goroutine pool powered by the library ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/ants"}),"ants")),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Built-in memory pool with bytes powered by the library ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/valyala/bytebufferpool"}),"bytebufferpool")),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Concise APIs"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Efficient memory usage: Ring-Buffer"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Supporting multiple protocols/IPC mechanism: TCP, UDP and Unix Domain Socket"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Supporting two event-driven mechanisms: epoll on Linux and kqueue on FreeBSD"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Supporting asynchronous write operation"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Flexible ticker event"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","SO_REUSEPORT socket option"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Built-in multiple codecs to encode/decode network frames into/from TCP stream: LineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec and LengthFieldBasedFrameCodec, referencing ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://netty.io/4.1/api/io/netty/handler/codec/package-summary.html"}),"netty codec"),", also supporting customized codecs"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","Supporting Windows platform with ",Object(i.b)("del",{parentName:"li"},"event-driven mechanism of IOCP")," Go stdlib: net"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","Additional load-balancing algorithms: Random, Least-Connections, Consistent-hashing and so on"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","TLS support"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","Implementation of ",Object(i.b)("inlineCode",{parentName:"li"},"gnet")," Client")),Object(i.b)("h1",{id:"-key-designs"},"\ud83d\udca1 Key Designs"),Object(i.b)("h2",{id:"networking-model-of-multiple-threadsgoroutines"},"Networking Model of Multiple Threads/Goroutines"),Object(i.b)("h3",{id:"multiple-reactors"},"Multiple Reactors"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," redesigns and implements a new built-in networking model of multiple threads/goroutines: \u300emultiple reactors\u300f which is also the default networking model of multiple threads in ",Object(i.b)("inlineCode",{parentName:"p"},"netty"),", Here's the schematic diagram:"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{alt:"multi_reactor",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors.png"})),Object(i.b)("p",null,"and it works as the following sequence diagram:"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{alt:"reactor",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors-sequence-diagram.png"})),Object(i.b)("h3",{id:"multiple-reactors--goroutine-pool"},"Multiple Reactors + Goroutine Pool"),Object(i.b)("p",null,"You may ask me a question: what if my business logic in ",Object(i.b)("inlineCode",{parentName:"p"},"EventHandler.React")," contains some blocking code which leads to blocking in event-loop of ",Object(i.b)("inlineCode",{parentName:"p"},"gnet"),", what is the solution for this kind of situation\uff1f"),Object(i.b)("p",null,"As you know, there is a most important tenet when writing code under ",Object(i.b)("inlineCode",{parentName:"p"},"gnet"),": you should never block the event-loop goroutine in the ",Object(i.b)("inlineCode",{parentName:"p"},"EventHandler.React"),", which is also the most important tenet in ",Object(i.b)("inlineCode",{parentName:"p"},"netty"),", otherwise, it will result in a low throughput in your ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," server."),Object(i.b)("p",null,"And the solution to that could be found in the subsequent networking model of multiple threads/goroutines in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet"),": \u300emultiple reactors with thread/goroutine pool\u300fwhich pulls you out from the blocking mire, it will construct a worker-pool with fixed capacity and put those blocking jobs in ",Object(i.b)("inlineCode",{parentName:"p"},"EventHandler.React")," into the worker-pool to make the event-loop goroutines non-blocking."),Object(i.b)("p",null,"The networking model:\u300emultiple reactors with thread/goroutine pool\u300fdissolves the blocking jobs by introducing a goroutine pool, as shown below:"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{alt:"multi_reactor_thread_pool",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors%2Bthread-pool.png"})),Object(i.b)("p",null,"and it works as the following sequence diagram:"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{alt:"multi-reactors",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors%2Bthread-pool-sequence-diagram.png"})),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," implements the networking model:\u300emultiple reactors with thread/goroutine pool\u300fby the aid of a high-performance goroutine pool called ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/ants"}),"ants")," that allows you to manage and recycle a massive number of goroutines in your concurrent programs, the full features and usages in ",Object(i.b)("inlineCode",{parentName:"p"},"ants")," are documented ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/ants/v2?tab=doc"}),"here"),"."),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," integrates ",Object(i.b)("inlineCode",{parentName:"p"},"ants")," and provides the ",Object(i.b)("inlineCode",{parentName:"p"},"pool.goroutine.Default()")," method that you can call to instantiate a ",Object(i.b)("inlineCode",{parentName:"p"},"ants")," pool where you are able to put your blocking code logic and call the function ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.Conn.AsyncWrite([]byte)")," to send out data asynchronously after you finish the blocking process and get the output data, which makes the goroutine of event-loop non-blocking."),Object(i.b)("p",null,"The details about integrating ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," with ",Object(i.b)("inlineCode",{parentName:"p"},"ants")," are shown ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"#echo-server-with-blocking-logic"}),"here"),"."),Object(i.b)("h2",{id:"reusable-and-auto-scaling-ring-buffer"},"Reusable and auto-scaling Ring Buffer"),Object(i.b)("p",null,"There are two ring-buffers inside ",Object(i.b)("inlineCode",{parentName:"p"},"gnet"),": inbound buffer and outbound buffer to buffer and manage inbound/outbound network data, ring-buffer inside gnet is designed and tuned to reuse memory and be auto-scaling on demand."),Object(i.b)("p",null,"The purpose of implementing inbound and outbound ring-buffers in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," is to transfer the logic of buffering and managing network data based on application protocol upon TCP stream from business server to framework and unify the network data buffer, which minimizes the complexity of business code so that developers are able to concentrate on business logic instead of the underlying implementation."),Object(i.b)("p",{align:"center"},Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/ring-buffer.gif"})))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return d}));var a=n(0),o=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var b=o.a.createContext({}),s=function(e){var t=o.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=s(e.components);return o.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=a,d=p["".concat(r,".").concat(m)]||p[m]||u[m]||i;return n?o.a.createElement(d,c({ref:t},b,{components:n})):o.a.createElement(d,c({ref:t},b))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,r[1]=c;for(var b=2;b=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var b=o.a.createContext({}),s=function(e){var t=o.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=s(e.components);return o.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=a,d=p["".concat(r,".").concat(m)]||p[m]||u[m]||i;return n?o.a.createElement(d,c({ref:t},b,{components:n})):o.a.createElement(d,c({ref:t},b))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,r[1]=c;for(var b=2;b=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),p=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):b({},t,{},e)),a},f=function(e){var t=p(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},u=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,c=e.originalType,i=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),f=p(a),u=n,s=f["".concat(i,".").concat(u)]||f[u]||m[u]||c;return a?r.a.createElement(s,b({ref:t},l,{components:a})):r.a.createElement(s,b({ref:t},l))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=a.length,i=new Array(c);i[0]=u;var b={};for(var o in t)hasOwnProperty.call(t,o)&&(b[o]=t[o]);b.originalType=e,b.mdxType="string"==typeof e?e:n,i[1]=b;for(var l=2;l=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),p=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):b({},t,{},e)),a},f=function(e){var t=p(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},u=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,c=e.originalType,i=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),f=p(a),u=n,s=f["".concat(i,".").concat(u)]||f[u]||m[u]||c;return a?r.a.createElement(s,b({ref:t},l,{components:a})):r.a.createElement(s,b({ref:t},l))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=a.length,i=new Array(c);i[0]=u;var b={};for(var o in t)hasOwnProperty.call(t,o)&&(b[o]=t[o]);b.originalType=e,b.mdxType="string"==typeof e?e:n,i[1]=b;for(var l=2;l=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},f=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),f=s(r),m=n,g=f["".concat(i,".").concat(m)]||f[m]||u[m]||o;return r?a.a.createElement(g,c({ref:t},p,{components:r})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var p=2;p=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},f=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),f=s(r),m=n,g=f["".concat(i,".").concat(m)]||f[m]||u[m]||o;return r?a.a.createElement(g,c({ref:t},p,{components:r})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var p=2;p=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},u=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=p(r),f=n,h=u["".concat(i,".").concat(f)]||u[f]||m[f]||o;return r?a.a.createElement(h,c({ref:t},l,{components:r})):a.a.createElement(h,c({ref:t},l))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),p=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},u=function(e){var t=p(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=p(r),f=n,h=u["".concat(i,".").concat(f)]||u[f]||m[f]||o;return r?a.a.createElement(h,c({ref:t},l,{components:r})):a.a.createElement(h,c({ref:t},l))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l0 to compute geomean\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(o.b)("p",null,"While we have performed sufficient testing on ",Object(o.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(o.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(o.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(o.b)("p",null,"Another significant leap is ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(o.b)("p",null,"Visit the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0"}),"release notes")," for more details."))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),s=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return n?r.a.createElement(f,c({ref:t},p,{components:n})):r.a.createElement(f,c({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var p=2;p0 to compute geomean\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(o.b)("p",null,"While we have performed sufficient testing on ",Object(o.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(o.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(o.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(o.b)("p",null,"Another significant leap is ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(o.b)("p",null,"Visit the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0"}),"release notes")," for more details."))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),s=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,f=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return n?r.a.createElement(f,c({ref:t},p,{components:n})):r.a.createElement(f,c({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(n),d=r,g=u["".concat(i,".").concat(d)]||u[d]||b[d]||o;return n?a.a.createElement(g,c({ref:t},l,{components:n})):a.a.createElement(g,c({ref:t},l))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(n),d=r,g=u["".concat(i,".").concat(d)]||u[d]||b[d]||o;return n?a.a.createElement(g,c({ref:t},l,{components:n})):a.a.createElement(g,c({ref:t},l))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p=a.a.createContext({}),s=function(e){var n=a.a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):c({},n,{},e)),t},u=function(e){var n=s(e.components);return a.a.createElement(p.Provider,{value:n},e.children)},b={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},d=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(t),d=r,m=u["".concat(i,".").concat(d)]||u[d]||b[d]||o;return t?a.a.createElement(m,c({ref:n},p,{components:t})):a.a.createElement(m,c({ref:n},p))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=d;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p=a.a.createContext({}),s=function(e){var n=a.a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):c({},n,{},e)),t},u=function(e){var n=s(e.components);return a.a.createElement(p.Provider,{value:n},e.children)},b={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},d=Object(r.forwardRef)((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(t),d=r,m=u["".concat(i,".").concat(d)]||u[d]||b[d]||o;return t?a.a.createElement(m,c({ref:n},p,{components:t})):a.a.createElement(m,c({ref:n},p))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=d;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(c[a]=e[a]);return c}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(c[a]=e[a])}return c}var l=c.a.createContext({}),f=function(e){var t=c.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},m=function(e){var t=f(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,b=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),m=f(a),d=n,u=m["".concat(b,".").concat(d)]||m[d]||p[d]||r;return a?c.a.createElement(u,i({ref:t},l,{components:a})):c.a.createElement(u,i({ref:t},l))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,b=new Array(r);b[0]=d;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:n,b[1]=i;for(var l=2;l=0||(c[a]=e[a]);return c}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(c[a]=e[a])}return c}var l=c.a.createContext({}),f=function(e){var t=c.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},m=function(e){var t=f(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,b=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),m=f(a),d=n,u=m["".concat(b,".").concat(d)]||m[d]||p[d]||r;return a?c.a.createElement(u,i({ref:t},l,{components:a})):c.a.createElement(u,i({ref:t},l))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,b=new Array(r);b[0]=d;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:n,b[1]=i;for(var l=2;lconn")," is introduced to help retrieve connections by file descriptors returned from pollers, but now the user can run ",Object(i.b)("inlineCode",{parentName:"p"},"go build")," with build tags ",Object(i.b)("inlineCode",{parentName:"p"},"poll_opt"),", like this: ",Object(i.b)("inlineCode",{parentName:"p"},"go build -tags=poll_opt"),", and ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," then switch to the optimized implementations of pollers that invoke the system calls of ",Object(i.b)("inlineCode",{parentName:"p"},"epoll")," or ",Object(i.b)("inlineCode",{parentName:"p"},"kqueue")," directly and add file descriptors to the interest list along with storing the corresponding connection pointers into ",Object(i.b)("inlineCode",{parentName:"p"},"epoll_data")," or ",Object(i.b)("inlineCode",{parentName:"p"},"kevent"),", in which case ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," can get rid of the HASH MAP of ",Object(i.b)("inlineCode",{parentName:"p"},"fd->conn")," and regain each connection pointer by the conversion of ",Object(i.b)("inlineCode",{parentName:"p"},"void*")," pointer in the I/O event-looping. In theory, it ought to achieve a higher performance with this optimization."),Object(i.b)("p",null,"See ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/230"}),"#230")," for code details."),Object(i.b)("h2",{id:"ticker"},"Ticker"),Object(i.b)("p",null,"The ",Object(i.b)("inlineCode",{parentName:"p"},"EventHandler.Tick")," event fires ticks at a specified interval.\nThe first tick fires right after the gnet server starts up and if you intend to set up a ticker event, don't forget to pass an option: ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.WithTicker(true)")," to ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.Serve"),"."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'events.Tick = func() (delay time.Duration, action Action){\n log.Printf("tick")\n delay = time.Second\n return\n}\n')),Object(i.b)("h2",{id:"udp"},"UDP"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," supports UDP protocol so the ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.Serve")," method can bind to UDP addresses."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"All incoming and outgoing packets will not be buffered but read and sent directly, which means all functions of ",Object(i.b)("inlineCode",{parentName:"li"},"gnet.Conn")," that manipulate the internal buffers are not available; users should use the ",Object(i.b)("inlineCode",{parentName:"li"},"frame []byte")," from the ",Object(i.b)("inlineCode",{parentName:"li"},"gnet.React(frame []byte, c gnet.Conn)")," as the UDP packet instead calling functions of ",Object(i.b)("inlineCode",{parentName:"li"},"gnet.Conn"),", like ",Object(i.b)("inlineCode",{parentName:"li"},"c.Read()"),", ",Object(i.b)("inlineCode",{parentName:"li"},"c.ResetBuffer()"),", ",Object(i.b)("inlineCode",{parentName:"li"},"c.BufferLength()")," and so on, to process data."),Object(i.b)("li",{parentName:"ul"},"The ",Object(i.b)("inlineCode",{parentName:"li"},"EventHandler.OnOpened")," and ",Object(i.b)("inlineCode",{parentName:"li"},"EventHandler.OnClosed")," events are not available for UDP sockets, only the ",Object(i.b)("inlineCode",{parentName:"li"},"React")," event."),Object(i.b)("li",{parentName:"ul"},"The UDP equivalents of ",Object(i.b)("inlineCode",{parentName:"li"},"AsyncWrite([]byte)")," in TCP is ",Object(i.b)("inlineCode",{parentName:"li"},"SendTo([]byte)"),".")),Object(i.b)("h2",{id:"unix-domain-socket"},"Unix Domain Socket"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet"),' also supports UDS(Unix Domain Socket), just pass the UDS addresses like "unix://xxx" to the ',Object(i.b)("inlineCode",{parentName:"p"},"gnet.Serve")," method and you could play with it."),Object(i.b)("p",null,"It is nothing different from making use of TCP when doing stuff with UDS, so the ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," UDS servers are able to leverage all event functions which are available under TCP protocol."),Object(i.b)("h2",{id:"multi-threads"},"Multi-threads"),Object(i.b)("p",null,"The ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.WithMulticore(true)")," indicates whether the server will be effectively created with multi-cores, if so, then you must take care of synchronizing memory between all event callbacks, otherwise, it will run the server with a single thread. The number of threads in the server will be automatically assigned to the value of ",Object(i.b)("inlineCode",{parentName:"p"},"runtime.NumCPU()"),"."),Object(i.b)("h2",{id:"load-balancing"},"Load Balancing"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," currently supports three load balancing algorithms: ",Object(i.b)("inlineCode",{parentName:"p"},"Round-Robin"),", ",Object(i.b)("inlineCode",{parentName:"p"},"Source-Addr-Hash")," and ",Object(i.b)("inlineCode",{parentName:"p"},"Least-Connections"),", you are able to decide which algorithm to use by passing the functional option ",Object(i.b)("inlineCode",{parentName:"p"},"LB")," (RoundRobin/LeastConnections/SourceAddrHash) to ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.Serve"),"."),Object(i.b)("p",null,"If the load balancing algorithm is not specified explicitly, ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," will use ",Object(i.b)("inlineCode",{parentName:"p"},"Round-Robin")," by default."),Object(i.b)("h2",{id:"so_reuseport"},"SO_REUSEPORT"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," server is able to utilize the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://lwn.net/Articles/542629/"}),"SO_REUSEPORT")," option which allows multiple sockets on the same host to bind to the same port and the OS kernel takes care of the load balancing for you, it wakes one socket per ",Object(i.b)("inlineCode",{parentName:"p"},"connect")," event coming to resolved the ",Object(i.b)("inlineCode",{parentName:"p"},"thundering herd"),"."),Object(i.b)("p",null,"By default, ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," is not going to be haunted by the ",Object(i.b)("inlineCode",{parentName:"p"},"thundering herd")," under its networking model:\u300emultiple reactors\u300fwhich gets only ",Object(i.b)("strong",{parentName:"p"},"one"),' main reactor to listen on "address:port" and accept new sockets. So this ',Object(i.b)("inlineCode",{parentName:"p"},"SO_REUSEPORT")," option is trivial in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," but note that it will fall back to the old networking model of ",Object(i.b)("inlineCode",{parentName:"p"},"evio")," when you enable the ",Object(i.b)("inlineCode",{parentName:"p"},"SO_REUSEPORT")," option."),Object(i.b)("p",null,"Just use functional options to set up ",Object(i.b)("inlineCode",{parentName:"p"},"SO_REUSEPORT")," and you can enjoy this feature:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'gnet.Serve(events, "tcp://:9000", gnet.WithMulticore(true), gnet.WithReusePort(true)))\n')),Object(i.b)("h2",{id:"multiple-built-in-codecs-for-tcp-stream"},"Multiple built-in codecs for TCP stream"),Object(i.b)("p",null,"There are multiple built-in codecs in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," which allow you to encode/decode frames into/from TCP stream."),Object(i.b)("p",null,"So far ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," has four kinds of built-in codecs: LineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec and LengthFieldBasedFrameCodec, which generally meets most scenarios, but still ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," allows users to customize their own codecs in their ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," servers by implementing the interface ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc#ICodec"}),"gnet.ICodec")," and replacing the default codec in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," with customized codec via functional options."),Object(i.b)("p",null,"Here is an ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples/tree/master/examples/codec"}),"example")," with codec, showing you how to leverage codec to encode/decode network frames into/from TCP stream."),Object(i.b)("h1",{id:"-performance"},"\ud83d\udcca Performance"),Object(i.b)("h2",{id:"benchmarks-on-techempower"},"Benchmarks on TechEmpower"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),'# Hardware Environment\n* 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 3.20GHz\n* 32GB RAM\n* Dedicated Cisco 10-gigabit Ethernet switch\n* Debian 12 "bookworm"\n* Go1.19.x linux/amd64\n')),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-top50-light.jpg",alt:null}))),Object(i.b)("p",null,"This is a leaderboard of the top ",Object(i.b)("strong",{parentName:"p"},Object(i.b)("em",{parentName:"strong"},"50"))," out of ",Object(i.b)("strong",{parentName:"p"},Object(i.b)("em",{parentName:"strong"},"486"))," frameworks that encompass various programming languages worldwide, in which ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," is ranked ",Object(i.b)("strong",{parentName:"p"},Object(i.b)("em",{parentName:"strong"},"first")),"."),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-topN-go-light.png",alt:null}))),Object(i.b)("p",null,"This is the full framework ranking of Go and ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," tops all the other frameworks, which makes ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," the ",Object(i.b)("strong",{parentName:"p"},Object(i.b)("em",{parentName:"strong"},"fastest"))," networking framework in Go."),Object(i.b)("p",null,"To see the full ranking list, visit ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.techempower.com/benchmarks/#hw=ph&test=plaintext§ion=data-r22"}),"TechEmpower Benchmark ",Object(i.b)("strong",{parentName:"a"},"Round 22")),"."),Object(i.b)("h2",{id:"contrasts-to-the-similar-networking-libraries"},"Contrasts to the similar networking libraries"),Object(i.b)("h2",{id:"on-linux-epoll"},"On Linux (epoll)"),Object(i.b)("h3",{id:"test-environment"},"Test Environment"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"# Machine information\n OS : Ubuntu 20.04/x86_64\n CPU : 8 CPU cores, AMD EPYC 7K62 48-Core Processor\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.17.2 linux/amd64\nGOMAXPROCS : 8\n\n# Benchmark parameters\nTCP connections : 1000/2000/5000/10000\nPacket size : 512/1024/2048/4096/8192/16384/32768/65536 bytes\nTest duration : 15s\n")),Object(i.b)("h4",{id:"echo-benchmark"},Object(i.b)("a",Object(a.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_linux.png",alt:null}))),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_linux.png",alt:null}))),Object(i.b)("h2",{id:"on-macos-kqueue"},"On MacOS (kqueue)"),Object(i.b)("h3",{id:"test-environment-1"},"Test Environment"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"# Machine information\n OS : MacOS Big Sur/x86_64\n CPU : 6 CPU cores, Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.16.5 darwin/amd64\nGOMAXPROCS : 12\n\n# Benchmark parameters\nTCP connections : 300/400/500/600/700\nPacket size : 512/1024/2048/4096/8192 bytes\nTest duration : 15s\n")),Object(i.b)("h4",{id:"echo-benchmark-1"},Object(i.b)("a",Object(a.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_macos.png",alt:null}))),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_macos.png",alt:null}))),Object(i.b)("h1",{id:"\ufe0f-license"},"\ufe0f\ud83d\udea8 License"),Object(i.b)("p",null,"Source code in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," is available under the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/blob/master/LICENSE"}),"MIT License"),"."),Object(i.b)("h1",{id:"-contributors"},"\ud83d\udc4f Contributors"),Object(i.b)("p",null,"Please read the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/blob/master/CONTRIBUTING.md"}),"Contributing Guidelines")," before opening a PR and thank you to all the developers who already made contributions to ",Object(i.b)("inlineCode",{parentName:"p"},"gnet"),"!"),Object(i.b)("p",null,Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/graphs/contributors"}),Object(i.b)("img",Object(a.a)({parentName:"a"},{src:"https://opencollective.com/gnet/contributors.svg?width=890&button=false",alt:null})))),Object(i.b)("h1",{id:"-acknowledgments"},"\ud83d\ude4f Acknowledgments"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/tidwall/evio"}),"evio")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/netty/netty"}),"netty")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/ants"}),"ants")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/kavu/go_reuseport"}),"go_reuseport")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/valyala/bytebufferpool"}),"bytebufferpool")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/smallnest/goframe"}),"goframe")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/smallnest/ringbuffer"}),"ringbuffer"))),Object(i.b)("h1",{id:"-relevant-articles"},"\u2693 Relevant Articles"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://www.freecodecamp.org/news/million-websockets-and-go-cc58418460bb/"}),"A Million WebSockets and Go")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://speakerdeck.com/eranyanay/going-infinite-handling-1m-websockets-connections-in-go"}),"Going Infinite, handling 1M websockets connections in Go")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/go-netpoll-io-multiplexing-reactor"}),"Go netpoller \u539f\u751f\u7f51\u7edc\u6a21\u578b\u4e4b\u6e90\u7801\u5168\u9762\u63ed\u79d8")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/go-event-loop-networking-library-gnet"}),"gnet: \u4e00\u4e2a\u8f7b\u91cf\u7ea7\u4e14\u9ad8\u6027\u80fd\u7684 Golang \u7f51\u7edc\u5e93")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/releasing-gnet-v1-with-techempower"}),"\u6700\u5feb\u7684 Go \u7f51\u7edc\u6846\u67b6 gnet \u6765\u5566\uff01"))),Object(i.b)("h1",{id:"-use-cases"},"\ud83c\udfa1 Use cases"),Object(i.b)("p",null,"The following companies/organizations use ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," as the underlying network service in production."),Object(i.b)("a",{href:"https://www.tencent.com"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/tencent_logo.png",width:"250",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://www.iqiyi.com",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/iqiyi-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://www.mi.com",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/mi-logo.png",width:"150",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://www.360.com",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/360-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://tieba.baidu.com/",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/baidu-tieba-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://game.qq.com/",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/tencent-games-logo.png",width:"200",align:"middle"})),Object(i.b)("p",null,"If your projects are also using ",Object(i.b)("inlineCode",{parentName:"p"},"gnet"),", feel free to open a ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pulls"}),"pull request")," refreshing this list of use cases."),Object(i.b)("h1",{id:"-backers"},"\ud83d\udcb0 Backers"),Object(i.b)("p",null,"Support us with a monthly donation and help us continue our activities."),Object(i.b)("a",{href:"https://opencollective.com/gnet#backers",target:"_blank"},Object(i.b)("img",{src:"https://opencollective.com/gnet/backers.svg"})),Object(i.b)("h1",{id:"-sponsors"},"\ud83d\udc8e Sponsors"),Object(i.b)("p",null,"Become a bronze sponsor with a monthly donation of $10 and get your logo on our README on Github."),Object(i.b)("a",{href:"https://opencollective.com/gnet#sponsors",target:"_blank"},Object(i.b)("img",{src:"https://opencollective.com/gnet/sponsors.svg"})),Object(i.b)("h1",{id:"\ufe0f-buy-me-a-coffee"},"\u2615\ufe0f Buy me a coffee"),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Please be sure to leave your name, Github account or other social media accounts when you donate by the following means so that I can add it to the list of donors as a token of my appreciation.")),Object(i.b)("table",null,Object(i.b)("tr",null,Object(i.b)("td",null,Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/WeChatPay.JPG",width:"250"})),Object(i.b)("td",null,Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/AliPay.JPG",width:"250"})),Object(i.b)("td",null,Object(i.b)("a",{href:"https://www.paypal.me/R136a1X",target:"_blank"},Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/PayPal.JPG",width:"250"}))))),Object(i.b)("h1",{id:"-patrons"},"\ud83d\udcb4 Patrons"),Object(i.b)("a",{target:"_blank",href:"https://github.com/patrick-othmer"},Object(i.b)("img",{src:"https://avatars1.githubusercontent.com/u/8964313",width:"100",alt:"Patrick Othmer"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/panjf2000/gnet"},Object(i.b)("img",{src:"https://avatars2.githubusercontent.com/u/50285334",width:"100",alt:"Jimmy"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/cafra"},Object(i.b)("img",{src:"https://avatars0.githubusercontent.com/u/13758306",width:"100",alt:"ChenZhen"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/yangwenmai"},Object(i.b)("img",{src:"https://avatars0.githubusercontent.com/u/1710912",width:"100",alt:"Mai Yang"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/BeijingWks"},Object(i.b)("img",{src:"https://avatars3.githubusercontent.com/u/33656339",width:"100",alt:"\u738b\u5f00\u5e05"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/refs"},Object(i.b)("img",{src:"https://avatars3.githubusercontent.com/u/6905948",width:"100",alt:"Unger Alejandro"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/Swaggadan"},Object(i.b)("img",{src:"https://avatars.githubusercontent.com/u/137142",width:"100",alt:"Swaggadan"})),"\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/Wuvist"},Object(i.b)("img",{src:"https://avatars.githubusercontent.com/u/657796",width:"100",alt:"Weng Wei"})),Object(i.b)("h1",{id:"-jetbrains-os-licenses"},"\ud83d\udd11 JetBrains OS licenses"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," had been being developed with ",Object(i.b)("inlineCode",{parentName:"p"},"GoLand")," IDE under the ",Object(i.b)("strong",{parentName:"p"},"free JetBrains Open Source license(s)")," granted by JetBrains s.r.o., hence I would like to express my thanks here."),Object(i.b)("a",{href:"https://www.jetbrains.com/?from=gnet",target:"_blank"},Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/jetbrains/jetbrains-variant-4.png",width:"250",align:"middle"})),Object(i.b)("h1",{id:"-sponsorship"},"\ud83d\udd0b Sponsorship"),Object(i.b)("p",null,Object(i.b)("h3",null,"This project is supported by:"),Object(i.b)("a",{href:"https://www.digitalocean.com/"},Object(i.b)("img",{src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg",width:"201px"}))))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var a=n(0),o=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var b=o.a.createContext({}),s=function(e){var t=o.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=s(e.components);return o.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},h=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),p=s(n),h=a,m=p["".concat(r,".").concat(h)]||p[h]||u[h]||i;return n?o.a.createElement(m,c({ref:t},b,{components:n})):o.a.createElement(m,c({ref:t},b))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=h;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,r[1]=c;for(var b=2;bconn")," is introduced to help retrieve connections by file descriptors returned from pollers, but now the user can run ",Object(i.b)("inlineCode",{parentName:"p"},"go build")," with build tags ",Object(i.b)("inlineCode",{parentName:"p"},"poll_opt"),", like this: ",Object(i.b)("inlineCode",{parentName:"p"},"go build -tags=poll_opt"),", and ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," then switch to the optimized implementations of pollers that invoke the system calls of ",Object(i.b)("inlineCode",{parentName:"p"},"epoll")," or ",Object(i.b)("inlineCode",{parentName:"p"},"kqueue")," directly and add file descriptors to the interest list along with storing the corresponding connection pointers into ",Object(i.b)("inlineCode",{parentName:"p"},"epoll_data")," or ",Object(i.b)("inlineCode",{parentName:"p"},"kevent"),", in which case ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," can get rid of the HASH MAP of ",Object(i.b)("inlineCode",{parentName:"p"},"fd->conn")," and regain each connection pointer by the conversion of ",Object(i.b)("inlineCode",{parentName:"p"},"void*")," pointer in the I/O event-looping. In theory, it ought to achieve a higher performance with this optimization."),Object(i.b)("p",null,"See ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/230"}),"#230")," for code details."),Object(i.b)("h2",{id:"ticker"},"Ticker"),Object(i.b)("p",null,"The ",Object(i.b)("inlineCode",{parentName:"p"},"EventHandler.Tick")," event fires ticks at a specified interval.\nThe first tick fires right after the gnet server starts up and if you intend to set up a ticker event, don't forget to pass an option: ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.WithTicker(true)")," to ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.Serve"),"."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'events.Tick = func() (delay time.Duration, action Action){\n log.Printf("tick")\n delay = time.Second\n return\n}\n')),Object(i.b)("h2",{id:"udp"},"UDP"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," supports UDP protocol so the ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.Serve")," method can bind to UDP addresses."),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"All incoming and outgoing packets will not be buffered but read and sent directly, which means all functions of ",Object(i.b)("inlineCode",{parentName:"li"},"gnet.Conn")," that manipulate the internal buffers are not available; users should use the ",Object(i.b)("inlineCode",{parentName:"li"},"frame []byte")," from the ",Object(i.b)("inlineCode",{parentName:"li"},"gnet.React(frame []byte, c gnet.Conn)")," as the UDP packet instead calling functions of ",Object(i.b)("inlineCode",{parentName:"li"},"gnet.Conn"),", like ",Object(i.b)("inlineCode",{parentName:"li"},"c.Read()"),", ",Object(i.b)("inlineCode",{parentName:"li"},"c.ResetBuffer()"),", ",Object(i.b)("inlineCode",{parentName:"li"},"c.BufferLength()")," and so on, to process data."),Object(i.b)("li",{parentName:"ul"},"The ",Object(i.b)("inlineCode",{parentName:"li"},"EventHandler.OnOpened")," and ",Object(i.b)("inlineCode",{parentName:"li"},"EventHandler.OnClosed")," events are not available for UDP sockets, only the ",Object(i.b)("inlineCode",{parentName:"li"},"React")," event."),Object(i.b)("li",{parentName:"ul"},"The UDP equivalents of ",Object(i.b)("inlineCode",{parentName:"li"},"AsyncWrite([]byte)")," in TCP is ",Object(i.b)("inlineCode",{parentName:"li"},"SendTo([]byte)"),".")),Object(i.b)("h2",{id:"unix-domain-socket"},"Unix Domain Socket"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet"),' also supports UDS(Unix Domain Socket), just pass the UDS addresses like "unix://xxx" to the ',Object(i.b)("inlineCode",{parentName:"p"},"gnet.Serve")," method and you could play with it."),Object(i.b)("p",null,"It is nothing different from making use of TCP when doing stuff with UDS, so the ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," UDS servers are able to leverage all event functions which are available under TCP protocol."),Object(i.b)("h2",{id:"multi-threads"},"Multi-threads"),Object(i.b)("p",null,"The ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.WithMulticore(true)")," indicates whether the server will be effectively created with multi-cores, if so, then you must take care of synchronizing memory between all event callbacks, otherwise, it will run the server with a single thread. The number of threads in the server will be automatically assigned to the value of ",Object(i.b)("inlineCode",{parentName:"p"},"runtime.NumCPU()"),"."),Object(i.b)("h2",{id:"load-balancing"},"Load Balancing"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," currently supports three load balancing algorithms: ",Object(i.b)("inlineCode",{parentName:"p"},"Round-Robin"),", ",Object(i.b)("inlineCode",{parentName:"p"},"Source-Addr-Hash")," and ",Object(i.b)("inlineCode",{parentName:"p"},"Least-Connections"),", you are able to decide which algorithm to use by passing the functional option ",Object(i.b)("inlineCode",{parentName:"p"},"LB")," (RoundRobin/LeastConnections/SourceAddrHash) to ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.Serve"),"."),Object(i.b)("p",null,"If the load balancing algorithm is not specified explicitly, ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," will use ",Object(i.b)("inlineCode",{parentName:"p"},"Round-Robin")," by default."),Object(i.b)("h2",{id:"so_reuseport"},"SO_REUSEPORT"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," server is able to utilize the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://lwn.net/Articles/542629/"}),"SO_REUSEPORT")," option which allows multiple sockets on the same host to bind to the same port and the OS kernel takes care of the load balancing for you, it wakes one socket per ",Object(i.b)("inlineCode",{parentName:"p"},"connect")," event coming to resolved the ",Object(i.b)("inlineCode",{parentName:"p"},"thundering herd"),"."),Object(i.b)("p",null,"By default, ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," is not going to be haunted by the ",Object(i.b)("inlineCode",{parentName:"p"},"thundering herd")," under its networking model:\u300emultiple reactors\u300fwhich gets only ",Object(i.b)("strong",{parentName:"p"},"one"),' main reactor to listen on "address:port" and accept new sockets. So this ',Object(i.b)("inlineCode",{parentName:"p"},"SO_REUSEPORT")," option is trivial in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," but note that it will fall back to the old networking model of ",Object(i.b)("inlineCode",{parentName:"p"},"evio")," when you enable the ",Object(i.b)("inlineCode",{parentName:"p"},"SO_REUSEPORT")," option."),Object(i.b)("p",null,"Just use functional options to set up ",Object(i.b)("inlineCode",{parentName:"p"},"SO_REUSEPORT")," and you can enjoy this feature:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-go"}),'gnet.Serve(events, "tcp://:9000", gnet.WithMulticore(true), gnet.WithReusePort(true)))\n')),Object(i.b)("h2",{id:"multiple-built-in-codecs-for-tcp-stream"},"Multiple built-in codecs for TCP stream"),Object(i.b)("p",null,"There are multiple built-in codecs in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," which allow you to encode/decode frames into/from TCP stream."),Object(i.b)("p",null,"So far ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," has four kinds of built-in codecs: LineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec and LengthFieldBasedFrameCodec, which generally meets most scenarios, but still ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," allows users to customize their own codecs in their ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," servers by implementing the interface ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/gnet?tab=doc#ICodec"}),"gnet.ICodec")," and replacing the default codec in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," with customized codec via functional options."),Object(i.b)("p",null,"Here is an ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/gnet-io/gnet-examples/tree/master/examples/codec"}),"example")," with codec, showing you how to leverage codec to encode/decode network frames into/from TCP stream."),Object(i.b)("h1",{id:"-performance"},"\ud83d\udcca Performance"),Object(i.b)("h2",{id:"benchmarks-on-techempower"},"Benchmarks on TechEmpower"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),'# Hardware Environment\n* 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 3.20GHz\n* 32GB RAM\n* Dedicated Cisco 10-gigabit Ethernet switch\n* Debian 12 "bookworm"\n* Go1.19.x linux/amd64\n')),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-top50-light.jpg",alt:null}))),Object(i.b)("p",null,"This is a leaderboard of the top ",Object(i.b)("strong",{parentName:"p"},Object(i.b)("em",{parentName:"strong"},"50"))," out of ",Object(i.b)("strong",{parentName:"p"},Object(i.b)("em",{parentName:"strong"},"486"))," frameworks that encompass various programming languages worldwide, in which ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," is ranked ",Object(i.b)("strong",{parentName:"p"},Object(i.b)("em",{parentName:"strong"},"first")),"."),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-topN-go-light.png",alt:null}))),Object(i.b)("p",null,"This is the full framework ranking of Go and ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," tops all the other frameworks, which makes ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," the ",Object(i.b)("strong",{parentName:"p"},Object(i.b)("em",{parentName:"strong"},"fastest"))," networking framework in Go."),Object(i.b)("p",null,"To see the full ranking list, visit ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.techempower.com/benchmarks/#hw=ph&test=plaintext§ion=data-r22"}),"TechEmpower Benchmark ",Object(i.b)("strong",{parentName:"a"},"Round 22")),"."),Object(i.b)("h2",{id:"contrasts-to-the-similar-networking-libraries"},"Contrasts to the similar networking libraries"),Object(i.b)("h2",{id:"on-linux-epoll"},"On Linux (epoll)"),Object(i.b)("h3",{id:"test-environment"},"Test Environment"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"# Machine information\n OS : Ubuntu 20.04/x86_64\n CPU : 8 CPU cores, AMD EPYC 7K62 48-Core Processor\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.17.2 linux/amd64\nGOMAXPROCS : 8\n\n# Benchmark parameters\nTCP connections : 1000/2000/5000/10000\nPacket size : 512/1024/2048/4096/8192/16384/32768/65536 bytes\nTest duration : 15s\n")),Object(i.b)("h4",{id:"echo-benchmark"},Object(i.b)("a",Object(a.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_linux.png",alt:null}))),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_linux.png",alt:null}))),Object(i.b)("h2",{id:"on-macos-kqueue"},"On MacOS (kqueue)"),Object(i.b)("h3",{id:"test-environment-1"},"Test Environment"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-powershell"}),"# Machine information\n OS : MacOS Big Sur/x86_64\n CPU : 6 CPU cores, Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.16.5 darwin/amd64\nGOMAXPROCS : 12\n\n# Benchmark parameters\nTCP connections : 300/400/500/600/700\nPacket size : 512/1024/2048/4096/8192 bytes\nTest duration : 15s\n")),Object(i.b)("h4",{id:"echo-benchmark-1"},Object(i.b)("a",Object(a.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_macos.png",alt:null}))),Object(i.b)("p",null,Object(i.b)("img",Object(a.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_macos.png",alt:null}))),Object(i.b)("h1",{id:"\ufe0f-license"},"\ufe0f\ud83d\udea8 License"),Object(i.b)("p",null,"Source code in ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," is available under the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/blob/master/LICENSE"}),"MIT License"),"."),Object(i.b)("h1",{id:"-contributors"},"\ud83d\udc4f Contributors"),Object(i.b)("p",null,"Please read the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/blob/master/CONTRIBUTING.md"}),"Contributing Guidelines")," before opening a PR and thank you to all the developers who already made contributions to ",Object(i.b)("inlineCode",{parentName:"p"},"gnet"),"!"),Object(i.b)("p",null,Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/graphs/contributors"}),Object(i.b)("img",Object(a.a)({parentName:"a"},{src:"https://opencollective.com/gnet/contributors.svg?width=890&button=false",alt:null})))),Object(i.b)("h1",{id:"-acknowledgments"},"\ud83d\ude4f Acknowledgments"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/tidwall/evio"}),"evio")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/netty/netty"}),"netty")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/ants"}),"ants")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/kavu/go_reuseport"}),"go_reuseport")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/valyala/bytebufferpool"}),"bytebufferpool")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/smallnest/goframe"}),"goframe")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/smallnest/ringbuffer"}),"ringbuffer"))),Object(i.b)("h1",{id:"-relevant-articles"},"\u2693 Relevant Articles"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://www.freecodecamp.org/news/million-websockets-and-go-cc58418460bb/"}),"A Million WebSockets and Go")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://speakerdeck.com/eranyanay/going-infinite-handling-1m-websockets-connections-in-go"}),"Going Infinite, handling 1M websockets connections in Go")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/go-netpoll-io-multiplexing-reactor"}),"Go netpoller \u539f\u751f\u7f51\u7edc\u6a21\u578b\u4e4b\u6e90\u7801\u5168\u9762\u63ed\u79d8")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/go-event-loop-networking-library-gnet"}),"gnet: \u4e00\u4e2a\u8f7b\u91cf\u7ea7\u4e14\u9ad8\u6027\u80fd\u7684 Golang \u7f51\u7edc\u5e93")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://strikefreedom.top/releasing-gnet-v1-with-techempower"}),"\u6700\u5feb\u7684 Go \u7f51\u7edc\u6846\u67b6 gnet \u6765\u5566\uff01"))),Object(i.b)("h1",{id:"-use-cases"},"\ud83c\udfa1 Use cases"),Object(i.b)("p",null,"The following companies/organizations use ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," as the underlying network service in production."),Object(i.b)("a",{href:"https://www.tencent.com"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/tencent_logo.png",width:"250",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://www.iqiyi.com",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/iqiyi-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://www.mi.com",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/mi-logo.png",width:"150",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://www.360.com",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/360-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://tieba.baidu.com/",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/baidu-tieba-logo.png",width:"200",align:"middle"})),"\xa0\xa0",Object(i.b)("a",{href:"https://game.qq.com/",target:"_blank"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/logos/tencent-games-logo.png",width:"200",align:"middle"})),Object(i.b)("p",null,"If your projects are also using ",Object(i.b)("inlineCode",{parentName:"p"},"gnet"),", feel free to open a ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pulls"}),"pull request")," refreshing this list of use cases."),Object(i.b)("h1",{id:"-backers"},"\ud83d\udcb0 Backers"),Object(i.b)("p",null,"Support us with a monthly donation and help us continue our activities."),Object(i.b)("a",{href:"https://opencollective.com/gnet#backers",target:"_blank"},Object(i.b)("img",{src:"https://opencollective.com/gnet/backers.svg"})),Object(i.b)("h1",{id:"-sponsors"},"\ud83d\udc8e Sponsors"),Object(i.b)("p",null,"Become a bronze sponsor with a monthly donation of $10 and get your logo on our README on Github."),Object(i.b)("a",{href:"https://opencollective.com/gnet#sponsors",target:"_blank"},Object(i.b)("img",{src:"https://opencollective.com/gnet/sponsors.svg"})),Object(i.b)("h1",{id:"\ufe0f-buy-me-a-coffee"},"\u2615\ufe0f Buy me a coffee"),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Please be sure to leave your name, Github account or other social media accounts when you donate by the following means so that I can add it to the list of donors as a token of my appreciation.")),Object(i.b)("table",null,Object(i.b)("tr",null,Object(i.b)("td",null,Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/WeChatPay.JPG",width:"250"})),Object(i.b)("td",null,Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/AliPay.JPG",width:"250"})),Object(i.b)("td",null,Object(i.b)("a",{href:"https://www.paypal.me/R136a1X",target:"_blank"},Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/payments/PayPal.JPG",width:"250"}))))),Object(i.b)("h1",{id:"-patrons"},"\ud83d\udcb4 Patrons"),Object(i.b)("a",{target:"_blank",href:"https://github.com/patrick-othmer"},Object(i.b)("img",{src:"https://avatars1.githubusercontent.com/u/8964313",width:"100",alt:"Patrick Othmer"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/panjf2000/gnet"},Object(i.b)("img",{src:"https://avatars2.githubusercontent.com/u/50285334",width:"100",alt:"Jimmy"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/cafra"},Object(i.b)("img",{src:"https://avatars0.githubusercontent.com/u/13758306",width:"100",alt:"ChenZhen"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/yangwenmai"},Object(i.b)("img",{src:"https://avatars0.githubusercontent.com/u/1710912",width:"100",alt:"Mai Yang"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/BeijingWks"},Object(i.b)("img",{src:"https://avatars3.githubusercontent.com/u/33656339",width:"100",alt:"\u738b\u5f00\u5e05"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/refs"},Object(i.b)("img",{src:"https://avatars3.githubusercontent.com/u/6905948",width:"100",alt:"Unger Alejandro"})),"\xa0\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/Swaggadan"},Object(i.b)("img",{src:"https://avatars.githubusercontent.com/u/137142",width:"100",alt:"Swaggadan"})),"\xa0",Object(i.b)("a",{target:"_blank",href:"https://github.com/Wuvist"},Object(i.b)("img",{src:"https://avatars.githubusercontent.com/u/657796",width:"100",alt:"Weng Wei"})),Object(i.b)("h1",{id:"-jetbrains-os-licenses"},"\ud83d\udd11 JetBrains OS licenses"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," had been being developed with ",Object(i.b)("inlineCode",{parentName:"p"},"GoLand")," IDE under the ",Object(i.b)("strong",{parentName:"p"},"free JetBrains Open Source license(s)")," granted by JetBrains s.r.o., hence I would like to express my thanks here."),Object(i.b)("a",{href:"https://www.jetbrains.com/?from=gnet",target:"_blank"},Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/jetbrains/jetbrains-variant-4.png",width:"250",align:"middle"})),Object(i.b)("h1",{id:"-sponsorship"},"\ud83d\udd0b Sponsorship"),Object(i.b)("p",null,Object(i.b)("h3",null,"This project is supported by:"),Object(i.b)("a",{href:"https://www.digitalocean.com/"},Object(i.b)("img",{src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg",width:"201px"}))))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var a=n(0),o=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var b=o.a.createContext({}),s=function(e){var t=o.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=s(e.components);return o.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},h=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),p=s(n),h=a,m=p["".concat(r,".").concat(h)]||p[h]||u[h]||i;return n?o.a.createElement(m,c({ref:t},b,{components:n})):o.a.createElement(m,c({ref:t},b))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=h;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,r[1]=c;for(var b=2;b=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),p=function(e){var t=a.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},f=function(e){var t=p(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(n),g=r,m=f["".concat(i,".").concat(g)]||f[g]||u[g]||o;return n?a.a.createElement(m,c({ref:t},s,{components:n})):a.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),p=function(e){var t=a.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},f=function(e){var t=p(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(n),g=r,m=f["".concat(i,".").concat(g)]||f[g]||u[g]||o;return n?a.a.createElement(m,c({ref:t},s,{components:n})):a.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s0&&l.a.createElement("div",{className:"row footer__links"},l.a.createElement("div",{className:"col col--5 footer__col"},l.a.createElement("div",{className:"margin-bottom--md"},l.a.createElement(d.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),l.a.createElement("div",{className:"margin-bottom--md"},l.a.createElement(I,{description:!1,width:"150px"})),l.a.createElement("div",null,l.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},l.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",l.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},l.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",l.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},l.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,a){return l.a.createElement("div",{key:a,className:"col footer__col"},null!=e.title?l.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?l.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,a){return e.html?l.a.createElement("li",{key:a,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):l.a.createElement("li",{key:e.href||e.to,className:"footer__item"},l.a.createElement(A,e))}))):null)}))),(m||r)&&l.a.createElement("div",{className:"text--center"},m&&m.src&&l.a.createElement("div",{className:"margin-bottom--sm"},m.href?l.a.createElement("a",{href:m.href,target:"_blank",rel:"noopener noreferrer",className:P.a.footerLogoLink},l.a.createElement(B,{alt:m.alt,url:s})):l.a.createElement(B,{alt:m.alt,url:s}),l.a.createElement("br",null),l.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:P.a.footerLogoLink},l.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),r,l.a.createElement("br",null),l.a.createElement("small",null,l.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",l.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},F=t(290),H=t(291),R=t(3);t(135);a.a=function(e){var a=Object(g.a)().siteConfig,t=void 0===a?{}:a,n=t.favicon,i=(t.tagline,t.title),o=t.themeConfig.image,m=t.url,s=e.children,d=e.title,u=e.noFooter,h=e.description,b=e.image,E=e.keywords,f=(e.permalink,e.version),p=d?d+" | "+i:i,v=b||o,N=m+Object(w.a)(v),_=Object(w.a)(n),k=Object(R.h)(),y=k?"https://gnet.host"+(k.pathname.endsWith("/")?k.pathname:k.pathname+"/"):null;return l.a.createElement(H.a,null,l.a.createElement(F.a,null,l.a.createElement(c.a,null,l.a.createElement("html",{lang:"en"}),l.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),p&&l.a.createElement("title",null,p),p&&l.a.createElement("meta",{property:"og:title",content:p}),n&&l.a.createElement("link",{rel:"shortcut icon",href:_}),h&&l.a.createElement("meta",{name:"description",content:h}),h&&l.a.createElement("meta",{property:"og:description",content:h}),f&&l.a.createElement("meta",{name:"docsearch:version",content:f}),E&&E.length&&l.a.createElement("meta",{name:"keywords",content:E.join(",")}),v&&l.a.createElement("meta",{property:"og:image",content:N}),v&&l.a.createElement("meta",{property:"twitter:image",content:N}),v&&l.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+p}),v&&l.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),v&&l.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),y&&l.a.createElement("meta",{property:"og:url",content:y}),l.a.createElement("meta",{name:"twitter:card",content:"summary"}),y&&l.a.createElement("link",{rel:"canonical",href:y})),l.a.createElement(r.a,null),l.a.createElement(D,null),l.a.createElement("div",{className:"main-wrapper"},s),!u&&l.a.createElement(V,null)))}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{205:function(e,a,t){"use strict";t.r(a);var n=t(0),l=t.n(n),r=t(273),c=(t(143),t(267));a.default=function(){var e=Object(c.a)().siteConfig;return(void 0===e?{}:e).customFields.metadata.team,l.a.createElement(r.a,{title:"Contact",description:"Contact the gnet author"},l.a.createElement("header",{className:"hero"},l.a.createElement("div",{className:"container container--fluid"},l.a.createElement("h1",null,"Contact"),l.a.createElement("div",{className:"hero--subtitle"},"gnet is an open-source software created by ",l.a.createElement("a",{href:"https://github.com/panjf2000"},"Andy Pan"),". You can contact the author using any of the options below."))),l.a.createElement("main",null,l.a.createElement("section",null,l.a.createElement("div",{className:"container"},l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:"col"},l.a.createElement("a",{href:"mailto:i@andypan.me",className:"panel text--center"},l.a.createElement("div",{className:"panel--icon"},l.a.createElement("i",{className:"feather icon-mail"})),l.a.createElement("div",{className:"panel--title"},"i@andypan.me"),l.a.createElement("div",{className:"panel--description"},"Send me an email"))),l.a.createElement("div",{className:"col"},l.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank",className:"panel text--center"},l.a.createElement("div",{className:"panel--icon"},l.a.createElement("i",{className:"feather icon-twitter"})),l.a.createElement("div",{className:"panel--title"},"@panjf2000"),l.a.createElement("div",{className:"panel--description"},"Tweet at me"))),l.a.createElement("div",{className:"col"},l.a.createElement("a",{href:"https://discord.gg/UyKD7NZcfH",target:"_blank",className:"panel text--center"},l.a.createElement("div",{className:"panel--icon"},l.a.createElement("i",{className:"feather icon-message-circle"})),l.a.createElement("div",{className:"panel--title"},"Chat"),l.a.createElement("div",{className:"panel--description"},"Join our chat"))))))))}},272:function(e,a,t){"use strict";t.d(a,"a",(function(){return l})),t.d(a,"b",(function(){return r}));var n=t(267);function l(){var e=Object(n.a)().siteConfig,a=(void 0===e?{}:e).customFields.metadata.latest_highlight,t=Date.parse(a.date),l=new Date,r=Math.abs(l-t),c=Math.ceil(r/864e5),i=null;return"undefined"!=typeof window&&(i=new Date(parseInt(window.localStorage.getItem("highlightsViewedAt")||"0"))),c<30&&(!i||i0&&l.a.createElement("div",{className:"row footer__links"},l.a.createElement("div",{className:"col col--5 footer__col"},l.a.createElement("div",{className:"margin-bottom--md"},l.a.createElement(d.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),l.a.createElement("div",{className:"margin-bottom--md"},l.a.createElement(I,{description:!1,width:"150px"})),l.a.createElement("div",null,l.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},l.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",l.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},l.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",l.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},l.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,a){return l.a.createElement("div",{key:a,className:"col footer__col"},null!=e.title?l.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?l.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,a){return e.html?l.a.createElement("li",{key:a,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):l.a.createElement("li",{key:e.href||e.to,className:"footer__item"},l.a.createElement(A,e))}))):null)}))),(m||r)&&l.a.createElement("div",{className:"text--center"},m&&m.src&&l.a.createElement("div",{className:"margin-bottom--sm"},m.href?l.a.createElement("a",{href:m.href,target:"_blank",rel:"noopener noreferrer",className:P.a.footerLogoLink},l.a.createElement(B,{alt:m.alt,url:s})):l.a.createElement(B,{alt:m.alt,url:s}),l.a.createElement("br",null),l.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:P.a.footerLogoLink},l.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),r,l.a.createElement("br",null),l.a.createElement("small",null,l.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",l.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},F=t(290),H=t(291),R=t(3);t(135);a.a=function(e){var a=Object(g.a)().siteConfig,t=void 0===a?{}:a,n=t.favicon,i=(t.tagline,t.title),o=t.themeConfig.image,m=t.url,s=e.children,d=e.title,u=e.noFooter,h=e.description,b=e.image,E=e.keywords,f=(e.permalink,e.version),p=d?d+" | "+i:i,v=b||o,N=m+Object(w.a)(v),_=Object(w.a)(n),k=Object(R.h)(),y=k?"https://gnet.host"+(k.pathname.endsWith("/")?k.pathname:k.pathname+"/"):null;return l.a.createElement(H.a,null,l.a.createElement(F.a,null,l.a.createElement(c.a,null,l.a.createElement("html",{lang:"en"}),l.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),p&&l.a.createElement("title",null,p),p&&l.a.createElement("meta",{property:"og:title",content:p}),n&&l.a.createElement("link",{rel:"shortcut icon",href:_}),h&&l.a.createElement("meta",{name:"description",content:h}),h&&l.a.createElement("meta",{property:"og:description",content:h}),f&&l.a.createElement("meta",{name:"docsearch:version",content:f}),E&&E.length&&l.a.createElement("meta",{name:"keywords",content:E.join(",")}),v&&l.a.createElement("meta",{property:"og:image",content:N}),v&&l.a.createElement("meta",{property:"twitter:image",content:N}),v&&l.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+p}),v&&l.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),v&&l.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),y&&l.a.createElement("meta",{property:"og:url",content:y}),l.a.createElement("meta",{name:"twitter:card",content:"summary"}),y&&l.a.createElement("link",{rel:"canonical",href:y})),l.a.createElement(r.a,null),l.a.createElement(D,null),l.a.createElement("div",{className:"main-wrapper"},s),!u&&l.a.createElement(V,null)))}}}]); \ No newline at end of file diff --git a/885349a6.5d948652.js b/885349a6.878b80aa.js similarity index 98% rename from 885349a6.5d948652.js rename to 885349a6.878b80aa.js index 3f40b24ff..f677c9202 100644 --- a/885349a6.5d948652.js +++ b/885349a6.878b80aa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{208:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return c})),r.d(t,"rightToc",(function(){return p})),r.d(t,"default",(function(){return s}));var n=r(1),a=r(9),o=(r(0),r(265)),i={last_modified_on:"2023-11-11",$schema:"/.meta/.schemas/highlights.json",title:"Gnet tops the TechEmpower benchmark leaderboard",description:"Gnet tops the TechEmpower benchmark leaderboard, becoming the world No. 1",author_github:"https://github.com/panjf2000",pr_numbers:[8096138],release:"2.3.5",hide_on_release_notes:!1,tags:["type: tag","domain: v2.3.5"]},c={date:"2023-11-11T00:00:00.000Z",description:"Gnet tops the TechEmpower benchmark leaderboard, becoming the world No. 1",permalink:"/highlights/2023-11-11-gnet-techempower-benchmark-top1",readingTime:"1 min read",source:"@site/highlights/2023-11-11-gnet-techempower-benchmark-top1.md",tags:[{label:"type: tag",permalink:"/highlights/tags/type-tag"},{label:"domain: v2.3.5",permalink:"/highlights/tags/domain-v-2-3-5"}],title:"Gnet tops the TechEmpower benchmark leaderboard",truncated:!1,prevItem:{title:"Release of gnet v2.4.0",permalink:"/highlights/2024-04-04-release-of-gnet-v2-4-0"},nextItem:{title:"Release of gnet v2.3.0",permalink:"/highlights/2023-07-01-release-of-gnet-v2-3-0"}},p=[{value:"Breaking News \ud83c\udf89\ud83c\udf89\ud83c\udf89",id:"breaking-news-",children:[]}],l={rightToc:p};function s(e){var t=e.components,r=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(n.a)({},l,r,{components:t,mdxType:"MDXLayout"}),Object(o.b)("h2",{id:"breaking-news-"},"Breaking News \ud83c\udf89\ud83c\udf89\ud83c\udf89"),Object(o.b)("p",null,"TechEmpower Web Framework Benchmarks is a performance comparison of many web application frameworks executing fundamental tasks such as JSON serialization, database access, and server-side template composition."),Object(o.b)("p",null,Object(o.b)("inlineCode",{parentName:"p"},"gnet")," tops the leaderboard of TechEmpower Plaintext Benchmark in round 22, becoming the world No. 1."),Object(o.b)("p",null,Object(o.b)("img",Object(n.a)({parentName:"p"},{src:"/img/techempower-plaintext-top50-dark.jpg",alt:null}))),Object(o.b)("p",null,"This is a leaderboard of the top ",Object(o.b)("strong",{parentName:"p"},Object(o.b)("em",{parentName:"strong"},"50"))," out of ",Object(o.b)("strong",{parentName:"p"},Object(o.b)("em",{parentName:"strong"},"486"))," frameworks that encompass various programming languages worldwide, in which ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is ranked ",Object(o.b)("strong",{parentName:"p"},Object(o.b)("em",{parentName:"strong"},"first")),"."),Object(o.b)("p",null,Object(o.b)("img",Object(n.a)({parentName:"p"},{src:"/img/techempower-plaintext-topN-go-dark.png",alt:null}))),Object(o.b)("p",null,"This is the full framework ranking of Go and ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," tops all the other frameworks, which makes ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," the ",Object(o.b)("strong",{parentName:"p"},Object(o.b)("em",{parentName:"strong"},"fastest"))," networking framework in Go."),Object(o.b)("p",null,"To see the full leaderboard, visit ",Object(o.b)("a",Object(n.a)({parentName:"p"},{href:"https://www.techempower.com/benchmarks/#hw=ph&test=plaintext§ion=data-r22"}),"TechEmpower Benchmark ",Object(o.b)("strong",{parentName:"a"},"Round 22")),"."))}s.isMDXComponent=!0},265:function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return u}));var n=r(0),a=r.n(n);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},m=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},h=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),m=s(r),h=n,u=m["".concat(i,".").concat(h)]||m[h]||b[h]||o;return r?a.a.createElement(u,c({ref:t},l,{components:r})):a.a.createElement(u,c({ref:t},l))}));function u(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=h;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},m=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},h=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),m=s(r),h=n,u=m["".concat(i,".").concat(h)]||m[h]||b[h]||o;return r?a.a.createElement(u,c({ref:t},l,{components:r})):a.a.createElement(u,c({ref:t},l))}));function u(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=h;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),p=function(e){var t=a.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},f=function(e){var t=p(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(n),g=r,m=f["".concat(i,".").concat(g)]||f[g]||u[g]||o;return n?a.a.createElement(m,c({ref:t},s,{components:n})):a.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),p=function(e){var t=a.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},f=function(e){var t=p(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(n),g=r,m=f["".concat(i,".").concat(g)]||f[g]||u[g]||o;return n?a.a.createElement(m,c({ref:t},s,{components:n})):a.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var b=o.a.createContext({}),s=function(e){var t=o.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=s(e.components);return o.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=a,d=p["".concat(r,".").concat(m)]||p[m]||u[m]||i;return n?o.a.createElement(d,c({ref:t},b,{components:n})):o.a.createElement(d,c({ref:t},b))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,r[1]=c;for(var b=2;b=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var b=o.a.createContext({}),s=function(e){var t=o.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=s(e.components);return o.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=a,d=p["".concat(r,".").concat(m)]||p[m]||u[m]||i;return n?o.a.createElement(d,c({ref:t},b,{components:n})):o.a.createElement(d,c({ref:t},b))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,r[1]=c;for(var b=2;b=0||(c[a]=e[a]);return c}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(c[a]=e[a])}return c}var l=c.a.createContext({}),p=function(e){var t=c.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):b({},t,{},e)),a},f=function(e){var t=p(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},u=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,i=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),f=p(a),u=n,s=f["".concat(i,".").concat(u)]||f[u]||m[u]||r;return a?c.a.createElement(s,b({ref:t},l,{components:a})):c.a.createElement(s,b({ref:t},l))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,i=new Array(r);i[0]=u;var b={};for(var o in t)hasOwnProperty.call(t,o)&&(b[o]=t[o]);b.originalType=e,b.mdxType="string"==typeof e?e:n,i[1]=b;for(var l=2;l=0||(c[a]=e[a]);return c}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(c[a]=e[a])}return c}var l=c.a.createContext({}),p=function(e){var t=c.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):b({},t,{},e)),a},f=function(e){var t=p(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},u=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,i=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),f=p(a),u=n,s=f["".concat(i,".").concat(u)]||f[u]||m[u]||r;return a?c.a.createElement(s,b({ref:t},l,{components:a})):c.a.createElement(s,b({ref:t},l))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,i=new Array(r);i[0]=u;var b={};for(var o in t)hasOwnProperty.call(t,o)&&(b[o]=t[o]);b.originalType=e,b.mdxType="string"==typeof e?e:n,i[1]=b;for(var l=2;l=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},s=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(n),m=r,f=s["".concat(i,".").concat(m)]||s[m]||d[m]||a;return n?o.a.createElement(f,c({ref:t},l,{components:n})):o.a.createElement(f,c({ref:t},l))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},s=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(n),m=r,f=s["".concat(i,".").concat(m)]||s[m]||d[m]||a;return n?o.a.createElement(f,c({ref:t},l,{components:n})):o.a.createElement(f,c({ref:t},l))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l0&&c.a.createElement("div",{className:"row footer__links"},c.a.createElement("div",{className:"col col--5 footer__col"},c.a.createElement("div",{className:"margin-bottom--md"},c.a.createElement(s.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),c.a.createElement("div",{className:"margin-bottom--md"},c.a.createElement(N,{description:!1,width:"150px"})),c.a.createElement("div",null,c.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},c.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",c.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},c.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",c.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},c.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),t.map((function(d,u){return c.a.createElement("div",{key:u,className:"col footer__col"},null!=d.title?c.a.createElement("h4",{className:"footer__title"},d.title):null,null!=d.items&&Array.isArray(d.items)&&d.items.length>0?c.a.createElement("ul",{className:"footer__items"},d.items.map((function(d,u){return d.html?c.a.createElement("li",{key:u,className:"footer__item",dangerouslySetInnerHTML:{__html:d.html}}):c.a.createElement("li",{key:d.href||d.to,className:"footer__item"},c.a.createElement(M,d))}))):null)}))),(i||n)&&c.a.createElement("div",{className:"text--center"},i&&i.src&&c.a.createElement("div",{className:"margin-bottom--sm"},i.href?c.a.createElement("a",{href:i.href,target:"_blank",rel:"noopener noreferrer",className:P.a.footerLogoLink},c.a.createElement(L,{alt:i.alt,url:l})):c.a.createElement(L,{alt:i.alt,url:l}),c.a.createElement("br",null),c.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:P.a.footerLogoLink},c.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),n,c.a.createElement("br",null),c.a.createElement("small",null,c.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",c.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},j=e(290),R=e(291),U=e(3);e(135);u.a=function(d){var u=Object(b.a)().siteConfig,e=void 0===u?{}:u,a=e.favicon,t=(e.tagline,e.title),r=e.themeConfig.image,i=e.url,l=d.children,s=d.title,o=d.noFooter,m=d.description,p=d.image,D=d.keywords,h=(d.permalink,d.version),g=s?s+" | "+t:t,_=p||r,E=i+Object(x.a)(_),I=Object(x.a)(a),v=Object(U.h)(),y=v?"https://gnet.host"+(v.pathname.endsWith("/")?v.pathname:v.pathname+"/"):null;return c.a.createElement(R.a,null,c.a.createElement(j.a,null,c.a.createElement(f.a,null,c.a.createElement("html",{lang:"en"}),c.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),g&&c.a.createElement("title",null,g),g&&c.a.createElement("meta",{property:"og:title",content:g}),a&&c.a.createElement("link",{rel:"shortcut icon",href:I}),m&&c.a.createElement("meta",{name:"description",content:m}),m&&c.a.createElement("meta",{property:"og:description",content:m}),h&&c.a.createElement("meta",{name:"docsearch:version",content:h}),D&&D.length&&c.a.createElement("meta",{name:"keywords",content:D.join(",")}),_&&c.a.createElement("meta",{property:"og:image",content:E}),_&&c.a.createElement("meta",{property:"twitter:image",content:E}),_&&c.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+g}),_&&c.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),_&&c.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),y&&c.a.createElement("meta",{property:"og:url",content:y}),c.a.createElement("meta",{name:"twitter:card",content:"summary"}),y&&c.a.createElement("link",{rel:"canonical",href:y})),c.a.createElement(n.a,null),c.a.createElement(O,null),c.a.createElement("div",{className:"main-wrapper"},l),!o&&c.a.createElement(T,null)))}},274:function(d,u,e){"use strict";var a=e(12),c=e(301)(5),n=!0;"find"in[]&&Array(1).find((function(){n=!1})),a(a.P+a.F*n,"Array",{find:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}}),e(80)("find")},275:function(d,u,e){"use strict";e.d(u,"a",(function(){return n}));e(79),e(298),e(274),e(78);var a=e(279),c=e.n(a);function n(d,u){var e=new c.a;return d.map((function(d){var a=d;return"string"==typeof d&&(a={label:d,permalink:"/"+u+"/tags/"+e.slug(d)}),function(d,u){if(d.enriched)return d;var e=d.label.split(": ",2),a=e[0],c=e[1],n="primary";switch(a){case"domain":n="blue";break;case"type":n="pink";break;default:n="primary"}return{category:a,count:d.count,enriched:!0,label:d.label,permalink:d.permalink,style:n,value:c}}(a)}))}},277:function(d,u,e){var a=e(24).f,c=Function.prototype,n=/^\s*function ([^ (]*)/;"name"in c||e(10)&&a(c,"name",{configurable:!0,get:function(){try{return(""+this).match(n)[1]}catch(d){return""}}})},278:function(d,u,e){"use strict";var a=e(9),c=e(0),n=e.n(c),f=e(266),t=e.n(f),r=e(267),i=(e(139),e(140)),l=e.n(i);u.a=function(d){return function(u){var e,c=u.id,f=Object(a.a)(u,["id"]),i=Object(r.a)().siteConfig,s=(i=void 0===i?{}:i).themeConfig,o=(s=void 0===s?{}:s).navbar,m=(o=void 0===o?{}:o).hideOnScroll,b=void 0!==m&&m;return c?n.a.createElement(d,f,n.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:t()("anchor",(e={},e[l.a.enhancedAnchor]=!b,e)),id:c}),n.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+c,title:"Direct link to heading"},"#"),f.children):n.a.createElement(d,f)}}},279:function(d,u,e){var a=e(288);d.exports=t;var c=Object.hasOwnProperty,n=/\s/g,f=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function t(){if(!(this instanceof t))return new t;this.reset()}function r(d,u){return"string"!=typeof d?"":(u||(d=d.toLowerCase()),d.trim().replace(f,"").replace(a(),"").replace(n,"-"))}t.prototype.slug=function(d,u){for(var e=r(d,!0===u),a=e;c.call(this.occurrences,e);)this.occurrences[a]++,e=a+"-"+this.occurrences[a];return this.occurrences[e]=0,e},t.prototype.reset=function(){this.occurrences=Object.create(null)},t.slug=r},287:function(d,u,e){"use strict";var a=e(0),c=e.n(a),n=e(268),f=e(266),t=e.n(f);u.a=function(d){var u=d.count,e=d.label,a=d.permalink,f=d.style,r=d.value,i=d.valueOnly;return c.a.createElement(n.a,{to:a+"/",className:t()("badge","badge--rounded","badge--"+f)},i?r:e,u&&c.a.createElement(c.a.Fragment,null," (",u,")"))}},288:function(d,u){d.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},301:function(d,u,e){var a=e(28),c=e(54),n=e(25),f=e(27),t=e(302);d.exports=function(d,u){var e=1==d,r=2==d,i=3==d,l=4==d,s=6==d,o=5==d||s,m=u||t;return function(u,t,b){for(var p,D,h=n(u),g=c(h),_=a(t,b,3),E=f(g.length),I=0,v=e?m(u,E):r?m(u,0):void 0;E>I;I++)if((o||I in g)&&(D=_(p=g[I],I,h),d))if(e)v[I]=D;else if(D)switch(d){case 3:return!0;case 5:return p;case 6:return I;case 2:v.push(p)}else if(l)return!1;return s?-1:i||l?l:v}}},302:function(d,u,e){var a=e(303);d.exports=function(d,u){return new(a(d))(u)}},303:function(d,u,e){var a=e(14),c=e(323),n=e(2)("species");d.exports=function(d){var u;return c(d)&&("function"!=typeof(u=d.constructor)||u!==Array&&!c(u.prototype)||(u=void 0),a(u)&&null===(u=u[n])&&(u=void 0)),void 0===u?Array:u}},327:function(d,u,e){d.exports=function(){var d=[],u=[],e={},a={},c={};function n(d){return"string"==typeof d?new RegExp("^"+d+"$","i"):d}function f(d,u){return d===u?u:d===d.toLowerCase()?u.toLowerCase():d===d.toUpperCase()?u.toUpperCase():d[0]===d[0].toUpperCase()?u.charAt(0).toUpperCase()+u.substr(1).toLowerCase():u.toLowerCase()}function t(d,u){return d.replace(/\$(\d{1,2})/g,(function(d,e){return u[e]||""}))}function r(d,u){return d.replace(u[0],(function(e,a){var c=t(u[1],arguments);return f(""===e?d[a-1]:e,c)}))}function i(d,u,a){if(!d.length||e.hasOwnProperty(d))return u;for(var c=a.length;c--;){var n=a[c];if(n[0].test(u))return r(u,n)}return u}function l(d,u,e){return function(a){var c=a.toLowerCase();return u.hasOwnProperty(c)?f(a,c):d.hasOwnProperty(c)?f(a,d[c]):i(c,a,e)}}function s(d,u,e,a){return function(a){var c=a.toLowerCase();return!!u.hasOwnProperty(c)||!d.hasOwnProperty(c)&&i(c,c,e)===c}}function o(d,u,e){return(e?u+" ":"")+(1===u?o.singular(d):o.plural(d))}return o.plural=l(c,a,d),o.isPlural=s(c,a,d),o.singular=l(a,c,u),o.isSingular=s(a,c,u),o.addPluralRule=function(u,e){d.push([n(u),e])},o.addSingularRule=function(d,e){u.push([n(d),e])},o.addUncountableRule=function(d){"string"!=typeof d?(o.addPluralRule(d,"$0"),o.addSingularRule(d,"$0")):e[d.toLowerCase()]=!0},o.addIrregularRule=function(d,u){u=u.toLowerCase(),d=d.toLowerCase(),c[d]=u,a[u]=d},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(d){return o.addIrregularRule(d[0],d[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(d){return o.addPluralRule(d[0],d[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(d){return o.addSingularRule(d[0],d[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\xe9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(o.addUncountableRule),o}()},386:function(d,u,e){"use strict";const a=e(387),c=d=>{if("string"!=typeof d)throw new TypeError("Expected a string");return d=(d=(d=a(d)).toLowerCase().replace(/[_-]+/g," ").replace(/\s{2,}/g," ").trim()).charAt(0).toUpperCase()+d.slice(1)};d.exports=c,d.exports.default=c},387:function(d,u,e){"use strict";const a=e(388);d.exports=(d,u)=>{if("string"!=typeof d)throw new TypeError("Expected a string");u=void 0===u?"_":u;const e=a("([\\p{Ll}\\d])(\\p{Lu})","g"),c=a("(\\p{Lu}+)(\\p{Lu}[\\p{Ll}\\d]+)","g");return d.replace(e,`$1${u}$2`).replace(c,`$1${u}$2`).toLowerCase()}},388:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var a=s(e(389)),c=s(e(390)),n=s(e(391)),f=s(e(392)),t=s(e(393)),r=s(e(394)),i=s(e(395)),l=s(e(396));function s(d){return d&&d.__esModule?d:{default:d}}(0,c.default)(a.default),(0,n.default)(a.default),(0,f.default)(a.default),(0,t.default)(a.default),(0,r.default)(a.default),(0,i.default)(a.default),(0,l.default)(a.default),u.default=a.default,d.exports=u.default},389:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var a={astral:!1},c={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},n={},f={},t={},r=[],i={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},l=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,s=void 0===c.exec.call(/()??/,"")[1],o=void 0!==/x/.flags,m={}.toString;function b(d){var u=!0;try{new RegExp("",d)}catch(e){u=!1}return u}var p=b("u"),D=b("y"),h={g:!0,i:!0,m:!0,u:p,y:D};function g(d,u,e,a,c){var n=void 0;if(d.xregexp={captureNames:u},c)return d;if(d.__proto__)d.__proto__=O.prototype;else for(n in O.prototype)d[n]=O.prototype[n];return d.xregexp.source=e,d.xregexp.flags=a?a.split("").sort().join(""):a,d}function _(d){return c.replace.call(d,/([\s\S])(?=[\s\S]*\1)/g,"")}function E(d,u){if(!O.isRegExp(d))throw new TypeError("Type RegExp expected");var e=d.xregexp||{},a=function(d){return o?d.flags:c.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(d))[1]}(d),n="",f="",t=null,r=null;return(u=u||{}).removeG&&(f+="g"),u.removeY&&(f+="y"),f&&(a=c.replace.call(a,new RegExp("["+f+"]+","g"),"")),u.addG&&(n+="g"),u.addY&&(n+="y"),n&&(a=_(a+n)),u.isInternalOnly||(void 0!==e.source&&(t=e.source),null!=e.flags&&(r=n?_(e.flags+n):e.flags)),d=g(new RegExp(u.source||d.source,a),function(d){return!(!d.xregexp||!d.xregexp.captureNames)}(d)?e.captureNames.slice(0):null,t,r,u.isInternalOnly)}function I(d){return parseInt(d,16)}function v(d,u,e){return"("===d.input[d.index-1]||")"===d.input[d.index+d[0].length]||function(d,u,e){return c.test.call(-1!==e.indexOf("x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,d.slice(u))}(d.input,d.index+d[0].length,e)?"":"(?:)"}function x(d){return parseInt(d,10).toString(16)}function y(d,u){return m.call(d)==="[object "+u+"]"}function C(d){for(;d.length<4;)d="0"+d;return d}function F(d){var u={};return y(d,"String")?(O.forEach(d,/[^\s,]+/,(function(d){u[d]=!0})),u):d}function w(d){if(!/^[\w$]$/.test(d))throw new Error("Flag must be a single character A-Za-z0-9_$");h[d]=!0}function S(d,u,e,a,c){for(var n=r.length,f=d[e],t=null,i=void 0,l=void 0;n--;)if(!((l=r[n]).leadChar&&l.leadChar!==f||l.scope!==a&&"all"!==l.scope||l.flag&&-1===u.indexOf(l.flag))&&(i=O.exec(d,l.regex,e,"sticky"))){t={matchLength:i[0].length,output:l.handler.call(c,i,a,u),reparse:l.reparse};break}return t}function k(d){a.astral=d}function A(d){if(null==d)throw new TypeError("Cannot convert null or undefined to object");return d}function O(d,u){if(O.isRegExp(d)){if(void 0!==u)throw new TypeError("Cannot supply flags when copying a RegExp");return E(d)}if(d=void 0===d?"":String(d),u=void 0===u?"":String(u),O.isInstalled("astral")&&-1===u.indexOf("A")&&(u+="A"),t[d]||(t[d]={}),!t[d][u]){for(var e={hasNamedCapture:!1,captureNames:[]},a="default",n="",f=0,r=void 0,l=function(d,u){var e=void 0;if(_(u)!==u)throw new SyntaxError("Invalid duplicate regex flag "+u);for(d=c.replace.call(d,/^\(\?([\w$]+)\)/,(function(d,e){if(c.test.call(/[gy]/,e))throw new SyntaxError("Cannot use flag g or y in mode modifier "+d);return u=_(u+e),""})),e=0;e"}else if(e)return"\\"+(+e+f);return d}if(!y(d,"Array")||!d.length)throw new TypeError("Must provide a nonempty array of patterns to merge");for(var i=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,l=[],s=void 0,o=0;o1&&-1!==e.indexOf("")){var a=E(this,{removeG:!0,isInternalOnly:!0});c.replace.call(String(d).slice(e.index),a,(function(){for(var d=arguments.length,u=Array(d),a=0;ae.index&&(this.lastIndex=e.index)}return this.global||(this.lastIndex=u),e},n.test=function(d){return!!n.exec.call(this,d)},n.match=function(d){if(O.isRegExp(d)){if(d.global){var u=c.match.apply(this,arguments);return d.lastIndex=0,u}}else d=new RegExp(d);return n.exec.call(d,A(this))},n.replace=function(d,u){var e=O.isRegExp(d),a=void 0,n=void 0,f=void 0;return e?(d.xregexp&&(n=d.xregexp.captureNames),a=d.lastIndex):d+="",f=y(u,"Function")?c.replace.call(String(this),d,(function(){for(var a=arguments.length,c=Array(a),f=0;fe.length-3)throw new SyntaxError("Backreference to undefined group "+d);return e[c]||""}throw new SyntaxError("Invalid token "+d)}})),e&&(d.global?d.lastIndex=0:d.lastIndex=a),f},n.split=function(d,u){if(!O.isRegExp(d))return c.split.apply(this,arguments);var e=String(this),a=[],n=d.lastIndex,f=0,t=void 0;return u=(void 0===u?-1:u)>>>0,O.forEach(e,d,(function(d){d.index+d[0].length>f&&(a.push(e.slice(f,d.index)),d.length>1&&d.indexu?a.slice(0,u):a},O.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(function(d,u){if("B"===d[1]&&"default"===u)return d[0];throw new SyntaxError("Invalid escape "+d[0])}),{scope:"all",leadChar:"\\"}),O.addToken(/\\u{([\dA-Fa-f]+)}/,(function(d,u,e){var a=I(d[1]);if(a>1114111)throw new SyntaxError("Invalid Unicode code point "+d[0]);if(a<=65535)return"\\u"+C(x(a));if(p&&-1!==e.indexOf("u"))return d[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")}),{scope:"all",leadChar:"\\"}),O.addToken(/\[(\^?)\]/,(function(d){return d[1]?"[\\s\\S]":"\\b\\B"}),{leadChar:"["}),O.addToken(/\(\?#[^)]*\)/,v,{leadChar:"("}),O.addToken(/\s+|#[^\n]*\n?/,v,{flag:"x"}),O.addToken(/\./,(function(){return"[\\s\\S]"}),{flag:"s",leadChar:"."}),O.addToken(/\\k<([\w$]+)>/,(function(d){var u=isNaN(d[1])?this.captureNames.indexOf(d[1])+1:+d[1],e=d.index+d[0].length;if(!u||u>this.captureNames.length)throw new SyntaxError("Backreference to undefined group "+d[0]);return"\\"+u+(e===d.input.length||isNaN(d.input[e])?"":"(?:)")}),{leadChar:"\\"}),O.addToken(/\\(\d+)/,(function(d,u){if(!("default"===u&&/^[1-9]/.test(d[1])&&+d[1]<=this.captureNames.length)&&"0"!==d[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+d[0]);return d[0]}),{scope:"all",leadChar:"\\"}),O.addToken(/\(\?P?<([\w$]+)>/,(function(d){if(!isNaN(d[1]))throw new SyntaxError("Cannot use integer as capture name "+d[0]);if("length"===d[1]||"__proto__"===d[1])throw new SyntaxError("Cannot use reserved word as capture name "+d[0]);if(-1!==this.captureNames.indexOf(d[1]))throw new SyntaxError("Cannot use same name for multiple groups "+d[0]);return this.captureNames.push(d[1]),this.hasNamedCapture=!0,"("}),{leadChar:"("}),O.addToken(/\((?!\?)/,(function(d,u,e){return-1!==e.indexOf("n")?"(?:":(this.captureNames.push(null),"(")}),{optionalFlags:"n",leadChar:"("}),u.default=O,d.exports=u.default},390:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){var u=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,e=d.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,u],"g",{conjunction:"or"});function a(d){var u=/^(?:\(\?:\))*\^/,e=/\$(?:\(\?:\))*$/;return u.test(d)&&e.test(d)&&e.test(d.replace(/\\[\s\S]/g,""))?d.replace(u,"").replace(e,""):d}function c(u,e){var a=e?"x":"";return d.isRegExp(u)?u.xregexp&&u.xregexp.captureNames?u:d(u.source,a):d(u,a)}function n(u){return u instanceof RegExp?u:d.escape(u)}function f(d,u,e){return d["subpattern"+e]=u,d}function t(d,u,e){return d+(u1?a-1:0),r=1;r"):r="(?:",p=b,""+r+l[f].pattern.replace(u,(function(d,u,e){if(u){if(t=l[f].names[b-p],++b,t)return"(?<"+t+">"}else if(e)return i=+e-1,l[f].names[i]?"\\k<"+l[f].names[i]+">":"\\"+(+e+p);return d}))+")"}if(c){if(t=g[D],h[++D]=++b,t)return"(?<"+t+">"}else if(n)return g[i=+n-1]?"\\k<"+g[i]+">":"\\"+h[+n];return d}));return d(_,t)}},d.exports=u.default},391:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){function u(d,u,e,a){return{name:d,value:u,start:e,end:a}}d.matchRecursive=function(e,a,c,n,f){f=f||{};var t=-1!==(n=n||"").indexOf("g"),r=-1!==n.indexOf("y"),i=n.replace(/y/g,""),l=f.escapeChar,s=f.valueNames,o=[],m=0,b=0,p=0,D=0,h=void 0,g=void 0,_=void 0,E=void 0,I=void 0;if(a=d(a,i),c=d(c,i),l){if(l.length>1)throw new Error("Cannot use more than one escape character");l=d.escape(l),I=new RegExp("(?:"+l+"[\\S\\s]|(?:(?!"+d.union([a,c],"",{conjunction:"or"}).source+")[^"+l+"])+)+",n.replace(/[^imu]+/g,""))}for(;;){if(l&&(p+=(d.exec(e,I,p,"sticky")||[""])[0].length),_=d.exec(e,a,p),E=d.exec(e,c,p),_&&E&&(_.index<=E.index?E=null:_=null),_||E)p=(b=(_||E).index)+(_||E)[0].length;else if(!m)break;if(r&&!m&&b>D)break;if(_)m||(h=b,g=p),++m;else{if(!E||!m)throw new Error("Unbalanced delimiter found in string");if(!--m&&(s?(s[0]&&h>D&&o.push(u(s[0],e.slice(D,h),D,h)),s[1]&&o.push(u(s[1],e.slice(h,g),h,g)),s[2]&&o.push(u(s[2],e.slice(g,b),g,b)),s[3]&&o.push(u(s[3],e.slice(b,p),b,p))):o.push(e.slice(g,b)),D=p,!t))break}b===p&&++p}return t&&!r&&s&&s[0]&&e.length>D&&o.push(u(s[0],e.slice(D),D,e.length)),o}},d.exports=u.default},392:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){var u={},e=d._dec,a=d._hex,c=d._pad4;function n(d){return d.replace(/[- _]+/g,"").toLowerCase()}function f(d){var u=/^\\[xu](.+)/.exec(d);return u?e(u[1]):d.charCodeAt("\\"===d[0]?1:0)}function t(e){var n,t,r;return u[e]["b!"]||(u[e]["b!"]=(n=u[e].bmp,t="",r=-1,d.forEach(n,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(d){var u=f(d[1]);u>r+1&&(t+="\\u"+c(a(r+1)),u>r+2&&(t+="-\\u"+c(a(u-1)))),r=f(d[2]||d[1])})),r<65535&&(t+="\\u"+c(a(r+1)),r<65534&&(t+="-\\uFFFF")),t))}function r(d,e){var a=e?"a!":"a=";return u[d][a]||(u[d][a]=function(d,e){var a=u[d],c="";return a.bmp&&!a.isBmpLast&&(c="["+a.bmp+"]"+(a.astral?"|":"")),a.astral&&(c+=a.astral),a.isBmpLast&&a.bmp&&(c+=(a.astral?"|":"")+"["+a.bmp+"]"),e?"(?:(?!"+c+")(?:[\ud800-\udbff][\udc00-\udfff]|[\0-\uffff]))":"(?:"+c+")"}(d,e))}d.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,(function(d,e,a){var c="P"===d[1]||!!d[2],f=-1!==a.indexOf("A"),i=n(d[4]||d[3]),l=u[i];if("P"===d[1]&&d[2])throw new SyntaxError("Invalid double negation "+d[0]);if(!u.hasOwnProperty(i))throw new SyntaxError("Unknown Unicode token "+d[0]);if(l.inverseOf){if(i=n(l.inverseOf),!u.hasOwnProperty(i))throw new ReferenceError("Unicode token missing data "+d[0]+" -> "+l.inverseOf);l=u[i],c=!c}if(!l.bmp&&!f)throw new SyntaxError("Astral mode required for Unicode token "+d[0]);if(f){if("class"===e)throw new SyntaxError("Astral mode does not support Unicode tokens within character classes");return r(i,c)}return"class"===e?c?t(i):l.bmp:(c?"[^":"[")+l.bmp+"]"}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),d.addUnicodeData=function(e){for(var a=void 0,c=0;c\\x5E`\\x7C~\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20be\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u23fe\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b98-\u2bb9\u2bbd-\u2bc8\u2bca-\u2bd1\u2bec-\u2bef\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9b\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|\ud805\udf3f|\ud81a[\udf3c-\udf3f\udf45]|\ud82f\udc9c|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\udde8\ude00-\ude41\ude45\udf00-\udf56]|\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|\ud83b[\udef0\udef1]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd10-\udd2e\udd30-\udd6b\udd70-\uddac\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\udf00-\udfff]|\ud83d[\udc00-\uded2\udee0-\udeec\udef0-\udef6\udf00-\udf73\udf80-\udfd4]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udd10-\udd1e\udd20-\udd27\udd30\udd33-\udd3e\udd40-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\x24\xa2-\xa5\u058f\u060b\u09f2\u09f3\u09fb\u0af1\u0bf9\u0e3f\u17db\u20a0-\u20be\ua838\ufdfc\ufe69\uff04\uffe0\uffe1\uffe5\uffe6"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\x5E`\xa8\xaf\xb4\xb8\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u309b\u309c\ua700-\ua716\ua720\ua721\ua789\ua78a\uab5b\ufbb2-\ufbc1\uff3e\uff40\uffe3",astral:"\ud83c[\udffb-\udfff]"},{name:"Sm",alias:"Math_Symbol",bmp:"\\x2B<->\\x7C~\xac\xb1\xd7\xf7\u03f6\u0606-\u0608\u2044\u2052\u207a-\u207c\u208a-\u208c\u2118\u2140-\u2144\u214b\u2190-\u2194\u219a\u219b\u21a0\u21a3\u21a6\u21ae\u21ce\u21cf\u21d2\u21d4\u21f4-\u22ff\u2320\u2321\u237c\u239b-\u23b3\u23dc-\u23e1\u25b7\u25c1\u25f8-\u25ff\u266f\u27c0-\u27c4\u27c7-\u27e5\u27f0-\u27ff\u2900-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2aff\u2b30-\u2b44\u2b47-\u2b4c\ufb29\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe9-\uffec",astral:"\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud83b[\udef0\udef1]"},{name:"So",alias:"Other_Symbol",bmp:"\xa6\xa9\xae\xb0\u0482\u058d\u058e\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0d4f\u0d79\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u214a\u214c\u214d\u214f\u218a\u218b\u2195-\u2199\u219c-\u219f\u21a1\u21a2\u21a4\u21a5\u21a7-\u21ad\u21af-\u21cd\u21d0\u21d1\u21d3\u21d5-\u21f3\u2300-\u2307\u230c-\u231f\u2322-\u2328\u232b-\u237b\u237d-\u239a\u23b4-\u23db\u23e2-\u23fe\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u25b6\u25b8-\u25c0\u25c2-\u25f7\u2600-\u266e\u2670-\u2767\u2794-\u27bf\u2800-\u28ff\u2b00-\u2b2f\u2b45\u2b46\u2b4d-\u2b73\u2b76-\u2b95\u2b98-\u2bb9\u2bbd-\u2bc8\u2bca-\u2bd1\u2bec-\u2bef\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ua836\ua837\ua839\uaa77-\uaa79\ufdfd\uffe4\uffe8\uffed\uffee\ufffc\ufffd",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9b\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|\ud805\udf3f|\ud81a[\udf3c-\udf3f\udf45]|\ud82f\udc9c|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\udde8\ude00-\ude41\ude45\udf00-\udf56]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd10-\udd2e\udd30-\udd6b\udd70-\uddac\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\udf00-\udffa]|\ud83d[\udc00-\uded2\udee0-\udeec\udef0-\udef6\udf00-\udf73\udf80-\udfd4]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udd10-\udd1e\udd20-\udd27\udd30\udd33-\udd3e\udd40-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]"},{name:"Z",alias:"Separator",bmp:" \xa0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000"},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:" \xa0\u1680\u2000-\u200a\u202f\u205f\u3000"}])},d.exports=u.default},395:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");var u=[{name:"ASCII",bmp:"\0-\x7f"},{name:"Alphabetic",bmp:"A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0345\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05b0-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0657\u0659-\u065f\u066e-\u06d3\u06d5-\u06dc\u06e1-\u06e8\u06ed-\u06ef\u06fa-\u06fc\u06ff\u0710-\u073f\u074d-\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0817\u081a-\u082c\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u08d4-\u08df\u08e3-\u08e9\u08f0-\u093b\u093d-\u094c\u094e-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd-\u09c4\u09c7\u09c8\u09cb\u09cc\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09f0\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3e-\u0a42\u0a47\u0a48\u0a4b\u0a4c\u0a51\u0a59-\u0a5c\u0a5e\u0a70-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd-\u0ac5\u0ac7-\u0ac9\u0acb\u0acc\u0ad0\u0ae0-\u0ae3\u0af9\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d-\u0b44\u0b47\u0b48\u0b4b\u0b4c\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd0\u0bd7\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4c\u0c55\u0c56\u0c58-\u0c5a\u0c60-\u0c63\u0c80-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccc\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0cf1\u0cf2\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4c\u0d4e\u0d54-\u0d57\u0d5f-\u0d63\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e46\u0e4d\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ecd\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f71-\u0f81\u0f88-\u0f97\u0f99-\u0fbc\u1000-\u1036\u1038\u103b-\u103f\u1050-\u1062\u1065-\u1068\u106e-\u1086\u108e\u109c\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135f\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17b3\u17b6-\u17c8\u17d7\u17dc\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u1938\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a1b\u1a20-\u1a5e\u1a61-\u1a74\u1aa7\u1b00-\u1b33\u1b35-\u1b43\u1b45-\u1b4b\u1b80-\u1ba9\u1bac-\u1baf\u1bba-\u1be5\u1be7-\u1bf1\u1c00-\u1c35\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1d00-\u1dbf\u1de7-\u1df4\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua674-\ua67b\ua67f-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua827\ua840-\ua873\ua880-\ua8c3\ua8c5\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua92a\ua930-\ua952\ua960-\ua97c\ua980-\ua9b2\ua9b4-\ua9bf\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa60-\uaa76\uaa7a\uaa7e-\uaabe\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf5\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabea\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\udd40-\udd74\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf30-\udf4a\udf50-\udf7a\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf\udfd1-\udfd5]|\ud801[\udc00-\udc9d\udcb0-\udcd3\udcd8-\udcfb\udd00-\udd27\udd30-\udd63\ude00-\udf36\udf40-\udf55\udf60-\udf67]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude33\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udc80-\udcb2\udcc0-\udcf2]|\ud804[\udc00-\udc45\udc82-\udcb8\udcd0-\udce8\udd00-\udd32\udd50-\udd72\udd76\udd80-\uddbf\uddc1-\uddc4\uddda\udddc\ude00-\ude11\ude13-\ude34\ude37\ude3e\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udee8\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d-\udf44\udf47\udf48\udf4b\udf4c\udf50\udf57\udf5d-\udf63]|\ud805[\udc00-\udc41\udc43-\udc45\udc47-\udc4a\udc80-\udcc1\udcc4\udcc5\udcc7\udd80-\uddb5\uddb8-\uddbe\uddd8-\udddd\ude00-\ude3e\ude40\ude44\ude80-\udeb5\udf00-\udf19\udf1d-\udf2a]|\ud806[\udca0-\udcdf\udcff\udec0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc3e\udc40\udc72-\udc8f\udc92-\udca7\udca9-\udcb6]|\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc80-\udd43]|[\ud80c\ud81c-\ud820\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\uded0-\udeed\udf00-\udf36\udf40-\udf43\udf63-\udf77\udf7d-\udf8f]|\ud81b[\udf00-\udf44\udf50-\udf7e\udf93-\udf9f\udfe0]|\ud821[\udc00-\udfec]|\ud822[\udc00-\udef2]|\ud82c[\udc00\udc01]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9e]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a]|\ud83a[\udc00-\udcc4\udd00-\udd43\udd47]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]|\ud869[\udc00-\uded6\udf00-\udfff]|\ud86d[\udc00-\udf34\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1]|\ud87e[\udc00-\ude1d]"},{name:"Any",isBmpLast:!0,bmp:"\0-\uffff",astral:"[\ud800-\udbff][\udc00-\udfff]"},{name:"Default_Ignorable_Code_Point",bmp:"\xad\u034f\u061c\u115f\u1160\u17b4\u17b5\u180b-\u180e\u200b-\u200f\u202a-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufff8",astral:"\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]"},{name:"Lowercase",bmp:"a-z\xaa\xb5\xba\xdf-\xf6\xf8-\xff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02b8\u02c0\u02c1\u02e0-\u02e4\u0345\u0371\u0373\u0377\u037a-\u037d\u0390\u03ac-\u03ce\u03d0\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0561-\u0587\u13f8-\u13fd\u1c80-\u1c88\u1d00-\u1dbf\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6\u1fc7\u1fd0-\u1fd3\u1fd6\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6\u1ff7\u2071\u207f\u2090-\u209c\u210a\u210e\u210f\u2113\u212f\u2134\u2139\u213c\u213d\u2146-\u2149\u214e\u2170-\u217f\u2184\u24d0-\u24e9\u2c30-\u2c5e\u2c61\u2c65\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73\u2c74\u2c76-\u2c7d\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b-\ua69d\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793-\ua795\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7b5\ua7b7\ua7f8-\ua7fa\uab30-\uab5a\uab5c-\uab65\uab70-\uabbf\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a",astral:"\ud801[\udc28-\udc4f\udcd8-\udcfb]|\ud803[\udcc0-\udcf2]|\ud806[\udcc0-\udcdf]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb]|\ud83a[\udd22-\udd43]"},{name:"Noncharacter_Code_Point",bmp:"\ufdd0-\ufdef\ufffe\uffff",astral:"[\ud83f\ud87f\ud8bf\ud8ff\ud93f\ud97f\ud9bf\ud9ff\uda3f\uda7f\udabf\udaff\udb3f\udb7f\udbbf\udbff][\udffe\udfff]"},{name:"Uppercase",bmp:"A-Z\xc0-\xd6\xd8-\xde\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178\u0179\u017b\u017d\u0181\u0182\u0184\u0186\u0187\u0189-\u018b\u018e-\u0191\u0193\u0194\u0196-\u0198\u019c\u019d\u019f\u01a0\u01a2\u01a4\u01a6\u01a7\u01a9\u01ac\u01ae\u01af\u01b1-\u01b3\u01b5\u01b7\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a\u023b\u023d\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u037f\u0386\u0388-\u038a\u038c\u038e\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0528\u052a\u052c\u052e\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u13a0-\u13f5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e\u213f\u2145\u2160-\u216f\u2183\u24b6-\u24cf\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua698\ua69a\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua796\ua798\ua79a\ua79c\ua79e\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa-\ua7ae\ua7b0-\ua7b4\ua7b6\uff21-\uff3a",astral:"\ud801[\udc00-\udc27\udcb0-\udcd3]|\ud803[\udc80-\udcb2]|\ud806[\udca0-\udcbf]|\ud835[\udc00-\udc19\udc34-\udc4d\udc68-\udc81\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb5\udcd0-\udce9\udd04\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd38\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd6c-\udd85\udda0-\uddb9\uddd4-\udded\ude08-\ude21\ude3c-\ude55\ude70-\ude89\udea8-\udec0\udee2-\udefa\udf1c-\udf34\udf56-\udf6e\udf90-\udfa8\udfca]|\ud83a[\udd00-\udd21]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]"},{name:"White_Space",bmp:"\t-\r \x85\xa0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000"}];u.push({name:"Assigned",inverseOf:"Cn"}),d.addUnicodeData(u)},d.exports=u.default},396:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");d.addUnicodeData([{name:"Adlam",astral:"\ud83a[\udd00-\udd4a\udd50-\udd59\udd5e\udd5f]"},{name:"Ahom",astral:"\ud805[\udf00-\udf19\udf1d-\udf2b\udf30-\udf3f]"},{name:"Anatolian_Hieroglyphs",astral:"\ud811[\udc00-\ude46]"},{name:"Arabic",bmp:"\u0600-\u0604\u0606-\u060b\u060d-\u061a\u061e\u0620-\u063f\u0641-\u064a\u0656-\u066f\u0671-\u06dc\u06de-\u06ff\u0750-\u077f\u08a0-\u08b4\u08b6-\u08bd\u08d4-\u08e1\u08e3-\u08ff\ufb50-\ufbc1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfd\ufe70-\ufe74\ufe76-\ufefc",astral:"\ud803[\ude60-\ude7e]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb\udef0\udef1]"},{name:"Armenian",bmp:"\u0531-\u0556\u0559-\u055f\u0561-\u0587\u058a\u058d-\u058f\ufb13-\ufb17"},{name:"Avestan",astral:"\ud802[\udf00-\udf35\udf39-\udf3f]"},{name:"Balinese",bmp:"\u1b00-\u1b4b\u1b50-\u1b7c"},{name:"Bamum",bmp:"\ua6a0-\ua6f7",astral:"\ud81a[\udc00-\ude38]"},{name:"Bassa_Vah",astral:"\ud81a[\uded0-\udeed\udef0-\udef5]"},{name:"Batak",bmp:"\u1bc0-\u1bf3\u1bfc-\u1bff"},{name:"Bengali",bmp:"\u0980-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09fb"},{name:"Bhaiksuki",astral:"\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc45\udc50-\udc6c]"},{name:"Bopomofo",bmp:"\u02ea\u02eb\u3105-\u312d\u31a0-\u31ba"},{name:"Brahmi",astral:"\ud804[\udc00-\udc4d\udc52-\udc6f\udc7f]"},{name:"Braille",bmp:"\u2800-\u28ff"},{name:"Buginese",bmp:"\u1a00-\u1a1b\u1a1e\u1a1f"},{name:"Buhid",bmp:"\u1740-\u1753"},{name:"Canadian_Aboriginal",bmp:"\u1400-\u167f\u18b0-\u18f5"},{name:"Carian",astral:"\ud800[\udea0-\uded0]"},{name:"Caucasian_Albanian",astral:"\ud801[\udd30-\udd63\udd6f]"},{name:"Chakma",astral:"\ud804[\udd00-\udd34\udd36-\udd43]"},{name:"Cham",bmp:"\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa5c-\uaa5f"},{name:"Cherokee",bmp:"\u13a0-\u13f5\u13f8-\u13fd\uab70-\uabbf"},{name:"Common",bmp:"\0-@\\x5B-`\\x7B-\xa9\xab-\xb9\xbb-\xbf\xd7\xf7\u02b9-\u02df\u02e5-\u02e9\u02ec-\u02ff\u0374\u037e\u0385\u0387\u0589\u0605\u060c\u061b\u061c\u061f\u0640\u06dd\u08e2\u0964\u0965\u0e3f\u0fd5-\u0fd8\u10fb\u16eb-\u16ed\u1735\u1736\u1802\u1803\u1805\u1cd3\u1ce1\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u2000-\u200b\u200e-\u2064\u2066-\u2070\u2074-\u207e\u2080-\u208e\u20a0-\u20be\u2100-\u2125\u2127-\u2129\u212c-\u2131\u2133-\u214d\u214f-\u215f\u2189-\u218b\u2190-\u23fe\u2400-\u2426\u2440-\u244a\u2460-\u27ff\u2900-\u2b73\u2b76-\u2b95\u2b98-\u2bb9\u2bbd-\u2bc8\u2bca-\u2bd1\u2bec-\u2bef\u2e00-\u2e44\u2ff0-\u2ffb\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303c-\u303f\u309b\u309c\u30a0\u30fb\u30fc\u3190-\u319f\u31c0-\u31e3\u3220-\u325f\u327f-\u32cf\u3358-\u33ff\u4dc0-\u4dff\ua700-\ua721\ua788-\ua78a\ua830-\ua839\ua92e\ua9cf\uab5b\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe66\ufe68-\ufe6b\ufeff\uff01-\uff20\uff3b-\uff40\uff5b-\uff65\uff70\uff9e\uff9f\uffe0-\uffe6\uffe8-\uffee\ufff9-\ufffd",astral:"\ud800[\udd00-\udd02\udd07-\udd33\udd37-\udd3f\udd90-\udd9b\uddd0-\uddfc\udee1-\udefb]|\ud82f[\udca0-\udca3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd66\udd6a-\udd7a\udd83\udd84\udd8c-\udda9\uddae-\udde8\udf00-\udf56\udf60-\udf71]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udfcb\udfce-\udfff]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd00-\udd0c\udd10-\udd2e\udd30-\udd6b\udd70-\uddac\udde6-\uddff\ude01\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\udf00-\udfff]|\ud83d[\udc00-\uded2\udee0-\udeec\udef0-\udef6\udf00-\udf73\udf80-\udfd4]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udd10-\udd1e\udd20-\udd27\udd30\udd33-\udd3e\udd40-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]|\udb40[\udc01\udc20-\udc7f]"},{name:"Coptic",bmp:"\u03e2-\u03ef\u2c80-\u2cf3\u2cf9-\u2cff"},{name:"Cuneiform",astral:"\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc70-\udc74\udc80-\udd43]"},{name:"Cypriot",astral:"\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f]"},{name:"Cyrillic",bmp:"\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f"},{name:"Deseret",astral:"\ud801[\udc00-\udc4f]"},{name:"Devanagari",bmp:"\u0900-\u0950\u0953-\u0963\u0966-\u097f\ua8e0-\ua8fd"},{name:"Duployan",astral:"\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9c-\udc9f]"},{name:"Egyptian_Hieroglyphs",astral:"\ud80c[\udc00-\udfff]|\ud80d[\udc00-\udc2e]"},{name:"Elbasan",astral:"\ud801[\udd00-\udd27]"},{name:"Ethiopic",bmp:"\u1200-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u137c\u1380-\u1399\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e"},{name:"Georgian",bmp:"\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u10ff\u2d00-\u2d25\u2d27\u2d2d"},{name:"Glagolitic",bmp:"\u2c00-\u2c2e\u2c30-\u2c5e",astral:"\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a]"},{name:"Gothic",astral:"\ud800[\udf30-\udf4a]"},{name:"Grantha",astral:"\ud804[\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3c-\udf44\udf47\udf48\udf4b-\udf4d\udf50\udf57\udf5d-\udf63\udf66-\udf6c\udf70-\udf74]"},{name:"Greek",bmp:"\u0370-\u0373\u0375-\u0377\u037a-\u037d\u037f\u0384\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03e1\u03f0-\u03ff\u1d26-\u1d2a\u1d5d-\u1d61\u1d66-\u1d6a\u1dbf\u1f00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fc4\u1fc6-\u1fd3\u1fd6-\u1fdb\u1fdd-\u1fef\u1ff2-\u1ff4\u1ff6-\u1ffe\u2126\uab65",astral:"\ud800[\udd40-\udd8e\udda0]|\ud834[\ude00-\ude45]"},{name:"Gujarati",bmp:"\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0af1\u0af9"},{name:"Gurmukhi",bmp:"\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75"},{name:"Han",bmp:"\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u3005\u3007\u3021-\u3029\u3038-\u303b\u3400-\u4db5\u4e00-\u9fd5\uf900-\ufa6d\ufa70-\ufad9",astral:"[\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872][\udc00-\udfff]|\ud869[\udc00-\uded6\udf00-\udfff]|\ud86d[\udc00-\udf34\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1]|\ud87e[\udc00-\ude1d]"},{name:"Hangul",bmp:"\u1100-\u11ff\u302e\u302f\u3131-\u318e\u3200-\u321e\u3260-\u327e\ua960-\ua97c\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"},{name:"Hanunoo",bmp:"\u1720-\u1734"},{name:"Hatran",astral:"\ud802[\udce0-\udcf2\udcf4\udcf5\udcfb-\udcff]"},{name:"Hebrew",bmp:"\u0591-\u05c7\u05d0-\u05ea\u05f0-\u05f4\ufb1d-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufb4f"},{name:"Hiragana",bmp:"\u3041-\u3096\u309d-\u309f",astral:"\ud82c\udc01|\ud83c\ude00"},{name:"Imperial_Aramaic",astral:"\ud802[\udc40-\udc55\udc57-\udc5f]"},{name:"Inherited",bmp:"\u0300-\u036f\u0485\u0486\u064b-\u0655\u0670\u0951\u0952\u1ab0-\u1abe\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u200c\u200d\u20d0-\u20f0\u302a-\u302d\u3099\u309a\ufe00-\ufe0f\ufe20-\ufe2d",astral:"\ud800[\uddfd\udee0]|\ud834[\udd67-\udd69\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad]|\udb40[\udd00-\uddef]"},{name:"Inscriptional_Pahlavi",astral:"\ud802[\udf60-\udf72\udf78-\udf7f]"},{name:"Inscriptional_Parthian",astral:"\ud802[\udf40-\udf55\udf58-\udf5f]"},{name:"Javanese",bmp:"\ua980-\ua9cd\ua9d0-\ua9d9\ua9de\ua9df"},{name:"Kaithi",astral:"\ud804[\udc80-\udcc1]"},{name:"Kannada",bmp:"\u0c80-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2"},{name:"Katakana",bmp:"\u30a1-\u30fa\u30fd-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff6f\uff71-\uff9d",astral:"\ud82c\udc00"},{name:"Kayah_Li",bmp:"\ua900-\ua92d\ua92f"},{name:"Kharoshthi",astral:"\ud802[\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude33\ude38-\ude3a\ude3f-\ude47\ude50-\ude58]"},{name:"Khmer",bmp:"\u1780-\u17dd\u17e0-\u17e9\u17f0-\u17f9\u19e0-\u19ff"},{name:"Khojki",astral:"\ud804[\ude00-\ude11\ude13-\ude3e]"},{name:"Khudawadi",astral:"\ud804[\udeb0-\udeea\udef0-\udef9]"},{name:"Lao",bmp:"\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf"},{name:"Latin",bmp:"A-Za-z\xaa\xba\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u02e0-\u02e4\u1d00-\u1d25\u1d2c-\u1d5c\u1d62-\u1d65\u1d6b-\u1d77\u1d79-\u1dbe\u1e00-\u1eff\u2071\u207f\u2090-\u209c\u212a\u212b\u2132\u214e\u2160-\u2188\u2c60-\u2c7f\ua722-\ua787\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua7ff\uab30-\uab5a\uab5c-\uab64\ufb00-\ufb06\uff21-\uff3a\uff41-\uff5a"},{name:"Lepcha",bmp:"\u1c00-\u1c37\u1c3b-\u1c49\u1c4d-\u1c4f"},{name:"Limbu",bmp:"\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1940\u1944-\u194f"},{name:"Linear_A",astral:"\ud801[\ude00-\udf36\udf40-\udf55\udf60-\udf67]"},{name:"Linear_B",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa]"},{name:"Lisu",bmp:"\ua4d0-\ua4ff"},{name:"Lycian",astral:"\ud800[\ude80-\ude9c]"},{name:"Lydian",astral:"\ud802[\udd20-\udd39\udd3f]"},{name:"Mahajani",astral:"\ud804[\udd50-\udd76]"},{name:"Malayalam",bmp:"\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4f\u0d54-\u0d63\u0d66-\u0d7f"},{name:"Mandaic",bmp:"\u0840-\u085b\u085e"},{name:"Manichaean",astral:"\ud802[\udec0-\udee6\udeeb-\udef6]"},{name:"Marchen",astral:"\ud807[\udc70-\udc8f\udc92-\udca7\udca9-\udcb6]"},{name:"Meetei_Mayek",bmp:"\uaae0-\uaaf6\uabc0-\uabed\uabf0-\uabf9"},{name:"Mende_Kikakui",astral:"\ud83a[\udc00-\udcc4\udcc7-\udcd6]"},{name:"Meroitic_Cursive",astral:"\ud802[\udda0-\uddb7\uddbc-\uddcf\uddd2-\uddff]"},{name:"Meroitic_Hieroglyphs",astral:"\ud802[\udd80-\udd9f]"},{name:"Miao",astral:"\ud81b[\udf00-\udf44\udf50-\udf7e\udf8f-\udf9f]"},{name:"Modi",astral:"\ud805[\ude00-\ude44\ude50-\ude59]"},{name:"Mongolian",bmp:"\u1800\u1801\u1804\u1806-\u180e\u1810-\u1819\u1820-\u1877\u1880-\u18aa",astral:"\ud805[\ude60-\ude6c]"},{name:"Mro",astral:"\ud81a[\ude40-\ude5e\ude60-\ude69\ude6e\ude6f]"},{name:"Multani",astral:"\ud804[\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea9]"},{name:"Myanmar",bmp:"\u1000-\u109f\ua9e0-\ua9fe\uaa60-\uaa7f"},{name:"Nabataean",astral:"\ud802[\udc80-\udc9e\udca7-\udcaf]"},{name:"New_Tai_Lue",bmp:"\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19da\u19de\u19df"},{name:"Newa",astral:"\ud805[\udc00-\udc59\udc5b\udc5d]"},{name:"Nko",bmp:"\u07c0-\u07fa"},{name:"Ogham",bmp:"\u1680-\u169c"},{name:"Ol_Chiki",bmp:"\u1c50-\u1c7f"},{name:"Old_Hungarian",astral:"\ud803[\udc80-\udcb2\udcc0-\udcf2\udcfa-\udcff]"},{name:"Old_Italic",astral:"\ud800[\udf00-\udf23]"},{name:"Old_North_Arabian",astral:"\ud802[\ude80-\ude9f]"},{name:"Old_Permic",astral:"\ud800[\udf50-\udf7a]"},{name:"Old_Persian",astral:"\ud800[\udfa0-\udfc3\udfc8-\udfd5]"},{name:"Old_South_Arabian",astral:"\ud802[\ude60-\ude7f]"},{name:"Old_Turkic",astral:"\ud803[\udc00-\udc48]"},{name:"Oriya",bmp:"\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b77"},{name:"Osage",astral:"\ud801[\udcb0-\udcd3\udcd8-\udcfb]"},{name:"Osmanya",astral:"\ud801[\udc80-\udc9d\udca0-\udca9]"},{name:"Pahawh_Hmong",astral:"\ud81a[\udf00-\udf45\udf50-\udf59\udf5b-\udf61\udf63-\udf77\udf7d-\udf8f]"},{name:"Palmyrene",astral:"\ud802[\udc60-\udc7f]"},{name:"Pau_Cin_Hau",astral:"\ud806[\udec0-\udef8]"},{name:"Phags_Pa",bmp:"\ua840-\ua877"},{name:"Phoenician",astral:"\ud802[\udd00-\udd1b\udd1f]"},{name:"Psalter_Pahlavi",astral:"\ud802[\udf80-\udf91\udf99-\udf9c\udfa9-\udfaf]"},{name:"Rejang",bmp:"\ua930-\ua953\ua95f"},{name:"Runic",bmp:"\u16a0-\u16ea\u16ee-\u16f8"},{name:"Samaritan",bmp:"\u0800-\u082d\u0830-\u083e"},{name:"Saurashtra",bmp:"\ua880-\ua8c5\ua8ce-\ua8d9"},{name:"Sharada",astral:"\ud804[\udd80-\uddcd\uddd0-\udddf]"},{name:"Shavian",astral:"\ud801[\udc50-\udc7f]"},{name:"Siddham",astral:"\ud805[\udd80-\uddb5\uddb8-\udddd]"},{name:"SignWriting",astral:"\ud836[\udc00-\ude8b\ude9b-\ude9f\udea1-\udeaf]"},{name:"Sinhala",bmp:"\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2-\u0df4",astral:"\ud804[\udde1-\uddf4]"},{name:"Sora_Sompeng",astral:"\ud804[\udcd0-\udce8\udcf0-\udcf9]"},{name:"Sundanese",bmp:"\u1b80-\u1bbf\u1cc0-\u1cc7"},{name:"Syloti_Nagri",bmp:"\ua800-\ua82b"},{name:"Syriac",bmp:"\u0700-\u070d\u070f-\u074a\u074d-\u074f"},{name:"Tagalog",bmp:"\u1700-\u170c\u170e-\u1714"},{name:"Tagbanwa",bmp:"\u1760-\u176c\u176e-\u1770\u1772\u1773"},{name:"Tai_Le",bmp:"\u1950-\u196d\u1970-\u1974"},{name:"Tai_Tham",bmp:"\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa0-\u1aad"},{name:"Tai_Viet",bmp:"\uaa80-\uaac2\uaadb-\uaadf"},{name:"Takri",astral:"\ud805[\ude80-\udeb7\udec0-\udec9]"},{name:"Tamil",bmp:"\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bfa"},{name:"Tangut",astral:"\ud81b\udfe0|[\ud81c-\ud820][\udc00-\udfff]|\ud821[\udc00-\udfec]|\ud822[\udc00-\udef2]"},{name:"Telugu",bmp:"\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58-\u0c5a\u0c60-\u0c63\u0c66-\u0c6f\u0c78-\u0c7f"},{name:"Thaana",bmp:"\u0780-\u07b1"},{name:"Thai",bmp:"\u0e01-\u0e3a\u0e40-\u0e5b"},{name:"Tibetan",bmp:"\u0f00-\u0f47\u0f49-\u0f6c\u0f71-\u0f97\u0f99-\u0fbc\u0fbe-\u0fcc\u0fce-\u0fd4\u0fd9\u0fda"},{name:"Tifinagh",bmp:"\u2d30-\u2d67\u2d6f\u2d70\u2d7f"},{name:"Tirhuta",astral:"\ud805[\udc80-\udcc7\udcd0-\udcd9]"},{name:"Ugaritic",astral:"\ud800[\udf80-\udf9d\udf9f]"},{name:"Vai",bmp:"\ua500-\ua62b"},{name:"Warang_Citi",astral:"\ud806[\udca0-\udcf2\udcff]"},{name:"Yi",bmp:"\ua000-\ua48c\ua490-\ua4c6"}])},d.exports=u.default}}]); \ No newline at end of file +/*! For license information please see 9c0c4329.f43eea20.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[68],{212:function(d,u,e){"use strict";e.r(u);var a=e(1),c=(e(53),e(277),e(26),e(20),e(19),e(90),e(0)),n=e.n(c),f=e(278),t=e(273),r=(e(268),e(287)),i=e(305),l=e.n(i),s=e(275),o=e(386),m=e.n(o),b=e(327),p=e.n(b),D=Object(f.a)("h2");u.default=function(d){var u=d.tags,e=Object.values(u).map((function(d){return{count:d.count,label:d.name,permalink:d.permalink}})),c=Object(s.a)(e,"highlights"),f=l.a.groupBy(c,"category");return n.a.createElement(t.a,{title:"Tags",description:"gnet highlight tags"},n.a.createElement("header",{className:"hero hero--clean"},n.a.createElement("div",{className:"container"},n.a.createElement("h1",null,"All Highlight Tags"))),n.a.createElement("main",{className:"container container--xs"},Object.keys(f).map((function(d,u){var e=f[d];return n.a.createElement("section",null,n.a.createElement(D,{id:d.name},p()(m()(d))),e.map((function(d,u){return n.a.createElement("div",null,n.a.createElement(r.a,Object(a.a)({key:u,valueOnly:!0},d)))})))}))))}},272:function(d,u,e){"use strict";e.d(u,"a",(function(){return c})),e.d(u,"b",(function(){return n}));var a=e(267);function c(){var d=Object(a.a)().siteConfig,u=(void 0===d?{}:d).customFields.metadata.latest_highlight,e=Date.parse(u.date),c=new Date,n=Math.abs(c-e),f=Math.ceil(n/864e5),t=null;return"undefined"!=typeof window&&(t=new Date(parseInt(window.localStorage.getItem("highlightsViewedAt")||"0"))),f<30&&(!t||t0&&c.a.createElement("div",{className:"row footer__links"},c.a.createElement("div",{className:"col col--5 footer__col"},c.a.createElement("div",{className:"margin-bottom--md"},c.a.createElement(s.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),c.a.createElement("div",{className:"margin-bottom--md"},c.a.createElement(N,{description:!1,width:"150px"})),c.a.createElement("div",null,c.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},c.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",c.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},c.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",c.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},c.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),t.map((function(d,u){return c.a.createElement("div",{key:u,className:"col footer__col"},null!=d.title?c.a.createElement("h4",{className:"footer__title"},d.title):null,null!=d.items&&Array.isArray(d.items)&&d.items.length>0?c.a.createElement("ul",{className:"footer__items"},d.items.map((function(d,u){return d.html?c.a.createElement("li",{key:u,className:"footer__item",dangerouslySetInnerHTML:{__html:d.html}}):c.a.createElement("li",{key:d.href||d.to,className:"footer__item"},c.a.createElement(M,d))}))):null)}))),(i||n)&&c.a.createElement("div",{className:"text--center"},i&&i.src&&c.a.createElement("div",{className:"margin-bottom--sm"},i.href?c.a.createElement("a",{href:i.href,target:"_blank",rel:"noopener noreferrer",className:P.a.footerLogoLink},c.a.createElement(L,{alt:i.alt,url:l})):c.a.createElement(L,{alt:i.alt,url:l}),c.a.createElement("br",null),c.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:P.a.footerLogoLink},c.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),n,c.a.createElement("br",null),c.a.createElement("small",null,c.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",c.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},j=e(290),R=e(291),U=e(3);e(135);u.a=function(d){var u=Object(b.a)().siteConfig,e=void 0===u?{}:u,a=e.favicon,t=(e.tagline,e.title),r=e.themeConfig.image,i=e.url,l=d.children,s=d.title,o=d.noFooter,m=d.description,p=d.image,D=d.keywords,h=(d.permalink,d.version),g=s?s+" | "+t:t,_=p||r,E=i+Object(x.a)(_),I=Object(x.a)(a),v=Object(U.h)(),y=v?"https://gnet.host"+(v.pathname.endsWith("/")?v.pathname:v.pathname+"/"):null;return c.a.createElement(R.a,null,c.a.createElement(j.a,null,c.a.createElement(f.a,null,c.a.createElement("html",{lang:"en"}),c.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),g&&c.a.createElement("title",null,g),g&&c.a.createElement("meta",{property:"og:title",content:g}),a&&c.a.createElement("link",{rel:"shortcut icon",href:I}),m&&c.a.createElement("meta",{name:"description",content:m}),m&&c.a.createElement("meta",{property:"og:description",content:m}),h&&c.a.createElement("meta",{name:"docsearch:version",content:h}),D&&D.length&&c.a.createElement("meta",{name:"keywords",content:D.join(",")}),_&&c.a.createElement("meta",{property:"og:image",content:E}),_&&c.a.createElement("meta",{property:"twitter:image",content:E}),_&&c.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+g}),_&&c.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),_&&c.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),y&&c.a.createElement("meta",{property:"og:url",content:y}),c.a.createElement("meta",{name:"twitter:card",content:"summary"}),y&&c.a.createElement("link",{rel:"canonical",href:y})),c.a.createElement(n.a,null),c.a.createElement(O,null),c.a.createElement("div",{className:"main-wrapper"},l),!o&&c.a.createElement(T,null)))}},274:function(d,u,e){"use strict";var a=e(12),c=e(301)(5),n=!0;"find"in[]&&Array(1).find((function(){n=!1})),a(a.P+a.F*n,"Array",{find:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}}),e(80)("find")},275:function(d,u,e){"use strict";e.d(u,"a",(function(){return n}));e(79),e(298),e(274),e(78);var a=e(279),c=e.n(a);function n(d,u){var e=new c.a;return d.map((function(d){var a=d;return"string"==typeof d&&(a={label:d,permalink:"/"+u+"/tags/"+e.slug(d)}),function(d,u){if(d.enriched)return d;var e=d.label.split(": ",2),a=e[0],c=e[1],n="primary";switch(a){case"domain":n="blue";break;case"type":n="pink";break;default:n="primary"}return{category:a,count:d.count,enriched:!0,label:d.label,permalink:d.permalink,style:n,value:c}}(a)}))}},277:function(d,u,e){var a=e(24).f,c=Function.prototype,n=/^\s*function ([^ (]*)/;"name"in c||e(10)&&a(c,"name",{configurable:!0,get:function(){try{return(""+this).match(n)[1]}catch(d){return""}}})},278:function(d,u,e){"use strict";var a=e(9),c=e(0),n=e.n(c),f=e(266),t=e.n(f),r=e(267),i=(e(139),e(140)),l=e.n(i);u.a=function(d){return function(u){var e,c=u.id,f=Object(a.a)(u,["id"]),i=Object(r.a)().siteConfig,s=(i=void 0===i?{}:i).themeConfig,o=(s=void 0===s?{}:s).navbar,m=(o=void 0===o?{}:o).hideOnScroll,b=void 0!==m&&m;return c?n.a.createElement(d,f,n.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:t()("anchor",(e={},e[l.a.enhancedAnchor]=!b,e)),id:c}),n.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+c,title:"Direct link to heading"},"#"),f.children):n.a.createElement(d,f)}}},279:function(d,u,e){var a=e(288);d.exports=t;var c=Object.hasOwnProperty,n=/\s/g,f=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function t(){if(!(this instanceof t))return new t;this.reset()}function r(d,u){return"string"!=typeof d?"":(u||(d=d.toLowerCase()),d.trim().replace(f,"").replace(a(),"").replace(n,"-"))}t.prototype.slug=function(d,u){for(var e=r(d,!0===u),a=e;c.call(this.occurrences,e);)this.occurrences[a]++,e=a+"-"+this.occurrences[a];return this.occurrences[e]=0,e},t.prototype.reset=function(){this.occurrences=Object.create(null)},t.slug=r},287:function(d,u,e){"use strict";var a=e(0),c=e.n(a),n=e(268),f=e(266),t=e.n(f);u.a=function(d){var u=d.count,e=d.label,a=d.permalink,f=d.style,r=d.value,i=d.valueOnly;return c.a.createElement(n.a,{to:a+"/",className:t()("badge","badge--rounded","badge--"+f)},i?r:e,u&&c.a.createElement(c.a.Fragment,null," (",u,")"))}},288:function(d,u){d.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},301:function(d,u,e){var a=e(28),c=e(54),n=e(25),f=e(27),t=e(302);d.exports=function(d,u){var e=1==d,r=2==d,i=3==d,l=4==d,s=6==d,o=5==d||s,m=u||t;return function(u,t,b){for(var p,D,h=n(u),g=c(h),_=a(t,b,3),E=f(g.length),I=0,v=e?m(u,E):r?m(u,0):void 0;E>I;I++)if((o||I in g)&&(D=_(p=g[I],I,h),d))if(e)v[I]=D;else if(D)switch(d){case 3:return!0;case 5:return p;case 6:return I;case 2:v.push(p)}else if(l)return!1;return s?-1:i||l?l:v}}},302:function(d,u,e){var a=e(303);d.exports=function(d,u){return new(a(d))(u)}},303:function(d,u,e){var a=e(14),c=e(323),n=e(2)("species");d.exports=function(d){var u;return c(d)&&("function"!=typeof(u=d.constructor)||u!==Array&&!c(u.prototype)||(u=void 0),a(u)&&null===(u=u[n])&&(u=void 0)),void 0===u?Array:u}},327:function(d,u,e){d.exports=function(){var d=[],u=[],e={},a={},c={};function n(d){return"string"==typeof d?new RegExp("^"+d+"$","i"):d}function f(d,u){return d===u?u:d===d.toLowerCase()?u.toLowerCase():d===d.toUpperCase()?u.toUpperCase():d[0]===d[0].toUpperCase()?u.charAt(0).toUpperCase()+u.substr(1).toLowerCase():u.toLowerCase()}function t(d,u){return d.replace(/\$(\d{1,2})/g,(function(d,e){return u[e]||""}))}function r(d,u){return d.replace(u[0],(function(e,a){var c=t(u[1],arguments);return f(""===e?d[a-1]:e,c)}))}function i(d,u,a){if(!d.length||e.hasOwnProperty(d))return u;for(var c=a.length;c--;){var n=a[c];if(n[0].test(u))return r(u,n)}return u}function l(d,u,e){return function(a){var c=a.toLowerCase();return u.hasOwnProperty(c)?f(a,c):d.hasOwnProperty(c)?f(a,d[c]):i(c,a,e)}}function s(d,u,e,a){return function(a){var c=a.toLowerCase();return!!u.hasOwnProperty(c)||!d.hasOwnProperty(c)&&i(c,c,e)===c}}function o(d,u,e){return(e?u+" ":"")+(1===u?o.singular(d):o.plural(d))}return o.plural=l(c,a,d),o.isPlural=s(c,a,d),o.singular=l(a,c,u),o.isSingular=s(a,c,u),o.addPluralRule=function(u,e){d.push([n(u),e])},o.addSingularRule=function(d,e){u.push([n(d),e])},o.addUncountableRule=function(d){"string"!=typeof d?(o.addPluralRule(d,"$0"),o.addSingularRule(d,"$0")):e[d.toLowerCase()]=!0},o.addIrregularRule=function(d,u){u=u.toLowerCase(),d=d.toLowerCase(),c[d]=u,a[u]=d},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(d){return o.addIrregularRule(d[0],d[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(d){return o.addPluralRule(d[0],d[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(d){return o.addSingularRule(d[0],d[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\xe9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(o.addUncountableRule),o}()},386:function(d,u,e){"use strict";const a=e(387),c=d=>{if("string"!=typeof d)throw new TypeError("Expected a string");return d=(d=(d=a(d)).toLowerCase().replace(/[_-]+/g," ").replace(/\s{2,}/g," ").trim()).charAt(0).toUpperCase()+d.slice(1)};d.exports=c,d.exports.default=c},387:function(d,u,e){"use strict";const a=e(388);d.exports=(d,u)=>{if("string"!=typeof d)throw new TypeError("Expected a string");u=void 0===u?"_":u;const e=a("([\\p{Ll}\\d])(\\p{Lu})","g"),c=a("(\\p{Lu}+)(\\p{Lu}[\\p{Ll}\\d]+)","g");return d.replace(e,`$1${u}$2`).replace(c,`$1${u}$2`).toLowerCase()}},388:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var a=s(e(389)),c=s(e(390)),n=s(e(391)),f=s(e(392)),t=s(e(393)),r=s(e(394)),i=s(e(395)),l=s(e(396));function s(d){return d&&d.__esModule?d:{default:d}}(0,c.default)(a.default),(0,n.default)(a.default),(0,f.default)(a.default),(0,t.default)(a.default),(0,r.default)(a.default),(0,i.default)(a.default),(0,l.default)(a.default),u.default=a.default,d.exports=u.default},389:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0});var a={astral:!1},c={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},n={},f={},t={},r=[],i={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},l=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,s=void 0===c.exec.call(/()??/,"")[1],o=void 0!==/x/.flags,m={}.toString;function b(d){var u=!0;try{new RegExp("",d)}catch(e){u=!1}return u}var p=b("u"),D=b("y"),h={g:!0,i:!0,m:!0,u:p,y:D};function g(d,u,e,a,c){var n=void 0;if(d.xregexp={captureNames:u},c)return d;if(d.__proto__)d.__proto__=O.prototype;else for(n in O.prototype)d[n]=O.prototype[n];return d.xregexp.source=e,d.xregexp.flags=a?a.split("").sort().join(""):a,d}function _(d){return c.replace.call(d,/([\s\S])(?=[\s\S]*\1)/g,"")}function E(d,u){if(!O.isRegExp(d))throw new TypeError("Type RegExp expected");var e=d.xregexp||{},a=function(d){return o?d.flags:c.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(d))[1]}(d),n="",f="",t=null,r=null;return(u=u||{}).removeG&&(f+="g"),u.removeY&&(f+="y"),f&&(a=c.replace.call(a,new RegExp("["+f+"]+","g"),"")),u.addG&&(n+="g"),u.addY&&(n+="y"),n&&(a=_(a+n)),u.isInternalOnly||(void 0!==e.source&&(t=e.source),null!=e.flags&&(r=n?_(e.flags+n):e.flags)),d=g(new RegExp(u.source||d.source,a),function(d){return!(!d.xregexp||!d.xregexp.captureNames)}(d)?e.captureNames.slice(0):null,t,r,u.isInternalOnly)}function I(d){return parseInt(d,16)}function v(d,u,e){return"("===d.input[d.index-1]||")"===d.input[d.index+d[0].length]||function(d,u,e){return c.test.call(-1!==e.indexOf("x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,d.slice(u))}(d.input,d.index+d[0].length,e)?"":"(?:)"}function x(d){return parseInt(d,10).toString(16)}function y(d,u){return m.call(d)==="[object "+u+"]"}function C(d){for(;d.length<4;)d="0"+d;return d}function F(d){var u={};return y(d,"String")?(O.forEach(d,/[^\s,]+/,(function(d){u[d]=!0})),u):d}function w(d){if(!/^[\w$]$/.test(d))throw new Error("Flag must be a single character A-Za-z0-9_$");h[d]=!0}function S(d,u,e,a,c){for(var n=r.length,f=d[e],t=null,i=void 0,l=void 0;n--;)if(!((l=r[n]).leadChar&&l.leadChar!==f||l.scope!==a&&"all"!==l.scope||l.flag&&-1===u.indexOf(l.flag))&&(i=O.exec(d,l.regex,e,"sticky"))){t={matchLength:i[0].length,output:l.handler.call(c,i,a,u),reparse:l.reparse};break}return t}function k(d){a.astral=d}function A(d){if(null==d)throw new TypeError("Cannot convert null or undefined to object");return d}function O(d,u){if(O.isRegExp(d)){if(void 0!==u)throw new TypeError("Cannot supply flags when copying a RegExp");return E(d)}if(d=void 0===d?"":String(d),u=void 0===u?"":String(u),O.isInstalled("astral")&&-1===u.indexOf("A")&&(u+="A"),t[d]||(t[d]={}),!t[d][u]){for(var e={hasNamedCapture:!1,captureNames:[]},a="default",n="",f=0,r=void 0,l=function(d,u){var e=void 0;if(_(u)!==u)throw new SyntaxError("Invalid duplicate regex flag "+u);for(d=c.replace.call(d,/^\(\?([\w$]+)\)/,(function(d,e){if(c.test.call(/[gy]/,e))throw new SyntaxError("Cannot use flag g or y in mode modifier "+d);return u=_(u+e),""})),e=0;e"}else if(e)return"\\"+(+e+f);return d}if(!y(d,"Array")||!d.length)throw new TypeError("Must provide a nonempty array of patterns to merge");for(var i=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,l=[],s=void 0,o=0;o1&&-1!==e.indexOf("")){var a=E(this,{removeG:!0,isInternalOnly:!0});c.replace.call(String(d).slice(e.index),a,(function(){for(var d=arguments.length,u=Array(d),a=0;ae.index&&(this.lastIndex=e.index)}return this.global||(this.lastIndex=u),e},n.test=function(d){return!!n.exec.call(this,d)},n.match=function(d){if(O.isRegExp(d)){if(d.global){var u=c.match.apply(this,arguments);return d.lastIndex=0,u}}else d=new RegExp(d);return n.exec.call(d,A(this))},n.replace=function(d,u){var e=O.isRegExp(d),a=void 0,n=void 0,f=void 0;return e?(d.xregexp&&(n=d.xregexp.captureNames),a=d.lastIndex):d+="",f=y(u,"Function")?c.replace.call(String(this),d,(function(){for(var a=arguments.length,c=Array(a),f=0;fe.length-3)throw new SyntaxError("Backreference to undefined group "+d);return e[c]||""}throw new SyntaxError("Invalid token "+d)}})),e&&(d.global?d.lastIndex=0:d.lastIndex=a),f},n.split=function(d,u){if(!O.isRegExp(d))return c.split.apply(this,arguments);var e=String(this),a=[],n=d.lastIndex,f=0,t=void 0;return u=(void 0===u?-1:u)>>>0,O.forEach(e,d,(function(d){d.index+d[0].length>f&&(a.push(e.slice(f,d.index)),d.length>1&&d.indexu?a.slice(0,u):a},O.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(function(d,u){if("B"===d[1]&&"default"===u)return d[0];throw new SyntaxError("Invalid escape "+d[0])}),{scope:"all",leadChar:"\\"}),O.addToken(/\\u{([\dA-Fa-f]+)}/,(function(d,u,e){var a=I(d[1]);if(a>1114111)throw new SyntaxError("Invalid Unicode code point "+d[0]);if(a<=65535)return"\\u"+C(x(a));if(p&&-1!==e.indexOf("u"))return d[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")}),{scope:"all",leadChar:"\\"}),O.addToken(/\[(\^?)\]/,(function(d){return d[1]?"[\\s\\S]":"\\b\\B"}),{leadChar:"["}),O.addToken(/\(\?#[^)]*\)/,v,{leadChar:"("}),O.addToken(/\s+|#[^\n]*\n?/,v,{flag:"x"}),O.addToken(/\./,(function(){return"[\\s\\S]"}),{flag:"s",leadChar:"."}),O.addToken(/\\k<([\w$]+)>/,(function(d){var u=isNaN(d[1])?this.captureNames.indexOf(d[1])+1:+d[1],e=d.index+d[0].length;if(!u||u>this.captureNames.length)throw new SyntaxError("Backreference to undefined group "+d[0]);return"\\"+u+(e===d.input.length||isNaN(d.input[e])?"":"(?:)")}),{leadChar:"\\"}),O.addToken(/\\(\d+)/,(function(d,u){if(!("default"===u&&/^[1-9]/.test(d[1])&&+d[1]<=this.captureNames.length)&&"0"!==d[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+d[0]);return d[0]}),{scope:"all",leadChar:"\\"}),O.addToken(/\(\?P?<([\w$]+)>/,(function(d){if(!isNaN(d[1]))throw new SyntaxError("Cannot use integer as capture name "+d[0]);if("length"===d[1]||"__proto__"===d[1])throw new SyntaxError("Cannot use reserved word as capture name "+d[0]);if(-1!==this.captureNames.indexOf(d[1]))throw new SyntaxError("Cannot use same name for multiple groups "+d[0]);return this.captureNames.push(d[1]),this.hasNamedCapture=!0,"("}),{leadChar:"("}),O.addToken(/\((?!\?)/,(function(d,u,e){return-1!==e.indexOf("n")?"(?:":(this.captureNames.push(null),"(")}),{optionalFlags:"n",leadChar:"("}),u.default=O,d.exports=u.default},390:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){var u=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,e=d.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,u],"g",{conjunction:"or"});function a(d){var u=/^(?:\(\?:\))*\^/,e=/\$(?:\(\?:\))*$/;return u.test(d)&&e.test(d)&&e.test(d.replace(/\\[\s\S]/g,""))?d.replace(u,"").replace(e,""):d}function c(u,e){var a=e?"x":"";return d.isRegExp(u)?u.xregexp&&u.xregexp.captureNames?u:d(u.source,a):d(u,a)}function n(u){return u instanceof RegExp?u:d.escape(u)}function f(d,u,e){return d["subpattern"+e]=u,d}function t(d,u,e){return d+(u1?a-1:0),r=1;r"):r="(?:",p=b,""+r+l[f].pattern.replace(u,(function(d,u,e){if(u){if(t=l[f].names[b-p],++b,t)return"(?<"+t+">"}else if(e)return i=+e-1,l[f].names[i]?"\\k<"+l[f].names[i]+">":"\\"+(+e+p);return d}))+")"}if(c){if(t=g[D],h[++D]=++b,t)return"(?<"+t+">"}else if(n)return g[i=+n-1]?"\\k<"+g[i]+">":"\\"+h[+n];return d}));return d(_,t)}},d.exports=u.default},391:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){function u(d,u,e,a){return{name:d,value:u,start:e,end:a}}d.matchRecursive=function(e,a,c,n,f){f=f||{};var t=-1!==(n=n||"").indexOf("g"),r=-1!==n.indexOf("y"),i=n.replace(/y/g,""),l=f.escapeChar,s=f.valueNames,o=[],m=0,b=0,p=0,D=0,h=void 0,g=void 0,_=void 0,E=void 0,I=void 0;if(a=d(a,i),c=d(c,i),l){if(l.length>1)throw new Error("Cannot use more than one escape character");l=d.escape(l),I=new RegExp("(?:"+l+"[\\S\\s]|(?:(?!"+d.union([a,c],"",{conjunction:"or"}).source+")[^"+l+"])+)+",n.replace(/[^imu]+/g,""))}for(;;){if(l&&(p+=(d.exec(e,I,p,"sticky")||[""])[0].length),_=d.exec(e,a,p),E=d.exec(e,c,p),_&&E&&(_.index<=E.index?E=null:_=null),_||E)p=(b=(_||E).index)+(_||E)[0].length;else if(!m)break;if(r&&!m&&b>D)break;if(_)m||(h=b,g=p),++m;else{if(!E||!m)throw new Error("Unbalanced delimiter found in string");if(!--m&&(s?(s[0]&&h>D&&o.push(u(s[0],e.slice(D,h),D,h)),s[1]&&o.push(u(s[1],e.slice(h,g),h,g)),s[2]&&o.push(u(s[2],e.slice(g,b),g,b)),s[3]&&o.push(u(s[3],e.slice(b,p),b,p))):o.push(e.slice(g,b)),D=p,!t))break}b===p&&++p}return t&&!r&&s&&s[0]&&e.length>D&&o.push(u(s[0],e.slice(D),D,e.length)),o}},d.exports=u.default},392:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){var u={},e=d._dec,a=d._hex,c=d._pad4;function n(d){return d.replace(/[- _]+/g,"").toLowerCase()}function f(d){var u=/^\\[xu](.+)/.exec(d);return u?e(u[1]):d.charCodeAt("\\"===d[0]?1:0)}function t(e){var n,t,r;return u[e]["b!"]||(u[e]["b!"]=(n=u[e].bmp,t="",r=-1,d.forEach(n,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(d){var u=f(d[1]);u>r+1&&(t+="\\u"+c(a(r+1)),u>r+2&&(t+="-\\u"+c(a(u-1)))),r=f(d[2]||d[1])})),r<65535&&(t+="\\u"+c(a(r+1)),r<65534&&(t+="-\\uFFFF")),t))}function r(d,e){var a=e?"a!":"a=";return u[d][a]||(u[d][a]=function(d,e){var a=u[d],c="";return a.bmp&&!a.isBmpLast&&(c="["+a.bmp+"]"+(a.astral?"|":"")),a.astral&&(c+=a.astral),a.isBmpLast&&a.bmp&&(c+=(a.astral?"|":"")+"["+a.bmp+"]"),e?"(?:(?!"+c+")(?:[\ud800-\udbff][\udc00-\udfff]|[\0-\uffff]))":"(?:"+c+")"}(d,e))}d.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,(function(d,e,a){var c="P"===d[1]||!!d[2],f=-1!==a.indexOf("A"),i=n(d[4]||d[3]),l=u[i];if("P"===d[1]&&d[2])throw new SyntaxError("Invalid double negation "+d[0]);if(!u.hasOwnProperty(i))throw new SyntaxError("Unknown Unicode token "+d[0]);if(l.inverseOf){if(i=n(l.inverseOf),!u.hasOwnProperty(i))throw new ReferenceError("Unicode token missing data "+d[0]+" -> "+l.inverseOf);l=u[i],c=!c}if(!l.bmp&&!f)throw new SyntaxError("Astral mode required for Unicode token "+d[0]);if(f){if("class"===e)throw new SyntaxError("Astral mode does not support Unicode tokens within character classes");return r(i,c)}return"class"===e?c?t(i):l.bmp:(c?"[^":"[")+l.bmp+"]"}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),d.addUnicodeData=function(e){for(var a=void 0,c=0;c\\x5E`\\x7C~\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20be\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u23fe\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b98-\u2bb9\u2bbd-\u2bc8\u2bca-\u2bd1\u2bec-\u2bef\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9b\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|\ud805\udf3f|\ud81a[\udf3c-\udf3f\udf45]|\ud82f\udc9c|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\udde8\ude00-\ude41\ude45\udf00-\udf56]|\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|\ud83b[\udef0\udef1]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd10-\udd2e\udd30-\udd6b\udd70-\uddac\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\udf00-\udfff]|\ud83d[\udc00-\uded2\udee0-\udeec\udef0-\udef6\udf00-\udf73\udf80-\udfd4]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udd10-\udd1e\udd20-\udd27\udd30\udd33-\udd3e\udd40-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\x24\xa2-\xa5\u058f\u060b\u09f2\u09f3\u09fb\u0af1\u0bf9\u0e3f\u17db\u20a0-\u20be\ua838\ufdfc\ufe69\uff04\uffe0\uffe1\uffe5\uffe6"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\x5E`\xa8\xaf\xb4\xb8\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u309b\u309c\ua700-\ua716\ua720\ua721\ua789\ua78a\uab5b\ufbb2-\ufbc1\uff3e\uff40\uffe3",astral:"\ud83c[\udffb-\udfff]"},{name:"Sm",alias:"Math_Symbol",bmp:"\\x2B<->\\x7C~\xac\xb1\xd7\xf7\u03f6\u0606-\u0608\u2044\u2052\u207a-\u207c\u208a-\u208c\u2118\u2140-\u2144\u214b\u2190-\u2194\u219a\u219b\u21a0\u21a3\u21a6\u21ae\u21ce\u21cf\u21d2\u21d4\u21f4-\u22ff\u2320\u2321\u237c\u239b-\u23b3\u23dc-\u23e1\u25b7\u25c1\u25f8-\u25ff\u266f\u27c0-\u27c4\u27c7-\u27e5\u27f0-\u27ff\u2900-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2aff\u2b30-\u2b44\u2b47-\u2b4c\ufb29\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe9-\uffec",astral:"\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud83b[\udef0\udef1]"},{name:"So",alias:"Other_Symbol",bmp:"\xa6\xa9\xae\xb0\u0482\u058d\u058e\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0d4f\u0d79\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u214a\u214c\u214d\u214f\u218a\u218b\u2195-\u2199\u219c-\u219f\u21a1\u21a2\u21a4\u21a5\u21a7-\u21ad\u21af-\u21cd\u21d0\u21d1\u21d3\u21d5-\u21f3\u2300-\u2307\u230c-\u231f\u2322-\u2328\u232b-\u237b\u237d-\u239a\u23b4-\u23db\u23e2-\u23fe\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u25b6\u25b8-\u25c0\u25c2-\u25f7\u2600-\u266e\u2670-\u2767\u2794-\u27bf\u2800-\u28ff\u2b00-\u2b2f\u2b45\u2b46\u2b4d-\u2b73\u2b76-\u2b95\u2b98-\u2bb9\u2bbd-\u2bc8\u2bca-\u2bd1\u2bec-\u2bef\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ua836\ua837\ua839\uaa77-\uaa79\ufdfd\uffe4\uffe8\uffed\uffee\ufffc\ufffd",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9b\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|\ud805\udf3f|\ud81a[\udf3c-\udf3f\udf45]|\ud82f\udc9c|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\udde8\ude00-\ude41\ude45\udf00-\udf56]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd10-\udd2e\udd30-\udd6b\udd70-\uddac\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\udf00-\udffa]|\ud83d[\udc00-\uded2\udee0-\udeec\udef0-\udef6\udf00-\udf73\udf80-\udfd4]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udd10-\udd1e\udd20-\udd27\udd30\udd33-\udd3e\udd40-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]"},{name:"Z",alias:"Separator",bmp:" \xa0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000"},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:" \xa0\u1680\u2000-\u200a\u202f\u205f\u3000"}])},d.exports=u.default},395:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");var u=[{name:"ASCII",bmp:"\0-\x7f"},{name:"Alphabetic",bmp:"A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0345\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05b0-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0657\u0659-\u065f\u066e-\u06d3\u06d5-\u06dc\u06e1-\u06e8\u06ed-\u06ef\u06fa-\u06fc\u06ff\u0710-\u073f\u074d-\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0817\u081a-\u082c\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u08d4-\u08df\u08e3-\u08e9\u08f0-\u093b\u093d-\u094c\u094e-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd-\u09c4\u09c7\u09c8\u09cb\u09cc\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09f0\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3e-\u0a42\u0a47\u0a48\u0a4b\u0a4c\u0a51\u0a59-\u0a5c\u0a5e\u0a70-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd-\u0ac5\u0ac7-\u0ac9\u0acb\u0acc\u0ad0\u0ae0-\u0ae3\u0af9\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d-\u0b44\u0b47\u0b48\u0b4b\u0b4c\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd0\u0bd7\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4c\u0c55\u0c56\u0c58-\u0c5a\u0c60-\u0c63\u0c80-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccc\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0cf1\u0cf2\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4c\u0d4e\u0d54-\u0d57\u0d5f-\u0d63\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e46\u0e4d\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ecd\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f71-\u0f81\u0f88-\u0f97\u0f99-\u0fbc\u1000-\u1036\u1038\u103b-\u103f\u1050-\u1062\u1065-\u1068\u106e-\u1086\u108e\u109c\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135f\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17b3\u17b6-\u17c8\u17d7\u17dc\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u1938\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a1b\u1a20-\u1a5e\u1a61-\u1a74\u1aa7\u1b00-\u1b33\u1b35-\u1b43\u1b45-\u1b4b\u1b80-\u1ba9\u1bac-\u1baf\u1bba-\u1be5\u1be7-\u1bf1\u1c00-\u1c35\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1d00-\u1dbf\u1de7-\u1df4\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua674-\ua67b\ua67f-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua827\ua840-\ua873\ua880-\ua8c3\ua8c5\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua92a\ua930-\ua952\ua960-\ua97c\ua980-\ua9b2\ua9b4-\ua9bf\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa60-\uaa76\uaa7a\uaa7e-\uaabe\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf5\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabea\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\udd40-\udd74\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf30-\udf4a\udf50-\udf7a\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf\udfd1-\udfd5]|\ud801[\udc00-\udc9d\udcb0-\udcd3\udcd8-\udcfb\udd00-\udd27\udd30-\udd63\ude00-\udf36\udf40-\udf55\udf60-\udf67]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude33\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udc80-\udcb2\udcc0-\udcf2]|\ud804[\udc00-\udc45\udc82-\udcb8\udcd0-\udce8\udd00-\udd32\udd50-\udd72\udd76\udd80-\uddbf\uddc1-\uddc4\uddda\udddc\ude00-\ude11\ude13-\ude34\ude37\ude3e\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udee8\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d-\udf44\udf47\udf48\udf4b\udf4c\udf50\udf57\udf5d-\udf63]|\ud805[\udc00-\udc41\udc43-\udc45\udc47-\udc4a\udc80-\udcc1\udcc4\udcc5\udcc7\udd80-\uddb5\uddb8-\uddbe\uddd8-\udddd\ude00-\ude3e\ude40\ude44\ude80-\udeb5\udf00-\udf19\udf1d-\udf2a]|\ud806[\udca0-\udcdf\udcff\udec0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc3e\udc40\udc72-\udc8f\udc92-\udca7\udca9-\udcb6]|\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc80-\udd43]|[\ud80c\ud81c-\ud820\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\uded0-\udeed\udf00-\udf36\udf40-\udf43\udf63-\udf77\udf7d-\udf8f]|\ud81b[\udf00-\udf44\udf50-\udf7e\udf93-\udf9f\udfe0]|\ud821[\udc00-\udfec]|\ud822[\udc00-\udef2]|\ud82c[\udc00\udc01]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9e]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a]|\ud83a[\udc00-\udcc4\udd00-\udd43\udd47]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]|\ud869[\udc00-\uded6\udf00-\udfff]|\ud86d[\udc00-\udf34\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1]|\ud87e[\udc00-\ude1d]"},{name:"Any",isBmpLast:!0,bmp:"\0-\uffff",astral:"[\ud800-\udbff][\udc00-\udfff]"},{name:"Default_Ignorable_Code_Point",bmp:"\xad\u034f\u061c\u115f\u1160\u17b4\u17b5\u180b-\u180e\u200b-\u200f\u202a-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufff8",astral:"\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]"},{name:"Lowercase",bmp:"a-z\xaa\xb5\xba\xdf-\xf6\xf8-\xff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02b8\u02c0\u02c1\u02e0-\u02e4\u0345\u0371\u0373\u0377\u037a-\u037d\u0390\u03ac-\u03ce\u03d0\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0561-\u0587\u13f8-\u13fd\u1c80-\u1c88\u1d00-\u1dbf\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6\u1fc7\u1fd0-\u1fd3\u1fd6\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6\u1ff7\u2071\u207f\u2090-\u209c\u210a\u210e\u210f\u2113\u212f\u2134\u2139\u213c\u213d\u2146-\u2149\u214e\u2170-\u217f\u2184\u24d0-\u24e9\u2c30-\u2c5e\u2c61\u2c65\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73\u2c74\u2c76-\u2c7d\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b-\ua69d\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793-\ua795\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7b5\ua7b7\ua7f8-\ua7fa\uab30-\uab5a\uab5c-\uab65\uab70-\uabbf\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a",astral:"\ud801[\udc28-\udc4f\udcd8-\udcfb]|\ud803[\udcc0-\udcf2]|\ud806[\udcc0-\udcdf]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb]|\ud83a[\udd22-\udd43]"},{name:"Noncharacter_Code_Point",bmp:"\ufdd0-\ufdef\ufffe\uffff",astral:"[\ud83f\ud87f\ud8bf\ud8ff\ud93f\ud97f\ud9bf\ud9ff\uda3f\uda7f\udabf\udaff\udb3f\udb7f\udbbf\udbff][\udffe\udfff]"},{name:"Uppercase",bmp:"A-Z\xc0-\xd6\xd8-\xde\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178\u0179\u017b\u017d\u0181\u0182\u0184\u0186\u0187\u0189-\u018b\u018e-\u0191\u0193\u0194\u0196-\u0198\u019c\u019d\u019f\u01a0\u01a2\u01a4\u01a6\u01a7\u01a9\u01ac\u01ae\u01af\u01b1-\u01b3\u01b5\u01b7\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a\u023b\u023d\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u037f\u0386\u0388-\u038a\u038c\u038e\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0528\u052a\u052c\u052e\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u13a0-\u13f5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e\u213f\u2145\u2160-\u216f\u2183\u24b6-\u24cf\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua698\ua69a\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua796\ua798\ua79a\ua79c\ua79e\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa-\ua7ae\ua7b0-\ua7b4\ua7b6\uff21-\uff3a",astral:"\ud801[\udc00-\udc27\udcb0-\udcd3]|\ud803[\udc80-\udcb2]|\ud806[\udca0-\udcbf]|\ud835[\udc00-\udc19\udc34-\udc4d\udc68-\udc81\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb5\udcd0-\udce9\udd04\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd38\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd6c-\udd85\udda0-\uddb9\uddd4-\udded\ude08-\ude21\ude3c-\ude55\ude70-\ude89\udea8-\udec0\udee2-\udefa\udf1c-\udf34\udf56-\udf6e\udf90-\udfa8\udfca]|\ud83a[\udd00-\udd21]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]"},{name:"White_Space",bmp:"\t-\r \x85\xa0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000"}];u.push({name:"Assigned",inverseOf:"Cn"}),d.addUnicodeData(u)},d.exports=u.default},396:function(d,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");d.addUnicodeData([{name:"Adlam",astral:"\ud83a[\udd00-\udd4a\udd50-\udd59\udd5e\udd5f]"},{name:"Ahom",astral:"\ud805[\udf00-\udf19\udf1d-\udf2b\udf30-\udf3f]"},{name:"Anatolian_Hieroglyphs",astral:"\ud811[\udc00-\ude46]"},{name:"Arabic",bmp:"\u0600-\u0604\u0606-\u060b\u060d-\u061a\u061e\u0620-\u063f\u0641-\u064a\u0656-\u066f\u0671-\u06dc\u06de-\u06ff\u0750-\u077f\u08a0-\u08b4\u08b6-\u08bd\u08d4-\u08e1\u08e3-\u08ff\ufb50-\ufbc1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfd\ufe70-\ufe74\ufe76-\ufefc",astral:"\ud803[\ude60-\ude7e]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb\udef0\udef1]"},{name:"Armenian",bmp:"\u0531-\u0556\u0559-\u055f\u0561-\u0587\u058a\u058d-\u058f\ufb13-\ufb17"},{name:"Avestan",astral:"\ud802[\udf00-\udf35\udf39-\udf3f]"},{name:"Balinese",bmp:"\u1b00-\u1b4b\u1b50-\u1b7c"},{name:"Bamum",bmp:"\ua6a0-\ua6f7",astral:"\ud81a[\udc00-\ude38]"},{name:"Bassa_Vah",astral:"\ud81a[\uded0-\udeed\udef0-\udef5]"},{name:"Batak",bmp:"\u1bc0-\u1bf3\u1bfc-\u1bff"},{name:"Bengali",bmp:"\u0980-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09fb"},{name:"Bhaiksuki",astral:"\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc45\udc50-\udc6c]"},{name:"Bopomofo",bmp:"\u02ea\u02eb\u3105-\u312d\u31a0-\u31ba"},{name:"Brahmi",astral:"\ud804[\udc00-\udc4d\udc52-\udc6f\udc7f]"},{name:"Braille",bmp:"\u2800-\u28ff"},{name:"Buginese",bmp:"\u1a00-\u1a1b\u1a1e\u1a1f"},{name:"Buhid",bmp:"\u1740-\u1753"},{name:"Canadian_Aboriginal",bmp:"\u1400-\u167f\u18b0-\u18f5"},{name:"Carian",astral:"\ud800[\udea0-\uded0]"},{name:"Caucasian_Albanian",astral:"\ud801[\udd30-\udd63\udd6f]"},{name:"Chakma",astral:"\ud804[\udd00-\udd34\udd36-\udd43]"},{name:"Cham",bmp:"\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa5c-\uaa5f"},{name:"Cherokee",bmp:"\u13a0-\u13f5\u13f8-\u13fd\uab70-\uabbf"},{name:"Common",bmp:"\0-@\\x5B-`\\x7B-\xa9\xab-\xb9\xbb-\xbf\xd7\xf7\u02b9-\u02df\u02e5-\u02e9\u02ec-\u02ff\u0374\u037e\u0385\u0387\u0589\u0605\u060c\u061b\u061c\u061f\u0640\u06dd\u08e2\u0964\u0965\u0e3f\u0fd5-\u0fd8\u10fb\u16eb-\u16ed\u1735\u1736\u1802\u1803\u1805\u1cd3\u1ce1\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u2000-\u200b\u200e-\u2064\u2066-\u2070\u2074-\u207e\u2080-\u208e\u20a0-\u20be\u2100-\u2125\u2127-\u2129\u212c-\u2131\u2133-\u214d\u214f-\u215f\u2189-\u218b\u2190-\u23fe\u2400-\u2426\u2440-\u244a\u2460-\u27ff\u2900-\u2b73\u2b76-\u2b95\u2b98-\u2bb9\u2bbd-\u2bc8\u2bca-\u2bd1\u2bec-\u2bef\u2e00-\u2e44\u2ff0-\u2ffb\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303c-\u303f\u309b\u309c\u30a0\u30fb\u30fc\u3190-\u319f\u31c0-\u31e3\u3220-\u325f\u327f-\u32cf\u3358-\u33ff\u4dc0-\u4dff\ua700-\ua721\ua788-\ua78a\ua830-\ua839\ua92e\ua9cf\uab5b\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe66\ufe68-\ufe6b\ufeff\uff01-\uff20\uff3b-\uff40\uff5b-\uff65\uff70\uff9e\uff9f\uffe0-\uffe6\uffe8-\uffee\ufff9-\ufffd",astral:"\ud800[\udd00-\udd02\udd07-\udd33\udd37-\udd3f\udd90-\udd9b\uddd0-\uddfc\udee1-\udefb]|\ud82f[\udca0-\udca3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd66\udd6a-\udd7a\udd83\udd84\udd8c-\udda9\uddae-\udde8\udf00-\udf56\udf60-\udf71]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udfcb\udfce-\udfff]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd00-\udd0c\udd10-\udd2e\udd30-\udd6b\udd70-\uddac\udde6-\uddff\ude01\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\udf00-\udfff]|\ud83d[\udc00-\uded2\udee0-\udeec\udef0-\udef6\udf00-\udf73\udf80-\udfd4]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udd10-\udd1e\udd20-\udd27\udd30\udd33-\udd3e\udd40-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]|\udb40[\udc01\udc20-\udc7f]"},{name:"Coptic",bmp:"\u03e2-\u03ef\u2c80-\u2cf3\u2cf9-\u2cff"},{name:"Cuneiform",astral:"\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc70-\udc74\udc80-\udd43]"},{name:"Cypriot",astral:"\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f]"},{name:"Cyrillic",bmp:"\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f"},{name:"Deseret",astral:"\ud801[\udc00-\udc4f]"},{name:"Devanagari",bmp:"\u0900-\u0950\u0953-\u0963\u0966-\u097f\ua8e0-\ua8fd"},{name:"Duployan",astral:"\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9c-\udc9f]"},{name:"Egyptian_Hieroglyphs",astral:"\ud80c[\udc00-\udfff]|\ud80d[\udc00-\udc2e]"},{name:"Elbasan",astral:"\ud801[\udd00-\udd27]"},{name:"Ethiopic",bmp:"\u1200-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u137c\u1380-\u1399\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e"},{name:"Georgian",bmp:"\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u10ff\u2d00-\u2d25\u2d27\u2d2d"},{name:"Glagolitic",bmp:"\u2c00-\u2c2e\u2c30-\u2c5e",astral:"\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a]"},{name:"Gothic",astral:"\ud800[\udf30-\udf4a]"},{name:"Grantha",astral:"\ud804[\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3c-\udf44\udf47\udf48\udf4b-\udf4d\udf50\udf57\udf5d-\udf63\udf66-\udf6c\udf70-\udf74]"},{name:"Greek",bmp:"\u0370-\u0373\u0375-\u0377\u037a-\u037d\u037f\u0384\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03e1\u03f0-\u03ff\u1d26-\u1d2a\u1d5d-\u1d61\u1d66-\u1d6a\u1dbf\u1f00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fc4\u1fc6-\u1fd3\u1fd6-\u1fdb\u1fdd-\u1fef\u1ff2-\u1ff4\u1ff6-\u1ffe\u2126\uab65",astral:"\ud800[\udd40-\udd8e\udda0]|\ud834[\ude00-\ude45]"},{name:"Gujarati",bmp:"\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0af1\u0af9"},{name:"Gurmukhi",bmp:"\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75"},{name:"Han",bmp:"\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u3005\u3007\u3021-\u3029\u3038-\u303b\u3400-\u4db5\u4e00-\u9fd5\uf900-\ufa6d\ufa70-\ufad9",astral:"[\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872][\udc00-\udfff]|\ud869[\udc00-\uded6\udf00-\udfff]|\ud86d[\udc00-\udf34\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1]|\ud87e[\udc00-\ude1d]"},{name:"Hangul",bmp:"\u1100-\u11ff\u302e\u302f\u3131-\u318e\u3200-\u321e\u3260-\u327e\ua960-\ua97c\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"},{name:"Hanunoo",bmp:"\u1720-\u1734"},{name:"Hatran",astral:"\ud802[\udce0-\udcf2\udcf4\udcf5\udcfb-\udcff]"},{name:"Hebrew",bmp:"\u0591-\u05c7\u05d0-\u05ea\u05f0-\u05f4\ufb1d-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufb4f"},{name:"Hiragana",bmp:"\u3041-\u3096\u309d-\u309f",astral:"\ud82c\udc01|\ud83c\ude00"},{name:"Imperial_Aramaic",astral:"\ud802[\udc40-\udc55\udc57-\udc5f]"},{name:"Inherited",bmp:"\u0300-\u036f\u0485\u0486\u064b-\u0655\u0670\u0951\u0952\u1ab0-\u1abe\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u200c\u200d\u20d0-\u20f0\u302a-\u302d\u3099\u309a\ufe00-\ufe0f\ufe20-\ufe2d",astral:"\ud800[\uddfd\udee0]|\ud834[\udd67-\udd69\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad]|\udb40[\udd00-\uddef]"},{name:"Inscriptional_Pahlavi",astral:"\ud802[\udf60-\udf72\udf78-\udf7f]"},{name:"Inscriptional_Parthian",astral:"\ud802[\udf40-\udf55\udf58-\udf5f]"},{name:"Javanese",bmp:"\ua980-\ua9cd\ua9d0-\ua9d9\ua9de\ua9df"},{name:"Kaithi",astral:"\ud804[\udc80-\udcc1]"},{name:"Kannada",bmp:"\u0c80-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2"},{name:"Katakana",bmp:"\u30a1-\u30fa\u30fd-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff6f\uff71-\uff9d",astral:"\ud82c\udc00"},{name:"Kayah_Li",bmp:"\ua900-\ua92d\ua92f"},{name:"Kharoshthi",astral:"\ud802[\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude33\ude38-\ude3a\ude3f-\ude47\ude50-\ude58]"},{name:"Khmer",bmp:"\u1780-\u17dd\u17e0-\u17e9\u17f0-\u17f9\u19e0-\u19ff"},{name:"Khojki",astral:"\ud804[\ude00-\ude11\ude13-\ude3e]"},{name:"Khudawadi",astral:"\ud804[\udeb0-\udeea\udef0-\udef9]"},{name:"Lao",bmp:"\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf"},{name:"Latin",bmp:"A-Za-z\xaa\xba\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u02e0-\u02e4\u1d00-\u1d25\u1d2c-\u1d5c\u1d62-\u1d65\u1d6b-\u1d77\u1d79-\u1dbe\u1e00-\u1eff\u2071\u207f\u2090-\u209c\u212a\u212b\u2132\u214e\u2160-\u2188\u2c60-\u2c7f\ua722-\ua787\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua7ff\uab30-\uab5a\uab5c-\uab64\ufb00-\ufb06\uff21-\uff3a\uff41-\uff5a"},{name:"Lepcha",bmp:"\u1c00-\u1c37\u1c3b-\u1c49\u1c4d-\u1c4f"},{name:"Limbu",bmp:"\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1940\u1944-\u194f"},{name:"Linear_A",astral:"\ud801[\ude00-\udf36\udf40-\udf55\udf60-\udf67]"},{name:"Linear_B",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa]"},{name:"Lisu",bmp:"\ua4d0-\ua4ff"},{name:"Lycian",astral:"\ud800[\ude80-\ude9c]"},{name:"Lydian",astral:"\ud802[\udd20-\udd39\udd3f]"},{name:"Mahajani",astral:"\ud804[\udd50-\udd76]"},{name:"Malayalam",bmp:"\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4f\u0d54-\u0d63\u0d66-\u0d7f"},{name:"Mandaic",bmp:"\u0840-\u085b\u085e"},{name:"Manichaean",astral:"\ud802[\udec0-\udee6\udeeb-\udef6]"},{name:"Marchen",astral:"\ud807[\udc70-\udc8f\udc92-\udca7\udca9-\udcb6]"},{name:"Meetei_Mayek",bmp:"\uaae0-\uaaf6\uabc0-\uabed\uabf0-\uabf9"},{name:"Mende_Kikakui",astral:"\ud83a[\udc00-\udcc4\udcc7-\udcd6]"},{name:"Meroitic_Cursive",astral:"\ud802[\udda0-\uddb7\uddbc-\uddcf\uddd2-\uddff]"},{name:"Meroitic_Hieroglyphs",astral:"\ud802[\udd80-\udd9f]"},{name:"Miao",astral:"\ud81b[\udf00-\udf44\udf50-\udf7e\udf8f-\udf9f]"},{name:"Modi",astral:"\ud805[\ude00-\ude44\ude50-\ude59]"},{name:"Mongolian",bmp:"\u1800\u1801\u1804\u1806-\u180e\u1810-\u1819\u1820-\u1877\u1880-\u18aa",astral:"\ud805[\ude60-\ude6c]"},{name:"Mro",astral:"\ud81a[\ude40-\ude5e\ude60-\ude69\ude6e\ude6f]"},{name:"Multani",astral:"\ud804[\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea9]"},{name:"Myanmar",bmp:"\u1000-\u109f\ua9e0-\ua9fe\uaa60-\uaa7f"},{name:"Nabataean",astral:"\ud802[\udc80-\udc9e\udca7-\udcaf]"},{name:"New_Tai_Lue",bmp:"\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19da\u19de\u19df"},{name:"Newa",astral:"\ud805[\udc00-\udc59\udc5b\udc5d]"},{name:"Nko",bmp:"\u07c0-\u07fa"},{name:"Ogham",bmp:"\u1680-\u169c"},{name:"Ol_Chiki",bmp:"\u1c50-\u1c7f"},{name:"Old_Hungarian",astral:"\ud803[\udc80-\udcb2\udcc0-\udcf2\udcfa-\udcff]"},{name:"Old_Italic",astral:"\ud800[\udf00-\udf23]"},{name:"Old_North_Arabian",astral:"\ud802[\ude80-\ude9f]"},{name:"Old_Permic",astral:"\ud800[\udf50-\udf7a]"},{name:"Old_Persian",astral:"\ud800[\udfa0-\udfc3\udfc8-\udfd5]"},{name:"Old_South_Arabian",astral:"\ud802[\ude60-\ude7f]"},{name:"Old_Turkic",astral:"\ud803[\udc00-\udc48]"},{name:"Oriya",bmp:"\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b77"},{name:"Osage",astral:"\ud801[\udcb0-\udcd3\udcd8-\udcfb]"},{name:"Osmanya",astral:"\ud801[\udc80-\udc9d\udca0-\udca9]"},{name:"Pahawh_Hmong",astral:"\ud81a[\udf00-\udf45\udf50-\udf59\udf5b-\udf61\udf63-\udf77\udf7d-\udf8f]"},{name:"Palmyrene",astral:"\ud802[\udc60-\udc7f]"},{name:"Pau_Cin_Hau",astral:"\ud806[\udec0-\udef8]"},{name:"Phags_Pa",bmp:"\ua840-\ua877"},{name:"Phoenician",astral:"\ud802[\udd00-\udd1b\udd1f]"},{name:"Psalter_Pahlavi",astral:"\ud802[\udf80-\udf91\udf99-\udf9c\udfa9-\udfaf]"},{name:"Rejang",bmp:"\ua930-\ua953\ua95f"},{name:"Runic",bmp:"\u16a0-\u16ea\u16ee-\u16f8"},{name:"Samaritan",bmp:"\u0800-\u082d\u0830-\u083e"},{name:"Saurashtra",bmp:"\ua880-\ua8c5\ua8ce-\ua8d9"},{name:"Sharada",astral:"\ud804[\udd80-\uddcd\uddd0-\udddf]"},{name:"Shavian",astral:"\ud801[\udc50-\udc7f]"},{name:"Siddham",astral:"\ud805[\udd80-\uddb5\uddb8-\udddd]"},{name:"SignWriting",astral:"\ud836[\udc00-\ude8b\ude9b-\ude9f\udea1-\udeaf]"},{name:"Sinhala",bmp:"\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2-\u0df4",astral:"\ud804[\udde1-\uddf4]"},{name:"Sora_Sompeng",astral:"\ud804[\udcd0-\udce8\udcf0-\udcf9]"},{name:"Sundanese",bmp:"\u1b80-\u1bbf\u1cc0-\u1cc7"},{name:"Syloti_Nagri",bmp:"\ua800-\ua82b"},{name:"Syriac",bmp:"\u0700-\u070d\u070f-\u074a\u074d-\u074f"},{name:"Tagalog",bmp:"\u1700-\u170c\u170e-\u1714"},{name:"Tagbanwa",bmp:"\u1760-\u176c\u176e-\u1770\u1772\u1773"},{name:"Tai_Le",bmp:"\u1950-\u196d\u1970-\u1974"},{name:"Tai_Tham",bmp:"\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa0-\u1aad"},{name:"Tai_Viet",bmp:"\uaa80-\uaac2\uaadb-\uaadf"},{name:"Takri",astral:"\ud805[\ude80-\udeb7\udec0-\udec9]"},{name:"Tamil",bmp:"\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bfa"},{name:"Tangut",astral:"\ud81b\udfe0|[\ud81c-\ud820][\udc00-\udfff]|\ud821[\udc00-\udfec]|\ud822[\udc00-\udef2]"},{name:"Telugu",bmp:"\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58-\u0c5a\u0c60-\u0c63\u0c66-\u0c6f\u0c78-\u0c7f"},{name:"Thaana",bmp:"\u0780-\u07b1"},{name:"Thai",bmp:"\u0e01-\u0e3a\u0e40-\u0e5b"},{name:"Tibetan",bmp:"\u0f00-\u0f47\u0f49-\u0f6c\u0f71-\u0f97\u0f99-\u0fbc\u0fbe-\u0fcc\u0fce-\u0fd4\u0fd9\u0fda"},{name:"Tifinagh",bmp:"\u2d30-\u2d67\u2d6f\u2d70\u2d7f"},{name:"Tirhuta",astral:"\ud805[\udc80-\udcc7\udcd0-\udcd9]"},{name:"Ugaritic",astral:"\ud800[\udf80-\udf9d\udf9f]"},{name:"Vai",bmp:"\ua500-\ua62b"},{name:"Warang_Citi",astral:"\ud806[\udca0-\udcf2\udcff]"},{name:"Yi",bmp:"\ua000-\ua48c\ua490-\ua4c6"}])},d.exports=u.default}}]); \ No newline at end of file diff --git a/9c0c4329.65892dea.js.LICENSE.txt b/9c0c4329.f43eea20.js.LICENSE.txt similarity index 100% rename from 9c0c4329.65892dea.js.LICENSE.txt rename to 9c0c4329.f43eea20.js.LICENSE.txt diff --git a/9d7dad5c.cdb7922d.js b/9d7dad5c.16e4b0e8.js similarity index 73% rename from 9d7dad5c.cdb7922d.js rename to 9d7dad5c.16e4b0e8.js index 9558deaf6..15e49e469 100644 --- a/9d7dad5c.cdb7922d.js +++ b/9d7dad5c.16e4b0e8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{215:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-v-1-6-0","name":"domain: v1.6.0","count":1,"permalink":"/highlights/tags/domain-v-1-6-0"}')}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{213:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-v-1-6-0","name":"domain: v1.6.0","count":1,"permalink":"/highlights/tags/domain-v-1-6-0"}')}}]); \ No newline at end of file diff --git a/9d965dc0.28aedf0d.js b/9d965dc0.4826067e.js similarity index 99% rename from 9d965dc0.28aedf0d.js rename to 9d965dc0.4826067e.js index e8a915649..12630f259 100644 --- a/9d965dc0.28aedf0d.js +++ b/9d965dc0.4826067e.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{216:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return c})),n.d(t,"metadata",(function(){return i})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return l}));var r=n(1),a=n(9),o=(n(0),n(265)),c={last_modified_on:"2023-06-21",id:"benchmark",title:"Benchmark",description:"Benchmark results with other similar frameworks in Go"},i={id:"benchmark",title:"Benchmark",description:"Benchmark results with other similar frameworks in Go",source:"@site/docs/benchmark.md",permalink:"/docs/benchmark",editUrl:"https://github.com/panjf2000/gnet/edit/master/website/docs/benchmark.md",sidebar:"docs",previous:{title:"Best practices",permalink:"/docs/tutorial/best-practices"},next:{title:"Doc for gnet v1",permalink:"/docs/v1.x/doc-for-gnet-v1"}},s=[{value:"Benchmarks on TechEmpower",id:"benchmarks-on-techempower",children:[]},{value:"Contrasts to the similar networking libraries",id:"contrasts-to-the-similar-networking-libraries",children:[]},{value:"On Linux (epoll)",id:"on-linux-epoll",children:[{value:"Test Environment",id:"test-environment",children:[]}]},{value:"On MacOS (kqueue)",id:"on-macos-kqueue",children:[{value:"Test Environment",id:"test-environment-1",children:[]}]}],b={rightToc:s};function l(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},b,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("h2",{id:"benchmarks-on-techempower"},"Benchmarks on TechEmpower"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),'# Hardware Environment\n* 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 3.20GHz\n* 32GB RAM\n* Dedicated Cisco 10-gigabit Ethernet switch\n* Debian 12 "bookworm"\n* Go1.19.x linux/amd64\n')),Object(o.b)("p",null,Object(o.b)("img",Object(r.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-top50-light.jpg",alt:null}))),Object(o.b)("p",null,"This is a leaderboard of the top ",Object(o.b)("strong",{parentName:"p"},Object(o.b)("em",{parentName:"strong"},"50"))," out of ",Object(o.b)("strong",{parentName:"p"},Object(o.b)("em",{parentName:"strong"},"486"))," frameworks that encompass various programming languages worldwide, in which ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is ranked ",Object(o.b)("strong",{parentName:"p"},Object(o.b)("em",{parentName:"strong"},"first")),"."),Object(o.b)("p",null,Object(o.b)("img",Object(r.a)({parentName:"p"},{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/benchmark/techempower-plaintext-topN-go-light.png",alt:null}))),Object(o.b)("p",null,"This is the full framework ranking of Go and ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," tops all the other frameworks, which makes ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," the ",Object(o.b)("strong",{parentName:"p"},Object(o.b)("em",{parentName:"strong"},"fastest"))," networking framework in Go."),Object(o.b)("p",null,"To see the full ranking list, visit ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://www.techempower.com/benchmarks/#hw=ph&test=plaintext§ion=data-r22"}),"TechEmpower Benchmark ",Object(o.b)("strong",{parentName:"a"},"Round 22")),"."),Object(o.b)("h2",{id:"contrasts-to-the-similar-networking-libraries"},"Contrasts to the similar networking libraries"),Object(o.b)("h2",{id:"on-linux-epoll"},"On Linux (epoll)"),Object(o.b)("h3",{id:"test-environment"},"Test Environment"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),"# Machine information\n OS : Ubuntu 20.04/x86_64\n CPU : 8 CPU cores, AMD EPYC 7K62 48-Core Processor\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.17.2 linux/amd64\nGOMAXPROCS : 8\n\n# Benchmark parameters\nTCP connections : 1000/2000/5000/10000\nPacket size : 512/1024/2048/4096/8192/16384/32768/65536 bytes\nTest duration : 15s\n")),Object(o.b)("h4",{id:"echo-benchmark"},Object(o.b)("a",Object(r.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(o.b)("p",null,Object(o.b)("img",Object(r.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_linux.png",alt:null}))),Object(o.b)("p",null,Object(o.b)("img",Object(r.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_linux.png",alt:null}))),Object(o.b)("h2",{id:"on-macos-kqueue"},"On MacOS (kqueue)"),Object(o.b)("h3",{id:"test-environment-1"},"Test Environment"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{className:"language-bash"}),"# Machine information\n OS : MacOS Big Sur/x86_64\n CPU : 6 CPU cores, Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\n Memory : 16.0 GiB\n\n# Go version and settings\nGo Version : go1.16.5 darwin/amd64\nGOMAXPROCS : 12\n\n# Benchmark parameters\nTCP connections : 300/400/500/600/700\nPacket size : 512/1024/2048/4096/8192 bytes\nTest duration : 15s\n")),Object(o.b)("h4",{id:"echo-benchmark-1"},Object(o.b)("a",Object(r.a)({parentName:"h4"},{href:"https://github.com/gnet-io/gnet-benchmarks"}),"Echo benchmark")),Object(o.b)("p",null,Object(o.b)("img",Object(r.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_conn_macos.png",alt:null}))),Object(o.b)("p",null,Object(o.b)("img",Object(r.a)({parentName:"p"},{src:"https://github.com/panjf2000/gnet_benchmarks/raw/master/results/echo_packet_macos.png",alt:null}))))}l.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return h}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var b=a.a.createContext({}),l=function(e){var t=a.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},m=function(e){var t=l(e.components);return a.a.createElement(b.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,b=s(e,["components","mdxType","originalType","parentName"]),m=l(n),u=r,h=m["".concat(c,".").concat(u)]||m[u]||p[u]||o;return n?a.a.createElement(h,i({ref:t},b,{components:n})):a.a.createElement(h,i({ref:t},b))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,c=new Array(o);c[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var b=2;b=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var b=a.a.createContext({}),l=function(e){var t=a.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},m=function(e){var t=l(e.components);return a.a.createElement(b.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},u=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,b=s(e,["components","mdxType","originalType","parentName"]),m=l(n),u=r,h=m["".concat(c,".").concat(u)]||m[u]||p[u]||o;return n?a.a.createElement(h,i({ref:t},b,{components:n})):a.a.createElement(h,i({ref:t},b))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,c=new Array(o);c[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var b=2;b=0||(c[a]=e[a]);return c}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(c[a]=e[a])}return c}var l=c.a.createContext({}),f=function(e){var t=c.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},m=function(e){var t=f(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,b=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),m=f(a),d=n,u=m["".concat(b,".").concat(d)]||m[d]||p[d]||r;return a?c.a.createElement(u,i({ref:t},l,{components:a})):c.a.createElement(u,i({ref:t},l))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,b=new Array(r);b[0]=d;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:n,b[1]=i;for(var l=2;l=0||(c[a]=e[a]);return c}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(c[a]=e[a])}return c}var l=c.a.createContext({}),f=function(e){var t=c.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},m=function(e){var t=f(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,b=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),m=f(a),d=n,u=m["".concat(b,".").concat(d)]||m[d]||p[d]||r;return a?c.a.createElement(u,i({ref:t},l,{components:a})):c.a.createElement(u,i({ref:t},l))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,b=new Array(r);b[0]=d;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:n,b[1]=i;for(var l=2;l0 to compute geomean\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(o.b)("p",null,"While we have performed sufficient testing on ",Object(o.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(o.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(o.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(o.b)("p",null,"Another significant leap is ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(o.b)("p",null,"Visit the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0-rc.1"}),"release notes")," for more details."))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),s=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,d=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return n?r.a.createElement(d,c({ref:t},p,{components:n})):r.a.createElement(d,c({ref:t},p))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var p=2;p0 to compute geomean\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"The more connections there are, the more pronounced the effect.")),Object(o.b)("p",null,"While we have performed sufficient testing on ",Object(o.b)("inlineCode",{parentName:"p"},"matrix"),", we are still using ",Object(o.b)("inlineCode",{parentName:"p"},"map")," as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," has any unexpected bugs, you can quickly fall back to the default ",Object(o.b)("inlineCode",{parentName:"p"},"map"),". We will consider promoting ",Object(o.b)("inlineCode",{parentName:"p"},"matrix")," to be the default storage for connections in a subsequent official release."),Object(o.b)("p",null,"Another significant leap is ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/461"}),"#461"),", you can now run ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," on Windows, it should be noted that the Windows version of ",Object(o.b)("inlineCode",{parentName:"p"},"gnet")," is intended for development purposes and is not recommended for use in production."),Object(o.b)("p",null,"Visit the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/releases/tag/v2.3.0-rc.1"}),"release notes")," for more details."))}s.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),s=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=a,d=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return n?r.a.createElement(d,c({ref:t},p,{components:n})):r.a.createElement(d,c({ref:t},p))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var p=2;p=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=o.a.createContext({}),l=function(e){var t=o.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p({},t,{},e)),r},u=function(e){var t=l(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=l(r),m=n,d=u["".concat(i,".").concat(m)]||u[m]||f[m]||a;return r?o.a.createElement(d,p({ref:t},s,{components:r})):o.a.createElement(d,p({ref:t},s))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=m;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p.mdxType="string"==typeof e?e:n,i[1]=p;for(var s=2;s=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=o.a.createContext({}),l=function(e){var t=o.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p({},t,{},e)),r},u=function(e){var t=l(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),u=l(r),m=n,d=u["".concat(i,".").concat(m)]||u[m]||f[m]||a;return r?o.a.createElement(d,p({ref:t},s,{components:r})):o.a.createElement(d,p({ref:t},s))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=m;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p.mdxType="string"==typeof e?e:n,i[1]=p;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(n),d=r,h=u["".concat(i,".").concat(d)]||u[d]||g[d]||o;return n?a.a.createElement(h,l({ref:t},p,{components:n})):a.a.createElement(h,l({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(n),d=r,h=u["".concat(i,".").concat(d)]||u[d]||g[d]||o;return n?a.a.createElement(h,l({ref:t},p,{components:n})):a.a.createElement(h,l({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var p=2;p=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),s=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},D=function(e){var t=s(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,u=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),D=s(a),d=n,E=D["".concat(l,".").concat(d)]||D[d]||m[d]||u;return a?r.a.createElement(E,i({ref:t},o,{components:a})):r.a.createElement(E,i({ref:t},o))}));function E(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var u=a.length,l=new Array(u);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:n,l[1]=i;for(var o=2;o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(D.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(B,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(o||u)&&r.a.createElement("div",{className:"text--center"},o&&o.src&&r.a.createElement("div",{className:"margin-bottom--sm"},o.href?r.a.createElement("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement(L,{alt:o.alt,url:s})):r.a.createElement(L,{alt:o.alt,url:s}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},I=a(290),R=a(291),z=a(3);a(135);t.a=function(e){var t=Object(E.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,i=(a.tagline,a.title),c=a.themeConfig.image,o=a.url,s=e.children,D=e.title,m=e.noFooter,d=e.description,g=e.image,f=e.keywords,p=(e.permalink,e.version),h=D?D+" | "+i:i,b=g||c,v=o+Object(C.a)(b),F=Object(C.a)(n),y=Object(z.h)(),N=y?"https://gnet.host"+(y.pathname.endsWith("/")?y.pathname:y.pathname+"/"):null;return r.a.createElement(R.a,null,r.a.createElement(I.a,null,r.a.createElement(l.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),h&&r.a.createElement("title",null,h),h&&r.a.createElement("meta",{property:"og:title",content:h}),n&&r.a.createElement("link",{rel:"shortcut icon",href:F}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),p&&r.a.createElement("meta",{name:"docsearch:version",content:p}),f&&f.length&&r.a.createElement("meta",{name:"keywords",content:f.join(",")}),b&&r.a.createElement("meta",{property:"og:image",content:v}),b&&r.a.createElement("meta",{property:"twitter:image",content:v}),b&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+h}),b&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),b&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),N&&r.a.createElement("meta",{property:"og:url",content:N}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),N&&r.a.createElement("link",{rel:"canonical",href:N})),r.a.createElement(u.a,null),r.a.createElement(A,null),r.a.createElement("div",{className:"main-wrapper"},s),!m&&r.a.createElement(H,null)))}},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},279:function(e,t,a){var n=a(288);e.exports=i;var r=Object.hasOwnProperty,u=/\s/g,l=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function i(){if(!(this instanceof i))return new i;this.reset()}function c(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(l,"").replace(n(),"").replace(u,"-"))}i.prototype.slug=function(e,t){for(var a=c(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},i.prototype.reset=function(){this.occurrences=Object.create(null)},i.slug=c},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),l=a(266),i=a.n(l);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,l=e.style,c=e.value,o=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:i()("badge","badge--rounded","badge--"+l)},o?c:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),l=a.n(u),i=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,c=e.nameSuffix,o=e.rel,s=e.size,D=e.subTitle,m=e.vertical,d=Object(i.a)().siteConfig,E=(void 0===d?{}:d).customFields.metadata.team,g=E.find((function(e){return e.github==u}))||E.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:l()("avatar",n,(t={},t["avatar--"+s]=s,t["avatar--vertical"]=m,t))},r.a.createElement("img",{className:l()("avatar__photo","avatar__photo--"+s),src:g.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:g.github,target:"_blank",rel:o},g.name),c),D&&r.a.createElement("small",{className:"avatar__subtitle"},D),!D&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:g.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=(a(268),a(287)),i=a(266),c=a.n(i),o=a(275),s=a(138),D=a.n(s);t.a=function(e){var t,a=e.block,r=e.colorProfile,i=e.tags,s=e.valuesOnly,m=Object(o.a)(i,r);return u.a.createElement("span",{className:c()(D.a.tags,(t={},t[D.a.tagsBlock]=a,t))},m.map((function(e,t){return u.a.createElement(l.a,Object(n.a)({key:t,valueOnly:s},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,l,i,c=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,i=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==m(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(c.masks[t]||t||c.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",E=e[d+"Date"](),g=e[d+"Day"](),f=e[d+"Month"](),p=e[d+"FullYear"](),h=e[d+"Hours"](),b=e[d+"Minutes"](),v=e[d+"Seconds"](),F=e[d+"Milliseconds"](),y=a?0:e.getTimezoneOffset(),C=s(e),N=D(e),w={d:E,dd:o(E),ddd:c.i18n.dayNames[g],dddd:c.i18n.dayNames[g+7],m:f+1,mm:o(f+1),mmm:c.i18n.monthNames[f],mmmm:c.i18n.monthNames[f+12],yy:String(p).slice(2),yyyy:p,h:h%12||12,hh:o(h%12||12),H:h,HH:o(h),M:b,MM:o(b),s:v,ss:o(v),l:o(F,3),L:o(Math.round(F/10)),t:h<12?c.i18n.timeNames[0]:c.i18n.timeNames[1],tt:h<12?c.i18n.timeNames[2]:c.i18n.timeNames[3],T:h<12?c.i18n.timeNames[4]:c.i18n.timeNames[5],TT:h<12?c.i18n.timeNames[6]:c.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(l)||[""]).pop().replace(i,""),o:(y>0?"-":"+")+o(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][E%10>3?0:(E%100-E%10!=10)*E%10],W:C,N:N};return t.replace(u,(function(e){return e in w?w[e]:e.slice(1,e.length-1)}))});function o(e,t){for(e=String(e),t=t||2;e.length0}))}l&&v.test(l)&&(O=l.match(v)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return k.current&&(e=new i.a(k.current,{target:function(){return w.current}})),function(){e&&e.destroy()}}),[k.current,w.current]);var S=a&&a.replace(/language-/,"");!S&&s.defaultLanguage&&(S=s.defaultLanguage);var x=function(){window.getSelection().empty(),F(!0),setTimeout((function(){return F(!1)}),2e3)};return u.a.createElement(c.a,Object(n.a)({},c.b,{key:C,theme:M,code:t.trim(),language:S}),(function(e){var t,a,r=e.className,l=e.style,i=e.tokens,c=e.getLineProps,o=e.getTokenProps;return u.a.createElement(u.a.Fragment,null,O&&u.a.createElement("div",{style:l,className:h.a.codeBlockTitle},O),u.a.createElement("div",{className:h.a.codeBlockContent},u.a.createElement("button",{ref:k,type:"button","aria-label":"Copy code to clipboard",className:D()(h.a.copyButton,(t={},t[h.a.copyButtonWithTitle]=O,t)),onClick:x},p?"Copied":"Copy"),u.a.createElement("pre",{className:D()(r,h.a.codeBlock,(a={},a[h.a.codeBlockWithTitle]=O,a))},u.a.createElement("div",{ref:w,className:h.a.codeBlockLines,style:l},i.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=c({line:e,key:t});return _.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),u.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return u.a.createElement("span",Object(n.a)({key:t},o({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=a(268),i=a(297),c=a(278),o=a(141),s=a.n(o);t.a={code:function(e){var t=e.children;return"string"==typeof t?u.a.createElement(i.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?u.a.createElement("a",e):u.a.createElement(l.a,e)},pre:function(e){return u.a.createElement("div",Object(n.a)({className:s.a.mdxCodeBlock},e))},h1:Object(c.a)("h1"),h2:Object(c.a)("h2"),h3:Object(c.a)("h3"),h4:Object(c.a)("h4"),h5:Object(c.a)("h5"),h6:Object(c.a)("h6")}},316:function(e,t,a){"use strict";a(330);var n=a(8),r=a(81),u=a(10),l=/./.toString,i=function(e){a(15)(RegExp.prototype,"toString",e,!0)};a(13)((function(){return"/a/b"!=l.call({source:"a",flags:"b"})}))?i((function(){var e=n(this);return"/".concat(e.source,"/","flags"in e?e.flags:!u&&e instanceof RegExp?r.call(e):void 0)})):"toString"!=l.name&&i((function(){return l.call(this)}))},317:function(e,t,a){e.exports=a(331)},328:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(266),l=a.n(u);t.a=function(e){var t=e.github,a=e.inline,n=e.size,u=e.style,i=l()("panel","panel--button","panel--"+n,"panel--"+u,{"panel--button--inline":a});return r.a.createElement("div",{className:"row row--squished"},r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-twitter",title:"Twitter"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Follow @panjf2000"),r.a.createElement("div",{className:"panel--description"},"Get real-time updates!")))),0!=t&&r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-github"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Star panjf2000/gnet"),r.a.createElement("div",{className:"panel--description"},"Star the repo to support us.")))))}},329:function(e,t,a){"use strict";a(274),a(316),a(19);var n=a(0),r=a.n(n),u=a(292),l=a(268),i=(a(299),a(265),a(293)),c=a(266),o=a.n(c),s=a(294),D=a.n(s),m=a(275),d=a(317),E=a.n(d);t.a=function(e){var t=e.children,a=e.frontMatter,n=e.metadata,c=(e.truncated,e.isBlogPostPage,n.date),s=n.description,d=n.permalink,g=n.tags,f=a.author_github,p=a.title,h=E()(t.toString()),b=new Date(Date.parse(c)),v=Object(m.a)(g,"blog").find((function(e){return"domain"==e.category})),F=v?v.value:null;return r.a.createElement(l.a,{to:d+"/",className:o()("panel","domain-bg","domain-bg--hover","domain-bg--"+F)},r.a.createElement("article",null,r.a.createElement("h2",null,p),r.a.createElement("div",{className:"subtitle"},s),r.a.createElement(u.a,{github:f,size:"sm",subTitle:r.a.createElement(r.a.Fragment,null,r.a.createElement("time",{pubdate:"pubdate",dateTime:b.toISOString()},D()(b,"mmm dS, yyyy"))," / ",h.text),rel:"author"}),r.a.createElement(i.a,{colorProfile:"blog",tags:g})))}},330:function(e,t,a){a(10)&&"g"!=/./g.flags&&a(24).f(RegExp.prototype,"flags",{configurable:!0,get:a(81)})},331:function(e,t,a){"use strict";function n(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}e.exports=function(e,t){var a,r,u=0,l=0,i=e.length-1;for((t=t||{}).wordsPerMinute=t.wordsPerMinute||200,a=t.wordBound||n;a(e[l]);)l++;for(;a(e[i]);)i--;for(r=l;r<=i;){for(;r<=i&&!a(e[r]);r++);for(u++;r<=i&&a(e[r]);r++);}var c=u/t.wordsPerMinute,o=60*c*1e3;return{text:Math.ceil(c.toFixed(2))+" min read",minutes:c,time:o,words:u}}},332:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return u}));var n=a(267);function r(){var e=Object(n.a)().siteConfig,t=(void 0===e?{}:e).customFields.metadata.latest_post,a=Date.parse(t.date),r=new Date,u=Math.abs(r-a),l=Math.ceil(u/864e5),i=null;return"undefined"!=typeof window&&(i=new Date(parseInt(window.localStorage.getItem("blogViewedAt")||"0"))),l<30&&(!i||i=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),s=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},D=function(e){var t=s(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,u=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),D=s(a),d=n,E=D["".concat(l,".").concat(d)]||D[d]||m[d]||u;return a?r.a.createElement(E,i({ref:t},o,{components:a})):r.a.createElement(E,i({ref:t},o))}));function E(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var u=a.length,l=new Array(u);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:n,l[1]=i;for(var o=2;o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(D.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(B,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(o||u)&&r.a.createElement("div",{className:"text--center"},o&&o.src&&r.a.createElement("div",{className:"margin-bottom--sm"},o.href?r.a.createElement("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement(L,{alt:o.alt,url:s})):r.a.createElement(L,{alt:o.alt,url:s}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:x.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},I=a(290),R=a(291),z=a(3);a(135);t.a=function(e){var t=Object(E.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,i=(a.tagline,a.title),c=a.themeConfig.image,o=a.url,s=e.children,D=e.title,m=e.noFooter,d=e.description,g=e.image,f=e.keywords,p=(e.permalink,e.version),h=D?D+" | "+i:i,b=g||c,v=o+Object(C.a)(b),F=Object(C.a)(n),y=Object(z.h)(),N=y?"https://gnet.host"+(y.pathname.endsWith("/")?y.pathname:y.pathname+"/"):null;return r.a.createElement(R.a,null,r.a.createElement(I.a,null,r.a.createElement(l.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),h&&r.a.createElement("title",null,h),h&&r.a.createElement("meta",{property:"og:title",content:h}),n&&r.a.createElement("link",{rel:"shortcut icon",href:F}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),p&&r.a.createElement("meta",{name:"docsearch:version",content:p}),f&&f.length&&r.a.createElement("meta",{name:"keywords",content:f.join(",")}),b&&r.a.createElement("meta",{property:"og:image",content:v}),b&&r.a.createElement("meta",{property:"twitter:image",content:v}),b&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+h}),b&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),b&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),N&&r.a.createElement("meta",{property:"og:url",content:N}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),N&&r.a.createElement("link",{rel:"canonical",href:N})),r.a.createElement(u.a,null),r.a.createElement(A,null),r.a.createElement("div",{className:"main-wrapper"},s),!m&&r.a.createElement(H,null)))}},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},279:function(e,t,a){var n=a(288);e.exports=i;var r=Object.hasOwnProperty,u=/\s/g,l=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function i(){if(!(this instanceof i))return new i;this.reset()}function c(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(l,"").replace(n(),"").replace(u,"-"))}i.prototype.slug=function(e,t){for(var a=c(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},i.prototype.reset=function(){this.occurrences=Object.create(null)},i.slug=c},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),l=a(266),i=a.n(l);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,l=e.style,c=e.value,o=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:i()("badge","badge--rounded","badge--"+l)},o?c:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),l=a.n(u),i=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,c=e.nameSuffix,o=e.rel,s=e.size,D=e.subTitle,m=e.vertical,d=Object(i.a)().siteConfig,E=(void 0===d?{}:d).customFields.metadata.team,g=E.find((function(e){return e.github==u}))||E.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:l()("avatar",n,(t={},t["avatar--"+s]=s,t["avatar--vertical"]=m,t))},r.a.createElement("img",{className:l()("avatar__photo","avatar__photo--"+s),src:g.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:g.github,target:"_blank",rel:o},g.name),c),D&&r.a.createElement("small",{className:"avatar__subtitle"},D),!D&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:g.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=(a(268),a(287)),i=a(266),c=a.n(i),o=a(275),s=a(138),D=a.n(s);t.a=function(e){var t,a=e.block,r=e.colorProfile,i=e.tags,s=e.valuesOnly,m=Object(o.a)(i,r);return u.a.createElement("span",{className:c()(D.a.tags,(t={},t[D.a.tagsBlock]=a,t))},m.map((function(e,t){return u.a.createElement(l.a,Object(n.a)({key:t,valueOnly:s},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,l,i,c=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,i=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==m(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(c.masks[t]||t||c.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",E=e[d+"Date"](),g=e[d+"Day"](),f=e[d+"Month"](),p=e[d+"FullYear"](),h=e[d+"Hours"](),b=e[d+"Minutes"](),v=e[d+"Seconds"](),F=e[d+"Milliseconds"](),y=a?0:e.getTimezoneOffset(),C=s(e),N=D(e),w={d:E,dd:o(E),ddd:c.i18n.dayNames[g],dddd:c.i18n.dayNames[g+7],m:f+1,mm:o(f+1),mmm:c.i18n.monthNames[f],mmmm:c.i18n.monthNames[f+12],yy:String(p).slice(2),yyyy:p,h:h%12||12,hh:o(h%12||12),H:h,HH:o(h),M:b,MM:o(b),s:v,ss:o(v),l:o(F,3),L:o(Math.round(F/10)),t:h<12?c.i18n.timeNames[0]:c.i18n.timeNames[1],tt:h<12?c.i18n.timeNames[2]:c.i18n.timeNames[3],T:h<12?c.i18n.timeNames[4]:c.i18n.timeNames[5],TT:h<12?c.i18n.timeNames[6]:c.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(l)||[""]).pop().replace(i,""),o:(y>0?"-":"+")+o(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][E%10>3?0:(E%100-E%10!=10)*E%10],W:C,N:N};return t.replace(u,(function(e){return e in w?w[e]:e.slice(1,e.length-1)}))});function o(e,t){for(e=String(e),t=t||2;e.length0}))}l&&v.test(l)&&(O=l.match(v)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return k.current&&(e=new i.a(k.current,{target:function(){return w.current}})),function(){e&&e.destroy()}}),[k.current,w.current]);var S=a&&a.replace(/language-/,"");!S&&s.defaultLanguage&&(S=s.defaultLanguage);var x=function(){window.getSelection().empty(),F(!0),setTimeout((function(){return F(!1)}),2e3)};return u.a.createElement(c.a,Object(n.a)({},c.b,{key:C,theme:M,code:t.trim(),language:S}),(function(e){var t,a,r=e.className,l=e.style,i=e.tokens,c=e.getLineProps,o=e.getTokenProps;return u.a.createElement(u.a.Fragment,null,O&&u.a.createElement("div",{style:l,className:h.a.codeBlockTitle},O),u.a.createElement("div",{className:h.a.codeBlockContent},u.a.createElement("button",{ref:k,type:"button","aria-label":"Copy code to clipboard",className:D()(h.a.copyButton,(t={},t[h.a.copyButtonWithTitle]=O,t)),onClick:x},p?"Copied":"Copy"),u.a.createElement("pre",{className:D()(r,h.a.codeBlock,(a={},a[h.a.codeBlockWithTitle]=O,a))},u.a.createElement("div",{ref:w,className:h.a.codeBlockLines,style:l},i.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=c({line:e,key:t});return _.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),u.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return u.a.createElement("span",Object(n.a)({key:t},o({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=a(268),i=a(297),c=a(278),o=a(141),s=a.n(o);t.a={code:function(e){var t=e.children;return"string"==typeof t?u.a.createElement(i.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?u.a.createElement("a",e):u.a.createElement(l.a,e)},pre:function(e){return u.a.createElement("div",Object(n.a)({className:s.a.mdxCodeBlock},e))},h1:Object(c.a)("h1"),h2:Object(c.a)("h2"),h3:Object(c.a)("h3"),h4:Object(c.a)("h4"),h5:Object(c.a)("h5"),h6:Object(c.a)("h6")}},316:function(e,t,a){"use strict";a(330);var n=a(8),r=a(81),u=a(10),l=/./.toString,i=function(e){a(15)(RegExp.prototype,"toString",e,!0)};a(13)((function(){return"/a/b"!=l.call({source:"a",flags:"b"})}))?i((function(){var e=n(this);return"/".concat(e.source,"/","flags"in e?e.flags:!u&&e instanceof RegExp?r.call(e):void 0)})):"toString"!=l.name&&i((function(){return l.call(this)}))},317:function(e,t,a){e.exports=a(331)},328:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(266),l=a.n(u);t.a=function(e){var t=e.github,a=e.inline,n=e.size,u=e.style,i=l()("panel","panel--button","panel--"+n,"panel--"+u,{"panel--button--inline":a});return r.a.createElement("div",{className:"row row--squished"},r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-twitter",title:"Twitter"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Follow @panjf2000"),r.a.createElement("div",{className:"panel--description"},"Get real-time updates!")))),0!=t&&r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-github"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Star panjf2000/gnet"),r.a.createElement("div",{className:"panel--description"},"Star the repo to support us.")))))}},329:function(e,t,a){"use strict";a(274),a(316),a(19);var n=a(0),r=a.n(n),u=a(292),l=a(268),i=(a(299),a(265),a(293)),c=a(266),o=a.n(c),s=a(294),D=a.n(s),m=a(275),d=a(317),E=a.n(d);t.a=function(e){var t=e.children,a=e.frontMatter,n=e.metadata,c=(e.truncated,e.isBlogPostPage,n.date),s=n.description,d=n.permalink,g=n.tags,f=a.author_github,p=a.title,h=E()(t.toString()),b=new Date(Date.parse(c)),v=Object(m.a)(g,"blog").find((function(e){return"domain"==e.category})),F=v?v.value:null;return r.a.createElement(l.a,{to:d+"/",className:o()("panel","domain-bg","domain-bg--hover","domain-bg--"+F)},r.a.createElement("article",null,r.a.createElement("h2",null,p),r.a.createElement("div",{className:"subtitle"},s),r.a.createElement(u.a,{github:f,size:"sm",subTitle:r.a.createElement(r.a.Fragment,null,r.a.createElement("time",{pubdate:"pubdate",dateTime:b.toISOString()},D()(b,"mmm dS, yyyy"))," / ",h.text),rel:"author"}),r.a.createElement(i.a,{colorProfile:"blog",tags:g})))}},330:function(e,t,a){a(10)&&"g"!=/./g.flags&&a(24).f(RegExp.prototype,"flags",{configurable:!0,get:a(81)})},331:function(e,t,a){"use strict";function n(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}e.exports=function(e,t){var a,r,u=0,l=0,i=e.length-1;for((t=t||{}).wordsPerMinute=t.wordsPerMinute||200,a=t.wordBound||n;a(e[l]);)l++;for(;a(e[i]);)i--;for(r=l;r<=i;){for(;r<=i&&!a(e[r]);r++);for(u++;r<=i&&a(e[r]);r++);}var c=u/t.wordsPerMinute,o=60*c*1e3;return{text:Math.ceil(c.toFixed(2))+" min read",minutes:c,time:o,words:u}}},332:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return u}));var n=a(267);function r(){var e=Object(n.a)().siteConfig,t=(void 0===e?{}:e).customFields.metadata.latest_post,a=Date.parse(t.date),r=new Date,u=Math.abs(r-a),l=Math.ceil(u/864e5),i=null;return"undefined"!=typeof window&&(i=new Date(parseInt(window.localStorage.getItem("blogViewedAt")||"0"))),l<30&&(!i||i=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},s=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(n),m=r,f=s["".concat(i,".").concat(m)]||s[m]||d[m]||a;return n?o.a.createElement(f,c({ref:t},l,{components:n})):o.a.createElement(f,c({ref:t},l))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},s=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(n),m=r,f=s["".concat(i,".").concat(m)]||s[m]||d[m]||a;return n?o.a.createElement(f,c({ref:t},l,{components:n})):o.a.createElement(f,c({ref:t},l))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),p=function(e){var t=a.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},f=function(e){var t=p(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(n),g=r,m=f["".concat(i,".").concat(g)]||f[g]||u[g]||o;return n?a.a.createElement(m,c({ref:t},s,{components:n})):a.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.a.createContext({}),p=function(e){var t=a.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},f=function(e){var t=p(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(n),g=r,m=f["".concat(i,".").concat(g)]||f[g]||u[g]||o;return n?a.a.createElement(m,c({ref:t},s,{components:n})):a.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s=0||(b[a]=e[a]);return b}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(c=0;c=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(b[a]=e[a])}return b}var m=b.a.createContext({}),o=function(e){var t=b.a.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},l=function(e){var t=o(e.components);return b.a.createElement(m.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return b.a.createElement(b.a.Fragment,{},t)}},d=Object(c.forwardRef)((function(e,t){var a=e.components,c=e.mdxType,n=e.originalType,r=e.parentName,m=f(e,["components","mdxType","originalType","parentName"]),l=o(a),d=c,h=l["".concat(r,".").concat(d)]||l[d]||p[d]||n;return a?b.a.createElement(h,i({ref:t},m,{components:a})):b.a.createElement(h,i({ref:t},m))}));function h(e,t){var a=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var n=a.length,r=new Array(n);r[0]=d;var i={};for(var f in t)hasOwnProperty.call(t,f)&&(i[f]=t[f]);i.originalType=e,i.mdxType="string"==typeof e?e:c,r[1]=i;for(var m=2;m=0||(b[a]=e[a]);return b}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(c=0;c=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(b[a]=e[a])}return b}var m=b.a.createContext({}),o=function(e){var t=b.a.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},l=function(e){var t=o(e.components);return b.a.createElement(m.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return b.a.createElement(b.a.Fragment,{},t)}},d=Object(c.forwardRef)((function(e,t){var a=e.components,c=e.mdxType,n=e.originalType,r=e.parentName,m=f(e,["components","mdxType","originalType","parentName"]),l=o(a),d=c,h=l["".concat(r,".").concat(d)]||l[d]||p[d]||n;return a?b.a.createElement(h,i({ref:t},m,{components:a})):b.a.createElement(h,i({ref:t},m))}));function h(e,t){var a=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var n=a.length,r=new Array(n);r[0]=d;var i={};for(var f in t)hasOwnProperty.call(t,f)&&(i[f]=t[f]);i.originalType=e,i.mdxType="string"==typeof e?e:c,r[1]=i;for(var m=2;m=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(c=0;c=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=n.a.createContext({}),f=function(e){var t=n.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},m=function(e){var t=f(e.components);return n.a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},d=Object(c.forwardRef)((function(e,t){var a=e.components,c=e.mdxType,b=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),m=f(a),d=c,s=m["".concat(r,".").concat(d)]||m[d]||p[d]||b;return a?n.a.createElement(s,i({ref:t},l,{components:a})):n.a.createElement(s,i({ref:t},l))}));function s(e,t){var a=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var b=a.length,r=new Array(b);r[0]=d;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:c,r[1]=i;for(var l=2;l=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(c=0;c=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=n.a.createContext({}),f=function(e){var t=n.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},m=function(e){var t=f(e.components);return n.a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},d=Object(c.forwardRef)((function(e,t){var a=e.components,c=e.mdxType,b=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),m=f(a),d=c,s=m["".concat(r,".").concat(d)]||m[d]||p[d]||b;return a?n.a.createElement(s,i({ref:t},l,{components:a})):n.a.createElement(s,i({ref:t},l))}));function s(e,t){var a=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var b=a.length,r=new Array(b);r[0]=d;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:c,r[1]=i;for(var l=2;l=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},f=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),f=s(r),m=n,g=f["".concat(i,".").concat(m)]||f[m]||u[m]||o;return r?a.a.createElement(g,c({ref:t},p,{components:r})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var p=2;p=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},f=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),f=s(r),m=n,g=f["".concat(i,".").concat(m)]||f[m]||u[m]||o;return r?a.a.createElement(g,c({ref:t},p,{components:r})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var p=2;p=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),s=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o({},t,{},e)),a},p=function(e){var t=s(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,c=e.originalType,i=e.parentName,l=b(e,["components","mdxType","originalType","parentName"]),p=s(a),m=n,u=p["".concat(i,".").concat(m)]||p[m]||f[m]||c;return a?r.a.createElement(u,o({ref:t},l,{components:a})):r.a.createElement(u,o({ref:t},l))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=a.length,i=new Array(c);i[0]=m;var o={};for(var b in t)hasOwnProperty.call(t,b)&&(o[b]=t[b]);o.originalType=e,o.mdxType="string"==typeof e?e:n,i[1]=o;for(var l=2;l=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),s=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o({},t,{},e)),a},p=function(e){var t=s(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,c=e.originalType,i=e.parentName,l=b(e,["components","mdxType","originalType","parentName"]),p=s(a),m=n,u=p["".concat(i,".").concat(m)]||p[m]||f[m]||c;return a?r.a.createElement(u,o({ref:t},l,{components:a})):r.a.createElement(u,o({ref:t},l))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=a.length,i=new Array(c);i[0]=m;var o={};for(var b in t)hasOwnProperty.call(t,b)&&(o[b]=t[b]);o.originalType=e,o.mdxType="string"==typeof e?e:n,i[1]=o;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),f=r,m=u["".concat(i,".").concat(f)]||u[f]||b[f]||o;return n?a.a.createElement(m,c({ref:t},p,{components:n})):a.a.createElement(m,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),f=r,m=u["".concat(i,".").concat(f)]||u[f]||b[f]||o;return n?a.a.createElement(m,c({ref:t},p,{components:n})):a.a.createElement(m,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ / 4 min read

官宣 gnet v1.0.0

最快的 Go 网络框架 gnet 来啦!

今天,gnet v1.0.0 正式版本发布,享受这个高性能的网络框架吧!

gnet

📖 简介

gnet 是一个基于事件驱动的高性能和轻量级网络框架。它直接使用 epollkqueue 系统调用而非标准 Go 网络包:net 来构建网络应用,它的工作原理类似两个开源的网络库:nettylibuv,这也使得 gnet 达到了一个远超 Go net 的性能表现。

gnet 设计开发的初衷不是为了取代 Go 的标准网络库:net,而是为了创造出一个类似于 RedisHaproxy 能高效处理网络包的 Go 语言网络服务器框架。

gnet 的卖点在于它是一个高性能、轻量级、非阻塞的纯 Go 实现的传输层(TCP/UDP/Unix Domain Socket)网络框架,开发者可以使用 gnet 来实现自己的应用层网络协议(HTTP、RPC、Redis、WebSocket 等等),从而构建出自己的应用层网络应用:比如在 gnet 上实现 HTTP 协议就可以创建出一个 HTTP 服务器 或者 Web 开发框架,实现 Redis 协议就可以创建出自己的 Redis 服务器等等。

gnet 衍生自另一个项目:evio,但拥有更丰富的功能特性,且性能远胜之。

🚀 功能

  • 高性能 的基于多线程/Go程网络模型的 event-loop 事件驱动
  • 内置 Round-Robin 轮询负载均衡算法
  • 内置 goroutine 池,由开源库 ants 提供支持
  • 内置 bytes 内存池,由开源库 bytebufferpool 提供支持
  • 简洁的 APIs
  • 基于 Ring-Buffer 的高效内存利用
  • 支持多种网络协议/IPC 机制:TCP、UDP 和 Unix Domain Socket
  • 支持两种事件驱动机制:Linux 里的 epoll 以及 FreeBSD 里的 kqueue
  • 支持异步写操作
  • 灵活的事件定时器
  • SO_REUSEPORT 端口重用
  • 内置多种编解码器,支持对 TCP 数据流分包:LineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec 和 LengthFieldBasedFrameCodec,参考自 netty codec,而且支持自定制编解码器
  • 支持 Windows 平台,基于 IOCP 事件驱动机制 Go 标准网络库
  • 加入更多的负载均衡算法:随机、最少连接、一致性哈希等等
  • 支持 TLS
  • 实现 gnet 客户端

💡 核心设计

多线程/Go程网络模型

主从多 Reactors

gnet 重新设计开发了一个新内置的多线程/Go程网络模型:『主从多 Reactors』,这也是 netty 默认的多线程网络模型,下面是这个模型的原理图:

multi_reactor

它的运行流程如下面的时序图:

reactor

主从多 Reactors + 线程/Go程池

你可能会问一个问题:如果我的业务逻辑是阻塞的,那么在 EventHandler.React 注册方法里的逻辑也会阻塞,从而导致阻塞 event-loop 线程,这时候怎么办?

正如你所知,基于 gnet 编写你的网络服务器有一条最重要的原则:永远不能让你业务逻辑(一般写在 EventHandler.React 里)阻塞 event-loop 线程,这也是 netty 的一条最重要的原则,否则的话将会极大地降低服务器的吞吐量。

我的回答是,基于gnet 的另一种多线程/Go程网络模型:『带线程/Go程池的主从多 Reactors』可以解决阻塞问题,这个新网络模型通过引入一个 worker pool 来解决业务逻辑阻塞的问题:它会在启动的时候初始化一个 worker pool,然后在把 EventHandler.React里面的阻塞代码放到 worker pool 里执行,从而避免阻塞 event-loop 线程。

模型的架构图如下所示:

multi_reactor_thread_pool

它的运行流程如下面的时序图:

multi-reactors

gnet 通过利用 ants goroutine 池(一个基于 Go 开发的高性能的 goroutine 池 ,实现了对大规模 goroutines 的调度管理、goroutines 复用)来实现『主从多 Reactors + 线程/Go程池』网络模型。关于 ants 的全部功能和使用,可以在 ants 文档 里找到。

gnet 内部集成了 ants 以及提供了 pool.goroutine.Default() 方法来初始化一个 ants goroutine 池,然后你可以把 EventHandler.React 中阻塞的业务逻辑提交到 goroutine 池里执行,最后在 goroutine 池里的代码调用 gnet.Conn.AsyncWrite([]byte) 方法把处理完阻塞逻辑之后得到的输出数据异步写回客户端,这样就可以避免阻塞 event-loop 线程。

有关在 gnet 里使用 ants goroutine 池的细节可以到这里进一步了解。

可重用且自动扩容的 Ring-Buffer

gnet 内置了inbound 和 outbound 两个 buffers,基于 Ring-Buffer 原理实现,分别用来缓冲输入输出的网络数据以及管理内存,gnet 里面的 ring buffer 能够重用内存以及按需扩容。

对于 TCP 协议的流数据,使用 gnet 不需要业务方为了解析应用层协议而自己维护和管理 buffers,gnet 会替业务方完成缓冲和管理网络数据的任务,降低业务代码的复杂性以及降低开发者的心智负担,使得开发者能够专注于业务逻辑而非一些底层实现。

Like What You See?

- + - + - + - + - + - + diff --git a/blog/announcing-gnet-v1/index.html b/blog/announcing-gnet-v1/index.html index 511bf7cee..6cc3758f8 100644 --- a/blog/announcing-gnet-v1/index.html +++ b/blog/announcing-gnet-v1/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ / 7 min read

Announcing gnet v1.0.0

Hello World! We present you, gnet!

Today, we are release gnet v1.0.0, enjoy this ultra-fast framework of networking!

gnet

📖 Introduction

gnet is an event-driven networking framework that is fast and lightweight. It makes direct epoll and kqueue syscalls rather than using the standard Go net package and works in a similar manner as netty and libuv, which makes gnet achieve a much higher performance than Go net.

gnet is not designed to displace the standard Go net package, but to create a networking server framework for Go that performs on par with Redis and Haproxy for networking packets handling.

gnet sells itself as a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go which works on transport layer with TCP/UDP protocols and Unix Domain Socket , so it allows developers to implement their own protocols(HTTP, RPC, WebSocket, Redis, etc.) of application layer upon gnet for building diversified network applications, for instance, you get an HTTP Server or Web Framework if you implement HTTP protocol upon gnet while you have a Redis Server done with the implementation of Redis protocol upon gnet and so on.

gnet derives from the project: evio while having a much higher performance and more features.

🚀 Features

  • High-performance event-loop under networking model of multiple threads/goroutines
  • Built-in load balancing algorithm: Round-Robin
  • Built-in goroutine pool powered by the library ants
  • Built-in memory pool with bytes powered by the library bytebufferpool
  • Concise APIs
  • Efficient memory usage: Ring-Buffer
  • Supporting multiple protocols/IPC mechanism: TCP, UDP and Unix Domain Socket
  • Supporting two event-driven mechanisms: epoll on Linux and kqueue on FreeBSD
  • Supporting asynchronous write operation
  • Flexible ticker event
  • SO_REUSEPORT socket option
  • Built-in multiple codecs to encode/decode network frames into/from TCP stream: LineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec and LengthFieldBasedFrameCodec, referencing netty codec, also supporting customized codecs
  • Supporting Windows platform with event-driven mechanism of IOCP Go stdlib: net
  • Additional load-balancing algorithms: Random, Least-Connections, Consistent-hashing and so on
  • TLS support
  • Implementation of gnet Client

💡 Key Designs

Networking Model of Multiple Threads/Goroutines

Multiple Reactors

gnet redesigns and implements a new built-in networking model of multiple threads/goroutines: 『multiple reactors』 which is also the default networking model of multiple threads in netty, Here's the schematic diagram:

multi_reactor

and it works as the following sequence diagram:

reactor

Multiple Reactors + Goroutine Pool

You may ask me a question: what if my business logic in EventHandler.React contains some blocking code which leads to blocking in event-loop of gnet, what is the solution for this kind of situation?

As you know, there is a most important tenet when writing code under gnet: you should never block the event-loop goroutine in the EventHandler.React, which is also the most important tenet in netty, otherwise, it will result in a low throughput in your gnet server.

And the solution to that could be found in the subsequent networking model of multiple threads/goroutines in gnet: 『multiple reactors with thread/goroutine pool』which pulls you out from the blocking mire, it will construct a worker-pool with fixed capacity and put those blocking jobs in EventHandler.React into the worker-pool to make the event-loop goroutines non-blocking.

The networking model:『multiple reactors with thread/goroutine pool』dissolves the blocking jobs by introducing a goroutine pool, as shown below:

multi_reactor_thread_pool

and it works as the following sequence diagram:

multi-reactors

gnet implements the networking model:『multiple reactors with thread/goroutine pool』by the aid of a high-performance goroutine pool called ants that allows you to manage and recycle a massive number of goroutines in your concurrent programs, the full features and usages in ants are documented here.

gnet integrates ants and provides the pool.goroutine.Default() method that you can call to instantiate a ants pool where you are able to put your blocking code logic and call the function gnet.Conn.AsyncWrite([]byte) to send out data asynchronously after you finish the blocking process and get the output data, which makes the goroutine of event-loop non-blocking.

The details about integrating gnet with ants are shown here.

Reusable and auto-scaling Ring Buffer

There are two ring-buffers inside gnet: inbound buffer and outbound buffer to buffer and manage inbound/outbound network data, ring-buffer inside gnet is designed and tuned to reuse memory and be auto-scaling on demand.

The purpose of implementing inbound and outbound ring-buffers in gnet is to transfer the logic of buffering and managing network data based on application protocol upon TCP stream from business server to framework and unify the network data buffer, which minimizes the complexity of business code so that developers are able to concentrate on business logic instead of the underlying implementation.

Like What You See?

- + - + - + - + - + - + diff --git a/blog/announcing-gnet-v2-3-0/index.html b/blog/announcing-gnet-v2-3-0/index.html index c52bf80f3..f3fb62e3b 100644 --- a/blog/announcing-gnet-v2-3-0/index.html +++ b/blog/announcing-gnet-v2-3-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -44,21 +44,21 @@
│ old │ new │
│ allocs/op │ allocs/op vs base │
GC4El100k/Run-4-eventloop-100000-10 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
GC4El200k/Run-4-eventloop-200000-10 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
GC4El500k/Run-4-eventloop-500000-10 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
geomean ² +0.00% ²
¹ all samples are equal
² summaries must be >0 to compute geomean

The more connections there are, the more pronounced the effect.

While we have performed sufficient testing on matrix, we are still using map as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case matrix has any unexpected bugs, you can quickly fall back to the default map. We will consider promoting matrix to be the default storage for connections in a subsequent official release.

Another significant leap is #461, you can now run gnet on Windows, it should be noted that the Windows version of gnet is intended for development purposes and is not recommended for use in production.

Visit the release notes for more details.

Like What You See?

- + - + - + - + - + - + diff --git a/blog/announcing-gnet-v2-5-0/index.html b/blog/announcing-gnet-v2-5-0/index.html index e972c5eb2..bc4e30a58 100644 --- a/blog/announcing-gnet-v2-5-0/index.html +++ b/blog/announcing-gnet-v2-5-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ / 2 min read

Announcing gnet v2.5.0

Hello World! We present you, gnet v2.5.0!

The v2.5.0 for gnet is officially released!

The two major updates in this release are feat: support edge-triggered I/O and feat: support multiple network addresses binding.

Intro

In #576, gnet implemented edge-triggered I/O on the basis of EPOLLET in epoll and EV_CLEAR in kqueue. Before v2.5.0, gnet had been using level-triggered I/O under the hood, now developers are able to switch to edge-triggered I/O via the functional option: EdgeTriggeredIO when developing and deploying gnet services. In certain specific scenarios, edge-triggered I/O may outperform level-triggered I/O, as a result of which, switching gnet from LT mode to ET mode can lead to significant performance improvements. But note that this performance boost is only a theoretical inference and may only occur under specific circumstances. Therefore, please use ET mode with caution and conduct benchmark tests to collect sufficient numbers before the deployment in production.

Another useful new feature is #578, with which developers are allowed to bind multiple addresses(IP:Port) in one gnet instance. This feature makes it possible to build and run a gnet server that serves various protocols or a specific set of backend services.

In addition to these two major features, we've also made a good deal of code optimizations: refactoring and streamlining the core code, as well as optimising the structure.

Visit the release notes for more details.

P.S. Follow me on Twitter @panjf2000 to get the latest updates about gnet!

Like What You See?

- + - + - + - + - + - + diff --git a/blog/announcing-gnet-v2-6-0/index.html b/blog/announcing-gnet-v2-6-0/index.html index 8a7e0c6ce..fba383cc8 100644 --- a/blog/announcing-gnet-v2-6-0/index.html +++ b/blog/announcing-gnet-v2-6-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ / 2 min read

Announcing gnet v2.6.0

Hello World! We present you, gnet v2.6.0!

The gnet v2.6.0 is officially released!

The two major updates in this release are feat: support configurable I/O chunk to drain at a time in edge-triggered mode and feat: support SO_BINDTODEVICE on Linux.

Intro

In gnet v2.5.0, we implemented edge-triggered I/O where the default chunk to read/write per event loop is 1MB and it's a constant value. However, in some scenarios, developers may want to adjust the chunk size to optimize the performance of their applications. In this release, we've added a new feature that allows developers to configure the I/O chunk size to drain/pump at a time in edge-triggered mode. This feature is especially useful for applications that require fine-tuning the I/O chunk size to achieve better performance.

Along with this new release comes another highlight: the support for SO_BINDTODEVICE on Linux. This feature allows developers to bind a gnet server to a specific network interface on a multi-homed host, which enables them to receive unicast packets only from that particular network interface and ignore packets from other interfaces. It is particularly useful for UDP servers that only want to process unicast packets from one interface while receiving broadcast packets.

Moreover, some critical bug fixes are included in this release, which further enhances the stability and reliability of gnet. Thus, we recommend all users to upgrade to the latest version to enjoy the new features and improvements. It should be noted that starting from this release, gnet will only support Go 1.20 or later versions.

For more details, please refer to the release notes.

P.S. Follow me on Twitter @panjf2000 to get the latest updates about gnet!

Like What You See?

- + - + - + - + - + - + diff --git a/blog/announcing-gnet-v2/index.html b/blog/announcing-gnet-v2/index.html index dbe027d27..4376c56b2 100644 --- a/blog/announcing-gnet-v2/index.html +++ b/blog/announcing-gnet-v2/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -50,21 +50,21 @@
Fortio dev running at 0 queries per second, 8->8 procs, for 15s: tcp://127.0.0.1:7002
Aggregated Function Time : count 6729707 avg 0.0022276692 +/- 0.00317 min 1.1902e-05 max 0.07715059 sum 14991.5608
# target 50% 0.00132464
# target 75% 0.00241054
# target 90% 0.00502497
# target 99% 0.016105
# target 99.9% 0.0291019
Sockets used: 1000 (for perfect no error run, would be 1000)
Total Bytes sent: 6892243968, received: 6892243968
tcp OK : 6729707 (100.0 %)
All done 6729707 calls (plus 1000 warmup) 2.228 ms avg, 448593.2 qps

The result shows that the performance of v2 is improved by about 16% compared to v1.x.

Note that this is only a rough benchmark test result and it is done with the simple protocol -- echo, besides, with the benefits from vectored I/O, the performance ought to achieve even higher when it comes to some more complex scenarios, later we will do a more comprehensive benchmark test to get some more accurate results.

Like What You See?

- + - + - + - + - + - + diff --git a/blog/index.html b/blog/index.html index afc2a8742..0444952fd 100644 --- a/blog/index.html +++ b/blog/index.html @@ -19,33 +19,33 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -54,33 +54,33 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/blog/tags/domain-presentation/index.html b/blog/tags/domain-presentation/index.html index e5c5979a5..a03338ed5 100644 --- a/blog/tags/domain-presentation/index.html +++ b/blog/tags/domain-presentation/index.html @@ -19,31 +19,31 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -52,31 +52,31 @@ - + - + - + - + - + - + - + - + - + - + - + diff --git "a/blog/tags/domain-\345\261\225\347\244\272/index.html" "b/blog/tags/domain-\345\261\225\347\244\272/index.html" index 927185866..9a48f86cd 100644 --- "a/blog/tags/domain-\345\261\225\347\244\272/index.html" +++ "b/blog/tags/domain-\345\261\225\347\244\272/index.html" @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/blog/tags/index.html b/blog/tags/index.html index c0fb59dc1..354ca48ba 100644 --- a/blog/tags/index.html +++ b/blog/tags/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -40,19 +40,19 @@ - + - + - + - + - + diff --git a/blog/tags/type-announcement/index.html b/blog/tags/type-announcement/index.html index 5c633a89f..cc1d4cbbb 100644 --- a/blog/tags/type-announcement/index.html +++ b/blog/tags/type-announcement/index.html @@ -19,31 +19,31 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -52,31 +52,31 @@ - + - + - + - + - + - + - + - + - + - + - + diff --git "a/blog/tags/type-\345\256\230\345\256\243/index.html" "b/blog/tags/type-\345\256\230\345\256\243/index.html" index 5e6d187c8..3596e8576 100644 --- "a/blog/tags/type-\345\256\230\345\256\243/index.html" +++ "b/blog/tags/type-\345\256\230\345\256\243/index.html" @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/acb23ddc.b4a526f2.js b/c2e91bb5.007e8595.js similarity index 99% rename from acb23ddc.b4a526f2.js rename to c2e91bb5.007e8595.js index a98e7dfbd..ddcc0b63b 100644 --- a/acb23ddc.b4a526f2.js +++ b/c2e91bb5.007e8595.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[82],{226:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return r})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return o})),n.d(t,"default",(function(){return p}));var a=n(1),b=n(9),i=(n(0),n(265)),r={id:"overview-cn",last_modified_on:"2024-03-04",title:"\u9884\u89c8",description:"\u5b8f\u89c2\u89d2\u5ea6\u9648\u8ff0 gnet \u6846\u67b6\u3002"},c={id:"about/overview-cn",title:"\u9884\u89c8",description:"\u5b8f\u89c2\u89d2\u5ea6\u9648\u8ff0 gnet \u6846\u67b6\u3002",source:"@site/docs/about/overview-cn.md",permalink:"/docs/about/overview-cn",editUrl:"https://github.com/panjf2000/gnet/edit/master/website/docs/about/overview-cn.md",sidebar:"docs",previous:{title:"Overview",permalink:"/docs/about/overview"},next:{title:"Quickstart",permalink:"/docs/quickstart"}},o=[{value:"gnet \u662f\u4ec0\u4e48?",id:"gnet-\u662f\u4ec0\u4e48",children:[]},{value:"\u529f\u80fd",id:"\u529f\u80fd",children:[]},{value:"\u67b6\u6784",id:"\u67b6\u6784",children:[{value:"\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b",id:"\u591a\u7ebf\u7a0bgo\u7a0b\u7f51\u7edc\u6a21\u578b",children:[]}]},{value:"\u5173\u952e\u8bbe\u8ba1",id:"\u5173\u952e\u8bbe\u8ba1",children:[{value:"\u5f39\u6027\u5185\u5b58 Buffer",id:"\u5f39\u6027\u5185\u5b58-buffer",children:[]}]}],l={rightToc:o};function p(e){var t=e.components,n=Object(b.a)(e,["components"]);return Object(i.b)("wrapper",Object(a.a)({},l,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h2",{id:"gnet-\u662f\u4ec0\u4e48"},"gnet \u662f\u4ec0\u4e48?"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u662f\u4e00\u4e2a\u57fa\u4e8e\u4e8b\u4ef6\u9a71\u52a8\u7684\u9ad8\u6027\u80fd\u548c\u8f7b\u91cf\u7ea7\u7f51\u7edc\u6846\u67b6\u3002\u8fd9\u4e2a\u6846\u67b6\u662f\u57fa\u4e8e ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Epoll"}),"epoll")," \u548c ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Kqueue"}),"kqueue")," \u4ece\u96f6\u5f00\u53d1\u7684\uff0c\u800c\u4e14\u76f8\u6bd4 Go ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net"),"\uff0c\u5b83\u80fd\u4ee5\u66f4\u4f4e\u7684\u5185\u5b58\u5360\u7528\u5b9e\u73b0\u66f4\u9ad8\u7684\u6027\u80fd\u3002"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u548c ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," \u6709\u7740\u4e0d\u4e00\u6837\u7684\u7f51\u7edc\u7f16\u7a0b\u6a21\u5f0f\u3002\u56e0\u6b64\uff0c\u7528 ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u5f00\u53d1\u7f51\u7edc\u5e94\u7528\u548c\u7528 ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," \u5f00\u53d1\u533a\u522b\u5f88\u5927\uff0c\u800c\u4e14\u4e24\u8005\u4e4b\u95f4\u4e0d\u53ef\u8c03\u548c\u3002\u793e\u533a\u91cc\u6709\u5176\u4ed6\u540c\u7c7b\u7684\u4ea7\u54c1\u50cf\u662f ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/libevent/libevent"}),"libevent"),", ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/libuv/libuv"}),"libuv"),", ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/netty/netty"}),"netty"),", ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/twisted/twisted"}),"twisted"),", ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/tornadoweb/tornado"}),"tornado"),"\uff0c",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u5e95\u5c42\u5de5\u4f5c\u539f\u7406\u548c\u8fd9\u4e9b\u6846\u67b6\u975e\u5e38\u7c7b\u4f3c\u3002"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u4e0d\u662f\u4e3a\u4e86\u53d6\u4ee3 ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," \u800c\u751f\u7684\uff0c\u800c\u662f\u5728 Go \u751f\u6001\u4e2d\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e00\u4e2a\u5f00\u53d1\u6027\u80fd\u654f\u611f\u7684\u7f51\u7edc\u670d\u52a1\u7684\u66ff\u4ee3\u54c1\u3002\u4e5f\u6b63\u56e0\u5982\u6b64\uff0c",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u5728\u529f\u80fd\u4e0a\u7684\u5168\u9762\u6027\u5e76\u4e0d\u5982 Go ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net"),"\uff0c\u5b83\u53ea\u4f1a\u63d0\u4f9b\u7f51\u7edc\u5e94\u7528\u6240\u9700\u7684\u6700\u6838\u5fc3\u7684\u529f\u80fd\u548c\u6700\u7cbe\u7b80\u7684 APIs\uff0c\u800c\u4e14 ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u4e5f\u5e76\u6ca1\u6709\u6253\u7b97\u53d8\u6210\u4e00\u4e2a\u65e0\u6240\u4e0d\u5305\u7684\u7f51\u7edc\u6846\u67b6\uff0c\u56e0\u4e3a\u6211\u89c9\u5f97 Go ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," \u5728\u8fd9\u65b9\u9762\u5df2\u7ecf\u505a\u5f97\u8db3\u591f\u597d\u4e86\u3002"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u5356\u70b9\u5728\u4e8e\u5b83\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u3001\u8f7b\u91cf\u7ea7\u3001\u975e\u963b\u585e\u7684\u7eaf Go \u8bed\u8a00\u5b9e\u73b0\u7684\u4f20\u8f93\u5c42\uff08TCP/UDP/Unix Domain Socket\uff09\u7f51\u7edc\u6846\u67b6\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528 ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u6765\u5b9e\u73b0\u81ea\u5df1\u7684\u5e94\u7528\u5c42\u7f51\u7edc\u534f\u8bae(HTTP\u3001RPC\u3001Redis\u3001WebSocket \u7b49\u7b49)\uff0c\u4ece\u800c\u6784\u5efa\u51fa\u81ea\u5df1\u7684\u5e94\u7528\u5c42\u7f51\u7edc\u670d\u52a1\u3002\u6bd4\u5982\u5728 ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u4e0a\u5b9e\u73b0 HTTP \u534f\u8bae\u5c31\u53ef\u4ee5\u521b\u5efa\u51fa\u4e00\u4e2a HTTP \u670d\u52a1\u5668 \u6216\u8005 Web \u5f00\u53d1\u6846\u67b6\uff0c\u5b9e\u73b0 Redis \u534f\u8bae\u5c31\u53ef\u4ee5\u521b\u5efa\u51fa\u81ea\u5df1\u7684 Redis \u670d\u52a1\u5668\u7b49\u7b49\u3002"),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},Object(i.b)("inlineCode",{parentName:"strong"},"gnet")," \u884d\u751f\u81ea\u53e6\u4e00\u4e2a\u9879\u76ee\uff1a",Object(i.b)("inlineCode",{parentName:"strong"},"evio"),"\uff0c\u4f46\u62e5\u6709\u66f4\u4e30\u5bcc\u7684\u529f\u80fd\u7279\u6027\uff0c\u4e14\u6027\u80fd\u8fdc\u80dc\u4e4b\u3002")),Object(i.b)("h2",{id:"\u529f\u80fd"},"\u529f\u80fd"),Object(i.b)("ul",{className:"contains-task-list"},Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u57fa\u4e8e\u591a\u7ebf\u7a0b/\u534f\u7a0b\u7f51\u7edc\u6a21\u578b\u7684",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"#-%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95"}),"\u9ad8\u6027\u80fd"),"\u4e8b\u4ef6\u9a71\u52a8\u5faa\u73af"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5185\u7f6e goroutine \u6c60\uff0c\u7531\u5f00\u6e90\u5e93 ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/ants"}),"ants")," \u63d0\u4f9b\u652f\u6301"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u6574\u4e2a\u751f\u547d\u5468\u671f\u662f\u65e0\u9501\u7684"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u7b80\u5355\u6613\u7528\u7684 APIs"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u9ad8\u6548\u3001\u53ef\u91cd\u7528\u800c\u4e14\u81ea\u52a8\u4f38\u7f29\u7684\u5185\u5b58 buffer\uff1a(Elastic-)Ring-Buffer, Linked-List-Buffer and Elastic-Mixed-Buffer"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u591a\u79cd\u7f51\u7edc\u534f\u8bae/IPC \u673a\u5236\uff1a",Object(i.b)("inlineCode",{parentName:"li"},"TCP"),"\u3001",Object(i.b)("inlineCode",{parentName:"li"},"UDP")," \u548c ",Object(i.b)("inlineCode",{parentName:"li"},"Unix Domain Socket")),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u591a\u79cd\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\uff1a",Object(i.b)("inlineCode",{parentName:"li"},"Round-Robin(\u8f6e\u8be2)"),"\u3001",Object(i.b)("inlineCode",{parentName:"li"},"Source-Addr-Hash(\u6e90\u5730\u5740\u54c8\u5e0c)")," \u548c ",Object(i.b)("inlineCode",{parentName:"li"},"Least-Connections(\u6700\u5c11\u8fde\u63a5\u6570)")),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u4e24\u79cd\u4e8b\u4ef6\u9a71\u52a8\u673a\u5236\uff1a",Object(i.b)("strong",{parentName:"li"},"Linux")," \u91cc\u7684 ",Object(i.b)("inlineCode",{parentName:"li"},"epoll")," \u4ee5\u53ca ",Object(i.b)("strong",{parentName:"li"},"FreeBSD/DragonFly/Darwin")," \u91cc\u7684 ",Object(i.b)("inlineCode",{parentName:"li"},"kqueue")),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u7075\u6d3b\u7684\u4e8b\u4ef6\u5b9a\u65f6\u5668"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5b9e\u73b0 ",Object(i.b)("inlineCode",{parentName:"li"},"gnet")," \u5ba2\u6237\u7aef"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u652f\u6301 ",Object(i.b)("strong",{parentName:"li"},"Windows")," \u5e73\u53f0 (\u4ec5\u7528\u4e8e\u5f00\u53d1\u73af\u5883\u7684\u517c\u5bb9\u6027\uff0c\u4e0d\u8981\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528)"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","\u591a\u7f51\u7edc\u5730\u5740\u7ed1\u5b9a"),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","\u652f\u6301 ",Object(i.b)("strong",{parentName:"li"},"TLS")),Object(i.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(i.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","\u652f\u6301 ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://kernel.dk/io_uring.pdf"}),"io_uring"))),Object(i.b)("h2",{id:"\u67b6\u6784"},"\u67b6\u6784"),Object(i.b)("h3",{id:"\u591a\u7ebf\u7a0bgo\u7a0b\u7f51\u7edc\u6a21\u578b"},"\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b"),Object(i.b)("h4",{id:"\u4e3b\u4ece\u591a-reactors"},"\u4e3b\u4ece\u591a Reactors"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u91cd\u65b0\u8bbe\u8ba1\u5f00\u53d1\u4e86\u4e00\u4e2a\u65b0\u5185\u7f6e\u7684\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b\uff1a\u300e\u4e3b\u4ece\u591a Reactors\u300f\uff0c\u8fd9\u4e5f\u662f ",Object(i.b)("inlineCode",{parentName:"p"},"netty")," \u9ed8\u8ba4\u7684\u591a\u7ebf\u7a0b\u7f51\u7edc\u6a21\u578b\uff0c\u4e0b\u9762\u662f\u8fd9\u4e2a\u6a21\u578b\u7684\u539f\u7406\u56fe\uff1a"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{alt:"multi_reactor",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors.png"})),Object(i.b)("p",null,"\u5b83\u7684\u8fd0\u884c\u6d41\u7a0b\u5982\u4e0b\u9762\u7684\u65f6\u5e8f\u56fe\uff1a"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{alt:"reactor",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors-sequence-diagram.png"})),Object(i.b)("h4",{id:"\u4e3b\u4ece\u591a-reactors--\u7ebf\u7a0bgo\u7a0b\u6c60"},"\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60"),Object(i.b)("p",null,"\u4f60\u53ef\u80fd\u4f1a\u95ee\u4e00\u4e2a\u95ee\u9898\uff1a\u5982\u679c\u6211\u7684\u4e1a\u52a1\u903b\u8f91\u662f\u963b\u585e\u7684\uff0c\u90a3\u4e48\u5728 ",Object(i.b)("inlineCode",{parentName:"p"},"EventHandler.OnTraffic")," \u6ce8\u518c\u65b9\u6cd5\u91cc\u7684\u903b\u8f91\u4e5f\u4f1a\u963b\u585e\uff0c\u4ece\u800c\u5bfc\u81f4\u963b\u585e event-loop \u7ebf\u7a0b\uff0c\u8fd9\u65f6\u5019\u600e\u4e48\u529e\uff1f"),Object(i.b)("p",null,"\u6b63\u5982\u4f60\u6240\u77e5\uff0c\u57fa\u4e8e ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u7f16\u5199\u4f60\u7684\u7f51\u7edc\u670d\u52a1\u5668\u6709\u4e00\u6761\u6700\u91cd\u8981\u7684\u539f\u5219\uff1a\u6c38\u8fdc\u4e0d\u80fd\u8ba9\u4f60\u4e1a\u52a1\u903b\u8f91\uff08\u4e00\u822c\u5199\u5728 ",Object(i.b)("inlineCode",{parentName:"p"},"EventHandler.OnTraffic")," \u91cc\uff09\u963b\u585e event-loop \u7ebf\u7a0b\uff0c\u8fd9\u4e5f\u662f ",Object(i.b)("inlineCode",{parentName:"p"},"netty")," \u7684\u4e00\u6761\u6700\u91cd\u8981\u7684\u539f\u5219\uff0c\u5426\u5219\u7684\u8bdd\u5c06\u4f1a\u6781\u5927\u5730\u964d\u4f4e\u670d\u52a1\u5668\u7684\u541e\u5410\u91cf\u3002"),Object(i.b)("p",null,"\u6211\u7684\u56de\u7b54\u662f\uff0c\u57fa\u4e8e",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u53e6\u4e00\u79cd\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b\uff1a\u300e\u5e26\u7ebf\u7a0b/Go\u7a0b\u6c60\u7684\u4e3b\u4ece\u591a Reactors\u300f\u53ef\u4ee5\u89e3\u51b3\u963b\u585e\u95ee\u9898\uff0c\u8fd9\u4e2a\u65b0\u7f51\u7edc\u6a21\u578b\u901a\u8fc7\u5f15\u5165\u4e00\u4e2a worker pool \u6765\u89e3\u51b3\u4e1a\u52a1\u903b\u8f91\u963b\u585e\u7684\u95ee\u9898\uff1a\u5b83\u4f1a\u5728\u542f\u52a8\u7684\u65f6\u5019\u521d\u59cb\u5316\u4e00\u4e2a worker pool\uff0c\u7136\u540e\u5728\u628a ",Object(i.b)("inlineCode",{parentName:"p"},"EventHandler.OnTraffic")," \u91cc\u9762\u7684\u963b\u585e\u4ee3\u7801\u653e\u5230 worker pool \u91cc\u6267\u884c\uff0c\u4ece\u800c\u907f\u514d\u963b\u585e event-loop \u7ebf\u7a0b\u3002"),Object(i.b)("p",null,"\u6a21\u578b\u7684\u67b6\u6784\u56fe\u5982\u4e0b\u6240\u793a\uff1a"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{alt:"multi_reactor_thread_pool",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors%2Bthread-pool.png"})),Object(i.b)("p",null,"\u5b83\u7684\u8fd0\u884c\u6d41\u7a0b\u5982\u4e0b\u9762\u7684\u65f6\u5e8f\u56fe\uff1a"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{alt:"multi-reactors",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors%2Bthread-pool-sequence-diagram.png"})),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u901a\u8fc7\u5229\u7528 ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/ants"}),"ants")," goroutine \u6c60\uff08\u4e00\u4e2a\u57fa\u4e8e Go \u5f00\u53d1\u7684\u9ad8\u6027\u80fd\u7684 goroutine \u6c60 \uff0c\u5b9e\u73b0\u4e86\u5bf9\u5927\u89c4\u6a21 goroutines \u7684\u8c03\u5ea6\u7ba1\u7406\u3001goroutines \u590d\u7528\uff09\u6765\u5b9e\u73b0\u300e\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60\u300f\u7f51\u7edc\u6a21\u578b\u3002\u5173\u4e8e ",Object(i.b)("inlineCode",{parentName:"p"},"ants")," \u7684\u5168\u90e8\u529f\u80fd\u548c\u4f7f\u7528\uff0c\u53ef\u4ee5\u5728 ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/ants/v2?tab=doc"}),"ants \u6587\u6863")," \u91cc\u627e\u5230\u3002"),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u5185\u90e8\u96c6\u6210\u4e86 ",Object(i.b)("inlineCode",{parentName:"p"},"ants")," \u4ee5\u53ca\u63d0\u4f9b\u4e86 ",Object(i.b)("inlineCode",{parentName:"p"},"pool.goroutine.Default()")," \u65b9\u6cd5\u6765\u521d\u59cb\u5316\u4e00\u4e2a ",Object(i.b)("inlineCode",{parentName:"p"},"ants")," goroutine \u6c60\uff0c\u7136\u540e\u4f60\u53ef\u4ee5\u628a ",Object(i.b)("inlineCode",{parentName:"p"},"EventHandler.OnTraffic")," \u4e2d\u963b\u585e\u7684\u4e1a\u52a1\u903b\u8f91\u63d0\u4ea4\u5230 goroutine \u6c60\u91cc\u6267\u884c\uff0c\u6700\u540e\u5728 goroutine \u6c60\u91cc\u7684\u4ee3\u7801\u8c03\u7528 ",Object(i.b)("inlineCode",{parentName:"p"},"gnet.Conn.AsyncWrite([]byte)")," \u65b9\u6cd5\u628a\u5904\u7406\u5b8c\u963b\u585e\u903b\u8f91\u4e4b\u540e\u5f97\u5230\u7684\u8f93\u51fa\u6570\u636e\u5f02\u6b65\u5199\u56de\u5ba2\u6237\u7aef\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u907f\u514d\u963b\u585e event-loop \u7ebf\u7a0b\u3002"),Object(i.b)("p",null,"\u6709\u5173\u5728 ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u91cc\u4f7f\u7528 ",Object(i.b)("inlineCode",{parentName:"p"},"ants")," goroutine \u6c60\u7684\u7ec6\u8282\u53ef\u4ee5\u5230",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"#%E5%B8%A6%E9%98%BB%E5%A1%9E%E9%80%BB%E8%BE%91%E7%9A%84-echo-%E6%9C%8D%E5%8A%A1%E5%99%A8"}),"\u8fd9\u91cc"),"\u8fdb\u4e00\u6b65\u4e86\u89e3\u3002"),Object(i.b)("h2",{id:"\u5173\u952e\u8bbe\u8ba1"},"\u5173\u952e\u8bbe\u8ba1"),Object(i.b)("h3",{id:"\u5f39\u6027\u5185\u5b58-buffer"},"\u5f39\u6027\u5185\u5b58 Buffer"),Object(i.b)("h4",{id:"elastic-ring-buffer"},"Elastic Ring Buffer"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/ring-buffer.gif"})),Object(i.b)("h4",{id:"elastic-ringlinked-list-buffer"},"Elastic Ring&Linked-list Buffer"),Object(i.b)("p",{align:"center"},Object(i.b)("img",{src:"https://res.strikefreedom.top/static_res/blog/figures/elastic-buffer.png"})),Object(i.b)("p",null,Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u5185\u7f6e\u4e86inbound \u548c outbound \u4e24\u4e2a buffers\uff0c\u5206\u522b\u7528\u6765\u7f13\u51b2\u8f93\u5165\u8f93\u51fa\u7684\u7f51\u7edc\u6570\u636e\u4ee5\u53ca\u7ba1\u7406\u5185\u5b58\uff0cgnet \u91cc\u9762\u7684 inbound \u548c outbound buffer \u7ecf\u8fc7\u8bbe\u8ba1\u548c\u8c03\u4f18\uff0c\u8fbe\u5230\u91cd\u7528\u5185\u5b58\u4ee5\u53ca\u6309\u9700\u6269\u7f29\u5bb9\u7684\u76ee\u7684\u3002"),Object(i.b)("p",null,"\u5bf9\u4e8e TCP \u534f\u8bae\u7684\u6d41\u6570\u636e\uff0c\u4f7f\u7528 ",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u4e0d\u9700\u8981\u4e1a\u52a1\u65b9\u4e3a\u4e86\u89e3\u6790\u5e94\u7528\u5c42\u534f\u8bae\u800c\u81ea\u5df1\u7ef4\u62a4\u548c\u7ba1\u7406 buffers\uff0c",Object(i.b)("inlineCode",{parentName:"p"},"gnet")," \u4f1a\u66ff\u4e1a\u52a1\u65b9\u5b8c\u6210\u7f13\u51b2\u548c\u7ba1\u7406\u7f51\u7edc\u6570\u636e\u7684\u4efb\u52a1\uff0c\u964d\u4f4e\u4e1a\u52a1\u4ee3\u7801\u7684\u590d\u6742\u6027\u4ee5\u53ca\u964d\u4f4e\u5f00\u53d1\u8005\u7684\u5fc3\u667a\u8d1f\u62c5\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u80fd\u591f\u4e13\u6ce8\u4e8e\u4e1a\u52a1\u903b\u8f91\u800c\u975e\u4e00\u4e9b\u5e95\u5c42\u5b9e\u73b0\u3002"))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var a=n(0),b=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(b[n]=e[n]);return b}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(b[n]=e[n])}return b}var l=b.a.createContext({}),p=function(e){var t=b.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},s=function(e){var t=p(e.components);return b.a.createElement(l.Provider,{value:t},e.children)},O={inlineCode:"code",wrapper:function(e){var t=e.children;return b.a.createElement(b.a.Fragment,{},t)}},j=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),s=p(n),j=a,u=s["".concat(r,".").concat(j)]||s[j]||O[j]||i;return n?b.a.createElement(u,c({ref:t},l,{components:n})):b.a.createElement(u,c({ref:t},l))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=j;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c.mdxType="string"==typeof e?e:a,r[1]=c;for(var l=2;l=0||(b[n]=e[n]);return b}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(b[n]=e[n])}return b}var l=b.a.createContext({}),p=function(e){var t=b.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},s=function(e){var t=p(e.components);return b.a.createElement(l.Provider,{value:t},e.children)},O={inlineCode:"code",wrapper:function(e){var t=e.children;return b.a.createElement(b.a.Fragment,{},t)}},j=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),s=p(n),j=a,u=s["".concat(r,".").concat(j)]||s[j]||O[j]||i;return n?b.a.createElement(u,c({ref:t},l,{components:n})):b.a.createElement(u,c({ref:t},l))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=j;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c.mdxType="string"==typeof e?e:a,r[1]=c;for(var l=2;lr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(B=(U=U.replace(" ",":")).length),0=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},k={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var S=/[A-Z]|^ms/g,F=/_EMO_([^_]+?)_([^]*?)_EMO_/g,D=function(e){return 45===e.charCodeAt(1)},I=function(e){return null!=e&&"boolean"!=typeof e},j=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return D(e)?e:e.replace(S,"-$&").toLowerCase()})),N=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(F,(function(e,t,n){return L={name:t,styles:n,next:L},t}))}return 1===k[e]||D(e)||"number"!=typeof t||0===t?t:t+"px"};function M(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return L={name:n.name,styles:n.styles,next:L},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)L={name:i.name,styles:i.styles,next:L},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i-1}function oe(e){return ie(e)?window.pageYOffset:e.scrollTop}function ae(e,t){ie(e)?window.scrollTo(0,t):e.scrollTop=t}function ue(e,t,n,r){void 0===n&&(n=200),void 0===r&&(r=ee);var i=oe(e),o=t-i,a=0;!function t(){var u,s=o*((u=(u=a+=10)/n-1)*u*u+1)+i;ae(e,s),a=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!a)return o&&ue(s,C,160),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&_>=r)return o&&ue(s,C,160),{placement:"bottom",maxHeight:a?_-b:O-b};if("auto"===i||a){var x=t,k=a?E:w;return k>=r&&(x=Math.min(k-b-u.controlHeight,t)),{placement:"top",maxHeight:x}}if("bottom"===i)return ae(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(w>=d&&!a)return o&&ue(s,A,160),{placement:"top",maxHeight:t};if(!a&&w>=r||a&&E>=r){var S=t;return(!a&&w>=r||a&&E>=r)&&(S=a?E-y:w-y),o&&ue(s,A,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+i+'".')}return l}var he=function(e){return"auto"===e?"bottom":e},ve=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i=0||(i[n]=e[n]);return i}(e,["size"]);return q("svg",Se({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Fe},n))},Ie=function(e){return q(De,Se({size:20},e),q("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},je=function(e){return q(De,Se({size:20},e),q("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Ne=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},Me=Ne,Le=Ne,Pe=function(){var e=R.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(ke()),Te=function(e){var t=e.delay,n=e.offset;return q("span",{css:R({animation:Pe+" 1s ease-in-out "+t+"ms infinite;",backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},Re=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps,o=e.isRtl;return q("div",Se({},i,{css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)}),q(Te,{delay:0,offset:o}),q(Te,{delay:160,offset:!0}),q(Te,{delay:320,offset:!o}))};function Be(){return(Be=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,["className","cx","getStyles","theme","selectProps"]));return q("div",Ve({css:r("groupHeading",Ve({theme:i},o)),className:n({"group-heading":!0},t)},o))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles;return q("div",{css:i("indicatorsContainer",e),className:r({indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps;return q("span",Se({},i,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerRef,o=e.isHidden,a=e.isDisabled,u=e.theme,s=(e.selectProps,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return q("div",{css:r("input",ze({theme:u},s))},q(ce.a,ze({className:n({input:!0},t),inputRef:i,inputStyle:Ue(o),disabled:a},s)))},LoadingIndicator:Re,Menu:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerRef,a=e.innerProps;return q("div",fe({css:i("menu",e),className:r({menu:!0},n)},a,{ref:o}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isMulti,a=e.innerRef;return q("div",{css:i("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":o},n),ref:a},t)},MenuPortal:_e,LoadingMessage:Ee,NoOptionsMessage:ye,MultiValue:qe,MultiValueContainer:$e,MultiValueLabel:Ge,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return q("div",n,t||q(Ie,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,a=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return q("div",Ye({css:i("option",e),className:r({option:!0,"option--is-disabled":o,"option--is-focused":a,"option--is-selected":u},n),ref:s},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return q("div",Ke({css:i("placeholder",e),className:r({placeholder:!0},n)},o),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps,a=e.isDisabled,u=e.isRtl;return q("div",xe({css:i("container",e),className:r({"--is-disabled":a,"--is-rtl":u},n)},o),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,a=e.innerProps;return q("div",Ze({css:i("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":o},n)},a),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.isMulti,o=e.getStyles,a=e.hasValue;return q("div",{css:o("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":a},n)},t)}},Qe=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],et=function(e){for(var t=0;t=0||(i[n]=e[n]);return i}(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return q("input",ut({ref:t},n,{css:R({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}var lt=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.innerRef(Object(X.findDOMNode)(this))},i.componentWillUnmount=function(){this.props.innerRef(null)},i.render=function(){return this.props.children},r}(i.Component),ct=["boxSizing","height","overflow","paddingRight","position"],ft={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function pt(e){e.preventDefault()}function dt(e){e.stopPropagation()}function ht(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function vt(){return"ontouchstart"in window||navigator.maxTouchPoints}var mt=!(!window.document||!window.document.createElement),gt=0,bt=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i0,h=c-f-l,v=!1;h>n&&t.isBottom&&(o&&o(e),t.isBottom=!1),d&&t.isTop&&(u&&u(e),t.isTop=!1),d&&n>h?(i&&!t.isBottom&&i(e),p.scrollTop=c,v=!0,t.isBottom=!0):!d&&-n>l&&(a&&!t.isTop&&a(e),p.scrollTop=0,v=!0,t.isTop=!0),v&&t.cancelScroll(e)},t.onWheel=function(e){t.handleEventDelta(e,e.deltaY)},t.onTouchStart=function(e){t.touchStart=e.changedTouches[0].clientY},t.onTouchMove=function(e){var n=t.touchStart-e.changedTouches[0].clientY;t.handleEventDelta(e,n)},t.getScrollTarget=function(e){t.scrollTarget=e},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.startListening(this.scrollTarget)},i.componentWillUnmount=function(){this.stopListening(this.scrollTarget)},i.startListening=function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))},i.stopListening=function(e){"function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1)},i.render=function(){return o.a.createElement(lt,{innerRef:this.getScrollTarget},this.props.children)},r}(i.Component);function wt(e){var t=e.isEnabled,n=void 0===t||t,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,["isEnabled"]);return n?o.a.createElement(_t,r):r.children}var Ot=function(e,t){void 0===t&&(t={});var n=t,r=n.isSearchable,i=n.isMulti,o=n.label,a=n.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options"+(a?"":", press Enter to select the currently focused option")+", press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(r?",type to refine list":"")+", press Down to open the menu, "+(i?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},Ct=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return r?"option "+n+" is disabled. Select another option.":"option "+n+", selected."}},At=function(e){return!!e.isDisabled};var xt={clearIndicator:Le,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+i.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:Me,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:be,menu:function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,o=r.spacing,a=r.colors;return(t={label:"menu"})[function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n)]="100%",t.backgroundColor=a.neutral0,t.borderRadius=i,t.boxShadow="0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",t.marginBottom=o.menuGutter,t.marginTop=o.menuGutter,t.position="absolute",t.width="100%",t.zIndex=1,t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:ge,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,a=i.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*o.baseUnit+"px "+3*o.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var kt={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function St(){return(St=Object.assign||function(e){for(var t=1;t-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:At,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},jt=1,Nt=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},n.blockOptionHover=!1,n.isComposing=!1,n.clearFocusValueOnUpdate=!1,n.commonProps=void 0,n.components=void 0,n.hasGroups=!1,n.initialTouchX=0,n.initialTouchY=0,n.inputIsHiddenAfterUpdate=void 0,n.instancePrefix="",n.openAfterFocus=!1,n.scrollToFocusedOptionOnUpdate=!1,n.userIsDragging=void 0,n.controlRef=null,n.getControlRef=function(e){n.controlRef=e},n.focusedOptionRef=null,n.getFocusedOptionRef=function(e){n.focusedOptionRef=e},n.menuListRef=null,n.getMenuListRef=function(e){n.menuListRef=e},n.inputRef=null,n.getInputRef=function(e){n.inputRef=e},n.cacheComponents=function(e){n.components=Xe({},Je,{components:e}.components)},n.focus=n.focusInput,n.blur=n.blurInput,n.onChange=function(e,t){var r=n.props;(0,r.onChange)(e,St({},t,{name:r.name}))},n.setValue=function(e,t,r){void 0===t&&(t="set-value");var i=n.props,o=i.closeMenuOnSelect,a=i.isMulti;n.onInputChange("",{action:"set-value"}),o&&(n.inputIsHiddenAfterUpdate=!a,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})},n.selectOption=function(e){var t=n.props,r=t.blurInputOnSelect,i=t.isMulti,o=n.state.selectValue;if(i)if(n.isOptionSelected(e,o)){var a=n.getOptionValue(e);n.setValue(o.filter((function(e){return n.getOptionValue(e)!==a})),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(o,[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()},n.removeValue=function(e){var t=n.state.selectValue,r=n.getOptionValue(e),i=t.filter((function(e){return n.getOptionValue(e)!==r}));n.onChange(i.length?i:null,{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()},n.clearValue=function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})},n.popValue=function(){var e=n.state.selectValue,t=e[e.length-1],r=e.slice(0,e.length-1);n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(r.length?r:null,{action:"pop-value",removedValue:t})},n.getOptionLabel=function(e){return n.props.getOptionLabel(e)},n.getOptionValue=function(e){return n.props.getOptionValue(e)},n.getStyles=function(e,t){var r=xt[e](t);r.boxSizing="border-box";var i=n.props.styles[e];return i?i(r,t):r},n.getElementId=function(e){return n.instancePrefix+"-"+e},n.getActiveDescendentId=function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,i=t.focusedOption;if(i&&e){var o=r.focusable.indexOf(i),a=r.render[o];return a&&a.key}},n.announceAriaLiveSelection=function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:Ct(t,r)})},n.announceAriaLiveContext=function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:Ot(t,St({},r,{label:n.props["aria-label"]}))})},n.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())},n.onMenuMouseMove=function(e){n.blockOptionHover=!1},n.onControlMouseDown=function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},n.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,r=t.isMulti,i=t.menuIsOpen;n.focusInput(),i?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}},n.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,"touchend"===e.type?n.focusInput():setTimeout((function(){return n.focusInput()})))},n.onScroll=function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&ie(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()},n.onCompositionStart=function(){n.isComposing=!0},n.onCompositionEnd=function(){n.isComposing=!1},n.onTouchStart=function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)},n.onTouchMove=function(e){var t=e.touches.item(0);if(t){var r=Math.abs(t.clientX-n.initialTouchX),i=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=r>5||i>5}},n.onTouchEnd=function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)},n.onControlTouchEnd=function(e){n.userIsDragging||n.onControlMouseDown(e)},n.onClearIndicatorTouchEnd=function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)},n.onDropdownIndicatorTouchEnd=function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)},n.handleInputChange=function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()},n.onInputFocus=function(e){var t=n.props,r=t.isSearchable,i=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:i}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1},n.onInputBlur=function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))},n.onOptionHover=function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})},n.shouldHideSelectedOptions=function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t},n.onKeyDown=function(e){var t=n.props,r=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,a=t.inputValue,u=t.isClearable,s=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,f=t.tabSelectsValue,p=t.openMenuOnFocus,d=n.state,h=d.focusedOption,v=d.focusedValue,m=d.selectValue;if(!(s||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;n.focusValue("previous");break;case"ArrowRight":if(!r||a)return;n.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(v)n.removeValue(v);else{if(!i)return;r?n.popValue():u&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!l||!f||!h||p&&n.isOptionSelected(h,m))return;n.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(n.isComposing)return;n.selectOption(h);break}return;case"Escape":l?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):u&&o&&n.clearValue();break;case" ":if(a)return;if(!l){n.openMenu("first");break}if(!h)return;n.selectOption(h);break;case"ArrowUp":l?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":l?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!l)return;n.focusOption("pageup");break;case"PageDown":if(!l)return;n.focusOption("pagedown");break;case"Home":if(!l)return;n.focusOption("first");break;case"End":if(!l)return;n.focusOption("last");break;default:return}e.preventDefault()}},n.buildMenuOptions=function(e,t){var r=e.inputValue,i=void 0===r?"":r,o=e.options,a=function(e,r){var o=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:u,value:s,data:e},i))){var l=o?void 0:function(){return n.onOptionHover(e)},c=o?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:o,isSelected:a,key:f,label:u,type:"option",value:s}}};return o.reduce((function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var i=t.options.map((function(t,n){var i=a(t,r+"-"+n);return i&&e.focusable.push(t),i})).filter(Boolean);if(i.length){var o=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:o,data:t,options:i})}}else{var u=a(t,""+r);u&&(e.render.push(u),e.focusable.push(t))}return e}),{render:[],focusable:[]})};var r=t.value;n.cacheComponents=h(n.cacheComponents,Ae).bind(Ft(Ft(n))),n.cacheComponents(t.components),n.instancePrefix="react-select-"+(n.props.instanceId||++jt);var i=re(r);n.buildMenuOptions=h(n.buildMenuOptions,(function(e,t){var n=e,r=n[0],i=n[1],o=t,a=o[0];return Ae(i,o[1])&&Ae(r.inputValue,a.inputValue)&&Ae(r.options,a.options)})).bind(Ft(Ft(n)));var o=t.menuIsOpen?n.buildMenuOptions(t,i):{render:[],focusable:[]};return n.state.menuOptions=o,n.state.selectValue=i,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()},i.UNSAFE_componentWillReceiveProps=function(e){var t=this.props,n=t.options,r=t.value,i=t.menuIsOpen,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==i||e.inputValue!==o){var a=re(e.value),u=e.menuIsOpen?this.buildMenuOptions(e,a):{render:[],focusable:[]},s=this.getNextFocusedValue(a),l=this.getNextFocusedOption(u.focusable);this.setState({menuOptions:u,selectValue:a,focusedOption:l,focusedValue:s})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)},i.componentDidUpdate=function(e){var t,n,r,i,o,a=this.props,u=a.isDisabled,s=a.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetHeight/3,i.bottom+o>r.bottom?ae(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):i.top-o-1&&(u=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:o,focusedValue:null,focusedOption:o.focusable[u]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu"})}))},i.focusValue=function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,i=this.state,o=i.selectValue,a=i.focusedValue;if(n){this.setState({focusedOption:null});var u=o.indexOf(a);a||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=o.length-1,l=-1;if(o.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0?a-1:i.length-1:"down"===e?o=(a+1)%i.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+t)>i.length-1&&(o=i.length-1):"last"===e&&(o=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[o],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:At(i[o])}})}},i.getTheme=function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(kt):St({},kt,this.props.theme):kt},i.getCommonProps=function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,i=this.props,o=i.classNamePrefix,a=i.isMulti,u=i.isRtl,s=i.options,l=this.state.selectValue,c=this.hasValue();return{cx:ne.bind(null,o),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:a,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:i,theme:this.getTheme()}},i.getNextFocusedValue=function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]},i.hasValue=function(){return this.state.selectValue.length>0},i.hasOptions=function(){return!!this.state.menuOptions.render.length},i.countOptions=function(){return this.state.menuOptions.focusable.length},i.isClearable=function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t},i.isOptionDisabled=function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)},i.isOptionSelected=function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))},i.filterOption=function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)},i.formatOptionLabel=function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)},i.formatGroupLabel=function(e){return this.props.formatGroupLabel(e)},i.startListeningComposition=function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))},i.stopListeningComposition=function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))},i.startListeningToTouch=function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))},i.stopListeningToTouch=function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))},i.constructAriaLiveMessage=function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,i=e.focusedOption,o=this.props,a=o.options,u=o.menuIsOpen,s=o.inputValue,l=o.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value "+n(t)+" focused, "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(i&&u?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option "+n(t)+" focused"+(t.isDisabled?" disabled":"")+", "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:a}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t},i.renderInput=function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,l=r||this.getElementId("input"),c={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return o.a.createElement(st,St({id:l,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ee,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,value:""},c));var f=this.commonProps,p=f.cx,d=f.theme,h=f.selectProps;return o.a.createElement(u,St({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:l,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:h,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:i},c))},i.renderPlaceholderOrValue=function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,f=c.controlShouldRenderValue,p=c.isDisabled,d=c.isMulti,h=c.inputValue,v=c.placeholder,m=this.state,g=m.selectValue,b=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!f)return h?null:o.a.createElement(s,St({},l,{key:"placeholder",isDisabled:p,isFocused:y}),v);if(d)return g.map((function(t,u){var s=t===b;return o.a.createElement(n,St({},l,{components:{Container:r,Label:i,Remove:a},isFocused:s,isDisabled:p,key:e.getOptionValue(t),index:u,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var E=g[0];return o.a.createElement(u,St({},l,{data:E,isDisabled:p}),this.formatOptionLabel(E,"value"))},i.renderClearIndicator=function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.a.createElement(e,St({},t,{innerProps:u,isFocused:a}))},i.renderLoadingIndicator=function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!e||!i)return null;return o.a.createElement(e,St({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))},i.renderIndicatorSeparator=function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return o.a.createElement(n,St({},r,{isDisabled:i,isFocused:a}))},i.renderDropdownIndicator=function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.a.createElement(e,St({},t,{innerProps:i,isDisabled:n,isFocused:r}))},i.renderMenu=function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,v=this.props,m=v.captureMenuScroll,g=v.inputValue,b=v.isLoading,y=v.loadingMessage,E=v.minMenuHeight,_=v.maxMenuHeight,w=v.menuIsOpen,O=v.menuPlacement,C=v.menuPosition,A=v.menuPortalTarget,x=v.menuShouldBlockScroll,k=v.menuShouldScrollIntoView,S=v.noOptionsMessage,F=v.onMenuScrollToTop,D=v.onMenuScrollToBottom;if(!w)return null;var I,j=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,o.a.createElement(c,St({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())I=h.render.map((function(t){if("group"===t.type){t.type;var i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(t,["type"]),a=t.key+"-heading";return o.a.createElement(n,St({},f,i,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return j(e)})))}if("option"===t.type)return j(t)}));else if(b){var N=y({inputValue:g});if(null===N)return null;I=o.a.createElement(s,f,N)}else{var M=S({inputValue:g});if(null===M)return null;I=o.a.createElement(l,f,M)}var L={minMenuHeight:E,maxMenuHeight:_,menuPlacement:O,menuPosition:C,menuShouldScrollIntoView:k},P=o.a.createElement(ve,St({},f,L),(function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return o.a.createElement(i,St({},f,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),o.a.createElement(wt,{isEnabled:m,onTopArrive:F,onBottomArrive:D},o.a.createElement(Et,{isEnabled:x},o.a.createElement(a,St({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),I))))}));return A||"fixed"===C?o.a.createElement(u,St({},f,{appendTo:A,controlElement:this.controlRef,menuPlacement:O,menuPosition:C}),P):P},i.renderFormField=function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(i){if(n){var s=u.map((function(t){return e.getOptionValue(t)})).join(n);return o.a.createElement("input",{name:a,type:"hidden",value:s})}var l=u.length>0?u.map((function(t,n){return o.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})})):o.a.createElement("input",{name:a,type:"hidden"});return o.a.createElement("div",null,l)}var c=u[0]?this.getOptionValue(u[0]):"";return o.a.createElement("input",{name:a,type:"hidden",value:c})}},i.renderLiveRegion=function(){return this.state.isFocused?o.a.createElement(at,{"aria-live":"polite"},o.a.createElement("p",{id:"aria-selection-event"},"\xa0",this.state.ariaLiveSelection),o.a.createElement("p",{id:"aria-context"},"\xa0",this.constructAriaLiveMessage())):null},i.render=function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,u=a.className,s=a.id,l=a.isDisabled,c=a.menuIsOpen,f=this.state.isFocused,p=this.commonProps=this.getCommonProps();return o.a.createElement(r,St({},p,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:f}),this.renderLiveRegion(),o.a.createElement(t,St({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:f,menuIsOpen:c}),o.a.createElement(i,St({},p,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),o.a.createElement(n,St({},p,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())},r}(i.Component);function Mt(){return(Mt=Object.assign||function(e){for(var t=1;t1?n-1:0),i=1;i=0||(i[n]=e[n]);return i}(t,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return o.a.createElement(Pt,Mt({},n,{ref:function(t){e.select=t},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))},r}(i.Component),Tt.defaultProps=Lt,Rt),Vt=n(266),zt=n.n(Vt),Ut=n(397),Wt=n.n(Ut),Ht=n(352);var $t=function(){return Object(i.useContext)(Ht.a)},Gt=37,qt=39;function Yt(e){var t=e.block,n=e.centered,r=e.changeSelectedValue,i=e.className,a=e.handleKeydown,u=e.style,s=e.values,l=e.selectedValue,c=e.tabRefs;return o.a.createElement("div",{className:n?"tabs--centered":null},o.a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:zt()("tabs",i,{"tabs--block":t}),style:u},s.map((function(e){var t=e.value,n=e.label;return o.a.createElement("li",{role:"tab",tabIndex:"0","aria-selected":l===t,className:zt()("tab-item",{"tab-item--active":l===t}),key:t,ref:function(e){return c.push(e)},onKeyDown:function(e){return a(c,e.target,e)},onFocus:function(){return r(t)},onClick:function(){return r(t)}},n)}))))}function Kt(e){var t=e.placeholder,n=e.selectedValue,r=e.changeSelectedValue,i=e.size,a=e.values,u=a;if(u[0].group){var s=_.groupBy(u,"group");u=Object.keys(s).map((function(e){return{label:e,options:s[e]}}))}return o.a.createElement(Bt,{className:"react-select-container react-select--"+i,classNamePrefix:"react-select",options:u,isClearable:n,placeholder:t,value:a.find((function(e){return e.value==n})),onChange:function(e){return r(e?e.value:null)}})}var Zt=function(e){e.block,e.centered;var t=e.children,n=e.defaultValue,a=e.groupId,u=e.label,s=e.placeholder,l=e.select,c=e.size,f=(e.style,e.values),p=e.urlKey,d=$t(),h=d.tabGroupChoices,v=d.setTabGroupChoices,m=Object(i.useState)(n),g=m[0],b=m[1];if(null!=a){var y=h[a];null!=y&&y!==g&&b(y)}var E=function(e){b(e),null!=a&&v(a,e)},_=[],w=function(e,t,n){switch(n.keyCode){case qt:!function(e,t){var n=e.indexOf(t)+1;e[n]?e[n].focus():e[0].focus()}(e,t);break;case Gt:!function(e,t){var n=e.indexOf(t)-1;e[n]?e[n].focus():e[e.length-1].focus()}(e,t)}};return Object(i.useEffect)((function(){if("undefined"!=typeof window&&window.location&&p){var e=Wt.a.parse(window.location.search);e[p]&&b(e[p])}}),[]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"margin-bottom--"+(c||"md")},u&&o.a.createElement("div",{className:"margin-vert--sm"},u),f.length>1&&(l?o.a.createElement(Kt,Object(r.a)({changeSelectedValue:E,handleKeydown:w,placeholder:s,selectedValue:g,size:c,tabRefs:_},e)):o.a.createElement(Yt,Object(r.a)({changeSelectedValue:E,handleKeydown:w,selectedValue:g,tabRefs:_},e)))),i.Children.toArray(t).filter((function(e){return e.props.value===g}))[0])},Xt=n(272),Jt=n(332),Qt=n(267),en=n(305),tn=n.n(en),nn=n(236),rn=n.n(nn),on=(n(237),Object(a.a)("h2")),an=[{title:"Ultra-Fast",icon:"zap",description:o.a.createElement(o.a.Fragment,null,"Built in ",o.a.createElement("a",{href:"https://go.dev/"},"Go"),", gnet is ",o.a.createElement("a",{href:"#performance"},"ultra-fast and memory efficient")," based on the event-driven mechanism. It's designed to create a networking server framework for Go that performs on par with Redis and Haproxy for networking packets handling.")},{title:"Lock-Free",icon:"unlock",description:o.a.createElement(o.a.Fragment,null,"gnet is lock-free during the entire runtime, which keeps gnet free from synchronization issues and speeds it up.")},{title:"Concise & Easy-to-use APIs",icon:"layers",description:o.a.createElement(o.a.Fragment,null,"gnet provides concise and easy-to-use APIs for users, it only exposes the essential APIs and takes over most of the tough work for users, minimizing the complexity of business code so that developers are able to concentrate on business logic instead of the underlying implementations.")},{title:"Multiple Protocols",icon:"grid",description:o.a.createElement(o.a.Fragment,null,"gnet supports multiple protocols/IPC mechanism: TCP, UDP and Unix Domain Socket, enabling you to develop a variety of networking applications.")},{title:"Cross Platform",icon:"cpu",description:o.a.createElement(o.a.Fragment,null,"gnet is devised as a cross-platform framework, as a result, it works faultlessly on multiple platforms: Linux, FreeBSD, DragonFly BSD, Windows.")},{title:"Powerful Libraries",icon:"briefcase",description:o.a.createElement(o.a.Fragment,null,"There is a rich set of libraries in gnet, such as memory pool, goroutine pool, elastic buffers, logging package, etc., which makes it convenient for developers to build fast and efficient networking applications.")}];function un(e){var t,n,i=e.features,a=[];for(t=0,n=i.length;t0&&i.a.createElement("div",{className:"row footer__links"},i.a.createElement("div",{className:"col col--5 footer__col"},i.a.createElement("div",{className:"margin-bottom--md"},i.a.createElement(f.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),i.a.createElement("div",{className:"margin-bottom--md"},i.a.createElement(N,{description:!1,width:"150px"})),i.a.createElement("div",null,i.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},i.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",i.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},i.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",i.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},i.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),u.map((function(e,t){return i.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?i.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?i.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?i.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):i.a.createElement("li",{key:e.href||e.to,className:"footer__item"},i.a.createElement(P,e))}))):null)}))),(l||o)&&i.a.createElement("div",{className:"text--center"},l&&l.src&&i.a.createElement("div",{className:"margin-bottom--sm"},l.href?i.a.createElement("a",{href:l.href,target:"_blank",rel:"noopener noreferrer",className:L.a.footerLogoLink},i.a.createElement(T,{alt:l.alt,url:c})):i.a.createElement(T,{alt:l.alt,url:c}),i.a.createElement("br",null),i.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:L.a.footerLogoLink},i.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),o,i.a.createElement("br",null),i.a.createElement("small",null,i.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",i.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},B=n(290),V=n(291),z=n(3);n(135);t.a=function(e){var t=Object(h.a)().siteConfig,n=void 0===t?{}:t,r=n.favicon,u=(n.tagline,n.title),s=n.themeConfig.image,l=n.url,c=e.children,f=e.title,p=e.noFooter,d=e.description,v=e.image,m=e.keywords,g=(e.permalink,e.version),b=f?f+" | "+u:u,y=v||s,E=l+Object(O.a)(y),_=Object(O.a)(r),w=Object(z.h)(),C=w?"https://gnet.host"+(w.pathname.endsWith("/")?w.pathname:w.pathname+"/"):null;return i.a.createElement(V.a,null,i.a.createElement(B.a,null,i.a.createElement(a.a,null,i.a.createElement("html",{lang:"en"}),i.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),b&&i.a.createElement("title",null,b),b&&i.a.createElement("meta",{property:"og:title",content:b}),r&&i.a.createElement("link",{rel:"shortcut icon",href:_}),d&&i.a.createElement("meta",{name:"description",content:d}),d&&i.a.createElement("meta",{property:"og:description",content:d}),g&&i.a.createElement("meta",{name:"docsearch:version",content:g}),m&&m.length&&i.a.createElement("meta",{name:"keywords",content:m.join(",")}),y&&i.a.createElement("meta",{property:"og:image",content:E}),y&&i.a.createElement("meta",{property:"twitter:image",content:E}),y&&i.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+b}),y&&i.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),y&&i.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),C&&i.a.createElement("meta",{property:"og:url",content:C}),i.a.createElement("meta",{name:"twitter:card",content:"summary"}),C&&i.a.createElement("link",{rel:"canonical",href:C})),i.a.createElement(o.a,null),i.a.createElement(I,null),i.a.createElement("div",{className:"main-wrapper"},c),!p&&i.a.createElement(R,null)))}},297:function(e,t,n){"use strict";(function(e){var r=n(1),i=(n(295),n(296),n(78),n(79),n(306),n(0)),o=n.n(i),a=n(307),u=n.n(a),s=n(320),l=n(52),c=n(266),f=n.n(c),p=n(315),d=n(308),h=n.n(d),v=n(267),m=n(276),g=n(136),b=n.n(g);(void 0!==e?e:window).Prism=l.a,n(309),n(310),n(311),n(312),n(313),n(314);var y=/{([\d,-]+)}/,E=/title=".*"/;t.a=function(e){var t=e.children,n=e.className,a=e.metastring,l=Object(v.a)().siteConfig.themeConfig.prism,c=void 0===l?{}:l,d=Object(i.useState)(!1),g=d[0],_=d[1],w=Object(i.useState)(!1),O=w[0],C=w[1];Object(i.useEffect)((function(){C(!0)}),[]);var A=Object(i.useRef)(null),x=Object(i.useRef)(null),k=[],S="",F=Object(m.a)().isDarkTheme,D=c.theme||p.a,I=c.darkTheme||D,j=F?I:D;if(a&&y.test(a)){var N=a.match(y)[1];k=h.a.parse(N).filter((function(e){return e>0}))}a&&E.test(a)&&(S=a.match(E)[0].split("title=")[1].replace(/"+/g,"")),Object(i.useEffect)((function(){var e;return x.current&&(e=new u.a(x.current,{target:function(){return A.current}})),function(){e&&e.destroy()}}),[x.current,A.current]);var M=n&&n.replace(/language-/,"");!M&&c.defaultLanguage&&(M=c.defaultLanguage);var L=function(){window.getSelection().empty(),_(!0),setTimeout((function(){return _(!1)}),2e3)};return o.a.createElement(s.a,Object(r.a)({},s.b,{key:O,theme:j,code:t.trim(),language:M}),(function(e){var t,n,i=e.className,a=e.style,u=e.tokens,s=e.getLineProps,l=e.getTokenProps;return o.a.createElement(o.a.Fragment,null,S&&o.a.createElement("div",{style:a,className:b.a.codeBlockTitle},S),o.a.createElement("div",{className:b.a.codeBlockContent},o.a.createElement("button",{ref:x,type:"button","aria-label":"Copy code to clipboard",className:f()(b.a.copyButton,(t={},t[b.a.copyButtonWithTitle]=S,t)),onClick:L},g?"Copied":"Copy"),o.a.createElement("pre",{className:f()(i,b.a.codeBlock,(n={},n[b.a.codeBlockWithTitle]=S,n))},o.a.createElement("div",{ref:A,className:b.a.codeBlockLines,style:a},u.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var n=s({line:e,key:t});return k.includes(t+1)&&(n.className=n.className+" docusaurus-highlight-code-line"),o.a.createElement("div",Object(r.a)({key:t},n),e.map((function(e,t){return o.a.createElement("span",Object(r.a)({key:t},l({token:e,key:t})))})))}))))))}))}}).call(this,n(77))},305:function(e,t,n){(function(e,r){var i;(function(){var o="Expected a function",a="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],s="[object Arguments]",l="[object Array]",c="[object Boolean]",f="[object Date]",p="[object Error]",d="[object Function]",h="[object GeneratorFunction]",v="[object Map]",m="[object Number]",g="[object Object]",b="[object RegExp]",y="[object Set]",E="[object String]",_="[object Symbol]",w="[object WeakMap]",O="[object ArrayBuffer]",C="[object DataView]",A="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",S="[object Int16Array]",F="[object Int32Array]",D="[object Uint8Array]",I="[object Uint16Array]",j="[object Uint32Array]",N=/\b__p \+= '';/g,M=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,P=/&(?:amp|lt|gt|quot|#39);/g,T=/[&<>"']/g,R=RegExp(P.source),B=RegExp(T.source),V=/<%-([\s\S]+?)%>/g,z=/<%([\s\S]+?)%>/g,U=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/[\\^$.*+?()[\]{}|]/g,q=RegExp(G.source),Y=/^\s+|\s+$/g,K=/^\s+/,Z=/\s+$/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,ue=/^0o[0-7]+$/i,se=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,pe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",he="[\\ud800-\\udfff]",ve="["+de+"]",me="["+pe+"]",ge="\\d+",be="[\\u2700-\\u27bf]",ye="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ee="[^\\ud800-\\udfff"+de+ge+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",we="[^\\ud800-\\udfff]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ce="[\\ud800-\\udbff][\\udc00-\\udfff]",Ae="[A-Z\\xc0-\\xd6\\xd8-\\xde]",xe="(?:"+ye+"|"+Ee+")",ke="(?:"+Ae+"|"+Ee+")",Se="(?:"+me+"|"+_e+")"+"?",Fe="[\\ufe0e\\ufe0f]?"+Se+("(?:\\u200d(?:"+[we,Oe,Ce].join("|")+")[\\ufe0e\\ufe0f]?"+Se+")*"),De="(?:"+[be,Oe,Ce].join("|")+")"+Fe,Ie="(?:"+[we+me+"?",me,Oe,Ce,he].join("|")+")",je=RegExp("['\u2019]","g"),Ne=RegExp(me,"g"),Me=RegExp(_e+"(?="+_e+")|"+Ie+Fe,"g"),Le=RegExp([Ae+"?"+ye+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ve,Ae,"$"].join("|")+")",ke+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ve,Ae+xe,"$"].join("|")+")",Ae+"?"+xe+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ae+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ge,De].join("|"),"g"),Pe=RegExp("[\\u200d\\ud800-\\udfff"+pe+"\\ufe0e\\ufe0f]"),Te=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Be=-1,Ve={};Ve[A]=Ve[x]=Ve[k]=Ve[S]=Ve[F]=Ve[D]=Ve["[object Uint8ClampedArray]"]=Ve[I]=Ve[j]=!0,Ve[s]=Ve[l]=Ve[O]=Ve[c]=Ve[C]=Ve[f]=Ve[p]=Ve[d]=Ve[v]=Ve[m]=Ve[g]=Ve[b]=Ve[y]=Ve[E]=Ve[w]=!1;var ze={};ze[s]=ze[l]=ze[O]=ze[C]=ze[c]=ze[f]=ze[A]=ze[x]=ze[k]=ze[S]=ze[F]=ze[v]=ze[m]=ze[g]=ze[b]=ze[y]=ze[E]=ze[_]=ze[D]=ze["[object Uint8ClampedArray]"]=ze[I]=ze[j]=!0,ze[p]=ze[d]=ze[w]=!1;var Ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,He=parseInt,$e="object"==typeof e&&e&&e.Object===Object&&e,Ge="object"==typeof self&&self&&self.Object===Object&&self,qe=$e||Ge||Function("return this")(),Ye=t&&!t.nodeType&&t,Ke=Ye&&"object"==typeof r&&r&&!r.nodeType&&r,Ze=Ke&&Ke.exports===Ye,Xe=Ze&&$e.process,Je=function(){try{var e=Ke&&Ke.require&&Ke.require("util").types;return e||Xe&&Xe.binding&&Xe.binding("util")}catch(t){}}(),Qe=Je&&Je.isArrayBuffer,et=Je&&Je.isDate,tt=Je&&Je.isMap,nt=Je&&Je.isRegExp,rt=Je&&Je.isSet,it=Je&&Je.isTypedArray;function ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function pt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Mt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Lt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Pt=xt({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),Tt=xt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Rt(e){return"\\"+Ue[e]}function Bt(e){return Pe.test(e)}function Vt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var Yt=function e(t){var n,r=(t=null==t?qe:Yt.defaults(qe.Object(),t,Yt.pick(qe,Re))).Array,i=t.Date,pe=t.Error,de=t.Function,he=t.Math,ve=t.Object,me=t.RegExp,ge=t.String,be=t.TypeError,ye=r.prototype,Ee=de.prototype,_e=ve.prototype,we=t["__core-js_shared__"],Oe=Ee.toString,Ce=_e.hasOwnProperty,Ae=0,xe=(n=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ke=_e.toString,Se=Oe.call(ve),Fe=qe._,De=me("^"+Oe.call(Ce).replace(G,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ie=Ze?t.Buffer:void 0,Me=t.Symbol,Pe=t.Uint8Array,Ue=Ie?Ie.allocUnsafe:void 0,$e=zt(ve.getPrototypeOf,ve),Ge=ve.create,Ye=_e.propertyIsEnumerable,Ke=ye.splice,Xe=Me?Me.isConcatSpreadable:void 0,Je=Me?Me.iterator:void 0,bt=Me?Me.toStringTag:void 0,xt=function(){try{var e=Qi(ve,"defineProperty");return e({},"",{}),e}catch(t){}}(),Kt=t.clearTimeout!==qe.clearTimeout&&t.clearTimeout,Zt=i&&i.now!==qe.Date.now&&i.now,Xt=t.setTimeout!==qe.setTimeout&&t.setTimeout,Jt=he.ceil,Qt=he.floor,en=ve.getOwnPropertySymbols,tn=Ie?Ie.isBuffer:void 0,nn=t.isFinite,rn=ye.join,on=zt(ve.keys,ve),an=he.max,un=he.min,sn=i.now,ln=t.parseInt,cn=he.random,fn=ye.reverse,pn=Qi(t,"DataView"),dn=Qi(t,"Map"),hn=Qi(t,"Promise"),vn=Qi(t,"Set"),mn=Qi(t,"WeakMap"),gn=Qi(ve,"create"),bn=mn&&new mn,yn={},En=ko(pn),_n=ko(dn),wn=ko(hn),On=ko(vn),Cn=ko(mn),An=Me?Me.prototype:void 0,xn=An?An.valueOf:void 0,kn=An?An.toString:void 0;function Sn(e){if(Ha(e)&&!Na(e)&&!(e instanceof jn)){if(e instanceof In)return e;if(Ce.call(e,"__wrapped__"))return So(e)}return new In(e)}var Fn=function(){function e(){}return function(t){if(!Wa(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Dn(){}function In(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function jn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Zn(e,t,n,r,i,o){var a,u=1&t,l=2&t,p=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Wa(e))return e;var w=Na(e);if(w){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ce.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return gi(e,a)}else{var N=no(e),M=N==d||N==h;if(Ta(e))return fi(e,u);if(N==g||N==s||M&&!i){if(a=l||M?{}:io(e),!u)return l?function(e,t){return bi(e,to(e),t)}(e,function(e,t){return e&&bi(t,_u(t),e)}(a,e)):function(e,t){return bi(e,eo(e),t)}(e,Gn(a,e))}else{if(!ze[N])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case O:return pi(e);case c:case f:return new r(+e);case C:return function(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case x:case k:case S:case F:case D:case"[object Uint8ClampedArray]":case I:case j:return di(e,n);case v:return new r;case m:case E:return new r(e);case b:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case y:return new r;case _:return i=e,xn?ve(xn.call(i)):{}}var i}(e,N,u)}}o||(o=new Tn);var L=o.get(e);if(L)return L;o.set(e,a),Ka(e)?e.forEach((function(r){a.add(Zn(r,t,n,r,e,o))})):$a(e)&&e.forEach((function(r,i){a.set(i,Zn(r,t,n,i,e,o))}));var P=w?void 0:(p?l?Gi:$i:l?_u:Eu)(e);return ut(P||e,(function(r,i){P&&(r=e[i=r]),Wn(a,i,Zn(r,t,n,i,e,o))})),a}function Xn(e,t,n){var r=n.length;if(null==e)return!r;for(e=ve(e);r--;){var i=n[r],o=t[i],a=e[i];if(void 0===a&&!(i in e)||!o(a))return!1}return!0}function Jn(e,t,n){if("function"!=typeof e)throw new be(o);return Eo((function(){e.apply(void 0,n)}),t)}function Qn(e,t,n,r){var i=-1,o=ft,a=!0,u=e.length,s=[],l=t.length;if(!u)return s;n&&(t=dt(t,Dt(n))),r?(o=pt,a=!1):t.length>=200&&(o=jt,a=!1,t=new Pn(t));e:for(;++i-1},Mn.prototype.set=function(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ln.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(dn||Mn),string:new Nn}},Ln.prototype.delete=function(e){var t=Xi(this,e).delete(e);return this.size-=t?1:0,t},Ln.prototype.get=function(e){return Xi(this,e).get(e)},Ln.prototype.has=function(e){return Xi(this,e).has(e)},Ln.prototype.set=function(e,t){var n=Xi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Pn.prototype.add=Pn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pn.prototype.has=function(e){return this.__data__.has(e)},Tn.prototype.clear=function(){this.__data__=new Mn,this.size=0},Tn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Tn.prototype.get=function(e){return this.__data__.get(e)},Tn.prototype.has=function(e){return this.__data__.has(e)},Tn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!dn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ln(r)}return n.set(e,t),this.size=n.size,this};var er=_i(sr),tr=_i(lr,!0);function nr(e,t){var n=!0;return er(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function rr(e,t,n){for(var r=-1,i=e.length;++r0&&n(u)?t>1?or(u,t-1,n,r,i):ht(i,u):r||(i[i.length]=u)}return i}var ar=wi(),ur=wi(!0);function sr(e,t){return e&&ar(e,t,Eu)}function lr(e,t){return e&&ur(e,t,Eu)}function cr(e,t){return ct(t,(function(t){return Va(e[t])}))}function fr(e,t){for(var n=0,r=(t=ui(t,e)).length;null!=e&&nt}function vr(e,t){return null!=e&&Ce.call(e,t)}function mr(e,t){return null!=e&&t in ve(e)}function gr(e,t,n){for(var i=n?pt:ft,o=e[0].length,a=e.length,u=a,s=r(a),l=1/0,c=[];u--;){var f=e[u];u&&t&&(f=dt(f,Dt(t))),l=un(f.length,l),s[u]=!n&&(t||o>=120&&f.length>=120)?new Pn(u&&f):void 0}f=e[0];var p=-1,d=s[0];e:for(;++p=u)return s;var l=n[r];return s*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)}))}function Nr(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)u!==e&&Ke.call(u,s,1),Ke.call(e,s,1);return e}function Lr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;ao(i)?Ke.call(e,i,1):Qr(e,i)}}return e}function Pr(e,t){return e+Qt(cn()*(t-e+1))}function Tr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Rr(e,t){return _o(vo(e,t,Gu),e+"")}function Br(e){return Bn(Fu(e))}function Vr(e,t){var n=Fu(e);return Co(n,Kn(t,0,n.length))}function zr(e,t,n,r){if(!Wa(e))return e;for(var i=-1,o=(t=ui(t,e)).length,a=o-1,u=e;null!=u&&++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i>>1,a=e[o];null!==a&&!Xa(a)&&(n?a<=t:a=200){var l=t?null:Ti(e);if(l)return Wt(l);a=!1,i=jt,s=new Pn}else s=t?[]:u;e:for(;++r=r?e:$r(e,t,n)}var ci=Kt||function(e){return qe.clearTimeout(e)};function fi(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function pi(e){var t=new e.constructor(e.byteLength);return new Pe(t).set(new Pe(e)),t}function di(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function hi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Xa(e),a=void 0!==t,u=null===t,s=t==t,l=Xa(t);if(!u&&!l&&!o&&e>t||o&&a&&s&&!u&&!l||r&&a&&s||!n&&s||!i)return 1;if(!r&&!o&&!l&&e1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&uo(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=ve(t);++r-1?i[o?t[a]:a]:void 0}}function ki(e){return Hi((function(t){var n=t.length,r=n,i=In.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new be(o);if(i&&!u&&"wrapper"==Yi(a))var u=new In([],!0)}for(r=u?r:n;++r1&&y.reverse(),f&&lu))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,p=!0,d=2&n?new Pn:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(X,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return ut(u,(function(n){var r="_."+n[0];t&n[1]&&!ft(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(J);return t?t[1].split(Q):[]}(r),n)))}function Oo(e){var t=0,n=0;return function(){var r=sn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Co(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Yo(e,n)}));function ta(e){var t=Sn(e);return t.__chain__=!0,t}function na(e,t){return t(e)}var ra=Hi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Yn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof jn&&ao(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new In(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var ia=yi((function(e,t,n){Ce.call(e,n)?++e[n]:qn(e,n,1)}));var oa=xi(jo),aa=xi(No);function ua(e,t){return(Na(e)?ut:er)(e,Zi(t,3))}function sa(e,t){return(Na(e)?st:tr)(e,Zi(t,3))}var la=yi((function(e,t,n){Ce.call(e,n)?e[n].push(t):qn(e,n,[t])}));var ca=Rr((function(e,t,n){var i=-1,o="function"==typeof t,a=La(e)?r(e.length):[];return er(e,(function(e){a[++i]=o?ot(t,e,n):br(e,t,n)})),a})),fa=yi((function(e,t,n){qn(e,n,t)}));function pa(e,t){return(Na(e)?dt:kr)(e,Zi(t,3))}var da=yi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ha=Rr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&uo(e,t[0],t[1])?t=[]:n>2&&uo(t[0],t[1],t[2])&&(t=[t[0]]),jr(e,or(t,1),[])})),va=Zt||function(){return qe.Date.now()};function ma(e,t,n){return t=n?void 0:t,Bi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ga(e,t){var n;if("function"!=typeof t)throw new be(o);return e=ru(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ba=Rr((function(e,t,n){var r=1;if(n.length){var i=Ut(n,Ki(ba));r|=32}return Bi(e,r,t,n,i)})),ya=Rr((function(e,t,n){var r=3;if(n.length){var i=Ut(n,Ki(ya));r|=32}return Bi(t,r,e,n,i)}));function Ea(e,t,n){var r,i,a,u,s,l,c=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new be(o);function h(t){var n=r,o=i;return r=i=void 0,c=t,u=e.apply(o,n)}function v(e){return c=e,s=Eo(g,t),f?h(e):u}function m(e){var n=e-l;return void 0===l||n>=t||n<0||p&&e-c>=a}function g(){var e=va();if(m(e))return b(e);s=Eo(g,function(e){var n=t-(e-l);return p?un(n,a-(e-c)):n}(e))}function b(e){return s=void 0,d&&r?h(e):(r=i=void 0,u)}function y(){var e=va(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return v(l);if(p)return ci(s),s=Eo(g,t),h(l)}return void 0===s&&(s=Eo(g,t)),u}return t=ou(t)||0,Wa(n)&&(f=!!n.leading,a=(p="maxWait"in n)?an(ou(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&ci(s),c=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?u:b(va())},y}var _a=Rr((function(e,t){return Jn(e,1,t)})),wa=Rr((function(e,t,n){return Jn(e,ou(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new be(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||Ln),n}function Ca(e){if("function"!=typeof e)throw new be(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Ln;var Aa=si((function(e,t){var n=(t=1==t.length&&Na(t[0])?dt(t[0],Dt(Zi())):dt(or(t,1),Dt(Zi()))).length;return Rr((function(r){for(var i=-1,o=un(r.length,n);++i=t})),ja=yr(function(){return arguments}())?yr:function(e){return Ha(e)&&Ce.call(e,"callee")&&!Ye.call(e,"callee")},Na=r.isArray,Ma=Qe?Dt(Qe):function(e){return Ha(e)&&dr(e)==O};function La(e){return null!=e&&Ua(e.length)&&!Va(e)}function Pa(e){return Ha(e)&&La(e)}var Ta=tn||os,Ra=et?Dt(et):function(e){return Ha(e)&&dr(e)==f};function Ba(e){if(!Ha(e))return!1;var t=dr(e);return t==p||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!qa(e)}function Va(e){if(!Wa(e))return!1;var t=dr(e);return t==d||t==h||"[object AsyncFunction]"==t||"[object Proxy]"==t}function za(e){return"number"==typeof e&&e==ru(e)}function Ua(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Wa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ha(e){return null!=e&&"object"==typeof e}var $a=tt?Dt(tt):function(e){return Ha(e)&&no(e)==v};function Ga(e){return"number"==typeof e||Ha(e)&&dr(e)==m}function qa(e){if(!Ha(e)||dr(e)!=g)return!1;var t=$e(e);if(null===t)return!0;var n=Ce.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Se}var Ya=nt?Dt(nt):function(e){return Ha(e)&&dr(e)==b};var Ka=rt?Dt(rt):function(e){return Ha(e)&&no(e)==y};function Za(e){return"string"==typeof e||!Na(e)&&Ha(e)&&dr(e)==E}function Xa(e){return"symbol"==typeof e||Ha(e)&&dr(e)==_}var Ja=it?Dt(it):function(e){return Ha(e)&&Ua(e.length)&&!!Ve[dr(e)]};var Qa=Mi(xr),eu=Mi((function(e,t){return e<=t}));function tu(e){if(!e)return[];if(La(e))return Za(e)?Gt(e):gi(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=no(e);return(t==v?Vt:t==y?Wt:Fu)(e)}function nu(e){return e?(e=ou(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ru(e){var t=nu(e),n=t%1;return t==t?n?t-n:t:0}function iu(e){return e?Kn(ru(e),0,4294967295):0}function ou(e){if("number"==typeof e)return e;if(Xa(e))return NaN;if(Wa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Wa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Y,"");var n=oe.test(e);return n||ue.test(e)?He(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function au(e){return bi(e,_u(e))}function uu(e){return null==e?"":Xr(e)}var su=Ei((function(e,t){if(fo(t)||La(t))bi(t,Eu(t),e);else for(var n in t)Ce.call(t,n)&&Wn(e,n,t[n])})),lu=Ei((function(e,t){bi(t,_u(t),e)})),cu=Ei((function(e,t,n,r){bi(t,_u(t),e,r)})),fu=Ei((function(e,t,n,r){bi(t,Eu(t),e,r)})),pu=Hi(Yn);var du=Rr((function(e,t){e=ve(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&uo(t[0],t[1],i)&&(r=1);++n1),t})),bi(e,Gi(e),n),r&&(n=Zn(n,7,Ui));for(var i=t.length;i--;)Qr(n,t[i]);return n}));var Au=Hi((function(e,t){return null==e?{}:function(e,t){return Nr(e,t,(function(t,n){return mu(e,n)}))}(e,t)}));function xu(e,t){if(null==e)return{};var n=dt(Gi(e),(function(e){return[e]}));return t=Zi(t),Nr(e,n,(function(e,n){return t(e,n[0])}))}var ku=Ri(Eu),Su=Ri(_u);function Fu(e){return null==e?[]:It(e,Eu(e))}var Du=Ci((function(e,t,n){return t=t.toLowerCase(),e+(n?Iu(t):t)}));function Iu(e){return Bu(uu(e).toLowerCase())}function ju(e){return(e=uu(e))&&e.replace(le,Pt).replace(Ne,"")}var Nu=Ci((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Mu=Ci((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Lu=Oi("toLowerCase");var Pu=Ci((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Tu=Ci((function(e,t,n){return e+(n?" ":"")+Bu(t)}));var Ru=Ci((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Bu=Oi("toUpperCase");function Vu(e,t,n){return e=uu(e),void 0===(t=n?void 0:t)?function(e){return Te.test(e)}(e)?function(e){return e.match(Le)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var zu=Rr((function(e,t){try{return ot(e,void 0,t)}catch(n){return Ba(n)?n:new pe(n)}})),Uu=Hi((function(e,t){return ut(t,(function(t){t=xo(t),qn(e,t,ba(e[t],e))})),e}));function Wu(e){return function(){return e}}var Hu=ki(),$u=ki(!0);function Gu(e){return e}function qu(e){return Or("function"==typeof e?e:Zn(e,1))}var Yu=Rr((function(e,t){return function(n){return br(n,e,t)}})),Ku=Rr((function(e,t){return function(n){return br(e,n,t)}}));function Zu(e,t,n){var r=Eu(t),i=cr(t,r);null!=n||Wa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=cr(t,Eu(t)));var o=!(Wa(n)&&"chain"in n&&!n.chain),a=Va(e);return ut(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=gi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,ht([this.value()],arguments))})})),e}function Xu(){}var Ju=Ii(dt),Qu=Ii(lt),es=Ii(gt);function ts(e){return so(e)?At(xo(e)):function(e){return function(t){return fr(t,e)}}(e)}var ns=Ni(),rs=Ni(!0);function is(){return[]}function os(){return!1}var as=Di((function(e,t){return e+t}),0),us=Pi("ceil"),ss=Di((function(e,t){return e/t}),1),ls=Pi("floor");var cs,fs=Di((function(e,t){return e*t}),1),ps=Pi("round"),ds=Di((function(e,t){return e-t}),0);return Sn.after=function(e,t){if("function"!=typeof t)throw new be(o);return e=ru(e),function(){if(--e<1)return t.apply(this,arguments)}},Sn.ary=ma,Sn.assign=su,Sn.assignIn=lu,Sn.assignInWith=cu,Sn.assignWith=fu,Sn.at=pu,Sn.before=ga,Sn.bind=ba,Sn.bindAll=Uu,Sn.bindKey=ya,Sn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Na(e)?e:[e]},Sn.chain=ta,Sn.chunk=function(e,t,n){t=(n?uo(e,t,n):void 0===t)?1:an(ru(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,u=r(Jt(i/t));oi?0:i+n),(r=void 0===r||r>i?i:ru(r))<0&&(r+=i),r=n>r?0:iu(r);n>>0)?(e=uu(e))&&("string"==typeof t||null!=t&&!Ya(t))&&!(t=Xr(t))&&Bt(e)?li(Gt(e),0,n):e.split(t,n):[]},Sn.spread=function(e,t){if("function"!=typeof e)throw new be(o);return t=null==t?0:an(ru(t),0),Rr((function(n){var r=n[t],i=li(n,0,t);return r&&ht(i,r),ot(e,this,i)}))},Sn.tail=function(e){var t=null==e?0:e.length;return t?$r(e,1,t):[]},Sn.take=function(e,t,n){return e&&e.length?$r(e,0,(t=n||void 0===t?1:ru(t))<0?0:t):[]},Sn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?$r(e,(t=r-(t=n||void 0===t?1:ru(t)))<0?0:t,r):[]},Sn.takeRightWhile=function(e,t){return e&&e.length?ti(e,Zi(t,3),!1,!0):[]},Sn.takeWhile=function(e,t){return e&&e.length?ti(e,Zi(t,3)):[]},Sn.tap=function(e,t){return t(e),e},Sn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new be(o);return Wa(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ea(e,t,{leading:r,maxWait:t,trailing:i})},Sn.thru=na,Sn.toArray=tu,Sn.toPairs=ku,Sn.toPairsIn=Su,Sn.toPath=function(e){return Na(e)?dt(e,xo):Xa(e)?[e]:gi(Ao(uu(e)))},Sn.toPlainObject=au,Sn.transform=function(e,t,n){var r=Na(e),i=r||Ta(e)||Ja(e);if(t=Zi(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Wa(e)&&Va(o)?Fn($e(e)):{}}return(i?ut:sr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Sn.unary=function(e){return ma(e,1)},Sn.union=Ho,Sn.unionBy=$o,Sn.unionWith=Go,Sn.uniq=function(e){return e&&e.length?Jr(e):[]},Sn.uniqBy=function(e,t){return e&&e.length?Jr(e,Zi(t,2)):[]},Sn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Jr(e,void 0,t):[]},Sn.unset=function(e,t){return null==e||Qr(e,t)},Sn.unzip=qo,Sn.unzipWith=Yo,Sn.update=function(e,t,n){return null==e?e:ei(e,t,ai(n))},Sn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ei(e,t,ai(n),r)},Sn.values=Fu,Sn.valuesIn=function(e){return null==e?[]:It(e,_u(e))},Sn.without=Ko,Sn.words=Vu,Sn.wrap=function(e,t){return xa(ai(t),e)},Sn.xor=Zo,Sn.xorBy=Xo,Sn.xorWith=Jo,Sn.zip=Qo,Sn.zipObject=function(e,t){return ii(e||[],t||[],Wn)},Sn.zipObjectDeep=function(e,t){return ii(e||[],t||[],zr)},Sn.zipWith=ea,Sn.entries=ku,Sn.entriesIn=Su,Sn.extend=lu,Sn.extendWith=cu,Zu(Sn,Sn),Sn.add=as,Sn.attempt=zu,Sn.camelCase=Du,Sn.capitalize=Iu,Sn.ceil=us,Sn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=ou(n))==n?n:0),void 0!==t&&(t=(t=ou(t))==t?t:0),Kn(ou(e),t,n)},Sn.clone=function(e){return Zn(e,4)},Sn.cloneDeep=function(e){return Zn(e,5)},Sn.cloneDeepWith=function(e,t){return Zn(e,5,t="function"==typeof t?t:void 0)},Sn.cloneWith=function(e,t){return Zn(e,4,t="function"==typeof t?t:void 0)},Sn.conformsTo=function(e,t){return null==t||Xn(e,t,Eu(t))},Sn.deburr=ju,Sn.defaultTo=function(e,t){return null==e||e!=e?t:e},Sn.divide=ss,Sn.endsWith=function(e,t,n){e=uu(e),t=Xr(t);var r=e.length,i=n=void 0===n?r:Kn(ru(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Sn.eq=Fa,Sn.escape=function(e){return(e=uu(e))&&B.test(e)?e.replace(T,Tt):e},Sn.escapeRegExp=function(e){return(e=uu(e))&&q.test(e)?e.replace(G,"\\$&"):e},Sn.every=function(e,t,n){var r=Na(e)?lt:nr;return n&&uo(e,t,n)&&(t=void 0),r(e,Zi(t,3))},Sn.find=oa,Sn.findIndex=jo,Sn.findKey=function(e,t){return yt(e,Zi(t,3),sr)},Sn.findLast=aa,Sn.findLastIndex=No,Sn.findLastKey=function(e,t){return yt(e,Zi(t,3),lr)},Sn.floor=ls,Sn.forEach=ua,Sn.forEachRight=sa,Sn.forIn=function(e,t){return null==e?e:ar(e,Zi(t,3),_u)},Sn.forInRight=function(e,t){return null==e?e:ur(e,Zi(t,3),_u)},Sn.forOwn=function(e,t){return e&&sr(e,Zi(t,3))},Sn.forOwnRight=function(e,t){return e&&lr(e,Zi(t,3))},Sn.get=vu,Sn.gt=Da,Sn.gte=Ia,Sn.has=function(e,t){return null!=e&&ro(e,t,vr)},Sn.hasIn=mu,Sn.head=Lo,Sn.identity=Gu,Sn.includes=function(e,t,n,r){e=La(e)?e:Fu(e),n=n&&!r?ru(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Za(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},Sn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ru(n);return i<0&&(i=an(r+i,0)),_t(e,t,i)},Sn.inRange=function(e,t,n){return t=nu(t),void 0===n?(n=t,t=0):n=nu(n),function(e,t,n){return e>=un(t,n)&&e=-9007199254740991&&e<=9007199254740991},Sn.isSet=Ka,Sn.isString=Za,Sn.isSymbol=Xa,Sn.isTypedArray=Ja,Sn.isUndefined=function(e){return void 0===e},Sn.isWeakMap=function(e){return Ha(e)&&no(e)==w},Sn.isWeakSet=function(e){return Ha(e)&&"[object WeakSet]"==dr(e)},Sn.join=function(e,t){return null==e?"":rn.call(e,t)},Sn.kebabCase=Nu,Sn.last=Bo,Sn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ru(n))<0?an(r+i,0):un(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Et(e,Ot,i,!0)},Sn.lowerCase=Mu,Sn.lowerFirst=Lu,Sn.lt=Qa,Sn.lte=eu,Sn.max=function(e){return e&&e.length?rr(e,Gu,hr):void 0},Sn.maxBy=function(e,t){return e&&e.length?rr(e,Zi(t,2),hr):void 0},Sn.mean=function(e){return Ct(e,Gu)},Sn.meanBy=function(e,t){return Ct(e,Zi(t,2))},Sn.min=function(e){return e&&e.length?rr(e,Gu,xr):void 0},Sn.minBy=function(e,t){return e&&e.length?rr(e,Zi(t,2),xr):void 0},Sn.stubArray=is,Sn.stubFalse=os,Sn.stubObject=function(){return{}},Sn.stubString=function(){return""},Sn.stubTrue=function(){return!0},Sn.multiply=fs,Sn.nth=function(e,t){return e&&e.length?Ir(e,ru(t)):void 0},Sn.noConflict=function(){return qe._===this&&(qe._=Fe),this},Sn.noop=Xu,Sn.now=va,Sn.pad=function(e,t,n){e=uu(e);var r=(t=ru(t))?$t(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ji(Qt(i),n)+e+ji(Jt(i),n)},Sn.padEnd=function(e,t,n){e=uu(e);var r=(t=ru(t))?$t(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=cn();return un(e+i*(t-e+We("1e-"+((i+"").length-1))),t)}return Pr(e,t)},Sn.reduce=function(e,t,n){var r=Na(e)?vt:kt,i=arguments.length<3;return r(e,Zi(t,4),n,i,er)},Sn.reduceRight=function(e,t,n){var r=Na(e)?mt:kt,i=arguments.length<3;return r(e,Zi(t,4),n,i,tr)},Sn.repeat=function(e,t,n){return t=(n?uo(e,t,n):void 0===t)?1:ru(t),Tr(uu(e),t)},Sn.replace=function(){var e=arguments,t=uu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Sn.result=function(e,t,n){var r=-1,i=(t=ui(t,e)).length;for(i||(i=1,e=void 0);++r9007199254740991)return[];var n=4294967295,r=un(e,4294967295);e-=4294967295;for(var i=Ft(r,t=Zi(t));++n=o)return e;var u=n-$t(r);if(u<1)return r;var s=a?li(a,0,u).join(""):e.slice(0,u);if(void 0===i)return s+r;if(a&&(u+=s.length-u),Ya(i)){if(e.slice(u).search(i)){var l,c=s;for(i.global||(i=me(i.source,uu(re.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var f=l.index;s=s.slice(0,void 0===f?u:f)}}else if(e.indexOf(Xr(i),u)!=u){var p=s.lastIndexOf(i);p>-1&&(s=s.slice(0,p))}return s+r},Sn.unescape=function(e){return(e=uu(e))&&R.test(e)?e.replace(P,qt):e},Sn.uniqueId=function(e){var t=++Ae;return uu(e)+t},Sn.upperCase=Ru,Sn.upperFirst=Bu,Sn.each=ua,Sn.eachRight=sa,Sn.first=Lo,Zu(Sn,(cs={},sr(Sn,(function(e,t){Ce.call(Sn.prototype,t)||(cs[t]=e)})),cs),{chain:!1}),Sn.VERSION="4.17.19",ut(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Sn[e].placeholder=Sn})),ut(["drop","take"],(function(e,t){jn.prototype[e]=function(n){n=void 0===n?1:an(ru(n),0);var r=this.__filtered__&&!t?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=un(n,r.__takeCount__):r.__views__.push({size:un(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},jn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),ut(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;jn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Zi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),ut(["head","last"],(function(e,t){var n="take"+(t?"Right":"");jn.prototype[e]=function(){return this[n](1).value()[0]}})),ut(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");jn.prototype[e]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(Gu)},jn.prototype.find=function(e){return this.filter(e).head()},jn.prototype.findLast=function(e){return this.reverse().find(e)},jn.prototype.invokeMap=Rr((function(e,t){return"function"==typeof e?new jn(this):this.map((function(n){return br(n,e,t)}))})),jn.prototype.reject=function(e){return this.filter(Ca(Zi(e)))},jn.prototype.slice=function(e,t){e=ru(e);var n=this;return n.__filtered__&&(e>0||t<0)?new jn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ru(t))<0?n.dropRight(-t):n.take(t-e)),n)},jn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},jn.prototype.toArray=function(){return this.take(4294967295)},sr(jn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Sn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Sn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof jn,s=a[0],l=u||Na(t),c=function(e){var t=i.apply(Sn,ht([e],a));return r&&f?t[0]:t};l&&n&&"function"==typeof s&&1!=s.length&&(u=l=!1);var f=this.__chain__,p=!!this.__actions__.length,d=o&&!f,h=u&&!p;if(!o&&l){t=h?t:new jn(this);var v=e.apply(t,a);return v.__actions__.push({func:na,args:[c],thisArg:void 0}),new In(v,f)}return d&&h?e.apply(this,a):(v=this.thru(c),d?r?v.value()[0]:v.value():v)})})),ut(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ye[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Sn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Na(i)?i:[],e)}return this[n]((function(n){return t.apply(Na(n)?n:[],e)}))}})),sr(jn.prototype,(function(e,t){var n=Sn[t];if(n){var r=n.name+"";Ce.call(yn,r)||(yn[r]=[]),yn[r].push({name:t,func:n})}})),yn[Si(void 0,2).name]=[{name:"wrapper",func:void 0}],jn.prototype.clone=function(){var e=new jn(this.__wrapped__);return e.__actions__=gi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=gi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=gi(this.__views__),e},jn.prototype.reverse=function(){if(this.__filtered__){var e=new jn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},jn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Na(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Sn.prototype.plant=function(e){for(var t,n=this;n instanceof Dn;){var r=So(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Sn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof jn){var t=e;return this.__actions__.length&&(t=new jn(this)),(t=t.reverse()).__actions__.push({func:na,args:[Wo],thisArg:void 0}),new In(t,this.__chain__)}return this.thru(Wo)},Sn.prototype.toJSON=Sn.prototype.valueOf=Sn.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},Sn.prototype.first=Sn.prototype.head,Je&&(Sn.prototype[Je]=function(){return this}),Sn}();qe._=Yt,void 0===(i=function(){return Yt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(77),n(340)(e))},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(267);function i(){var e=Object(r.a)().siteConfig,t=(void 0===e?{}:e).customFields.metadata.latest_post,n=Date.parse(t.date),i=new Date,o=Math.abs(i-n),a=Math.ceil(o/864e5),u=null;return"undefined"!=typeof window&&(u=new Date(parseInt(window.localStorage.getItem("blogViewedAt")||"0"))),a<30&&(!u||u=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}(o.Component);h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},397:function(e,t,n){"use strict";var r=n(398),i=n(58);function o(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=i({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:decodeURIComponent(o),n(decodeURIComponent(i),o,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))):r},t.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[o(t,e),"[",r,"]"].join(""):[o(t,e),"[",o(r,e),"]=",o(n,e)].join("")};case"bracket":return function(t,n){return null===n?o(t,e):[o(t,e),"[]=",o(n,e)].join("")};default:return function(t,n){return null===n?o(t,e):[o(t,e),"=",o(n,e)].join("")}}}(t=i({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return o(r,t);if(Array.isArray(i)){var a=[];return i.slice().forEach((function(e){void 0!==e&&a.push(n(r,e,a.length))})),a.join("&")}return o(r,t)+"="+o(i,t)})).filter((function(e){return e.length>0})).join("&"):""}},398:function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}}}]); \ No newline at end of file +/*! For license information please see c4f5d8e4.1cca205c.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[91,4],{260:function(e,t,n){"use strict";n.r(t);var r=n(1),i=n(0),o=n.n(i),a=n(278),u=n(273),s=n(297),l=n(268),c=n(270),f=n.n(c);var p=function(e){return o.a.createElement(o.a.Fragment,null,e.children)};n(341),n(274),n(53),n(26),n(20),n(19);function d(e,t){if(e.length!==t.length)return!1;for(var n=0;nr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(B=(U=U.replace(" ",":")).length),0=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},k={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var S=/[A-Z]|^ms/g,F=/_EMO_([^_]+?)_([^]*?)_EMO_/g,D=function(e){return 45===e.charCodeAt(1)},I=function(e){return null!=e&&"boolean"!=typeof e},j=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return D(e)?e:e.replace(S,"-$&").toLowerCase()})),N=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(F,(function(e,t,n){return L={name:t,styles:n,next:L},t}))}return 1===k[e]||D(e)||"number"!=typeof t||0===t?t:t+"px"};function M(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return L={name:n.name,styles:n.styles,next:L},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)L={name:i.name,styles:i.styles,next:L},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i-1}function oe(e){return ie(e)?window.pageYOffset:e.scrollTop}function ae(e,t){ie(e)?window.scrollTo(0,t):e.scrollTop=t}function ue(e,t,n,r){void 0===n&&(n=200),void 0===r&&(r=ee);var i=oe(e),o=t-i,a=0;!function t(){var u,s=o*((u=(u=a+=10)/n-1)*u*u+1)+i;ae(e,s),a=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!a)return o&&ue(s,C,160),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&_>=r)return o&&ue(s,C,160),{placement:"bottom",maxHeight:a?_-b:O-b};if("auto"===i||a){var x=t,k=a?E:w;return k>=r&&(x=Math.min(k-b-u.controlHeight,t)),{placement:"top",maxHeight:x}}if("bottom"===i)return ae(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(w>=d&&!a)return o&&ue(s,A,160),{placement:"top",maxHeight:t};if(!a&&w>=r||a&&E>=r){var S=t;return(!a&&w>=r||a&&E>=r)&&(S=a?E-y:w-y),o&&ue(s,A,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+i+'".')}return l}var he=function(e){return"auto"===e?"bottom":e},ve=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i=0||(i[n]=e[n]);return i}(e,["size"]);return q("svg",Se({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Fe},n))},Ie=function(e){return q(De,Se({size:20},e),q("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},je=function(e){return q(De,Se({size:20},e),q("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Ne=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},Me=Ne,Le=Ne,Pe=function(){var e=R.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(ke()),Te=function(e){var t=e.delay,n=e.offset;return q("span",{css:R({animation:Pe+" 1s ease-in-out "+t+"ms infinite;",backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},Re=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps,o=e.isRtl;return q("div",Se({},i,{css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)}),q(Te,{delay:0,offset:o}),q(Te,{delay:160,offset:!0}),q(Te,{delay:320,offset:!o}))};function Be(){return(Be=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,["className","cx","getStyles","theme","selectProps"]));return q("div",Ve({css:r("groupHeading",Ve({theme:i},o)),className:n({"group-heading":!0},t)},o))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles;return q("div",{css:i("indicatorsContainer",e),className:r({indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps;return q("span",Se({},i,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerRef,o=e.isHidden,a=e.isDisabled,u=e.theme,s=(e.selectProps,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return q("div",{css:r("input",ze({theme:u},s))},q(ce.a,ze({className:n({input:!0},t),inputRef:i,inputStyle:Ue(o),disabled:a},s)))},LoadingIndicator:Re,Menu:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerRef,a=e.innerProps;return q("div",fe({css:i("menu",e),className:r({menu:!0},n)},a,{ref:o}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isMulti,a=e.innerRef;return q("div",{css:i("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":o},n),ref:a},t)},MenuPortal:_e,LoadingMessage:Ee,NoOptionsMessage:ye,MultiValue:qe,MultiValueContainer:$e,MultiValueLabel:Ge,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return q("div",n,t||q(Ie,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,a=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return q("div",Ye({css:i("option",e),className:r({option:!0,"option--is-disabled":o,"option--is-focused":a,"option--is-selected":u},n),ref:s},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return q("div",Ke({css:i("placeholder",e),className:r({placeholder:!0},n)},o),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps,a=e.isDisabled,u=e.isRtl;return q("div",xe({css:i("container",e),className:r({"--is-disabled":a,"--is-rtl":u},n)},o),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,a=e.innerProps;return q("div",Ze({css:i("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":o},n)},a),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.isMulti,o=e.getStyles,a=e.hasValue;return q("div",{css:o("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":i,"value-container--has-value":a},n)},t)}},Qe=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],et=function(e){for(var t=0;t=0||(i[n]=e[n]);return i}(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return q("input",ut({ref:t},n,{css:R({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}var lt=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.innerRef(Object(X.findDOMNode)(this))},i.componentWillUnmount=function(){this.props.innerRef(null)},i.render=function(){return this.props.children},r}(i.Component),ct=["boxSizing","height","overflow","paddingRight","position"],ft={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function pt(e){e.preventDefault()}function dt(e){e.stopPropagation()}function ht(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function vt(){return"ontouchstart"in window||navigator.maxTouchPoints}var mt=!(!window.document||!window.document.createElement),gt=0,bt=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i0,h=c-f-l,v=!1;h>n&&t.isBottom&&(o&&o(e),t.isBottom=!1),d&&t.isTop&&(u&&u(e),t.isTop=!1),d&&n>h?(i&&!t.isBottom&&i(e),p.scrollTop=c,v=!0,t.isBottom=!0):!d&&-n>l&&(a&&!t.isTop&&a(e),p.scrollTop=0,v=!0,t.isTop=!0),v&&t.cancelScroll(e)},t.onWheel=function(e){t.handleEventDelta(e,e.deltaY)},t.onTouchStart=function(e){t.touchStart=e.changedTouches[0].clientY},t.onTouchMove=function(e){var n=t.touchStart-e.changedTouches[0].clientY;t.handleEventDelta(e,n)},t.getScrollTarget=function(e){t.scrollTarget=e},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.startListening(this.scrollTarget)},i.componentWillUnmount=function(){this.stopListening(this.scrollTarget)},i.startListening=function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))},i.stopListening=function(e){"function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1)},i.render=function(){return o.a.createElement(lt,{innerRef:this.getScrollTarget},this.props.children)},r}(i.Component);function wt(e){var t=e.isEnabled,n=void 0===t||t,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,["isEnabled"]);return n?o.a.createElement(_t,r):r.children}var Ot=function(e,t){void 0===t&&(t={});var n=t,r=n.isSearchable,i=n.isMulti,o=n.label,a=n.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options"+(a?"":", press Enter to select the currently focused option")+", press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(r?",type to refine list":"")+", press Down to open the menu, "+(i?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},Ct=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return r?"option "+n+" is disabled. Select another option.":"option "+n+", selected."}},At=function(e){return!!e.isDisabled};var xt={clearIndicator:Le,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+i.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:Me,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:be,menu:function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,o=r.spacing,a=r.colors;return(t={label:"menu"})[function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n)]="100%",t.backgroundColor=a.neutral0,t.borderRadius=i,t.boxShadow="0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",t.marginBottom=o.menuGutter,t.marginTop=o.menuGutter,t.position="absolute",t.width="100%",t.zIndex=1,t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:ge,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,a=i.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*o.baseUnit+"px "+3*o.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var kt={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function St(){return(St=Object.assign||function(e){for(var t=1;t-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:At,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},jt=1,Nt=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},n.blockOptionHover=!1,n.isComposing=!1,n.clearFocusValueOnUpdate=!1,n.commonProps=void 0,n.components=void 0,n.hasGroups=!1,n.initialTouchX=0,n.initialTouchY=0,n.inputIsHiddenAfterUpdate=void 0,n.instancePrefix="",n.openAfterFocus=!1,n.scrollToFocusedOptionOnUpdate=!1,n.userIsDragging=void 0,n.controlRef=null,n.getControlRef=function(e){n.controlRef=e},n.focusedOptionRef=null,n.getFocusedOptionRef=function(e){n.focusedOptionRef=e},n.menuListRef=null,n.getMenuListRef=function(e){n.menuListRef=e},n.inputRef=null,n.getInputRef=function(e){n.inputRef=e},n.cacheComponents=function(e){n.components=Xe({},Je,{components:e}.components)},n.focus=n.focusInput,n.blur=n.blurInput,n.onChange=function(e,t){var r=n.props;(0,r.onChange)(e,St({},t,{name:r.name}))},n.setValue=function(e,t,r){void 0===t&&(t="set-value");var i=n.props,o=i.closeMenuOnSelect,a=i.isMulti;n.onInputChange("",{action:"set-value"}),o&&(n.inputIsHiddenAfterUpdate=!a,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})},n.selectOption=function(e){var t=n.props,r=t.blurInputOnSelect,i=t.isMulti,o=n.state.selectValue;if(i)if(n.isOptionSelected(e,o)){var a=n.getOptionValue(e);n.setValue(o.filter((function(e){return n.getOptionValue(e)!==a})),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(o,[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()},n.removeValue=function(e){var t=n.state.selectValue,r=n.getOptionValue(e),i=t.filter((function(e){return n.getOptionValue(e)!==r}));n.onChange(i.length?i:null,{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()},n.clearValue=function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})},n.popValue=function(){var e=n.state.selectValue,t=e[e.length-1],r=e.slice(0,e.length-1);n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(r.length?r:null,{action:"pop-value",removedValue:t})},n.getOptionLabel=function(e){return n.props.getOptionLabel(e)},n.getOptionValue=function(e){return n.props.getOptionValue(e)},n.getStyles=function(e,t){var r=xt[e](t);r.boxSizing="border-box";var i=n.props.styles[e];return i?i(r,t):r},n.getElementId=function(e){return n.instancePrefix+"-"+e},n.getActiveDescendentId=function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,i=t.focusedOption;if(i&&e){var o=r.focusable.indexOf(i),a=r.render[o];return a&&a.key}},n.announceAriaLiveSelection=function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:Ct(t,r)})},n.announceAriaLiveContext=function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:Ot(t,St({},r,{label:n.props["aria-label"]}))})},n.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())},n.onMenuMouseMove=function(e){n.blockOptionHover=!1},n.onControlMouseDown=function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},n.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,r=t.isMulti,i=t.menuIsOpen;n.focusInput(),i?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}},n.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,"touchend"===e.type?n.focusInput():setTimeout((function(){return n.focusInput()})))},n.onScroll=function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&ie(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()},n.onCompositionStart=function(){n.isComposing=!0},n.onCompositionEnd=function(){n.isComposing=!1},n.onTouchStart=function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)},n.onTouchMove=function(e){var t=e.touches.item(0);if(t){var r=Math.abs(t.clientX-n.initialTouchX),i=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=r>5||i>5}},n.onTouchEnd=function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)},n.onControlTouchEnd=function(e){n.userIsDragging||n.onControlMouseDown(e)},n.onClearIndicatorTouchEnd=function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)},n.onDropdownIndicatorTouchEnd=function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)},n.handleInputChange=function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()},n.onInputFocus=function(e){var t=n.props,r=t.isSearchable,i=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:i}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1},n.onInputBlur=function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))},n.onOptionHover=function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})},n.shouldHideSelectedOptions=function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t},n.onKeyDown=function(e){var t=n.props,r=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,a=t.inputValue,u=t.isClearable,s=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,f=t.tabSelectsValue,p=t.openMenuOnFocus,d=n.state,h=d.focusedOption,v=d.focusedValue,m=d.selectValue;if(!(s||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;n.focusValue("previous");break;case"ArrowRight":if(!r||a)return;n.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(v)n.removeValue(v);else{if(!i)return;r?n.popValue():u&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!l||!f||!h||p&&n.isOptionSelected(h,m))return;n.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(n.isComposing)return;n.selectOption(h);break}return;case"Escape":l?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):u&&o&&n.clearValue();break;case" ":if(a)return;if(!l){n.openMenu("first");break}if(!h)return;n.selectOption(h);break;case"ArrowUp":l?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":l?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!l)return;n.focusOption("pageup");break;case"PageDown":if(!l)return;n.focusOption("pagedown");break;case"Home":if(!l)return;n.focusOption("first");break;case"End":if(!l)return;n.focusOption("last");break;default:return}e.preventDefault()}},n.buildMenuOptions=function(e,t){var r=e.inputValue,i=void 0===r?"":r,o=e.options,a=function(e,r){var o=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:u,value:s,data:e},i))){var l=o?void 0:function(){return n.onOptionHover(e)},c=o?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:o,isSelected:a,key:f,label:u,type:"option",value:s}}};return o.reduce((function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var i=t.options.map((function(t,n){var i=a(t,r+"-"+n);return i&&e.focusable.push(t),i})).filter(Boolean);if(i.length){var o=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:o,data:t,options:i})}}else{var u=a(t,""+r);u&&(e.render.push(u),e.focusable.push(t))}return e}),{render:[],focusable:[]})};var r=t.value;n.cacheComponents=h(n.cacheComponents,Ae).bind(Ft(Ft(n))),n.cacheComponents(t.components),n.instancePrefix="react-select-"+(n.props.instanceId||++jt);var i=re(r);n.buildMenuOptions=h(n.buildMenuOptions,(function(e,t){var n=e,r=n[0],i=n[1],o=t,a=o[0];return Ae(i,o[1])&&Ae(r.inputValue,a.inputValue)&&Ae(r.options,a.options)})).bind(Ft(Ft(n)));var o=t.menuIsOpen?n.buildMenuOptions(t,i):{render:[],focusable:[]};return n.state.menuOptions=o,n.state.selectValue=i,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()},i.UNSAFE_componentWillReceiveProps=function(e){var t=this.props,n=t.options,r=t.value,i=t.menuIsOpen,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==i||e.inputValue!==o){var a=re(e.value),u=e.menuIsOpen?this.buildMenuOptions(e,a):{render:[],focusable:[]},s=this.getNextFocusedValue(a),l=this.getNextFocusedOption(u.focusable);this.setState({menuOptions:u,selectValue:a,focusedOption:l,focusedValue:s})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)},i.componentDidUpdate=function(e){var t,n,r,i,o,a=this.props,u=a.isDisabled,s=a.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetHeight/3,i.bottom+o>r.bottom?ae(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):i.top-o-1&&(u=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:o,focusedValue:null,focusedOption:o.focusable[u]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu"})}))},i.focusValue=function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,i=this.state,o=i.selectValue,a=i.focusedValue;if(n){this.setState({focusedOption:null});var u=o.indexOf(a);a||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=o.length-1,l=-1;if(o.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0?a-1:i.length-1:"down"===e?o=(a+1)%i.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+t)>i.length-1&&(o=i.length-1):"last"===e&&(o=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[o],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:At(i[o])}})}},i.getTheme=function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(kt):St({},kt,this.props.theme):kt},i.getCommonProps=function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,i=this.props,o=i.classNamePrefix,a=i.isMulti,u=i.isRtl,s=i.options,l=this.state.selectValue,c=this.hasValue();return{cx:ne.bind(null,o),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:a,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:i,theme:this.getTheme()}},i.getNextFocusedValue=function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]},i.hasValue=function(){return this.state.selectValue.length>0},i.hasOptions=function(){return!!this.state.menuOptions.render.length},i.countOptions=function(){return this.state.menuOptions.focusable.length},i.isClearable=function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t},i.isOptionDisabled=function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)},i.isOptionSelected=function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))},i.filterOption=function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)},i.formatOptionLabel=function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)},i.formatGroupLabel=function(e){return this.props.formatGroupLabel(e)},i.startListeningComposition=function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))},i.stopListeningComposition=function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))},i.startListeningToTouch=function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))},i.stopListeningToTouch=function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))},i.constructAriaLiveMessage=function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,i=e.focusedOption,o=this.props,a=o.options,u=o.menuIsOpen,s=o.inputValue,l=o.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value "+n(t)+" focused, "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(i&&u?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option "+n(t)+" focused"+(t.isDisabled?" disabled":"")+", "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:a}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t},i.renderInput=function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,l=r||this.getElementId("input"),c={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return o.a.createElement(st,St({id:l,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ee,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,value:""},c));var f=this.commonProps,p=f.cx,d=f.theme,h=f.selectProps;return o.a.createElement(u,St({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:l,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:h,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:i},c))},i.renderPlaceholderOrValue=function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,f=c.controlShouldRenderValue,p=c.isDisabled,d=c.isMulti,h=c.inputValue,v=c.placeholder,m=this.state,g=m.selectValue,b=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!f)return h?null:o.a.createElement(s,St({},l,{key:"placeholder",isDisabled:p,isFocused:y}),v);if(d)return g.map((function(t,u){var s=t===b;return o.a.createElement(n,St({},l,{components:{Container:r,Label:i,Remove:a},isFocused:s,isDisabled:p,key:e.getOptionValue(t),index:u,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var E=g[0];return o.a.createElement(u,St({},l,{data:E,isDisabled:p}),this.formatOptionLabel(E,"value"))},i.renderClearIndicator=function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.a.createElement(e,St({},t,{innerProps:u,isFocused:a}))},i.renderLoadingIndicator=function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!e||!i)return null;return o.a.createElement(e,St({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))},i.renderIndicatorSeparator=function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return o.a.createElement(n,St({},r,{isDisabled:i,isFocused:a}))},i.renderDropdownIndicator=function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.a.createElement(e,St({},t,{innerProps:i,isDisabled:n,isFocused:r}))},i.renderMenu=function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,v=this.props,m=v.captureMenuScroll,g=v.inputValue,b=v.isLoading,y=v.loadingMessage,E=v.minMenuHeight,_=v.maxMenuHeight,w=v.menuIsOpen,O=v.menuPlacement,C=v.menuPosition,A=v.menuPortalTarget,x=v.menuShouldBlockScroll,k=v.menuShouldScrollIntoView,S=v.noOptionsMessage,F=v.onMenuScrollToTop,D=v.onMenuScrollToBottom;if(!w)return null;var I,j=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,o.a.createElement(c,St({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())I=h.render.map((function(t){if("group"===t.type){t.type;var i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(t,["type"]),a=t.key+"-heading";return o.a.createElement(n,St({},f,i,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return j(e)})))}if("option"===t.type)return j(t)}));else if(b){var N=y({inputValue:g});if(null===N)return null;I=o.a.createElement(s,f,N)}else{var M=S({inputValue:g});if(null===M)return null;I=o.a.createElement(l,f,M)}var L={minMenuHeight:E,maxMenuHeight:_,menuPlacement:O,menuPosition:C,menuShouldScrollIntoView:k},P=o.a.createElement(ve,St({},f,L),(function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return o.a.createElement(i,St({},f,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),o.a.createElement(wt,{isEnabled:m,onTopArrive:F,onBottomArrive:D},o.a.createElement(Et,{isEnabled:x},o.a.createElement(a,St({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),I))))}));return A||"fixed"===C?o.a.createElement(u,St({},f,{appendTo:A,controlElement:this.controlRef,menuPlacement:O,menuPosition:C}),P):P},i.renderFormField=function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(i){if(n){var s=u.map((function(t){return e.getOptionValue(t)})).join(n);return o.a.createElement("input",{name:a,type:"hidden",value:s})}var l=u.length>0?u.map((function(t,n){return o.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})})):o.a.createElement("input",{name:a,type:"hidden"});return o.a.createElement("div",null,l)}var c=u[0]?this.getOptionValue(u[0]):"";return o.a.createElement("input",{name:a,type:"hidden",value:c})}},i.renderLiveRegion=function(){return this.state.isFocused?o.a.createElement(at,{"aria-live":"polite"},o.a.createElement("p",{id:"aria-selection-event"},"\xa0",this.state.ariaLiveSelection),o.a.createElement("p",{id:"aria-context"},"\xa0",this.constructAriaLiveMessage())):null},i.render=function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,u=a.className,s=a.id,l=a.isDisabled,c=a.menuIsOpen,f=this.state.isFocused,p=this.commonProps=this.getCommonProps();return o.a.createElement(r,St({},p,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:f}),this.renderLiveRegion(),o.a.createElement(t,St({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:f,menuIsOpen:c}),o.a.createElement(i,St({},p,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),o.a.createElement(n,St({},p,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())},r}(i.Component);function Mt(){return(Mt=Object.assign||function(e){for(var t=1;t1?n-1:0),i=1;i=0||(i[n]=e[n]);return i}(t,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return o.a.createElement(Pt,Mt({},n,{ref:function(t){e.select=t},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))},r}(i.Component),Tt.defaultProps=Lt,Rt),Vt=n(266),zt=n.n(Vt),Ut=n(397),Wt=n.n(Ut),Ht=n(352);var $t=function(){return Object(i.useContext)(Ht.a)},Gt=37,qt=39;function Yt(e){var t=e.block,n=e.centered,r=e.changeSelectedValue,i=e.className,a=e.handleKeydown,u=e.style,s=e.values,l=e.selectedValue,c=e.tabRefs;return o.a.createElement("div",{className:n?"tabs--centered":null},o.a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:zt()("tabs",i,{"tabs--block":t}),style:u},s.map((function(e){var t=e.value,n=e.label;return o.a.createElement("li",{role:"tab",tabIndex:"0","aria-selected":l===t,className:zt()("tab-item",{"tab-item--active":l===t}),key:t,ref:function(e){return c.push(e)},onKeyDown:function(e){return a(c,e.target,e)},onFocus:function(){return r(t)},onClick:function(){return r(t)}},n)}))))}function Kt(e){var t=e.placeholder,n=e.selectedValue,r=e.changeSelectedValue,i=e.size,a=e.values,u=a;if(u[0].group){var s=_.groupBy(u,"group");u=Object.keys(s).map((function(e){return{label:e,options:s[e]}}))}return o.a.createElement(Bt,{className:"react-select-container react-select--"+i,classNamePrefix:"react-select",options:u,isClearable:n,placeholder:t,value:a.find((function(e){return e.value==n})),onChange:function(e){return r(e?e.value:null)}})}var Zt=function(e){e.block,e.centered;var t=e.children,n=e.defaultValue,a=e.groupId,u=e.label,s=e.placeholder,l=e.select,c=e.size,f=(e.style,e.values),p=e.urlKey,d=$t(),h=d.tabGroupChoices,v=d.setTabGroupChoices,m=Object(i.useState)(n),g=m[0],b=m[1];if(null!=a){var y=h[a];null!=y&&y!==g&&b(y)}var E=function(e){b(e),null!=a&&v(a,e)},_=[],w=function(e,t,n){switch(n.keyCode){case qt:!function(e,t){var n=e.indexOf(t)+1;e[n]?e[n].focus():e[0].focus()}(e,t);break;case Gt:!function(e,t){var n=e.indexOf(t)-1;e[n]?e[n].focus():e[e.length-1].focus()}(e,t)}};return Object(i.useEffect)((function(){if("undefined"!=typeof window&&window.location&&p){var e=Wt.a.parse(window.location.search);e[p]&&b(e[p])}}),[]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"margin-bottom--"+(c||"md")},u&&o.a.createElement("div",{className:"margin-vert--sm"},u),f.length>1&&(l?o.a.createElement(Kt,Object(r.a)({changeSelectedValue:E,handleKeydown:w,placeholder:s,selectedValue:g,size:c,tabRefs:_},e)):o.a.createElement(Yt,Object(r.a)({changeSelectedValue:E,handleKeydown:w,selectedValue:g,tabRefs:_},e)))),i.Children.toArray(t).filter((function(e){return e.props.value===g}))[0])},Xt=n(272),Jt=n(332),Qt=n(267),en=n(305),tn=n.n(en),nn=n(234),rn=n.n(nn),on=(n(235),Object(a.a)("h2")),an=[{title:"Ultra-Fast",icon:"zap",description:o.a.createElement(o.a.Fragment,null,"Built in ",o.a.createElement("a",{href:"https://go.dev/"},"Go"),", gnet is ",o.a.createElement("a",{href:"#performance"},"ultra-fast and memory efficient")," based on the event-driven mechanism. It's designed to create a networking server framework for Go that performs on par with Redis and Haproxy for networking packets handling.")},{title:"Lock-Free",icon:"unlock",description:o.a.createElement(o.a.Fragment,null,"gnet is lock-free during the entire runtime, which keeps gnet free from synchronization issues and speeds it up.")},{title:"Concise & Easy-to-use APIs",icon:"layers",description:o.a.createElement(o.a.Fragment,null,"gnet provides concise and easy-to-use APIs for users, it only exposes the essential APIs and takes over most of the tough work for users, minimizing the complexity of business code so that developers are able to concentrate on business logic instead of the underlying implementations.")},{title:"Multiple Protocols",icon:"grid",description:o.a.createElement(o.a.Fragment,null,"gnet supports multiple protocols/IPC mechanism: TCP, UDP and Unix Domain Socket, enabling you to develop a variety of networking applications.")},{title:"Cross Platform",icon:"cpu",description:o.a.createElement(o.a.Fragment,null,"gnet is devised as a cross-platform framework, as a result, it works faultlessly on multiple platforms: Linux, FreeBSD, DragonFly BSD, Windows.")},{title:"Powerful Libraries",icon:"briefcase",description:o.a.createElement(o.a.Fragment,null,"There is a rich set of libraries in gnet, such as memory pool, goroutine pool, elastic buffers, logging package, etc., which makes it convenient for developers to build fast and efficient networking applications.")}];function un(e){var t,n,i=e.features,a=[];for(t=0,n=i.length;t0&&i.a.createElement("div",{className:"row footer__links"},i.a.createElement("div",{className:"col col--5 footer__col"},i.a.createElement("div",{className:"margin-bottom--md"},i.a.createElement(f.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),i.a.createElement("div",{className:"margin-bottom--md"},i.a.createElement(N,{description:!1,width:"150px"})),i.a.createElement("div",null,i.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},i.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",i.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},i.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",i.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},i.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),u.map((function(e,t){return i.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?i.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?i.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?i.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):i.a.createElement("li",{key:e.href||e.to,className:"footer__item"},i.a.createElement(P,e))}))):null)}))),(l||o)&&i.a.createElement("div",{className:"text--center"},l&&l.src&&i.a.createElement("div",{className:"margin-bottom--sm"},l.href?i.a.createElement("a",{href:l.href,target:"_blank",rel:"noopener noreferrer",className:L.a.footerLogoLink},i.a.createElement(T,{alt:l.alt,url:c})):i.a.createElement(T,{alt:l.alt,url:c}),i.a.createElement("br",null),i.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:L.a.footerLogoLink},i.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),o,i.a.createElement("br",null),i.a.createElement("small",null,i.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",i.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},B=n(290),V=n(291),z=n(3);n(135);t.a=function(e){var t=Object(h.a)().siteConfig,n=void 0===t?{}:t,r=n.favicon,u=(n.tagline,n.title),s=n.themeConfig.image,l=n.url,c=e.children,f=e.title,p=e.noFooter,d=e.description,v=e.image,m=e.keywords,g=(e.permalink,e.version),b=f?f+" | "+u:u,y=v||s,E=l+Object(O.a)(y),_=Object(O.a)(r),w=Object(z.h)(),C=w?"https://gnet.host"+(w.pathname.endsWith("/")?w.pathname:w.pathname+"/"):null;return i.a.createElement(V.a,null,i.a.createElement(B.a,null,i.a.createElement(a.a,null,i.a.createElement("html",{lang:"en"}),i.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),b&&i.a.createElement("title",null,b),b&&i.a.createElement("meta",{property:"og:title",content:b}),r&&i.a.createElement("link",{rel:"shortcut icon",href:_}),d&&i.a.createElement("meta",{name:"description",content:d}),d&&i.a.createElement("meta",{property:"og:description",content:d}),g&&i.a.createElement("meta",{name:"docsearch:version",content:g}),m&&m.length&&i.a.createElement("meta",{name:"keywords",content:m.join(",")}),y&&i.a.createElement("meta",{property:"og:image",content:E}),y&&i.a.createElement("meta",{property:"twitter:image",content:E}),y&&i.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+b}),y&&i.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),y&&i.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),C&&i.a.createElement("meta",{property:"og:url",content:C}),i.a.createElement("meta",{name:"twitter:card",content:"summary"}),C&&i.a.createElement("link",{rel:"canonical",href:C})),i.a.createElement(o.a,null),i.a.createElement(I,null),i.a.createElement("div",{className:"main-wrapper"},c),!p&&i.a.createElement(R,null)))}},297:function(e,t,n){"use strict";(function(e){var r=n(1),i=(n(295),n(296),n(78),n(79),n(306),n(0)),o=n.n(i),a=n(307),u=n.n(a),s=n(320),l=n(52),c=n(266),f=n.n(c),p=n(315),d=n(308),h=n.n(d),v=n(267),m=n(276),g=n(136),b=n.n(g);(void 0!==e?e:window).Prism=l.a,n(309),n(310),n(311),n(312),n(313),n(314);var y=/{([\d,-]+)}/,E=/title=".*"/;t.a=function(e){var t=e.children,n=e.className,a=e.metastring,l=Object(v.a)().siteConfig.themeConfig.prism,c=void 0===l?{}:l,d=Object(i.useState)(!1),g=d[0],_=d[1],w=Object(i.useState)(!1),O=w[0],C=w[1];Object(i.useEffect)((function(){C(!0)}),[]);var A=Object(i.useRef)(null),x=Object(i.useRef)(null),k=[],S="",F=Object(m.a)().isDarkTheme,D=c.theme||p.a,I=c.darkTheme||D,j=F?I:D;if(a&&y.test(a)){var N=a.match(y)[1];k=h.a.parse(N).filter((function(e){return e>0}))}a&&E.test(a)&&(S=a.match(E)[0].split("title=")[1].replace(/"+/g,"")),Object(i.useEffect)((function(){var e;return x.current&&(e=new u.a(x.current,{target:function(){return A.current}})),function(){e&&e.destroy()}}),[x.current,A.current]);var M=n&&n.replace(/language-/,"");!M&&c.defaultLanguage&&(M=c.defaultLanguage);var L=function(){window.getSelection().empty(),_(!0),setTimeout((function(){return _(!1)}),2e3)};return o.a.createElement(s.a,Object(r.a)({},s.b,{key:O,theme:j,code:t.trim(),language:M}),(function(e){var t,n,i=e.className,a=e.style,u=e.tokens,s=e.getLineProps,l=e.getTokenProps;return o.a.createElement(o.a.Fragment,null,S&&o.a.createElement("div",{style:a,className:b.a.codeBlockTitle},S),o.a.createElement("div",{className:b.a.codeBlockContent},o.a.createElement("button",{ref:x,type:"button","aria-label":"Copy code to clipboard",className:f()(b.a.copyButton,(t={},t[b.a.copyButtonWithTitle]=S,t)),onClick:L},g?"Copied":"Copy"),o.a.createElement("pre",{className:f()(i,b.a.codeBlock,(n={},n[b.a.codeBlockWithTitle]=S,n))},o.a.createElement("div",{ref:A,className:b.a.codeBlockLines,style:a},u.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var n=s({line:e,key:t});return k.includes(t+1)&&(n.className=n.className+" docusaurus-highlight-code-line"),o.a.createElement("div",Object(r.a)({key:t},n),e.map((function(e,t){return o.a.createElement("span",Object(r.a)({key:t},l({token:e,key:t})))})))}))))))}))}}).call(this,n(77))},305:function(e,t,n){(function(e,r){var i;(function(){var o="Expected a function",a="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],s="[object Arguments]",l="[object Array]",c="[object Boolean]",f="[object Date]",p="[object Error]",d="[object Function]",h="[object GeneratorFunction]",v="[object Map]",m="[object Number]",g="[object Object]",b="[object RegExp]",y="[object Set]",E="[object String]",_="[object Symbol]",w="[object WeakMap]",O="[object ArrayBuffer]",C="[object DataView]",A="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",S="[object Int16Array]",F="[object Int32Array]",D="[object Uint8Array]",I="[object Uint16Array]",j="[object Uint32Array]",N=/\b__p \+= '';/g,M=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,P=/&(?:amp|lt|gt|quot|#39);/g,T=/[&<>"']/g,R=RegExp(P.source),B=RegExp(T.source),V=/<%-([\s\S]+?)%>/g,z=/<%([\s\S]+?)%>/g,U=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/[\\^$.*+?()[\]{}|]/g,q=RegExp(G.source),Y=/^\s+|\s+$/g,K=/^\s+/,Z=/\s+$/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,ue=/^0o[0-7]+$/i,se=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,pe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",he="[\\ud800-\\udfff]",ve="["+de+"]",me="["+pe+"]",ge="\\d+",be="[\\u2700-\\u27bf]",ye="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ee="[^\\ud800-\\udfff"+de+ge+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",we="[^\\ud800-\\udfff]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ce="[\\ud800-\\udbff][\\udc00-\\udfff]",Ae="[A-Z\\xc0-\\xd6\\xd8-\\xde]",xe="(?:"+ye+"|"+Ee+")",ke="(?:"+Ae+"|"+Ee+")",Se="(?:"+me+"|"+_e+")"+"?",Fe="[\\ufe0e\\ufe0f]?"+Se+("(?:\\u200d(?:"+[we,Oe,Ce].join("|")+")[\\ufe0e\\ufe0f]?"+Se+")*"),De="(?:"+[be,Oe,Ce].join("|")+")"+Fe,Ie="(?:"+[we+me+"?",me,Oe,Ce,he].join("|")+")",je=RegExp("['\u2019]","g"),Ne=RegExp(me,"g"),Me=RegExp(_e+"(?="+_e+")|"+Ie+Fe,"g"),Le=RegExp([Ae+"?"+ye+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ve,Ae,"$"].join("|")+")",ke+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ve,Ae+xe,"$"].join("|")+")",Ae+"?"+xe+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ae+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ge,De].join("|"),"g"),Pe=RegExp("[\\u200d\\ud800-\\udfff"+pe+"\\ufe0e\\ufe0f]"),Te=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Be=-1,Ve={};Ve[A]=Ve[x]=Ve[k]=Ve[S]=Ve[F]=Ve[D]=Ve["[object Uint8ClampedArray]"]=Ve[I]=Ve[j]=!0,Ve[s]=Ve[l]=Ve[O]=Ve[c]=Ve[C]=Ve[f]=Ve[p]=Ve[d]=Ve[v]=Ve[m]=Ve[g]=Ve[b]=Ve[y]=Ve[E]=Ve[w]=!1;var ze={};ze[s]=ze[l]=ze[O]=ze[C]=ze[c]=ze[f]=ze[A]=ze[x]=ze[k]=ze[S]=ze[F]=ze[v]=ze[m]=ze[g]=ze[b]=ze[y]=ze[E]=ze[_]=ze[D]=ze["[object Uint8ClampedArray]"]=ze[I]=ze[j]=!0,ze[p]=ze[d]=ze[w]=!1;var Ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,He=parseInt,$e="object"==typeof e&&e&&e.Object===Object&&e,Ge="object"==typeof self&&self&&self.Object===Object&&self,qe=$e||Ge||Function("return this")(),Ye=t&&!t.nodeType&&t,Ke=Ye&&"object"==typeof r&&r&&!r.nodeType&&r,Ze=Ke&&Ke.exports===Ye,Xe=Ze&&$e.process,Je=function(){try{var e=Ke&&Ke.require&&Ke.require("util").types;return e||Xe&&Xe.binding&&Xe.binding("util")}catch(t){}}(),Qe=Je&&Je.isArrayBuffer,et=Je&&Je.isDate,tt=Je&&Je.isMap,nt=Je&&Je.isRegExp,rt=Je&&Je.isSet,it=Je&&Je.isTypedArray;function ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function pt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Mt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Lt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Pt=xt({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),Tt=xt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Rt(e){return"\\"+Ue[e]}function Bt(e){return Pe.test(e)}function Vt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var Yt=function e(t){var n,r=(t=null==t?qe:Yt.defaults(qe.Object(),t,Yt.pick(qe,Re))).Array,i=t.Date,pe=t.Error,de=t.Function,he=t.Math,ve=t.Object,me=t.RegExp,ge=t.String,be=t.TypeError,ye=r.prototype,Ee=de.prototype,_e=ve.prototype,we=t["__core-js_shared__"],Oe=Ee.toString,Ce=_e.hasOwnProperty,Ae=0,xe=(n=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ke=_e.toString,Se=Oe.call(ve),Fe=qe._,De=me("^"+Oe.call(Ce).replace(G,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ie=Ze?t.Buffer:void 0,Me=t.Symbol,Pe=t.Uint8Array,Ue=Ie?Ie.allocUnsafe:void 0,$e=zt(ve.getPrototypeOf,ve),Ge=ve.create,Ye=_e.propertyIsEnumerable,Ke=ye.splice,Xe=Me?Me.isConcatSpreadable:void 0,Je=Me?Me.iterator:void 0,bt=Me?Me.toStringTag:void 0,xt=function(){try{var e=Qi(ve,"defineProperty");return e({},"",{}),e}catch(t){}}(),Kt=t.clearTimeout!==qe.clearTimeout&&t.clearTimeout,Zt=i&&i.now!==qe.Date.now&&i.now,Xt=t.setTimeout!==qe.setTimeout&&t.setTimeout,Jt=he.ceil,Qt=he.floor,en=ve.getOwnPropertySymbols,tn=Ie?Ie.isBuffer:void 0,nn=t.isFinite,rn=ye.join,on=zt(ve.keys,ve),an=he.max,un=he.min,sn=i.now,ln=t.parseInt,cn=he.random,fn=ye.reverse,pn=Qi(t,"DataView"),dn=Qi(t,"Map"),hn=Qi(t,"Promise"),vn=Qi(t,"Set"),mn=Qi(t,"WeakMap"),gn=Qi(ve,"create"),bn=mn&&new mn,yn={},En=ko(pn),_n=ko(dn),wn=ko(hn),On=ko(vn),Cn=ko(mn),An=Me?Me.prototype:void 0,xn=An?An.valueOf:void 0,kn=An?An.toString:void 0;function Sn(e){if(Ha(e)&&!Na(e)&&!(e instanceof jn)){if(e instanceof In)return e;if(Ce.call(e,"__wrapped__"))return So(e)}return new In(e)}var Fn=function(){function e(){}return function(t){if(!Wa(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Dn(){}function In(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function jn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Zn(e,t,n,r,i,o){var a,u=1&t,l=2&t,p=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Wa(e))return e;var w=Na(e);if(w){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ce.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return gi(e,a)}else{var N=no(e),M=N==d||N==h;if(Ta(e))return fi(e,u);if(N==g||N==s||M&&!i){if(a=l||M?{}:io(e),!u)return l?function(e,t){return bi(e,to(e),t)}(e,function(e,t){return e&&bi(t,_u(t),e)}(a,e)):function(e,t){return bi(e,eo(e),t)}(e,Gn(a,e))}else{if(!ze[N])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case O:return pi(e);case c:case f:return new r(+e);case C:return function(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case x:case k:case S:case F:case D:case"[object Uint8ClampedArray]":case I:case j:return di(e,n);case v:return new r;case m:case E:return new r(e);case b:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case y:return new r;case _:return i=e,xn?ve(xn.call(i)):{}}var i}(e,N,u)}}o||(o=new Tn);var L=o.get(e);if(L)return L;o.set(e,a),Ka(e)?e.forEach((function(r){a.add(Zn(r,t,n,r,e,o))})):$a(e)&&e.forEach((function(r,i){a.set(i,Zn(r,t,n,i,e,o))}));var P=w?void 0:(p?l?Gi:$i:l?_u:Eu)(e);return ut(P||e,(function(r,i){P&&(r=e[i=r]),Wn(a,i,Zn(r,t,n,i,e,o))})),a}function Xn(e,t,n){var r=n.length;if(null==e)return!r;for(e=ve(e);r--;){var i=n[r],o=t[i],a=e[i];if(void 0===a&&!(i in e)||!o(a))return!1}return!0}function Jn(e,t,n){if("function"!=typeof e)throw new be(o);return Eo((function(){e.apply(void 0,n)}),t)}function Qn(e,t,n,r){var i=-1,o=ft,a=!0,u=e.length,s=[],l=t.length;if(!u)return s;n&&(t=dt(t,Dt(n))),r?(o=pt,a=!1):t.length>=200&&(o=jt,a=!1,t=new Pn(t));e:for(;++i-1},Mn.prototype.set=function(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ln.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(dn||Mn),string:new Nn}},Ln.prototype.delete=function(e){var t=Xi(this,e).delete(e);return this.size-=t?1:0,t},Ln.prototype.get=function(e){return Xi(this,e).get(e)},Ln.prototype.has=function(e){return Xi(this,e).has(e)},Ln.prototype.set=function(e,t){var n=Xi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Pn.prototype.add=Pn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pn.prototype.has=function(e){return this.__data__.has(e)},Tn.prototype.clear=function(){this.__data__=new Mn,this.size=0},Tn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Tn.prototype.get=function(e){return this.__data__.get(e)},Tn.prototype.has=function(e){return this.__data__.has(e)},Tn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!dn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ln(r)}return n.set(e,t),this.size=n.size,this};var er=_i(sr),tr=_i(lr,!0);function nr(e,t){var n=!0;return er(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function rr(e,t,n){for(var r=-1,i=e.length;++r0&&n(u)?t>1?or(u,t-1,n,r,i):ht(i,u):r||(i[i.length]=u)}return i}var ar=wi(),ur=wi(!0);function sr(e,t){return e&&ar(e,t,Eu)}function lr(e,t){return e&&ur(e,t,Eu)}function cr(e,t){return ct(t,(function(t){return Va(e[t])}))}function fr(e,t){for(var n=0,r=(t=ui(t,e)).length;null!=e&&nt}function vr(e,t){return null!=e&&Ce.call(e,t)}function mr(e,t){return null!=e&&t in ve(e)}function gr(e,t,n){for(var i=n?pt:ft,o=e[0].length,a=e.length,u=a,s=r(a),l=1/0,c=[];u--;){var f=e[u];u&&t&&(f=dt(f,Dt(t))),l=un(f.length,l),s[u]=!n&&(t||o>=120&&f.length>=120)?new Pn(u&&f):void 0}f=e[0];var p=-1,d=s[0];e:for(;++p=u)return s;var l=n[r];return s*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)}))}function Nr(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)u!==e&&Ke.call(u,s,1),Ke.call(e,s,1);return e}function Lr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;ao(i)?Ke.call(e,i,1):Qr(e,i)}}return e}function Pr(e,t){return e+Qt(cn()*(t-e+1))}function Tr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Rr(e,t){return _o(vo(e,t,Gu),e+"")}function Br(e){return Bn(Fu(e))}function Vr(e,t){var n=Fu(e);return Co(n,Kn(t,0,n.length))}function zr(e,t,n,r){if(!Wa(e))return e;for(var i=-1,o=(t=ui(t,e)).length,a=o-1,u=e;null!=u&&++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i>>1,a=e[o];null!==a&&!Xa(a)&&(n?a<=t:a=200){var l=t?null:Ti(e);if(l)return Wt(l);a=!1,i=jt,s=new Pn}else s=t?[]:u;e:for(;++r=r?e:$r(e,t,n)}var ci=Kt||function(e){return qe.clearTimeout(e)};function fi(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function pi(e){var t=new e.constructor(e.byteLength);return new Pe(t).set(new Pe(e)),t}function di(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function hi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Xa(e),a=void 0!==t,u=null===t,s=t==t,l=Xa(t);if(!u&&!l&&!o&&e>t||o&&a&&s&&!u&&!l||r&&a&&s||!n&&s||!i)return 1;if(!r&&!o&&!l&&e1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&uo(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=ve(t);++r-1?i[o?t[a]:a]:void 0}}function ki(e){return Hi((function(t){var n=t.length,r=n,i=In.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new be(o);if(i&&!u&&"wrapper"==Yi(a))var u=new In([],!0)}for(r=u?r:n;++r1&&y.reverse(),f&&lu))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,p=!0,d=2&n?new Pn:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(X,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return ut(u,(function(n){var r="_."+n[0];t&n[1]&&!ft(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(J);return t?t[1].split(Q):[]}(r),n)))}function Oo(e){var t=0,n=0;return function(){var r=sn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Co(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Yo(e,n)}));function ta(e){var t=Sn(e);return t.__chain__=!0,t}function na(e,t){return t(e)}var ra=Hi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Yn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof jn&&ao(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new In(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var ia=yi((function(e,t,n){Ce.call(e,n)?++e[n]:qn(e,n,1)}));var oa=xi(jo),aa=xi(No);function ua(e,t){return(Na(e)?ut:er)(e,Zi(t,3))}function sa(e,t){return(Na(e)?st:tr)(e,Zi(t,3))}var la=yi((function(e,t,n){Ce.call(e,n)?e[n].push(t):qn(e,n,[t])}));var ca=Rr((function(e,t,n){var i=-1,o="function"==typeof t,a=La(e)?r(e.length):[];return er(e,(function(e){a[++i]=o?ot(t,e,n):br(e,t,n)})),a})),fa=yi((function(e,t,n){qn(e,n,t)}));function pa(e,t){return(Na(e)?dt:kr)(e,Zi(t,3))}var da=yi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ha=Rr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&uo(e,t[0],t[1])?t=[]:n>2&&uo(t[0],t[1],t[2])&&(t=[t[0]]),jr(e,or(t,1),[])})),va=Zt||function(){return qe.Date.now()};function ma(e,t,n){return t=n?void 0:t,Bi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ga(e,t){var n;if("function"!=typeof t)throw new be(o);return e=ru(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ba=Rr((function(e,t,n){var r=1;if(n.length){var i=Ut(n,Ki(ba));r|=32}return Bi(e,r,t,n,i)})),ya=Rr((function(e,t,n){var r=3;if(n.length){var i=Ut(n,Ki(ya));r|=32}return Bi(t,r,e,n,i)}));function Ea(e,t,n){var r,i,a,u,s,l,c=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new be(o);function h(t){var n=r,o=i;return r=i=void 0,c=t,u=e.apply(o,n)}function v(e){return c=e,s=Eo(g,t),f?h(e):u}function m(e){var n=e-l;return void 0===l||n>=t||n<0||p&&e-c>=a}function g(){var e=va();if(m(e))return b(e);s=Eo(g,function(e){var n=t-(e-l);return p?un(n,a-(e-c)):n}(e))}function b(e){return s=void 0,d&&r?h(e):(r=i=void 0,u)}function y(){var e=va(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return v(l);if(p)return ci(s),s=Eo(g,t),h(l)}return void 0===s&&(s=Eo(g,t)),u}return t=ou(t)||0,Wa(n)&&(f=!!n.leading,a=(p="maxWait"in n)?an(ou(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&ci(s),c=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?u:b(va())},y}var _a=Rr((function(e,t){return Jn(e,1,t)})),wa=Rr((function(e,t,n){return Jn(e,ou(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new be(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||Ln),n}function Ca(e){if("function"!=typeof e)throw new be(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Ln;var Aa=si((function(e,t){var n=(t=1==t.length&&Na(t[0])?dt(t[0],Dt(Zi())):dt(or(t,1),Dt(Zi()))).length;return Rr((function(r){for(var i=-1,o=un(r.length,n);++i=t})),ja=yr(function(){return arguments}())?yr:function(e){return Ha(e)&&Ce.call(e,"callee")&&!Ye.call(e,"callee")},Na=r.isArray,Ma=Qe?Dt(Qe):function(e){return Ha(e)&&dr(e)==O};function La(e){return null!=e&&Ua(e.length)&&!Va(e)}function Pa(e){return Ha(e)&&La(e)}var Ta=tn||os,Ra=et?Dt(et):function(e){return Ha(e)&&dr(e)==f};function Ba(e){if(!Ha(e))return!1;var t=dr(e);return t==p||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!qa(e)}function Va(e){if(!Wa(e))return!1;var t=dr(e);return t==d||t==h||"[object AsyncFunction]"==t||"[object Proxy]"==t}function za(e){return"number"==typeof e&&e==ru(e)}function Ua(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Wa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ha(e){return null!=e&&"object"==typeof e}var $a=tt?Dt(tt):function(e){return Ha(e)&&no(e)==v};function Ga(e){return"number"==typeof e||Ha(e)&&dr(e)==m}function qa(e){if(!Ha(e)||dr(e)!=g)return!1;var t=$e(e);if(null===t)return!0;var n=Ce.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Se}var Ya=nt?Dt(nt):function(e){return Ha(e)&&dr(e)==b};var Ka=rt?Dt(rt):function(e){return Ha(e)&&no(e)==y};function Za(e){return"string"==typeof e||!Na(e)&&Ha(e)&&dr(e)==E}function Xa(e){return"symbol"==typeof e||Ha(e)&&dr(e)==_}var Ja=it?Dt(it):function(e){return Ha(e)&&Ua(e.length)&&!!Ve[dr(e)]};var Qa=Mi(xr),eu=Mi((function(e,t){return e<=t}));function tu(e){if(!e)return[];if(La(e))return Za(e)?Gt(e):gi(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=no(e);return(t==v?Vt:t==y?Wt:Fu)(e)}function nu(e){return e?(e=ou(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ru(e){var t=nu(e),n=t%1;return t==t?n?t-n:t:0}function iu(e){return e?Kn(ru(e),0,4294967295):0}function ou(e){if("number"==typeof e)return e;if(Xa(e))return NaN;if(Wa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Wa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Y,"");var n=oe.test(e);return n||ue.test(e)?He(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function au(e){return bi(e,_u(e))}function uu(e){return null==e?"":Xr(e)}var su=Ei((function(e,t){if(fo(t)||La(t))bi(t,Eu(t),e);else for(var n in t)Ce.call(t,n)&&Wn(e,n,t[n])})),lu=Ei((function(e,t){bi(t,_u(t),e)})),cu=Ei((function(e,t,n,r){bi(t,_u(t),e,r)})),fu=Ei((function(e,t,n,r){bi(t,Eu(t),e,r)})),pu=Hi(Yn);var du=Rr((function(e,t){e=ve(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&uo(t[0],t[1],i)&&(r=1);++n1),t})),bi(e,Gi(e),n),r&&(n=Zn(n,7,Ui));for(var i=t.length;i--;)Qr(n,t[i]);return n}));var Au=Hi((function(e,t){return null==e?{}:function(e,t){return Nr(e,t,(function(t,n){return mu(e,n)}))}(e,t)}));function xu(e,t){if(null==e)return{};var n=dt(Gi(e),(function(e){return[e]}));return t=Zi(t),Nr(e,n,(function(e,n){return t(e,n[0])}))}var ku=Ri(Eu),Su=Ri(_u);function Fu(e){return null==e?[]:It(e,Eu(e))}var Du=Ci((function(e,t,n){return t=t.toLowerCase(),e+(n?Iu(t):t)}));function Iu(e){return Bu(uu(e).toLowerCase())}function ju(e){return(e=uu(e))&&e.replace(le,Pt).replace(Ne,"")}var Nu=Ci((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Mu=Ci((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Lu=Oi("toLowerCase");var Pu=Ci((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Tu=Ci((function(e,t,n){return e+(n?" ":"")+Bu(t)}));var Ru=Ci((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Bu=Oi("toUpperCase");function Vu(e,t,n){return e=uu(e),void 0===(t=n?void 0:t)?function(e){return Te.test(e)}(e)?function(e){return e.match(Le)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var zu=Rr((function(e,t){try{return ot(e,void 0,t)}catch(n){return Ba(n)?n:new pe(n)}})),Uu=Hi((function(e,t){return ut(t,(function(t){t=xo(t),qn(e,t,ba(e[t],e))})),e}));function Wu(e){return function(){return e}}var Hu=ki(),$u=ki(!0);function Gu(e){return e}function qu(e){return Or("function"==typeof e?e:Zn(e,1))}var Yu=Rr((function(e,t){return function(n){return br(n,e,t)}})),Ku=Rr((function(e,t){return function(n){return br(e,n,t)}}));function Zu(e,t,n){var r=Eu(t),i=cr(t,r);null!=n||Wa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=cr(t,Eu(t)));var o=!(Wa(n)&&"chain"in n&&!n.chain),a=Va(e);return ut(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=gi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,ht([this.value()],arguments))})})),e}function Xu(){}var Ju=Ii(dt),Qu=Ii(lt),es=Ii(gt);function ts(e){return so(e)?At(xo(e)):function(e){return function(t){return fr(t,e)}}(e)}var ns=Ni(),rs=Ni(!0);function is(){return[]}function os(){return!1}var as=Di((function(e,t){return e+t}),0),us=Pi("ceil"),ss=Di((function(e,t){return e/t}),1),ls=Pi("floor");var cs,fs=Di((function(e,t){return e*t}),1),ps=Pi("round"),ds=Di((function(e,t){return e-t}),0);return Sn.after=function(e,t){if("function"!=typeof t)throw new be(o);return e=ru(e),function(){if(--e<1)return t.apply(this,arguments)}},Sn.ary=ma,Sn.assign=su,Sn.assignIn=lu,Sn.assignInWith=cu,Sn.assignWith=fu,Sn.at=pu,Sn.before=ga,Sn.bind=ba,Sn.bindAll=Uu,Sn.bindKey=ya,Sn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Na(e)?e:[e]},Sn.chain=ta,Sn.chunk=function(e,t,n){t=(n?uo(e,t,n):void 0===t)?1:an(ru(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,u=r(Jt(i/t));oi?0:i+n),(r=void 0===r||r>i?i:ru(r))<0&&(r+=i),r=n>r?0:iu(r);n>>0)?(e=uu(e))&&("string"==typeof t||null!=t&&!Ya(t))&&!(t=Xr(t))&&Bt(e)?li(Gt(e),0,n):e.split(t,n):[]},Sn.spread=function(e,t){if("function"!=typeof e)throw new be(o);return t=null==t?0:an(ru(t),0),Rr((function(n){var r=n[t],i=li(n,0,t);return r&&ht(i,r),ot(e,this,i)}))},Sn.tail=function(e){var t=null==e?0:e.length;return t?$r(e,1,t):[]},Sn.take=function(e,t,n){return e&&e.length?$r(e,0,(t=n||void 0===t?1:ru(t))<0?0:t):[]},Sn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?$r(e,(t=r-(t=n||void 0===t?1:ru(t)))<0?0:t,r):[]},Sn.takeRightWhile=function(e,t){return e&&e.length?ti(e,Zi(t,3),!1,!0):[]},Sn.takeWhile=function(e,t){return e&&e.length?ti(e,Zi(t,3)):[]},Sn.tap=function(e,t){return t(e),e},Sn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new be(o);return Wa(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ea(e,t,{leading:r,maxWait:t,trailing:i})},Sn.thru=na,Sn.toArray=tu,Sn.toPairs=ku,Sn.toPairsIn=Su,Sn.toPath=function(e){return Na(e)?dt(e,xo):Xa(e)?[e]:gi(Ao(uu(e)))},Sn.toPlainObject=au,Sn.transform=function(e,t,n){var r=Na(e),i=r||Ta(e)||Ja(e);if(t=Zi(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Wa(e)&&Va(o)?Fn($e(e)):{}}return(i?ut:sr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Sn.unary=function(e){return ma(e,1)},Sn.union=Ho,Sn.unionBy=$o,Sn.unionWith=Go,Sn.uniq=function(e){return e&&e.length?Jr(e):[]},Sn.uniqBy=function(e,t){return e&&e.length?Jr(e,Zi(t,2)):[]},Sn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Jr(e,void 0,t):[]},Sn.unset=function(e,t){return null==e||Qr(e,t)},Sn.unzip=qo,Sn.unzipWith=Yo,Sn.update=function(e,t,n){return null==e?e:ei(e,t,ai(n))},Sn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ei(e,t,ai(n),r)},Sn.values=Fu,Sn.valuesIn=function(e){return null==e?[]:It(e,_u(e))},Sn.without=Ko,Sn.words=Vu,Sn.wrap=function(e,t){return xa(ai(t),e)},Sn.xor=Zo,Sn.xorBy=Xo,Sn.xorWith=Jo,Sn.zip=Qo,Sn.zipObject=function(e,t){return ii(e||[],t||[],Wn)},Sn.zipObjectDeep=function(e,t){return ii(e||[],t||[],zr)},Sn.zipWith=ea,Sn.entries=ku,Sn.entriesIn=Su,Sn.extend=lu,Sn.extendWith=cu,Zu(Sn,Sn),Sn.add=as,Sn.attempt=zu,Sn.camelCase=Du,Sn.capitalize=Iu,Sn.ceil=us,Sn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=ou(n))==n?n:0),void 0!==t&&(t=(t=ou(t))==t?t:0),Kn(ou(e),t,n)},Sn.clone=function(e){return Zn(e,4)},Sn.cloneDeep=function(e){return Zn(e,5)},Sn.cloneDeepWith=function(e,t){return Zn(e,5,t="function"==typeof t?t:void 0)},Sn.cloneWith=function(e,t){return Zn(e,4,t="function"==typeof t?t:void 0)},Sn.conformsTo=function(e,t){return null==t||Xn(e,t,Eu(t))},Sn.deburr=ju,Sn.defaultTo=function(e,t){return null==e||e!=e?t:e},Sn.divide=ss,Sn.endsWith=function(e,t,n){e=uu(e),t=Xr(t);var r=e.length,i=n=void 0===n?r:Kn(ru(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Sn.eq=Fa,Sn.escape=function(e){return(e=uu(e))&&B.test(e)?e.replace(T,Tt):e},Sn.escapeRegExp=function(e){return(e=uu(e))&&q.test(e)?e.replace(G,"\\$&"):e},Sn.every=function(e,t,n){var r=Na(e)?lt:nr;return n&&uo(e,t,n)&&(t=void 0),r(e,Zi(t,3))},Sn.find=oa,Sn.findIndex=jo,Sn.findKey=function(e,t){return yt(e,Zi(t,3),sr)},Sn.findLast=aa,Sn.findLastIndex=No,Sn.findLastKey=function(e,t){return yt(e,Zi(t,3),lr)},Sn.floor=ls,Sn.forEach=ua,Sn.forEachRight=sa,Sn.forIn=function(e,t){return null==e?e:ar(e,Zi(t,3),_u)},Sn.forInRight=function(e,t){return null==e?e:ur(e,Zi(t,3),_u)},Sn.forOwn=function(e,t){return e&&sr(e,Zi(t,3))},Sn.forOwnRight=function(e,t){return e&&lr(e,Zi(t,3))},Sn.get=vu,Sn.gt=Da,Sn.gte=Ia,Sn.has=function(e,t){return null!=e&&ro(e,t,vr)},Sn.hasIn=mu,Sn.head=Lo,Sn.identity=Gu,Sn.includes=function(e,t,n,r){e=La(e)?e:Fu(e),n=n&&!r?ru(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Za(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},Sn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ru(n);return i<0&&(i=an(r+i,0)),_t(e,t,i)},Sn.inRange=function(e,t,n){return t=nu(t),void 0===n?(n=t,t=0):n=nu(n),function(e,t,n){return e>=un(t,n)&&e=-9007199254740991&&e<=9007199254740991},Sn.isSet=Ka,Sn.isString=Za,Sn.isSymbol=Xa,Sn.isTypedArray=Ja,Sn.isUndefined=function(e){return void 0===e},Sn.isWeakMap=function(e){return Ha(e)&&no(e)==w},Sn.isWeakSet=function(e){return Ha(e)&&"[object WeakSet]"==dr(e)},Sn.join=function(e,t){return null==e?"":rn.call(e,t)},Sn.kebabCase=Nu,Sn.last=Bo,Sn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ru(n))<0?an(r+i,0):un(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Et(e,Ot,i,!0)},Sn.lowerCase=Mu,Sn.lowerFirst=Lu,Sn.lt=Qa,Sn.lte=eu,Sn.max=function(e){return e&&e.length?rr(e,Gu,hr):void 0},Sn.maxBy=function(e,t){return e&&e.length?rr(e,Zi(t,2),hr):void 0},Sn.mean=function(e){return Ct(e,Gu)},Sn.meanBy=function(e,t){return Ct(e,Zi(t,2))},Sn.min=function(e){return e&&e.length?rr(e,Gu,xr):void 0},Sn.minBy=function(e,t){return e&&e.length?rr(e,Zi(t,2),xr):void 0},Sn.stubArray=is,Sn.stubFalse=os,Sn.stubObject=function(){return{}},Sn.stubString=function(){return""},Sn.stubTrue=function(){return!0},Sn.multiply=fs,Sn.nth=function(e,t){return e&&e.length?Ir(e,ru(t)):void 0},Sn.noConflict=function(){return qe._===this&&(qe._=Fe),this},Sn.noop=Xu,Sn.now=va,Sn.pad=function(e,t,n){e=uu(e);var r=(t=ru(t))?$t(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ji(Qt(i),n)+e+ji(Jt(i),n)},Sn.padEnd=function(e,t,n){e=uu(e);var r=(t=ru(t))?$t(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=cn();return un(e+i*(t-e+We("1e-"+((i+"").length-1))),t)}return Pr(e,t)},Sn.reduce=function(e,t,n){var r=Na(e)?vt:kt,i=arguments.length<3;return r(e,Zi(t,4),n,i,er)},Sn.reduceRight=function(e,t,n){var r=Na(e)?mt:kt,i=arguments.length<3;return r(e,Zi(t,4),n,i,tr)},Sn.repeat=function(e,t,n){return t=(n?uo(e,t,n):void 0===t)?1:ru(t),Tr(uu(e),t)},Sn.replace=function(){var e=arguments,t=uu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Sn.result=function(e,t,n){var r=-1,i=(t=ui(t,e)).length;for(i||(i=1,e=void 0);++r9007199254740991)return[];var n=4294967295,r=un(e,4294967295);e-=4294967295;for(var i=Ft(r,t=Zi(t));++n=o)return e;var u=n-$t(r);if(u<1)return r;var s=a?li(a,0,u).join(""):e.slice(0,u);if(void 0===i)return s+r;if(a&&(u+=s.length-u),Ya(i)){if(e.slice(u).search(i)){var l,c=s;for(i.global||(i=me(i.source,uu(re.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var f=l.index;s=s.slice(0,void 0===f?u:f)}}else if(e.indexOf(Xr(i),u)!=u){var p=s.lastIndexOf(i);p>-1&&(s=s.slice(0,p))}return s+r},Sn.unescape=function(e){return(e=uu(e))&&R.test(e)?e.replace(P,qt):e},Sn.uniqueId=function(e){var t=++Ae;return uu(e)+t},Sn.upperCase=Ru,Sn.upperFirst=Bu,Sn.each=ua,Sn.eachRight=sa,Sn.first=Lo,Zu(Sn,(cs={},sr(Sn,(function(e,t){Ce.call(Sn.prototype,t)||(cs[t]=e)})),cs),{chain:!1}),Sn.VERSION="4.17.19",ut(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Sn[e].placeholder=Sn})),ut(["drop","take"],(function(e,t){jn.prototype[e]=function(n){n=void 0===n?1:an(ru(n),0);var r=this.__filtered__&&!t?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=un(n,r.__takeCount__):r.__views__.push({size:un(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},jn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),ut(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;jn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Zi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),ut(["head","last"],(function(e,t){var n="take"+(t?"Right":"");jn.prototype[e]=function(){return this[n](1).value()[0]}})),ut(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");jn.prototype[e]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(Gu)},jn.prototype.find=function(e){return this.filter(e).head()},jn.prototype.findLast=function(e){return this.reverse().find(e)},jn.prototype.invokeMap=Rr((function(e,t){return"function"==typeof e?new jn(this):this.map((function(n){return br(n,e,t)}))})),jn.prototype.reject=function(e){return this.filter(Ca(Zi(e)))},jn.prototype.slice=function(e,t){e=ru(e);var n=this;return n.__filtered__&&(e>0||t<0)?new jn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ru(t))<0?n.dropRight(-t):n.take(t-e)),n)},jn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},jn.prototype.toArray=function(){return this.take(4294967295)},sr(jn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Sn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Sn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof jn,s=a[0],l=u||Na(t),c=function(e){var t=i.apply(Sn,ht([e],a));return r&&f?t[0]:t};l&&n&&"function"==typeof s&&1!=s.length&&(u=l=!1);var f=this.__chain__,p=!!this.__actions__.length,d=o&&!f,h=u&&!p;if(!o&&l){t=h?t:new jn(this);var v=e.apply(t,a);return v.__actions__.push({func:na,args:[c],thisArg:void 0}),new In(v,f)}return d&&h?e.apply(this,a):(v=this.thru(c),d?r?v.value()[0]:v.value():v)})})),ut(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ye[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Sn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Na(i)?i:[],e)}return this[n]((function(n){return t.apply(Na(n)?n:[],e)}))}})),sr(jn.prototype,(function(e,t){var n=Sn[t];if(n){var r=n.name+"";Ce.call(yn,r)||(yn[r]=[]),yn[r].push({name:t,func:n})}})),yn[Si(void 0,2).name]=[{name:"wrapper",func:void 0}],jn.prototype.clone=function(){var e=new jn(this.__wrapped__);return e.__actions__=gi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=gi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=gi(this.__views__),e},jn.prototype.reverse=function(){if(this.__filtered__){var e=new jn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},jn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Na(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Sn.prototype.plant=function(e){for(var t,n=this;n instanceof Dn;){var r=So(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Sn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof jn){var t=e;return this.__actions__.length&&(t=new jn(this)),(t=t.reverse()).__actions__.push({func:na,args:[Wo],thisArg:void 0}),new In(t,this.__chain__)}return this.thru(Wo)},Sn.prototype.toJSON=Sn.prototype.valueOf=Sn.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},Sn.prototype.first=Sn.prototype.head,Je&&(Sn.prototype[Je]=function(){return this}),Sn}();qe._=Yt,void 0===(i=function(){return Yt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(77),n(340)(e))},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(267);function i(){var e=Object(r.a)().siteConfig,t=(void 0===e?{}:e).customFields.metadata.latest_post,n=Date.parse(t.date),i=new Date,o=Math.abs(i-n),a=Math.ceil(o/864e5),u=null;return"undefined"!=typeof window&&(u=new Date(parseInt(window.localStorage.getItem("blogViewedAt")||"0"))),a<30&&(!u||u=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}(o.Component);h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},397:function(e,t,n){"use strict";var r=n(398),i=n(58);function o(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=i({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:decodeURIComponent(o),n(decodeURIComponent(i),o,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))):r},t.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[o(t,e),"[",r,"]"].join(""):[o(t,e),"[",o(r,e),"]=",o(n,e)].join("")};case"bracket":return function(t,n){return null===n?o(t,e):[o(t,e),"[]=",o(n,e)].join("")};default:return function(t,n){return null===n?o(t,e):[o(t,e),"=",o(n,e)].join("")}}}(t=i({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return o(r,t);if(Array.isArray(i)){var a=[];return i.slice().forEach((function(e){void 0!==e&&a.push(n(r,e,a.length))})),a.join("&")}return o(r,t)+"="+o(i,t)})).filter((function(e){return e.length>0})).join("&"):""}},398:function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}}}]); \ No newline at end of file diff --git a/c4f5d8e4.e6cbb06c.js.LICENSE.txt b/c4f5d8e4.1cca205c.js.LICENSE.txt similarity index 100% rename from c4f5d8e4.e6cbb06c.js.LICENSE.txt rename to c4f5d8e4.1cca205c.js.LICENSE.txt diff --git a/c5078315.67217953.js b/c5078315.8988edca.js similarity index 73% rename from c5078315.67217953.js rename to c5078315.8988edca.js index 2492cb049..bf8f952b2 100644 --- a/c5078315.67217953.js +++ b/c5078315.8988edca.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[94],{238:function(a){a.exports=JSON.parse('{"allTagsPath":"/blog/tags","slug":"domain-\u5c55\u793a","name":"domain: \u5c55\u793a","count":1,"permalink":"/blog/tags/domain-\u5c55\u793a"}')}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[92],{236:function(a){a.exports=JSON.parse('{"allTagsPath":"/blog/tags","slug":"domain-\u5c55\u793a","name":"domain: \u5c55\u793a","count":1,"permalink":"/blog/tags/domain-\u5c55\u793a"}')}}]); \ No newline at end of file diff --git a/c74e99d0.42f40e04.js b/c74e99d0.9943d743.js similarity index 99% rename from c74e99d0.42f40e04.js rename to c74e99d0.9943d743.js index 366261c96..964f4b09e 100644 --- a/c74e99d0.42f40e04.js +++ b/c74e99d0.9943d743.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[95],{239:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return a})),t.d(n,"metadata",(function(){return c})),t.d(n,"rightToc",(function(){return l})),t.d(n,"default",(function(){return d}));var o=t(1),i=t(9),r=(t(0),t(265)),a={id:"best-practices",last_modified_on:"2024-04-16",title:"Best practices",description:"Best practices for writing code on top of gnet."},c={id:"tutorial/best-practices",title:"Best practices",description:"Best practices for writing code on top of gnet.",source:"@site/docs/tutorial/best-practices.md",permalink:"/docs/tutorial/best-practices",editUrl:"https://github.com/panjf2000/gnet/edit/master/website/docs/tutorial/best-practices.md",sidebar:"docs",previous:{title:"Quickstart",permalink:"/docs/quickstart"},next:{title:"Benchmark",permalink:"/docs/benchmark"}},l=[{value:"Never run blocking code in OnTraffic(), OnOpen() and OnClose()",id:"never-run-blocking-code-in-ontraffic-onopen-and-onclose",children:[]},{value:"Leverage Conn.Context() to monopolize data instead of sharing it across connections",id:"leverage-conncontext-to-monopolize-data-instead-of-sharing-it-across-connections",children:[]},{value:"Either loop read data in OnTraffic() or invoke c.Wake() regularly",id:"either-loop-read-data-in-ontraffic-or-invoke-cwake-regularly",children:[]},{value:"Enable poll_opt mode to boost performance",id:"enable-poll_opt-mode-to-boost-performance",children:[]},{value:"Enable gc_opt mode to reduce GC latency",id:"enable-gc_opt-mode-to-reduce-gc-latency",children:[]},{value:"To be continued",id:"to-be-continued",children:[]}],p={rightToc:l};function d(e){var n=e.components,t=Object(i.a)(e,["components"]);return Object(r.b)("wrapper",Object(o.a)({},p,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("h3",{id:"never-run-blocking-code-in-ontraffic-onopen-and-onclose"},"Never run blocking code in OnTraffic(), OnOpen() and OnClose()"),Object(r.b)("p",null,"The above three event handlers (callbacks) are executed in event-loops, therefore, running blocking code in them blocks event-loops, which means that the subsequent tasks will have to wait for the preceding blocking event handlers to complete before they get executed."),Object(r.b)("p",null,"To avoid blocking event-loops, asynchronize your blocking code, for example by starting a goroutine with your blocking code and invoking ",Object(r.b)("inlineCode",{parentName:"p"},"Conn.AsyncWrite()")," or ",Object(r.b)("inlineCode",{parentName:"p"},"Conn.AsyncWritev()")," to send response data to the peer endpoint."),Object(r.b)("p",null,"If you're not familiar with how ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," works, go back and read ",Object(r.b)("a",Object(o.a)({parentName:"p"},{href:"https://gnet.host/docs/about/overview/#networking-model-of-multiple-threadsgoroutines"}),"this"),"."),Object(r.b)("h3",{id:"leverage-conncontext-to-monopolize-data-instead-of-sharing-it-across-connections"},"Leverage Conn.Context() to monopolize data instead of sharing it across connections"),Object(r.b)("p",null,"It's recommended to use ",Object(r.b)("inlineCode",{parentName:"p"},"Conn.Context()")," to store necessary resource for each connection, so that each connection can take advantage of its exclusive resource, avoiding the contention of single resource across connections."),Object(r.b)("h3",{id:"either-loop-read-data-in-ontraffic-or-invoke-cwake-regularly"},"Either loop read data in OnTraffic() or invoke c.Wake() regularly"),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"gnet")," leverages ",Object(r.b)("inlineCode",{parentName:"p"},"epoll"),"/",Object(r.b)("inlineCode",{parentName:"p"},"kqueue")," with level-triggered mode by default under the hood, you're able to switch to edge-triggered mode since v2.5.0. In LT mode, ",Object(r.b)("inlineCode",{parentName:"p"},"OnTraffic()")," might not be invoked constantly given there is data left in the inbound buffer of a ",Object(r.b)("inlineCode",{parentName:"p"},"gnet.Conn"),", ",Object(r.b)("inlineCode",{parentName:"p"},"OnTraffic()")," will be invoked only when there is data left in the socket recv buffer of the kernel. By contrast, in ET mode, ",Object(r.b)("inlineCode",{parentName:"p"},"OnTraffic()")," will be invoked only when new data arrives at the socket recv buffer of the kernel."),Object(r.b)("p",null,"Thus, you should loop call ",Object(r.b)("inlineCode",{parentName:"p"},"c.Read()"),"/",Object(r.b)("inlineCode",{parentName:"p"},"c.Peek()"),"/",Object(r.b)("inlineCode",{parentName:"p"},"c.Next()")," on a connection in ",Object(r.b)("inlineCode",{parentName:"p"},"OnTraffic()")," to drain the inbound buffer for reading and decoding packets until you reach an incomplete packet, but if you don't, then make sure you call ",Object(r.b)("inlineCode",{parentName:"p"},"c.Wake()")," periodically, otherwise you may never get a chance to read the leftover data until the remote sends new data over and there are new arrivals of data on the socket recv buffer."),Object(r.b)("h3",{id:"enable-poll_opt-mode-to-boost-performance"},"Enable poll_opt mode to boost performance"),Object(r.b)("p",null,"By default, ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," utilizes the standard package ",Object(r.b)("inlineCode",{parentName:"p"},"golang.org/x/sys/unix")," to implement pollers with ",Object(r.b)("inlineCode",{parentName:"p"},"epoll")," or ",Object(r.b)("inlineCode",{parentName:"p"},"kqueue"),", where a HASH map of ",Object(r.b)("inlineCode",{parentName:"p"},"fd->conn")," is introduced to help retrieve connections by file descriptors returned from pollers, but now you can run ",Object(r.b)("inlineCode",{parentName:"p"},"go build")," with build tags ",Object(r.b)("inlineCode",{parentName:"p"},"poll_opt"),", like this: ",Object(r.b)("inlineCode",{parentName:"p"},"go build -tags=poll_opt"),", and ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," will switch to the optimized implementations of pollers that invoke the system calls of ",Object(r.b)("inlineCode",{parentName:"p"},"epoll")," or ",Object(r.b)("inlineCode",{parentName:"p"},"kqueue")," directly and add file descriptors to the interest list along with storing the corresponding connection pointers into ",Object(r.b)("inlineCode",{parentName:"p"},"epoll_data")," or ",Object(r.b)("inlineCode",{parentName:"p"},"kevent"),", in which case ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," can get rid of the HASH MAP of ",Object(r.b)("inlineCode",{parentName:"p"},"fd->conn")," and regain each connection pointer by the conversion of ",Object(r.b)("inlineCode",{parentName:"p"},"void*")," pointer in the I/O event-looping. In theory, it ought to achieve a higher performance with this optimization."),Object(r.b)("p",null,"Visit ",Object(r.b)("a",Object(o.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/230"}),"#230")," for code details."),Object(r.b)("h3",{id:"enable-gc_opt-mode-to-reduce-gc-latency"},"Enable gc_opt mode to reduce GC latency"),Object(r.b)("p",null,"By default, ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," uses ",Object(r.b)("inlineCode",{parentName:"p"},"map")," as the internal storage of connections, but now you can run ",Object(r.b)("inlineCode",{parentName:"p"},"go build")," with build tags ",Object(r.b)("inlineCode",{parentName:"p"},"gc_opt"),", like this: ",Object(r.b)("inlineCode",{parentName:"p"},"go build -tags=gc_opt"),", and ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," will switch to the optimized implementation of connections storage that uses a new data structure ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," for managing connections, in which case ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," eliminates the pointers in ",Object(r.b)("inlineCode",{parentName:"p"},"map")," to reduce the GC latency significantly."),Object(r.b)("p",null,"Visit ",Object(r.b)("a",Object(o.a)({parentName:"p"},{href:"https://gnet.host/blog/announcing-gnet-v2-3-0/"}),"Announcing gnet v2.3.0")," for more details."),Object(r.b)("h3",{id:"to-be-continued"},"To be continued"))}d.isMDXComponent=!0},265:function(e,n,t){"use strict";t.d(n,"a",(function(){return b})),t.d(n,"b",(function(){return f}));var o=t(0),i=t.n(o);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function c(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=i.a.createContext({}),d=function(e){var n=i.a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):c({},n,{},e)),t},b=function(e){var n=d(e.components);return i.a.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return i.a.createElement(i.a.Fragment,{},n)}},u=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,r=e.originalType,a=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),b=d(t),u=o,f=b["".concat(a,".").concat(u)]||b[u]||s[u]||r;return t?i.a.createElement(f,c({ref:n},p,{components:t})):i.a.createElement(f,c({ref:n},p))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var r=t.length,a=new Array(r);a[0]=u;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,a[1]=c;for(var p=2;pconn")," is introduced to help retrieve connections by file descriptors returned from pollers, but now you can run ",Object(r.b)("inlineCode",{parentName:"p"},"go build")," with build tags ",Object(r.b)("inlineCode",{parentName:"p"},"poll_opt"),", like this: ",Object(r.b)("inlineCode",{parentName:"p"},"go build -tags=poll_opt"),", and ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," will switch to the optimized implementations of pollers that invoke the system calls of ",Object(r.b)("inlineCode",{parentName:"p"},"epoll")," or ",Object(r.b)("inlineCode",{parentName:"p"},"kqueue")," directly and add file descriptors to the interest list along with storing the corresponding connection pointers into ",Object(r.b)("inlineCode",{parentName:"p"},"epoll_data")," or ",Object(r.b)("inlineCode",{parentName:"p"},"kevent"),", in which case ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," can get rid of the HASH MAP of ",Object(r.b)("inlineCode",{parentName:"p"},"fd->conn")," and regain each connection pointer by the conversion of ",Object(r.b)("inlineCode",{parentName:"p"},"void*")," pointer in the I/O event-looping. In theory, it ought to achieve a higher performance with this optimization."),Object(r.b)("p",null,"Visit ",Object(r.b)("a",Object(o.a)({parentName:"p"},{href:"https://github.com/panjf2000/gnet/pull/230"}),"#230")," for code details."),Object(r.b)("h3",{id:"enable-gc_opt-mode-to-reduce-gc-latency"},"Enable gc_opt mode to reduce GC latency"),Object(r.b)("p",null,"By default, ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," uses ",Object(r.b)("inlineCode",{parentName:"p"},"map")," as the internal storage of connections, but now you can run ",Object(r.b)("inlineCode",{parentName:"p"},"go build")," with build tags ",Object(r.b)("inlineCode",{parentName:"p"},"gc_opt"),", like this: ",Object(r.b)("inlineCode",{parentName:"p"},"go build -tags=gc_opt"),", and ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," will switch to the optimized implementation of connections storage that uses a new data structure ",Object(r.b)("inlineCode",{parentName:"p"},"matrix")," for managing connections, in which case ",Object(r.b)("inlineCode",{parentName:"p"},"gnet")," eliminates the pointers in ",Object(r.b)("inlineCode",{parentName:"p"},"map")," to reduce the GC latency significantly."),Object(r.b)("p",null,"Visit ",Object(r.b)("a",Object(o.a)({parentName:"p"},{href:"https://gnet.host/blog/announcing-gnet-v2-3-0/"}),"Announcing gnet v2.3.0")," for more details."),Object(r.b)("h3",{id:"to-be-continued"},"To be continued"))}d.isMDXComponent=!0},265:function(e,n,t){"use strict";t.d(n,"a",(function(){return b})),t.d(n,"b",(function(){return f}));var o=t(0),i=t.n(o);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function c(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=i.a.createContext({}),d=function(e){var n=i.a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):c({},n,{},e)),t},b=function(e){var n=d(e.components);return i.a.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return i.a.createElement(i.a.Fragment,{},n)}},u=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,r=e.originalType,a=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),b=d(t),u=o,f=b["".concat(a,".").concat(u)]||b[u]||s[u]||r;return t?i.a.createElement(f,c({ref:n},p,{components:t})):i.a.createElement(f,c({ref:n},p))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var r=t.length,a=new Array(r);a[0]=u;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,a[1]=c;for(var p=2;p=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var l=c.a.createContext({}),p=function(e){var t=c.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},s=function(e){var t=p(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,b=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),s=p(n),u=a,O=s["".concat(r,".").concat(u)]||s[u]||m[u]||b;return n?c.a.createElement(O,i({ref:t},l,{components:n})):c.a.createElement(O,i({ref:t},l))}));function O(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var b=n.length,r=new Array(b);r[0]=u;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:a,r[1]=i;for(var l=2;l=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var l=c.a.createContext({}),p=function(e){var t=c.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},s=function(e){var t=p(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,b=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),s=p(n),u=a,O=s["".concat(r,".").concat(u)]||s[u]||m[u]||b;return n?c.a.createElement(O,i({ref:t},l,{components:n})):c.a.createElement(O,i({ref:t},l))}));function O(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var b=n.length,r=new Array(b);r[0]=u;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:a,r[1]=i;for(var l=2;l=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),s=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},D=function(e){var t=s(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,u=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),D=s(a),d=n,E=D["".concat(l,".").concat(d)]||D[d]||m[d]||u;return a?r.a.createElement(E,i({ref:t},o,{components:a})):r.a.createElement(E,i({ref:t},o))}));function E(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var u=a.length,l=new Array(u);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:n,l[1]=i;for(var o=2;o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(D.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(S,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(o||u)&&r.a.createElement("div",{className:"text--center"},o&&o.src&&r.a.createElement("div",{className:"margin-bottom--sm"},o.href?r.a.createElement("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:B.a.footerLogoLink},r.a.createElement(I,{alt:o.alt,url:s})):r.a.createElement(I,{alt:o.alt,url:s}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:B.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},H=a(290),R=a(291),W=a(3);a(135);t.a=function(e){var t=Object(E.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,i=(a.tagline,a.title),c=a.themeConfig.image,o=a.url,s=e.children,D=e.title,m=e.noFooter,d=e.description,g=e.image,f=e.keywords,b=(e.permalink,e.version),p=D?D+" | "+i:i,h=g||c,v=o+Object(C.a)(h),F=Object(C.a)(n),y=Object(W.h)(),N=y?"https://gnet.host"+(y.pathname.endsWith("/")?y.pathname:y.pathname+"/"):null;return r.a.createElement(R.a,null,r.a.createElement(H.a,null,r.a.createElement(l.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),p&&r.a.createElement("title",null,p),p&&r.a.createElement("meta",{property:"og:title",content:p}),n&&r.a.createElement("link",{rel:"shortcut icon",href:F}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),b&&r.a.createElement("meta",{name:"docsearch:version",content:b}),f&&f.length&&r.a.createElement("meta",{name:"keywords",content:f.join(",")}),h&&r.a.createElement("meta",{property:"og:image",content:v}),h&&r.a.createElement("meta",{property:"twitter:image",content:v}),h&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+p}),h&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),h&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),N&&r.a.createElement("meta",{property:"og:url",content:N}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),N&&r.a.createElement("link",{rel:"canonical",href:N})),r.a.createElement(u.a,null),r.a.createElement(A,null),r.a.createElement("div",{className:"main-wrapper"},s),!m&&r.a.createElement(L,null)))}},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},279:function(e,t,a){var n=a(288);e.exports=i;var r=Object.hasOwnProperty,u=/\s/g,l=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function i(){if(!(this instanceof i))return new i;this.reset()}function c(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(l,"").replace(n(),"").replace(u,"-"))}i.prototype.slug=function(e,t){for(var a=c(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},i.prototype.reset=function(){this.occurrences=Object.create(null)},i.slug=c},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),l=a(266),i=a.n(l);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,l=e.style,c=e.value,o=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:i()("badge","badge--rounded","badge--"+l)},o?c:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),l=a.n(u),i=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,c=e.nameSuffix,o=e.rel,s=e.size,D=e.subTitle,m=e.vertical,d=Object(i.a)().siteConfig,E=(void 0===d?{}:d).customFields.metadata.team,g=E.find((function(e){return e.github==u}))||E.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:l()("avatar",n,(t={},t["avatar--"+s]=s,t["avatar--vertical"]=m,t))},r.a.createElement("img",{className:l()("avatar__photo","avatar__photo--"+s),src:g.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:g.github,target:"_blank",rel:o},g.name),c),D&&r.a.createElement("small",{className:"avatar__subtitle"},D),!D&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:g.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=(a(268),a(287)),i=a(266),c=a.n(i),o=a(275),s=a(138),D=a.n(s);t.a=function(e){var t,a=e.block,r=e.colorProfile,i=e.tags,s=e.valuesOnly,m=Object(o.a)(i,r);return u.a.createElement("span",{className:c()(D.a.tags,(t={},t[D.a.tagsBlock]=a,t))},m.map((function(e,t){return u.a.createElement(l.a,Object(n.a)({key:t,valueOnly:s},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,l,i,c=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,i=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==m(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(c.masks[t]||t||c.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",E=e[d+"Date"](),g=e[d+"Day"](),f=e[d+"Month"](),b=e[d+"FullYear"](),p=e[d+"Hours"](),h=e[d+"Minutes"](),v=e[d+"Seconds"](),F=e[d+"Milliseconds"](),y=a?0:e.getTimezoneOffset(),C=s(e),N=D(e),_={d:E,dd:o(E),ddd:c.i18n.dayNames[g],dddd:c.i18n.dayNames[g+7],m:f+1,mm:o(f+1),mmm:c.i18n.monthNames[f],mmmm:c.i18n.monthNames[f+12],yy:String(b).slice(2),yyyy:b,h:p%12||12,hh:o(p%12||12),H:p,HH:o(p),M:h,MM:o(h),s:v,ss:o(v),l:o(F,3),L:o(Math.round(F/10)),t:p<12?c.i18n.timeNames[0]:c.i18n.timeNames[1],tt:p<12?c.i18n.timeNames[2]:c.i18n.timeNames[3],T:p<12?c.i18n.timeNames[4]:c.i18n.timeNames[5],TT:p<12?c.i18n.timeNames[6]:c.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(l)||[""]).pop().replace(i,""),o:(y>0?"-":"+")+o(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][E%10>3?0:(E%100-E%10!=10)*E%10],W:C,N:N};return t.replace(u,(function(e){return e in _?_[e]:e.slice(1,e.length-1)}))});function o(e,t){for(e=String(e),t=t||2;e.length0}))}l&&v.test(l)&&(O=l.match(v)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return w.current&&(e=new i.a(w.current,{target:function(){return _.current}})),function(){e&&e.destroy()}}),[w.current,_.current]);var x=a&&a.replace(/language-/,"");!x&&s.defaultLanguage&&(x=s.defaultLanguage);var B=function(){window.getSelection().empty(),F(!0),setTimeout((function(){return F(!1)}),2e3)};return u.a.createElement(c.a,Object(n.a)({},c.b,{key:C,theme:M,code:t.trim(),language:x}),(function(e){var t,a,r=e.className,l=e.style,i=e.tokens,c=e.getLineProps,o=e.getTokenProps;return u.a.createElement(u.a.Fragment,null,O&&u.a.createElement("div",{style:l,className:p.a.codeBlockTitle},O),u.a.createElement("div",{className:p.a.codeBlockContent},u.a.createElement("button",{ref:w,type:"button","aria-label":"Copy code to clipboard",className:D()(p.a.copyButton,(t={},t[p.a.copyButtonWithTitle]=O,t)),onClick:B},b?"Copied":"Copy"),u.a.createElement("pre",{className:D()(r,p.a.codeBlock,(a={},a[p.a.codeBlockWithTitle]=O,a))},u.a.createElement("div",{ref:_,className:p.a.codeBlockLines,style:l},i.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=c({line:e,key:t});return k.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),u.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return u.a.createElement("span",Object(n.a)({key:t},o({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=a(268),i=a(297),c=a(278),o=a(141),s=a.n(o);t.a={code:function(e){var t=e.children;return"string"==typeof t?u.a.createElement(i.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?u.a.createElement("a",e):u.a.createElement(l.a,e)},pre:function(e){return u.a.createElement("div",Object(n.a)({className:s.a.mdxCodeBlock},e))},h1:Object(c.a)("h1"),h2:Object(c.a)("h2"),h3:Object(c.a)("h3"),h4:Object(c.a)("h4"),h5:Object(c.a)("h5"),h6:Object(c.a)("h6")}},316:function(e,t,a){"use strict";a(330);var n=a(8),r=a(81),u=a(10),l=/./.toString,i=function(e){a(15)(RegExp.prototype,"toString",e,!0)};a(13)((function(){return"/a/b"!=l.call({source:"a",flags:"b"})}))?i((function(){var e=n(this);return"/".concat(e.source,"/","flags"in e?e.flags:!u&&e instanceof RegExp?r.call(e):void 0)})):"toString"!=l.name&&i((function(){return l.call(this)}))},317:function(e,t,a){e.exports=a(331)},328:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(266),l=a.n(u);t.a=function(e){var t=e.github,a=e.inline,n=e.size,u=e.style,i=l()("panel","panel--button","panel--"+n,"panel--"+u,{"panel--button--inline":a});return r.a.createElement("div",{className:"row row--squished"},r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-twitter",title:"Twitter"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Follow @panjf2000"),r.a.createElement("div",{className:"panel--description"},"Get real-time updates!")))),0!=t&&r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-github"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Star panjf2000/gnet"),r.a.createElement("div",{className:"panel--description"},"Star the repo to support us.")))))}},329:function(e,t,a){"use strict";a(274),a(316),a(19);var n=a(0),r=a.n(n),u=a(292),l=a(268),i=(a(299),a(265),a(293)),c=a(266),o=a.n(c),s=a(294),D=a.n(s),m=a(275),d=a(317),E=a.n(d);t.a=function(e){var t=e.children,a=e.frontMatter,n=e.metadata,c=(e.truncated,e.isBlogPostPage,n.date),s=n.description,d=n.permalink,g=n.tags,f=a.author_github,b=a.title,p=E()(t.toString()),h=new Date(Date.parse(c)),v=Object(m.a)(g,"blog").find((function(e){return"domain"==e.category})),F=v?v.value:null;return r.a.createElement(l.a,{to:d+"/",className:o()("panel","domain-bg","domain-bg--hover","domain-bg--"+F)},r.a.createElement("article",null,r.a.createElement("h2",null,b),r.a.createElement("div",{className:"subtitle"},s),r.a.createElement(u.a,{github:f,size:"sm",subTitle:r.a.createElement(r.a.Fragment,null,r.a.createElement("time",{pubdate:"pubdate",dateTime:h.toISOString()},D()(h,"mmm dS, yyyy"))," / ",p.text),rel:"author"}),r.a.createElement(i.a,{colorProfile:"blog",tags:g})))}},330:function(e,t,a){a(10)&&"g"!=/./g.flags&&a(24).f(RegExp.prototype,"flags",{configurable:!0,get:a(81)})},331:function(e,t,a){"use strict";function n(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}e.exports=function(e,t){var a,r,u=0,l=0,i=e.length-1;for((t=t||{}).wordsPerMinute=t.wordsPerMinute||200,a=t.wordBound||n;a(e[l]);)l++;for(;a(e[i]);)i--;for(r=l;r<=i;){for(;r<=i&&!a(e[r]);r++);for(u++;r<=i&&a(e[r]);r++);}var c=u/t.wordsPerMinute,o=60*c*1e3;return{text:Math.ceil(c.toFixed(2))+" min read",minutes:c,time:o,words:u}}},332:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return u}));var n=a(267);function r(){var e=Object(n.a)().siteConfig,t=(void 0===e?{}:e).customFields.metadata.latest_post,a=Date.parse(t.date),r=new Date,u=Math.abs(r-a),l=Math.ceil(u/864e5),i=null;return"undefined"!=typeof window&&(i=new Date(parseInt(window.localStorage.getItem("blogViewedAt")||"0"))),l<30&&(!i||i=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),s=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},D=function(e){var t=s(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,u=e.originalType,l=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),D=s(a),d=n,E=D["".concat(l,".").concat(d)]||D[d]||m[d]||u;return a?r.a.createElement(E,i({ref:t},o,{components:a})):r.a.createElement(E,i({ref:t},o))}));function E(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var u=a.length,l=new Array(u);l[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:n,l[1]=i;for(var o=2;o0&&r.a.createElement("div",{className:"row footer__links"},r.a.createElement("div",{className:"col col--5 footer__col"},r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(D.a,{className:"navbar__logo",src:"/img/logo-light.svg",alt:"gnet",width:"150",height:"auto"})),r.a.createElement("div",{className:"margin-bottom--md"},r.a.createElement(S,{description:!1,width:"150px"})),r.a.createElement("div",null,r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank"},r.a.createElement("i",{className:"feather icon-twitter",alt:"gnet's Twitter"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank"},r.a.createElement("i",{className:"feather icon-github",alt:"gnet's Github Repo"})),"\xa0\xa0\xa0\xa0",r.a.createElement("a",{href:"https://strikefreedom.top/rss.xml",target:"_blank"},r.a.createElement("i",{className:"feather icon-rss",alt:"gnet's RSS feed"})))),i.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(P,e))}))):null)}))),(o||u)&&r.a.createElement("div",{className:"text--center"},o&&o.src&&r.a.createElement("div",{className:"margin-bottom--sm"},o.href?r.a.createElement("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:B.a.footerLogoLink},r.a.createElement(I,{alt:o.alt,url:s})):r.a.createElement(I,{alt:o.alt,url:s}),r.a.createElement("br",null),r.a.createElement("a",{href:"https://www.digitalocean.com/",target:"_blank",rel:"noopener noreferrer",className:B.a.footerLogoLink},r.a.createElement("img",{alt:"DigitalOcean",src:"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg",width:"201px"}))),u,r.a.createElement("br",null),r.a.createElement("small",null,r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/security/policy"},"Security Policy"),"\xa0\u2022\xa0",r.a.createElement("a",{href:"https://github.com/panjf2000/gnet/blob/master/PRIVACY.md"},"Privacy Policy"))))):null},H=a(290),R=a(291),W=a(3);a(135);t.a=function(e){var t=Object(E.a)().siteConfig,a=void 0===t?{}:t,n=a.favicon,i=(a.tagline,a.title),c=a.themeConfig.image,o=a.url,s=e.children,D=e.title,m=e.noFooter,d=e.description,g=e.image,f=e.keywords,b=(e.permalink,e.version),p=D?D+" | "+i:i,h=g||c,v=o+Object(C.a)(h),F=Object(C.a)(n),y=Object(W.h)(),N=y?"https://gnet.host"+(y.pathname.endsWith("/")?y.pathname:y.pathname+"/"):null;return r.a.createElement(R.a,null,r.a.createElement(H.a,null,r.a.createElement(l.a,null,r.a.createElement("html",{lang:"en"}),r.a.createElement("meta",{httpEquiv:"x-ua-compatible",content:"ie=edge"}),p&&r.a.createElement("title",null,p),p&&r.a.createElement("meta",{property:"og:title",content:p}),n&&r.a.createElement("link",{rel:"shortcut icon",href:F}),d&&r.a.createElement("meta",{name:"description",content:d}),d&&r.a.createElement("meta",{property:"og:description",content:d}),b&&r.a.createElement("meta",{name:"docsearch:version",content:b}),f&&f.length&&r.a.createElement("meta",{name:"keywords",content:f.join(",")}),h&&r.a.createElement("meta",{property:"og:image",content:v}),h&&r.a.createElement("meta",{property:"twitter:image",content:v}),h&&r.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+p}),h&&r.a.createElement("meta",{name:"twitter:site",content:"@vectordotdev"}),h&&r.a.createElement("meta",{name:"twitter:creator",content:"@vectordotdev"}),N&&r.a.createElement("meta",{property:"og:url",content:N}),r.a.createElement("meta",{name:"twitter:card",content:"summary"}),N&&r.a.createElement("link",{rel:"canonical",href:N})),r.a.createElement(u.a,null),r.a.createElement(A,null),r.a.createElement("div",{className:"main-wrapper"},s),!m&&r.a.createElement(L,null)))}},275:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));a(79),a(298),a(274),a(78);var n=a(279),r=a.n(n);function u(e,t){var a=new r.a;return e.map((function(e){var n=e;return"string"==typeof e&&(n={label:e,permalink:"/"+t+"/tags/"+a.slug(e)}),function(e,t){if(e.enriched)return e;var a=e.label.split(": ",2),n=a[0],r=a[1],u="primary";switch(n){case"domain":u="blue";break;case"type":u="pink";break;default:u="primary"}return{category:n,count:e.count,enriched:!0,label:e.label,permalink:e.permalink,style:u,value:r}}(n)}))}},277:function(e,t,a){var n=a(24).f,r=Function.prototype,u=/^\s*function ([^ (]*)/;"name"in r||a(10)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(u)[1]}catch(e){return""}}})},279:function(e,t,a){var n=a(288);e.exports=i;var r=Object.hasOwnProperty,u=/\s/g,l=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~\u2019]/g;function i(){if(!(this instanceof i))return new i;this.reset()}function c(e,t){return"string"!=typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(l,"").replace(n(),"").replace(u,"-"))}i.prototype.slug=function(e,t){for(var a=c(e,!0===t),n=a;r.call(this.occurrences,a);)this.occurrences[n]++,a=n+"-"+this.occurrences[n];return this.occurrences[a]=0,a},i.prototype.reset=function(){this.occurrences=Object.create(null)},i.slug=c},287:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(268),l=a(266),i=a.n(l);t.a=function(e){var t=e.count,a=e.label,n=e.permalink,l=e.style,c=e.value,o=e.valueOnly;return r.a.createElement(u.a,{to:n+"/",className:i()("badge","badge--rounded","badge--"+l)},o?c:a,t&&r.a.createElement(r.a.Fragment,null," (",t,")"))}},288:function(e,t){e.exports=function(){return/[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g}},292:function(e,t,a){"use strict";a(277),a(274);var n=a(0),r=a.n(n),u=a(266),l=a.n(u),i=a(267);a(137);t.a=function(e){var t,a=e.bio,n=e.className,u=e.github,c=e.nameSuffix,o=e.rel,s=e.size,D=e.subTitle,m=e.vertical,d=Object(i.a)().siteConfig,E=(void 0===d?{}:d).customFields.metadata.team,g=E.find((function(e){return e.github==u}))||E.find((function(e){return"ben"==e.id}));return r.a.createElement("div",{className:l()("avatar",n,(t={},t["avatar--"+s]=s,t["avatar--vertical"]=m,t))},r.a.createElement("img",{className:l()("avatar__photo","avatar__photo--"+s),src:g.avatar}),r.a.createElement("div",{className:"avatar__intro"},r.a.createElement("div",{className:"avatar__name"},r.a.createElement("a",{href:g.github,target:"_blank",rel:o},g.name),c),D&&r.a.createElement("small",{className:"avatar__subtitle"},D),!D&&a&&r.a.createElement("small",{className:"avatar__subtitle",dangerouslySetInnerHTML:{__html:g.bio}})))}},293:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=(a(268),a(287)),i=a(266),c=a.n(i),o=a(275),s=a(138),D=a.n(s);t.a=function(e){var t,a=e.block,r=e.colorProfile,i=e.tags,s=e.valuesOnly,m=Object(o.a)(i,r);return u.a.createElement("span",{className:c()(D.a.tags,(t={},t[D.a.tagsBlock]=a,t))},m.map((function(e,t){return u.a.createElement(l.a,Object(n.a)({key:t,valueOnly:s},e))})))}},294:function(e,t,a){var n;!function(r){"use strict";var u,l,i,c=(u=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,i=/[^-+\dA-Z]/g,function(e,t,a,n){if(1!==arguments.length||"string"!==m(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(c.masks[t]||t||c.masks.default)).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),a=!0,"GMT:"===r&&(n=!0));var d=a?"getUTC":"get",E=e[d+"Date"](),g=e[d+"Day"](),f=e[d+"Month"](),b=e[d+"FullYear"](),p=e[d+"Hours"](),h=e[d+"Minutes"](),v=e[d+"Seconds"](),F=e[d+"Milliseconds"](),y=a?0:e.getTimezoneOffset(),C=s(e),N=D(e),_={d:E,dd:o(E),ddd:c.i18n.dayNames[g],dddd:c.i18n.dayNames[g+7],m:f+1,mm:o(f+1),mmm:c.i18n.monthNames[f],mmmm:c.i18n.monthNames[f+12],yy:String(b).slice(2),yyyy:b,h:p%12||12,hh:o(p%12||12),H:p,HH:o(p),M:h,MM:o(h),s:v,ss:o(v),l:o(F,3),L:o(Math.round(F/10)),t:p<12?c.i18n.timeNames[0]:c.i18n.timeNames[1],tt:p<12?c.i18n.timeNames[2]:c.i18n.timeNames[3],T:p<12?c.i18n.timeNames[4]:c.i18n.timeNames[5],TT:p<12?c.i18n.timeNames[6]:c.i18n.timeNames[7],Z:n?"GMT":a?"UTC":(String(e).match(l)||[""]).pop().replace(i,""),o:(y>0?"-":"+")+o(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][E%10>3?0:(E%100-E%10!=10)*E%10],W:C,N:N};return t.replace(u,(function(e){return e in _?_[e]:e.slice(1,e.length-1)}))});function o(e,t){for(e=String(e),t=t||2;e.length0}))}l&&v.test(l)&&(O=l.match(v)[0].split("title=")[1].replace(/"+/g,"")),Object(r.useEffect)((function(){var e;return w.current&&(e=new i.a(w.current,{target:function(){return _.current}})),function(){e&&e.destroy()}}),[w.current,_.current]);var x=a&&a.replace(/language-/,"");!x&&s.defaultLanguage&&(x=s.defaultLanguage);var B=function(){window.getSelection().empty(),F(!0),setTimeout((function(){return F(!1)}),2e3)};return u.a.createElement(c.a,Object(n.a)({},c.b,{key:C,theme:M,code:t.trim(),language:x}),(function(e){var t,a,r=e.className,l=e.style,i=e.tokens,c=e.getLineProps,o=e.getTokenProps;return u.a.createElement(u.a.Fragment,null,O&&u.a.createElement("div",{style:l,className:p.a.codeBlockTitle},O),u.a.createElement("div",{className:p.a.codeBlockContent},u.a.createElement("button",{ref:w,type:"button","aria-label":"Copy code to clipboard",className:D()(p.a.copyButton,(t={},t[p.a.copyButtonWithTitle]=O,t)),onClick:B},b?"Copied":"Copy"),u.a.createElement("pre",{className:D()(r,p.a.codeBlock,(a={},a[p.a.codeBlockWithTitle]=O,a))},u.a.createElement("div",{ref:_,className:p.a.codeBlockLines,style:l},i.map((function(e,t){1===e.length&&""===e[0].content&&(e[0].content="\n");var a=c({line:e,key:t});return k.includes(t+1)&&(a.className=a.className+" docusaurus-highlight-code-line"),u.a.createElement("div",Object(n.a)({key:t},a),e.map((function(e,t){return u.a.createElement("span",Object(n.a)({key:t},o({token:e,key:t})))})))}))))))}))}}).call(this,a(77))},299:function(e,t,a){"use strict";var n=a(1),r=a(0),u=a.n(r),l=a(268),i=a(297),c=a(278),o=a(141),s=a.n(o);t.a={code:function(e){var t=e.children;return"string"==typeof t?u.a.createElement(i.a,e):t},a:function(e){return/\.[^./]+$/.test(e.href)?u.a.createElement("a",e):u.a.createElement(l.a,e)},pre:function(e){return u.a.createElement("div",Object(n.a)({className:s.a.mdxCodeBlock},e))},h1:Object(c.a)("h1"),h2:Object(c.a)("h2"),h3:Object(c.a)("h3"),h4:Object(c.a)("h4"),h5:Object(c.a)("h5"),h6:Object(c.a)("h6")}},316:function(e,t,a){"use strict";a(330);var n=a(8),r=a(81),u=a(10),l=/./.toString,i=function(e){a(15)(RegExp.prototype,"toString",e,!0)};a(13)((function(){return"/a/b"!=l.call({source:"a",flags:"b"})}))?i((function(){var e=n(this);return"/".concat(e.source,"/","flags"in e?e.flags:!u&&e instanceof RegExp?r.call(e):void 0)})):"toString"!=l.name&&i((function(){return l.call(this)}))},317:function(e,t,a){e.exports=a(331)},328:function(e,t,a){"use strict";var n=a(0),r=a.n(n),u=a(266),l=a.n(u);t.a=function(e){var t=e.github,a=e.inline,n=e.size,u=e.style,i=l()("panel","panel--button","panel--"+n,"panel--"+u,{"panel--button--inline":a});return r.a.createElement("div",{className:"row row--squished"},r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://twitter.com/panjf2000",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-twitter",title:"Twitter"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Follow @panjf2000"),r.a.createElement("div",{className:"panel--description"},"Get real-time updates!")))),0!=t&&r.a.createElement("div",{className:"col"},r.a.createElement("a",{href:"https://github.com/panjf2000/gnet",target:"_blank",className:i},r.a.createElement("div",{className:"panel--icon"},r.a.createElement("i",{className:"feather icon-github"})),r.a.createElement("div",null,r.a.createElement("div",{className:"panel--title"},"Star panjf2000/gnet"),r.a.createElement("div",{className:"panel--description"},"Star the repo to support us.")))))}},329:function(e,t,a){"use strict";a(274),a(316),a(19);var n=a(0),r=a.n(n),u=a(292),l=a(268),i=(a(299),a(265),a(293)),c=a(266),o=a.n(c),s=a(294),D=a.n(s),m=a(275),d=a(317),E=a.n(d);t.a=function(e){var t=e.children,a=e.frontMatter,n=e.metadata,c=(e.truncated,e.isBlogPostPage,n.date),s=n.description,d=n.permalink,g=n.tags,f=a.author_github,b=a.title,p=E()(t.toString()),h=new Date(Date.parse(c)),v=Object(m.a)(g,"blog").find((function(e){return"domain"==e.category})),F=v?v.value:null;return r.a.createElement(l.a,{to:d+"/",className:o()("panel","domain-bg","domain-bg--hover","domain-bg--"+F)},r.a.createElement("article",null,r.a.createElement("h2",null,b),r.a.createElement("div",{className:"subtitle"},s),r.a.createElement(u.a,{github:f,size:"sm",subTitle:r.a.createElement(r.a.Fragment,null,r.a.createElement("time",{pubdate:"pubdate",dateTime:h.toISOString()},D()(h,"mmm dS, yyyy"))," / ",p.text),rel:"author"}),r.a.createElement(i.a,{colorProfile:"blog",tags:g})))}},330:function(e,t,a){a(10)&&"g"!=/./g.flags&&a(24).f(RegExp.prototype,"flags",{configurable:!0,get:a(81)})},331:function(e,t,a){"use strict";function n(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}e.exports=function(e,t){var a,r,u=0,l=0,i=e.length-1;for((t=t||{}).wordsPerMinute=t.wordsPerMinute||200,a=t.wordBound||n;a(e[l]);)l++;for(;a(e[i]);)i--;for(r=l;r<=i;){for(;r<=i&&!a(e[r]);r++);for(u++;r<=i&&a(e[r]);r++);}var c=u/t.wordsPerMinute,o=60*c*1e3;return{text:Math.ceil(c.toFixed(2))+" min read",minutes:c,time:o,words:u}}},332:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return u}));var n=a(267);function r(){var e=Object(n.a)().siteConfig,t=(void 0===e?{}:e).customFields.metadata.latest_post,a=Date.parse(t.date),r=new Date,u=Math.abs(r-a),l=Math.ceil(u/864e5),i=null;return"undefined"!=typeof window&&(i=new Date(parseInt(window.localStorage.getItem("blogViewedAt")||"0"))),l<30&&(!i||i - + - + - + - + - + @@ -38,17 +38,17 @@

gnet Community

Join the gnet community. Connect with other gnet users and help make gnet better.

Meet The Team

Andy Pan is the creator of gnet and the only core contributor at present, hoping more developers will join me in the future.
- + - + - + - + - + diff --git a/contact/index.html b/contact/index.html index 93f967263..d953da3e6 100644 --- a/contact/index.html +++ b/contact/index.html @@ -19,17 +19,17 @@ - + - + - + - + - + @@ -38,17 +38,17 @@

Contact

gnet is an open-source software created by Andy Pan. You can contact the author using any of the options below.
- + - + - + - + - + diff --git a/d5ac47c4.121a5529.js b/d5ac47c4.2ec31adf.js similarity index 73% rename from d5ac47c4.121a5529.js rename to d5ac47c4.2ec31adf.js index c81564b7c..3026f899a 100644 --- a/d5ac47c4.121a5529.js +++ b/d5ac47c4.2ec31adf.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[98],{242:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"platform-arm-64","name":"platform: arm64","count":2,"permalink":"/highlights/tags/platform-arm-64"}')}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[97],{241:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"platform-arm-64","name":"platform: arm64","count":2,"permalink":"/highlights/tags/platform-arm-64"}')}}]); \ No newline at end of file diff --git a/da055e6f.8c67459c.js b/da055e6f.a5382048.js similarity index 99% rename from da055e6f.8c67459c.js rename to da055e6f.a5382048.js index 7a4cd2e01..5410b80c2 100644 --- a/da055e6f.8c67459c.js +++ b/da055e6f.a5382048.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[99],{243:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return r})),a.d(t,"metadata",(function(){return i})),a.d(t,"rightToc",(function(){return f})),a.d(t,"default",(function(){return o}));var c=a(1),b=a(9),n=(a(0),a(265)),r={last_modified_on:"2021-12-05",$schema:"/.meta/.schemas/highlights.json",title:"Released gnet v1.6.0",description:"Released the official stable version of v1.6.0",author_github:"https://github.com/panjf2000",pr_numbers:["b8d571d"],release:"1.6.0",hide_on_release_notes:!1,tags:["type: tag","domain: v1.6.0"]},i={date:"2021-12-05T00:00:00.000Z",description:"Released the official stable version of v1.6.0",permalink:"/highlights/2021-12-05-released-1-6-0",readingTime:"2 min read",source:"@site/highlights/2021-12-05-released-1-6-0.md",tags:[{label:"type: tag",permalink:"/highlights/tags/type-tag"},{label:"domain: v1.6.0",permalink:"/highlights/tags/domain-v-1-6-0"}],title:"Released gnet v1.6.0",truncated:!1,prevItem:{title:"Release of gnet v2.0.0",permalink:"/highlights/2022-02-27-release-of-gnet-v2"},nextItem:{title:"Released gnet v1.5.2",permalink:"/highlights/2021-07-20-released-1-5-2"}},f=[{value:"Features",id:"features",children:[]},{value:"Enhancements",id:"enhancements",children:[]},{value:"Bugfixes",id:"bugfixes",children:[]},{value:"Docs",id:"docs",children:[]},{value:"Misc",id:"misc",children:[]}],m={rightToc:f};function o(e){var t=e.components,a=Object(b.a)(e,["components"]);return Object(n.b)("wrapper",Object(c.a)({},m,a,{components:t,mdxType:"MDXLayout"}),Object(n.b)("p",null,Object(n.b)("img",Object(c.a)({parentName:"p"},{src:"/img/gnet-v1-6-0.png",alt:null}))),Object(n.b)("h1",{id:"gnet-client-is-now-available-for-production"},"gnet client is now available for production!"),Object(n.b)("h2",{id:"features"},"Features"),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Add a new event handler: AfterWrite() ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/6a654c85e7c1172503813c9703603e42eea2fc29"}),"6a654c")),Object(n.b)("li",{parentName:"ul"},"Implement the gnet client ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/2295e8c6f3394341d28318cb6ea33f0799d52c45"}),"2295e8")," ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/a5ac95a5057fb82e2f71cb6a7f4ffed83c967efb"}),"a5ac95")," ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/4db46da43d5defd5da71213c0abaebb174af642c"}),"4db46d")," ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/802fa358f2c8ac95414e36cb0afd53f6dd57bfa0"}),"802fa3")," ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/7159b95cd9ebc8fe2f9bea909844eb8c8bb37bf7"}),"7159b9")),Object(n.b)("li",{parentName:"ul"},"Implement writev and readv on BSD-like OS's ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/60ba6d30b04351e26c3f7c9cc496b1b849936731"}),"60ba6d")),Object(n.b)("li",{parentName:"ul"},"Implement a mixed buffer of ring-buffer and list-buffer ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/edbdf4b54b7439bfb2ac4ba9652ec6a1764e0659"}),"edbdf4")),Object(n.b)("li",{parentName:"ul"},"Invoke OnClosed() when a UDP socket is closed ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/7be4b2a758e32af489450b6b62d8da48e471ba00"}),"7be4b2")),Object(n.b)("li",{parentName:"ul"},"Implement the gnet.Conn.AsyncWritev() ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/9a2032f876cd8f41c554545bcbb63d3043f4946f"}),"9a2032"))),Object(n.b)("h2",{id:"enhancements"},"Enhancements"),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Prevent the event-list from expanding or shrinking endlessly ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/b220dfd3f3ff9b8ecee4a09170d4db3760393fc0"}),"b220df")),Object(n.b)("li",{parentName:"ul"},"Reduce the potential system calls for waking pollers up ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/9ce41f3b921a9341081506629185e733f97defa4"}),"9ce41f")),Object(n.b)("li",{parentName:"ul"},"Eliminate the code for preventing false-sharing ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/0bfade3aea015a7932b0e45b646a6c85a620a205"}),"0bfade")),Object(n.b)("li",{parentName:"ul"},"Support so_reuseaddr ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/pull/280"}),"#280")),Object(n.b)("li",{parentName:"ul"},"Make several improvements for logger ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/58d2031440b1c9725e2d12aeb651aa8bc78d3489"}),"58d203")),Object(n.b)("li",{parentName:"ul"},"Optimize the buffer management and network I/O ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/6aba6d7a3fc31cf749b0001dcb1c82f01c816f65"}),"6aba6d")),Object(n.b)("li",{parentName:"ul"},"Improve the project layout ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/2e172bde78bcdb56dbec9a57d95dfa4b6213b1f2"}),"2e172b")),Object(n.b)("li",{parentName:"ul"},"Improve the logic of reading data from socket into ring-buffer ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/a7f07b3d4eaa70a9b5c8b389d73b72ddb06b8c16"}),"a7f07b")),Object(n.b)("li",{parentName:"ul"},"Get as much data read from socket per loop as possible ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/148ee163fb3ddd0fcd7919ab17390a3cd910933f"}),"148ee1")),Object(n.b)("li",{parentName:"ul"},"Improve the network read with ring-buffer and readv ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/0dcf599fd0673bc712b5409fd9a0711cb90606c0"}),"0dcf59")),Object(n.b)("li",{parentName:"ul"},"Avoid memory allocations when calling readv ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/15611b482f50f1333fcee47b02d6ec04b4d2ede5"}),"15611b")),Object(n.b)("li",{parentName:"ul"},"Refactor the logic of handling UDP sockets ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/d72d3de70a0cb31c6059820dbd4ba6db6c4e23eb"}),"d72d3d")),Object(n.b)("li",{parentName:"ul"},"Make the mixed-buffer more flexible ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/4ac906cae698b1a4483c583d0267f86f05ce595b"}),"d72d3d")),Object(n.b)("li",{parentName:"ul"},"Improve the management logic of the mixed-buffer ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/b8d571dd762cb79c2c685f16d36886f6edb40195"}),"b8d571"))),Object(n.b)("h2",{id:"bugfixes"},"Bugfixes"),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Resolve the data race of stdConn on Windows ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/pull/235"}),"#235")),Object(n.b)("li",{parentName:"ul"},"Fix the data corruption in some default codecs ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/a56d2f3f50981107ae6b2bd2653fe19dc75d4e18"}),"a56d2f")),Object(n.b)("li",{parentName:"ul"},"Fix the issue of panic: runtime error: slice bounds out of range ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/30311e936869d8685c8c06ff98170f0adb68bc8b"}),"30311e"))),Object(n.b)("h2",{id:"docs"},"Docs"),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Update the benchmark data ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/21f55a6832d82b88073c51ccfbed8a0e627399c3"}),"21f55a")," ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/24e4ce06a4c4e1d3990eec9945c98175763c027f"}),"24e4ce")," ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/1b4ae56edf45bb3bc165c183a089fb0a8144ca67"}),"1b4ae5")," ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/81d984236401fb42d2f75c8989b87321804f4503"}),"81d984")),Object(n.b)("li",{parentName:"ul"},"Add the echo benchmarks on macOS ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/f429e7afaf3745574c95bf03d60baeaec2ecd9c1"}),"f429e7")),Object(n.b)("li",{parentName:"ul"},"Change the license from MIT to Apache 2.0 ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/a900c8f21958eb8096443125afafb672d9f1218e"}),"a900c8"))),Object(n.b)("h2",{id:"misc"},"Misc"),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},"Add a new patron ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/0c9f965f24a6a706ddcfbcc2ba2dd8339e611e8e"}),"0c9f96")),Object(n.b)("li",{parentName:"ul"},"Create FUNDING.yml ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/1989eda4cc668e548f8572ac9fb07cef8c8f612d"}),"1989ed")," ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/7b29795db5fe184da0939490f8bf4ec39d3c27db"}),"7b2979")),Object(n.b)("li",{parentName:"ul"},"Remove the irrelevant articles ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/bbdc1bcc76138feb3529d639e63ebe9374c22165"}),"bbdc1b")),Object(n.b)("li",{parentName:"ul"},"Correct the wrong logging function ",Object(n.b)("a",Object(c.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/commit/10c619f3a42c4f8397464a7a45daff24bfa873ea"}),"10c619"))))}o.isMDXComponent=!0},265:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return h}));var c=a(0),b=a.n(c);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,c)}return a}function i(e){for(var t=1;t=0||(b[a]=e[a]);return b}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(c=0;c=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(b[a]=e[a])}return b}var m=b.a.createContext({}),o=function(e){var t=b.a.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},l=function(e){var t=o(e.components);return b.a.createElement(m.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return b.a.createElement(b.a.Fragment,{},t)}},d=Object(c.forwardRef)((function(e,t){var a=e.components,c=e.mdxType,n=e.originalType,r=e.parentName,m=f(e,["components","mdxType","originalType","parentName"]),l=o(a),d=c,h=l["".concat(r,".").concat(d)]||l[d]||p[d]||n;return a?b.a.createElement(h,i({ref:t},m,{components:a})):b.a.createElement(h,i({ref:t},m))}));function h(e,t){var a=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var n=a.length,r=new Array(n);r[0]=d;var i={};for(var f in t)hasOwnProperty.call(t,f)&&(i[f]=t[f]);i.originalType=e,i.mdxType="string"==typeof e?e:c,r[1]=i;for(var m=2;m=0||(b[a]=e[a]);return b}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(c=0;c=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(b[a]=e[a])}return b}var m=b.a.createContext({}),o=function(e){var t=b.a.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},l=function(e){var t=o(e.components);return b.a.createElement(m.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return b.a.createElement(b.a.Fragment,{},t)}},d=Object(c.forwardRef)((function(e,t){var a=e.components,c=e.mdxType,n=e.originalType,r=e.parentName,m=f(e,["components","mdxType","originalType","parentName"]),l=o(a),d=c,h=l["".concat(r,".").concat(d)]||l[d]||p[d]||n;return a?b.a.createElement(h,i({ref:t},m,{components:a})):b.a.createElement(h,i({ref:t},m))}));function h(e,t){var a=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var n=a.length,r=new Array(n);r[0]=d;var i={};for(var f in t)hasOwnProperty.call(t,f)&&(i[f]=t[f]);i.originalType=e,i.mdxType="string"==typeof e?e:c,r[1]=i;for(var m=2;m=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),g=r,m=u["".concat(i,".").concat(g)]||u[g]||f[g]||o;return n?a.a.createElement(m,c({ref:t},p,{components:n})):a.a.createElement(m,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),s=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),g=r,m=u["".concat(i,".").concat(g)]||u[g]||f[g]||o;return n?a.a.createElement(m,c({ref:t},p,{components:n})):a.a.createElement(m,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p - + - + - + - + - + - + - + - +
-

预览

gnet 是什么?

gnet 是一个基于事件驱动的高性能和轻量级网络框架。这个框架是基于 epollkqueue 从零开发的,而且相比 Go net,它能以更低的内存占用实现更高的性能。

gnetnet 有着不一样的网络编程模式。因此,用 gnet 开发网络应用和用 net 开发区别很大,而且两者之间不可调和。社区里有其他同类的产品像是 libevent, libuv, netty, twisted, tornadognet 的底层工作原理和这些框架非常类似。

gnet 不是为了取代 net 而生的,而是在 Go 生态中为开发者提供一个开发性能敏感的网络服务的替代品。也正因如此,gnet 在功能上的全面性并不如 Go net,它只会提供网络应用所需的最核心的功能和最精简的 APIs,而且 gnet 也并没有打算变成一个无所不包的网络框架,因为我觉得 Go net 在这方面已经做得足够好了。

gnet 的卖点在于它是一个高性能、轻量级、非阻塞的纯 Go 语言实现的传输层(TCP/UDP/Unix Domain Socket)网络框架。开发者可以使用 gnet 来实现自己的应用层网络协议(HTTP、RPC、Redis、WebSocket 等等),从而构建出自己的应用层网络服务。比如在 gnet 上实现 HTTP 协议就可以创建出一个 HTTP 服务器 或者 Web 开发框架,实现 Redis 协议就可以创建出自己的 Redis 服务器等等。

gnet 衍生自另一个项目:evio,但拥有更丰富的功能特性,且性能远胜之。

功能

  • 基于多线程/协程网络模型的高性能事件驱动循环
  • 内置 goroutine 池,由开源库 ants 提供支持
  • 整个生命周期是无锁的
  • 简单易用的 APIs
  • 高效、可重用而且自动伸缩的内存 buffer:(Elastic-)Ring-Buffer, Linked-List-Buffer and Elastic-Mixed-Buffer
  • 多种网络协议/IPC 机制:TCPUDPUnix Domain Socket
  • 多种负载均衡算法:Round-Robin(轮询)Source-Addr-Hash(源地址哈希)Least-Connections(最少连接数)
  • 两种事件驱动机制:Linux 里的 epoll 以及 FreeBSD/DragonFly/Darwin 里的 kqueue
  • 灵活的事件定时器
  • 实现 gnet 客户端
  • 支持 Windows 平台 (仅用于开发环境的兼容性,不要在生产环境中使用)
  • 多网络地址绑定
  • 支持 TLS
  • 支持 io_uring

架构

多线程/Go程网络模型

主从多 Reactors

gnet 重新设计开发了一个新内置的多线程/Go程网络模型:『主从多 Reactors』,这也是 netty 默认的多线程网络模型,下面是这个模型的原理图:

multi_reactor

它的运行流程如下面的时序图:

reactor

主从多 Reactors + 线程/Go程池

你可能会问一个问题:如果我的业务逻辑是阻塞的,那么在 EventHandler.OnTraffic 注册方法里的逻辑也会阻塞,从而导致阻塞 event-loop 线程,这时候怎么办?

正如你所知,基于 gnet 编写你的网络服务器有一条最重要的原则:永远不能让你业务逻辑(一般写在 EventHandler.OnTraffic 里)阻塞 event-loop 线程,这也是 netty 的一条最重要的原则,否则的话将会极大地降低服务器的吞吐量。

我的回答是,基于gnet 的另一种多线程/Go程网络模型:『带线程/Go程池的主从多 Reactors』可以解决阻塞问题,这个新网络模型通过引入一个 worker pool 来解决业务逻辑阻塞的问题:它会在启动的时候初始化一个 worker pool,然后在把 EventHandler.OnTraffic 里面的阻塞代码放到 worker pool 里执行,从而避免阻塞 event-loop 线程。

模型的架构图如下所示:

multi_reactor_thread_pool

它的运行流程如下面的时序图:

multi-reactors

gnet 通过利用 ants goroutine 池(一个基于 Go 开发的高性能的 goroutine 池 ,实现了对大规模 goroutines 的调度管理、goroutines 复用)来实现『主从多 Reactors + 线程/Go程池』网络模型。关于 ants 的全部功能和使用,可以在 ants 文档 里找到。

gnet 内部集成了 ants 以及提供了 pool.goroutine.Default() 方法来初始化一个 ants goroutine 池,然后你可以把 EventHandler.OnTraffic 中阻塞的业务逻辑提交到 goroutine 池里执行,最后在 goroutine 池里的代码调用 gnet.Conn.AsyncWrite([]byte) 方法把处理完阻塞逻辑之后得到的输出数据异步写回客户端,这样就可以避免阻塞 event-loop 线程。

有关在 gnet 里使用 ants goroutine 池的细节可以到这里进一步了解。

关键设计

弹性内存 Buffer

Elastic Ring Buffer

Elastic Ring&Linked-list Buffer

gnet 内置了inbound 和 outbound 两个 buffers,分别用来缓冲输入输出的网络数据以及管理内存,gnet 里面的 inbound 和 outbound buffer 经过设计和调优,达到重用内存以及按需扩缩容的目的。

对于 TCP 协议的流数据,使用 gnet 不需要业务方为了解析应用层协议而自己维护和管理 buffers,gnet 会替业务方完成缓冲和管理网络数据的任务,降低业务代码的复杂性以及降低开发者的心智负担,使得开发者能够专注于业务逻辑而非一些底层实现。

+

预览

gnet 是什么?

gnet 是一个基于事件驱动的高性能和轻量级网络框架。这个框架是基于 epollkqueue 从零开发的,而且相比 Go net,它能以更低的内存占用实现更高的性能。

gnetnet 有着不一样的网络编程模式。因此,用 gnet 开发网络应用和用 net 开发区别很大,而且两者之间不可调和。社区里有其他同类的产品像是 libevent, libuv, netty, twisted, tornadognet 的底层工作原理和这些框架非常类似。

gnet 不是为了取代 net 而生的,而是在 Go 生态中为开发者提供一个开发性能敏感的网络服务的替代品。也正因如此,gnet 在功能上的全面性并不如 Go net,它只会提供网络应用所需的最核心的功能和最精简的 APIs,而且 gnet 也并没有打算变成一个无所不包的网络框架,因为我觉得 Go net 在这方面已经做得足够好了。

gnet 的卖点在于它是一个高性能、轻量级、非阻塞的纯 Go 语言实现的传输层(TCP/UDP/Unix Domain Socket)网络框架。开发者可以使用 gnet 来实现自己的应用层网络协议(HTTP、RPC、Redis、WebSocket 等等),从而构建出自己的应用层网络服务。比如在 gnet 上实现 HTTP 协议就可以创建出一个 HTTP 服务器 或者 Web 开发框架,实现 Redis 协议就可以创建出自己的 Redis 服务器等等。

gnet 衍生自另一个项目:evio,但拥有更丰富的功能特性,且性能远胜之。

功能

  • 基于多线程/协程网络模型的高性能事件驱动循环
  • 内置 goroutine 池,由开源库 ants 提供支持
  • 整个生命周期是无锁的
  • 简单易用的 APIs
  • 高效、可重用而且自动伸缩的内存 buffer:(Elastic-)Ring-Buffer, Linked-List-Buffer and Elastic-Mixed-Buffer
  • 多种网络协议/IPC 机制:TCPUDPUnix Domain Socket
  • 多种负载均衡算法:Round-Robin(轮询)Source-Addr-Hash(源地址哈希)Least-Connections(最少连接数)
  • 两种事件驱动机制:Linux 里的 epoll 以及 FreeBSD/DragonFly/Darwin 里的 kqueue
  • 灵活的事件定时器
  • 实现 gnet 客户端
  • 支持 Windows 平台 (仅用于开发环境的兼容性,不要在生产环境中使用)
  • 多网络地址绑定
  • 支持 TLS
  • 支持 io_uring

架构

多线程/Go程网络模型

主从多 Reactors

gnet 重新设计开发了一个新内置的多线程/Go程网络模型:『主从多 Reactors』,这也是 netty 默认的多线程网络模型,下面是这个模型的原理图:

multi_reactor

它的运行流程如下面的时序图:

reactor

主从多 Reactors + 线程/Go程池

你可能会问一个问题:如果我的业务逻辑是阻塞的,那么在 EventHandler.OnTraffic 注册方法里的逻辑也会阻塞,从而导致阻塞 event-loop 线程,这时候怎么办?

正如你所知,基于 gnet 编写你的网络服务器有一条最重要的原则:永远不能让你业务逻辑(一般写在 EventHandler.OnTraffic 里)阻塞 event-loop 线程,这也是 netty 的一条最重要的原则,否则的话将会极大地降低服务器的吞吐量。

我的回答是,基于gnet 的另一种多线程/Go程网络模型:『带线程/Go程池的主从多 Reactors』可以解决阻塞问题,这个新网络模型通过引入一个 worker pool 来解决业务逻辑阻塞的问题:它会在启动的时候初始化一个 worker pool,然后在把 EventHandler.OnTraffic 里面的阻塞代码放到 worker pool 里执行,从而避免阻塞 event-loop 线程。

模型的架构图如下所示:

multi_reactor_thread_pool

它的运行流程如下面的时序图:

multi-reactors

gnet 通过利用 ants goroutine 池(一个基于 Go 开发的高性能的 goroutine 池 ,实现了对大规模 goroutines 的调度管理、goroutines 复用)来实现『主从多 Reactors + 线程/Go程池』网络模型。关于 ants 的全部功能和使用,可以在 ants 文档 里找到。

gnet 内部集成了 ants 以及提供了 pool.goroutine.Default() 方法来初始化一个 ants goroutine 池,然后你可以把 EventHandler.OnTraffic 中阻塞的业务逻辑提交到 goroutine 池里执行,最后在 goroutine 池里的代码调用 gnet.Conn.AsyncWrite([]byte) 方法把处理完阻塞逻辑之后得到的输出数据异步写回客户端,这样就可以避免阻塞 event-loop 线程。

有关在 gnet 里使用 ants goroutine 池的细节可以到这里进一步了解。

关键设计

弹性内存 Buffer

Elastic Ring Buffer

Elastic Ring&Linked-list Buffer

gnet 内置了inbound 和 outbound 两个 buffers,分别用来缓冲输入输出的网络数据以及管理内存,gnet 里面的 inbound 和 outbound buffer 经过设计和调优,达到重用内存以及按需扩缩容的目的。

对于 TCP 协议的流数据,使用 gnet 不需要业务方为了解析应用层协议而自己维护和管理 buffers,gnet 会替业务方完成缓冲和管理网络数据的任务,降低业务代码的复杂性以及降低开发者的心智负担,使得开发者能够专注于业务逻辑而非一些底层实现。

- + - + - + - + - + - + - + - + diff --git a/docs/about/overview/index.html b/docs/about/overview/index.html index 61ec33295..5f74a078a 100644 --- a/docs/about/overview/index.html +++ b/docs/about/overview/index.html @@ -19,27 +19,27 @@ - + - + - + - + - + - + - + - + @@ -48,27 +48,27 @@

Overview

What is gnet?

gnet is an event-driven networking framework that is ultra-fast and lightweight. It is built from scratch by exploiting epoll and kqueue and it can achieve much higher performance with lower memory consumption than Go net in many specific scenarios.

gnet and net don't share the same philosophy about network programming. Thus, building network applications with gnet can be significantly different from building them with net, and the philosophies can't be harmonized. There are other similar products written in other programming languages in the community, such as libevent, libuv, netty, twisted, tornado, etc. which work in a similar pattern as gnet under the hood.

gnet is not designed to displace the Go net, but to create an alternative in the Go ecosystem for building performance-sensitive network services. As a result of which, gnet is not as comprehensive as Go net, it provides only the core functionalities (in a concise API set) required by a network application and it is not planned on being a coverall networking framework, as I think net has done a good enough job in that area.

gnet sells itself as a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go which works on the transport layer with TCP/UDP protocols and Unix Domain Socket. It enables developers to implement their own protocols(HTTP, RPC, WebSocket, Redis, etc.) of application layer upon gnet for building diversified network services. For instance, you get an HTTP Server if you implement HTTP protocol upon gnet while you have a Redis Server done with the implementation of Redis protocol upon gnet and so on.

gnet derives from the project: evio while having a much higher performance and more features.

Features

  • High-performance event-driven looping based on a networking model of multiple threads/goroutines
  • Built-in goroutine pool powered by the library ants
  • Lock-free during the entire runtime
  • Concise and easy-to-use APIs
  • Efficient, reusable, and elastic memory buffer: (Elastic-)Ring-Buffer, Linked-List-Buffer and Elastic-Mixed-Buffer
  • Multiple protocols/IPC mechanisms: TCP, UDP, and Unix Domain Socket
  • Multiple load-balancing algorithms: Round-Robin, Source-Addr-Hash, and Least-Connections
  • Two event-driven mechanisms: epoll on Linux and kqueue on FreeBSD/DragonFly/Darwin
  • Flexible ticker event
  • Implementation of gnet Client
  • Windows platform support (For compatibility in development only, do not use it in production)
  • Multiple network addresses binding
  • TLS support
  • io_uring support

Architecture

Networking Model of Multiple Threads/Goroutines

Multiple Reactors

gnet redesigns and implements a new built-in networking model of multiple threads/goroutines: 『multiple reactors』 which is also the default networking model of multiple threads in netty, Here's the schematic diagram:

multi_reactor

and it works as the following sequence diagram:

reactor

Multiple Reactors + Goroutine Pool

You may ask me a question: what if my business logic in EventHandler.OnTraffic contains some blocking code which leads to blocking in event-loop of gnet, what is the solution for this kind of situation?

As you know, there is a most important tenet when writing code under gnet: you should never block the event-loop goroutine in the EventHandler.OnTraffic, which is also the most important tenet in netty, otherwise, it will result in a low throughput in your gnet server.

And the solution to that could be found in the subsequent networking model of multiple threads/goroutines in gnet: 『multiple reactors with thread/goroutine pool』which pulls you out from the blocking mire, it will construct a worker-pool with fixed capacity and put those blocking jobs in EventHandler.OnTraffic into the worker-pool to make the event-loop goroutines non-blocking.

The networking model:『multiple reactors with thread/goroutine pool』dissolves the blocking jobs by introducing a goroutine pool, as shown below:

multi_reactor_thread_pool

and it works as the following sequence diagram:

multi-reactors

gnet implements the networking model:『multiple reactors with thread/goroutine pool』by the aid of a high-performance goroutine pool called ants that allows you to manage and recycle a massive number of goroutines in your concurrent programs, the full features and usages in ants are documented here.

gnet integrates ants and provides the pool.goroutine.Default() method that you can call to instantiate a ants pool where you are able to put your blocking code logic and call the function gnet.Conn.AsyncWrite([]byte) to send out data asynchronously after you finish the blocking process and get the output data, which makes the goroutine of event-loop non-blocking.

The details about integrating gnet with ants are shown here.

Key designs

Elastic Buffer

Elastic Ring Buffer

Elastic Ring & Linked-list Buffer

There are two buffers inside gnet: inbound buffer (elastic-ring-buffer) and outbound buffer (elastic-ring&linked-list-buffer) to buffer and manage inbound/outbound network data, inbound and outbound buffers inside gnet are designed and tuned to reuse memory and be auto-scaling on demand.

The purpose of implementing inbound and outbound buffers in gnet is to transfer the logic of buffering and managing network data based on application protocol upon TCP stream from business server to framework and unify the network data buffer, which minimizes the complexity of business code so that developers are able to concentrate on business logic instead of the underlying implementation.

- + - + - + - + - + - + - + - + diff --git a/docs/benchmark/index.html b/docs/benchmark/index.html index 3d88bb7b3..60184022d 100644 --- a/docs/benchmark/index.html +++ b/docs/benchmark/index.html @@ -19,27 +19,27 @@ - + - + - + - + - + - + - + - + @@ -52,27 +52,27 @@
# Benchmark parameters
TCP connections : 300/400/500/600/700
Packet size : 512/1024/2048/4096/8192 bytes
Test duration : 15s

Echo benchmark

- + - + - + - + - + - + - + - + diff --git a/docs/faq/index.html b/docs/faq/index.html index 3fcddd9a1..38978e73c 100644 --- a/docs/faq/index.html +++ b/docs/faq/index.html @@ -19,25 +19,25 @@ - + - + - + - + - + - + - + @@ -48,25 +48,25 @@

FAQ

Architecture & Code & Principles

Why is gnet so fast?

gnet's networking model is a Reactor networking model with a event-driven mechanism that is designed and tuned to manage millions of network connections and handle a zillion requests, which backs gnet up to be the fastest networking framework in Go, and all it takes is a few goroutines.

In addition to the first-class networking model, the implementation of auto-scaling and reusable elastic buffers in gnet is also one of the critical essentials for its high performance.

..., etc.

Stability

Is gnet production-ready?

Sure it is!

Actually, there are already many companies/organizations using gnet as the underlying network service in production and they have been worked well for a long time.

Here is a partial list of gnet use cases: https://gnet.host/#usecases.

..., etc.

Scope of application & usage

When should I use gnet instead of the standard net in Go?

gnet sells itself as a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go which works on transport layer with TCP/UDP protocols and Unix Domain Socket , so it allows developers to implement their own protocols(HTTP, RPC, WebSocket, Redis, etc.) of application layer upon gnet for building diversified network applications, for instance, you get an HTTP Server or Web Framework if you implement HTTP protocol upon gnet while you have a Redis Server done with the implementation of Redis protocol upon gnet and so on.

gnet is not designed to displace the standard Go net package, but to create a networking client/server framework for Go that performs on par with Redis and Haproxy for networking packets handling (although it does not limit itself to these areas), therefore, gnet is not as comprehensive as Go net, it only provides the core functionalities (by a concise API set) of a networking application and it is not planned on being a full-featured networking framework, as I think net has done a good enough job in this area.

In a word, if performance is not your top priority and you intend to take care of all corners during the networking development, then you should go with net, but if you are trying to build a insanely fast networking application with a very low resource footprint and looking for a solution, I believe gnet is the right choice for you.

How can I build networking applications of diverse protocols on top of gnet?

There are some examples powered by gnet framework, go check out those source code and get an initial perception about developing networking applications based on gnet, after that, you might want to read the documentations of gnet to learn all its APIs and try to write a demo application.

..., etc.

Contributing

How do I contribute to gnet?

gnet is open-source and welcomes contributions. A few guidelines to help you get started:

  1. Read our contribution guide.
  2. Start with good first issues.
  3. Join our chat if you have any questions. We are happy to help!
- + - + - + - + - + - + - + diff --git a/docs/index.html b/docs/index.html index fc730c3bb..e74c47fb4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -15,13 +15,13 @@ - + - + - + - + @@ -30,13 +30,13 @@ - + - + - + - + diff --git a/docs/quickstart/index.html b/docs/quickstart/index.html index b79d4a0c4..032f04a2d 100644 --- a/docs/quickstart/index.html +++ b/docs/quickstart/index.html @@ -19,27 +19,27 @@ - + - + - + - + - + - + - + - + @@ -56,27 +56,27 @@
// Example command: go run echo.go --port 9000 --multicore=true
flag.IntVar(&port, "port", 9000, "--port 9000")
flag.BoolVar(&multicore, "multicore", false, "--multicore true")
flag.Parse()
echo := &echoServer{addr: fmt.Sprintf("tcp://:%d", port), multicore: multicore}
log.Fatal(gnet.Run(echo, echo.addr, gnet.WithMulticore(multicore)))
}

As you can see, this example of echo server only sets up the EventHandler.OnTraffic(Conn) handler where you commonly write your main business code and this callback will be called as soon as the server receives network data from its peer, we call Conn.Next(-1) inside OnTraffic() to retrieve all data from a connection and then call Conn.Write([]byte) to send the data back to the peer via TCP socket, which make this an echo example, and finally we return a gnet.None under normal circumstances. If there is any unexpected error occuring, return either gnet.Close to close this connection or gnet.Shutdown to shut the whole server down.

There are two ways for users to retrieve data in OnTraffic(), one is to call Conn.Peek(int) and Conn.Discard(int),the other is to call Conn.Next(int) , the former returns the next n bytes without advancing underlying connection buffer while the latter returns a slice containing the next n bytes from the buffer, advancing the buffer as if the bytes had been returned by Conn.Read([]byte).

For more API's of gnet.Conn see gnet API Docs and for more examples see gnet examples.

- + - + - + - + - + - + - + - + diff --git a/docs/tutorial/best-practices/index.html b/docs/tutorial/best-practices/index.html index 18e4a682d..411379d9f 100644 --- a/docs/tutorial/best-practices/index.html +++ b/docs/tutorial/best-practices/index.html @@ -19,27 +19,27 @@ - + - + - + - + - + - + - + - + @@ -48,27 +48,27 @@

Best practices

Never run blocking code in OnTraffic(), OnOpen() and OnClose()

The above three event handlers (callbacks) are executed in event-loops, therefore, running blocking code in them blocks event-loops, which means that the subsequent tasks will have to wait for the preceding blocking event handlers to complete before they get executed.

To avoid blocking event-loops, asynchronize your blocking code, for example by starting a goroutine with your blocking code and invoking Conn.AsyncWrite() or Conn.AsyncWritev() to send response data to the peer endpoint.

If you're not familiar with how gnet works, go back and read this.

Leverage Conn.Context() to monopolize data instead of sharing it across connections

It's recommended to use Conn.Context() to store necessary resource for each connection, so that each connection can take advantage of its exclusive resource, avoiding the contention of single resource across connections.

Either loop read data in OnTraffic() or invoke c.Wake() regularly

gnet leverages epoll/kqueue with level-triggered mode by default under the hood, you're able to switch to edge-triggered mode since v2.5.0. In LT mode, OnTraffic() might not be invoked constantly given there is data left in the inbound buffer of a gnet.Conn, OnTraffic() will be invoked only when there is data left in the socket recv buffer of the kernel. By contrast, in ET mode, OnTraffic() will be invoked only when new data arrives at the socket recv buffer of the kernel.

Thus, you should loop call c.Read()/c.Peek()/c.Next() on a connection in OnTraffic() to drain the inbound buffer for reading and decoding packets until you reach an incomplete packet, but if you don't, then make sure you call c.Wake() periodically, otherwise you may never get a chance to read the leftover data until the remote sends new data over and there are new arrivals of data on the socket recv buffer.

Enable poll_opt mode to boost performance

By default, gnet utilizes the standard package golang.org/x/sys/unix to implement pollers with epoll or kqueue, where a HASH map of fd->conn is introduced to help retrieve connections by file descriptors returned from pollers, but now you can run go build with build tags poll_opt, like this: go build -tags=poll_opt, and gnet will switch to the optimized implementations of pollers that invoke the system calls of epoll or kqueue directly and add file descriptors to the interest list along with storing the corresponding connection pointers into epoll_data or kevent, in which case gnet can get rid of the HASH MAP of fd->conn and regain each connection pointer by the conversion of void* pointer in the I/O event-looping. In theory, it ought to achieve a higher performance with this optimization.

Visit #230 for code details.

Enable gc_opt mode to reduce GC latency

By default, gnet uses map as the internal storage of connections, but now you can run go build with build tags gc_opt, like this: go build -tags=gc_opt, and gnet will switch to the optimized implementation of connections storage that uses a new data structure matrix for managing connections, in which case gnet eliminates the pointers in map to reduce the GC latency significantly.

Visit Announcing gnet v2.3.0 for more details.

To be continued

- + - + - + - + - + - + - + - + diff --git a/docs/v1.x/doc-for-gnet-v1-cn/index.html b/docs/v1.x/doc-for-gnet-v1-cn/index.html index a5b4aeec7..e938baa46 100644 --- a/docs/v1.x/doc-for-gnet-v1-cn/index.html +++ b/docs/v1.x/doc-for-gnet-v1-cn/index.html @@ -19,27 +19,27 @@ - + - + - + - + - + - + - + - + @@ -75,30 +75,30 @@
# Go version and settings
Go Version : go1.17.2 linux/amd64
GOMAXPROCS : 8
# Benchmark parameters
TCP connections : 1000/2000/5000/10000
Packet size : 512/1024/2048/4096/8192/16384/32768/65536 bytes
Test duration : 15s

Echo benchmark

On MacOS (kqueue)

Test Environment

# Machine information
OS : MacOS Big Sur/x86_64
CPU : 6 CPU cores, Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory : 16.0 GiB
# Go version and settings
Go Version : go1.16.5 darwin/amd64
GOMAXPROCS : 12
-
# Benchmark parameters
TCP connections : 300/400/500/600/700
Packet size : 512/1024/2048/4096/8192 bytes
Test duration : 15s

Echo benchmark

️🚨 证书

gnet 的源码允许用户在遵循 MIT 开源证书 规则的前提下使用。

👏 贡献者

请在提 PR 之前仔细阅读 Contributing Guidelines,感谢那些为 gnet 贡献过代码的开发者!

🙏 致谢

⚓ 相关文章

🎡 用户案例

以下公司/组织在生产环境上使用了 gnet 作为底层网络服务。

          

如果你的项目也在使用 gnet,欢迎给我提 Pull Request 来更新这份用户案例列表。

💰 支持

如果有意向,可以通过每个月定量的少许捐赠来支持这个项目。

💎 赞助

每月定量捐赠 10 刀即可成为本项目的赞助者,届时您的 logo 或者 link 可以展示在本项目的 README 上。

☕️ 打赏

当您通过以下方式进行捐赠时,请务必留下姓名、Github账号或其他社交媒体账号,以便我将其添加到捐赠者名单中,以表谢意。

💴 资助者

Patrick Othmer  Jimmy  ChenZhen  Mai Yang  王开帅  Unger Alejandro  Swaggadan Weng Wei

🔑 JetBrains 开源证书支持

gnet 项目一直以来都是在 JetBrains 公司旗下的 GoLand 集成开发环境中进行开发,基于 free JetBrains Open Source license(s) 正版免费授权,在此表达我的谢意。

🔋 赞助商

本项目由以下机构赞助:

+
# Benchmark parameters
TCP connections : 300/400/500/600/700
Packet size : 512/1024/2048/4096/8192 bytes
Test duration : 15s

Echo benchmark

️🚨 证书

gnet 的源码允许用户在遵循 MIT 开源证书 规则的前提下使用。

👏 贡献者

请在提 PR 之前仔细阅读 Contributing Guidelines,感谢那些为 gnet 贡献过代码的开发者!

🙏 致谢

⚓ 相关文章

🎡 用户案例

以下公司/组织在生产环境上使用了 gnet 作为底层网络服务。

          

如果你的项目也在使用 gnet,欢迎给我提 Pull Request 来更新这份用户案例列表。

💰 支持

如果有意向,可以通过每个月定量的少许捐赠来支持这个项目。

💎 赞助

每月定量捐赠 10 刀即可成为本项目的赞助者,届时您的 logo 或者 link 可以展示在本项目的 README 上。

☕️ 打赏

当您通过以下方式进行捐赠时,请务必留下姓名、Github账号或其他社交媒体账号,以便我将其添加到捐赠者名单中,以表谢意。

💴 资助者

Patrick Othmer  Jimmy  ChenZhen  Mai Yang  王开帅  Unger Alejandro  Swaggadan Weng Wei

🔑 JetBrains 开源证书支持

gnet 项目一直以来都是在 JetBrains 公司旗下的 GoLand 集成开发环境中进行开发,基于 free JetBrains Open Source license(s) 正版免费授权,在此表达我的谢意。

🔋 赞助商

本项目由以下机构赞助:

- + - + - + - + - + - + - + - + diff --git a/docs/v1.x/doc-for-gnet-v1/index.html b/docs/v1.x/doc-for-gnet-v1/index.html index ed3988f47..f75a65fb7 100644 --- a/docs/v1.x/doc-for-gnet-v1/index.html +++ b/docs/v1.x/doc-for-gnet-v1/index.html @@ -19,27 +19,27 @@ - + - + - + - + - + - + - + - + @@ -79,27 +79,27 @@
# Benchmark parameters
TCP connections : 300/400/500/600/700
Packet size : 512/1024/2048/4096/8192 bytes
Test duration : 15s

Echo benchmark

️🚨 License

Source code in gnet is available under the MIT License.

👏 Contributors

Please read the Contributing Guidelines before opening a PR and thank you to all the developers who already made contributions to gnet!

🙏 Acknowledgments

⚓ Relevant Articles

🎡 Use cases

The following companies/organizations use gnet as the underlying network service in production.

          

If your projects are also using gnet, feel free to open a pull request refreshing this list of use cases.

💰 Backers

Support us with a monthly donation and help us continue our activities.

💎 Sponsors

Become a bronze sponsor with a monthly donation of $10 and get your logo on our README on Github.

☕️ Buy me a coffee

Please be sure to leave your name, Github account or other social media accounts when you donate by the following means so that I can add it to the list of donors as a token of my appreciation.

💴 Patrons

Patrick Othmer  Jimmy  ChenZhen  Mai Yang  王开帅  Unger Alejandro  Swaggadan Weng Wei

🔑 JetBrains OS licenses

gnet had been being developed with GoLand IDE under the free JetBrains Open Source license(s) granted by JetBrains s.r.o., hence I would like to express my thanks here.

🔋 Sponsorship

This project is supported by:

- + - + - + - + - + - + - + - + diff --git a/e44f5483.ec29ba58.js b/e44f5483.bf2e171c.js similarity index 73% rename from e44f5483.ec29ba58.js rename to e44f5483.bf2e171c.js index f4673ec0b..df321757d 100644 --- a/e44f5483.ec29ba58.js +++ b/e44f5483.bf2e171c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[103],{247:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-v-2-6-0","name":"domain: v2.6.0","count":1,"permalink":"/highlights/tags/domain-v-2-6-0"}')}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[102],{246:function(a){a.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-v-2-6-0","name":"domain: v2.6.0","count":1,"permalink":"/highlights/tags/domain-v-2-6-0"}')}}]); \ No newline at end of file diff --git a/e7288d87.b23762c3.js b/e7288d87.d3b3dbbf.js similarity index 71% rename from e7288d87.b23762c3.js rename to e7288d87.d3b3dbbf.js index c7978115c..217e588ea 100644 --- a/e7288d87.b23762c3.js +++ b/e7288d87.d3b3dbbf.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[104],{248:function(s){s.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-os","name":"domain: os","count":1,"permalink":"/highlights/tags/domain-os"}')}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[103],{247:function(s){s.exports=JSON.parse('{"allTagsPath":"/highlights/tags","slug":"domain-os","name":"domain: os","count":1,"permalink":"/highlights/tags/domain-os"}')}}]); \ No newline at end of file diff --git a/eeb81474.5afe3b57.js b/eeb81474.5afe3b57.js new file mode 100644 index 000000000..55a374439 --- /dev/null +++ b/eeb81474.5afe3b57.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[104],{248:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return r})),n.d(t,"metadata",(function(){return i})),n.d(t,"rightToc",(function(){return o})),n.d(t,"default",(function(){return p}));var a=n(1),c=n(9),b=(n(0),n(265)),r={last_modified_on:"2020-03-14",id:"announcing-gnet-v1-cn",title:"\u5b98\u5ba3 gnet v1.0.0",description:"\u6700\u5feb\u7684 Go \u7f51\u7edc\u6846\u67b6 gnet \u6765\u5566\uff01",author_github:"https://github.com/panjf2000",tags:["type: \u5b98\u5ba3","domain: \u5c55\u793a"]},i={permalink:"/blog/announcing-gnet-v1-cn",source:"@site/blog/2020-03-14-announcing-gnet-v1-zh.md",description:"\u6700\u5feb\u7684 Go \u7f51\u7edc\u6846\u67b6 gnet \u6765\u5566\uff01",date:"2020-03-14T00:00:00.000Z",tags:[{label:"type: \u5b98\u5ba3",permalink:"/blog/tags/type-\u5b98\u5ba3"},{label:"domain: \u5c55\u793a",permalink:"/blog/tags/domain-\u5c55\u793a"}],title:"\u5b98\u5ba3 gnet v1.0.0",readingTime:1.56,truncated:!1,prevItem:{title:"Announcing gnet v2.0.0",permalink:"/blog/announcing-gnet-v2"},nextItem:{title:"Announcing gnet v1.0.0",permalink:"/blog/announcing-gnet-v1"}},o=[{value:"\u4eca\u5929\uff0cgnet v1.0.0 \u6b63\u5f0f\u7248\u672c\u53d1\u5e03\uff0c\u4eab\u53d7\u8fd9\u4e2a\u9ad8\u6027\u80fd\u7684\u7f51\u7edc\u6846\u67b6\u5427\uff01",id:"\u4eca\u5929\uff0cgnet-v100-\u6b63\u5f0f\u7248\u672c\u53d1\u5e03\uff0c\u4eab\u53d7\u8fd9\u4e2a\u9ad8\u6027\u80fd\u7684\u7f51\u7edc\u6846\u67b6\u5427\uff01",children:[]},{value:"\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b",id:"\u591a\u7ebf\u7a0bgo\u7a0b\u7f51\u7edc\u6a21\u578b",children:[{value:"\u4e3b\u4ece\u591a Reactors",id:"\u4e3b\u4ece\u591a-reactors",children:[]},{value:"\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60",id:"\u4e3b\u4ece\u591a-reactors--\u7ebf\u7a0bgo\u7a0b\u6c60",children:[]}]},{value:"\u53ef\u91cd\u7528\u4e14\u81ea\u52a8\u6269\u5bb9\u7684 Ring-Buffer",id:"\u53ef\u91cd\u7528\u4e14\u81ea\u52a8\u6269\u5bb9\u7684-ring-buffer",children:[]}],l={rightToc:o};function p(e){var t=e.components,n=Object(c.a)(e,["components"]);return Object(b.b)("wrapper",Object(a.a)({},l,n,{components:t,mdxType:"MDXLayout"}),Object(b.b)("h2",{id:"\u4eca\u5929\uff0cgnet-v100-\u6b63\u5f0f\u7248\u672c\u53d1\u5e03\uff0c\u4eab\u53d7\u8fd9\u4e2a\u9ad8\u6027\u80fd\u7684\u7f51\u7edc\u6846\u67b6\u5427\uff01"},"\u4eca\u5929\uff0cgnet v1.0.0 \u6b63\u5f0f\u7248\u672c\u53d1\u5e03\uff0c\u4eab\u53d7\u8fd9\u4e2a\u9ad8\u6027\u80fd\u7684\u7f51\u7edc\u6846\u67b6\u5427\uff01"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/logos/master/gnet/logo.png",alt:"gnet"})),Object(b.b)("h1",{id:"-\u7b80\u4ecb"},"\ud83d\udcd6 \u7b80\u4ecb"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u662f\u4e00\u4e2a\u57fa\u4e8e\u4e8b\u4ef6\u9a71\u52a8\u7684\u9ad8\u6027\u80fd\u548c\u8f7b\u91cf\u7ea7\u7f51\u7edc\u6846\u67b6\u3002\u5b83\u76f4\u63a5\u4f7f\u7528 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Epoll"}),"epoll")," \u548c ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Kqueue"}),"kqueue")," \u7cfb\u7edf\u8c03\u7528\u800c\u975e\u6807\u51c6 Go \u7f51\u7edc\u5305\uff1a",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," \u6765\u6784\u5efa\u7f51\u7edc\u5e94\u7528\uff0c\u5b83\u7684\u5de5\u4f5c\u539f\u7406\u7c7b\u4f3c\u4e24\u4e2a\u5f00\u6e90\u7684\u7f51\u7edc\u5e93\uff1a",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/netty/netty"}),"netty")," \u548c ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/libuv/libuv"}),"libuv"),"\uff0c\u8fd9\u4e5f\u4f7f\u5f97 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8fbe\u5230\u4e86\u4e00\u4e2a\u8fdc\u8d85 Go ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net")," \u7684\u6027\u80fd\u8868\u73b0\u3002"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u8bbe\u8ba1\u5f00\u53d1\u7684\u521d\u8877\u4e0d\u662f\u4e3a\u4e86\u53d6\u4ee3 Go \u7684\u6807\u51c6\u7f51\u7edc\u5e93\uff1a",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://golang.org/pkg/net/"}),"net"),"\uff0c\u800c\u662f\u4e3a\u4e86\u521b\u9020\u51fa\u4e00\u4e2a\u7c7b\u4f3c\u4e8e ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"http://redis.io"}),"Redis"),"\u3001",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"http://www.haproxy.org"}),"Haproxy")," \u80fd\u9ad8\u6548\u5904\u7406\u7f51\u7edc\u5305\u7684 Go \u8bed\u8a00\u7f51\u7edc\u670d\u52a1\u5668\u6846\u67b6\u3002"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u5356\u70b9\u5728\u4e8e\u5b83\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u3001\u8f7b\u91cf\u7ea7\u3001\u975e\u963b\u585e\u7684\u7eaf Go \u5b9e\u73b0\u7684\u4f20\u8f93\u5c42\uff08TCP/UDP/Unix Domain Socket\uff09\u7f51\u7edc\u6846\u67b6\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u6765\u5b9e\u73b0\u81ea\u5df1\u7684\u5e94\u7528\u5c42\u7f51\u7edc\u534f\u8bae(HTTP\u3001RPC\u3001Redis\u3001WebSocket \u7b49\u7b49)\uff0c\u4ece\u800c\u6784\u5efa\u51fa\u81ea\u5df1\u7684\u5e94\u7528\u5c42\u7f51\u7edc\u5e94\u7528\uff1a\u6bd4\u5982\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4e0a\u5b9e\u73b0 HTTP \u534f\u8bae\u5c31\u53ef\u4ee5\u521b\u5efa\u51fa\u4e00\u4e2a HTTP \u670d\u52a1\u5668 \u6216\u8005 Web \u5f00\u53d1\u6846\u67b6\uff0c\u5b9e\u73b0 Redis \u534f\u8bae\u5c31\u53ef\u4ee5\u521b\u5efa\u51fa\u81ea\u5df1\u7684 Redis \u670d\u52a1\u5668\u7b49\u7b49\u3002"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},Object(b.b)("inlineCode",{parentName:"strong"},"gnet")," \u884d\u751f\u81ea\u53e6\u4e00\u4e2a\u9879\u76ee\uff1a",Object(b.b)("inlineCode",{parentName:"strong"},"evio"),"\uff0c\u4f46\u62e5\u6709\u66f4\u4e30\u5bcc\u7684\u529f\u80fd\u7279\u6027\uff0c\u4e14\u6027\u80fd\u8fdc\u80dc\u4e4b\u3002")),Object(b.b)("h1",{id:"-\u529f\u80fd"},"\ud83d\ude80 \u529f\u80fd"),Object(b.b)("ul",{className:"contains-task-list"},Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ",Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/gnet/blob/v1.0.0/README_ZH.md#-%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95"}),"\u9ad8\u6027\u80fd")," \u7684\u57fa\u4e8e\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b\u7684 event-loop \u4e8b\u4ef6\u9a71\u52a8"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5185\u7f6e Round-Robin \u8f6e\u8be2\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5185\u7f6e goroutine \u6c60\uff0c\u7531\u5f00\u6e90\u5e93 ",Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/panjf2000/ants"}),"ants")," \u63d0\u4f9b\u652f\u6301"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5185\u7f6e bytes \u5185\u5b58\u6c60\uff0c\u7531\u5f00\u6e90\u5e93 ",Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/valyala/bytebufferpool"}),"bytebufferpool")," \u63d0\u4f9b\u652f\u6301"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u7b80\u6d01\u7684 APIs"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u57fa\u4e8e Ring-Buffer \u7684\u9ad8\u6548\u5185\u5b58\u5229\u7528"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u652f\u6301\u591a\u79cd\u7f51\u7edc\u534f\u8bae/IPC \u673a\u5236\uff1aTCP\u3001UDP \u548c Unix Domain Socket"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u652f\u6301\u4e24\u79cd\u4e8b\u4ef6\u9a71\u52a8\u673a\u5236\uff1aLinux \u91cc\u7684 epoll \u4ee5\u53ca FreeBSD \u91cc\u7684 kqueue"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u652f\u6301\u5f02\u6b65\u5199\u64cd\u4f5c"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u7075\u6d3b\u7684\u4e8b\u4ef6\u5b9a\u65f6\u5668"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","SO_REUSEPORT \u7aef\u53e3\u91cd\u7528"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u5185\u7f6e\u591a\u79cd\u7f16\u89e3\u7801\u5668\uff0c\u652f\u6301\u5bf9 TCP \u6570\u636e\u6d41\u5206\u5305\uff1aLineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec \u548c LengthFieldBasedFrameCodec\uff0c\u53c2\u8003\u81ea ",Object(b.b)("a",Object(a.a)({parentName:"li"},{href:"https://netty.io/4.1/api/io/netty/handler/codec/package-summary.html"}),"netty codec"),"\uff0c\u800c\u4e14\u652f\u6301\u81ea\u5b9a\u5236\u7f16\u89e3\u7801\u5668"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!0,disabled:!0}))," ","\u652f\u6301 Windows \u5e73\u53f0\uff0c\u57fa\u4e8e ",Object(b.b)("del",{parentName:"li"},"IOCP \u4e8b\u4ef6\u9a71\u52a8\u673a\u5236")," Go \u6807\u51c6\u7f51\u7edc\u5e93"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","\u52a0\u5165\u66f4\u591a\u7684\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5\uff1a\u968f\u673a\u3001\u6700\u5c11\u8fde\u63a5\u3001\u4e00\u81f4\u6027\u54c8\u5e0c\u7b49\u7b49"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","\u652f\u6301 TLS"),Object(b.b)("li",Object(a.a)({parentName:"ul"},{className:"task-list-item"}),Object(b.b)("input",Object(a.a)({parentName:"li"},{type:"checkbox",checked:!1,disabled:!0}))," ","\u5b9e\u73b0 ",Object(b.b)("inlineCode",{parentName:"li"},"gnet")," \u5ba2\u6237\u7aef")),Object(b.b)("h1",{id:"-\u6838\u5fc3\u8bbe\u8ba1"},"\ud83d\udca1 \u6838\u5fc3\u8bbe\u8ba1"),Object(b.b)("h2",{id:"\u591a\u7ebf\u7a0bgo\u7a0b\u7f51\u7edc\u6a21\u578b"},"\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b"),Object(b.b)("h3",{id:"\u4e3b\u4ece\u591a-reactors"},"\u4e3b\u4ece\u591a Reactors"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u91cd\u65b0\u8bbe\u8ba1\u5f00\u53d1\u4e86\u4e00\u4e2a\u65b0\u5185\u7f6e\u7684\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b\uff1a\u300e\u4e3b\u4ece\u591a Reactors\u300f\uff0c\u8fd9\u4e5f\u662f ",Object(b.b)("inlineCode",{parentName:"p"},"netty")," \u9ed8\u8ba4\u7684\u591a\u7ebf\u7a0b\u7f51\u7edc\u6a21\u578b\uff0c\u4e0b\u9762\u662f\u8fd9\u4e2a\u6a21\u578b\u7684\u539f\u7406\u56fe\uff1a"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{alt:"multi_reactor",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors.png"})),Object(b.b)("p",null,"\u5b83\u7684\u8fd0\u884c\u6d41\u7a0b\u5982\u4e0b\u9762\u7684\u65f6\u5e8f\u56fe\uff1a"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{alt:"reactor",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors-sequence-diagram.png"})),Object(b.b)("h3",{id:"\u4e3b\u4ece\u591a-reactors--\u7ebf\u7a0bgo\u7a0b\u6c60"},"\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60"),Object(b.b)("p",null,"\u4f60\u53ef\u80fd\u4f1a\u95ee\u4e00\u4e2a\u95ee\u9898\uff1a\u5982\u679c\u6211\u7684\u4e1a\u52a1\u903b\u8f91\u662f\u963b\u585e\u7684\uff0c\u90a3\u4e48\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u6ce8\u518c\u65b9\u6cd5\u91cc\u7684\u903b\u8f91\u4e5f\u4f1a\u963b\u585e\uff0c\u4ece\u800c\u5bfc\u81f4\u963b\u585e event-loop \u7ebf\u7a0b\uff0c\u8fd9\u65f6\u5019\u600e\u4e48\u529e\uff1f"),Object(b.b)("p",null,"\u6b63\u5982\u4f60\u6240\u77e5\uff0c\u57fa\u4e8e ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7f16\u5199\u4f60\u7684\u7f51\u7edc\u670d\u52a1\u5668\u6709\u4e00\u6761\u6700\u91cd\u8981\u7684\u539f\u5219\uff1a\u6c38\u8fdc\u4e0d\u80fd\u8ba9\u4f60\u4e1a\u52a1\u903b\u8f91\uff08\u4e00\u822c\u5199\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u91cc\uff09\u963b\u585e event-loop \u7ebf\u7a0b\uff0c\u8fd9\u4e5f\u662f ",Object(b.b)("inlineCode",{parentName:"p"},"netty")," \u7684\u4e00\u6761\u6700\u91cd\u8981\u7684\u539f\u5219\uff0c\u5426\u5219\u7684\u8bdd\u5c06\u4f1a\u6781\u5927\u5730\u964d\u4f4e\u670d\u52a1\u5668\u7684\u541e\u5410\u91cf\u3002"),Object(b.b)("p",null,"\u6211\u7684\u56de\u7b54\u662f\uff0c\u57fa\u4e8e",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u7684\u53e6\u4e00\u79cd\u591a\u7ebf\u7a0b/Go\u7a0b\u7f51\u7edc\u6a21\u578b\uff1a\u300e\u5e26\u7ebf\u7a0b/Go\u7a0b\u6c60\u7684\u4e3b\u4ece\u591a Reactors\u300f\u53ef\u4ee5\u89e3\u51b3\u963b\u585e\u95ee\u9898\uff0c\u8fd9\u4e2a\u65b0\u7f51\u7edc\u6a21\u578b\u901a\u8fc7\u5f15\u5165\u4e00\u4e2a worker pool \u6765\u89e3\u51b3\u4e1a\u52a1\u903b\u8f91\u963b\u585e\u7684\u95ee\u9898\uff1a\u5b83\u4f1a\u5728\u542f\u52a8\u7684\u65f6\u5019\u521d\u59cb\u5316\u4e00\u4e2a worker pool\uff0c\u7136\u540e\u5728\u628a ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React"),"\u91cc\u9762\u7684\u963b\u585e\u4ee3\u7801\u653e\u5230 worker pool \u91cc\u6267\u884c\uff0c\u4ece\u800c\u907f\u514d\u963b\u585e event-loop \u7ebf\u7a0b\u3002"),Object(b.b)("p",null,"\u6a21\u578b\u7684\u67b6\u6784\u56fe\u5982\u4e0b\u6240\u793a\uff1a"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{alt:"multi_reactor_thread_pool",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors%2Bthread-pool.png"})),Object(b.b)("p",null,"\u5b83\u7684\u8fd0\u884c\u6d41\u7a0b\u5982\u4e0b\u9762\u7684\u65f6\u5e8f\u56fe\uff1a"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{alt:"multi-reactors",src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/multi-reactors%2Bthread-pool-sequence-diagram.png"})),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u901a\u8fc7\u5229\u7528 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/panjf2000/ants"}),"ants")," goroutine \u6c60\uff08\u4e00\u4e2a\u57fa\u4e8e Go \u5f00\u53d1\u7684\u9ad8\u6027\u80fd\u7684 goroutine \u6c60 \uff0c\u5b9e\u73b0\u4e86\u5bf9\u5927\u89c4\u6a21 goroutines \u7684\u8c03\u5ea6\u7ba1\u7406\u3001goroutines \u590d\u7528\uff09\u6765\u5b9e\u73b0\u300e\u4e3b\u4ece\u591a Reactors + \u7ebf\u7a0b/Go\u7a0b\u6c60\u300f\u7f51\u7edc\u6a21\u578b\u3002\u5173\u4e8e ",Object(b.b)("inlineCode",{parentName:"p"},"ants")," \u7684\u5168\u90e8\u529f\u80fd\u548c\u4f7f\u7528\uff0c\u53ef\u4ee5\u5728 ",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"https://pkg.go.dev/github.com/panjf2000/ants/v2?tab=doc"}),"ants \u6587\u6863")," \u91cc\u627e\u5230\u3002"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5185\u90e8\u96c6\u6210\u4e86 ",Object(b.b)("inlineCode",{parentName:"p"},"ants")," \u4ee5\u53ca\u63d0\u4f9b\u4e86 ",Object(b.b)("inlineCode",{parentName:"p"},"pool.goroutine.Default()")," \u65b9\u6cd5\u6765\u521d\u59cb\u5316\u4e00\u4e2a ",Object(b.b)("inlineCode",{parentName:"p"},"ants")," goroutine \u6c60\uff0c\u7136\u540e\u4f60\u53ef\u4ee5\u628a ",Object(b.b)("inlineCode",{parentName:"p"},"EventHandler.React")," \u4e2d\u963b\u585e\u7684\u4e1a\u52a1\u903b\u8f91\u63d0\u4ea4\u5230 goroutine \u6c60\u91cc\u6267\u884c\uff0c\u6700\u540e\u5728 goroutine \u6c60\u91cc\u7684\u4ee3\u7801\u8c03\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet.Conn.AsyncWrite([]byte)")," \u65b9\u6cd5\u628a\u5904\u7406\u5b8c\u963b\u585e\u903b\u8f91\u4e4b\u540e\u5f97\u5230\u7684\u8f93\u51fa\u6570\u636e\u5f02\u6b65\u5199\u56de\u5ba2\u6237\u7aef\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u907f\u514d\u963b\u585e event-loop \u7ebf\u7a0b\u3002"),Object(b.b)("p",null,"\u6709\u5173\u5728 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u91cc\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"ants")," goroutine \u6c60\u7684\u7ec6\u8282\u53ef\u4ee5\u5230",Object(b.b)("a",Object(a.a)({parentName:"p"},{href:"#%E5%B8%A6%E9%98%BB%E5%A1%9E%E9%80%BB%E8%BE%91%E7%9A%84-echo-%E6%9C%8D%E5%8A%A1%E5%99%A8"}),"\u8fd9\u91cc"),"\u8fdb\u4e00\u6b65\u4e86\u89e3\u3002"),Object(b.b)("h2",{id:"\u53ef\u91cd\u7528\u4e14\u81ea\u52a8\u6269\u5bb9\u7684-ring-buffer"},"\u53ef\u91cd\u7528\u4e14\u81ea\u52a8\u6269\u5bb9\u7684 Ring-Buffer"),Object(b.b)("p",null,Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u5185\u7f6e\u4e86inbound \u548c outbound \u4e24\u4e2a buffers\uff0c\u57fa\u4e8e Ring-Buffer \u539f\u7406\u5b9e\u73b0\uff0c\u5206\u522b\u7528\u6765\u7f13\u51b2\u8f93\u5165\u8f93\u51fa\u7684\u7f51\u7edc\u6570\u636e\u4ee5\u53ca\u7ba1\u7406\u5185\u5b58\uff0cgnet \u91cc\u9762\u7684 ring buffer \u80fd\u591f\u91cd\u7528\u5185\u5b58\u4ee5\u53ca\u6309\u9700\u6269\u5bb9\u3002"),Object(b.b)("p",null,"\u5bf9\u4e8e TCP \u534f\u8bae\u7684\u6d41\u6570\u636e\uff0c\u4f7f\u7528 ",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4e0d\u9700\u8981\u4e1a\u52a1\u65b9\u4e3a\u4e86\u89e3\u6790\u5e94\u7528\u5c42\u534f\u8bae\u800c\u81ea\u5df1\u7ef4\u62a4\u548c\u7ba1\u7406 buffers\uff0c",Object(b.b)("inlineCode",{parentName:"p"},"gnet")," \u4f1a\u66ff\u4e1a\u52a1\u65b9\u5b8c\u6210\u7f13\u51b2\u548c\u7ba1\u7406\u7f51\u7edc\u6570\u636e\u7684\u4efb\u52a1\uff0c\u964d\u4f4e\u4e1a\u52a1\u4ee3\u7801\u7684\u590d\u6742\u6027\u4ee5\u53ca\u964d\u4f4e\u5f00\u53d1\u8005\u7684\u5fc3\u667a\u8d1f\u62c5\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u80fd\u591f\u4e13\u6ce8\u4e8e\u4e1a\u52a1\u903b\u8f91\u800c\u975e\u4e00\u4e9b\u5e95\u5c42\u5b9e\u73b0\u3002"),Object(b.b)("p",{align:"center"},Object(b.b)("img",{src:"https://raw.githubusercontent.com/panjf2000/illustrations/master/go/ring-buffer.gif"})))}p.isMDXComponent=!0},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return O}));var a=n(0),c=n.n(a);function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var l=c.a.createContext({}),p=function(e){var t=c.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i({},t,{},e)),n},s=function(e){var t=p(e.components);return c.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return c.a.createElement(c.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,b=e.originalType,r=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),s=p(n),u=a,O=s["".concat(r,".").concat(u)]||s[u]||m[u]||b;return n?c.a.createElement(O,i({ref:t},l,{components:n})):c.a.createElement(O,i({ref:t},l))}));function O(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var b=n.length,r=new Array(b);r[0]=u;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:a,r[1]=i;for(var l=2;l - + - + - + - + - + - + @@ -43,21 +43,21 @@ in addition to these built-in codecs, gnet also supports customized codecs by functional option Codec.

Get This Change

This kind of change with the `new feature` tag brings new features to gnet. Feel free to have a galance through all those commits of new features if you are interested.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2019-11-12-supported-windows/index.html b/highlights/2019-11-12-supported-windows/index.html index e58977948..e8853cd95 100644 --- a/highlights/2019-11-12-supported-windows/index.html +++ b/highlights/2019-11-12-supported-windows/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -43,19 +43,19 @@ which makes gnet a real cross-platform networking framework.

Get This Change

This kind of change with the `new feature` tag brings new features to gnet. Feel free to have a galance through all those commits of new features if you are interested.

Like What You See?

- + - + - + - + - + diff --git a/highlights/2020-03-13-released-first-version/index.html b/highlights/2020-03-13-released-first-version/index.html index d74662703..5e83ffc01 100644 --- a/highlights/2020-03-13-released-first-version/index.html +++ b/highlights/2020-03-13-released-first-version/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -42,19 +42,19 @@
/ Mar 13th, 2020 /

Released gnet v1.0.0

Released the official stable version of v1.0.0

Features

  • High-performance event-loop under networking model of multiple threads/goroutines
  • Built-in load balancing algorithm: Round-Robin
  • Built-in goroutine pool powered by the library ants
  • Built-in memory pool with bytes powered by the library bytebufferpool
  • Concise APIs
  • Efficient memory usage: Ring-Buffer
  • Supporting multiple protocols/IPC mechanism: TCP, UDP and Unix Domain Socket
  • Supporting two event-driven mechanisms: epoll on Linux and kqueue on FreeBSD
  • Supporting asynchronous write operation
  • Flexible ticker event
  • SO_REUSEPORT socket option
  • Built-in multiple codecs to encode/decode network frames into/from TCP stream: LineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec and LengthFieldBasedFrameCodec, referencing netty codec, also supporting customized codecs
  • Supporting Windows platform with event-driven mechanism of IOCP Go stdlib: net
  • Additional load-balancing algorithms: Random, Least-Connections, Consistent-hashing and so on
  • TLS support
  • Implementation of gnet Client

Get This Change

This change was made available in 1.0.0.

Like What You See?

- + - + - + - + - + diff --git a/highlights/2020-03-31-supported-least-connections-load-balancing-algorithm/index.html b/highlights/2020-03-31-supported-least-connections-load-balancing-algorithm/index.html index 97cb67ebd..f20a04cf7 100644 --- a/highlights/2020-03-31-supported-least-connections-load-balancing-algorithm/index.html +++ b/highlights/2020-03-31-supported-least-connections-load-balancing-algorithm/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -43,19 +43,19 @@ and provide the new functional option LB, enabling users to switch load-balancing algorithm at their own sweet will.

Get This Change

This kind of change with the `new feature` tag brings new features to gnet. Feel free to have a galance through all those commits of new features if you are interested.

Like What You See?

- + - + - + - + - + diff --git a/highlights/2020-04-03-released-1-1-0/index.html b/highlights/2020-04-03-released-1-1-0/index.html index 7334b8350..2b638d8a9 100644 --- a/highlights/2020-04-03-released-1-1-0/index.html +++ b/highlights/2020-04-03-released-1-1-0/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -42,19 +42,19 @@
/ Apr 3rd, 2020 /

Released gnet v1.1.0

Released the official stable version of v1.1.0

Features

  • Support new load-balancing algorithm of least-connections #63
  • Support new load-balancing algorithm of source-addr-hash #64
  • Add a new API to get the number of currently active connections 5ae4849

Bugfixes

  • Fix an issue of not recycling byte-buffers 3b6edfd
  • Fix a bug of reading data from the full ring-buffer a9caa26

Enhancements

  • Improve several methods of ring-buffer 828e845
  • Refine the range indexes when re-slicing 008c0c9
  • Lazily allocate memory for ring-buffers 095ef52

Docs

Misc

  • Rename the eventloop_group.go to load_balancing.go 24203f4
  • Add unit test for ring-buffer ecf3473072d1c02ca69b469d24c5581eae041d2f 94246dc

Get This Change

This change was made available in 1.1.0.

Like What You See?

- + - + - + - + - + diff --git a/highlights/2020-05-11-released-1-2-0/index.html b/highlights/2020-05-11-released-1-2-0/index.html index 3895f3267..39908491d 100644 --- a/highlights/2020-05-11-released-1-2-0/index.html +++ b/highlights/2020-05-11-released-1-2-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ May 11th, 2020 /

Released gnet v1.2.0

Released the official stable version of v1.2.0

Features

  • Support graceful shutdown with OS signals (Fixes #82)

Enhancements

  • Improve the creation processes of netpoller (Fixes #72) ccc6c25
  • Reuse slice struct when resetting buffer 916c255
  • Make a big allocation on ring-buffer at the first time 61963bd

Docs

  • Update Features section in READMEs a0d53f5
  • Add a new article about gnet d500bf4
  • Supplement the missing acknowledgment item b031357

Misc

  • Enable ReadN(int) to handle corner cases 2e89e25
  • Leverage reviewdog as automated code review tool 5db42f9
  • Use customized logger to log errors instead of std log package 3a69701
  • Remove useless field of server 47817a0
  • Unexport some errors 5287bd8

Get This Change

This change was made available in 1.2.0.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2020-07-02-raw-syscalls-sockets/index.html b/highlights/2020-07-02-raw-syscalls-sockets/index.html index 90a4710d8..4243e3d5f 100644 --- a/highlights/2020-07-02-raw-syscalls-sockets/index.html +++ b/highlights/2020-07-02-raw-syscalls-sockets/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -43,21 +43,21 @@ there are no more methods from net package involved in the process of creating the listener of server socket, all by raw system calls.

Get This Change

This kind of change with the `new feature` tag brings new features to gnet. Feel free to have a galance through all those commits of new features if you are interested.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2020-09-13-released-1-3-0/index.html b/highlights/2020-09-13-released-1-3-0/index.html index b0af45423..befbd4e93 100644 --- a/highlights/2020-09-13-released-1-3-0/index.html +++ b/highlights/2020-09-13-released-1-3-0/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -42,19 +42,19 @@
/ Sep 13th, 2020 /

Released gnet v1.3.0

Released the official stable version of v1.3.0

Features

  • Determine logging mode by environment variable 2a7977
  • Support locking each I/O event-loop goroutine to an OS thread 6fd641

Enhancements

  • Improve the implementation of Least-Connections load-balancing b6a5f5
  • Speed up the Least-Connections load-balancing b5fbbd
  • Leverage system calls instead of net package to create listeners ccc8c6
  • Refine the logging module f46da4
  • Reorg errors in gnet 1c2f4b
  • Move logging module into internal package 00af50
  • Take off the codec from eventloop bc85c3
  • Refactor for buffer in Conn 455c5a
  • Refactor the load-balancing algorithm of source addr hash abbf58
  • Make channel buffered if necessary 43f93c

Bugfixes

  • Fix a bug that led to negative counter of sync.WaitGroup on Windows 16ed4a
  • Add "windows" build tag under SO_REUSEPORT mode 7862f3
  • Supplement all the formal protocol formats of TCP and UDP 258253
  • Resolve the issue of closing one fd twice b5a5c7
  • Fix concurrent loopCloseConn causes panic #111
  • Eliminate duplicate calls to loopCloseConn a72f5f

Docs

  • Add a customized codec example #90
  • Add placeholder for user cases and new relevant article 5197f1
  • Renew results of techempower benchmark 61eee8
  • Add the list of donors 42e04d
  • Add xs:code 33a3e5
  • Build an official website for gnet 49363c
  • Move the majority of content to website and simplify READMEs 903ff8

Misc

  • Fix a typo and improve code comments 37d75c
  • Use SyscallError to wrap system calls errors c3907e
  • Refine go build tags of operating systems 637144
  • Format copyright info 6872c2
  • Remove all examples from the source-code repo a704e0
  • refine the usage of os.NewSyscallError 2d54d8

Get This Change

This change was made available in 1.3.0.

Like What You See?

- + - + - + - + - + diff --git a/highlights/2020-09-13-supported-locking-os-thread/index.html b/highlights/2020-09-13-supported-locking-os-thread/index.html index 7968334e4..ac67a87bd 100644 --- a/highlights/2020-09-13-supported-locking-os-thread/index.html +++ b/highlights/2020-09-13-supported-locking-os-thread/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -43,19 +43,19 @@ or invoke certain C libraries (such as graphics lib: GLib) that require thread-level manipulation via cgo, or want all I/O event-loops to actually run in parallel for a potential higher performance.

Get This Change

This kind of change with the `new feature` tag brings new features to gnet. Feel free to have a galance through all those commits of new features if you are interested.

Like What You See?

- + - + - + - + - + diff --git a/highlights/2021-02-17-released-1-4-0/index.html b/highlights/2021-02-17-released-1-4-0/index.html index e1a6ab734..6cb0a23f8 100644 --- a/highlights/2021-02-17-released-1-4-0/index.html +++ b/highlights/2021-02-17-released-1-4-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ Feb 17th, 2021 /

Released gnet v1.4.0

Released the official stable version of v1.4.0

Features

  • Support TCP_NODELAY socket option 525df8
  • Implement the lock-free queue for dispatching tasks faster #181

Enhancements

  • Shrink the ring-buffer for saving memory 14fd04
  • Improve event poll fc042c
  • Improve the buffered channels 83b96e
  • Shrink the poll event list when it need to 158763
  • Improve the I/O in event-loop c554f4
  • Prioritize writable events 0f08c8
  • Make it more robust when running async jobs 6509b8
  • Improve the poller waking logic 4d8acc

Bugfixes

  • Re-enqueue the subsequent jobs when a error occurs 1af3f6
  • Close and release a socket when error occurs 9d86c9
  • Check outbound buffer in case the socket has been released 035f61
  • Avoid starving sockets e31525

Docs

  • Enrich the doc about using UDP packets 0047c1
  • Add more user cases of gnet 076b16
  • Update benchmark results 028bab
  • Update the description about ring-buffer 38b086

Misc

  • Add one more donor 12bfa5
  • Refine code 2aee5a
  • Add comments on those core code 2404ed
  • Refine code and add comments 4ecbc5
  • Add a warning comment for OnOpened 0bddd0

Get This Change

This change was made available in 1.4.0.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2021-07-11-released-1-5-0/index.html b/highlights/2021-07-11-released-1-5-0/index.html index 5fe111880..05b192efd 100644 --- a/highlights/2021-07-11-released-1-5-0/index.html +++ b/highlights/2021-07-11-released-1-5-0/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -42,19 +42,19 @@
/ Jul 11th, 2021 /

Released gnet v1.5.0

Released the official stable version of v1.5.0

Features

  • Move the logging module out of the internal package and refactor to make it serviceable for users d56606 b6b1cf 8837a9

Enhancements

  • Support writev and readv in eventloop f299a8
  • Reduce GC pause frequency for Conn.AsyncWrite (#218) 477bb4
  • Improve logging module 8837a9 b6b1cf
  • Refactor the inside AsyncTaskQueue to make it more generic 2d1a46
  • Reduce GC pause frequency for accepting connections 2d1a46

Docs

  • Add a new user case: Tencent Games b7ea83
  • Add a new donor ee965a

Misc

  • Add debugging log when error occurs in Accept() #222
  • Make some trivial changes to ring-buffer 1bdd3a

Get This Change

This change was made available in 1.5.0.

Like What You See?

- + - + - + - + - + diff --git a/highlights/2021-07-20-released-1-5-2/index.html b/highlights/2021-07-20-released-1-5-2/index.html index 27a3f9048..d0e652bfa 100644 --- a/highlights/2021-07-20-released-1-5-2/index.html +++ b/highlights/2021-07-20-released-1-5-2/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ Jul 20th, 2021 /

Released gnet v1.5.2

Released the official stable version of v1.5.2

Enhancements

About poller

By default, gnet utilizes the standard package golang.org/x/sys/unix to implement pollers with epoll or kqueue, where a HASH MAP of fd->conn is introduced to help retrieve connections by file descriptors returned from pollers, but now the user can run go build with build tags poll_opt, like this: go build -tags=poll_opt, and gnet then switch to the optimized implementations of pollers that invoke the system calls of epoll or kqueue directly and add file descriptors to the interest list along with storing the corresponding connection pointers into epoll_data or kevent, in which case gnet can get rid of the HASH MAP of fd->conn and regain each connection pointer by the conversion of void* pointer in the I/O event-looping. In theory, it ought to achieve a higher performance with this optimization.

See #230 for code details.

About ring-buffer

Adjust the growth strategy of ring-buffer, make it go more smoothly rather than simply doubling up (which may waste a huge amount of memory) in each buffer scaling. ccd37f fd8d27

Get This Change

This change was made available in 1.5.2.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2021-12-05-released-1-6-0/index.html b/highlights/2021-12-05-released-1-6-0/index.html index 5679b7aad..351736bca 100644 --- a/highlights/2021-12-05-released-1-6-0/index.html +++ b/highlights/2021-12-05-released-1-6-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ Dec 5th, 2021 /

Released gnet v1.6.0

Released the official stable version of v1.6.0

gnet client is now available for production!

Features

  • Add a new event handler: AfterWrite() 6a654c
  • Implement the gnet client 2295e8 a5ac95 4db46d 802fa3 7159b9
  • Implement writev and readv on BSD-like OS's 60ba6d
  • Implement a mixed buffer of ring-buffer and list-buffer edbdf4
  • Invoke OnClosed() when a UDP socket is closed 7be4b2
  • Implement the gnet.Conn.AsyncWritev() 9a2032

Enhancements

  • Prevent the event-list from expanding or shrinking endlessly b220df
  • Reduce the potential system calls for waking pollers up 9ce41f
  • Eliminate the code for preventing false-sharing 0bfade
  • Support so_reuseaddr #280
  • Make several improvements for logger 58d203
  • Optimize the buffer management and network I/O 6aba6d
  • Improve the project layout 2e172b
  • Improve the logic of reading data from socket into ring-buffer a7f07b
  • Get as much data read from socket per loop as possible 148ee1
  • Improve the network read with ring-buffer and readv 0dcf59
  • Avoid memory allocations when calling readv 15611b
  • Refactor the logic of handling UDP sockets d72d3d
  • Make the mixed-buffer more flexible d72d3d
  • Improve the management logic of the mixed-buffer b8d571

Bugfixes

  • Resolve the data race of stdConn on Windows #235
  • Fix the data corruption in some default codecs a56d2f
  • Fix the issue of panic: runtime error: slice bounds out of range 30311e

Docs

Misc

Get This Change

This change was made available in 1.6.0.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2022-02-27-release-of-gnet-v2/index.html b/highlights/2022-02-27-release-of-gnet-v2/index.html index 4140db5b8..3c7389936 100644 --- a/highlights/2022-02-27-release-of-gnet-v2/index.html +++ b/highlights/2022-02-27-release-of-gnet-v2/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -42,19 +42,19 @@
/ Feb 27th, 2022 /

Release of gnet v2.0.0

Release of the official stable version of v2.0.0

Today, I'm thrilled to announce the release of gnet v2.0.0, in which we've made plenty of significant improvements and optimizations: added and removed some APIs, redesigned and reimplemented the buffer, optimized the memory pool, etc.

Please visit Announcing gnet v2.0.0 blog post

Get This Change

This change was made available in 2.0.0.

Like What You See?

- + - + - + - + - + diff --git a/highlights/2022-12-03-release-of-gnet-v2-2-0/index.html b/highlights/2022-12-03-release-of-gnet-v2-2-0/index.html index 0edebfc4d..948f14a08 100644 --- a/highlights/2022-12-03-release-of-gnet-v2-2-0/index.html +++ b/highlights/2022-12-03-release-of-gnet-v2-2-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ Dec 3rd, 2022 /

Release of gnet v2.2.0

Release of the official stable version of v2.2.0

The release of v2.2.0 predominantly focuses on bug fixes and feature implementations.

It's worth noting that breaking changes have been made to the API, so please refer to the release notes for more information.

Get This Change

This change was made available in 2.2.0.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2023-05-19-release-candidate-for-gnet-v2-3-0/index.html b/highlights/2023-05-19-release-candidate-for-gnet-v2-3-0/index.html index 62eca2a1c..d503d9c2d 100644 --- a/highlights/2023-05-19-release-candidate-for-gnet-v2-3-0/index.html +++ b/highlights/2023-05-19-release-candidate-for-gnet-v2-3-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -44,21 +44,21 @@
│ old │ new │
│ allocs/op │ allocs/op vs base │
GC4El100k/Run-4-eventloop-100000-10 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
GC4El200k/Run-4-eventloop-200000-10 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
GC4El500k/Run-4-eventloop-500000-10 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
geomean ² +0.00% ²
¹ all samples are equal
² summaries must be >0 to compute geomean

The more connections there are, the more pronounced the effect.

While we have performed sufficient testing on matrix, we are still using map as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case matrix has any unexpected bugs, you can quickly fall back to the default map. We will consider promoting matrix to be the default storage for connections in a subsequent official release.

Another significant leap is #461, you can now run gnet on Windows, it should be noted that the Windows version of gnet is intended for development purposes and is not recommended for use in production.

Visit the release notes for more details.

Get This Change

This change was made available in 2.3.0-rc.1.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2023-07-01-release-of-gnet-v2-3-0/index.html b/highlights/2023-07-01-release-of-gnet-v2-3-0/index.html index eb76b5809..954924537 100644 --- a/highlights/2023-07-01-release-of-gnet-v2-3-0/index.html +++ b/highlights/2023-07-01-release-of-gnet-v2-3-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -44,21 +44,21 @@
│ old │ new │
│ allocs/op │ allocs/op vs base │
GC4El100k/Run-4-eventloop-100000-10 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
GC4El200k/Run-4-eventloop-200000-10 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
GC4El500k/Run-4-eventloop-500000-10 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
geomean ² +0.00% ²
¹ all samples are equal
² summaries must be >0 to compute geomean

The more connections there are, the more pronounced the effect.

While we have performed sufficient testing on matrix, we are still using map as the default connection storage in this RC version for the sake of caution, but you can enable the new data structure by specifying build tags: -tags=gc_opt. This can be considered as a precautionary measure so that in case matrix has any unexpected bugs, you can quickly fall back to the default map. We will consider promoting matrix to be the default storage for connections in a subsequent official release.

Another significant leap is #461, you can now run gnet on Windows, it should be noted that the Windows version of gnet is intended for development purposes and is not recommended for use in production.

Visit the release notes for more details.

Get This Change

This change was made available in 2.3.0.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2023-11-11-gnet-techempower-benchmark-top1/index.html b/highlights/2023-11-11-gnet-techempower-benchmark-top1/index.html index 15061cfc6..8973ce11d 100644 --- a/highlights/2023-11-11-gnet-techempower-benchmark-top1/index.html +++ b/highlights/2023-11-11-gnet-techempower-benchmark-top1/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ Nov 11th, 2023 /

Gnet tops the TechEmpower benchmark leaderboard

Gnet tops the TechEmpower benchmark leaderboard, becoming the world No. 1

Breaking News 🎉🎉🎉

TechEmpower Web Framework Benchmarks is a performance comparison of many web application frameworks executing fundamental tasks such as JSON serialization, database access, and server-side template composition.

gnet tops the leaderboard of TechEmpower Plaintext Benchmark in round 22, becoming the world No. 1.

This is a leaderboard of the top 50 out of 486 frameworks that encompass various programming languages worldwide, in which gnet is ranked first.

This is the full framework ranking of Go and gnet tops all the other frameworks, which makes gnet the fastest networking framework in Go.

To see the full leaderboard, visit TechEmpower Benchmark Round 22.

Get This Change

This change was made available in 2.3.5.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2024-04-04-release-of-gnet-v2-4-0/index.html b/highlights/2024-04-04-release-of-gnet-v2-4-0/index.html index 9de1322be..a4ced2a77 100644 --- a/highlights/2024-04-04-release-of-gnet-v2-4-0/index.html +++ b/highlights/2024-04-04-release-of-gnet-v2-4-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
- + - + - + - + - + - + diff --git a/highlights/2024-04-22-release-of-gnet-v2-5-0/index.html b/highlights/2024-04-22-release-of-gnet-v2-5-0/index.html index 777db00ae..ac3b53d77 100644 --- a/highlights/2024-04-22-release-of-gnet-v2-5-0/index.html +++ b/highlights/2024-04-22-release-of-gnet-v2-5-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ Apr 22nd, 2024 /

Release of gnet v2.5.0

Release of the official stable version of v2.5.0

I hereby announce the release of gnet v2.5.0, where we've added two major features of edge-triggered mode and multiple addresses bindings, along with a good deal of code refactoring and optimizations.

Please visit Announcing gnet v2.5.0 for more details.

Get This Change

This change was made available in 2.5.0.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/2024-11-09-release-of-gnet-v2-6-0/index.html b/highlights/2024-11-09-release-of-gnet-v2-6-0/index.html index 1a0c97bb2..b2dc59a2a 100644 --- a/highlights/2024-11-09-release-of-gnet-v2-6-0/index.html +++ b/highlights/2024-11-09-release-of-gnet-v2-6-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -42,21 +42,21 @@
/ Nov 9th, 2024 /

Release of gnet v2.6.0

Release of the official stable version of v2.6.0

I hereby announce the release of gnet v2.6.0, where we've added two major features of SO_BINDTODEVICE and configurable edge-triggered chunk, along with a few bug-fixes.

Another change to note is that starting with this release, the minimum required Go version to run gnet is 1.20!

Get This Change

This change was made available in 2.6.0.

Like What You See?

- + - + - + - + - + - + diff --git a/highlights/index.html b/highlights/index.html index cf4ec6cd5..745a7b274 100644 --- a/highlights/index.html +++ b/highlights/index.html @@ -19,61 +19,61 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -82,61 +82,61 @@

gnet Highlights

New features & updates. Follow @panjf2000 for real-time updates!
- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-load-balancing/index.html b/highlights/tags/domain-load-balancing/index.html index fed36179c..1b84bd3e2 100644 --- a/highlights/tags/domain-load-balancing/index.html +++ b/highlights/tags/domain-load-balancing/index.html @@ -19,25 +19,25 @@ - + - + - + - + - + - + - + - + @@ -46,25 +46,25 @@ - + - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-os/index.html b/highlights/tags/domain-os/index.html index a31678b81..c25d51a32 100644 --- a/highlights/tags/domain-os/index.html +++ b/highlights/tags/domain-os/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-socket/index.html b/highlights/tags/domain-socket/index.html index 2f3593c17..261ae82b6 100644 --- a/highlights/tags/domain-socket/index.html +++ b/highlights/tags/domain-socket/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-thread/index.html b/highlights/tags/domain-thread/index.html index 46b1c1a4b..cbef81d81 100644 --- a/highlights/tags/domain-thread/index.html +++ b/highlights/tags/domain-thread/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-1-0-0/index.html b/highlights/tags/domain-v-1-0-0/index.html index 6035656f3..a5008cf28 100644 --- a/highlights/tags/domain-v-1-0-0/index.html +++ b/highlights/tags/domain-v-1-0-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-1-1-0/index.html b/highlights/tags/domain-v-1-1-0/index.html index c029edbe7..ffb73f750 100644 --- a/highlights/tags/domain-v-1-1-0/index.html +++ b/highlights/tags/domain-v-1-1-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-1-2-0/index.html b/highlights/tags/domain-v-1-2-0/index.html index 3ab1f407c..bb832c765 100644 --- a/highlights/tags/domain-v-1-2-0/index.html +++ b/highlights/tags/domain-v-1-2-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -44,21 +44,21 @@ - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-1-3-0/index.html b/highlights/tags/domain-v-1-3-0/index.html index 7d8a65c2d..2fd435349 100644 --- a/highlights/tags/domain-v-1-3-0/index.html +++ b/highlights/tags/domain-v-1-3-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-1-4-0/index.html b/highlights/tags/domain-v-1-4-0/index.html index 08d99b5f9..2e7234445 100644 --- a/highlights/tags/domain-v-1-4-0/index.html +++ b/highlights/tags/domain-v-1-4-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-1-5-0/index.html b/highlights/tags/domain-v-1-5-0/index.html index 6f082dda2..c66bd7cfb 100644 --- a/highlights/tags/domain-v-1-5-0/index.html +++ b/highlights/tags/domain-v-1-5-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-1-5-2/index.html b/highlights/tags/domain-v-1-5-2/index.html index 70b23ccc2..80a09dd87 100644 --- a/highlights/tags/domain-v-1-5-2/index.html +++ b/highlights/tags/domain-v-1-5-2/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@

1 highlight tagged with "domain: v1.5.2"

- + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-1-6-0/index.html b/highlights/tags/domain-v-1-6-0/index.html index bd583de00..17e0a8140 100644 --- a/highlights/tags/domain-v-1-6-0/index.html +++ b/highlights/tags/domain-v-1-6-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@

1 highlight tagged with "domain: v1.6.0"

- + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-2-0-0/index.html b/highlights/tags/domain-v-2-0-0/index.html index 8d3d618e9..29acd995f 100644 --- a/highlights/tags/domain-v-2-0-0/index.html +++ b/highlights/tags/domain-v-2-0-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-2-2-0/index.html b/highlights/tags/domain-v-2-2-0/index.html index 726f666f5..32a489db3 100644 --- a/highlights/tags/domain-v-2-2-0/index.html +++ b/highlights/tags/domain-v-2-2-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-2-3-0-rc-1/index.html b/highlights/tags/domain-v-2-3-0-rc-1/index.html index 1bf18647c..939d5596f 100644 --- a/highlights/tags/domain-v-2-3-0-rc-1/index.html +++ b/highlights/tags/domain-v-2-3-0-rc-1/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-2-3-0/index.html b/highlights/tags/domain-v-2-3-0/index.html index 84f04d6e0..0ae2b3195 100644 --- a/highlights/tags/domain-v-2-3-0/index.html +++ b/highlights/tags/domain-v-2-3-0/index.html @@ -19,21 +19,21 @@ - + - + - + - + - + - + @@ -44,21 +44,21 @@ - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-2-3-5/index.html b/highlights/tags/domain-v-2-3-5/index.html index 92cd4e4c4..6b2256584 100644 --- a/highlights/tags/domain-v-2-3-5/index.html +++ b/highlights/tags/domain-v-2-3-5/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-2-4-0/index.html b/highlights/tags/domain-v-2-4-0/index.html index a51af1dd2..c533ad8af 100644 --- a/highlights/tags/domain-v-2-4-0/index.html +++ b/highlights/tags/domain-v-2-4-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-2-5-0/index.html b/highlights/tags/domain-v-2-5-0/index.html index df2e61dd2..f45e0c989 100644 --- a/highlights/tags/domain-v-2-5-0/index.html +++ b/highlights/tags/domain-v-2-5-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/domain-v-2-6-0/index.html b/highlights/tags/domain-v-2-6-0/index.html index b6da6a2b0..3224b11fd 100644 --- a/highlights/tags/domain-v-2-6-0/index.html +++ b/highlights/tags/domain-v-2-6-0/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/index.html b/highlights/tags/index.html index ca98e59e8..44f276d38 100644 --- a/highlights/tags/index.html +++ b/highlights/tags/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -42,19 +42,19 @@ - + - + - + - + - + diff --git a/highlights/tags/platform-arm-64/index.html b/highlights/tags/platform-arm-64/index.html index efda8a3f3..316b2887c 100644 --- a/highlights/tags/platform-arm-64/index.html +++ b/highlights/tags/platform-arm-64/index.html @@ -19,25 +19,25 @@ - + - + - + - + - + - + - + @@ -46,25 +46,25 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/platform-windows/index.html b/highlights/tags/platform-windows/index.html index bcdd092b0..35efdafb6 100644 --- a/highlights/tags/platform-windows/index.html +++ b/highlights/tags/platform-windows/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/type-new-feature/index.html b/highlights/tags/type-new-feature/index.html index 4ba43cd9a..3dca69ec2 100644 --- a/highlights/tags/type-new-feature/index.html +++ b/highlights/tags/type-new-feature/index.html @@ -19,27 +19,27 @@ - + - + - + - + - + - + - + - + @@ -50,27 +50,27 @@ - + - + - + - + - + - + - + - + diff --git a/highlights/tags/type-optimization/index.html b/highlights/tags/type-optimization/index.html index 5535cb0da..f092523f4 100644 --- a/highlights/tags/type-optimization/index.html +++ b/highlights/tags/type-optimization/index.html @@ -19,23 +19,23 @@ - + - + - + - + - + - + - + @@ -44,23 +44,23 @@ - + - + - + - + - + - + - + diff --git a/highlights/tags/type-release/index.html b/highlights/tags/type-release/index.html index 6e5b693de..c0eb2065f 100644 --- a/highlights/tags/type-release/index.html +++ b/highlights/tags/type-release/index.html @@ -19,33 +19,33 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -54,33 +54,33 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/highlights/tags/type-tag/index.html b/highlights/tags/type-tag/index.html index fe1284792..2a10304e5 100644 --- a/highlights/tags/type-tag/index.html +++ b/highlights/tags/type-tag/index.html @@ -19,39 +19,39 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -62,39 +62,39 @@

10 highlights tagged with "type: tag"

- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/index.html b/index.html index 972248f4b..6105ba5f7 100644 --- a/index.html +++ b/index.html @@ -19,19 +19,19 @@ - + - + - + - + - + @@ -40,19 +40,19 @@
newRelease of gnet v2.6.0

Build high-performance networking applications in Go

On top of a variety of protocols of HTTP, RPC, WebSocket, Redis, etc.

gnet is the fastest networking framework in Go.

Why gnet?

Ultra-Fast

Built in Go, gnet is ultra-fast and memory efficient based on the event-driven mechanism. It's designed to create a networking server framework for Go that performs on par with Redis and Haproxy for networking packets handling.

Lock-Free

gnet is lock-free during the entire runtime, which keeps gnet free from synchronization issues and speeds it up.

Concise & Easy-to-use APIs

gnet provides concise and easy-to-use APIs for users, it only exposes the essential APIs and takes over most of the tough work for users, minimizing the complexity of business code so that developers are able to concentrate on business logic instead of the underlying implementations.

Multiple Protocols

gnet supports multiple protocols/IPC mechanism: TCP, UDP and Unix Domain Socket, enabling you to develop a variety of networking applications.

Cross Platform

gnet is devised as a cross-platform framework, as a result, it works faultlessly on multiple platforms: Linux, FreeBSD, DragonFly BSD, Windows.

Powerful Libraries

There is a rich set of libraries in gnet, such as memory pool, goroutine pool, elastic buffers, logging package, etc., which makes it convenient for developers to build fast and efficient networking applications.

Networking model of multiple reactors

Learn how gnet works

Cross Platform

Built on Linux, FreeBSD, DragonFly BSD, Darwin, Windows
        
UNIX & Windows
X86_64, ARM64
Light-weight
Ultra-fast

How to install gnet

`gnet` is available as a Go module and we highly recommend that you use `gnet` via Go Modules, with Go 1.11 Modules enabled (Go 1.11+), you can just simply add `import "github.com/panjf2000/gnet/v2"` to the codebase and run `go mod download/go mod tidy` or `go [build|run|test]` to download the necessary dependencies automatically.

Run go get to download gnet:

With v2

go get -u github.com/panjf2000/gnet/v2

With v1

go get -u github.com/panjf2000/gnet

Performance

Benchmarks on TechEmpower
# Hardware Environment
* 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 3.20GHz
* 32GB RAM
* Dedicated Cisco 10-gigabit Ethernet switch
* Debian 12 "bookworm"
* Go1.19.x linux/amd64

All languages

This is a leaderboard of the top 50 out of 486 frameworks that encompass various programming languages worldwide, in which gnet is ranked first.

Go

This is the full framework ranking of Go and gnet tops all the other frameworks, which makes gnet the fastest networking framework in Go.


To check the full ranking list, visit TechEmpower Benchmark Round 22.

Note that the HTTP implementation of gnet on TechEmpower is half-baked and fine-tuned for benchmark purposes only and is far from production-ready.

Use cases

The following companies/organizations use gnet as the underlying network service in production.

If your projects are also using gnet, feel free to open a pull request refreshing this list.

- + - + - + - + - + diff --git a/main.b2b8e81c.js b/main.08114c31.js similarity index 91% rename from main.b2b8e81c.js rename to main.08114c31.js index 11ea04253..26bedab86 100644 --- a/main.b2b8e81c.js +++ b/main.08114c31.js @@ -1,2 +1,2 @@ -/*! For license information please see main.b2b8e81c.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[116],[function(e,t,n){"use strict";e.exports=n(93)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0;d--){var p=a[d];"."===p?o(a,d):".."===p?(o(a,d),f++):f&&(o(a,d),f--)}if(!s)for(;f--;f)a.unshift("..");!s||""===a[0]||a[0]&&i(a[0])||a.unshift("");var h=a.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),i=l(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(4);function c(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function g(e,t,n,i){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function m(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=g(e,t,d(),w.location);c.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=!n(13)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(24),i=n(61);e.exports=n(10)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(5),i=n(17),o=n(11),a=n(15),l=n(28),u=function(e,t,n){var s,c,f,d,p=e&u.F,h=e&u.G,g=e&u.S,m=e&u.P,v=e&u.B,b=h?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,y=h?i:i[t]||(i[t]={}),w=y.prototype||(y.prototype={});for(s in h&&(n=t),n)f=((c=!p&&b&&void 0!==b[s])?b:n)[s],d=v&&c?l(f,r):m&&"function"==typeof f?l(Function.call,f):f,b&&a(b,s,f,e&u.U),y[s]!=f&&o(y,s,d),m&&w[s]!=f&&(w[s]=f)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(5),i=n(11),o=n(29),a=n(40)("src"),l=n(97),u=(""+l).split("toString");n(17).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,l){var s="function"==typeof n;s&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(s&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:l?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||l.call(this)}))},function(e,t,n){e.exports=n(106)()},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(3),i=n(1),o=n(0),a=n.n(o);function l(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var i=e.path?Object(r.f)(t,e):n.length?n[n.length-1].match:r.c.computeRootMatch(t);return i&&(n.push({route:e,match:i}),e.routes&&l(e.routes,t,n)),i})),n}function u(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?a.a.createElement(r.d,n,e.map((function(e,n){return a.a.createElement(r.b,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render(Object(i.a)({},n,{},t,{route:e})):a.a.createElement(e.component,Object(i.a)({},n,t,{route:e}))}})}))):null}},function(e,t,n){"use strict";var r=n(34),i={};i[n(2)("toStringTag")]="z",i+""!="[object z]"&&n(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){"use strict";var r=n(80),i=n(101),o=n(23),a=n(31);e.exports=n(67)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(86),i=n(62);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports={}},function(e,t,n){var r=n(8),i=n(85),o=n(83),a=Object.defineProperty;t.f=n(10)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(l){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(32);e.exports=function(e){return Object(r(e))}},function(e,t,n){for(var r=n(20),i=n(21),o=n(15),a=n(5),l=n(11),u=n(23),s=n(2),c=s("iterator"),f=s("toStringTag"),d=u.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(p),g=0;g0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(30);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(54),i=n(32);e.exports=function(e){return r(i(e))}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(22),i=n(2)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseIntersectionObserver:n&&"IntersectionObserver"in window,canUseViewport:n&&!!window.screen};e.exports=r},function(e){e.exports=JSON.parse('{"/":{"component":"c4f5d8e4"},"/blog":{"component":"a6aa9e1f","items":[{"content":"bf86c27e"},{"content":"46a99b14"},{"content":"1e5f449e"},{"content":"534369d9"},{"content":"085cfcd9"},{"content":"8d648d3a"}],"metadata":"bbb4ffb5"},"/blog/announcing-gnet-v1":{"component":"ccc49370","content":"69432dc9"},"/blog/announcing-gnet-v1-cn":{"component":"ccc49370","content":"84dbd0aa"},"/blog/announcing-gnet-v2":{"component":"ccc49370","content":"146cd838"},"/blog/announcing-gnet-v2-3-0":{"component":"ccc49370","content":"16ce05ff"},"/blog/announcing-gnet-v2-5-0":{"component":"ccc49370","content":"7cbae472"},"/blog/announcing-gnet-v2-6-0":{"component":"ccc49370","content":"15e8c1a6"},"/blog/tags":{"component":"01a85c17","tags":"8be5b89e"},"/blog/tags/domain-presentation":{"component":"6875c492","items":[{"content":"bf86c27e"},{"content":"46a99b14"},{"content":"1e5f449e"},{"content":"534369d9"},{"content":"8d648d3a"}],"metadata":"dac5ff9b"},"/blog/tags/domain-\u5c55\u793a":{"component":"6875c492","items":[{"content":"085cfcd9"}],"metadata":"c5078315"},"/blog/tags/type-announcement":{"component":"6875c492","items":[{"content":"bf86c27e"},{"content":"46a99b14"},{"content":"1e5f449e"},{"content":"534369d9"},{"content":"8d648d3a"}],"metadata":"2515fe5a"},"/blog/tags/type-\u5b98\u5ba3":{"component":"6875c492","items":[{"content":"085cfcd9"}],"metadata":"72199fb1"},"/community":{"component":"672ba3d6"},"/contact":{"component":"83e9e333"},"/docs":{"component":"25b7c3f2"},"/highlights":{"component":"1f9e12e6","items":[{"content":"0bd51a3b"},{"content":"aaab95c7"},{"content":"bb86d9d9"},{"content":"885349a6"},{"content":"76c98716"},{"content":"a2fa41f6"},{"content":"89d68630"},{"content":"dcb3df40"},{"content":"ad0eb018"},{"content":"33665ed2"},{"content":"6f98cc36"},{"content":"81379998"},{"content":"ba27c774"},{"content":"410f3279"},{"content":"45a15ad3"},{"content":"498a00e3"},{"content":"936ef230"},{"content":"a61e7429"},{"content":"2cc0d56d"},{"content":"a327db42"},{"content":"9bb795d7"}]},"/highlights/2019-11-07-supported-multiple-codecs":{"component":"5d1574ce","content":"a972cd6d"},"/highlights/2019-11-12-supported-windows":{"component":"5d1574ce","content":"f81b68de"},"/highlights/2020-03-13-released-first-version":{"component":"5d1574ce","content":"f77b4883"},"/highlights/2020-03-31-supported-least-connections-load-balancing-algorithm":{"component":"5d1574ce","content":"3f76626d"},"/highlights/2020-04-03-released-1-1-0":{"component":"5d1574ce","content":"407b6fcb"},"/highlights/2020-05-11-released-1-2-0":{"component":"5d1574ce","content":"bdb4e87e"},"/highlights/2020-07-02-raw-syscalls-sockets":{"component":"5d1574ce","content":"74fa4880"},"/highlights/2020-09-13-released-1-3-0":{"component":"5d1574ce","content":"f693b023"},"/highlights/2020-09-13-supported-locking-os-thread":{"component":"5d1574ce","content":"f815892d"},"/highlights/2021-02-17-released-1-4-0":{"component":"5d1574ce","content":"a08fda2c"},"/highlights/2021-07-11-released-1-5-0":{"component":"5d1574ce","content":"f452a8ca"},"/highlights/2021-07-20-released-1-5-2":{"component":"5d1574ce","content":"3c914109"},"/highlights/2021-12-05-released-1-6-0":{"component":"5d1574ce","content":"da055e6f"},"/highlights/2022-02-27-release-of-gnet-v2":{"component":"5d1574ce","content":"ffc0b29d"},"/highlights/2022-12-03-release-of-gnet-v2-2-0":{"component":"5d1574ce","content":"25acf9b6"},"/highlights/2023-05-19-release-candidate-for-gnet-v2-3-0":{"component":"5d1574ce","content":"526b7f93"},"/highlights/2023-07-01-release-of-gnet-v2-3-0":{"component":"5d1574ce","content":"1164a3d5"},"/highlights/2023-11-11-gnet-techempower-benchmark-top1":{"component":"5d1574ce","content":"51fc1e93"},"/highlights/2024-04-04-release-of-gnet-v2-4-0":{"component":"5d1574ce","content":"7242139e"},"/highlights/2024-04-22-release-of-gnet-v2-5-0":{"component":"5d1574ce","content":"830be238"},"/highlights/2024-11-09-release-of-gnet-v2-6-0":{"component":"5d1574ce","content":"43c76277"},"/highlights/tags":{"component":"9c0c4329","tags":"fedefe47"},"/highlights/tags/domain-load-balancing":{"component":"57423a8a","items":[{"content":"a61e7429"},{"content":"9bb795d7"}],"metadata":"745f6024"},"/highlights/tags/domain-os":{"component":"57423a8a","items":[{"content":"a327db42"}],"metadata":"e7288d87"},"/highlights/tags/domain-socket":{"component":"57423a8a","items":[{"content":"45a15ad3"}],"metadata":"312ef75c"},"/highlights/tags/domain-thread":{"component":"57423a8a","items":[{"content":"410f3279"}],"metadata":"dda756b5"},"/highlights/tags/domain-v-1-0-0":{"component":"57423a8a","items":[{"content":"2cc0d56d"}],"metadata":"6b22050b"},"/highlights/tags/domain-v-1-1-0":{"component":"57423a8a","items":[{"content":"936ef230"}],"metadata":"14f86540"},"/highlights/tags/domain-v-1-2-0":{"component":"57423a8a","items":[{"content":"498a00e3"}],"metadata":"fbae6c00"},"/highlights/tags/domain-v-1-3-0":{"component":"57423a8a","items":[{"content":"ba27c774"}],"metadata":"a52a7ad9"},"/highlights/tags/domain-v-1-4-0":{"component":"57423a8a","items":[{"content":"81379998"}],"metadata":"7fce9013"},"/highlights/tags/domain-v-1-5-0":{"component":"57423a8a","items":[{"content":"6f98cc36"}],"metadata":"68624de3"},"/highlights/tags/domain-v-1-5-2":{"component":"57423a8a","items":[{"content":"33665ed2"}],"metadata":"a770c91e"},"/highlights/tags/domain-v-1-6-0":{"component":"57423a8a","items":[{"content":"ad0eb018"}],"metadata":"9d7dad5c"},"/highlights/tags/domain-v-2-0-0":{"component":"57423a8a","items":[{"content":"dcb3df40"}],"metadata":"5506af64"},"/highlights/tags/domain-v-2-2-0":{"component":"57423a8a","items":[{"content":"89d68630"}],"metadata":"67366af7"},"/highlights/tags/domain-v-2-3-0":{"component":"57423a8a","items":[{"content":"76c98716"}],"metadata":"f84a0db9"},"/highlights/tags/domain-v-2-3-0-rc-1":{"component":"57423a8a","items":[{"content":"a2fa41f6"}],"metadata":"78a49801"},"/highlights/tags/domain-v-2-3-5":{"component":"57423a8a","items":[{"content":"885349a6"}],"metadata":"b5a579ab"},"/highlights/tags/domain-v-2-4-0":{"component":"57423a8a","items":[{"content":"bb86d9d9"}],"metadata":"b9c3cfa9"},"/highlights/tags/domain-v-2-5-0":{"component":"57423a8a","items":[{"content":"aaab95c7"}],"metadata":"b7b51e80"},"/highlights/tags/domain-v-2-6-0":{"component":"57423a8a","items":[{"content":"0bd51a3b"}],"metadata":"e44f5483"},"/highlights/tags/platform-arm-64":{"component":"57423a8a","items":[{"content":"410f3279"},{"content":"45a15ad3"}],"metadata":"d5ac47c4"},"/highlights/tags/platform-windows":{"component":"57423a8a","items":[{"content":"a327db42"}],"metadata":"cf4dcdae"},"/highlights/tags/type-new-feature":{"component":"57423a8a","items":[{"content":"410f3279"},{"content":"a61e7429"},{"content":"a327db42"},{"content":"9bb795d7"}],"metadata":"f525697b"},"/highlights/tags/type-optimization":{"component":"57423a8a","items":[{"content":"45a15ad3"}],"metadata":"4d0ef9b6"},"/highlights/tags/type-release":{"component":"57423a8a","items":[{"content":"6f98cc36"},{"content":"81379998"},{"content":"ba27c774"},{"content":"498a00e3"},{"content":"936ef230"},{"content":"2cc0d56d"}],"metadata":"48433eb6"},"/highlights/tags/type-tag":{"component":"57423a8a","items":[{"content":"0bd51a3b"},{"content":"aaab95c7"},{"content":"bb86d9d9"},{"content":"885349a6"},{"content":"76c98716"},{"content":"a2fa41f6"},{"content":"89d68630"},{"content":"dcb3df40"},{"content":"ad0eb018"},{"content":"33665ed2"}],"metadata":"f9444073"},"/docs/:route":{"component":"1be78505","docsMetadata":"20ac7829"},"/docs/about/overview":{"component":"17896441","content":"309c6dc0"},"/docs/about/overview-cn":{"component":"17896441","content":"acb23ddc"},"/docs/benchmark":{"component":"17896441","content":"9d965dc0"},"/docs/faq":{"component":"17896441","content":"0480b142"},"/docs/quickstart":{"component":"17896441","content":"8070e160"},"/docs/tutorial/best-practices":{"component":"17896441","content":"c74e99d0"},"/docs/v1.x/doc-for-gnet-v1":{"component":"17896441","content":"82650733"},"/docs/v1.x/doc-for-gnet-v1-cn":{"component":"17896441","content":"420b1182"}}')},function(e,t,n){"use strict";t.a={plugins:[["@docusaurus/plugin-content-docs",{editUrl:"https://github.com/panjf2000/gnet/edit/master/website/",sidebarPath:"/home/runner/work/gnet/gnet/sidebars.js"}],["@docusaurus/plugin-content-blog",{feedOptions:{type:"all",copyright:"Copyright \xa9 2024 Andy Pan."}}],["@docusaurus/plugin-content-pages",{}],"/home/runner/work/gnet/gnet/plugins/highlights",["@docusaurus/plugin-content-pages",{}]],themes:[["@docusaurus/theme-classic",{customCss:"/home/runner/work/gnet/gnet/src/css/custom.css"}],"@docusaurus/theme-search-algolia"],customFields:{metadata:{latest_highlight:{author_github:"https://github.com/panjf2000",date:"2024-11-09",description:"Release of the official stable version of v2.6.0",hide_on_release_notes:!1,id:"2024-11-09-release-of-gnet-v2-6-0",path:"website/highlights/2024-11-09-release-of-gnet-v2-6-0.md",permalink:"/highlights/2024-11-09-release-of-gnet-v2-6-0/",tags:["release"],title:"Release of gnet v2.6.0"},latest_post:{author_github:"https://github.com/panjf2000",date:"2024-04-22",description:"Hello World! We present you, gnet v2.5.0!",id:"announcing-gnet-v2-5-0",path:"website/blog/2024-04-22-announcing-gnet-v2-5-0.md",permalink:"/blog/announcing-gnet-v2-5-0/",tags:["type: announcement","domain: presentation"],title:"Announcing gnet v2.5.0"},post_tags:["type: announcement","domain: presentation"],team:[{avatar:"https://github.com/panjf2000.png",bio:'Andy is a front-line programmer based in South China and the author of gnet/ants, he is also a contributor of Go programming language.',github:"https://github.com/panjf2000",id:"panjf2000",keybase:"https://keybase.io/panjf2000",name:"Andy Pan"}]}},themeConfig:{themeConfig:{sidebarCollapsible:!0},navbar:{hideOnScroll:!0,logo:{alt:"gnet",src:"img/logo-light.svg"},links:[{to:"docs/",label:"Docs",position:"left"},{to:"blog/",label:"Blog",position:"left"},{to:"highlights/",label:"Highlights",position:"right"},{to:"community/",label:"Community",position:"right"},{href:"https://github.com/panjf2000/gnet",label:"GitHub",position:"right"}]},image:"img/open-graph.png",prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]}},footer:{links:[{title:"About",items:[{label:"What is gnet?",to:"docs/about/overview/"},{label:"The Team",to:"community/#team"},{label:"Contact Me",to:"contact/"}]},{title:"Community",items:[{label:"Chat",to:"https://discord.gg/UyKD7NZcfH"},{label:"Github",to:"https://github.com/panjf2000/gnet"},{label:"Github Organization",to:"https://github.com/gnet-io"},{label:"Twitter",to:"https://twitter.com/panjf2000"},{label:"Blog",to:"blog/"}]}],logo:{alt:"gnet",src:"/img/footer-logo.svg",href:"https://github.com/panjf2000/gnet/"},copyright:"Copyright \xa9 2024 Andy Pan"},algolia:{appId:"XAU0LZRY7D",apiKey:"16718218c3285345ca7d01dd0589b411",indexName:"gnet",algoliaOptions:{}}},title:"gnet",tagline:"A high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go",url:"https://gnet.host",baseUrl:"/",favicon:"favicon.ico",organizationName:"panjf2000",projectName:"gnet",presets:[],scripts:[],stylesheets:["https://fonts.googleapis.com/css?family=Ubuntu|Roboto|Source+Code+Pro","https://at-ui.github.io/feather-font/css/iconfont.css"]}},function(e,t,n){var r,i;void 0===(i="function"==typeof(r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function i(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=i(e,r.minimum,1),n.status=1===e?null:e;var u=n.render(!t),s=u.querySelector(r.barSelector),c=r.speed,f=r.easing;return u.offsetWidth,a((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(s,function(e,t,n){var i;return(i="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,i}(e,c,f)),1===e?(l(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){l(u,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*i(Math.random()*t,.1,.95)),t=i(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var i,a=t.querySelector(r.barSelector),u=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return l(a,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),r.showSpinner||(i=t.querySelector(r.spinnerSelector))&&d(i),c!=document.body&&s(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var a=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})),t[n]||(t[n]=function(t){var n=document.body.style;if(t in n)return t;for(var r,i=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);i--;)if((r=e[i]+o)in n)return r;return t}(n))}function r(e,t,r){t=n(t),e.style[t]=r}return function(e,t){var n,i,o=arguments;if(2==o.length)for(n in t)void 0!==(i=t[n])&&t.hasOwnProperty(n)&&r(e,n,i);else r(e,o[1],o[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function s(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return w}));var r=n(3);n.d(t,"d",(function(){return r.a})),n.d(t,"e",(function(){return r.f})),n.d(t,"f",(function(){return r.g})),n.d(t,"g",(function(){return r.h}));var i=n(6),o=n(0),a=n.n(o),l=n(7),u=(n(16),n(1)),s=n(9),c=n(4),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i1&&l.call(r[0],n,(function(){for(i=1;ie.length)return;if(!(k instanceof u)){if(g&&y!=t.length-1){if(d.lastIndex=w,!(C=d.exec(e)))break;for(var x=C.index+(h?C[1].length:0),E=C.index+C[0].length,S=y,T=w,_=t.length;S<_&&(T=(T+=t[S].length)&&(++y,w=T);if(t[y]instanceof u)continue;O=S-y,k=e.slice(w,T),C.index-=w}else{d.lastIndex=0;var C=d.exec(k),O=1}if(C){h&&(m=C[1]?C[1].length:0),E=(x=C.index+m)+(C=C[0].slice(m)).length;var P=k.slice(0,x),R=k.slice(E),A=[y,O];P&&(++y,w+=P.length,A.push(P));var N=new u(s,p?i.tokenize(C,p):C,v,C,g);if(A.push(N),R&&A.push(R),Array.prototype.splice.apply(t,A),1!=O&&i.matchGrammar(e,t,n,y,w,!0,s),a)break}else if(a)break}}}}},hooks:{add:function(){}},tokenize:function(e,t,n){var r=[e],o=t.rest;if(o){for(var a in o)t[a]=o[a];delete t.rest}return i.matchGrammar(e,r,t,0,0,!1),r}},(o=i.Token=function(e,t,n,r,i){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!i}).stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===i.util.type(e))return e.map((function(n){return o.stringify(n,t,e)})).join("");var r={type:e.type,content:o.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var a="Array"===i.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,a)}var l=Object.keys(r.attributes).map((function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(l?" "+l:"")+">"+r.content+""},i);a.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",i)}}),a.languages.xml=a.languages.extend("markup",{}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var r=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=n.variable[1].inside,o=0;o]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),a.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete a.languages.c.boolean,a.languages.cpp=a.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),a.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"}}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(a),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}}}),a.languages.markup&&a.languages.markup.tag.addInlined("script","javascript"),a.languages.js=a.languages.javascript,function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},e.languages.jsx.tag),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var n=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(n).join(""):""},r=function(t){for(var i=[],o=0;o0&&i[i.length-1].tagName===n(a.content[0].content[1])&&i.pop():"/>"===a.content[a.content.length-1].content||i.push({tagName:n(a.content[0].content[1]),openedBraces:0}):i.length>0&&"punctuation"===a.type&&"{"===a.content?i[i.length-1].openedBraces++:i.length>0&&i[i.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?i[i.length-1].openedBraces--:l=!0),(l||"string"==typeof a)&&i.length>0&&0===i[i.length-1].openedBraces){var u=n(a);o0&&("string"==typeof t[o-1]||"plain-text"===t[o-1].type)&&(u=n(t[o-1])+u,t.splice(o-1,1),o--),t[o]=new e.Token("plain-text",u,null,u)}a.content&&"string"!=typeof a.content&&r(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||r(e.tokens)}))}(a),function(e){e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],n=0;n",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/(?:\b0x[a-f\d]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[-+]?\d+)?)i?/i,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0}}),delete a.languages.go["class-name"],a.languages.graphql={comment:/#.*/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:enum|fragment|implements|input|interface|mutation|on|query|scalar|schema|type|union)\b/,operator:/[!=|]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/},function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,o){if(n.language===r){var a=n.tokenStack=[];n.code=n.code.replace(i,(function(e){if("function"==typeof o&&!o(e))return e;for(var i,l=a.length;-1!==n.code.indexOf(i=t(r,l));)++l;return a[l]=e,i})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var i=0,o=Object.keys(n.tokenStack);!function a(l){for(var u=0;u=o.length);u++){var s=l[u];if("string"==typeof s||s.content&&"string"==typeof s.content){var c=o[i],f=n.tokenStack[c],d="string"==typeof s?s:s.content,p=t(r,c),h=d.indexOf(p);if(h>-1){++i;var g=d.substring(0,h),m=new e.Token(r,e.tokenize(f,n.grammar),"language-"+r,f),v=d.substring(h+p.length),b=[];g&&b.push.apply(b,a([g])),b.push(m),v&&b.push.apply(b,a([v])),"string"==typeof s?l.splice.apply(l,[u,1].concat(b)):s.content=b}}else s.content&&a(s.content)}return l}(n.tokens)}}}})}(a),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")}))}(a),a.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};])*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^[^:=\r\n]+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))/.source;function n(e,n){return e=e.replace(//g,(function(){return t})),n&&(e=e+"|"+e.replace(/_/g,"\\*")),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``.+?``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|$)/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/__(?:(?!_)|_(?:(?!_))+_)+__/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/_(?:(?!_)|__(?:(?!_))+__)+_/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+?\2/.source,!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\]))+\])/.source,!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},type_variable:{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\]|_.,:;]/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),a.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,a.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t={url:/url\((["']?).*?\1\)/i,string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,number:/\b\d+(?:\.\d+)?%?/,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},e.languages.stylus={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:t.interpolation,punctuation:/[{},]/}},func:t.func,string:t.string,interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(a),a.languages.typescript=a.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),a.languages.ts=a.languages.typescript;var l=a.util.clone(a.languages.typescript);a.languages.tsx=a.languages.extend("jsx",l),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^_`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)";function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\s*#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)[^\r\n{[\]},#\s]+?(?=\s*:\s)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/true|false/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(/("|')(?:(?!\2)[^\\\r\n]|\\.)*\2/.source),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(a),t.a=a},function(e,t,n){var r=n(25),i=n(21);n(105)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var r=n(34),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";n(100);var r=n(15),i=n(11),o=n(13),a=n(32),l=n(2),u=n(47),s=l("species"),c=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=l(e),p=!o((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=p?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[s]=function(){return n}),n[d](""),!t})):void 0;if(!p||!h||"replace"===e&&!c||"split"===e&&!f){var g=/./[d],m=n(a,d,""[e],(function(e,t,n,r,i){return t.exec===u?p&&!i?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=m[0],b=m[1];r(String.prototype,e,v),i(RegExp.prototype,d,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,l,u=a(e),s=1;so;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&L(e)}))}},L=function(e){v.call(u,(function(){var t,n,r,i=e._v,o=j(e);if(o&&(t=w((function(){O?S.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=O||j(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},j=function(e){return 1!==e._h&&0===(e._a||e._c).length},D=function(e){v.call(u,(function(){var t;O?S.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},F=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),I(t,!0))},M=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw E("Promise can't be resolved itself");(t=N(e))?b((function(){var r={_w:n,_d:!1};try{t.call(e,s(M,r,1),s(F,r,1))}catch(i){F.call(r,i)}})):(n._v=e,n._s=1,I(n,!1))}catch(r){F.call({_w:n,_d:!1},r)}}};A||(C=function(e){h(this,C,"Promise","_h"),p(e),r.call(this);try{e(s(M,this,1),s(F,this,1))}catch(t){F.call(this,t)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(126)(C.prototype,{then:function(e,t){var n=R(m(this,C));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=O?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=s(M,e,1),this.reject=s(F,e,1)},y.f=R=function(e){return e===C||e===a?new o(e):i(e)}),f(f.G+f.W+f.F*!A,{Promise:C}),n(43)(C,"Promise"),n(127)("Promise"),a=n(17).Promise,f(f.S+f.F*!A,"Promise",{reject:function(e){var t=R(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(l||!A),"Promise",{resolve:function(e){return x(l&&this===a?C:this,e)}}),f(f.S+f.F*!(A&&n(128)((function(e){C.all(e).catch(P)}))),"Promise",{all:function(e){var t=this,n=R(t),r=n.resolve,i=n.reject,o=w((function(){var n=[],o=0,a=1;g(e,!1,(function(e){var l=o++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[l]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=R(t),r=n.reject,i=w((function(){g(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){var r=n(8),i=n(30),o=n(2)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r=n(33),i=n(32);e.exports=function(e){return function(t,n){var o,a,l=String(i(t)),u=r(n),s=l.length;return u<0||u>=s?e?"":void 0:(o=l.charCodeAt(u))<55296||o>56319||u+1===s||(a=l.charCodeAt(u+1))<56320||a>57343?e?l.charAt(u):o:e?l.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(41),i=n(12),o=n(15),a=n(11),l=n(23),u=n(102),s=n(43),c=n(104),f=n(2)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,h,g,m,v){u(n,t,h);var b,y,w,k=function(e){if(!d&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",E="values"==g,S=!1,T=e.prototype,_=T[f]||T["@@iterator"]||g&&T[g],C=_||k(g),O=g?E?k("entries"):C:void 0,P="Array"==t&&T.entries||_;if(P&&(w=c(P.call(new e)))!==Object.prototype&&w.next&&(s(w,x,!0),r||"function"==typeof w[f]||a(w,f,p)),E&&_&&"values"!==_.name&&(S=!0,C=function(){return _.call(this)}),r&&!v||!d&&!S&&T[f]||a(T,f,C),l[t]=C,l[x]=p,g)if(b={values:E?C:k("values"),keys:m?C:k("keys"),entries:O},v)for(y in b)y in T||o(T,y,b[y]);else i(i.P+i.F*(d||S),t,b);return b}},function(e,t,n){var r=n(5).document;e.exports=r&&r.documentElement},function(e,t,n){"use strict";var r=n(18);t.a=r.b},function(e,t,n){"use strict";e.exports=n(109)},function(e,t,n){"use strict";var r=n(0),i=n.n(r);t.a=i.a.createContext({})},,function(e,t,n){var r,i,o,a=n(28),l=n(121),u=n(68),s=n(45),c=n(5),f=c.process,d=c.setImmediate,p=c.clearImmediate,h=c.MessageChannel,g=c.Dispatch,m=0,v={},b=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},y=function(e){b.call(e.data)};d&&p||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++m]=function(){l("function"==typeof e?e:Function(e),t)},r(m),m},p=function(e){delete v[e]},"process"==n(22)(f)?r=function(e){f.nextTick(a(b,e,1))}:g&&g.now?r=function(e){g.now(a(b,e,1))}:h?(o=(i=new h).port2,i.port1.onmessage=y,r=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",y,!1)):r="onreadystatechange"in s("script")?function(e){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:d,clear:p}},function(e,t,n){"use strict";var r=n(30);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){"use strict";(function(t){var n="__global_unique_id__";e.exports=function(){return t[n]=(t[n]||0)+1}}).call(this,n(77))},function(e,t,n){"use strict";var r=n(70),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?a:l[e.$$typeof]||i}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=c(n);f&&(a=a.concat(f(n)));for(var l=u(t),g=u(n),m=0;m1||"".split(/.?/)[p]?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,l,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,h=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,c+"g");(o=s.call(g,i))&&!((a=g.lastIndex)>f&&(u.push(i.slice(f,o.index)),o[p]>1&&o.index=h));)g.lastIndex===o.index&&g.lastIndex++;return f===i[p]?!l&&g.test("")||u.push(""):u.push(i.slice(f)),u[p]>h?u.slice(0,h):u}:"0".split(void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):g.call(String(i),n,r)},function(e,t){var r=c(g,e,this,t,g!==n);if(r.done)return r.value;var s=i(e),d=String(this),p=o(s,RegExp),m=s.unicode,v=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(h?"y":"g"),b=new p(h?s:"^(?:"+s.source+")",v),y=void 0===t?4294967295:t>>>0;if(0===y)return[];if(0===d.length)return null===u(b,d)?[d]:[];for(var w=0,k=0,x=[];k]*>)/g,p=/\$([$&`']|\d\d?)/g;n(57)("replace",2,(function(e,t,n,h){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=h(n,e,this,t);if(i.done)return i.value;var f=r(e),d=String(this),p="function"==typeof t;p||(t=String(t));var m=f.global;if(m){var v=f.unicode;f.lastIndex=0}for(var b=[];;){var y=u(f,d);if(null===y)break;if(b.push(y),!m)break;""===String(y[0])&&(f.lastIndex=l(d,o(f.lastIndex),v))}for(var w,k="",x=0,E=0;E=x&&(k+=d.slice(x,T)+R,x=T+S.length)}return k+d.slice(x)}];function g(e,t,r,o,a,l){var u=r+e.length,s=o.length,c=p;return void 0!==a&&(a=i(a),c=d),n.call(l,c,(function(n,i){var l;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":l=a[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>s){var d=f(c/10);return 0===d?n:d<=s?void 0===o[d-1]?i.charAt(1):o[d-1]+i.charAt(1):n}l=o[c-1]}return void 0===l?"":l}))}}))},function(e,t,n){var r=n(2)("unscopables"),i=Array.prototype;null==i[r]&&n(11)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){"use strict";var r=n(8);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(31),i=n(27),o=n(99);e.exports=function(e){return function(t,n,a){var l,u=r(t),s=i(u.length),c=o(a,s);if(e&&n!=n){for(;s>c;)if((l=u[c++])!=l)return!0}else for(;s>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(14);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){e.exports=!n(10)&&!n(13)((function(){return 7!=Object.defineProperty(n(45)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(29),i=n(31),o=n(82)(!1),a=n(46)("IE_PROTO");e.exports=function(e,t){var n,l=i(e),u=0,s=[];for(n in l)n!=a&&r(l,n)&&s.push(n);for(;t.length>u;)r(l,n=t[u++])&&(~o(s,n)||s.push(n));return s}},function(e,t,n){var r=n(14),i=n(22),o=n(2)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(8),i=n(103),o=n(62),a=n(46)("IE_PROTO"),l=function(){},u=function(){var e,t=n(45)("iframe"),r=o.length;for(t.style.display="none",n(68).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("