-
Notifications
You must be signed in to change notification settings - Fork 0
/
87d92202.js
1 lines (1 loc) · 8.65 KB
/
87d92202.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{"14J3":function(j,f,t){"use strict";var i=t("cIOH"),E=t.n(i),r=t("1GLa")},BMrR:function(j,f,t){"use strict";var i=t("qrJ5");f.a=i.a},IzEo:function(j,f,t){"use strict";var i=t("cIOH"),E=t.n(i),r=t("lnY3"),h=t.n(r),o=t("Znn+"),W=t("14J3"),x=t("jCWc")},boov:function(j,f,t){"use strict";t.r(f),t.d(f,"default",function(){return X});var i=t("IzEo"),E=t("bx4M"),r=t("DYRE"),h=t("zeV3"),o=t("nKUr"),W=t.n(o),x=t("+L6B"),C=t("2/Rp"),S=t("c1Ei"),T=t.n(S),N=t("5Tp6"),z=t("XKWP"),G=t("N7Kx"),R=t("kFHX"),g=t("4jIl"),O=t("q1tI"),F=t.n(O),$=t("bRQS"),H=t("4i/N"),p=t("9kvl"),X=function(l){Object(R.a)(s,l);var n=Object(g.a)(s);function s(a){var e;return Object(z.a)(this,s),e=n.call(this,a),e.pushResults=function(d){console.log(d),e.setState(function(u){var m=u.results||[];return m.push(d),{results:m}})},e.getBigFile=function(){return Object(p.f)("./geo/ne_50m_populated_places_simple.geojson",{headers:{"Cache-Control":"no-cache"}})},e.getManyBigFile=function(){return Promise.all(new Array(10).fill(0).map(function(){return e.getBigFile()}))},e.ok=function(){return new Promise(function(d){return e.getManyBigFile().then(function(){d(!0),e.pushResults(!0)})})},e.fail=function(){return new Promise(function(d,u){return e.getManyBigFile().then(function(){u(new Error("fail")),e.pushResults(!1)})})},e.randomBool=function(){return Math.random()<.5},e.promiseTest=function(){var d=Object(N.a)(T.a.mark(function u(m){var b,P;return T.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,e.setState({running:!0}),b=new Array(3).fill(0).map(function(){return e.randomBool()}),e.setState({results:[],result:void 0,error:void 0}),c.next=6,m(b.map(function(M){return M?e.ok():e.fail()}));case 6:P=c.sent,e.setState({result:P}),c.next=13;break;case 10:c.prev=10,c.t0=c.catch(0),e.setState({error:c.t0});case 13:return c.prev=13,e.setState({running:!1}),c.finish(13);case 16:case"end":return c.stop()}},u,null,[[0,10,13,16]])}));return function(u){return d.apply(this,arguments)}}(),e.getFlag=function(d){return Object(o.jsx)(C.a,{type:"primary",danger:!d,shape:"circle",icon:d?Object(o.jsx)($.a,{}):Object(o.jsx)(H.a,{})})},e.state={running:!1,results:void 0,result:void 0,error:void 0},e}return Object(G.a)(s,[{key:"render",value:function(){var e=this,d=this.state,u=d.running,m=d.results,b=d.result,P=d.error;return Object(o.jsxs)(h.b,{direction:"vertical",style:{width:"100%"},children:[Object(o.jsxs)(h.b,{children:[Object(o.jsx)(C.a,{disabled:u,type:"dashed",onClick:function(){return e.promiseTest(function(c){return Promise.all(c)})},children:"Promise.all"}),Object(o.jsx)(C.a,{disabled:u,type:"dashed",onClick:function(){return e.promiseTest(function(c){return Promise.allSettled(c)})},children:"Promise.allSettled"}),Object(o.jsx)(C.a,{disabled:u,type:"dashed",onClick:function(){return e.promiseTest(function(c){return Promise.any(c)})},children:"Promise.any"}),Object(o.jsx)(C.a,{disabled:u,type:"dashed",onClick:function(){return e.promiseTest(function(c){return Promise.race(c)})},children:"Promise.race"})]}),m&&Object(o.jsx)(E.a,{title:"params",children:Object(o.jsx)(h.b,{children:m.map(this.getFlag)})}),b!==void 0&&Object(o.jsx)(E.a,{title:"result",children:Object(o.jsx)(h.b,{children:this.getFlag(b)})}),P!==void 0&&Object(o.jsx)(E.a,{title:"error",children:Object(o.jsx)(h.b,{children:this.getFlag(!1)})})]})}}]),s}(F.a.Component)},bx4M:function(j,f,t){"use strict";var i=t("rePB"),E=t("wx14"),r=t("q1tI"),h=t("TSYQ"),o=t.n(h),W=t("bT9E"),x=t("H84U"),C=function(l,n){var s={};for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&n.indexOf(a)<0&&(s[a]=l[a]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,a=Object.getOwnPropertySymbols(l);e<a.length;e++)n.indexOf(a[e])<0&&Object.prototype.propertyIsEnumerable.call(l,a[e])&&(s[a[e]]=l[a[e]]);return s},S=function(n){var s=n.prefixCls,a=n.className,e=n.hoverable,d=e===void 0?!0:e,u=C(n,["prefixCls","className","hoverable"]);return r.createElement(x.a,null,function(m){var b=m.getPrefixCls,P=b("card",s),v=o()("".concat(P,"-grid"),a,Object(i.a)({},"".concat(P,"-grid-hoverable"),d));return r.createElement("div",Object(E.a)({},u,{className:v}))})},T=S,N=function(l,n){var s={};for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&n.indexOf(a)<0&&(s[a]=l[a]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,a=Object.getOwnPropertySymbols(l);e<a.length;e++)n.indexOf(a[e])<0&&Object.prototype.propertyIsEnumerable.call(l,a[e])&&(s[a[e]]=l[a[e]]);return s},z=function(n){return r.createElement(x.a,null,function(s){var a=s.getPrefixCls,e=n.prefixCls,d=n.className,u=n.avatar,m=n.title,b=n.description,P=N(n,["prefixCls","className","avatar","title","description"]),v=a("card",e),c=o()("".concat(v,"-meta"),d),M=u?r.createElement("div",{className:"".concat(v,"-meta-avatar")},u):null,B=m?r.createElement("div",{className:"".concat(v,"-meta-title")},m):null,U=b?r.createElement("div",{className:"".concat(v,"-meta-description")},b):null,A=B||U?r.createElement("div",{className:"".concat(v,"-meta-detail")},B,U):null;return r.createElement("div",Object(E.a)({},P,{className:c}),M,A)})},G=z,R=t("ZTPi"),g=t("BMrR"),O=t("kPKH"),F=t("3Nzz"),$=function(l,n){var s={};for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&n.indexOf(a)<0&&(s[a]=l[a]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,a=Object.getOwnPropertySymbols(l);e<a.length;e++)n.indexOf(a[e])<0&&Object.prototype.propertyIsEnumerable.call(l,a[e])&&(s[a[e]]=l[a[e]]);return s};function H(l){var n=l.map(function(s,a){return r.createElement("li",{style:{width:"".concat(100/l.length,"%")},key:"action-".concat(a)},r.createElement("span",null,s))});return n}var p=function(n){var s,a,e=r.useContext(x.b),d=e.getPrefixCls,u=e.direction,m=r.useContext(F.b),b=function(L){var D;(D=n.onTabChange)===null||D===void 0||D.call(n,L)},P=function(){var L;return r.Children.forEach(n.children,function(D){D&&D.type&&D.type===T&&(L=!0)}),L},v=n.prefixCls,c=n.className,M=n.extra,B=n.headStyle,U=B===void 0?{}:B,A=n.bodyStyle,J=A===void 0?{}:A,Y=n.title,Z=n.loading,V=n.bordered,le=V===void 0?!0:V,se=n.size,k=n.type,w=n.cover,Q=n.actions,K=n.tabList,ce=n.children,q=n.activeTabKey,ie=n.defaultActiveTabKey,oe=n.tabBarExtraContent,de=n.hoverable,ee=n.tabProps,_e=ee===void 0?{}:ee,ue=$(n,["prefixCls","className","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),_=d("card",v),me=J.padding===0||J.padding==="0px"?{padding:24}:void 0,y=r.createElement("div",{className:"".concat(_,"-loading-block")}),ve=r.createElement("div",{className:"".concat(_,"-loading-content"),style:me},r.createElement(g.a,{gutter:8},r.createElement(O.a,{span:22},y)),r.createElement(g.a,{gutter:8},r.createElement(O.a,{span:8},y),r.createElement(O.a,{span:15},y)),r.createElement(g.a,{gutter:8},r.createElement(O.a,{span:6},y),r.createElement(O.a,{span:18},y)),r.createElement(g.a,{gutter:8},r.createElement(O.a,{span:13},y),r.createElement(O.a,{span:9},y)),r.createElement(g.a,{gutter:8},r.createElement(O.a,{span:4},y),r.createElement(O.a,{span:3},y),r.createElement(O.a,{span:16},y))),te=q!==void 0,Ee=Object(E.a)(Object(E.a)({},_e),(s={},Object(i.a)(s,te?"activeKey":"defaultActiveKey",te?q:ie),Object(i.a)(s,"tabBarExtraContent",oe),s)),ae,ne=K&&K.length?r.createElement(R.a,Object(E.a)({size:"large"},Ee,{className:"".concat(_,"-head-tabs"),onChange:b}),K.map(function(I){return r.createElement(R.a.TabPane,{tab:I.tab,disabled:I.disabled,key:I.key})})):null;(Y||M||ne)&&(ae=r.createElement("div",{className:"".concat(_,"-head"),style:U},r.createElement("div",{className:"".concat(_,"-head-wrapper")},Y&&r.createElement("div",{className:"".concat(_,"-head-title")},Y),M&&r.createElement("div",{className:"".concat(_,"-extra")},M)),ne));var fe=w?r.createElement("div",{className:"".concat(_,"-cover")},w):null,Oe=r.createElement("div",{className:"".concat(_,"-body"),style:J},Z?ve:ce),be=Q&&Q.length?r.createElement("ul",{className:"".concat(_,"-actions")},H(Q)):null,Pe=Object(W.a)(ue,["onTabChange"]),re=se||m,ye=o()(_,(a={},Object(i.a)(a,"".concat(_,"-loading"),Z),Object(i.a)(a,"".concat(_,"-bordered"),le),Object(i.a)(a,"".concat(_,"-hoverable"),de),Object(i.a)(a,"".concat(_,"-contain-grid"),P()),Object(i.a)(a,"".concat(_,"-contain-tabs"),K&&K.length),Object(i.a)(a,"".concat(_,"-").concat(re),re),Object(i.a)(a,"".concat(_,"-type-").concat(k),!!k),Object(i.a)(a,"".concat(_,"-rtl"),u==="rtl"),a),c);return r.createElement("div",Object(E.a)({},Pe,{className:ye}),ae,fe,Oe,be)};p.Grid=T,p.Meta=G;var X=f.a=p},jCWc:function(j,f,t){"use strict";var i=t("cIOH"),E=t.n(i),r=t("1GLa")},kPKH:function(j,f,t){"use strict";var i=t("/kpp");f.a=i.a},lnY3:function(j,f,t){}}]);