@nocobase/plugin-data-visualization 0.18.0-alpha.9 → 0.19.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/block/ChartBlockInitializer.d.ts +1 -1
- package/dist/client/filter/FilterActionInitializers.d.ts +1 -1
- package/dist/client/filter/FilterItemInitializers.d.ts +1 -1
- package/dist/client/index.js +15 -15
- package/dist/externalVersion.js +7 -7
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/server/actions/query.js +16 -24
- package/dist/server/migrations/20230926211750-rename-charttype.d.ts +1 -0
- package/dist/server/migrations/20230926211750-rename-charttype.js +1 -0
- package/package.json +2 -2
package/dist/client/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
(function(dt,z){typeof exports=="object"&&typeof module!="undefined"?z(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@formily/core"),require("@formily/react"),require("antd"),require("lodash"),require("react-i18next"),require("dayjs"),require("@formily/shared"),require("ahooks"),require("@nocobase/utils/client"),require("@emotion/css")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","react","@ant-design/icons","@formily/antd-v5","@formily/core","@formily/react","antd","lodash","react-i18next","dayjs","@formily/shared","ahooks","@nocobase/utils/client","@emotion/css"],z):(dt=typeof globalThis!="undefined"?globalThis:dt||self,z(dt["@nocobase/plugin-data-visualization"]={},dt["@nocobase/client"],dt.jsxRuntime,dt.react,dt["@ant-design/icons"],dt["@formily/antd-v5"],dt["@formily/core"],dt["@formily/react"],dt.antd,dt.lodash,dt["react-i18next"],dt.dayjs,dt["@formily/shared"],dt.ahooks,dt["@nocobase/utils"],dt["@emotion/css"]))})(this,function(dt,z,R,B,ni,Ie,on,mt,gt,He,Av,Ce,na,ln,bl,ao){"use strict";var E7=Object.defineProperty,k7=Object.defineProperties;var T7=Object.getOwnPropertyDescriptors;var Mv=Object.getOwnPropertySymbols;var lT=Object.prototype.hasOwnProperty,sT=Object.prototype.propertyIsEnumerable;var S0=(dt,z,R)=>z in dt?E7(dt,z,{enumerable:!0,configurable:!0,writable:!0,value:R}):dt[z]=R,J=(dt,z)=>{for(var R in z||(z={}))lT.call(z,R)&&S0(dt,R,z[R]);if(Mv)for(var R of Mv(z))sT.call(z,R)&&S0(dt,R,z[R]);return dt},yt=(dt,z)=>k7(dt,T7(z));var uT=(dt,z)=>{var R={};for(var B in dt)lT.call(dt,B)&&z.indexOf(B)<0&&(R[B]=dt[B]);if(dt!=null&&Mv)for(var B of Mv(dt))z.indexOf(B)<0&&sT.call(dt,B)&&(R[B]=dt[B]);return R};var Fr=(dt,z,R)=>(S0(dt,typeof z!="symbol"?z+"":z,R),R);var br=(dt,z,R)=>new Promise((B,ni)=>{var Ie=gt=>{try{mt(R.next(gt))}catch(He){ni(He)}},on=gt=>{try{mt(R.throw(gt))}catch(He){ni(He)}},mt=gt=>gt.done?B(gt.value):Promise.resolve(gt.value).then(Ie,on);mt((R=R.apply(dt,z)).next())});function cT(e,r){for(var t=0;t<r.length;t++){const n=r[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const zu=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return qr},get Circle(){return Zz},get Ellipse(){return Qz},get Image(){return Kz},get Line(){return Jz},get Marker(){return e5},get Path(){return Ip},get Polygon(){return s5},get Polyline(){return u5},get Rect(){return h5},get Text(){return v5}},Symbol.toStringTag,{value:"Module"})),Yu=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return Pr},get Circle(){return w5},get Dom(){return S5},get Ellipse(){return C5},get Image(){return M5},get Line(){return A5},get Marker(){return F5},get Path(){return b5},get Polygon(){return E5},get Polyline(){return k5},get Rect(){return I5},get Text(){return D5}},Symbol.toStringTag,{value:"Module"})),C0="data-visualization";function Et(e){return z.i18n.t(e,{ns:[C0,"client"]})}function jt(){return Av.useTranslation([C0,"client"],{nsMode:"fallback"})}const Fv={datetime:[{label:Et("YYYY"),value:"YYYY"},{label:Et("MM"),value:"MM"},{label:Et("DD"),value:"DD"},{label:Et("YYYY-MM"),value:"YYYY-MM"},{label:Et("YYYY-MM-DD"),value:"YYYY-MM-DD"},{label:Et("YYYY-MM-DD hh:mm"),value:"YYYY-MM-DD hh:mm"},{label:Et("YYYY-MM-DD hh:mm:ss"),value:"YYYY-MM-DD hh:mm:ss"}],date:[{label:Et("YYYY"),value:"YYYY"},{label:Et("MM"),value:"MM"},{label:Et("DD"),value:"DD"},{label:Et("YYYY-MM"),value:"YYYY-MM"},{label:Et("YYYY-MM-DD"),value:"YYYY-MM-DD"}],time:[{label:Et("hh:mm:ss"),value:"hh:mm:ss"},{label:Et("hh:mm"),value:"hh:mm"},{label:Et("hh"),value:"hh"}]},fT=B.createContext(null),bv={didCatch:!1,error:null};let M0=class extends B.Component{constructor(r){super(r),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=bv}static getDerivedStateFromError(r){return{didCatch:!0,error:r}}resetErrorBoundary(){const{error:r}=this.state;if(r!==null){for(var t,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];(t=(n=this.props).onReset)===null||t===void 0||t.call(n,{args:a,reason:"imperative-api"}),this.setState(bv)}}componentDidCatch(r,t){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,r,t)}componentDidUpdate(r,t){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&t.error!==null&&hT(r.resetKeys,i)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:i,prev:r.resetKeys,reason:"keys"}),this.setState(bv)}}render(){const{children:r,fallbackRender:t,FallbackComponent:n,fallback:i}=this.props,{didCatch:a,error:o}=this.state;let l=r;if(a){const s={error:o,resetErrorBoundary:this.resetErrorBoundary};if(B.isValidElement(i))l=i;else if(typeof t=="function")l=t(s);else if(n)l=B.createElement(n,s);else throw o}return B.createElement(fT.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},l)}};function hT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==r.length||e.some((t,n)=>!Object.is(t,r[n]))}const A0=(e,r={})=>{const{collection:t}=e;return{type:"void","x-decorator":"ChartRendererProvider","x-decorator-props":e,"x-acl-action":`${t}:list`,"x-designer":"ChartRenderer.Designer","x-component":"CardItem","x-component-props":{size:"small"},"x-initializer":"ChartInitializers",properties:{[na.uid()]:{type:"void","x-component":"ChartRenderer","x-component-props":r}}}},El=e=>{let r,t;return Array.isArray(e)?e.length===1?t=e[0]:e.length>1&&([r,t]=e):t=e,{target:r,name:t,alias:r?`${r}.${t}`:t}},Vu=(e,r)=>{var a,o;const{target:t,name:n}=El(r);return t?(o=(a=e.find(l=>l.name===t))==null?void 0:a.targetFields)==null?void 0:o.find(l=>l.name===n):e.find(l=>l.name===n)},oo=(e,r)=>{const t=l=>l.map(s=>{const u=Vu(e,s.field);return yt(J({},u),{key:s.alias||(u==null?void 0:u.key),label:s.alias||(u==null?void 0:u.label),value:s.alias||(u==null?void 0:u.value)})}),n=r.measures||[],i=r.dimensions||[];return[...new Map([...t(n),...t(i)].map(l=>[l.value,l])).values()]},vT=(e,r,t)=>{const n=(i,a)=>{var s;const o=(s=i.uiSchema)==null?void 0:s.enum;if(!o||!Array.isArray(o))return a;const l=o.find(u=>u.value===a);return mt.Schema.compile((l==null?void 0:l.label)||a,t)};return r.map(i=>{const a={};return Object.entries(i).forEach(([o,l])=>{const s=e.find(u=>u.value===o);if(!s){a[o]=l;return}switch(s.interface){case"select":case"radioGroup":a[o]=n(s,l);break;default:a[o]=l}}),a})},Ev=e=>{if(typeof e=="object"&&e!==null)if(Array.isArray(e)){const r=e.map(t=>Ev(t)).filter(Boolean);return r.length>0?r:null}else{const r={};for(const t in e){const n=Ev(e[t]);n&&!(typeof n=="object"&&Object.keys(n).length===0)&&(r[t]=n)}return Object.keys(r).length>0?r:null}else if(typeof e=="string"&&e.startsWith("{{$nFilter.")&&e.endsWith("}}"))return null;return e},dT=(e,r)=>{const t=r.split(".");let n=He.get(e,t.slice(0,-1).join("."));return Array.isArray(n)?n=n.map(i=>He.get(i,t.slice(-1)[0])):n=He.get(n,t.slice(-1)[0]),n},pT=e=>({boolean:"Checkbox",integer:"InputNumber",bigInt:"InputNumber",double:"InputNumber",decimal:"InputNumber",date:"DatePicker",string:"Input"})[e],gT=e=>({boolean:"boolean",integer:"integer",bigInt:"integer",double:"number",decimal:"number",date:"datetime",string:"input"})[e],kl=B.createContext({}),yT=e=>{const[r,t]=B.useState({}),n=ln.useMemoizedFn((a,{collection:o,service:l,query:s})=>{t(u=>yt(J({},u),{[a]:{collection:o,service:l,query:s}}))}),i=ln.useMemoizedFn(a=>{t(o=>yt(J({},o),{[a]:void 0}))});return R.jsx(kl.Provider,{value:{charts:r,addChart:n,removeChart:i},children:e.children})},_r=B.createContext({}),mT=e=>{const[r,t]=B.useState(!1),[n,i]=B.useState(!1),[a,o]=B.useState({}),[l,s]=B.useState({collapsed:!1,row:1}),[u,c]=B.useState(),f=ln.useMemoizedFn((y,g)=>{o(m=>yt(J({},m),{[y]:J(J({},m[y]||{}),g)}))}),h=ln.useMemoizedFn(y=>{o(g=>{const m=J({},g);return m[y]=void 0,m})}),v=ln.useMemoizedFn(c),d=ln.useMemoizedFn(i),p=({collapsed:y,row:g})=>{s(m=>({collapsed:y!==void 0?y:m.collapsed,row:g!==void 0?g:m.row}))};return B.useEffect(()=>t(!0),[]),R.jsx(_r.Provider,{value:{ready:r,enabled:n,setEnabled:d,fields:a,setField:f,removeField:h,collapse:l,setCollapse:p,form:u,setForm:v},children:e.children})},kn=B.createContext({}),F0=e=>{const{query:r,config:t,collection:n,transform:i}=e,{addChart:a}=B.useContext(kl),{ready:o,form:l,enabled:s}=B.useContext(_r),{getFilter:u,hasFilter:c,appendFilter:f}=so(),h=mt.useFieldSchema(),v=z.useAPIClient(),d=z.useRequest((p,y,g)=>new Promise((m,x)=>{var M;if(!(p&&((M=y==null?void 0:y.measures)!=null&&M.length))||s&&!l)return m(void 0);const w=u(),C=!g&&c({collection:p,query:y},w)?f({collection:p,query:y},w):y;v.request({url:"charts:query",method:"POST",data:yt(J({uid:h==null?void 0:h["x-uid"],collection:p},C),{filter:Ev(C.filter),dimensions:((y==null?void 0:y.dimensions)||[]).map(A=>{const b=J({},A);if(A.format&&!A.alias){const{alias:T}=El(A.field);b.alias=T}return b}),measures:((y==null?void 0:y.measures)||[]).map(A=>{const b=J({},A);if(A.aggregation&&!A.alias){const{alias:T}=El(A.field);b.alias=T}return b})})}).then(A=>{var b;m((b=A==null?void 0:A.data)==null?void 0:b.data),!g&&(h!=null&&h["x-uid"])&&a(h==null?void 0:h["x-uid"],{collection:p,service:d,query:y})}).catch(x)}),{defaultParams:[n,r],ready:o&&(!s||!!l)});return R.jsx(z.MaybeCollectionProvider,{collection:n,children:R.jsx(gt.ConfigProvider,{card:{style:{boxShadow:"none"}},children:R.jsx(kn.Provider,{value:{collection:n,config:t,transform:i,service:d,query:r},children:e.children})})})};class xT{constructor(){Fr(this,"charts",new Map)}setGroup(r,t){this.charts.set(r,t)}addGroup(r,t){if(this.charts.has(r))throw new Error(`[data-visualization] Chart group "${r}" already exists`);this.setGroup(r,t)}add(r,t){var n;this.charts.has(r)||this.setGroup(r,[]),(n=this.charts.get(r))==null||n.push(t)}getChartTypes(){const r=[];this.charts.forEach((n,i)=>{const a=n.map(o=>({key:`${i}.${o.name}`,label:Et(o.title),value:`${i}.${o.name}`}));r.push({label:Et(i),children:a})});const t=r.findIndex(n=>n.label===Et("Built-in"));if(t>-1){const[n]=r.splice(t,1);r.unshift(n)}return r}getCharts(){const r={};return this.charts.forEach((t,n)=>{t.forEach(i=>{r[`${n}.${i.name}`]=i})}),r}getChart(r){return this.getCharts()[r]}}const b0=()=>z.usePlugin(Cv).charts.getChartTypes(),wT=()=>{var r,t,n;return(n=(t=(r=b0()[0])==null?void 0:r.children)==null?void 0:t[0])==null?void 0:n.value},E0=()=>z.usePlugin(Cv).charts.getCharts(),ST=e=>z.usePlugin(Cv).charts.getChart(e),{Paragraph:CT,Text:MT}=gt.Typography,kv=e=>{const{t:r}=jt(),t=B.useContext(kn),{config:n,transform:i,collection:a,service:o,data:l}=t,s=ia(a),u=T0(l,a),c=(n==null?void 0:n.general)||{},f=(n==null?void 0:n.advanced)||{},h=z.useAPIClient(),v=ST(n==null?void 0:n.chartType),d=h.auth.getLocale(),p=LT(i,d),y=v==null?void 0:v.render({data:u,general:c,advanced:f,fieldProps:Object.keys(u[0]||{}).reduce((m,x)=>{if(!m[x]){const w=Vu(s,x.split(".")),C=p[x];m[x]={label:(w==null?void 0:w.label)||x,transformer:C,interface:w==null?void 0:w.interface}}return m},{})}),g=()=>v?R.jsx(M0,{onError:m=>{console.error(m)},FallbackComponent:AT,children:R.jsx(y,{})}):R.jsx(gt.Empty,{image:gt.Empty.PRESENTED_IMAGE_SIMPLE,description:r("Please configure chart")});return o.loading?R.jsx(gt.Spin,{}):u&&u.length?R.jsx(g,{}):R.jsx(gt.Empty,{image:gt.Empty.PRESENTED_IMAGE_SIMPLE,description:r("Please configure and run query")})};kv.Designer=function(){const{t:r}=jt(),{setVisible:t,setCurrent:n}=B.useContext(Tn),{removeChart:i}=B.useContext(kl),{service:a}=B.useContext(kn),o=mt.useField(),l=mt.useFieldSchema(),{insertAdjacent:s}=z.useDesignable(),{name:u,title:c}=z.useCollection();return R.jsxs(z.GeneralSchemaDesigner,{disableInitializer:!0,title:c||u,children:[R.jsx(z.SchemaSettingsItem,{title:"Configure",onClick:()=>br(this,null,function*(){n({schema:l,field:o,collection:u,service:a,data:a.data}),t(!0)}),children:r("Configure")},"configure"),R.jsx(z.SchemaSettingsItem,{title:"Duplicate",onClick:()=>s("afterEnd",z.gridRowColWrap(A0(l==null?void 0:l["x-decorator-props"]))),children:r("Duplicate")},"duplicate"),R.jsx(z.SchemaSettingsBlockTitleItem,{}),R.jsx(z.SchemaSettingsDivider,{}),R.jsx(z.SchemaSettingsRemove,{breakRemoveOn:{"x-component":"ChartV2Block"},confirm:{onOk:()=>{i(l["x-uid"])}}})]})};const AT=({error:e})=>{const{t:r}=jt();return R.jsx("div",{style:{backgroundColor:"white"},children:R.jsx(gt.Result,{status:"error",title:r("Render Failed"),subTitle:r("Please check the configuration."),children:R.jsx(CT,{copyable:!0,children:R.jsx(MT,{type:"danger",style:{whiteSpace:"pre-line",textAlign:"center"},children:e.message})})})})},FT=e=>{const{current:r}=B.useContext(Tn);e||(e=(r==null?void 0:r.collection)||"");const{getCollectionFields:t}=z.useCollectionManager();return(t(e)||[]).filter(i=>i.interface).map(i=>{var a;return yt(J({},i),{key:i.name,label:((a=i.uiSchema)==null?void 0:a.title)||i.name,value:i.name})})},ia=e=>{const{getCollectionFields:r,getInterface:t}=z.useCollectionManager(),{t:n}=Av.useTranslation();return FT(e).map(a=>{var u,c,f,h;const o=(u=t(a.interface))==null?void 0:u.filterable,l=mt.Schema.compile(((c=a.uiSchema)==null?void 0:c.title)||a.name,{t:n});if(!(o&&(o!=null&&o.nested||(f=o==null?void 0:o.children)!=null&&f.length)))return yt(J({},a),{label:l});let s=[];if(o!=null&&o.nested){const v=(r(a.target)||[]).filter(d=>d.interface).map(d=>{var p;return yt(J({},d),{key:`${a.name}.${d.name}`,label:`${l} / ${mt.Schema.compile(((p=d.uiSchema)==null?void 0:p.title)||d.name,{t:n})}`,value:`${a.name}.${d.name}`})});s=[...s,...v]}if((h=o==null?void 0:o.children)!=null&&h.length){const v=o.children.map(d=>{var p;return yt(J({},d),{key:`${a.name}.${d.name}`,label:`${l} / ${mt.Schema.compile(((p=d.schema)==null?void 0:p.title)||d.title||d.name,{t:n})}`,value:`${a.name}.${d.name}`})});s=[...s,...v]}return yt(J({},a),{label:l,targetFields:s})})},k0=e=>r=>{const t=r.query("query").get("value")||{},n=oo(e,t);r.dataSource=n},bT=e=>r=>{var a;const t=r.query(".field").get("value");if(!t){r.dataSource=[];return}let n=[];switch((a=Vu(e,t))==null?void 0:a.interface){case"datetime":case"createdAt":case"updatedAt":n=Fv.datetime;break;case"date":n=Fv.date;break;case"time":n=Fv.time;break;default:n=[]}r.dataSource=n},ET=()=>{const{t:e}=Av.useTranslation(),{collections:r}=z.useCollectionManager(),{allowAll:t,parseAction:n}=z.useACLRoleContext(),i=r.filter(a=>t?!0:n(`${a.name}:list`)).map(a=>({label:a.title,value:a.name,key:a.name}));return mt.Schema.compile(i,{t:e})},kT=(e,r)=>t=>{const n=t.query("query").get("value")||{},{measures:i=[]}=n;if(!i.some(l=>l.aggregation)){t.componentProps.fieldNames={label:"title",value:"name",children:"children"},t.dataSource=e;return}const o=oo(r,n);t.componentProps.fieldNames={},t.dataSource=o},TT=(e,r)=>t=>{const n=t.query("query").get("value")||{},{measures:i=[]}=n,a=i.some(c=>c.aggregation);let o=e;const l=[];a?(o=oo(r,n),o.forEach(c=>{l.push(c.value)})):o.forEach(c=>{const f=c.children||[];f.length||l.push(c.value||c.name),f.forEach(h=>{l.push(`${c.name}.${h.name}`)})});const u=(t.value||[]).reduce((c,f)=>{const{alias:h}=El(f.field);return(!f.field||l.includes(h))&&c.push(f),c},[]);t.setValue(u)},T0=(e,r)=>{var s;const{t}=jt(),{service:n,query:i}=B.useContext(kn),a=ia(r),o=mt.useForm(),l=oo(a,((s=o==null?void 0:o.values)==null?void 0:s.query)||i);return vT(l,(n==null?void 0:n.data)||e||[],{t})},Tv={datetime:{YYYY:e=>Ce(e).format("YYYY"),MM:e=>Ce(e).format("MM"),DD:e=>Ce(e).format("DD"),"YYYY-MM":e=>Ce(e).format("YYYY-MM"),"YYYY-MM-DD":e=>Ce(e).format("YYYY-MM-DD"),"YYYY-MM-DD hh:mm":e=>Ce(e).format("YYYY-MM-DD hh:mm"),"YYYY-MM-DD hh:mm:ss":e=>Ce(e).format("YYYY-MM-DD hh:mm:ss")},date:{YYYY:e=>Ce(e).format("YYYY"),MM:e=>Ce(e).format("MM"),DD:e=>Ce(e).format("DD"),"YYYY-MM":e=>Ce(e).format("YYYY-MM"),"YYYY-MM-DD":e=>Ce(e).format("YYYY-MM-DD")},time:{"hh:mm:ss":e=>Ce(e).format("hh:mm:ss"),"hh:mm":e=>Ce(e).format("hh:mm"),hh:e=>Ce(e).format("hh")},number:{Percent:e=>new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),Currency:(e,r="en-US")=>{const t={"zh-CN":"CNY","en-US":"USD","ja-JP":"JPY","ko-KR":"KRW","pt-BR":"BRL","ru-RU":"RUB","tr-TR":"TRY","es-ES":"EUR"}[r];return new Intl.NumberFormat(r,{style:"currency",currency:t}).format(e)},Exponential:e=>(+e).toExponential(),Abbreviation:(e,r="en-US")=>new Intl.NumberFormat(r,{notation:"compact"}).format(e)}},IT=e=>r=>{const t=r.query(".field").get("value"),n=r.query("query").get("value")||{},a=oo(e,n).find(f=>f.value===t),o=Object.keys(Tv);r.dataSource=o.map(f=>({label:Et(f),value:f}));const l={createdAt:"datetime",updatedAt:"datetime",double:"number",integer:"number",percent:"number"},s=a==null?void 0:a.interface,u=a==null?void 0:a.type,c=l[s]||l[u]||u;if(o.includes(c)){r.setState({value:c,disabled:!0});return}r.setState({value:null,disabled:!1})},PT=e=>{const r=e.query(".type").get("value");if(!r){e.dataSource=[];return}const t=Object.keys(Tv[r]||{}).map(n=>({label:Et(n),value:n}));e.dataSource=t},LT=(e,r="en-US")=>(e||[]).filter(t=>t.field&&t.type&&t.format).reduce((t,n)=>{const i=Tv[n.type][n.format];return i&&(t[n.field]=a=>i(a,r)),t},{});function Iv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var OT=function(r){return DT(r)&&!BT(r)};function DT(e){return!!e&&typeof e=="object"}function BT(e){var r=Object.prototype.toString.call(e);return r==="[object RegExp]"||r==="[object Date]"||zT(e)}var RT=typeof Symbol=="function"&&Symbol.for,NT=RT?Symbol.for("react.element"):60103;function zT(e){return e.$$typeof===NT}function YT(e){return Array.isArray(e)?[]:{}}function Tl(e,r){return r.clone!==!1&&r.isMergeableObject(e)?lo(YT(e),e,r):e}function VT(e,r,t){return e.concat(r).map(function(n){return Tl(n,t)})}function _T(e,r){if(!r.customMerge)return lo;var t=r.customMerge(e);return typeof t=="function"?t:lo}function $T(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(r){return Object.propertyIsEnumerable.call(e,r)}):[]}function I0(e){return Object.keys(e).concat($T(e))}function P0(e,r){try{return r in e}catch(t){return!1}}function GT(e,r){return P0(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))}function HT(e,r,t){var n={};return t.isMergeableObject(e)&&I0(e).forEach(function(i){n[i]=Tl(e[i],t)}),I0(r).forEach(function(i){GT(e,i)||(P0(e,i)&&t.isMergeableObject(r[i])?n[i]=_T(i,t)(e[i],r[i],t):n[i]=Tl(r[i],t))}),n}function lo(e,r,t){t=t||{},t.arrayMerge=t.arrayMerge||VT,t.isMergeableObject=t.isMergeableObject||OT,t.cloneUnlessOtherwiseSpecified=Tl;var n=Array.isArray(r),i=Array.isArray(e),a=n===i;return a?n?t.arrayMerge(e,r,t):HT(e,r,t):Tl(r,t)}lo.all=function(r,t){if(!Array.isArray(r))throw new Error("first argument should be an array");return r.reduce(function(n,i){return lo(n,i,t)},{})};var WT=lo,XT=WT;const jT=Iv(XT),L0=()=>{const{charts:e}=B.useContext(kl);return{getChartCollections:()=>Array.from(new Set(Object.values(e).filter(t=>t).map(t=>t.collection)))}},so=()=>{const{charts:e}=B.useContext(kl),{fieldSchema:r}=z.useActionContext(),t=r==null?void 0:r["x-action"],{getCollection:n,getInterface:i,getCollectionFields:a,getCollectionJoinField:o}=z.useCollectionManager(),{fields:l,form:s}=B.useContext(_r),u=y=>{const g=a(y),m=(A,b,T)=>{var L,H,N,_,$;const k=((L=A.uiSchema)==null?void 0:L.title)||A.name,P=i(A.interface),O=(N=(H=P==null?void 0:P.filterable)==null?void 0:H.operators)==null?void 0:N[0],V=n(A.target);b=b?`${b} / ${k}`:k;let W={type:"string",title:b,name:`${T}.${A.name}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-component":"CollectionField","x-decorator":"ChartFilterFormItem","x-collection-field":`${T}.${A.name}`,"x-component-props":yt(J({},(_=A.uiSchema)==null?void 0:_["x-component-props"]),{"filter-operator":O})};if(A.interface==="formula"){const X=pT(A.dataType)||"Input";W=yt(J({},W),{"x-component":X})}return["oho","o2m"].includes(A.interface)&&(W["x-component-props"].useOriginalFilter=!0),{key:`${T}.${A.name}`,name:A.name,type:"item",title:(($=A==null?void 0:A.uiSchema)==null?void 0:$.title)||A.name,Component:"CollectionFieldInitializer",remove:(X,K)=>{K(X,{breakRemoveOn:{"x-component":"Grid"}})},schemaInitialize:X=>{var K;(K=P==null?void 0:P.schemaInitialize)==null||K.call(P,X,{field:A,block:"FilterForm",readPretty:s.readPretty,action:t,targetCollection:V})},schema:W}},x=(A,b,T)=>{var W;const k=((W=A.uiSchema)==null?void 0:W.title)||A.name;b=b?`${b} / ${k}`:k;const P=A.operators[0];let O=yt(J({type:"string",name:`${T}.${A.name}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-decorator":"ChartFilterFormItem","x-collection-field":`${T}.${A.name}`},A.schema),{title:b,"x-component-props":{"filter-operator":P}});return P!=null&&P.noValue&&(O=yt(J({},O),{"x-component":"ChartFilterCheckbox","x-component-props":yt(J({},O["x-component-props"]),{content:mt.Schema.compile(P.label,{t:z.i18n.t})})})),{key:`${T}.${A.name}`,name:A.name,type:"item",title:A.title||A.name,Component:"CollectionFieldInitializer",remove:(q,L)=>{L(q,{breakRemoveOn:{"x-component":"Grid"}})},schema:O}},w=(A,b,T,k)=>{var L,H,N;if(!A.interface)return;const P=i(A.interface);if(!(P!=null&&P.filterable))return;const{nested:O,children:V}=P.filterable,W=((L=A.uiSchema)==null?void 0:L.title)||A.name,q=m(A,T,k);if(!(A.target&&b>2)){if(T=T?`${T} / ${W}`:W,V!=null&&V.length&&!["chinaRegion","createdBy","updatedBy"].includes(A.interface)){const _=V.map($=>x($,T,`${k}.${A.name}`));return{key:`${k}.${A.name}`,name:A.name,type:"subMenu",title:((H=A==null?void 0:A.uiSchema)==null?void 0:H.title)||A.name,children:_}}if(!b||b>2)return q;if(O){const $=a(A.target).map(X=>w(X,b+1,"",`${k}.${A.name}`));return{key:`${k}.${A.name}`,name:A.name,type:"subMenu",title:((N=A==null?void 0:A.uiSchema)==null?void 0:N.title)||A.name,children:$.filter(Boolean)}}return q}},C=[],M=[];return g.forEach(A=>{const b=A.interface,T=w(A,0,"",y.name);if(T&&C.push(T),["m2o"].includes(b)){const k=w(A,1,"",y.name);k&&M.push(k)}}),M.length&&C.push({name:"divider",type:"divider"},{name:"displayAssociationFields",type:"itemGroup",title:z.i18n.t("Display association fields"),children:M}),C},c=()=>{const y=(s==null?void 0:s.values)||{},g={};return Object.entries(l).forEach(([m,x])=>{const{operator:w}=x||{},C=o(m);C!=null&&C.target&&(m=`${m}.${C.targetKey||"id"}`);const[M,...A]=m.split("."),b=dT(y,m),T=(w==null?void 0:w.value)||"$eq";if(M!=="custom"){g[M]=g[M]||{$and:[]};const k={};He.set(k,A.join("."),{[T]:b}),g[M].$and.push(k)}else g[M]=g[M]||{},g[M][`$nFilter.${A.join(".")}`]=b}),g},f=(y,g)=>{const{collection:m,query:x}=y,{parameters:w}=bl.parse(x.filter||"");return y&&(g[m]||g.custom&&(w==null?void 0:w.find(C=>g.custom[C.key])))},h=(y,g)=>{const{collection:m,query:x}=y;let w=J({},x);const C=J({},w.filter||{});let M={};const A=bl.parse(C),{parameters:b}=A;return g.custom&&(b!=null&&b.find(T=>g.custom[T.key]))&&(M=A(g.custom)),M=jT(C,M),w=yt(J({},w),{filter:{$and:[M,g[m]]}}),w},v=()=>br(this,null,function*(){const y=c(),g=Object.values(e).filter(m=>f(m,y)).map(m=>()=>br(this,null,function*(){const{service:x,collection:w}=m;yield x.runAsync(w,h(m,y),!0)}));yield Promise.all(g.map(m=>m()))}),d=()=>br(this,null,function*(){const y=Object.values(e).filter(g=>g).map(g=>()=>br(this,null,function*(){const{service:m,collection:x,query:w}=g;yield m.runAsync(x,w,!0)}));yield Promise.all(y.map(g=>g()))}),p=ln.useMemoizedFn(y=>y.split(" / ").map(g=>z.i18n.t(mt.Schema.compile(g,{t:z.i18n.t}))).join(" / "));return{filter:v,refresh:d,getChartFilterFields:u,getFilter:c,hasFilter:f,appendFilter:h,getTranslatedTitle:p}},UT=()=>{const{t:e}=jt(),r=ln.useMemoizedFn(e),{enabled:t,fields:n}=B.useContext(_r),i=Object.entries(n).filter(([o,l])=>o.startsWith("custom.")&&l).map(([o,{title:l}])=>{const s=o.replace(/^custom\./,"");return{key:s,value:s,label:l}}),a=B.useMemo(()=>({label:r("Current filter"),value:"$nFilter",key:"$nFilter",children:i}),[i,r]);return!t||!i.length?null:a},O0=()=>{const{t:e}=jt(),{getChartCollections:r}=L0(),{getInterface:t,getCollectionFields:n,getCollection:i}=z.useCollectionManager(),{values:a}=D0(),o=(u,c)=>{var d,p,y;if(!u.interface)return;const f=t(u.interface);if(!(f!=null&&f.filterable))return;const{nested:h}=f.filterable,v={value:u.name,label:e(((d=u==null?void 0:u.uiSchema)==null?void 0:d.title)||u.name)};if(!(u.target&&c>2)){if(c>2)return v;if(h){const m=n(u.target).map(x=>o(x,c+1));return{value:u.name,label:e(((p=u==null?void 0:u.uiSchema)==null?void 0:p.title)||u.name),children:m.filter(x=>x)}}if(!(!a.includes((y=u.uiSchema)==null?void 0:y["x-component"])&&!a.includes(u.interface)))return v}},l=r(),s=[];return l.forEach(u=>{const c=i(u),f=[];n(c).forEach(v=>{const d=o(v,1);d&&f.push(d)}),f.length&&s.push({value:u,label:e(c.title),children:f})}),s},D0=()=>{const{t:e}=jt(),r=[{label:e("Input"),value:"Input"},{label:e("Number"),value:"InputNumber"},{label:e("Date"),value:"DatePicker"},{label:e("Date range"),value:"DatePicker.RangePicker"},{label:e("Time"),value:"TimePicker"},{label:e("Time range"),value:"TimePicker.RangePicker"},{label:e("Select"),value:"Select"},{label:e("Radio group"),value:"Radio.Group"},{label:e("Checkbox group"),value:"Checkbox.Group"}];return{options:r,values:r.map(t=>t.value)}},qT=e=>{const{getCollection:r,getCollectionField:t}=z.useCollectionManager();return B.useMemo(()=>{var u;if(!e)return;const[n,...i]=e.split(".");if(!(i!=null&&i.length))return;const a=r(n);let o=n,l,s=mt.Schema.compile(a==null?void 0:a.title,{t:z.i18n.t});for(;o&&i.length>0;){const c=i.shift();l=t(`${o}.${c}`);const f=((u=l==null?void 0:l.uiSchema)==null?void 0:u.title)||(l==null?void 0:l.name);f&&(s+=` / ${mt.Schema.compile(f,{t:z.i18n.t})}`),l!=null&&l.target?o=l.target:o=null}return s},[e])},ZT=()=>{const e=mt.useField(),{operator:r,schema:t}=e.data||{},n=z.useUserVariable({collectionField:{uiSchema:t},uiSchema:t}),i=z.useDateVariable({operator:r,schema:t}),a=UT(),o=B.useMemo(()=>[n,i,a].filter(Boolean),[i,n,a]);return!r||!t?[]:o},_u=(e={},r={})=>yt(J({type:"array","x-decorator":"FormItem","x-component":"ArrayItems"},r),{items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:yt(J({sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"}},e),{remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}})}}},properties:{add:{type:"void",title:'{{t("Add field")}}',"x-component":"ArrayItems.Addition"}}}),QT=e=>({type:"void",properties:{config:{type:"object",properties:{chartType:{type:"string",title:'{{t("Chart type")}}',"x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Please select a chart type.")}}'},enum:"{{ chartTypes }}"},[na.uid()]:{type:"void",properties:{general:e}},[na.uid()]:{type:"void",properties:{advanced:{type:"json",title:'{{t("JSON config")}}',"x-decorator":"FormItem","x-decorator-props":{extra:Et("Same properties set in the form above will be overwritten by this JSON config.")},"x-component":"Input.JSON","x-component-props":{autoSize:{minRows:3}}}}},reference:{type:"string","x-reactions":{dependencies:[".chartType"],fulfill:{schema:{"x-content":"{{ getReference($deps[0]) }}"}}}}}}}}),KT={type:"void",properties:{settings:{type:"void",properties:{collection:{title:'{{t("Collection")}}',type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{options:"{{ collectionOptions }}",onChange:"{{ onCollectionChange }}",placeholder:'{{t("Collection")}}'}}}},query:{type:"object",properties:{builder:{type:"void",properties:{collapse:{type:"void","x-decorator":"FormItem","x-component":"FormCollapse","x-component-props":{formCollapse:"{{formCollapse}}"},properties:{pane1:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Et("Measures"),key:"measures"},properties:{measures:_u({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}',fieldNames:{label:"title",value:"name",children:"children"}},enum:"{{ fieldOptions }}",required:!0},aggregation:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Aggregation")}}'},enum:[{label:'{{t("Sum")}}',value:"sum"},{label:'{{t("Count")}}',value:"count"},{label:'{{t("Avg")}}',value:"avg"},{label:'{{t("Max")}}',value:"max"},{label:'{{t("Min")}}',value:"min"}]},alias:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Alias")}}',style:{minWidth:"100px"}}}},{required:!0,"x-component-props":{style:{overflow:"auto"}}})}},pane2:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Et("Dimensions"),key:"dimensions"},properties:{dimensions:_u({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}',fieldNames:{label:"title",value:"name",children:"children"}},enum:"{{ fieldOptions }}",required:!0},format:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Format")}}',style:{maxWidth:"120px"}},"x-reactions":"{{ useFormatterOptions }}","x-visible":"{{ $self.dataSource && $self.dataSource.length }}"},alias:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Alias")}}',style:{minWidth:"100px"}}}},{"x-component-props":{style:{overflow:"auto"}}})}},pane3:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Et("Filter"),key:"filter"},properties:{filter:{type:"object","x-decorator":"FormItem","x-decorator-props":{style:{overflow:"auto"}},"x-component":"Filter","x-component-props":{options:"{{ filterOptions }}",dynamicComponent:"FilterDynamicComponent"}}}},pane4:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Et("Sort"),key:"sort"},properties:{orders:_u({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}'},"x-reactions":"{{ useOrderOptions }}",required:!0},order:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{defaultValue:"ASC",optionType:"button",style:{width:"128px"}},enum:["ASC","DESC"]}},{"x-reactions":"{{ useOrderReaction }}","x-component-props":{style:{overflow:"auto"}}})}}}},limit:{title:'{{t("Limit")}}',type:"number","x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{defaultValue:2e3,min:1,style:{width:"100px"}}}}},cache:{type:"object",properties:{enabled:{type:"boolean",title:'{{t("Enable cache")}}',"x-decorator":"FormItem","x-component":"Switch"},ttl:{type:"number",title:'{{t("TTL (second)")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{defaultValue:60,min:1,style:{width:"100px"}}}}}}}}},JT={type:"void",properties:{transform:_u({field:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Field")}}',style:{maxWidth:"100px"}},"x-reactions":"{{ useChartFields }}"},type:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Type")}}'},"x-reactions":"{{ useFieldTypeOptions }}"},format:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Format")}}'},"x-reactions":"{{ useTransformers }}","x-visible":"{{ $self.dataSource && $self.dataSource.length }}"}},{"x-decorator-props":{style:{width:"50%"}}})}};function tI(e){const{value:r,onChange:t,renderSchemaComponent:n}=e,i=ZT();return R.jsx(z.Variable.Input,{value:r,onChange:t,scope:i,children:n()})}const Tn=B.createContext({visible:!0}),eI=e=>{var l;const{insertAdjacent:r}=z.useDesignable(),[t,n]=B.useState(!1),[i,a]=B.useState({}),{token:o}=gt.theme.useToken();return R.jsxs(Tn.Provider,{value:{visible:t,setVisible:n,current:i,setCurrent:a},children:[R.jsx("div",{className:ao.css`
|
|
1
|
+
(function(dt,z){typeof exports=="object"&&typeof module!="undefined"?z(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@formily/core"),require("@formily/react"),require("antd"),require("lodash"),require("react-i18next"),require("dayjs"),require("@formily/shared"),require("ahooks"),require("@nocobase/utils/client"),require("@emotion/css")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","react","@ant-design/icons","@formily/antd-v5","@formily/core","@formily/react","antd","lodash","react-i18next","dayjs","@formily/shared","ahooks","@nocobase/utils/client","@emotion/css"],z):(dt=typeof globalThis!="undefined"?globalThis:dt||self,z(dt["@nocobase/plugin-data-visualization"]={},dt["@nocobase/client"],dt.jsxRuntime,dt.react,dt["@ant-design/icons"],dt["@formily/antd-v5"],dt["@formily/core"],dt["@formily/react"],dt.antd,dt.lodash,dt["react-i18next"],dt.dayjs,dt["@formily/shared"],dt.ahooks,dt["@nocobase/utils"],dt["@emotion/css"]))})(this,function(dt,z,R,D,ni,Ie,on,mt,gt,He,Av,Ce,na,ln,bl,ao){"use strict";var E7=Object.defineProperty,k7=Object.defineProperties;var T7=Object.getOwnPropertyDescriptors;var Mv=Object.getOwnPropertySymbols;var lT=Object.prototype.hasOwnProperty,sT=Object.prototype.propertyIsEnumerable;var S0=(dt,z,R)=>z in dt?E7(dt,z,{enumerable:!0,configurable:!0,writable:!0,value:R}):dt[z]=R,J=(dt,z)=>{for(var R in z||(z={}))lT.call(z,R)&&S0(dt,R,z[R]);if(Mv)for(var R of Mv(z))sT.call(z,R)&&S0(dt,R,z[R]);return dt},yt=(dt,z)=>k7(dt,T7(z));var uT=(dt,z)=>{var R={};for(var D in dt)lT.call(dt,D)&&z.indexOf(D)<0&&(R[D]=dt[D]);if(dt!=null&&Mv)for(var D of Mv(dt))z.indexOf(D)<0&&sT.call(dt,D)&&(R[D]=dt[D]);return R};var Fr=(dt,z,R)=>(S0(dt,typeof z!="symbol"?z+"":z,R),R);var br=(dt,z,R)=>new Promise((D,ni)=>{var Ie=gt=>{try{mt(R.next(gt))}catch(He){ni(He)}},on=gt=>{try{mt(R.throw(gt))}catch(He){ni(He)}},mt=gt=>gt.done?D(gt.value):Promise.resolve(gt.value).then(Ie,on);mt((R=R.apply(dt,z)).next())});function cT(e,r){for(var t=0;t<r.length;t++){const n=r[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const zu=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return qr},get Circle(){return Zz},get Ellipse(){return Qz},get Image(){return Kz},get Line(){return Jz},get Marker(){return e5},get Path(){return Ip},get Polygon(){return s5},get Polyline(){return u5},get Rect(){return h5},get Text(){return v5}},Symbol.toStringTag,{value:"Module"})),Yu=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return Pr},get Circle(){return w5},get Dom(){return S5},get Ellipse(){return C5},get Image(){return M5},get Line(){return A5},get Marker(){return F5},get Path(){return b5},get Polygon(){return E5},get Polyline(){return k5},get Rect(){return I5},get Text(){return D5}},Symbol.toStringTag,{value:"Module"})),C0="data-visualization";function Et(e){return z.i18n.t(e,{ns:[C0,"client"]})}function jt(){return Av.useTranslation([C0,"client"],{nsMode:"fallback"})}const Fv={datetime:[{label:Et("YYYY"),value:"YYYY"},{label:Et("MM"),value:"MM"},{label:Et("DD"),value:"DD"},{label:Et("YYYY-MM"),value:"YYYY-MM"},{label:Et("YYYY-MM-DD"),value:"YYYY-MM-DD"},{label:Et("YYYY-MM-DD hh:mm"),value:"YYYY-MM-DD hh:mm"},{label:Et("YYYY-MM-DD hh:mm:ss"),value:"YYYY-MM-DD hh:mm:ss"}],date:[{label:Et("YYYY"),value:"YYYY"},{label:Et("MM"),value:"MM"},{label:Et("DD"),value:"DD"},{label:Et("YYYY-MM"),value:"YYYY-MM"},{label:Et("YYYY-MM-DD"),value:"YYYY-MM-DD"}],time:[{label:Et("hh:mm:ss"),value:"hh:mm:ss"},{label:Et("hh:mm"),value:"hh:mm"},{label:Et("hh"),value:"hh"}]},fT=D.createContext(null),bv={didCatch:!1,error:null};let M0=class extends D.Component{constructor(r){super(r),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=bv}static getDerivedStateFromError(r){return{didCatch:!0,error:r}}resetErrorBoundary(){const{error:r}=this.state;if(r!==null){for(var t,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];(t=(n=this.props).onReset)===null||t===void 0||t.call(n,{args:a,reason:"imperative-api"}),this.setState(bv)}}componentDidCatch(r,t){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,r,t)}componentDidUpdate(r,t){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&t.error!==null&&hT(r.resetKeys,i)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:i,prev:r.resetKeys,reason:"keys"}),this.setState(bv)}}render(){const{children:r,fallbackRender:t,FallbackComponent:n,fallback:i}=this.props,{didCatch:a,error:o}=this.state;let l=r;if(a){const s={error:o,resetErrorBoundary:this.resetErrorBoundary};if(D.isValidElement(i))l=i;else if(typeof t=="function")l=t(s);else if(n)l=D.createElement(n,s);else throw o}return D.createElement(fT.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},l)}};function hT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==r.length||e.some((t,n)=>!Object.is(t,r[n]))}const A0=(e,r={})=>{const{collection:t}=e;return{type:"void","x-decorator":"ChartRendererProvider","x-decorator-props":e,"x-acl-action":`${t}:list`,"x-designer":"ChartRenderer.Designer","x-component":"CardItem","x-component-props":{size:"small"},"x-initializer":"ChartInitializers",properties:{[na.uid()]:{type:"void","x-component":"ChartRenderer","x-component-props":r}}}},El=e=>{let r,t;return Array.isArray(e)?e.length===1?t=e[0]:e.length>1&&([r,t]=e):t=e,{target:r,name:t,alias:r?`${r}.${t}`:t}},Vu=(e,r)=>{var a,o;const{target:t,name:n}=El(r);return t?(o=(a=e.find(l=>l.name===t))==null?void 0:a.targetFields)==null?void 0:o.find(l=>l.name===n):e.find(l=>l.name===n)},oo=(e,r)=>{const t=l=>l.map(s=>{const u=Vu(e,s.field);return yt(J({},u),{key:s.alias||(u==null?void 0:u.key),label:s.alias||(u==null?void 0:u.label),value:s.alias||(u==null?void 0:u.value)})}),n=r.measures||[],i=r.dimensions||[];return[...new Map([...t(n),...t(i)].map(l=>[l.value,l])).values()]},vT=(e,r,t)=>{const n=(i,a)=>{var s;const o=(s=i.uiSchema)==null?void 0:s.enum;if(!o||!Array.isArray(o))return a;const l=o.find(u=>u.value===a);return mt.Schema.compile((l==null?void 0:l.label)||a,t)};return r.map(i=>{const a={};return Object.entries(i).forEach(([o,l])=>{const s=e.find(u=>u.value===o);if(!s){a[o]=l;return}switch(s.interface){case"select":case"radioGroup":a[o]=n(s,l);break;default:a[o]=l}}),a})},Ev=e=>{if(typeof e=="object"&&e!==null)if(Array.isArray(e)){const r=e.map(t=>Ev(t)).filter(Boolean);return r.length>0?r:null}else{const r={};for(const t in e){const n=Ev(e[t]);n&&!(typeof n=="object"&&Object.keys(n).length===0)&&(r[t]=n)}return Object.keys(r).length>0?r:null}else if(typeof e=="string"&&e.startsWith("{{$nFilter.")&&e.endsWith("}}"))return null;return e},dT=(e,r)=>{const t=r.split(".");let n=He.get(e,t.slice(0,-1).join("."));return Array.isArray(n)?n=n.map(i=>He.get(i,t.slice(-1)[0])):n=He.get(n,t.slice(-1)[0]),n},pT=e=>({boolean:"Checkbox",integer:"InputNumber",bigInt:"InputNumber",double:"InputNumber",decimal:"InputNumber",date:"DatePicker",string:"Input"})[e],gT=e=>({boolean:"boolean",integer:"integer",bigInt:"integer",double:"number",decimal:"number",date:"datetime",string:"input"})[e],kl=D.createContext({}),yT=e=>{const[r,t]=D.useState({}),n=ln.useMemoizedFn((a,{collection:o,service:l,query:s})=>{t(u=>yt(J({},u),{[a]:{collection:o,service:l,query:s}}))}),i=ln.useMemoizedFn(a=>{t(o=>yt(J({},o),{[a]:void 0}))});return R.jsx(kl.Provider,{value:{charts:r,addChart:n,removeChart:i},children:e.children})},_r=D.createContext({}),mT=e=>{const[r,t]=D.useState(!1),[n,i]=D.useState(!1),[a,o]=D.useState({}),[l,s]=D.useState({collapsed:!1,row:1}),[u,c]=D.useState(),f=ln.useMemoizedFn((y,g)=>{o(m=>yt(J({},m),{[y]:J(J({},m[y]||{}),g)}))}),h=ln.useMemoizedFn(y=>{o(g=>{const m=J({},g);return m[y]=void 0,m})}),v=ln.useMemoizedFn(c),d=ln.useMemoizedFn(i),p=({collapsed:y,row:g})=>{s(m=>({collapsed:y!==void 0?y:m.collapsed,row:g!==void 0?g:m.row}))};return D.useEffect(()=>t(!0),[]),R.jsx(_r.Provider,{value:{ready:r,enabled:n,setEnabled:d,fields:a,setField:f,removeField:h,collapse:l,setCollapse:p,form:u,setForm:v},children:e.children})},kn=D.createContext({}),F0=e=>{const{query:r,config:t,collection:n,transform:i}=e,{addChart:a}=D.useContext(kl),{ready:o,form:l,enabled:s}=D.useContext(_r),{getFilter:u,hasFilter:c,appendFilter:f}=so(),h=mt.useFieldSchema(),v=z.useAPIClient(),d=z.useRequest((p,y,g)=>new Promise((m,x)=>{var M;if(!(p&&((M=y==null?void 0:y.measures)!=null&&M.length))||s&&!l)return m(void 0);const w=u(),C=!g&&c({collection:p,query:y},w)?f({collection:p,query:y},w):y;v.request({url:"charts:query",method:"POST",data:yt(J({uid:h==null?void 0:h["x-uid"],collection:p},C),{filter:Ev(C.filter),dimensions:((y==null?void 0:y.dimensions)||[]).map(A=>{const b=J({},A);if(A.format&&!A.alias){const{alias:T}=El(A.field);b.alias=T}return b}),measures:((y==null?void 0:y.measures)||[]).map(A=>{const b=J({},A);if(A.aggregation&&!A.alias){const{alias:T}=El(A.field);b.alias=T}return b})})}).then(A=>{var b;m((b=A==null?void 0:A.data)==null?void 0:b.data),!g&&(h!=null&&h["x-uid"])&&a(h==null?void 0:h["x-uid"],{collection:p,service:d,query:y})}).catch(x)}),{defaultParams:[n,r],ready:o&&(!s||!!l)});return R.jsx(z.MaybeCollectionProvider,{collection:n,children:R.jsx(gt.ConfigProvider,{card:{style:{boxShadow:"none"}},children:R.jsx(kn.Provider,{value:{collection:n,config:t,transform:i,service:d,query:r},children:e.children})})})};class xT{constructor(){Fr(this,"charts",new Map)}setGroup(r,t){this.charts.set(r,t)}addGroup(r,t){if(this.charts.has(r))throw new Error(`[data-visualization] Chart group "${r}" already exists`);this.setGroup(r,t)}add(r,t){var n;this.charts.has(r)||this.setGroup(r,[]),(n=this.charts.get(r))==null||n.push(t)}getChartTypes(){const r=[];this.charts.forEach((n,i)=>{const a=n.map(o=>({key:`${i}.${o.name}`,label:Et(o.title),value:`${i}.${o.name}`}));r.push({label:Et(i),children:a})});const t=r.findIndex(n=>n.label===Et("Built-in"));if(t>-1){const[n]=r.splice(t,1);r.unshift(n)}return r}getCharts(){const r={};return this.charts.forEach((t,n)=>{t.forEach(i=>{r[`${n}.${i.name}`]=i})}),r}getChart(r){return this.getCharts()[r]}}const b0=()=>z.usePlugin(Cv).charts.getChartTypes(),wT=()=>{var r,t,n;return(n=(t=(r=b0()[0])==null?void 0:r.children)==null?void 0:t[0])==null?void 0:n.value},E0=()=>z.usePlugin(Cv).charts.getCharts(),ST=e=>z.usePlugin(Cv).charts.getChart(e),{Paragraph:CT,Text:MT}=gt.Typography,kv=e=>{const{t:r}=jt(),t=D.useContext(kn),{config:n,transform:i,collection:a,service:o,data:l}=t,s=ia(a),u=T0(l,a),c=(n==null?void 0:n.general)||{},f=(n==null?void 0:n.advanced)||{},h=z.useAPIClient(),v=ST(n==null?void 0:n.chartType),d=h.auth.getLocale(),p=LT(i,d),y=v==null?void 0:v.render({data:u,general:c,advanced:f,fieldProps:Object.keys(u[0]||{}).reduce((m,x)=>{if(!m[x]){const w=Vu(s,x.split(".")),C=p[x];m[x]={label:(w==null?void 0:w.label)||x,transformer:C,interface:w==null?void 0:w.interface}}return m},{})}),g=()=>v?R.jsx(M0,{onError:m=>{console.error(m)},FallbackComponent:AT,children:R.jsx(y,{})}):R.jsx(gt.Empty,{image:gt.Empty.PRESENTED_IMAGE_SIMPLE,description:r("Please configure chart")});return o.loading?R.jsx(gt.Spin,{}):u&&u.length?R.jsx(g,{}):R.jsx(gt.Empty,{image:gt.Empty.PRESENTED_IMAGE_SIMPLE,description:r("Please configure and run query")})};kv.Designer=function(){const{t:r}=jt(),{setVisible:t,setCurrent:n}=D.useContext(Tn),{removeChart:i}=D.useContext(kl),{service:a}=D.useContext(kn),o=mt.useField(),l=mt.useFieldSchema(),{insertAdjacent:s}=z.useDesignable(),{name:u,title:c}=z.useCollection();return R.jsxs(z.GeneralSchemaDesigner,{disableInitializer:!0,title:c||u,children:[R.jsx(z.SchemaSettingsItem,{title:"Configure",onClick:()=>br(this,null,function*(){n({schema:l,field:o,collection:u,service:a,data:a.data}),t(!0)}),children:r("Configure")},"configure"),R.jsx(z.SchemaSettingsItem,{title:"Duplicate",onClick:()=>s("afterEnd",z.gridRowColWrap(A0(l==null?void 0:l["x-decorator-props"]))),children:r("Duplicate")},"duplicate"),R.jsx(z.SchemaSettingsBlockTitleItem,{}),R.jsx(z.SchemaSettingsDivider,{}),R.jsx(z.SchemaSettingsRemove,{breakRemoveOn:{"x-component":"ChartV2Block"},confirm:{onOk:()=>{i(l["x-uid"])}}})]})};const AT=({error:e})=>{const{t:r}=jt();return R.jsx("div",{style:{backgroundColor:"white"},children:R.jsx(gt.Result,{status:"error",title:r("Render Failed"),subTitle:r("Please check the configuration."),children:R.jsx(CT,{copyable:!0,children:R.jsx(MT,{type:"danger",style:{whiteSpace:"pre-line",textAlign:"center"},children:e.message})})})})},FT=e=>{const{current:r}=D.useContext(Tn);e||(e=(r==null?void 0:r.collection)||"");const{getCollectionFields:t}=z.useCollectionManager();return(t(e)||[]).filter(i=>i.interface).map(i=>{var a;return yt(J({},i),{key:i.name,label:((a=i.uiSchema)==null?void 0:a.title)||i.name,value:i.name})})},ia=e=>{const{getCollectionFields:r,getInterface:t}=z.useCollectionManager(),{t:n}=Av.useTranslation(),i=FT(e);return D.useMemo(()=>i.map(a=>{var u,c,f,h;const o=(u=t(a.interface))==null?void 0:u.filterable,l=mt.Schema.compile(((c=a.uiSchema)==null?void 0:c.title)||a.name,{t:n});if(!(o&&(o!=null&&o.nested||(f=o==null?void 0:o.children)!=null&&f.length)))return yt(J({},a),{label:l});let s=[];if(o!=null&&o.nested){const v=(r(a.target)||[]).filter(d=>d.interface).map(d=>{var p;return yt(J({},d),{key:`${a.name}.${d.name}`,label:`${l} / ${mt.Schema.compile(((p=d.uiSchema)==null?void 0:p.title)||d.name,{t:n})}`,value:`${a.name}.${d.name}`})});s=[...s,...v]}if((h=o==null?void 0:o.children)!=null&&h.length){const v=o.children.map(d=>{var p;return yt(J({},d),{key:`${a.name}.${d.name}`,label:`${l} / ${mt.Schema.compile(((p=d.schema)==null?void 0:p.title)||d.title||d.name,{t:n})}`,value:`${a.name}.${d.name}`})});s=[...s,...v]}return yt(J({},a),{label:l,targetFields:s})}),[i])},k0=e=>r=>{const t=r.query("query").get("value")||{},n=oo(e,t);r.dataSource=n},bT=e=>r=>{var a;const t=r.query(".field").get("value");if(!t){r.dataSource=[];return}let n=[];switch((a=Vu(e,t))==null?void 0:a.interface){case"datetime":case"createdAt":case"updatedAt":n=Fv.datetime;break;case"date":n=Fv.date;break;case"time":n=Fv.time;break;default:n=[]}r.dataSource=n},ET=()=>{const{t:e}=Av.useTranslation(),{collections:r}=z.useCollectionManager(),{allowAll:t,parseAction:n}=z.useACLRoleContext(),i=r.filter(a=>t?!0:n(`${a.name}:list`)).map(a=>({label:a.title,value:a.name,key:a.name}));return D.useMemo(()=>mt.Schema.compile(i,{t:e}),[i])},kT=(e,r)=>t=>{const n=t.query("query").get("value")||{},{measures:i=[]}=n;if(!i.some(l=>l.aggregation)){t.componentProps.fieldNames={label:"title",value:"name",children:"children"},t.dataSource=e;return}const o=oo(r,n);t.componentProps.fieldNames={},t.dataSource=o},TT=(e,r)=>t=>{const n=t.query("query").get("value")||{},{measures:i=[]}=n,a=i.some(c=>c.aggregation);let o=e;const l=[];a?(o=oo(r,n),o.forEach(c=>{l.push(c.value)})):o.forEach(c=>{const f=c.children||[];f.length||l.push(c.value||c.name),f.forEach(h=>{l.push(`${c.name}.${h.name}`)})});const u=(t.value||[]).reduce((c,f)=>{const{alias:h}=El(f.field);return(!f.field||l.includes(h))&&c.push(f),c},[]);t.setValue(u)},T0=(e,r)=>{var s;const{t}=jt(),{service:n,query:i}=D.useContext(kn),a=ia(r),o=mt.useForm(),l=oo(a,((s=o==null?void 0:o.values)==null?void 0:s.query)||i);return vT(l,(n==null?void 0:n.data)||e||[],{t})},Tv={datetime:{YYYY:e=>Ce(e).format("YYYY"),MM:e=>Ce(e).format("MM"),DD:e=>Ce(e).format("DD"),"YYYY-MM":e=>Ce(e).format("YYYY-MM"),"YYYY-MM-DD":e=>Ce(e).format("YYYY-MM-DD"),"YYYY-MM-DD hh:mm":e=>Ce(e).format("YYYY-MM-DD hh:mm"),"YYYY-MM-DD hh:mm:ss":e=>Ce(e).format("YYYY-MM-DD hh:mm:ss")},date:{YYYY:e=>Ce(e).format("YYYY"),MM:e=>Ce(e).format("MM"),DD:e=>Ce(e).format("DD"),"YYYY-MM":e=>Ce(e).format("YYYY-MM"),"YYYY-MM-DD":e=>Ce(e).format("YYYY-MM-DD")},time:{"hh:mm:ss":e=>Ce(e).format("hh:mm:ss"),"hh:mm":e=>Ce(e).format("hh:mm"),hh:e=>Ce(e).format("hh")},number:{Percent:e=>new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),Currency:(e,r="en-US")=>{const t={"zh-CN":"CNY","en-US":"USD","ja-JP":"JPY","ko-KR":"KRW","pt-BR":"BRL","ru-RU":"RUB","tr-TR":"TRY","es-ES":"EUR"}[r];return new Intl.NumberFormat(r,{style:"currency",currency:t}).format(e)},Exponential:e=>(+e).toExponential(),Abbreviation:(e,r="en-US")=>new Intl.NumberFormat(r,{notation:"compact"}).format(e)}},IT=e=>r=>{const t=r.query(".field").get("value"),n=r.query("query").get("value")||{},a=oo(e,n).find(f=>f.value===t),o=Object.keys(Tv);r.dataSource=o.map(f=>({label:Et(f),value:f}));const l={createdAt:"datetime",updatedAt:"datetime",double:"number",integer:"number",percent:"number"},s=a==null?void 0:a.interface,u=a==null?void 0:a.type,c=l[s]||l[u]||u;if(o.includes(c)){r.setState({value:c,disabled:!0});return}r.setState({value:null,disabled:!1})},PT=e=>{const r=e.query(".type").get("value");if(!r){e.dataSource=[];return}const t=Object.keys(Tv[r]||{}).map(n=>({label:Et(n),value:n}));e.dataSource=t},LT=(e,r="en-US")=>(e||[]).filter(t=>t.field&&t.type&&t.format).reduce((t,n)=>{const i=Tv[n.type][n.format];return i&&(t[n.field]=a=>i(a,r)),t},{});function Iv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var OT=function(r){return DT(r)&&!BT(r)};function DT(e){return!!e&&typeof e=="object"}function BT(e){var r=Object.prototype.toString.call(e);return r==="[object RegExp]"||r==="[object Date]"||zT(e)}var RT=typeof Symbol=="function"&&Symbol.for,NT=RT?Symbol.for("react.element"):60103;function zT(e){return e.$$typeof===NT}function YT(e){return Array.isArray(e)?[]:{}}function Tl(e,r){return r.clone!==!1&&r.isMergeableObject(e)?lo(YT(e),e,r):e}function VT(e,r,t){return e.concat(r).map(function(n){return Tl(n,t)})}function _T(e,r){if(!r.customMerge)return lo;var t=r.customMerge(e);return typeof t=="function"?t:lo}function $T(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(r){return Object.propertyIsEnumerable.call(e,r)}):[]}function I0(e){return Object.keys(e).concat($T(e))}function P0(e,r){try{return r in e}catch(t){return!1}}function GT(e,r){return P0(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))}function HT(e,r,t){var n={};return t.isMergeableObject(e)&&I0(e).forEach(function(i){n[i]=Tl(e[i],t)}),I0(r).forEach(function(i){GT(e,i)||(P0(e,i)&&t.isMergeableObject(r[i])?n[i]=_T(i,t)(e[i],r[i],t):n[i]=Tl(r[i],t))}),n}function lo(e,r,t){t=t||{},t.arrayMerge=t.arrayMerge||VT,t.isMergeableObject=t.isMergeableObject||OT,t.cloneUnlessOtherwiseSpecified=Tl;var n=Array.isArray(r),i=Array.isArray(e),a=n===i;return a?n?t.arrayMerge(e,r,t):HT(e,r,t):Tl(r,t)}lo.all=function(r,t){if(!Array.isArray(r))throw new Error("first argument should be an array");return r.reduce(function(n,i){return lo(n,i,t)},{})};var WT=lo,XT=WT;const jT=Iv(XT),L0=()=>{const{charts:e}=D.useContext(kl);return{getChartCollections:()=>Array.from(new Set(Object.values(e).filter(t=>t).map(t=>t.collection)))}},so=()=>{const{charts:e}=D.useContext(kl),{fieldSchema:r}=z.useActionContext(),t=r==null?void 0:r["x-action"],{getCollection:n,getInterface:i,getCollectionFields:a,getCollectionJoinField:o}=z.useCollectionManager(),{fields:l,form:s}=D.useContext(_r),u=y=>{const g=a(y),m=(A,b,T)=>{var L,H,N,_,$;const k=((L=A.uiSchema)==null?void 0:L.title)||A.name,P=i(A.interface),O=(N=(H=P==null?void 0:P.filterable)==null?void 0:H.operators)==null?void 0:N[0],V=n(A.target);b=b?`${b} / ${k}`:k;let W={type:"string",title:b,name:`${T}.${A.name}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-component":"CollectionField","x-decorator":"ChartFilterFormItem","x-collection-field":`${T}.${A.name}`,"x-component-props":yt(J({},(_=A.uiSchema)==null?void 0:_["x-component-props"]),{"filter-operator":O})};if(A.interface==="formula"){const X=pT(A.dataType)||"Input";W=yt(J({},W),{"x-component":X})}return["oho","o2m"].includes(A.interface)&&(W["x-component-props"].useOriginalFilter=!0),{key:`${T}.${A.name}`,name:A.name,type:"item",title:(($=A==null?void 0:A.uiSchema)==null?void 0:$.title)||A.name,Component:"CollectionFieldInitializer",remove:(X,K)=>{K(X,{breakRemoveOn:{"x-component":"Grid"}})},schemaInitialize:X=>{var K;(K=P==null?void 0:P.schemaInitialize)==null||K.call(P,X,{field:A,block:"FilterForm",readPretty:s.readPretty,action:t,targetCollection:V})},schema:W}},x=(A,b,T)=>{var W;const k=((W=A.uiSchema)==null?void 0:W.title)||A.name;b=b?`${b} / ${k}`:k;const P=A.operators[0];let O=yt(J({type:"string",name:`${T}.${A.name}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-decorator":"ChartFilterFormItem","x-collection-field":`${T}.${A.name}`},A.schema),{title:b,"x-component-props":{"filter-operator":P}});return P!=null&&P.noValue&&(O=yt(J({},O),{"x-component":"ChartFilterCheckbox","x-component-props":yt(J({},O["x-component-props"]),{content:mt.Schema.compile(P.label,{t:z.i18n.t})})})),{key:`${T}.${A.name}`,name:A.name,type:"item",title:A.title||A.name,Component:"CollectionFieldInitializer",remove:(q,L)=>{L(q,{breakRemoveOn:{"x-component":"Grid"}})},schema:O}},w=(A,b,T,k)=>{var L,H,N;if(!A.interface)return;const P=i(A.interface);if(!(P!=null&&P.filterable))return;const{nested:O,children:V}=P.filterable,W=((L=A.uiSchema)==null?void 0:L.title)||A.name,q=m(A,T,k);if(!(A.target&&b>2)){if(T=T?`${T} / ${W}`:W,V!=null&&V.length&&!["chinaRegion","createdBy","updatedBy"].includes(A.interface)){const _=V.map($=>x($,T,`${k}.${A.name}`));return{key:`${k}.${A.name}`,name:A.name,type:"subMenu",title:((H=A==null?void 0:A.uiSchema)==null?void 0:H.title)||A.name,children:_}}if(!b||b>2)return q;if(O){const $=a(A.target).map(X=>w(X,b+1,"",`${k}.${A.name}`));return{key:`${k}.${A.name}`,name:A.name,type:"subMenu",title:((N=A==null?void 0:A.uiSchema)==null?void 0:N.title)||A.name,children:$.filter(Boolean)}}return q}},C=[],M=[];return g.forEach(A=>{const b=A.interface,T=w(A,0,"",y.name);if(T&&C.push(T),["m2o"].includes(b)){const k=w(A,1,"",y.name);k&&M.push(k)}}),M.length&&C.push({name:"divider",type:"divider"},{name:"displayAssociationFields",type:"itemGroup",title:z.i18n.t("Display association fields"),children:M}),C},c=()=>{const y=(s==null?void 0:s.values)||{},g={};return Object.entries(l).forEach(([m,x])=>{const{operator:w}=x||{},C=o(m);C!=null&&C.target&&(m=`${m}.${C.targetKey||"id"}`);const[M,...A]=m.split("."),b=dT(y,m),T=(w==null?void 0:w.value)||"$eq";if(M!=="custom"){g[M]=g[M]||{$and:[]};const k={};He.set(k,A.join("."),{[T]:b}),g[M].$and.push(k)}else g[M]=g[M]||{},g[M][`$nFilter.${A.join(".")}`]=b}),g},f=(y,g)=>{const{collection:m,query:x}=y,{parameters:w}=bl.parse(x.filter||"");return y&&(g[m]||g.custom&&(w==null?void 0:w.find(C=>g.custom[C.key])))},h=(y,g)=>{const{collection:m,query:x}=y;let w=J({},x);const C=J({},w.filter||{});let M={};const A=bl.parse(C),{parameters:b}=A;return g.custom&&(b!=null&&b.find(T=>g.custom[T.key]))&&(M=A(g.custom)),M=jT(C,M),w=yt(J({},w),{filter:{$and:[M,g[m]]}}),w},v=()=>br(this,null,function*(){const y=c(),g=Object.values(e).filter(m=>f(m,y)).map(m=>()=>br(this,null,function*(){const{service:x,collection:w}=m;yield x.runAsync(w,h(m,y),!0)}));yield Promise.all(g.map(m=>m()))}),d=()=>br(this,null,function*(){const y=Object.values(e).filter(g=>g).map(g=>()=>br(this,null,function*(){const{service:m,collection:x,query:w}=g;yield m.runAsync(x,w,!0)}));yield Promise.all(y.map(g=>g()))}),p=ln.useMemoizedFn(y=>y.split(" / ").map(g=>z.i18n.t(mt.Schema.compile(g,{t:z.i18n.t}))).join(" / "));return{filter:v,refresh:d,getChartFilterFields:u,getFilter:c,hasFilter:f,appendFilter:h,getTranslatedTitle:p}},UT=()=>{const{t:e}=jt(),r=ln.useMemoizedFn(e),{enabled:t,fields:n}=D.useContext(_r),i=Object.entries(n).filter(([o,l])=>o.startsWith("custom.")&&l).map(([o,{title:l}])=>{const s=o.replace(/^custom\./,"");return{key:s,value:s,label:l}}),a=D.useMemo(()=>({label:r("Current filter"),value:"$nFilter",key:"$nFilter",children:i}),[i,r]);return!t||!i.length?null:a},O0=()=>{const{t:e}=jt(),{getChartCollections:r}=L0(),{getInterface:t,getCollectionFields:n,getCollection:i}=z.useCollectionManager(),{values:a}=D0(),o=(s,u)=>{var v,d,p;if(!s.interface)return;const c=t(s.interface);if(!(c!=null&&c.filterable))return;const{nested:f}=c.filterable,h={value:s.name,label:e(((v=s==null?void 0:s.uiSchema)==null?void 0:v.title)||s.name)};if(!(s.target&&u>2)){if(u>2)return h;if(f){const g=n(s.target).map(m=>o(m,u+1));return{value:s.name,label:e(((d=s==null?void 0:s.uiSchema)==null?void 0:d.title)||s.name),children:g.filter(m=>m)}}if(!(!a.includes((p=s.uiSchema)==null?void 0:p["x-component"])&&!a.includes(s.interface)))return h}},l=r();return D.useMemo(()=>{const s=[];return l.forEach(u=>{const c=i(u),f=[];n(c).forEach(v=>{const d=o(v,1);d&&f.push(d)}),f.length&&s.push({value:u,label:e(c.title),children:f})}),s},[l])},D0=()=>{const{t:e}=jt(),r=[{label:e("Input"),value:"Input"},{label:e("Number"),value:"InputNumber"},{label:e("Date"),value:"DatePicker"},{label:e("Date range"),value:"DatePicker.RangePicker"},{label:e("Time"),value:"TimePicker"},{label:e("Time range"),value:"TimePicker.RangePicker"},{label:e("Select"),value:"Select"},{label:e("Radio group"),value:"Radio.Group"},{label:e("Checkbox group"),value:"Checkbox.Group"}];return{options:r,values:r.map(t=>t.value)}},qT=e=>{const{getCollection:r,getCollectionField:t}=z.useCollectionManager();return D.useMemo(()=>{var u;if(!e)return;const[n,...i]=e.split(".");if(!(i!=null&&i.length))return;const a=r(n);let o=n,l,s=mt.Schema.compile(a==null?void 0:a.title,{t:z.i18n.t});for(;o&&i.length>0;){const c=i.shift();l=t(`${o}.${c}`);const f=((u=l==null?void 0:l.uiSchema)==null?void 0:u.title)||(l==null?void 0:l.name);f&&(s+=` / ${mt.Schema.compile(f,{t:z.i18n.t})}`),l!=null&&l.target?o=l.target:o=null}return s},[e])},ZT=()=>{const e=mt.useField(),{operator:r,schema:t}=e.data||{},n=z.useUserVariable({collectionField:{uiSchema:t},uiSchema:t}),i=z.useDateVariable({operator:r,schema:t}),a=UT(),o=D.useMemo(()=>[n,i,a].filter(Boolean),[i,n,a]);return!r||!t?[]:o},_u=(e={},r={})=>yt(J({type:"array","x-decorator":"FormItem","x-component":"ArrayItems"},r),{items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:yt(J({sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"}},e),{remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}})}}},properties:{add:{type:"void",title:'{{t("Add field")}}',"x-component":"ArrayItems.Addition"}}}),QT=e=>({type:"void",properties:{config:{type:"object",properties:{chartType:{type:"string",title:'{{t("Chart type")}}',"x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Please select a chart type.")}}'},enum:"{{ chartTypes }}"},[na.uid()]:{type:"void",properties:{general:e}},[na.uid()]:{type:"void",properties:{advanced:{type:"json",title:'{{t("JSON config")}}',"x-decorator":"FormItem","x-decorator-props":{extra:Et("Same properties set in the form above will be overwritten by this JSON config.")},"x-component":"Input.JSON","x-component-props":{autoSize:{minRows:3}}}}},reference:{type:"string","x-reactions":{dependencies:[".chartType"],fulfill:{schema:{"x-content":"{{ getReference($deps[0]) }}"}}}}}}}}),KT={type:"void",properties:{settings:{type:"void",properties:{collection:{title:'{{t("Collection")}}',type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{options:"{{ collectionOptions }}",onChange:"{{ onCollectionChange }}",placeholder:'{{t("Collection")}}'}}}},query:{type:"object",properties:{builder:{type:"void",properties:{collapse:{type:"void","x-decorator":"FormItem","x-component":"FormCollapse","x-component-props":{formCollapse:"{{formCollapse}}"},properties:{pane1:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Et("Measures"),key:"measures"},properties:{measures:_u({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}',fieldNames:{label:"title",value:"name",children:"children"}},enum:"{{ fieldOptions }}",required:!0},aggregation:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Aggregation")}}'},enum:[{label:'{{t("Sum")}}',value:"sum"},{label:'{{t("Count")}}',value:"count"},{label:'{{t("Avg")}}',value:"avg"},{label:'{{t("Max")}}',value:"max"},{label:'{{t("Min")}}',value:"min"}]},alias:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Alias")}}',style:{minWidth:"100px"}}}},{required:!0,"x-component-props":{style:{overflow:"auto"}}})}},pane2:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Et("Dimensions"),key:"dimensions"},properties:{dimensions:_u({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}',fieldNames:{label:"title",value:"name",children:"children"}},enum:"{{ fieldOptions }}",required:!0},format:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Format")}}',style:{maxWidth:"120px"}},"x-reactions":"{{ useFormatterOptions }}","x-visible":"{{ $self.dataSource && $self.dataSource.length }}"},alias:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Alias")}}',style:{minWidth:"100px"}}}},{"x-component-props":{style:{overflow:"auto"}}})}},pane3:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Et("Filter"),key:"filter"},properties:{filter:{type:"object","x-decorator":"FormItem","x-decorator-props":{style:{overflow:"auto"}},enum:"{{ filterOptions }}","x-component":"Filter","x-component-props":{dynamicComponent:"FilterDynamicComponent"}}}},pane4:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Et("Sort"),key:"sort"},properties:{orders:_u({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}'},"x-reactions":"{{ useOrderOptions }}",required:!0},order:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{defaultValue:"ASC",optionType:"button",style:{width:"128px"}},enum:["ASC","DESC"]}},{"x-reactions":"{{ useOrderReaction }}","x-component-props":{style:{overflow:"auto"}}})}}}},limit:{title:'{{t("Limit")}}',type:"number","x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{defaultValue:2e3,min:1,style:{width:"100px"}}}}},cache:{type:"object",properties:{enabled:{type:"boolean",title:'{{t("Enable cache")}}',"x-decorator":"FormItem","x-component":"Switch"},ttl:{type:"number",title:'{{t("TTL (second)")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{defaultValue:60,min:1,style:{width:"100px"}}}}}}}}},JT={type:"void",properties:{transform:_u({field:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Field")}}',style:{maxWidth:"100px"}},"x-reactions":"{{ useChartFields }}"},type:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Type")}}'},"x-reactions":"{{ useFieldTypeOptions }}"},format:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Format")}}'},"x-reactions":"{{ useTransformers }}","x-visible":"{{ $self.dataSource && $self.dataSource.length }}"}},{"x-decorator-props":{style:{width:"50%"}}})}};function tI(e){const{value:r,onChange:t,renderSchemaComponent:n}=e,i=ZT();return R.jsx(z.Variable.Input,{value:r,onChange:t,scope:i,children:n()})}const Tn=D.createContext({visible:!0}),eI=e=>{var l;const{insertAdjacent:r}=z.useDesignable(),[t,n]=D.useState(!1),[i,a]=D.useState({}),{token:o}=gt.theme.useToken();return R.jsxs(Tn.Provider,{value:{visible:t,setVisible:n,current:i,setCurrent:a},children:[R.jsx("div",{className:ao.css`
|
|
2
2
|
.ant-card {
|
|
3
3
|
border: ${o.lineWidth}px ${o.lineType} ${o.colorBorderSecondary};
|
|
4
4
|
}
|
|
5
|
-
`,children:e.children}),R.jsx(F0,yt(J({},(l=i.field)==null?void 0:l.decoratorProps),{children:R.jsx($r,{insert:(s,u)=>r("beforeEnd",s,u)})}))]})},{Paragraph:I7,Text:rI}=gt.Typography,$r=e=>{const{t:r}=jt(),{service:t}=
|
|
6
|
-
`))||a.message,showIcon:!0}):R.jsx(gt.Table,{dataSource:i,scroll:{x:"max-content"},columns:Object.keys(i[0]||{}).map(c=>{const f=Vu(n,c.split("."));return{title:(f==null?void 0:f.label)||c,dataIndex:c,key:c}}),size:"small"})};const nI=()=>{const{t:e}=jt();return R.jsx(z.GeneralSchemaDesigner,{disableInitializer:!0,title:e("Filter"),children:R.jsx(z.SchemaSettingsRemove,{breakRemoveOn:{"x-component":"ChartV2Block"}})})},iI=()=>({type:"void","x-action":"filter","x-decorator":"ChartFilterBlockProvider","x-component":"CardItem","x-component-props":{size:"small"},"x-designer":"ChartFilterBlockDesigner",properties:{[na.uid()]:{type:"void","x-component":"ChartFilterForm",properties:{grid:{type:"void","x-component":"ChartFilterGrid","x-initializer":"ChartFilterItemInitializers",properties:{}},actions:{type:"void","x-initializer":"ChartFilterActionInitializers","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{float:"right",marginTop:8}},properties:{}}}}}}),aI=e=>{const{collapse:{collapsed:r}}=
|
|
5
|
+
`,children:e.children}),R.jsx(F0,yt(J({},(l=i.field)==null?void 0:l.decoratorProps),{children:R.jsx($r,{insert:(s,u)=>r("beforeEnd",s,u)})}))]})},{Paragraph:I7,Text:rI}=gt.Typography,$r=e=>{const{t:r}=jt(),{service:t}=D.useContext(kn),{visible:n,setVisible:i,current:a}=D.useContext(Tn),{schema:o,field:l,collection:s,initialValues:u}=a||{},{dn:c}=z.useDesignable(),{modal:f}=gt.App.useApp(),{insert:h}=e,v=E0(),d=ia(s),p=(k=!1)=>{var N;if(!M.modified)return;const P=(N=M.values.config)==null?void 0:N.chartType;if(!P)return;const O=v[P];if(!(O==null?void 0:O.init)){k&&(M.values.config.general={},M.values.config.advanced={});return}const W=M.values.query,q=oo(d,W),{general:L,advanced:H}=O.init(q,W);(L||k)&&(M.values.config.general=L),(H||k)&&(M.values.config.advanced=H||{})},[y,g]=D.useState([]),[m,x]=D.useState([]),w=(k,P)=>{var W,q;const O=((W=k.values.query)==null?void 0:W.measures.filter(L=>L.field))||[],V=((q=k.values.query)==null?void 0:q.dimensions.filter(L=>L.field))||[];He.isEqual(O,y)&&He.isEqual(V,m)||(P==null||P(),g(He.cloneDeep(O)),x(He.cloneDeep(V)))},C=wT(),M=D.useMemo(()=>on.createForm({values:yt(J({config:{chartType:C}},u||(l==null?void 0:l.decoratorProps)),{collection:s}),effects:k=>{on.onFieldChange("config.chartType",()=>p(!0)),on.onFormInit(()=>w(k))}}),[l,n,s]),A=()=>R.jsx(gt.Button,{type:"link",loading:t==null?void 0:t.loading,icon:R.jsx(ni.RightSquareOutlined,{}),onClick:()=>br(this,null,function*(){const k=M.query("query").take();try{yield k==null?void 0:k.validate()}catch(P){return}try{yield t.runAsync(s,M.values.query,!0)}catch(P){console.log(P)}w(M,p)}),children:r("Run query")}),b=D.useRef(null),T=D.useRef(null);return D.useEffect(()=>{var k;n&&t.run(s,(k=l==null?void 0:l.decoratorProps)==null?void 0:k.query,"configure")},[n]),R.jsx(gt.Modal,{title:r("Configure chart"),open:n,onOk:()=>{const{query:k,config:P,transform:O,mode:V}=M.values,W=()=>{var L;i(!1),(L=a.service)==null||L.run(s,k),b.current.scrollTop=0,T.current.scrollTop=0,t.mutate(void 0)},q={query:k,config:P,collection:s,transform:O,mode:V||"builder"};if(o&&o["x-uid"]){o["x-decorator-props"]=q,l.decoratorProps=q,l["x-acl-action"]=`${s}:list`,c.emit("patch",{schema:o}),W();return}h(z.gridRowColWrap(A0(q)),{onSuccess:W})},onCancel:()=>{f.confirm({title:r("Are you sure to cancel?"),content:r("You changes are not saved. If you click OK, your changes will be lost."),okButtonProps:{danger:!0},onOk:()=>{i(!1),b.current.scrollTop=0,T.current.scrollTop=0,t.mutate(void 0)}})},width:"95%",styles:{body:{background:"rgba(128, 128, 128, 0.08)"}},children:R.jsx(z.FormProvider,{form:M,children:R.jsx(Ie.FormLayout,{layout:"vertical",children:R.jsxs(gt.Row,{gutter:8,children:[R.jsx(gt.Col,{span:7,children:R.jsx(gt.Card,{style:{height:"calc(100vh - 300px)",overflow:"auto",margin:"12px 0 12px 12px"},ref:b,children:R.jsx(gt.Tabs,{tabBarExtraContent:R.jsx(A,{}),items:[{label:r("Query"),key:"query",children:R.jsx($r.Query,{})},{label:r("Data"),key:"data",children:R.jsx($r.Data,{})}]})})}),R.jsx(gt.Col,{span:6,children:R.jsx(gt.Card,{style:{height:"calc(100vh - 300px)",overflow:"auto",margin:"12px 3px 12px 3px"},ref:T,children:R.jsx(gt.Tabs,{items:[{label:r("Chart"),key:"chart",children:R.jsx($r.Config,{})},{label:r("Transform"),key:"transform",children:R.jsx($r.Transform,{})}]})})}),R.jsx(gt.Col,{span:11,children:R.jsx(gt.Card,{style:{margin:"12px 12px 12px 0"},children:R.jsx($r.Renderer,{})})})]})})})})};$r.Renderer=function(r){const{current:t}=D.useContext(Tn),{collection:n,data:i}=t||{},{service:a}=D.useContext(kn);return R.jsx(mt.FormConsumer,{children:o=>{const l=He.cloneDeep(o.values.config),s=He.cloneDeep(o.values.transform);return R.jsx(kn.Provider,{value:{collection:n,config:l,transform:s,service:a,data:i},children:R.jsx(kv,J({},r))})}})},$r.Query=function(){const{t:r}=jt(),t=ia(),n=bT(t),i=ET(),{current:a,setCurrent:o}=D.useContext(Tn),{collection:l}=a||{},s=z.useCollectionFieldsOptions(l,1),u=mt.Schema.compile(s,{t:r}),c=z.useCollectionFilterOptions(l),{service:f}=D.useContext(kn),h=p=>{const{schema:y,field:g}=a;o({schema:y,field:g,collection:p,service:a.service,initialValues:{},data:void 0}),f.mutate(void 0)},v=Ie.FormCollapse.createFormCollapse(["measures","dimensions","filter","sort"]),d=()=>R.jsxs(rI,{code:!0,children:["From ",R.jsx("span",{style:{color:"#1890ff"},children:a==null?void 0:a.collection})]});return R.jsx(z.SchemaComponent,{schema:KT,scope:{t:r,formCollapse:v,fieldOptions:u,filterOptions:c,useOrderOptions:kT(u,t),collectionOptions:i,useFormatterOptions:n,onCollectionChange:h,collection:a==null?void 0:a.collection,useOrderReaction:TT(u,t)},components:{ArrayItems:Ie.ArrayItems,Editable:Ie.Editable,FormCollapse:Ie.FormCollapse,FormItem:Ie.FormItem,Space:gt.Space,Switch:Ie.Switch,FromSql:d,FilterDynamicComponent:tI}})},$r.Config=function(){const{t:r}=jt(),t=b0(),n=ia(),i=E0(),a=k0(n),o=l=>{var f,h;const s=(h=(f=i[l])==null?void 0:f.getReference)==null?void 0:h.call(f);if(!s)return"";const{title:u,link:c}=s;return R.jsxs("span",{children:[r("Config reference: "),R.jsx("a",{href:c,target:"_blank",rel:"noreferrer",children:r(u)})]})};return R.jsx(mt.FormConsumer,{children:l=>{var f;const s=(f=l.values.config)==null?void 0:f.chartType,u=i[s],c=(u==null?void 0:u.schema)||{};return R.jsx(z.SchemaComponent,{schema:QT(c),scope:{t:r,chartTypes:t,useChartFields:a,getReference:o},components:{FormItem:Ie.FormItem,ArrayItems:Ie.ArrayItems,Space:gt.Space,AutoComplete:z.AutoComplete}})}})},$r.Transform=function(){const{t:r}=jt(),t=ia(),n=IT(t),i=k0(t);return R.jsx(z.SchemaComponent,{schema:JT,components:{FormItem:Ie.FormItem,ArrayItems:Ie.ArrayItems,Space:gt.Space},scope:{useChartFields:i,useFieldTypeOptions:n,useTransformers:PT,t:r}})},$r.Data=function(){var o,l,s,u;const{service:r}=D.useContext(kn),{current:t}=D.useContext(Tn),n=ia(),i=T0(t==null?void 0:t.data),a=r==null?void 0:r.error;return a?R.jsx(gt.Alert,{message:"Error",type:"error",description:((u=(s=(l=(o=a==null?void 0:a.response)==null?void 0:o.data)==null?void 0:l.errors)==null?void 0:s.map)==null?void 0:u.call(s,c=>c.message).join(`
|
|
6
|
+
`))||a.message,showIcon:!0}):R.jsx(gt.Table,{dataSource:i.map((c,f)=>yt(J({},c),{_key:f})),rowKey:"_key",scroll:{x:"max-content"},columns:Object.keys(i[0]||{}).map(c=>{const f=Vu(n,c.split("."));return{title:(f==null?void 0:f.label)||c,dataIndex:c,key:c}}),size:"small"})};const nI=()=>{const{t:e}=jt();return R.jsx(z.GeneralSchemaDesigner,{disableInitializer:!0,title:e("Filter"),children:R.jsx(z.SchemaSettingsRemove,{breakRemoveOn:{"x-component":"ChartV2Block"}})})},iI=()=>({type:"void","x-action":"filter","x-decorator":"ChartFilterBlockProvider","x-component":"CardItem","x-component-props":{size:"small"},"x-designer":"ChartFilterBlockDesigner",properties:{[na.uid()]:{type:"void","x-component":"ChartFilterForm",properties:{grid:{type:"void","x-component":"ChartFilterGrid","x-initializer":"ChartFilterItemInitializers",properties:{}},actions:{type:"void","x-initializer":"ChartFilterActionInitializers","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{float:"right",marginTop:8}},properties:{}}}}}}),aI=e=>{const{collapse:{collapsed:r}}=D.useContext(_r),{token:t}=gt.theme.useToken();return R.jsx("div",{className:ao.css`
|
|
7
7
|
.ant-nb-grid {
|
|
8
8
|
overflow: hidden;
|
|
9
9
|
height: ${r?`${t.controlHeight*2}px`:"auto"};
|
|
10
10
|
}
|
|
11
|
-
`,children:R.jsx(z.Grid,yt(J({},e),{children:e.children}))})},oI=()=>{var u;const{insertAdjacent:e}=z.useDesignable(),{setEnabled:r}=
|
|
12
|
-
`).join("<br/>")}}):r.description,[r.description]),a=
|
|
11
|
+
`,children:R.jsx(z.Grid,yt(J({},e),{children:e.children}))})},oI=()=>{var u;const{insertAdjacent:e}=z.useDesignable(),{setEnabled:r}=D.useContext(_r),t=z.useSchemaInitializerItem(),{remove:n,disabled:i}=t,a="x-action",o=iI(),{exists:l,remove:s}=z.useCurrentSchema((o==null?void 0:o[a])||((u=t==null?void 0:t.schema)==null?void 0:u[a]),a,t.find,n||t.remove);return R.jsx(z.SchemaInitializerSwitch,{icon:R.jsx(ni.FilterOutlined,{}),checked:l,disabled:i,title:t.title,onClick:()=>{var f;if(i)return;if(l)return r(!1),s();const c=na.merge(o||{},t.schema||{});(f=t==null?void 0:t.schemaInitialize)==null||f.call(t,c),e("afterBegin",z.gridRowColWrap(c)),r(!0)}})},lI=()=>({title:'{{t("Options")}}',type:"array","x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"object","x-decorator":"ArrayItems.Item",properties:{space:{type:"void","x-component":"Space",properties:{label:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Option label")}}'},required:!0},value:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Option value")}}'},required:!0},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:"Add","x-component":"ArrayItems.Addition"}}}),Pv=e=>{const r={type:"boolean","x-content":'{{ t("Show time") }}',"x-decorator":"FormItem","x-component":"Checkbox"},t={type:"string",title:'{{t("Date format")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"YYYY-MM-DD",enum:[{label:'{{t("Year/Month/Day")}}',value:"YYYY/MM/DD"},{label:'{{t("Year-Month-Day")}}',value:"YYYY-MM-DD"},{label:'{{t("Day/Month/Year")}}',value:"DD/MM/YYYY"}]},n=lI();return{DatePicker:{type:"object",properties:{dateFormat:t,showTime:r}},"DatePicker.RangePicker":{type:"object",properties:{dateFormat:t,showTime:r}},Select:{type:"object",properties:{mode:{type:"string",enum:[{label:'{{ t("Single select") }}',value:""},{label:'{{ t("Multiple select") }}',value:"multiple"}],"x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{defaultValue:""}},options:n}},"Checkbox.Group":{type:"object",properties:{options:n}},"Radio.Group":{type:"object",properties:{options:n}}}[e]},sI=(e,r)=>{if(!e)return e;if(Ce.isDayjs(e))return r.showTime||(e=e.startOf("day")),bl.moment2str(e,r);if(Array.isArray(e)&&e.length&&Ce.isDayjs(e[0])){let t=e[0],n=e[1];return r.showTime&&(t=t.startOf("day"),n=n.endOf("day")),[bl.moment2str(t,r),bl.moment2str(n,r)]}return e},B0=(e,r)=>br(this,null,function*(){const t=e.initialValue;if(!(typeof t=="string"&&(t==null?void 0:t.startsWith("{{$"))&&(t==null?void 0:t.endsWith("}}")))||!r)e.setValue(t),e.setInitialValue(t);else{e.loading=!0;const i=yield r.parseVariable(t),a=sI(i,e.componentProps);e.setValue(a),e.setInitialValue(a),e.loading=!1}}),{Paragraph:uI,Text:cI}=gt.Typography,fI=mt.observer(e=>{const r=mt.useForm(),t=Pv(r.values.component);return t?R.jsx(z.SchemaComponent,J({schema:t},e)):null}),hI=({error:e})=>R.jsx(uI,{copyable:!0,children:R.jsx(cI,{type:"danger",style:{whiteSpace:"pre-line",textAlign:"center",padding:"5px"},children:e.message})}),vI=mt.observer(e=>{var o,l;const r=mt.useField(),n=(l=(o=mt.useFieldSchema()["x-decorator-props"])==null?void 0:o.showTitle)!=null?l:!0,i=D.useMemo(()=>typeof r.description=="string"?R.jsx("div",{dangerouslySetInnerHTML:{__html:z.HTMLEncode(r.description).split(`
|
|
12
|
+
`).join("<br/>")}}):r.description,[r.description]),a=D.useMemo(()=>ao.cx(ao.css`
|
|
13
13
|
& .ant-space {
|
|
14
14
|
flex-wrap: wrap;
|
|
15
15
|
}
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
> .ant-formily-item-label {
|
|
18
18
|
display: none;
|
|
19
19
|
}
|
|
20
|
-
`]:n===!1}),[n]);return R.jsx(z.ACLCollectionFieldProvider,{children:R.jsx(z.BlockItem,{className:"nb-form-item",children:R.jsx(M0,{onError:s=>console.log(s),FallbackComponent:hI,children:R.jsx(Ie.FormItem,yt(J({className:a},e),{extra:i}))})})})},{displayName:"ChartFilterFormItem"}),dI=e=>{const{locale:r}=B.useContext(gt.ConfigProvider.ConfigContext),{t}=jt(),n=ln.useMemoizedFn(t),{scope:i,components:a}=B.useContext(mt.SchemaOptionsContext),{theme:o}=z.useGlobalTheme(),{insert:l}=e,s=z.useSchemaInitializerItem(),{getCollectionJoinField:u,getInterface:c}=z.useCollectionManager(),f=O0(),{options:h,values:v}=D0(),d=B.useCallback(()=>br(this,null,function*(){var C,M;const p=yield z.FormDialog(n("Add custom field"),()=>R.jsx(z.SchemaComponentOptions,{scope:yt(J({},i),{useChartFilterSourceFields:O0}),components:yt(J({},a),{FieldComponentProps:fI}),children:R.jsxs(Ie.FormLayout,{layout:"vertical",children:[R.jsx(gt.Alert,{type:"info",message:n('To filter with custom fields, use "Current filter" variables in the chart configuration.'),style:{marginBottom:16}}),R.jsx(gt.ConfigProvider,{locale:r,children:R.jsx(z.SchemaComponent,{schema:{properties:{name:{type:"string",required:!0},title:{type:"string",title:n("Field title"),"x-component":"Input","x-decorator":"FormItem",required:!0},source:{type:"string",title:n("Field source"),"x-decorator":"FormItem","x-component":"Cascader",enum:f,description:n("Select a source field to use metadata of the field")},component:{type:"string",title:n("Field component"),"x-component":"Select","x-decorator":"FormItem",required:!0,enum:h},props:{type:"object",title:n("Component properties"),"x-component":"FieldComponentProps"}}}})})]})}),o).open({values:{name:`f_${na.uid()}`},effects(){on.onFieldValueChange("source",A=>{var V;const b=(V=A.value)==null?void 0:V.join("."),T=u(b);if(!T)return;const k=T.uiSchema||{};let P;if(v.includes(k["x-component"])){P=k["x-component"];const W=k["x-component-props"]||{};k.enum&&(W.options=k.enum),A.query(".props").take().setValue(W)}else v.includes(T.interface)&&(P=T.interface);if(!P)return;A.query(".component").take().setValue(P)})}}),{name:y,title:g,component:m,props:x}=p,w=((M=(C=c(m))==null?void 0:C.default)==null?void 0:M.uiSchema)||{};l(z.gridRowColWrap(yt(J({"x-component":m},w),{type:"string",title:g,name:`custom.${y}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-decorator":"ChartFilterFormItem","x-component-props":J(J({},w["x-component-props"]||{}),x)})))}),[o]);return R.jsx(z.SchemaInitializerItem,yt(J(J({},s),e),{onClick:d}))},pI=new z.SchemaInitializer({name:"ChartFilterItemInitializers","data-testid":"configure-fields-button-of-chart-filter-item",wrap:z.gridRowColWrap,icon:"SettingOutlined",title:'{{ t("Configure fields") }}',items:[{type:"itemGroup",name:"displayFields",title:'{{ t("Display fields") }}',useChildren:()=>{const{getCollection:e}=z.useCollectionManager(),{getChartCollections:r}=L0(),{getChartFilterFields:t}=so();return r().map(i=>{const a=e(i),o=t(a);return{name:a.key,type:"subMenu",title:a.title,children:o}})}},{name:"divider",type:"divider"},{name:"custom",type:"item",title:Et("Custom"),Component:()=>{const{insertAdjacent:e}=z.useDesignable();return R.jsx(dI,{insert:r=>e("beforeEnd",r)})}}]}),gI=()=>{const{filter:e}=so();return{onClick:e}},yI=()=>{const e=mt.useForm(),{filter:r}=so();return{onClick:()=>br(this,null,function*(){e.reset(),yield r()})}},mI=()=>{const{collapse:{collapsed:e},setCollapse:r}=B.useContext(_r),{t}=jt();return{onClick:()=>r({collapsed:!e}),title:R.jsxs(R.Fragment,{children:[R.jsx(ni.DownOutlined,{rotate:e?0:180})," ",t(e?"Expand":"Collapse")]})}},xI=e=>{const{t:r}=jt();return R.jsx(z.GeneralSchemaDesigner,yt(J({},e),{disableInitializer:!0,children:R.jsx(z.SchemaSettingsRemove,{breakRemoveOn:t=>t["x-component"]==="Space"||t["x-component"].endsWith("ActionBar"),confirm:{title:r("Delete action")}})}))},wI=e=>{const i=e,{buttonEditorProps:r}=i,t=uT(i,["buttonEditorProps"]),{t:n}=jt();return R.jsxs(z.GeneralSchemaDesigner,yt(J({},t),{disableInitializer:!0,children:[R.jsx(z.Action.Designer.ButtonEditor,J({},r)),R.jsx(z.SchemaSettingsDivider,{}),R.jsx(z.SchemaSettingsRemove,{breakRemoveOn:a=>a["x-component"]==="Space"||a["x-component"].endsWith("ActionBar"),confirm:{title:n("Delete action")}})]}))},SI=e=>{const r={title:'{{ t("Filter") }}',"x-action":"submit","x-component":"Action","x-designer":"ChartFilterActionDesigner","x-component-props":{type:"primary",useProps:"{{ useChartFilterActionProps }}"}};return R.jsx(z.ActionInitializer,yt(J({},e),{schema:r}))},CI=e=>{const r={title:'{{ t("Reset") }}',"x-action":"reset","x-component":"Action","x-designer":"ChartFilterActionDesigner","x-component-props":{useProps:"{{ useChartFilterResetProps }}"}};return R.jsx(z.ActionInitializer,yt(J({},e),{schema:r}))},MI=e=>{const r={title:'{{ t("Collapse") }}',"x-action":"collapse","x-component":"Action","x-component-props":{type:"link",useProps:"{{ useChartFilterCollapseProps }}"},"x-designer":"ChartFilterCollapseDesigner"};return R.jsx(z.ActionInitializer,yt(J({},e),{schema:r}))},AI=new z.SchemaInitializer({name:"ChartFilterActionInitializers","data-testid":"configure-actions-button-of-chart-filter",title:'{{t("Configure actions")}}',icon:"SettingOutlined",items:[{name:"enbaleActions",type:"itemGroup",title:'{{t("Enable actions")}}',children:[{name:"filter",type:"item",title:'{{t("Filter")}}',component:SI,schema:{"x-action-settings":{}}},{name:"reset",type:"item",title:'{{t("Reset")}}',component:CI,schema:{"x-action-settings":{}}},{name:"collapse",type:"item",title:'{{t("Collapse")}}',component:MI,schema:{"x-action-settings":{}}}]}]}),FI=e=>{var c;const{value:r,onChange:t,fieldSchema:n}=e,i=z.useUserVariable({collectionField:{uiSchema:n},uiSchema:n}),a=z.useDateVariable({operator:(c=n["x-component-props"])==null?void 0:c["filter-operator"],schema:n,noDisabled:!0}),o=B.useMemo(()=>[i,a].filter(Boolean),[a,i]),l=yt(J({},n),{"x-component":n["x-component"]||"Input","x-decorator":"",title:"",name:"value",default:""}),s=n["x-component-props"]||{},u=ln.useMemoizedFn(t);return B.useEffect(()=>{n.default&&u({value:n.default})},[n.default,u]),R.jsx(z.VariableScopeProvider,{scope:o,children:R.jsx(z.VariableInput,yt(J({},s),{renderSchemaComponent:()=>R.jsx(z.SchemaComponent,{schema:l}),fieldNames:{},value:r==null?void 0:r.value,scope:o,onChange:f=>{t({value:f})},shouldChange:z.getShouldChange({})}))})},{Text:bI}=gt.Typography,EI=()=>{const e=mt.useField(),r=mt.useFieldSchema(),{t}=jt(),{dn:n}=z.useDesignable(),{setField:i}=B.useContext(_r);return R.jsx(z.SchemaSettingsModalItem,{title:t("Edit field title"),schema:{type:"object",title:t("Edit field title"),properties:{title:{title:t("Field title"),default:e==null?void 0:e.title,required:!0,"x-decorator":"FormItem","x-component":"Input","x-component-props":{}}}},onSubmit:({title:a})=>{a&&(e.title=a,r.title=a,n.emit("patch",{schema:{"x-uid":r["x-uid"],title:r.title}}),i(r.name,{title:a})),n.refresh()}},"edit-field-title")},kI=()=>{var y,g,m,x;const e=z.useCompile(),r=mt.useFieldSchema(),t=r.name,n=mt.useField(),{t:i}=jt(),{dn:a}=z.useDesignable(),{setField:o}=B.useContext(_r),{getInterface:l,getCollectionJoinField:s}=z.useCollectionManager(),u=w=>{var b;let C=w==null?void 0:w.interface;C==="formula"&&(C=gT(w.dataType)||w.dataType);const M=l(C);return{operatorList:((b=M==null?void 0:M.filterable)==null?void 0:b.operators)||[],interfaceConfig:M}};let c=s(t),{operatorList:f,interfaceConfig:h}=u(c);if(!f.length){const w=t.split("."),C=w.pop();if(c=s(w.join(".")),!c)return null;const M=u(c);if(f=M.operatorList,h=M.interfaceConfig,!h)return null;const b=((h==null?void 0:h.filterable.children)||[]).find(T=>T.name===C);f=(b==null?void 0:b.operators)||[]}if(!f.length)return null;const v=((g=(y=h==null?void 0:h.default)==null?void 0:y.uiSchema)==null?void 0:g["x-component"])||"Input",d=(m=r["x-component-props"])==null?void 0:m["filter-operator"],p=(w,C,M={})=>{const A=n.componentProps||{};n.component=C,n.componentProps=J(yt(J({},A),{"filter-operator":w}),M),r["x-component"]=C,r["x-component-props"]=J(yt(J({},r["x-component-props"]),{"filter-operator":w}),M),a.emit("patch",{schema:{"x-uid":r["x-uid"],"x-component":C,"x-component-props":J(yt(J({},r["x-component-props"]),{"filter-operator":w}),M)}})};return R.jsx(z.SchemaSettingsSelectItem,{title:i("Operator"),value:(d==null?void 0:d.value)||((x=f[0])==null?void 0:x.value),options:e(f),onChange:w=>{var M;const C=f.find(A=>A.value===w);C.noValue?p(C,"ChartFilterCheckbox",{content:mt.Schema.compile(C.label,{t:i})}):(M=C.schema)!=null&&M["x-component"]?p(C,C.schema["x-component"]):p(C,v),o(t,{operator:C}),a.refresh()}},"operator")},TI=()=>{const{t:e}=jt(),{dn:r}=z.useDesignable(),t=mt.useField(),n=mt.useFieldSchema(),i=Pv(n["x-component"]);return R.jsx(z.SchemaSettingsModalItem,{title:e("Edit field properties"),schema:J({title:e("Edit field properties")},i),initialValues:t.componentProps,onSubmit:a=>{t.reset(),t.componentProps=a,n["x-component-props"]=a,r.emit("patch",{schema:{"x-uid":n["x-uid"],"x-component-props":a}}),r.refresh()}},"edit-field-props")},II=()=>{const{t:e}=jt(),{dn:r}=z.useDesignable(),t=B.useContext(z.VariablesContext),n=mt.useField(),i=mt.useFieldSchema(),{getTranslatedTitle:a}=so(),o=a(i.title);return R.jsx(z.SchemaSettingsModalItem,{title:e("Set default value"),components:{ChartFilterVariableInput:FI},schema:{type:"void",title:e("Set default value"),properties:{default:{title:o,"x-decorator":"FormItem","x-component":"ChartFilterVariableInput","x-component-props":{fieldSchema:i}}}},onSubmit:({default:{value:l}})=>{n.setInitialValue(l),i.default=l,r.emit("patch",{schema:{"x-uid":i["x-uid"],default:l}}),r.refresh(),B0(n,t)}},"set field default value")},PI=()=>{var f,h,v;const{getCollectionFields:e,getCollectionJoinField:r,getInterface:t}=z.useCollectionManager(),n=mt.useField(),i=mt.useFieldSchema(),{t:a}=jt(),{dn:o}=z.useDesignable(),l=z.useCompile(),s=r(i["x-collection-field"]),c=(s!=null&&s.target?e(s==null?void 0:s.target):(f=e(s==null?void 0:s.targetCollection))!=null?f:[]).filter(d=>{if(d!=null&&d.target||d.type==="boolean")return!1;const p=t(d==null?void 0:d.interface);return p==null?void 0:p.titleUsable}).map(d=>{var p;return{value:d==null?void 0:d.name,label:l((p=d==null?void 0:d.uiSchema)==null?void 0:p.title)||(d==null?void 0:d.name)}});return c.length>0&&i["x-component"]==="CollectionField"?R.jsx(z.SchemaSettingsSelectItem,{title:a("Title field"),options:c,value:(v=(h=n==null?void 0:n.componentProps)==null?void 0:h.fieldNames)==null?void 0:v.label,onChange:d=>{var g,m;const p={"x-uid":i["x-uid"]},y=yt(J(J({},(m=(g=s==null?void 0:s.uiSchema)==null?void 0:g["x-component-props"])==null?void 0:m.fieldNames),n.componentProps.fieldNames),{label:d});i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].fieldNames=y,p["x-component-props"]=i["x-component-props"],n.componentProps.fieldNames=i["x-component-props"].fieldNames,o.emit("patch",{schema:p}),o.refresh()}},"title-field"):null},LI=()=>{const{getCollectionJoinField:e}=z.useCollectionManager(),{getField:r}=z.useCollection(),{t}=jt(),n=mt.useFieldSchema(),i=n.name,a=r(i)||e(n["x-collection-field"]),o=i.startsWith("custom."),l=Pv(n["x-component"]),s=qT(i);return R.jsxs(z.GeneralSchemaDesigner,{disableInitializer:!0,children:[!o&&R.jsxs(R.Fragment,{children:[R.jsx(z.SchemaSettingsItem,{title:i,children:R.jsxs(bI,{type:"secondary",children:[t("Original field"),": ",s]})}),R.jsx(z.SchemaSettingsDivider,{})]}),R.jsx(EI,{}),R.jsx(z.EditDescription,{}),l&&o&&R.jsx(TI,{}),!o&&R.jsx(kI,{}),R.jsx(PI,{}),R.jsx(II,{}),a?R.jsx(z.SchemaSettingsDivider,{}):null,R.jsx(z.SchemaSettingsRemove,{confirm:{title:t("Delete field")},breakRemoveOn:{"x-component":"Grid"}},"remove")]})},OI=mt.connect(e=>{const{content:r}=e,t=mt.useField(),n=()=>{t.setValue(!t.value)};return R.jsx(gt.Checkbox,{onClick:n,checked:t.value,children:r})}),DI=B.memo(e=>{const{setField:r,removeField:t,setForm:n}=B.useContext(_r),{getTranslatedTitle:i}=so(),a=B.useRef(null);a.current=B.useContext(z.VariablesContext);const o=B.useMemo(()=>on.createForm({effects(){const l=s=>{if(s.displayName!=="Field")return null;const{name:u}=s.props||{};return u};on.onFieldInit("*",s=>{l(s)&&s.setValue(null)}),on.onFieldMount("*",s=>br(this,null,function*(){const u=l(s);u&&(r(u,{title:s.title,operator:s.componentProps["filter-operator"]}),s.title.includes("/")&&(s.title=i(s.title)),B0(s,a.current))})),on.onFieldUnmount("*",s=>{const u=l(s);u&&t(u)})}}),[r,i,t,a]);return B.useEffect(()=>n(o),[o,n]),R.jsx(z.FormV2,yt(J({},e),{form:o}))}),BI=e=>{const{t:r}=jt(),{setEnabled:t}=B.useContext(_r);return B.useEffect(()=>{t(!0)},[t]),R.jsx("div",{className:ao.css`
|
|
20
|
+
`]:n===!1}),[n]);return R.jsx(z.ACLCollectionFieldProvider,{children:R.jsx(z.BlockItem,{className:"nb-form-item",children:R.jsx(M0,{onError:s=>console.log(s),FallbackComponent:hI,children:R.jsx(Ie.FormItem,yt(J({className:a},e),{extra:i}))})})})},{displayName:"ChartFilterFormItem"}),dI=D.memo(e=>{const{locale:r}=D.useContext(gt.ConfigProvider.ConfigContext),{t}=jt(),n=ln.useMemoizedFn(t),{scope:i,components:a}=D.useContext(mt.SchemaOptionsContext),{theme:o}=z.useGlobalTheme(),{insert:l}=e,s=z.useSchemaInitializerItem(),{getCollectionJoinField:u,getInterface:c}=z.useCollectionManager(),f=O0(),{options:h,values:v}=D0(),d=D.useCallback(()=>br(this,null,function*(){var C,M;const p=yield z.FormDialog(n("Add custom field"),()=>R.jsx(z.SchemaComponentOptions,{scope:yt(J({},i),{useChartFilterSourceFields:O0}),components:yt(J({},a),{FieldComponentProps:fI}),children:R.jsxs(Ie.FormLayout,{layout:"vertical",children:[R.jsx(gt.Alert,{type:"info",message:n('To filter with custom fields, use "Current filter" variables in the chart configuration.'),style:{marginBottom:16}}),R.jsx(gt.ConfigProvider,{locale:r,children:R.jsx(z.SchemaComponent,{schema:{properties:{name:{type:"string",required:!0},title:{type:"string",title:n("Field title"),"x-component":"Input","x-decorator":"FormItem",required:!0},source:{type:"string",title:n("Field source"),"x-decorator":"FormItem","x-component":"Cascader",enum:f,description:n("Select a source field to use metadata of the field")},component:{type:"string",title:n("Field component"),"x-component":"Select","x-decorator":"FormItem",required:!0,enum:h},props:{type:"object",title:n("Component properties"),"x-component":"FieldComponentProps"}}}})})]})}),o).open({values:{name:`f_${na.uid()}`},effects(){on.onFieldValueChange("source",A=>{var V;const b=(V=A.value)==null?void 0:V.join("."),T=u(b);if(!T)return;const k=T.uiSchema||{};let P;if(v.includes(k["x-component"])){P=k["x-component"];const W=k["x-component-props"]||{};k.enum&&(W.options=k.enum),A.query(".props").take().setValue(W)}else v.includes(T.interface)&&(P=T.interface);if(!P)return;A.query(".component").take().setValue(P)})}}),{name:y,title:g,component:m,props:x}=p,w=((M=(C=c(m))==null?void 0:C.default)==null?void 0:M.uiSchema)||{};l(z.gridRowColWrap(yt(J({"x-component":m},w),{type:"string",title:g,name:`custom.${y}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-decorator":"ChartFilterFormItem","x-component-props":J(J({},w["x-component-props"]||{}),x)})))}),[o]);return R.jsx(z.SchemaInitializerItem,yt(J(J({},s),e),{onClick:d}))}),pI=new z.SchemaInitializer({name:"ChartFilterItemInitializers","data-testid":"configure-fields-button-of-chart-filter-item",wrap:z.gridRowColWrap,icon:"SettingOutlined",title:'{{ t("Configure fields") }}',items:[{type:"itemGroup",name:"displayFields",title:'{{ t("Display fields") }}',useChildren:()=>{const{getCollection:e}=z.useCollectionManager(),{getChartCollections:r}=L0(),{getChartFilterFields:t}=so(),n=r();return D.useMemo(()=>n.map(i=>{const a=e(i),o=t(a);return{name:a.key,type:"subMenu",title:a.title,children:o}}),[n])}},{name:"divider",type:"divider"},{name:"custom",type:"item",title:Et("Custom"),Component:()=>{const{insertAdjacent:e}=z.useDesignable();return R.jsx(dI,{insert:r=>e("beforeEnd",r)})}}]}),gI=()=>{const{filter:e}=so();return{onClick:e}},yI=()=>{const e=mt.useForm(),{filter:r}=so();return{onClick:()=>br(this,null,function*(){e.reset(),yield r()})}},mI=()=>{const{collapse:{collapsed:e},setCollapse:r}=D.useContext(_r),{t}=jt();return{onClick:()=>r({collapsed:!e}),title:R.jsxs(R.Fragment,{children:[R.jsx(ni.DownOutlined,{rotate:e?0:180})," ",t(e?"Expand":"Collapse")]})}},xI=e=>{const{t:r}=jt();return R.jsx(z.GeneralSchemaDesigner,yt(J({},e),{disableInitializer:!0,children:R.jsx(z.SchemaSettingsRemove,{breakRemoveOn:t=>t["x-component"]==="Space"||t["x-component"].endsWith("ActionBar"),confirm:{title:r("Delete action")}})}))},wI=e=>{const i=e,{buttonEditorProps:r}=i,t=uT(i,["buttonEditorProps"]),{t:n}=jt();return R.jsxs(z.GeneralSchemaDesigner,yt(J({},t),{disableInitializer:!0,children:[R.jsx(z.Action.Designer.ButtonEditor,J({},r)),R.jsx(z.SchemaSettingsDivider,{}),R.jsx(z.SchemaSettingsRemove,{breakRemoveOn:a=>a["x-component"]==="Space"||a["x-component"].endsWith("ActionBar"),confirm:{title:n("Delete action")}})]}))},SI=e=>{const r={title:'{{ t("Filter") }}',"x-action":"submit","x-component":"Action","x-designer":"ChartFilterActionDesigner","x-component-props":{type:"primary",useProps:"{{ useChartFilterActionProps }}"}};return R.jsx(z.ActionInitializer,yt(J({},e),{schema:r}))},CI=e=>{const r={title:'{{ t("Reset") }}',"x-action":"reset","x-component":"Action","x-designer":"ChartFilterActionDesigner","x-component-props":{useProps:"{{ useChartFilterResetProps }}"}};return R.jsx(z.ActionInitializer,yt(J({},e),{schema:r}))},MI=e=>{const r={title:'{{ t("Collapse") }}',"x-action":"collapse","x-component":"Action","x-component-props":{type:"link",useProps:"{{ useChartFilterCollapseProps }}"},"x-designer":"ChartFilterCollapseDesigner"};return R.jsx(z.ActionInitializer,yt(J({},e),{schema:r}))},AI=new z.SchemaInitializer({name:"ChartFilterActionInitializers","data-testid":"configure-actions-button-of-chart-filter",title:'{{t("Configure actions")}}',icon:"SettingOutlined",items:[{name:"enbaleActions",type:"itemGroup",title:'{{t("Enable actions")}}',children:[{name:"filter",type:"item",title:'{{t("Filter")}}',component:SI,schema:{"x-action-settings":{}}},{name:"reset",type:"item",title:'{{t("Reset")}}',component:CI,schema:{"x-action-settings":{}}},{name:"collapse",type:"item",title:'{{t("Collapse")}}',component:MI,schema:{"x-action-settings":{}}}]}]}),FI=e=>{var c;const{value:r,onChange:t,fieldSchema:n}=e,i=z.useUserVariable({collectionField:{uiSchema:n},uiSchema:n}),a=z.useDateVariable({operator:(c=n["x-component-props"])==null?void 0:c["filter-operator"],schema:n,noDisabled:!0}),o=D.useMemo(()=>[i,a].filter(Boolean),[a,i]),l=yt(J({},n),{"x-component":n["x-component"]||"Input","x-decorator":"",title:"",name:"value",default:""}),s=n["x-component-props"]||{},u=ln.useMemoizedFn(t);return D.useEffect(()=>{n.default&&u({value:n.default})},[n.default,u]),R.jsx(z.VariableScopeProvider,{scope:o,children:R.jsx(z.VariableInput,yt(J({},s),{renderSchemaComponent:()=>R.jsx(z.SchemaComponent,{schema:l}),fieldNames:{},value:r==null?void 0:r.value,scope:o,onChange:f=>{t({value:f})},shouldChange:z.getShouldChange({})}))})},{Text:bI}=gt.Typography,EI=()=>{const e=mt.useField(),r=mt.useFieldSchema(),{t}=jt(),{dn:n}=z.useDesignable(),{setField:i}=D.useContext(_r);return R.jsx(z.SchemaSettingsModalItem,{title:t("Edit field title"),schema:{type:"object",title:t("Edit field title"),properties:{title:{title:t("Field title"),default:e==null?void 0:e.title,required:!0,"x-decorator":"FormItem","x-component":"Input","x-component-props":{}}}},onSubmit:({title:a})=>{a&&(e.title=a,r.title=a,n.emit("patch",{schema:{"x-uid":r["x-uid"],title:r.title}}),i(r.name,{title:a})),n.refresh()}},"edit-field-title")},kI=()=>{var y,g,m,x;const e=z.useCompile(),r=mt.useFieldSchema(),t=r.name,n=mt.useField(),{t:i}=jt(),{dn:a}=z.useDesignable(),{setField:o}=D.useContext(_r),{getInterface:l,getCollectionJoinField:s}=z.useCollectionManager(),u=w=>{var b;let C=w==null?void 0:w.interface;C==="formula"&&(C=gT(w.dataType)||w.dataType);const M=l(C);return{operatorList:((b=M==null?void 0:M.filterable)==null?void 0:b.operators)||[],interfaceConfig:M}};let c=s(t),{operatorList:f,interfaceConfig:h}=u(c);if(!f.length){const w=t.split("."),C=w.pop();if(c=s(w.join(".")),!c)return null;const M=u(c);if(f=M.operatorList,h=M.interfaceConfig,!h)return null;const b=((h==null?void 0:h.filterable.children)||[]).find(T=>T.name===C);f=(b==null?void 0:b.operators)||[]}if(!f.length)return null;const v=((g=(y=h==null?void 0:h.default)==null?void 0:y.uiSchema)==null?void 0:g["x-component"])||"Input",d=(m=r["x-component-props"])==null?void 0:m["filter-operator"],p=(w,C,M={})=>{const A=n.componentProps||{};n.component=C,n.componentProps=J(yt(J({},A),{"filter-operator":w}),M),r["x-component"]=C,r["x-component-props"]=J(yt(J({},r["x-component-props"]),{"filter-operator":w}),M),a.emit("patch",{schema:{"x-uid":r["x-uid"],"x-component":C,"x-component-props":J(yt(J({},r["x-component-props"]),{"filter-operator":w}),M)}})};return R.jsx(z.SchemaSettingsSelectItem,{title:i("Operator"),value:(d==null?void 0:d.value)||((x=f[0])==null?void 0:x.value),options:e(f),onChange:w=>{var M;const C=f.find(A=>A.value===w);C.noValue?p(C,"ChartFilterCheckbox",{content:mt.Schema.compile(C.label,{t:i})}):(M=C.schema)!=null&&M["x-component"]?p(C,C.schema["x-component"]):p(C,v),o(t,{operator:C}),a.refresh()}},"operator")},TI=()=>{const{t:e}=jt(),{dn:r}=z.useDesignable(),t=mt.useField(),n=mt.useFieldSchema(),i=Pv(n["x-component"]);return R.jsx(z.SchemaSettingsModalItem,{title:e("Edit field properties"),schema:J({title:e("Edit field properties")},i),initialValues:t.componentProps,onSubmit:a=>{t.reset(),t.componentProps=a,n["x-component-props"]=a,r.emit("patch",{schema:{"x-uid":n["x-uid"],"x-component-props":a}}),r.refresh()}},"edit-field-props")},II=()=>{const{t:e}=jt(),{dn:r}=z.useDesignable(),t=D.useContext(z.VariablesContext),n=mt.useField(),i=mt.useFieldSchema(),{getTranslatedTitle:a}=so(),o=a(i.title);return R.jsx(z.SchemaSettingsModalItem,{title:e("Set default value"),components:{ChartFilterVariableInput:FI},schema:{type:"void",title:e("Set default value"),properties:{default:{title:o,"x-decorator":"FormItem","x-component":"ChartFilterVariableInput","x-component-props":{fieldSchema:i}}}},onSubmit:({default:{value:l}})=>{n.setInitialValue(l),i.default=l,r.emit("patch",{schema:{"x-uid":i["x-uid"],default:l}}),r.refresh(),B0(n,t)}},"set field default value")},PI=()=>{var f,h,v;const{getCollectionFields:e,getCollectionJoinField:r,getInterface:t}=z.useCollectionManager(),n=mt.useField(),i=mt.useFieldSchema(),{t:a}=jt(),{dn:o}=z.useDesignable(),l=z.useCompile(),s=r(i["x-collection-field"]),c=(s!=null&&s.target?e(s==null?void 0:s.target):(f=e(s==null?void 0:s.targetCollection))!=null?f:[]).filter(d=>{if(d!=null&&d.target||d.type==="boolean")return!1;const p=t(d==null?void 0:d.interface);return p==null?void 0:p.titleUsable}).map(d=>{var p;return{value:d==null?void 0:d.name,label:l((p=d==null?void 0:d.uiSchema)==null?void 0:p.title)||(d==null?void 0:d.name)}});return c.length>0&&i["x-component"]==="CollectionField"?R.jsx(z.SchemaSettingsSelectItem,{title:a("Title field"),options:c,value:(v=(h=n==null?void 0:n.componentProps)==null?void 0:h.fieldNames)==null?void 0:v.label,onChange:d=>{var g,m;const p={"x-uid":i["x-uid"]},y=yt(J(J({},(m=(g=s==null?void 0:s.uiSchema)==null?void 0:g["x-component-props"])==null?void 0:m.fieldNames),n.componentProps.fieldNames),{label:d});i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].fieldNames=y,p["x-component-props"]=i["x-component-props"],n.componentProps.fieldNames=i["x-component-props"].fieldNames,o.emit("patch",{schema:p}),o.refresh()}},"title-field"):null},LI=()=>{const{getCollectionJoinField:e}=z.useCollectionManager(),{getField:r}=z.useCollection(),{t}=jt(),n=mt.useFieldSchema(),i=n.name,a=r(i)||e(n["x-collection-field"]),o=i.startsWith("custom."),l=Pv(n["x-component"]),s=qT(i);return R.jsxs(z.GeneralSchemaDesigner,{disableInitializer:!0,children:[!o&&R.jsxs(R.Fragment,{children:[R.jsx(z.SchemaSettingsItem,{title:i,children:R.jsxs(bI,{type:"secondary",children:[t("Original field"),": ",s]})}),R.jsx(z.SchemaSettingsDivider,{})]}),R.jsx(EI,{}),R.jsx(z.EditDescription,{}),l&&o&&R.jsx(TI,{}),!o&&R.jsx(kI,{}),R.jsx(PI,{}),R.jsx(II,{}),a?R.jsx(z.SchemaSettingsDivider,{}):null,R.jsx(z.SchemaSettingsRemove,{confirm:{title:t("Delete field")},breakRemoveOn:{"x-component":"Grid"}},"remove")]})},OI=mt.connect(e=>{const{content:r}=e,t=mt.useField(),n=()=>{t.setValue(!t.value)};return R.jsx(gt.Checkbox,{onClick:n,checked:t.value,children:r})}),DI=D.memo(e=>{const{setField:r,removeField:t,setForm:n}=D.useContext(_r),{getTranslatedTitle:i}=so(),a=D.useRef(null);a.current=D.useContext(z.VariablesContext);const o=D.useMemo(()=>on.createForm({effects(){const l=s=>{if(s.displayName!=="Field")return null;const{name:u}=s.props||{};return u};on.onFieldInit("*",s=>{l(s)&&s.setValue(null)}),on.onFieldMount("*",s=>br(this,null,function*(){const u=l(s);u&&(r(u,{title:s.title,operator:s.componentProps["filter-operator"]}),s.title.includes("/")&&(s.title=i(s.title)),B0(s,a.current))})),on.onFieldUnmount("*",s=>{const u=l(s);u&&t(u)})}}),[r,i,t,a]);return D.useEffect(()=>n(o),[o,n]),R.jsx(z.FormV2,yt(J({},e),{form:o}))}),BI=e=>{const{t:r}=jt(),{setEnabled:t}=D.useContext(_r);return D.useEffect(()=>{t(!0)},[t]),R.jsx("div",{className:ao.css`
|
|
21
21
|
.ant-card {
|
|
22
22
|
box-shadow: none;
|
|
23
23
|
border: none;
|
|
24
24
|
margin-bottom: 6px;
|
|
25
25
|
}
|
|
26
|
-
`,children:R.jsx(z.SchemaComponentOptions,{components:{ChartFilterItemDesigner:LI,ChartFilterForm:DI,ChartFilterGrid:aI,ChartFilterCheckbox:OI,ChartFilterFormItem:vI,ArrayItems:Ie.ArrayItems,ChartFilterCollapseDesigner:xI,ChartFilterActionDesigner:wI},scope:{t:r,useChartFilterActionProps:gI,useChartFilterResetProps:yI,useChartFilterCollapseProps:mI},children:e.children})})},RI=e=>{const[r,t]=B.useState(!1),n=z.useSchemaInitializer();return R.jsx(z.SchemaInitializerContext.Provider,{value:yt(J({},n),{visible:r,setVisible:t}),children:R.jsx(z.SchemaComponentOptions,{components:{ChartRenderer:kv,ChartRendererProvider:F0,ChartFilterBlockProvider:BI,ChartFilterBlockDesigner:nI},children:R.jsx(yT,{children:R.jsx(mT,{children:R.jsx(eI,{children:e.children})})})})})},NI=()=>{const{t:e}=jt();return R.jsxs(z.GeneralSchemaDesigner,{title:e("Charts"),children:[R.jsx(z.SchemaSettingsBlockTitleItem,{}),R.jsx(z.SchemaSettingsDivider,{}),R.jsx(z.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})},zI=()=>{const{setVisible:e,setCurrent:r}=B.useContext(Tn),t=z.useCollectionDataSourceItemsV2("Chart"),{allowAll:n,parseAction:i}=z.useACLRoleContext(),a=z.useSchemaInitializerItem(),o=t.filter(l=>n?!0:i(`${l.name}:list`)).map(l=>J({},l));return R.jsx(z.DataBlockInitializer,yt(J({},a),{items:o,icon:R.jsx(ni.BarChartOutlined,{}),componentType:"Chart",onCreateBlockSchema:s=>br(this,[s],function*({item:l}){r({schema:{},field:null,collection:l.name,service:null,data:void 0}),e(!0)})}))},YI=new z.SchemaInitializer({name:"ChartInitializers",icon:"PlusOutlined",title:'{{t("Add block")}}',items:[{name:"chart",title:Et("Chart"),Component:zI},{name:"otherBlocks",type:"itemGroup",title:Et("Other blocks"),children:[{name:"filter",title:Et("Filter"),Component:oI}]}]}),VI=()=>{const e=z.useSchemaInitializerItem(),{insert:r}=z.useSchemaInitializer();return R.jsx(z.SchemaInitializerItem,yt(J({},e),{icon:R.jsx(ni.LineChartOutlined,{}),onClick:()=>{r({type:"void","x-component":"CardItem","x-component-props":{name:"charts"},"x-designer":"ChartV2BlockDesigner",properties:{[na.uid()]:{type:"void","x-component":"Grid","x-decorator":"ChartV2Block","x-initializer":"ChartInitializers"}}})}}))},$u=({name:e,title:r,required:t,defaultValue:n})=>({[e||"field"]:{title:Et(r||"Field"),type:"string","x-decorator":"FormItem","x-component":"Select","x-reactions":"{{ useChartFields }}",required:t,default:n}}),R0={field:$u,booleanField:({name:e,title:r,defaultValue:t=!1})=>({[e||"field"]:{"x-content":Et(r||"Field"),type:"boolean","x-decorator":"FormItem","x-component":"Checkbox",default:t}}),xField:e=>$u(J({name:"xField",title:"xField",required:!0},e)),yField:e=>$u(J({name:"yField",title:"yField",required:!0},e)),seriesField:e=>$u(J({name:"seriesField",title:"seriesField"},e))};let Lv=class{constructor({name:r,title:t,component:n,config:i}){Fr(this,"name");Fr(this,"title");Fr(this,"component");Fr(this,"config");Fr(this,"configs",new Map);this.name=r,this.title=t,this.component=n,this.config=i,this.addConfigs(R0)}get schema(){return this.config?{type:"object",properties:this.config.reduce((t,n)=>{let i={};if(typeof n=="string"){const a=this.configs.get(n);i=(a==null?void 0:a())||{}}else if(typeof n=="function")i=n();else if(n.property){const a=this.configs.get(n.property);i=(a==null?void 0:a(n))||{}}else i=n;return J(J({},t),i)},{})}:{}}addConfigs(r){Object.entries(r).forEach(([t,n])=>{this.configs.set(t,n)})}infer(r,{measures:t,dimensions:n}){let i,a,o,l;const s=(u,c)=>{if(c.alias)return u.find(h=>h.value===c.alias);const{alias:f}=El(c.field);return u.find(h=>h.value===f)};if(t!=null&&t.length&&(a=s(r,t[0]),l=t.map(u=>s(r,u))),n){if(n.length===1)i=s(r,n[0]);else if(n.length>1){let u;n.forEach((c,f)=>{const h=s(r,c);["date","time","datetime"].includes(h==null?void 0:h.type)&&(i=h,u=f)}),u?o=s(r,n[u===0?1:0]):(i=s(r,n[0]),o=s(r,n[1]))}}return{xField:i,yField:a,seriesField:o,yFields:l}}getProps(r){return r}render({data:r,general:t,advanced:n,fieldProps:i}){return()=>B.createElement(this.component,J({},this.getProps({data:r,general:t,advanced:n,fieldProps:i})))}};class N0 extends Lv{getReference(){return{title:this.title,link:`https://ant.design/components/${this.name}`}}}class _I extends N0{constructor(){super({name:"statistic",title:"Statistic",component:gt.Statistic,config:[{property:"field",name:"field",title:"Field",required:!0},{title:{title:Et("Title"),type:"string","x-decorator":"FormItem","x-component":"Input"}}]});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{yField:a}=this.infer(t,{measures:n,dimensions:i});return{general:{field:a==null?void 0:a.value,title:a==null?void 0:a.label}}})}getProps({data:t,fieldProps:n,general:i,advanced:a}){const o=t[0]||{},l=i==null?void 0:i.field,s=n[l];return J(J({value:o[l],formatter:s==null?void 0:s.transformer},i),a)}}class $I extends N0{constructor(){super({name:"table",title:"Table",component:gt.Table})}getProps({data:r,fieldProps:t,general:n,advanced:i}){var s,u;const a=r.length?Object.keys(r[0]).map(c=>{var f;return{title:((f=t[c])==null?void 0:f.label)||c,dataIndex:c,key:c}}):[],o=(s=a[0])==null?void 0:s.dataIndex,l=r.map(c=>(Object.keys(c).map(f=>{const h=t[f];if((h==null?void 0:h.interface)==="percent"){const v=Math.round(parseFloat(c[f])*100).toFixed(2);c[f]=`${v}%`}typeof c[f]=="boolean"&&(c[f]=c[f].toString()),h!=null&&h.transformer&&(c[f]=h.transformer(c[f]))}),c));return(u=i==null?void 0:i.pagination)!=null&&u.pageSize,J(J({bordered:!0,size:"middle",dataSource:l,columns:a,scroll:{x:"max-content"},rowKey:o},n),i)}}const GI=[new _I,new $I];var Ov=function(e,r){return Ov=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Ov(e,r)};function I(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Ov(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var S=function(){return S=Object.assign||function(r){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},S.apply(this,arguments)};function kt(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t}function Il(e,r,t,n){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(c){try{u(n.next(c))}catch(f){o(f)}}function s(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(l,s)}u((n=n.apply(e,r||[])).next())})}function Pl(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(u){return function(c){return s([u,c])}}function s(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(t=0)),t;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1],a=u;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(u);break}a[2]&&t.ops.pop(),t.trys.pop();continue}u=r.call(e,t)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Ct(e){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function tt(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),i,a=[],o;try{for(;(r===void 0||r-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return a}function Ll(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var n=Array(e),i=0,r=0;r<t;r++)for(var a=arguments[r],o=0,l=a.length;o<l;o++,i++)n[i]=a[o];return n}function rt(e,r,t){if(t||arguments.length===2)for(var n=0,i=r.length,a;n<i;n++)(a||!(n in r))&&(a||(a=Array.prototype.slice.call(r,0,n)),a[n]=r[n]);return e.concat(a||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var sr=function(e){return e!==null&&typeof e!="function"&&isFinite(e.length)},aa=function(e,r){return sr(e)?e.indexOf(r)>-1:!1},de=function(e,r){if(!sr(e))return e;for(var t=[],n=0;n<e.length;n++){var i=e[n];r(i,n)&&t.push(i)}return t},HI=function(e,r){return r===void 0&&(r=[]),de(e,function(t){return!aa(r,t)})},WI={}.toString,ii=function(e,r){return WI.call(e)==="[object "+r+"]"};const Q=function(e){return ii(e,"Function")};var Y=function(e){return e==null};const G=function(e){return Array.isArray?Array.isArray(e):ii(e,"Array")},At=function(e){var r=typeof e;return e!==null&&r==="object"||r==="function"};function F(e,r){if(e){var t;if(G(e))for(var n=0,i=e.length;n<i&&(t=r(e[n],n),t!==!1);n++);else if(At(e)){for(var a in e)if(e.hasOwnProperty(a)&&(t=r(e[a],a),t===!1))break}}}var uo=Object.keys?function(e){return Object.keys(e)}:function(e){var r=[];return F(e,function(t,n){Q(e)&&n==="prototype"||r.push(n)}),r};function z0(e,r){var t=uo(r),n=t.length;if(Y(e))return!n;for(var i=0;i<n;i+=1){var a=t[i];if(r[a]!==e[a]||!(a in e))return!1}return!0}var Dv=function(e){return typeof e=="object"&&e!==null},sn=function(e){if(!Dv(e)||!ii(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r};function Gr(e,r){if(!G(e))return null;var t;if(Q(r)&&(t=r),sn(r)&&(t=function(i){return z0(i,r)}),t){for(var n=0;n<e.length;n+=1)if(t(e[n]))return e[n]}return null}function Y0(e,r,t){t===void 0&&(t=0);for(var n=t;n<e.length;n++)if(r(e[n],n))return n;return-1}var XI=function(e,r){for(var t=null,n=0;n<e.length;n++){var i=e[n],a=i[r];if(!Y(a)){G(a)?t=a[0]:t=a;break}}return t},ur=function(e){if(!G(e))return[];for(var r=[],t=0;t<e.length;t++)r=r.concat(e[t]);return r};const cr=function(e){if(G(e))return e.reduce(function(r,t){return Math.max(r,t)},e[0])},Er=function(e){if(G(e))return e.reduce(function(r,t){return Math.min(r,t)},e[0])};var V0=function(e){var r=e.filter(function(o){return!isNaN(o)});if(!r.length)return{min:0,max:0};if(G(e[0])){for(var t=[],n=0;n<e.length;n++)t=t.concat(e[n]);r=t}var i=cr(r),a=Er(r);return{min:a,max:i}},jI=Array.prototype.splice,UI=function(r,t){if(!sr(r))return[];for(var n=r?t.length:0,i=n-1;n--;){var a=void 0,o=t[n];(n===i||o!==a)&&(a=o,jI.call(r,o,1))}return r},Pe=function(e,r,t){if(!G(e)&&!sn(e))return e;var n=t;return F(e,function(i,a){n=r(n,i,a)}),n},qI=function(e,r){var t=[];if(!sr(e))return t;for(var n=-1,i=[],a=e.length;++n<a;){var o=e[n];r(o,n,e)&&(t.push(o),i.push(n))}return UI(e,i),t};const at=function(e){return ii(e,"String")};function ZI(e,r){var t;if(Q(r))t=function(i,a){return r(i)-r(a)};else{var n=[];at(r)?n.push(r):G(r)&&(n=r),t=function(i,a){for(var o=0;o<n.length;o+=1){var l=n[o];if(i[l]>a[l])return 1;if(i[l]<a[l])return-1}return 0}}return e.sort(t),e}function oa(e,r){r===void 0&&(r=new Map);var t=[];if(Array.isArray(e))for(var n=0,i=e.length;n<i;n++){var a=e[n];r.has(a)||(t.push(a),r.set(a,!0))}return t}const Hr=function(e,r){for(var t=[],n={},i=0;i<e.length;i++){var a=e[i],o=a[r];if(!Y(o)){G(o)||(o=[o]);for(var l=0;l<o.length;l++){var s=o[l];n[s]||(t.push(s),n[s]=!0)}}}return t};function fr(e){if(sr(e))return e[0]}function ne(e){if(sr(e)){var r=e;return r[r.length-1]}}var Bv=function(e,r){for(var t=0;t<e.length;t++)if(!r(e[t],t))return!1;return!0},Gu=function(e,r){for(var t=0;t<e.length;t++)if(r(e[t],t))return!0;return!1},QI=Object.prototype.hasOwnProperty;function hr(e,r){if(!r||!G(e))return{};for(var t={},n=Q(r)?r:function(l){return l[r]},i,a=0;a<e.length;a++){var o=e[a];i=n(o),QI.call(t,i)?t[i].push(o):t[i]=[o]}return t}function _0(e,r){if(!r)return{0:e};if(!Q(r)){var t=G(r)?r:r.replace(/\s+/g,"").split("*");r=function(n){for(var i="_",a=0,o=t.length;a<o;a++)i+=n[t[a]]&&n[t[a]].toString();return i}}return hr(e,r)}const KI=function(e,r){if(!r)return[e];var t=_0(e,r),n=[];for(var i in t)n.push(t[i]);return n};var Nt=function(e,r,t){return e<r?r:e>t?t:e},Rv=function(e,r){var t=r.toString(),n=t.indexOf(".");if(n===-1)return Math.round(e);var i=t.substr(n+1).length;return i>20&&(i=20),parseFloat(e.toFixed(i))},st=function(e){return ii(e,"Number")},JI=1e-5;function pe(e,r,t){return t===void 0&&(t=JI),Math.abs(e-r)<t}const $0=function(e,r){if(G(e)){for(var t,n=-1/0,i=0;i<e.length;i++){var a=e[i],o=Q(r)?r(a):a[r];o>n&&(t=a,n=o)}return t}},tP=function(e,r){if(G(e)){for(var t,n=1/0,i=0;i<e.length;i++){var a=e[i],o=Q(r)?r(a):a[r];o<n&&(t=a,n=o)}return t}};var Nv=function(e,r){return(e%r+r)%r},eP=Math.PI/180,zv=function(e){return eP*e};const ai=function(e,r){return e.hasOwnProperty(r)};var Hu=Object.values?function(e){return Object.values(e)}:function(e){var r=[];return F(e,function(t,n){Q(e)&&n==="prototype"||r.push(t)}),r};const Ol=function(e){return Y(e)?"":e.toString()};var co=function(e){return Ol(e).toLowerCase()};function G0(e,r){return!e||!r?e:e.replace(/\\?\{([^{}]+)\}/g,function(t,n){return t.charAt(0)==="\\"?t.slice(1):r[n]===void 0?"":r[n]})}var la=function(e){var r=Ol(e);return r.charAt(0).toUpperCase()+r.substring(1)},rP={}.toString,nP=function(e){return rP.call(e).replace(/^\[object /,"").replace(/]$/,"")},fo=function(e){return ii(e,"Boolean")},H0=function(e){return ii(e,"Date")},iP=function(e){return e===null},aP=Object.prototype,oP=function(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||aP;return e===t},sa=function(e){return e===void 0},W0=function(e){return e instanceof Element||e instanceof HTMLDocument};function lP(e){var r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)};return r(e)}function sP(e){var r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout;r(e)}function Yv(e,r){for(var t in r)r.hasOwnProperty(t)&&t!=="constructor"&&r[t]!==void 0&&(e[t]=r[t])}function Tt(e,r,t,n){return r&&Yv(e,r),t&&Yv(e,t),n&&Yv(e,n),e}var ze=function(e){if(typeof e!="object"||e===null)return e;var r;if(G(e)){r=[];for(var t=0,n=e.length;t<n;t++)typeof e[t]=="object"&&e[t]!=null?r[t]=ze(e[t]):r[t]=e[t]}else{r={};for(var i in e)typeof e[i]=="object"&&e[i]!=null?r[i]=ze(e[i]):r[i]=e[i]}return r};function X0(e,r,t){var n;return function(){var i=this,a=arguments,o=function(){n=null,t||e.apply(i,a)},l=t&&!n;clearTimeout(n),n=setTimeout(o,r),l&&e.apply(i,a)}}const ho=function(e,r){if(!Q(e))throw new TypeError("Expected a function");var t=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=r?r.apply(this,n):n[0],o=t.cache;if(o.has(a))return o.get(a);var l=e.apply(this,n);return o.set(a,l),l};return t.cache=new Map,t};var uP=5;function j0(e,r,t,n){t=t||0,n=n||uP;for(var i in r)if(r.hasOwnProperty(i)){var a=r[i];a!==null&&sn(a)?(sn(e[i])||(e[i]={}),t<n?j0(e[i],a,t+1,n):e[i]=r[i]):G(a)?(e[i]=[],e[i]=e[i].concat(a)):a!==void 0&&(e[i]=a)}}var Z=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var n=0;n<r.length;n+=1)j0(e,r[n]);return e},U0=function(e,r){if(!sr(e))return-1;var t=Array.prototype.indexOf;if(t)return t.call(e,r);for(var n=-1,i=0;i<e.length;i++)if(e[i]===r){n=i;break}return n},cP=Object.prototype.hasOwnProperty;function We(e){if(Y(e))return!0;if(sr(e))return!e.length;var r=nP(e);if(r==="Map"||r==="Set")return!e.size;if(oP(e))return!Object.keys(e).length;for(var t in e)if(cP.call(e,t))return!1;return!0}var Gt=function(e,r){if(e===r)return!0;if(!e||!r||at(e)||at(r))return!1;if(sr(e)||sr(r)){if(e.length!==r.length)return!1;for(var t=!0,n=0;n<e.length&&(t=Gt(e[n],r[n]),!!t);n++);return t}if(Dv(e)||Dv(r)){var i=Object.keys(e),a=Object.keys(r);if(i.length!==a.length)return!1;for(var t=!0,n=0;n<i.length&&(t=Gt(e[i[n]],r[i[n]]),!!t);n++);return t}return!1},zt=function(e,r){if(!sr(e))return e;for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(r(i,n))}return t},fP=function(e){return e};const hP=function(e,r){r===void 0&&(r=fP);var t={};return At(e)&&!Y(e)&&Object.keys(e).forEach(function(n){t[n]=r(e[n],n)}),t},E=function(e,r,t){for(var n=0,i=at(r)?r.split("."):r;e&&n<i.length;)e=e[i[n++]];return e===void 0||n<i.length?t:e},ie=function(e,r,t){var n=e,i=at(r)?r.split("."):r;return i.forEach(function(a,o){o<i.length-1?(At(n[a])||(n[a]=st(i[o+1])?[]:{}),n=n[a]):n[a]=t}),e};var vP=Object.prototype.hasOwnProperty;const Vv=function(e,r){if(e===null||!sn(e))return{};var t={};return F(r,function(n){vP.call(e,n)&&(t[n]=e[n])}),t},Wu=function(e,r){return Pe(e,function(t,n,i){return r.includes(i)||(t[i]=n),t},{})},_v=function(e,r,t){var n,i,a,o,l=0;t||(t={});var s=function(){l=t.leading===!1?0:Date.now(),n=null,o=e.apply(i,a),n||(i=a=null)},u=function(){var c=Date.now();!l&&t.leading===!1&&(l=c);var f=r-(c-l);return i=this,a=arguments,f<=0||f>r?(n&&(clearTimeout(n),n=null),l=c,o=e.apply(i,a),n||(i=a=null)):!n&&t.trailing!==!1&&(n=setTimeout(s,f)),o};return u.cancel=function(){clearTimeout(n),l=0,n=i=a=null},u},dP=function(e){return sr(e)?Array.prototype.slice.call(e):[]};var Xu={};const oi=function(e){return e=e||"g",Xu[e]?Xu[e]+=1:Xu[e]=1,e+Xu[e]},li=function(){};function ue(e){return Y(e)?0:sr(e)?e.length:Object.keys(e).length}var ju;const Uu=ho(function(e,r){r===void 0&&(r={});var t=r.fontSize,n=r.fontFamily,i=r.fontWeight,a=r.fontStyle,o=r.fontVariant;return ju||(ju=document.createElement("canvas").getContext("2d")),ju.font=[a,o,i,t+"px",n].join(" "),ju.measureText(at(e)?e:"").width},function(e,r){return r===void 0&&(r={}),Ll([e],Hu(r)).join("")}),pP=function(e,r,t,n){n===void 0&&(n="...");var i=16,a=Uu(n,t),o=at(e)?e:Ol(e),l=r,s=[],u,c;if(Uu(e,t)<=r)return e;for(;u=o.substr(0,i),c=Uu(u,t),!(c+a>l&&c>l);)if(s.push(u),l-=c,o=o.substr(i),!o)return s.join("");for(;u=o.substr(0,1),c=Uu(u,t),!(c+a>l);)if(s.push(u),l-=c,o=o.substr(1),!o)return s.join("");return""+s.join("")+n};var gP=function(){function e(){this.map={}}return e.prototype.has=function(r){return this.map[r]!==void 0},e.prototype.get=function(r,t){var n=this.map[r];return n===void 0?t:n},e.prototype.set=function(r,t){this.map[r]=t},e.prototype.clear=function(){this.map={}},e.prototype.delete=function(r){delete this.map[r]},e.prototype.size=function(){return Object.keys(this.map).length},e}(),Zt;(function(e){e.FORE="fore",e.MID="mid",e.BG="bg"})(Zt||(Zt={}));var j;(function(e){e.TOP="top",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.RIGHT="right",e.RIGHT_TOP="right-top",e.RIGHT_BOTTOM="right-bottom",e.LEFT="left",e.LEFT_TOP="left-top",e.LEFT_BOTTOM="left-bottom",e.BOTTOM="bottom",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right",e.RADIUS="radius",e.CIRCLE="circle",e.NONE="none"})(j||(j={}));var ce;(function(e){e.AXIS="axis",e.GRID="grid",e.LEGEND="legend",e.TOOLTIP="tooltip",e.ANNOTATION="annotation",e.SLIDER="slider",e.SCROLLBAR="scrollbar",e.OTHER="other"})(ce||(ce={}));var vo={FORE:3,MID:2,BG:1},ht;(function(e){e.BEFORE_RENDER="beforerender",e.AFTER_RENDER="afterrender",e.BEFORE_PAINT="beforepaint",e.AFTER_PAINT="afterpaint",e.BEFORE_CHANGE_DATA="beforechangedata",e.AFTER_CHANGE_DATA="afterchangedata",e.BEFORE_CLEAR="beforeclear",e.AFTER_CLEAR="afterclear",e.BEFORE_DESTROY="beforedestroy",e.BEFORE_CHANGE_SIZE="beforechangesize",e.AFTER_CHANGE_SIZE="afterchangesize"})(ht||(ht={}));var si;(function(e){e.BEFORE_DRAW_ANIMATE="beforeanimate",e.AFTER_DRAW_ANIMATE="afteranimate",e.BEFORE_RENDER_LABEL="beforerenderlabel",e.AFTER_RENDER_LABEL="afterrenderlabel"})(si||(si={}));var Xe;(function(e){e.MOUSE_ENTER="plot:mouseenter",e.MOUSE_DOWN="plot:mousedown",e.MOUSE_MOVE="plot:mousemove",e.MOUSE_UP="plot:mouseup",e.MOUSE_LEAVE="plot:mouseleave",e.TOUCH_START="plot:touchstart",e.TOUCH_MOVE="plot:touchmove",e.TOUCH_END="plot:touchend",e.TOUCH_CANCEL="plot:touchcancel",e.CLICK="plot:click",e.DBLCLICK="plot:dblclick",e.CONTEXTMENU="plot:contextmenu",e.LEAVE="plot:leave",e.ENTER="plot:enter"})(Xe||(Xe={}));var qu;(function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.SELECTED="selected",e.DEFAULT="default"})(qu||(qu={}));var po=["color","shape","size"],Lt="_origin",q0=1,Z0=1,Q0=.25,K0={};function yP(e){var r=K0[e];if(!r)throw new Error("G engine '".concat(e,"' is not exist, please register it at first."));return r}function J0(e,r){K0[e]=r}function go(e,r,t){if(e){if(typeof e.addEventListener=="function")return e.addEventListener(r,t,!1),{remove:function(){e.removeEventListener(r,t,!1)}};if(typeof e.attachEvent=="function")return e.attachEvent("on"+r,t),{remove:function(){e.detachEvent("on"+r,t)}}}}var Dl,$v,tx,Gv;function mP(){Dl=document.createElement("table"),$v=document.createElement("tr"),tx=/^\s*<(\w+|!)[^>]*>/,Gv={tr:document.createElement("tbody"),tbody:Dl,thead:Dl,tfoot:Dl,td:$v,th:$v,"*":document.createElement("div")}}function ui(e){Dl||mP();var r=tx.test(e)&&RegExp.$1;(!r||!(r in Gv))&&(r="*");var t=Gv[r];e=typeof e=="string"?e.replace(/(^\s*)|(\s*$)/g,""):e,t.innerHTML=""+e;var n=t.childNodes[0];return n&&t.contains(n)&&t.removeChild(n),n}function je(e,r,t){var n;try{n=window.getComputedStyle?window.getComputedStyle(e,null)[r]:e.style[r]}catch(i){}finally{n=n===void 0?t:n}return n}function xP(e,r){var t=je(e,"height",r);return t==="auto"&&(t=e.offsetHeight),parseFloat(t)}function wP(e,r){var t=xP(e,r),n=parseFloat(je(e,"borderTopWidth"))||0,i=parseFloat(je(e,"paddingTop"))||0,a=parseFloat(je(e,"paddingBottom"))||0,o=parseFloat(je(e,"borderBottomWidth"))||0,l=parseFloat(je(e,"marginTop"))||0,s=parseFloat(je(e,"marginBottom"))||0;return t+n+o+i+a+l+s}function SP(e,r){var t=je(e,"width",r);return t==="auto"&&(t=e.offsetWidth),parseFloat(t)}function CP(e,r){var t=SP(e,r),n=parseFloat(je(e,"borderLeftWidth"))||0,i=parseFloat(je(e,"paddingLeft"))||0,a=parseFloat(je(e,"paddingRight"))||0,o=parseFloat(je(e,"borderRightWidth"))||0,l=parseFloat(je(e,"marginRight"))||0,s=parseFloat(je(e,"marginLeft"))||0;return t+n+o+i+a+s+l}function Le(e,r){if(e)for(var t in r)r.hasOwnProperty(t)&&(e.style[t]=r[t]);return e}function MP(e){var r=getComputedStyle(e);return{width:(e.clientWidth||parseInt(r.width,10))-parseInt(r.paddingLeft,10)-parseInt(r.paddingRight,10),height:(e.clientHeight||parseInt(r.height,10))-parseInt(r.paddingTop,10)-parseInt(r.paddingBottom,10)}}function ex(e){return typeof e=="number"&&!isNaN(e)}function rx(e,r,t,n){var i=t,a=n;if(r){var o=MP(e);i=o.width?o.width:i,a=o.height?o.height:a}return{width:Math.max(ex(i)?i:q0,q0),height:Math.max(ex(a)?a:Z0,Z0)}}function AP(e){var r=e.parentNode;r&&r.removeChild(e)}var FP="*",Hv=function(){function e(){this._events={}}return e.prototype.on=function(r,t,n){return this._events[r]||(this._events[r]=[]),this._events[r].push({callback:t,once:!!n}),this},e.prototype.once=function(r,t){return this.on(r,t,!0)},e.prototype.emit=function(r){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var a=this._events[r]||[],o=this._events[FP]||[],l=function(s){for(var u=s.length,c=0;c<u;c++)if(s[c]){var f=s[c],h=f.callback,v=f.once;v&&(s.splice(c,1),s.length===0&&delete t._events[r],u--,c--),h.apply(t,n)}};l(a),l(o)},e.prototype.off=function(r,t){if(!r)this._events={};else if(!t)delete this._events[r];else{for(var n=this._events[r]||[],i=n.length,a=0;a<i;a++)n[a].callback===t&&(n.splice(a,1),i--,a--);n.length===0&&delete this._events[r]}return this},e.prototype.getEvents=function(){return this._events},e}(),Wv=function(e){I(r,e);function r(t){var n=e.call(this)||this;n.destroyed=!1;var i=t.visible,a=i===void 0?!0:i;return n.visible=a,n}return r.prototype.show=function(){var t=this.visible;t||this.changeVisible(!0)},r.prototype.hide=function(){var t=this.visible;t&&this.changeVisible(!1)},r.prototype.destroy=function(){this.off(),this.destroyed=!0},r.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},r}(Hv),Bl=`
|
|
26
|
+
`,children:R.jsx(z.SchemaComponentOptions,{components:{ChartFilterItemDesigner:LI,ChartFilterForm:DI,ChartFilterGrid:aI,ChartFilterCheckbox:OI,ChartFilterFormItem:vI,ArrayItems:Ie.ArrayItems,ChartFilterCollapseDesigner:xI,ChartFilterActionDesigner:wI},scope:{t:r,useChartFilterActionProps:gI,useChartFilterResetProps:yI,useChartFilterCollapseProps:mI},children:e.children})})},RI=e=>{const[r,t]=D.useState(!1),n=z.useSchemaInitializer();return R.jsx(z.SchemaInitializerContext.Provider,{value:yt(J({},n),{visible:r,setVisible:t}),children:R.jsx(z.SchemaComponentOptions,{components:{ChartRenderer:kv,ChartRendererProvider:F0,ChartFilterBlockProvider:BI,ChartFilterBlockDesigner:nI},children:R.jsx(yT,{children:R.jsx(mT,{children:R.jsx(eI,{children:e.children})})})})})},NI=()=>{const{t:e}=jt();return R.jsxs(z.GeneralSchemaDesigner,{title:e("Charts"),children:[R.jsx(z.SchemaSettingsBlockTitleItem,{}),R.jsx(z.SchemaSettingsDivider,{}),R.jsx(z.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})},zI=()=>{const{setVisible:e,setCurrent:r}=D.useContext(Tn),t=z.useCollectionDataSourceItemsV2("Chart"),{allowAll:n,parseAction:i}=z.useACLRoleContext(),a=z.useSchemaInitializerItem(),o=t.filter(l=>n?!0:i(`${l.name}:list`)).map(l=>J({},l));return R.jsx(z.DataBlockInitializer,yt(J({},a),{items:o,icon:R.jsx(ni.BarChartOutlined,{}),componentType:"Chart",onCreateBlockSchema:s=>br(this,[s],function*({item:l}){r({schema:{},field:null,collection:l.name,service:null,data:void 0}),e(!0)})}))},YI=new z.SchemaInitializer({name:"ChartInitializers",icon:"PlusOutlined",title:'{{t("Add block")}}',items:[{name:"chart",title:Et("Chart"),Component:zI},{name:"otherBlocks",type:"itemGroup",title:Et("Other blocks"),children:[{name:"filter",title:Et("Filter"),Component:oI}]}]}),VI=()=>{const e=z.useSchemaInitializerItem(),{insert:r}=z.useSchemaInitializer();return R.jsx(z.SchemaInitializerItem,yt(J({},e),{icon:R.jsx(ni.LineChartOutlined,{}),onClick:()=>{r({type:"void","x-component":"CardItem","x-component-props":{name:"charts"},"x-designer":"ChartV2BlockDesigner",properties:{[na.uid()]:{type:"void","x-component":"Grid","x-decorator":"ChartV2Block","x-initializer":"ChartInitializers"}}})}}))},$u=({name:e,title:r,required:t,defaultValue:n})=>({[e||"field"]:{title:Et(r||"Field"),type:"string","x-decorator":"FormItem","x-component":"Select","x-reactions":"{{ useChartFields }}",required:t,default:n}}),R0={field:$u,booleanField:({name:e,title:r,defaultValue:t=!1})=>({[e||"field"]:{"x-content":Et(r||"Field"),type:"boolean","x-decorator":"FormItem","x-component":"Checkbox",default:t}}),xField:e=>$u(J({name:"xField",title:"xField",required:!0},e)),yField:e=>$u(J({name:"yField",title:"yField",required:!0},e)),seriesField:e=>$u(J({name:"seriesField",title:"seriesField"},e))};let Lv=class{constructor({name:r,title:t,component:n,config:i}){Fr(this,"name");Fr(this,"title");Fr(this,"component");Fr(this,"config");Fr(this,"configs",new Map);this.name=r,this.title=t,this.component=n,this.config=i,this.addConfigs(R0)}get schema(){return this.config?{type:"object",properties:this.config.reduce((t,n)=>{let i={};if(typeof n=="string"){const a=this.configs.get(n);i=(a==null?void 0:a())||{}}else if(typeof n=="function")i=n();else if(n.property){const a=this.configs.get(n.property);i=(a==null?void 0:a(n))||{}}else i=n;return J(J({},t),i)},{})}:{}}addConfigs(r){Object.entries(r).forEach(([t,n])=>{this.configs.set(t,n)})}infer(r,{measures:t,dimensions:n}){let i,a,o,l;const s=(u,c)=>{if(c.alias)return u.find(h=>h.value===c.alias);const{alias:f}=El(c.field);return u.find(h=>h.value===f)};if(t!=null&&t.length&&(a=s(r,t[0]),l=t.map(u=>s(r,u))),n){if(n.length===1)i=s(r,n[0]);else if(n.length>1){let u;n.forEach((c,f)=>{const h=s(r,c);["date","time","datetime"].includes(h==null?void 0:h.type)&&(i=h,u=f)}),u?o=s(r,n[u===0?1:0]):(i=s(r,n[0]),o=s(r,n[1]))}}return{xField:i,yField:a,seriesField:o,yFields:l}}getProps(r){return r}render({data:r,general:t,advanced:n,fieldProps:i}){return()=>D.createElement(this.component,J({},this.getProps({data:r,general:t,advanced:n,fieldProps:i})))}};class N0 extends Lv{getReference(){return{title:this.title,link:`https://ant.design/components/${this.name}`}}}class _I extends N0{constructor(){super({name:"statistic",title:"Statistic",component:gt.Statistic,config:[{property:"field",name:"field",title:"Field",required:!0},{title:{title:Et("Title"),type:"string","x-decorator":"FormItem","x-component":"Input"}}]});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{yField:a}=this.infer(t,{measures:n,dimensions:i});return{general:{field:a==null?void 0:a.value,title:a==null?void 0:a.label}}})}getProps({data:t,fieldProps:n,general:i,advanced:a}){const o=t[0]||{},l=i==null?void 0:i.field,s=n[l];return J(J({value:o[l],formatter:s==null?void 0:s.transformer},i),a)}}class $I extends N0{constructor(){super({name:"table",title:"Table",component:gt.Table})}getProps({data:r,fieldProps:t,general:n,advanced:i}){var l;const a=r.length?Object.keys(r[0]).map(s=>{var u;return{title:((u=t[s])==null?void 0:u.label)||s,dataIndex:s,key:s}}):[],o=r.map((s,u)=>(Object.keys(s).map(c=>{const f=t[c];if((f==null?void 0:f.interface)==="percent"){const h=Math.round(parseFloat(s[c])*100).toFixed(2);s[c]=`${h}%`}typeof s[c]=="boolean"&&(s[c]=s[c].toString()),f!=null&&f.transformer&&(s[c]=f.transformer(s[c]))}),s._key=u,s));return(l=i==null?void 0:i.pagination)!=null&&l.pageSize,J(J({bordered:!0,size:"middle",dataSource:o,columns:a,scroll:{x:"max-content"},rowKey:"_key"},n),i)}}const GI=[new _I,new $I];var Ov=function(e,r){return Ov=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Ov(e,r)};function I(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Ov(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var S=function(){return S=Object.assign||function(r){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},S.apply(this,arguments)};function kt(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t}function Il(e,r,t,n){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(c){try{u(n.next(c))}catch(f){o(f)}}function s(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(l,s)}u((n=n.apply(e,r||[])).next())})}function Pl(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(u){return function(c){return s([u,c])}}function s(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(t=0)),t;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1],a=u;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(u);break}a[2]&&t.ops.pop(),t.trys.pop();continue}u=r.call(e,t)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Ct(e){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function tt(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),i,a=[],o;try{for(;(r===void 0||r-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return a}function Ll(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var n=Array(e),i=0,r=0;r<t;r++)for(var a=arguments[r],o=0,l=a.length;o<l;o++,i++)n[i]=a[o];return n}function rt(e,r,t){if(t||arguments.length===2)for(var n=0,i=r.length,a;n<i;n++)(a||!(n in r))&&(a||(a=Array.prototype.slice.call(r,0,n)),a[n]=r[n]);return e.concat(a||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var sr=function(e){return e!==null&&typeof e!="function"&&isFinite(e.length)},aa=function(e,r){return sr(e)?e.indexOf(r)>-1:!1},de=function(e,r){if(!sr(e))return e;for(var t=[],n=0;n<e.length;n++){var i=e[n];r(i,n)&&t.push(i)}return t},HI=function(e,r){return r===void 0&&(r=[]),de(e,function(t){return!aa(r,t)})},WI={}.toString,ii=function(e,r){return WI.call(e)==="[object "+r+"]"};const Q=function(e){return ii(e,"Function")};var Y=function(e){return e==null};const G=function(e){return Array.isArray?Array.isArray(e):ii(e,"Array")},At=function(e){var r=typeof e;return e!==null&&r==="object"||r==="function"};function F(e,r){if(e){var t;if(G(e))for(var n=0,i=e.length;n<i&&(t=r(e[n],n),t!==!1);n++);else if(At(e)){for(var a in e)if(e.hasOwnProperty(a)&&(t=r(e[a],a),t===!1))break}}}var uo=Object.keys?function(e){return Object.keys(e)}:function(e){var r=[];return F(e,function(t,n){Q(e)&&n==="prototype"||r.push(n)}),r};function z0(e,r){var t=uo(r),n=t.length;if(Y(e))return!n;for(var i=0;i<n;i+=1){var a=t[i];if(r[a]!==e[a]||!(a in e))return!1}return!0}var Dv=function(e){return typeof e=="object"&&e!==null},sn=function(e){if(!Dv(e)||!ii(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r};function Gr(e,r){if(!G(e))return null;var t;if(Q(r)&&(t=r),sn(r)&&(t=function(i){return z0(i,r)}),t){for(var n=0;n<e.length;n+=1)if(t(e[n]))return e[n]}return null}function Y0(e,r,t){t===void 0&&(t=0);for(var n=t;n<e.length;n++)if(r(e[n],n))return n;return-1}var XI=function(e,r){for(var t=null,n=0;n<e.length;n++){var i=e[n],a=i[r];if(!Y(a)){G(a)?t=a[0]:t=a;break}}return t},ur=function(e){if(!G(e))return[];for(var r=[],t=0;t<e.length;t++)r=r.concat(e[t]);return r};const cr=function(e){if(G(e))return e.reduce(function(r,t){return Math.max(r,t)},e[0])},Er=function(e){if(G(e))return e.reduce(function(r,t){return Math.min(r,t)},e[0])};var V0=function(e){var r=e.filter(function(o){return!isNaN(o)});if(!r.length)return{min:0,max:0};if(G(e[0])){for(var t=[],n=0;n<e.length;n++)t=t.concat(e[n]);r=t}var i=cr(r),a=Er(r);return{min:a,max:i}},jI=Array.prototype.splice,UI=function(r,t){if(!sr(r))return[];for(var n=r?t.length:0,i=n-1;n--;){var a=void 0,o=t[n];(n===i||o!==a)&&(a=o,jI.call(r,o,1))}return r},Pe=function(e,r,t){if(!G(e)&&!sn(e))return e;var n=t;return F(e,function(i,a){n=r(n,i,a)}),n},qI=function(e,r){var t=[];if(!sr(e))return t;for(var n=-1,i=[],a=e.length;++n<a;){var o=e[n];r(o,n,e)&&(t.push(o),i.push(n))}return UI(e,i),t};const at=function(e){return ii(e,"String")};function ZI(e,r){var t;if(Q(r))t=function(i,a){return r(i)-r(a)};else{var n=[];at(r)?n.push(r):G(r)&&(n=r),t=function(i,a){for(var o=0;o<n.length;o+=1){var l=n[o];if(i[l]>a[l])return 1;if(i[l]<a[l])return-1}return 0}}return e.sort(t),e}function oa(e,r){r===void 0&&(r=new Map);var t=[];if(Array.isArray(e))for(var n=0,i=e.length;n<i;n++){var a=e[n];r.has(a)||(t.push(a),r.set(a,!0))}return t}const Hr=function(e,r){for(var t=[],n={},i=0;i<e.length;i++){var a=e[i],o=a[r];if(!Y(o)){G(o)||(o=[o]);for(var l=0;l<o.length;l++){var s=o[l];n[s]||(t.push(s),n[s]=!0)}}}return t};function fr(e){if(sr(e))return e[0]}function ne(e){if(sr(e)){var r=e;return r[r.length-1]}}var Bv=function(e,r){for(var t=0;t<e.length;t++)if(!r(e[t],t))return!1;return!0},Gu=function(e,r){for(var t=0;t<e.length;t++)if(r(e[t],t))return!0;return!1},QI=Object.prototype.hasOwnProperty;function hr(e,r){if(!r||!G(e))return{};for(var t={},n=Q(r)?r:function(l){return l[r]},i,a=0;a<e.length;a++){var o=e[a];i=n(o),QI.call(t,i)?t[i].push(o):t[i]=[o]}return t}function _0(e,r){if(!r)return{0:e};if(!Q(r)){var t=G(r)?r:r.replace(/\s+/g,"").split("*");r=function(n){for(var i="_",a=0,o=t.length;a<o;a++)i+=n[t[a]]&&n[t[a]].toString();return i}}return hr(e,r)}const KI=function(e,r){if(!r)return[e];var t=_0(e,r),n=[];for(var i in t)n.push(t[i]);return n};var Nt=function(e,r,t){return e<r?r:e>t?t:e},Rv=function(e,r){var t=r.toString(),n=t.indexOf(".");if(n===-1)return Math.round(e);var i=t.substr(n+1).length;return i>20&&(i=20),parseFloat(e.toFixed(i))},st=function(e){return ii(e,"Number")},JI=1e-5;function pe(e,r,t){return t===void 0&&(t=JI),Math.abs(e-r)<t}const $0=function(e,r){if(G(e)){for(var t,n=-1/0,i=0;i<e.length;i++){var a=e[i],o=Q(r)?r(a):a[r];o>n&&(t=a,n=o)}return t}},tP=function(e,r){if(G(e)){for(var t,n=1/0,i=0;i<e.length;i++){var a=e[i],o=Q(r)?r(a):a[r];o<n&&(t=a,n=o)}return t}};var Nv=function(e,r){return(e%r+r)%r},eP=Math.PI/180,zv=function(e){return eP*e};const ai=function(e,r){return e.hasOwnProperty(r)};var Hu=Object.values?function(e){return Object.values(e)}:function(e){var r=[];return F(e,function(t,n){Q(e)&&n==="prototype"||r.push(t)}),r};const Ol=function(e){return Y(e)?"":e.toString()};var co=function(e){return Ol(e).toLowerCase()};function G0(e,r){return!e||!r?e:e.replace(/\\?\{([^{}]+)\}/g,function(t,n){return t.charAt(0)==="\\"?t.slice(1):r[n]===void 0?"":r[n]})}var la=function(e){var r=Ol(e);return r.charAt(0).toUpperCase()+r.substring(1)},rP={}.toString,nP=function(e){return rP.call(e).replace(/^\[object /,"").replace(/]$/,"")},fo=function(e){return ii(e,"Boolean")},H0=function(e){return ii(e,"Date")},iP=function(e){return e===null},aP=Object.prototype,oP=function(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||aP;return e===t},sa=function(e){return e===void 0},W0=function(e){return e instanceof Element||e instanceof HTMLDocument};function lP(e){var r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)};return r(e)}function sP(e){var r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout;r(e)}function Yv(e,r){for(var t in r)r.hasOwnProperty(t)&&t!=="constructor"&&r[t]!==void 0&&(e[t]=r[t])}function Tt(e,r,t,n){return r&&Yv(e,r),t&&Yv(e,t),n&&Yv(e,n),e}var ze=function(e){if(typeof e!="object"||e===null)return e;var r;if(G(e)){r=[];for(var t=0,n=e.length;t<n;t++)typeof e[t]=="object"&&e[t]!=null?r[t]=ze(e[t]):r[t]=e[t]}else{r={};for(var i in e)typeof e[i]=="object"&&e[i]!=null?r[i]=ze(e[i]):r[i]=e[i]}return r};function X0(e,r,t){var n;return function(){var i=this,a=arguments,o=function(){n=null,t||e.apply(i,a)},l=t&&!n;clearTimeout(n),n=setTimeout(o,r),l&&e.apply(i,a)}}const ho=function(e,r){if(!Q(e))throw new TypeError("Expected a function");var t=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=r?r.apply(this,n):n[0],o=t.cache;if(o.has(a))return o.get(a);var l=e.apply(this,n);return o.set(a,l),l};return t.cache=new Map,t};var uP=5;function j0(e,r,t,n){t=t||0,n=n||uP;for(var i in r)if(r.hasOwnProperty(i)){var a=r[i];a!==null&&sn(a)?(sn(e[i])||(e[i]={}),t<n?j0(e[i],a,t+1,n):e[i]=r[i]):G(a)?(e[i]=[],e[i]=e[i].concat(a)):a!==void 0&&(e[i]=a)}}var Z=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var n=0;n<r.length;n+=1)j0(e,r[n]);return e},U0=function(e,r){if(!sr(e))return-1;var t=Array.prototype.indexOf;if(t)return t.call(e,r);for(var n=-1,i=0;i<e.length;i++)if(e[i]===r){n=i;break}return n},cP=Object.prototype.hasOwnProperty;function We(e){if(Y(e))return!0;if(sr(e))return!e.length;var r=nP(e);if(r==="Map"||r==="Set")return!e.size;if(oP(e))return!Object.keys(e).length;for(var t in e)if(cP.call(e,t))return!1;return!0}var Gt=function(e,r){if(e===r)return!0;if(!e||!r||at(e)||at(r))return!1;if(sr(e)||sr(r)){if(e.length!==r.length)return!1;for(var t=!0,n=0;n<e.length&&(t=Gt(e[n],r[n]),!!t);n++);return t}if(Dv(e)||Dv(r)){var i=Object.keys(e),a=Object.keys(r);if(i.length!==a.length)return!1;for(var t=!0,n=0;n<i.length&&(t=Gt(e[i[n]],r[i[n]]),!!t);n++);return t}return!1},zt=function(e,r){if(!sr(e))return e;for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(r(i,n))}return t},fP=function(e){return e};const hP=function(e,r){r===void 0&&(r=fP);var t={};return At(e)&&!Y(e)&&Object.keys(e).forEach(function(n){t[n]=r(e[n],n)}),t},E=function(e,r,t){for(var n=0,i=at(r)?r.split("."):r;e&&n<i.length;)e=e[i[n++]];return e===void 0||n<i.length?t:e},ie=function(e,r,t){var n=e,i=at(r)?r.split("."):r;return i.forEach(function(a,o){o<i.length-1?(At(n[a])||(n[a]=st(i[o+1])?[]:{}),n=n[a]):n[a]=t}),e};var vP=Object.prototype.hasOwnProperty;const Vv=function(e,r){if(e===null||!sn(e))return{};var t={};return F(r,function(n){vP.call(e,n)&&(t[n]=e[n])}),t},Wu=function(e,r){return Pe(e,function(t,n,i){return r.includes(i)||(t[i]=n),t},{})},_v=function(e,r,t){var n,i,a,o,l=0;t||(t={});var s=function(){l=t.leading===!1?0:Date.now(),n=null,o=e.apply(i,a),n||(i=a=null)},u=function(){var c=Date.now();!l&&t.leading===!1&&(l=c);var f=r-(c-l);return i=this,a=arguments,f<=0||f>r?(n&&(clearTimeout(n),n=null),l=c,o=e.apply(i,a),n||(i=a=null)):!n&&t.trailing!==!1&&(n=setTimeout(s,f)),o};return u.cancel=function(){clearTimeout(n),l=0,n=i=a=null},u},dP=function(e){return sr(e)?Array.prototype.slice.call(e):[]};var Xu={};const oi=function(e){return e=e||"g",Xu[e]?Xu[e]+=1:Xu[e]=1,e+Xu[e]},li=function(){};function ue(e){return Y(e)?0:sr(e)?e.length:Object.keys(e).length}var ju;const Uu=ho(function(e,r){r===void 0&&(r={});var t=r.fontSize,n=r.fontFamily,i=r.fontWeight,a=r.fontStyle,o=r.fontVariant;return ju||(ju=document.createElement("canvas").getContext("2d")),ju.font=[a,o,i,t+"px",n].join(" "),ju.measureText(at(e)?e:"").width},function(e,r){return r===void 0&&(r={}),Ll([e],Hu(r)).join("")}),pP=function(e,r,t,n){n===void 0&&(n="...");var i=16,a=Uu(n,t),o=at(e)?e:Ol(e),l=r,s=[],u,c;if(Uu(e,t)<=r)return e;for(;u=o.substr(0,i),c=Uu(u,t),!(c+a>l&&c>l);)if(s.push(u),l-=c,o=o.substr(i),!o)return s.join("");for(;u=o.substr(0,1),c=Uu(u,t),!(c+a>l);)if(s.push(u),l-=c,o=o.substr(1),!o)return s.join("");return""+s.join("")+n};var gP=function(){function e(){this.map={}}return e.prototype.has=function(r){return this.map[r]!==void 0},e.prototype.get=function(r,t){var n=this.map[r];return n===void 0?t:n},e.prototype.set=function(r,t){this.map[r]=t},e.prototype.clear=function(){this.map={}},e.prototype.delete=function(r){delete this.map[r]},e.prototype.size=function(){return Object.keys(this.map).length},e}(),Zt;(function(e){e.FORE="fore",e.MID="mid",e.BG="bg"})(Zt||(Zt={}));var j;(function(e){e.TOP="top",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.RIGHT="right",e.RIGHT_TOP="right-top",e.RIGHT_BOTTOM="right-bottom",e.LEFT="left",e.LEFT_TOP="left-top",e.LEFT_BOTTOM="left-bottom",e.BOTTOM="bottom",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right",e.RADIUS="radius",e.CIRCLE="circle",e.NONE="none"})(j||(j={}));var ce;(function(e){e.AXIS="axis",e.GRID="grid",e.LEGEND="legend",e.TOOLTIP="tooltip",e.ANNOTATION="annotation",e.SLIDER="slider",e.SCROLLBAR="scrollbar",e.OTHER="other"})(ce||(ce={}));var vo={FORE:3,MID:2,BG:1},ht;(function(e){e.BEFORE_RENDER="beforerender",e.AFTER_RENDER="afterrender",e.BEFORE_PAINT="beforepaint",e.AFTER_PAINT="afterpaint",e.BEFORE_CHANGE_DATA="beforechangedata",e.AFTER_CHANGE_DATA="afterchangedata",e.BEFORE_CLEAR="beforeclear",e.AFTER_CLEAR="afterclear",e.BEFORE_DESTROY="beforedestroy",e.BEFORE_CHANGE_SIZE="beforechangesize",e.AFTER_CHANGE_SIZE="afterchangesize"})(ht||(ht={}));var si;(function(e){e.BEFORE_DRAW_ANIMATE="beforeanimate",e.AFTER_DRAW_ANIMATE="afteranimate",e.BEFORE_RENDER_LABEL="beforerenderlabel",e.AFTER_RENDER_LABEL="afterrenderlabel"})(si||(si={}));var Xe;(function(e){e.MOUSE_ENTER="plot:mouseenter",e.MOUSE_DOWN="plot:mousedown",e.MOUSE_MOVE="plot:mousemove",e.MOUSE_UP="plot:mouseup",e.MOUSE_LEAVE="plot:mouseleave",e.TOUCH_START="plot:touchstart",e.TOUCH_MOVE="plot:touchmove",e.TOUCH_END="plot:touchend",e.TOUCH_CANCEL="plot:touchcancel",e.CLICK="plot:click",e.DBLCLICK="plot:dblclick",e.CONTEXTMENU="plot:contextmenu",e.LEAVE="plot:leave",e.ENTER="plot:enter"})(Xe||(Xe={}));var qu;(function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.SELECTED="selected",e.DEFAULT="default"})(qu||(qu={}));var po=["color","shape","size"],Lt="_origin",q0=1,Z0=1,Q0=.25,K0={};function yP(e){var r=K0[e];if(!r)throw new Error("G engine '".concat(e,"' is not exist, please register it at first."));return r}function J0(e,r){K0[e]=r}function go(e,r,t){if(e){if(typeof e.addEventListener=="function")return e.addEventListener(r,t,!1),{remove:function(){e.removeEventListener(r,t,!1)}};if(typeof e.attachEvent=="function")return e.attachEvent("on"+r,t),{remove:function(){e.detachEvent("on"+r,t)}}}}var Dl,$v,tx,Gv;function mP(){Dl=document.createElement("table"),$v=document.createElement("tr"),tx=/^\s*<(\w+|!)[^>]*>/,Gv={tr:document.createElement("tbody"),tbody:Dl,thead:Dl,tfoot:Dl,td:$v,th:$v,"*":document.createElement("div")}}function ui(e){Dl||mP();var r=tx.test(e)&&RegExp.$1;(!r||!(r in Gv))&&(r="*");var t=Gv[r];e=typeof e=="string"?e.replace(/(^\s*)|(\s*$)/g,""):e,t.innerHTML=""+e;var n=t.childNodes[0];return n&&t.contains(n)&&t.removeChild(n),n}function je(e,r,t){var n;try{n=window.getComputedStyle?window.getComputedStyle(e,null)[r]:e.style[r]}catch(i){}finally{n=n===void 0?t:n}return n}function xP(e,r){var t=je(e,"height",r);return t==="auto"&&(t=e.offsetHeight),parseFloat(t)}function wP(e,r){var t=xP(e,r),n=parseFloat(je(e,"borderTopWidth"))||0,i=parseFloat(je(e,"paddingTop"))||0,a=parseFloat(je(e,"paddingBottom"))||0,o=parseFloat(je(e,"borderBottomWidth"))||0,l=parseFloat(je(e,"marginTop"))||0,s=parseFloat(je(e,"marginBottom"))||0;return t+n+o+i+a+l+s}function SP(e,r){var t=je(e,"width",r);return t==="auto"&&(t=e.offsetWidth),parseFloat(t)}function CP(e,r){var t=SP(e,r),n=parseFloat(je(e,"borderLeftWidth"))||0,i=parseFloat(je(e,"paddingLeft"))||0,a=parseFloat(je(e,"paddingRight"))||0,o=parseFloat(je(e,"borderRightWidth"))||0,l=parseFloat(je(e,"marginRight"))||0,s=parseFloat(je(e,"marginLeft"))||0;return t+n+o+i+a+s+l}function Le(e,r){if(e)for(var t in r)r.hasOwnProperty(t)&&(e.style[t]=r[t]);return e}function MP(e){var r=getComputedStyle(e);return{width:(e.clientWidth||parseInt(r.width,10))-parseInt(r.paddingLeft,10)-parseInt(r.paddingRight,10),height:(e.clientHeight||parseInt(r.height,10))-parseInt(r.paddingTop,10)-parseInt(r.paddingBottom,10)}}function ex(e){return typeof e=="number"&&!isNaN(e)}function rx(e,r,t,n){var i=t,a=n;if(r){var o=MP(e);i=o.width?o.width:i,a=o.height?o.height:a}return{width:Math.max(ex(i)?i:q0,q0),height:Math.max(ex(a)?a:Z0,Z0)}}function AP(e){var r=e.parentNode;r&&r.removeChild(e)}var FP="*",Hv=function(){function e(){this._events={}}return e.prototype.on=function(r,t,n){return this._events[r]||(this._events[r]=[]),this._events[r].push({callback:t,once:!!n}),this},e.prototype.once=function(r,t){return this.on(r,t,!0)},e.prototype.emit=function(r){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var a=this._events[r]||[],o=this._events[FP]||[],l=function(s){for(var u=s.length,c=0;c<u;c++)if(s[c]){var f=s[c],h=f.callback,v=f.once;v&&(s.splice(c,1),s.length===0&&delete t._events[r],u--,c--),h.apply(t,n)}};l(a),l(o)},e.prototype.off=function(r,t){if(!r)this._events={};else if(!t)delete this._events[r];else{for(var n=this._events[r]||[],i=n.length,a=0;a<i;a++)n[a].callback===t&&(n.splice(a,1),i--,a--);n.length===0&&delete this._events[r]}return this},e.prototype.getEvents=function(){return this._events},e}(),Wv=function(e){I(r,e);function r(t){var n=e.call(this)||this;n.destroyed=!1;var i=t.visible,a=i===void 0?!0:i;return n.visible=a,n}return r.prototype.show=function(){var t=this.visible;t||this.changeVisible(!0)},r.prototype.hide=function(){var t=this.visible;t&&this.changeVisible(!1)},r.prototype.destroy=function(){this.off(),this.destroyed=!0},r.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},r}(Hv),Bl=`
|
|
27
27
|
\v\f\r \u2028\u2029`,bP=new RegExp("([a-z])["+Bl+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Bl+"]*,?["+Bl+"]*)+)","ig"),EP=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Bl+"]*,?["+Bl+"]*","ig"),yo=function(e){if(!e)return null;if(G(e))return e;var r={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},t=[];return String(e).replace(bP,function(n,i,a){var o=[],l=i.toLowerCase();if(a.replace(EP,function(s,u){u&&o.push(+u)}),l==="m"&&o.length>2&&(t.push([i].concat(o.splice(0,2))),l="l",i=i==="m"?"l":"L"),l==="o"&&o.length===1&&t.push([i,o[0]]),l==="r")t.push([i].concat(o));else for(;o.length>=r[l]&&(t.push([i].concat(o.splice(0,r[l]))),!!r[l]););return e}),t},Xv=function(e,r){for(var t=[],n=0,i=e.length;i-2*!r>n;n+=2){var a=[{x:+e[n-2],y:+e[n-1]},{x:+e[n],y:+e[n+1]},{x:+e[n+2],y:+e[n+3]},{x:+e[n+4],y:+e[n+5]}];r?n?i-4===n?a[3]={x:+e[0],y:+e[1]}:i-2===n&&(a[2]={x:+e[0],y:+e[1]},a[3]={x:+e[2],y:+e[3]}):a[0]={x:+e[i-2],y:+e[i-1]}:i-4===n?a[3]=a[2]:n||(a[0]={x:+e[n],y:+e[n+1]}),t.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return t},Zu=function(e,r,t,n,i){var a=[];if(i===null&&n===null&&(n=t),e=+e,r=+r,t=+t,n=+n,i!==null){var o=Math.PI/180,l=e+t*Math.cos(-n*o),s=e+t*Math.cos(-i*o),u=r+t*Math.sin(-n*o),c=r+t*Math.sin(-i*o);a=[["M",l,u],["A",t,t,0,+(i-n>180),0,s,c]]}else a=[["M",e,r],["m",0,-n],["a",t,n,0,1,1,0,2*n],["a",t,n,0,1,1,0,-2*n],["z"]];return a},jv=function(e){if(e=yo(e),!e||!e.length)return[["M",0,0]];var r=[],t=0,n=0,i=0,a=0,o=0,l,s;e[0][0]==="M"&&(t=+e[0][1],n=+e[0][2],i=t,a=n,o++,r[0]=["M",t,n]);for(var u=e.length===3&&e[0][0]==="M"&&e[1][0].toUpperCase()==="R"&&e[2][0].toUpperCase()==="Z",c=void 0,f=void 0,h=o,v=e.length;h<v;h++){if(r.push(c=[]),f=e[h],l=f[0],l!==l.toUpperCase())switch(c[0]=l.toUpperCase(),c[0]){case"A":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+f[6]+t,c[7]=+f[7]+n;break;case"V":c[1]=+f[1]+n;break;case"H":c[1]=+f[1]+t;break;case"R":s=[t,n].concat(f.slice(1));for(var d=2,p=s.length;d<p;d++)s[d]=+s[d]+t,s[++d]=+s[d]+n;r.pop(),r=r.concat(Xv(s,u));break;case"O":r.pop(),s=Zu(t,n,f[1],f[2]),s.push(s[0]),r=r.concat(s);break;case"U":r.pop(),r=r.concat(Zu(t,n,f[1],f[2],f[3])),c=["U"].concat(r[r.length-1].slice(-2));break;case"M":i=+f[1]+t,a=+f[2]+n;break;default:for(var d=1,p=f.length;d<p;d++)c[d]=+f[d]+(d%2?t:n)}else if(l==="R")s=[t,n].concat(f.slice(1)),r.pop(),r=r.concat(Xv(s,u)),c=["R"].concat(f.slice(-2));else if(l==="O")r.pop(),s=Zu(t,n,f[1],f[2]),s.push(s[0]),r=r.concat(s);else if(l==="U")r.pop(),r=r.concat(Zu(t,n,f[1],f[2],f[3])),c=["U"].concat(r[r.length-1].slice(-2));else for(var y=0,g=f.length;y<g;y++)c[y]=f[y];if(l=l.toUpperCase(),l!=="O")switch(c[0]){case"Z":t=+i,n=+a;break;case"H":t=c[1];break;case"V":n=c[1];break;case"M":i=c[c.length-2],a=c[c.length-1];break;default:t=c[c.length-2],n=c[c.length-1]}}return r},Qu=function(e,r,t,n){return[e,r,t,n,t,n]},nx=function(e,r,t,n,i,a){var o=.3333333333333333,l=2/3;return[o*e+l*t,o*r+l*n,o*i+l*t,o*a+l*n,i,a]},ix=function(e,r,t,n,i,a,o,l,s,u){t===n&&(t+=1);var c=Math.PI*120/180,f=Math.PI/180*(+i||0),h=[],v,d,p,y,g,m=function(Dt,Xt,Te){var ti=Dt*Math.cos(Te)-Xt*Math.sin(Te),ei=Dt*Math.sin(Te)+Xt*Math.cos(Te);return{x:ti,y:ei}};if(u)d=u[0],p=u[1],y=u[2],g=u[3];else{v=m(e,r,-f),e=v.x,r=v.y,v=m(l,s,-f),l=v.x,s=v.y,e===l&&r===s&&(l+=1,s+=1);var x=(e-l)/2,w=(r-s)/2,C=x*x/(t*t)+w*w/(n*n);C>1&&(C=Math.sqrt(C),t=C*t,n=C*n);var M=t*t,A=n*n,b=(a===o?-1:1)*Math.sqrt(Math.abs((M*A-M*w*w-A*x*x)/(M*w*w+A*x*x)));y=b*t*w/n+(e+l)/2,g=b*-n*x/t+(r+s)/2,d=Math.asin(((r-g)/n).toFixed(9)),p=Math.asin(((s-g)/n).toFixed(9)),d=e<y?Math.PI-d:d,p=l<y?Math.PI-p:p,d<0&&(d=Math.PI*2+d),p<0&&(p=Math.PI*2+p),o&&d>p&&(d=d-Math.PI*2),!o&&p>d&&(p=p-Math.PI*2)}var T=p-d;if(Math.abs(T)>c){var k=p,P=l,O=s;p=d+c*(o&&p>d?1:-1),l=y+t*Math.cos(p),s=g+n*Math.sin(p),h=ix(l,s,t,n,i,0,o,P,O,[p,k,y,g])}T=p-d;var V=Math.cos(d),W=Math.sin(d),q=Math.cos(p),L=Math.sin(p),H=Math.tan(T/4),N=4/3*t*H,_=4/3*n*H,$=[e,r],X=[e+N*W,r-_*V],K=[l+N*L,s-_*q],ct=[l,s];if(X[0]=2*$[0]-X[0],X[1]=2*$[1]-X[1],u)return[X,K,ct].concat(h);h=[X,K,ct].concat(h).join().split(",");for(var nt=[],ot=0,xt=h.length;ot<xt;ot++)nt[ot]=ot%2?m(h[ot-1],h[ot],f).y:m(h[ot],h[ot+1],f).x;return nt},Uv=function(e,r){var t=jv(e),n=r&&jv(r),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=[],l=[],s="",u="",c,f=function(x,w,C){var M,A;if(!x)return["C",w.x,w.y,w.x,w.y,w.x,w.y];switch(!(x[0]in{T:1,Q:1})&&(w.qx=w.qy=null),x[0]){case"M":w.X=x[1],w.Y=x[2];break;case"A":x=["C"].concat(ix.apply(0,[w.x,w.y].concat(x.slice(1))));break;case"S":C==="C"||C==="S"?(M=w.x*2-w.bx,A=w.y*2-w.by):(M=w.x,A=w.y),x=["C",M,A].concat(x.slice(1));break;case"T":C==="Q"||C==="T"?(w.qx=w.x*2-w.qx,w.qy=w.y*2-w.qy):(w.qx=w.x,w.qy=w.y),x=["C"].concat(nx(w.x,w.y,w.qx,w.qy,x[1],x[2]));break;case"Q":w.qx=x[1],w.qy=x[2],x=["C"].concat(nx(w.x,w.y,x[1],x[2],x[3],x[4]));break;case"L":x=["C"].concat(Qu(w.x,w.y,x[1],x[2]));break;case"H":x=["C"].concat(Qu(w.x,w.y,x[1],w.y));break;case"V":x=["C"].concat(Qu(w.x,w.y,w.x,x[1]));break;case"Z":x=["C"].concat(Qu(w.x,w.y,w.X,w.Y));break}return x},h=function(x,w){if(x[w].length>7){x[w].shift();for(var C=x[w];C.length;)o[w]="A",n&&(l[w]="A"),x.splice(w++,0,["C"].concat(C.splice(0,6)));x.splice(w,1),c=Math.max(t.length,n&&n.length||0)}},v=function(x,w,C,M,A){x&&w&&x[A][0]==="M"&&w[A][0]!=="M"&&(w.splice(A,0,["M",M.x,M.y]),C.bx=0,C.by=0,C.x=x[A][1],C.y=x[A][2],c=Math.max(t.length,n&&n.length||0))};c=Math.max(t.length,n&&n.length||0);for(var d=0;d<c;d++){t[d]&&(s=t[d][0]),s!=="C"&&(o[d]=s,d&&(u=o[d-1])),t[d]=f(t[d],i,u),o[d]!=="A"&&s==="C"&&(o[d]="C"),h(t,d),n&&(n[d]&&(s=n[d][0]),s!=="C"&&(l[d]=s,d&&(u=l[d-1])),n[d]=f(n[d],a,u),l[d]!=="A"&&s==="C"&&(l[d]="C"),h(n,d)),v(t,n,i,a,d),v(n,t,a,i,d);var p=t[d],y=n&&n[d],g=p.length,m=n&&y.length;i.x=p[g-2],i.y=p[g-1],i.bx=parseFloat(p[g-4])||i.x,i.by=parseFloat(p[g-3])||i.y,a.bx=n&&(parseFloat(y[m-4])||a.x),a.by=n&&(parseFloat(y[m-3])||a.y),a.x=n&&y[m-2],a.y=n&&y[m-1]}return n?[t,n]:t},kP=/,?([a-z]),?/gi,ax=function(e){return e.join(",").replace(kP,"$1")},ox=function(e,r,t,n,i){var a=-3*r+9*t-9*n+3*i,o=e*a+6*r-12*t+6*n;return e*o-3*r+3*t},lx=function(e,r,t,n,i,a,o,l,s){s===null&&(s=1),s=s>1?1:s<0?0:s;for(var u=s/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],v=0,d=0;d<c;d++){var p=u*f[d]+u,y=ox(p,e,t,i,o),g=ox(p,r,n,a,l),m=y*y+g*g;v+=h[d]*Math.sqrt(m)}return u*v},TP=function(e,r,t,n,i,a,o,l){for(var s=[],u=[[],[]],c,f,h,v,d=0;d<2;++d){if(d===0?(f=6*e-12*t+6*i,c=-3*e+9*t-9*i+3*o,h=3*t-3*e):(f=6*r-12*n+6*a,c=-3*r+9*n-9*a+3*l,h=3*n-3*r),Math.abs(c)<1e-12){if(Math.abs(f)<1e-12)continue;v=-h/f,v>0&&v<1&&s.push(v);continue}var p=f*f-4*h*c,y=Math.sqrt(p);if(!(p<0)){var g=(-f+y)/(2*c);g>0&&g<1&&s.push(g);var m=(-f-y)/(2*c);m>0&&m<1&&s.push(m)}}for(var x=s.length,w=x,C;x--;)v=s[x],C=1-v,u[0][x]=C*C*C*e+3*C*C*v*t+3*C*v*v*i+v*v*v*o,u[1][x]=C*C*C*r+3*C*C*v*n+3*C*v*v*a+v*v*v*l;return u[0][w]=e,u[1][w]=r,u[0][w+1]=o,u[1][w+1]=l,u[0].length=u[1].length=w+2,{min:{x:Math.min.apply(0,u[0]),y:Math.min.apply(0,u[1])},max:{x:Math.max.apply(0,u[0]),y:Math.max.apply(0,u[1])}}},IP=function(e,r,t,n,i,a,o,l){if(!(Math.max(e,t)<Math.min(i,o)||Math.min(e,t)>Math.max(i,o)||Math.max(r,n)<Math.min(a,l)||Math.min(r,n)>Math.max(a,l))){var s=(e*n-r*t)*(i-o)-(e-t)*(i*l-a*o),u=(e*n-r*t)*(a-l)-(r-n)*(i*l-a*o),c=(e-t)*(a-l)-(r-n)*(i-o);if(c){var f=s/c,h=u/c,v=+f.toFixed(2),d=+h.toFixed(2);if(!(v<+Math.min(e,t).toFixed(2)||v>+Math.max(e,t).toFixed(2)||v<+Math.min(i,o).toFixed(2)||v>+Math.max(i,o).toFixed(2)||d<+Math.min(r,n).toFixed(2)||d>+Math.max(r,n).toFixed(2)||d<+Math.min(a,l).toFixed(2)||d>+Math.max(a,l).toFixed(2)))return{x:f,y:h}}}},ci=function(e,r,t){return r>=e.x&&r<=e.x+e.width&&t>=e.y&&t<=e.y+e.height},sx=function(e,r,t,n,i){if(i)return[["M",+e+ +i,r],["l",t-i*2,0],["a",i,i,0,0,1,i,i],["l",0,n-i*2],["a",i,i,0,0,1,-i,i],["l",i*2-t,0],["a",i,i,0,0,1,-i,-i],["l",0,i*2-n],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",e,r],["l",t,0],["l",0,n],["l",-t,0],["z"]];return a.parsePathArray=ax,a},qv=function(e,r,t,n){return e===null&&(e=r=t=n=0),r===null&&(r=e.y,t=e.width,n=e.height,e=e.x),{x:e,y:r,width:t,w:t,height:n,h:n,x2:e+t,y2:r+n,cx:e+t/2,cy:r+n/2,r1:Math.min(t,n)/2,r2:Math.max(t,n)/2,r0:Math.sqrt(t*t+n*n)/2,path:sx(e,r,t,n),vb:[e,r,t,n].join(" ")}},PP=function(e,r){return e=qv(e),r=qv(r),ci(r,e.x,e.y)||ci(r,e.x2,e.y)||ci(r,e.x,e.y2)||ci(r,e.x2,e.y2)||ci(e,r.x,r.y)||ci(e,r.x2,r.y)||ci(e,r.x,r.y2)||ci(e,r.x2,r.y2)||(e.x<r.x2&&e.x>r.x||r.x<e.x2&&r.x>e.x)&&(e.y<r.y2&&e.y>r.y||r.y<e.y2&&r.y>e.y)},ux=function(e,r,t,n,i,a,o,l){G(e)||(e=[e,r,t,n,i,a,o,l]);var s=TP.apply(null,e);return qv(s.min.x,s.min.y,s.max.x-s.min.x,s.max.y-s.min.y)},cx=function(e,r,t,n,i,a,o,l,s){var u=1-s,c=Math.pow(u,3),f=Math.pow(u,2),h=s*s,v=h*s,d=c*e+f*3*s*t+u*3*s*s*i+v*o,p=c*r+f*3*s*n+u*3*s*s*a+v*l,y=e+2*s*(t-e)+h*(i-2*t+e),g=r+2*s*(n-r)+h*(a-2*n+r),m=t+2*s*(i-t)+h*(o-2*i+t),x=n+2*s*(a-n)+h*(l-2*a+n),w=u*e+s*t,C=u*r+s*n,M=u*i+s*o,A=u*a+s*l,b=90-Math.atan2(y-m,g-x)*180/Math.PI;return{x:d,y:p,m:{x:y,y:g},n:{x:m,y:x},start:{x:w,y:C},end:{x:M,y:A},alpha:b}},LP=function(e,r,t){var n=ux(e),i=ux(r);if(!PP(n,i))return t?0:[];for(var a=lx.apply(0,e),o=lx.apply(0,r),l=~~(a/8),s=~~(o/8),u=[],c=[],f={},h=t?0:[],v=0;v<l+1;v++){var d=cx.apply(0,e.concat(v/l));u.push({x:d.x,y:d.y,t:v/l})}for(var v=0;v<s+1;v++){var d=cx.apply(0,r.concat(v/s));c.push({x:d.x,y:d.y,t:v/s})}for(var v=0;v<l;v++)for(var p=0;p<s;p++){var y=u[v],g=u[v+1],m=c[p],x=c[p+1],w=Math.abs(g.x-y.x)<.001?"y":"x",C=Math.abs(x.x-m.x)<.001?"y":"x",M=IP(y.x,y.y,g.x,g.y,m.x,m.y,x.x,x.y);if(M){if(f[M.x.toFixed(4)]===M.y.toFixed(4))continue;f[M.x.toFixed(4)]=M.y.toFixed(4);var A=y.t+Math.abs((M[w]-y[w])/(g[w]-y[w]))*(g.t-y.t),b=m.t+Math.abs((M[C]-m[C])/(x[C]-m[C]))*(x.t-m.t);A>=0&&A<=1&&b>=0&&b<=1&&(t?h+=1:h.push({x:M.x,y:M.y,t1:A,t2:b}))}}return h},OP=function(e,r,t){e=Uv(e),r=Uv(r);for(var n,i,a,o,l,s,u,c,f,h,v=t?0:[],d=0,p=e.length;d<p;d++){var y=e[d];if(y[0]==="M")n=l=y[1],i=s=y[2];else{y[0]==="C"?(f=[n,i].concat(y.slice(1)),n=f[6],i=f[7]):(f=[n,i,n,i,l,s,l,s],n=l,i=s);for(var g=0,m=r.length;g<m;g++){var x=r[g];if(x[0]==="M")a=u=x[1],o=c=x[2];else{x[0]==="C"?(h=[a,o].concat(x.slice(1)),a=h[6],o=h[7]):(h=[a,o,a,o,u,c,u,c],a=u,o=c);var w=LP(f,h,t);if(t)v+=w;else{for(var C=0,M=w.length;C<M;C++)w[C].segment1=d,w[C].segment2=g,w[C].bez1=f,w[C].bez2=h;v=v.concat(w)}}}}}return v},DP=function(e,r){return OP(e,r)};function BP(e,r){var t=[],n=[];function i(a,o){if(a.length===1)t.push(a[0]),n.push(a[0]);else{for(var l=[],s=0;s<a.length-1;s++)s===0&&t.push(a[0]),s===a.length-2&&n.push(a[s+1]),l[s]=[(1-o)*a[s][0]+o*a[s+1][0],(1-o)*a[s][1]+o*a[s+1][1]];i(l,o)}}return e.length&&i(e,r),{left:t,right:n.reverse()}}function RP(e,r,t){var n=[[e[1],e[2]]];t=t||2;var i=[];r[0]==="A"?(n.push(r[6]),n.push(r[7])):r[0]==="C"?(n.push([r[1],r[2]]),n.push([r[3],r[4]]),n.push([r[5],r[6]])):r[0]==="S"||r[0]==="Q"?(n.push([r[1],r[2]]),n.push([r[3],r[4]])):n.push([r[1],r[2]]);for(var a=n,o=1/t,l=0;l<t-1;l++){var s=o/(1-o*l),u=BP(a,s);i.push(u.left),a=u.right}i.push(a);var c=i.map(function(f){var h=[];return f.length===4&&(h.push("C"),h=h.concat(f[2])),f.length>=3&&(f.length===3&&h.push("Q"),h=h.concat(f[1])),f.length===2&&h.push("L"),h=h.concat(f[f.length-1]),h});return c}var NP=function(e,r,t){if(t===1)return[[].concat(e)];var n=[];if(r[0]==="L"||r[0]==="C"||r[0]==="Q")n=n.concat(RP(e,r,t));else{var i=[].concat(e);i[0]==="M"&&(i[0]="L");for(var a=0;a<=t-1;a++)n.push(i)}return n},zP=function(e,r){if(e.length===1)return e;var t=e.length-1,n=r.length-1,i=t/n,a=[];if(e.length===1&&e[0][0]==="M"){for(var o=0;o<n-t;o++)e.push(e[0]);return e}for(var o=0;o<n;o++){var l=Math.floor(i*o);a[l]=(a[l]||0)+1}var s=a.reduce(function(u,c,f){return f===t?u.concat(e[t]):u.concat(NP(e[f],e[f+1],c))},[]);return s.unshift(e[0]),(r[n]==="Z"||r[n]==="z")&&s.push("Z"),s},YP=function(e,r){if(e.length!==r.length)return!1;var t=!0;return F(e,function(n,i){if(n!==r[i])return t=!1,!1}),t};function VP(e,r,t){var n=null,i=t;return r<i&&(i=r,n="add"),e<i&&(i=e,n="del"),{type:n,min:i}}var _P=function(e,r){var t=e.length,n=r.length,i,a,o=0;if(t===0||n===0)return null;for(var l=[],s=0;s<=t;s++)l[s]=[],l[s][0]={min:s};for(var u=0;u<=n;u++)l[0][u]={min:u};for(var s=1;s<=t;s++){i=e[s-1];for(var u=1;u<=n;u++){a=r[u-1],YP(i,a)?o=0:o=1;var c=l[s-1][u].min+1,f=l[s][u-1].min+1,h=l[s-1][u-1].min+o;l[s][u]=VP(c,f,h)}}return l},fx=function(e,r){var t=_P(e,r),n=e.length,i=r.length,a=[],o=1,l=1;if(t[n][i].min!==n){for(var s=1;s<=n;s++){var u=t[s][s].min;l=s;for(var c=o;c<=i;c++)t[s][c].min<u&&(u=t[s][c].min,l=c);o=l,t[s][o].type&&a.push({index:s-1,type:t[s][o].type})}for(var s=a.length-1;s>=0;s--)o=a[s].index,a[s].type==="add"?e.splice(o,0,[].concat(e[o])):e.splice(o,1)}n=e.length;var f=i-n;if(n<i)for(var s=0;s<f;s++)e[n-1][0]==="z"||e[n-1][0]==="Z"?e.splice(n-2,0,e[n-2]):e.push(e[n-1]),n+=1;return e};function Zv(e,r,t){for(var n=[].concat(e),i,a=1/(t+1),o=hx(r)[0],l=1;l<=t;l++)a*=l,i=Math.floor(e.length*a),i===0?n.unshift([o[0]*a+e[i][0]*(1-a),o[1]*a+e[i][1]*(1-a)]):n.splice(i,0,[o[0]*a+e[i][0]*(1-a),o[1]*a+e[i][1]*(1-a)]);return n}function hx(e){var r=[];switch(e[0]){case"M":r.push([e[1],e[2]]);break;case"L":r.push([e[1],e[2]]);break;case"A":r.push([e[6],e[7]]);break;case"Q":r.push([e[3],e[4]]),r.push([e[1],e[2]]);break;case"T":r.push([e[1],e[2]]);break;case"C":r.push([e[5],e[6]]),r.push([e[1],e[2]]),r.push([e[3],e[4]]);break;case"S":r.push([e[3],e[4]]),r.push([e[1],e[2]]);break;case"H":r.push([e[1],e[1]]);break;case"V":r.push([e[1],e[1]]);break}return r}var Qv=function(e,r){if(e.length<=1)return e;for(var t,n=0;n<r.length;n++)if(e[n][0]!==r[n][0])switch(t=hx(e[n]),r[n][0]){case"M":e[n]=["M"].concat(t[0]);break;case"L":e[n]=["L"].concat(t[0]);break;case"A":e[n]=[].concat(r[n]),e[n][6]=t[0][0],e[n][7]=t[0][1];break;case"Q":if(t.length<2)if(n>0)t=Zv(t,e[n-1],1);else{e[n]=r[n];break}e[n]=["Q"].concat(t.reduce(function(i,a){return i.concat(a)},[]));break;case"T":e[n]=["T"].concat(t[0]);break;case"C":if(t.length<3)if(n>0)t=Zv(t,e[n-1],2);else{e[n]=r[n];break}e[n]=["C"].concat(t.reduce(function(i,a){return i.concat(a)},[]));break;case"S":if(t.length<2)if(n>0)t=Zv(t,e[n-1],1);else{e[n]=r[n];break}e[n]=["S"].concat(t.reduce(function(i,a){return i.concat(a)},[]));break;default:e[n]=r[n]}return e};const Kv=Object.freeze(Object.defineProperty({__proto__:null,catmullRomToBezier:Xv,fillPath:zP,fillPathByDiff:fx,formatPath:Qv,intersection:DP,parsePathArray:ax,parsePathString:yo,pathToAbsolute:jv,pathToCurve:Uv,rectPath:sx},Symbol.toStringTag,{value:"Module"}));var Rl=function(){function e(r,t){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=r,this.name=r,this.originalEvent=t,this.timeStamp=t.timeStamp}return e.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){this.propagationStopped=!0},e.prototype.toString=function(){var r=this.type;return"[Event (type="+r+")]"},e.prototype.save=function(){},e.prototype.restore=function(){},e}();function vx(e,r){var t=e.indexOf(r);t!==-1&&e.splice(t,1)}var dx=typeof window!="undefined"&&typeof window.document!="undefined";function px(e,r){if(e.isCanvas())return!0;for(var t=r.getParent(),n=!1;t;){if(t===e){n=!0;break}t=t.getParent()}return n}function Nl(e){return e.cfg.visible&&e.cfg.capture}var Ku=function(e){I(r,e);function r(t){var n=e.call(this)||this;n.destroyed=!1;var i=n.getDefaultCfg();return n.cfg=Tt(i,t),n}return r.prototype.getDefaultCfg=function(){return{}},r.prototype.get=function(t){return this.cfg[t]},r.prototype.set=function(t,n){this.cfg[t]=n},r.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},r}(Hv),gx=function(e,r,t){if(t||arguments.length===2)for(var n=0,i=r.length,a;n<i;n++)(a||!(n in r))&&(a||(a=Array.prototype.slice.call(r,0,n)),a[n]=r[n]);return e.concat(a||Array.prototype.slice.call(r))},$P=function(){function e(r,t,n){this.name=r,this.version=t,this.os=n,this.type="browser"}return e}(),GP=function(){function e(r){this.version=r,this.type="node",this.name="node",this.os=process.platform}return e}(),HP=function(){function e(r,t,n,i){this.name=r,this.version=t,this.os=n,this.bot=i,this.type="bot-device"}return e}(),WP=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),XP=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),jP=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,UP=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,yx=3,qP=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",jP]],mx=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function xx(e){return e?wx(e):typeof document=="undefined"&&typeof navigator!="undefined"&&navigator.product==="ReactNative"?new XP:typeof navigator!="undefined"?wx(navigator.userAgent):KP()}function ZP(e){return e!==""&&qP.reduce(function(r,t){var n=t[0],i=t[1];if(r)return r;var a=i.exec(e);return!!a&&[n,a]},!1)}function wx(e){var r=ZP(e);if(!r)return null;var t=r[0],n=r[1];if(t==="searchbot")return new WP;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<yx&&(i=gx(gx([],i,!0),JP(yx-i.length),!0)):i=[];var a=i.join("."),o=QP(e),l=UP.exec(e);return l&&l[1]?new HP(t,a,o,l[1]):new $P(t,a,o)}function QP(e){for(var r=0,t=mx.length;r<t;r++){var n=mx[r],i=n[0],a=n[1],o=a.exec(e);if(o)return i}return null}function KP(){var e=typeof process!="undefined"&&process.version;return e?new GP(process.version.slice(1)):null}function JP(e){for(var r=[],t=0;t<e;t++)r.push("0");return r}var Ju=typeof Float32Array!="undefined"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var e=0,r=arguments.length;r--;)e+=arguments[r]*arguments[r];return Math.sqrt(e)});function tL(e,r){var t=r[0],n=r[1],i=r[2],a=r[3],o=r[4],l=r[5],s=r[6],u=r[7],c=r[8],f=c*o-l*u,h=-c*a+l*s,v=u*a-o*s,d=t*f+n*h+i*v;return d?(d=1/d,e[0]=f*d,e[1]=(-c*n+i*u)*d,e[2]=(l*n-i*o)*d,e[3]=h*d,e[4]=(c*t-i*s)*d,e[5]=(-l*t+i*a)*d,e[6]=v*d,e[7]=(-u*t+n*s)*d,e[8]=(o*t-n*a)*d,e):null}function tc(e,r,t){var n=r[0],i=r[1],a=r[2],o=r[3],l=r[4],s=r[5],u=r[6],c=r[7],f=r[8],h=t[0],v=t[1],d=t[2],p=t[3],y=t[4],g=t[5],m=t[6],x=t[7],w=t[8];return e[0]=h*n+v*o+d*u,e[1]=h*i+v*l+d*c,e[2]=h*a+v*s+d*f,e[3]=p*n+y*o+g*u,e[4]=p*i+y*l+g*c,e[5]=p*a+y*s+g*f,e[6]=m*n+x*o+w*u,e[7]=m*i+x*l+w*c,e[8]=m*a+x*s+w*f,e}function eL(e,r){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=r[0],e[7]=r[1],e[8]=1,e}function rL(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=n,e[1]=t,e[2]=0,e[3]=-t,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function nL(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=r[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function iL(){var e=new Ju(3);return Ju!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function zl(e,r,t){var n=r[0],i=r[1],a=r[2];return e[0]=n*t[0]+i*t[3]+a*t[6],e[1]=n*t[1]+i*t[4]+a*t[7],e[2]=n*t[2]+i*t[5]+a*t[8],e}(function(){var e=iL();return function(r,t,n,i,a,o){var l,s;for(t||(t=3),n||(n=0),i?s=Math.min(i*t+n,r.length):s=r.length,l=n;l<s;l+=t)e[0]=r[l],e[1]=r[l+1],e[2]=r[l+2],a(e,e,o),r[l]=e[0],r[l+1]=e[1],r[l+2]=e[2];return r}})();function aL(){var e=new Ju(2);return Ju!=Float32Array&&(e[0]=0,e[1]=0),e}function un(e,r,t){return e[0]=r[0]+t[0],e[1]=r[1]+t[1],e}function Sx(e,r,t){return e[0]=r[0]-t[0],e[1]=r[1]-t[1],e}function ge(e,r,t){return e[0]=Math.min(r[0],t[0]),e[1]=Math.min(r[1],t[1]),e}function ye(e,r,t){return e[0]=Math.max(r[0],t[0]),e[1]=Math.max(r[1],t[1]),e}function Ye(e,r,t){return e[0]=r[0]*t,e[1]=r[1]*t,e}function mo(e,r){var t=r[0]-e[0],n=r[1]-e[1];return Math.hypot(t,n)}function xo(e){var r=e[0],t=e[1];return Math.hypot(r,t)}function Cx(e,r){var t=r[0],n=r[1],i=t*t+n*n;return i>0&&(i=1/Math.sqrt(i)),e[0]=r[0]*i,e[1]=r[1]*i,e}function oL(e,r){return e[0]*r[0]+e[1]*r[1]}function lL(e,r,t){var n=r[0],i=r[1];return e[0]=t[0]*n+t[3]*i+t[6],e[1]=t[1]*n+t[4]*i+t[7],e}function Jv(e,r){var t=e[0],n=e[1],i=r[0],a=r[1],o=Math.sqrt(t*t+n*n)*Math.sqrt(i*i+a*a),l=o&&(t*i+n*a)/o;return Math.acos(Math.min(Math.max(l,-1),1))}function sL(e,r){return e[0]===r[0]&&e[1]===r[1]}var ua=Sx;(function(){var e=aL();return function(r,t,n,i,a,o){var l,s;for(t||(t=2),n||(n=0),i?s=Math.min(i*t+n,r.length):s=r.length,l=n;l<s;l+=t)e[0]=r[l],e[1]=r[l+1],a(e,e,o),r[l]=e[0],r[l+1]=e[1];return r}})();function wo(e,r,t){var n=[0,0,0,0,0,0,0,0,0];return eL(n,t),tc(e,n,r)}function td(e,r,t){var n=[0,0,0,0,0,0,0,0,0];return rL(n,t),tc(e,n,r)}function Mx(e,r,t){var n=[0,0,0,0,0,0,0,0,0];return nL(n,t),tc(e,n,r)}function uL(e,r,t){return tc(e,t,r)}function ae(e,r){for(var t=e?[].concat(e):[1,0,0,0,1,0,0,0,1],n=0,i=r.length;n<i;n++){var a=r[n];switch(a[0]){case"t":wo(t,t,[a[1],a[2]]);break;case"s":Mx(t,t,[a[1],a[2]]);break;case"r":td(t,t,a[1]);break;case"m":uL(t,t,a[1]);break}}return t}function cL(e,r){return e[0]*r[1]-r[0]*e[1]}function ed(e,r,t){var n=Jv(e,r),i=cL(e,r)>=0;return t?i?Math.PI*2-n:n:i?n:Math.PI*2-n}function Ax(e,r){var t=[],n=e[0],i=e[1],a=e[2],o=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],h=r[0],v=r[1],d=r[2],p=r[3],y=r[4],g=r[5],m=r[6],x=r[7],w=r[8];return t[0]=h*n+v*o+d*u,t[1]=h*i+v*l+d*c,t[2]=h*a+v*s+d*f,t[3]=p*n+y*o+g*u,t[4]=p*i+y*l+g*c,t[5]=p*a+y*s+g*f,t[6]=m*n+x*o+w*u,t[7]=m*i+x*l+w*c,t[8]=m*a+x*s+w*f,t}function In(e,r){var t=[],n=r[0],i=r[1];return t[0]=e[0]*n+e[3]*i+e[6],t[1]=e[1]*n+e[4]*i+e[7],t}function ec(e){var r=[],t=e[0],n=e[1],i=e[2],a=e[3],o=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=c*o-l*u,h=-c*a+l*s,v=u*a-o*s,d=t*f+n*h+i*v;return d?(d=1/d,r[0]=f*d,r[1]=(-c*n+i*u)*d,r[2]=(l*n-i*o)*d,r[3]=h*d,r[4]=(c*t-i*s)*d,r[5]=(-l*t+i*a)*d,r[6]=v*d,r[7]=(-u*t+n*s)*d,r[8]=(o*t-n*a)*d,r):null}var Yl=ae,rd="matrix",fL=["zIndex","capture","visible","type"],hL=["repeat"],vL=":",dL="*";function pL(e){for(var r=[],t=0;t<e.length;t++)G(e[t])?r.push([].concat(e[t])):r.push(e[t]);return r}function gL(e,r){var t={},n=r.attrs;for(var i in e)t[i]=n[i];return t}function yL(e,r){var t={},n=r.attr();return F(e,function(i,a){hL.indexOf(a)===-1&&!Gt(n[a],i)&&(t[a]=i)}),t}function mL(e,r){if(r.onFrame)return e;var t=r.startTime,n=r.delay,i=r.duration,a=Object.prototype.hasOwnProperty;return F(e,function(o){t+n<o.startTime+o.delay+o.duration&&i>o.delay&&F(r.toAttrs,function(l,s){a.call(o.toAttrs,s)&&(delete o.toAttrs[s],delete o.fromAttrs[s])})}),e}var Fx=function(e){I(r,e);function r(t){var n=e.call(this,t)||this;n.attrs={};var i=n.getDefaultAttrs();return Tt(i,t.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return r.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},r.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},r.prototype.onCanvasChange=function(t){},r.prototype.initAttrs=function(t){},r.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},r.prototype.isGroup=function(){return!1},r.prototype.getParent=function(){return this.get("parent")},r.prototype.getCanvas=function(){return this.get("canvas")},r.prototype.attr=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=n[0],o=n[1];if(!a)return this.attrs;if(At(a)){for(var l in a)this.setAttr(l,a[l]);return this.afterAttrsChange(a),this}return n.length===2?(this.setAttr(a,o),this.afterAttrsChange((t={},t[a]=o,t)),this):this.attrs[a]},r.prototype.isClipped=function(t,n){var i=this.getClip();return i&&!i.isHit(t,n)},r.prototype.setAttr=function(t,n){var i=this.attrs[t];i!==n&&(this.attrs[t]=n,this.onAttrChange(t,n,i))},r.prototype.onAttrChange=function(t,n,i){t==="matrix"&&this.set("totalMatrix",null)},r.prototype.afterAttrsChange=function(t){if(this.cfg.isClipShape){var n=this.cfg.applyTo;n&&n.onCanvasChange("clip")}else this.onCanvasChange("attr")},r.prototype.show=function(){return this.set("visible",!0),this.onCanvasChange("show"),this},r.prototype.hide=function(){return this.set("visible",!1),this.onCanvasChange("hide"),this},r.prototype.setZIndex=function(t){this.set("zIndex",t);var n=this.getParent();return n&&n.sort(),this},r.prototype.toFront=function(){var t=this.getParent();if(t){var n=t.getChildren();this.get("el");var i=n.indexOf(this);n.splice(i,1),n.push(this),this.onCanvasChange("zIndex")}},r.prototype.toBack=function(){var t=this.getParent();if(t){var n=t.getChildren();this.get("el");var i=n.indexOf(this);n.splice(i,1),n.unshift(this),this.onCanvasChange("zIndex")}},r.prototype.remove=function(t){t===void 0&&(t=!0);var n=this.getParent();n?(vx(n.getChildren(),this),n.get("clearing")||this.onCanvasChange("remove")):this.onCanvasChange("remove"),t&&this.destroy()},r.prototype.resetMatrix=function(){this.attr(rd,this.getDefaultMatrix()),this.onCanvasChange("matrix")},r.prototype.getMatrix=function(){return this.attr(rd)},r.prototype.setMatrix=function(t){this.attr(rd,t),this.onCanvasChange("matrix")},r.prototype.getTotalMatrix=function(){var t=this.cfg.totalMatrix;if(!t){var n=this.attr("matrix"),i=this.cfg.parentMatrix;i&&n?t=Ax(i,n):t=n||i,this.set("totalMatrix",t)}return t},r.prototype.applyMatrix=function(t){var n=this.attr("matrix"),i=null;t&&n?i=Ax(t,n):i=n||t,this.set("totalMatrix",i),this.set("parentMatrix",t)},r.prototype.getDefaultMatrix=function(){return null},r.prototype.applyToMatrix=function(t){var n=this.attr("matrix");return n?In(n,t):t},r.prototype.invertFromMatrix=function(t){var n=this.attr("matrix");if(n){var i=ec(n);if(i)return In(i,t)}return t},r.prototype.setClip=function(t){var n=this.getCanvas(),i=null;if(t){var a=this.getShapeBase(),o=la(t.type),l=a[o];l&&(i=new l({type:t.type,isClipShape:!0,applyTo:this,attrs:t.attrs,canvas:n}))}return this.set("clipShape",i),this.onCanvasChange("clip"),i},r.prototype.getClip=function(){var t=this.cfg.clipShape;return t||null},r.prototype.clone=function(){var t=this,n=this.attrs,i={};F(n,function(l,s){G(n[s])?i[s]=pL(n[s]):i[s]=n[s]});var a=this.constructor,o=new a({attrs:i});return F(fL,function(l){o.set(l,t.get(l))}),o},r.prototype.destroy=function(){var t=this.destroyed;t||(this.attrs={},e.prototype.destroy.call(this))},r.prototype.isAnimatePaused=function(){return this.get("_pause").isPaused},r.prototype.animate=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!(!this.get("timeline")&&!this.get("canvas"))){this.set("animating",!0);var i=this.get("timeline");i||(i=this.get("canvas").get("timeline"),this.set("timeline",i));var a=this.get("animations")||[];i.timer||i.initTimer();var o=t[0],l=t[1],s=t[2],u=s===void 0?"easeLinear":s,c=t[3],f=c===void 0?li:c,h=t[4],v=h===void 0?0:h,d,p,y,g,m;Q(o)?(d=o,o={}):At(o)&&o.onFrame&&(d=o.onFrame,p=o.repeat),At(l)?(m=l,l=m.duration,u=m.easing||"easeLinear",v=m.delay||0,p=m.repeat||p||!1,f=m.callback||li,y=m.pauseCallback||li,g=m.resumeCallback||li):(st(f)&&(v=f,f=null),Q(u)?(f=u,u="easeLinear"):u=u||"easeLinear");var x=yL(o,this),w={fromAttrs:gL(x,this),toAttrs:x,duration:l,easing:u,repeat:p,callback:f,pauseCallback:y,resumeCallback:g,delay:v,startTime:i.getTime(),id:oi(),onFrame:d,pathFormatted:!1};a.length>0?a=mL(a,w):i.addAnimator(this),a.push(w),this.set("animations",a),this.set("_pause",{isPaused:!1})}},r.prototype.stopAnimate=function(t){var n=this;t===void 0&&(t=!0);var i=this.get("animations");F(i,function(a){t&&(a.onFrame?n.attr(a.onFrame(1)):n.attr(a.toAttrs)),a.callback&&a.callback()}),this.set("animating",!1),this.set("animations",[])},r.prototype.pauseAnimate=function(){var t=this.get("timeline"),n=this.get("animations"),i=t.getTime();return F(n,function(a){a._paused=!0,a._pauseTime=i,a.pauseCallback&&a.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:i}),this},r.prototype.resumeAnimate=function(){var t=this.get("timeline"),n=t.getTime(),i=this.get("animations"),a=this.get("_pause").pauseTime;return F(i,function(o){o.startTime=o.startTime+(n-a),o._paused=!1,o._pauseTime=null,o.resumeCallback&&o.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",i),this},r.prototype.emitDelegation=function(t,n){var i=this,a=n.propagationPath;this.getEvents();var o;t==="mouseenter"?o=n.fromShape:t==="mouseleave"&&(o=n.toShape);for(var l=function(f){var h=a[f],v=h.get("name");if(v){if((h.isGroup()||h.isCanvas&&h.isCanvas())&&o&&px(h,o))return"break";G(v)?F(v,function(d){i.emitDelegateEvent(h,d,n)}):s.emitDelegateEvent(h,v,n)}},s=this,u=0;u<a.length;u++){var c=l(u);if(c==="break")break}},r.prototype.emitDelegateEvent=function(t,n,i){var a=this.getEvents(),o=n+vL+i.type;(a[o]||a[dL])&&(i.name=o,i.currentTarget=t,i.delegateTarget=this,i.delegateObject=t.get("delegateObject"),this.emit(o,i))},r.prototype.translate=function(t,n){t===void 0&&(t=0),n===void 0&&(n=0);var i=this.getMatrix(),a=Yl(i,[["t",t,n]]);return this.setMatrix(a),this},r.prototype.move=function(t,n){var i=this.attr("x")||0,a=this.attr("y")||0;return this.translate(t-i,n-a),this},r.prototype.moveTo=function(t,n){return this.move(t,n)},r.prototype.scale=function(t,n){var i=this.getMatrix(),a=Yl(i,[["s",t,n||t]]);return this.setMatrix(a),this},r.prototype.rotate=function(t){var n=this.getMatrix(),i=Yl(n,[["r",t]]);return this.setMatrix(i),this},r.prototype.rotateAtStart=function(t){var n=this.attr(),i=n.x,a=n.y,o=this.getMatrix(),l=Yl(o,[["t",-i,-a],["r",t],["t",i,a]]);return this.setMatrix(l),this},r.prototype.rotateAtPoint=function(t,n,i){var a=this.getMatrix(),o=Yl(a,[["t",-t,-n],["r",i],["t",t,n]]);return this.setMatrix(o),this},r}(Ku),bx={},nd="_INDEX";function Ex(e,r){if(e.set("canvas",r),e.isGroup()){var t=e.get("children");t.length&&t.forEach(function(n){Ex(n,r)})}}function kx(e,r){if(e.set("timeline",r),e.isGroup()){var t=e.get("children");t.length&&t.forEach(function(n){kx(n,r)})}}function xL(e,r,t){t===void 0&&(t=!0),t?r.destroy():(r.set("parent",null),r.set("canvas",null)),vx(e.getChildren(),r)}function wL(e){return function(r,t){var n=e(r,t);return n===0?r[nd]-t[nd]:n}}var Tx=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.isCanvas=function(){return!1},r.prototype.getBBox=function(){var t=1/0,n=-1/0,i=1/0,a=-1/0,o=this.getChildren().filter(function(s){return s.get("visible")&&(!s.isGroup()||s.isGroup()&&s.getChildren().length>0)});o.length>0?F(o,function(s){var u=s.getBBox(),c=u.minX,f=u.maxX,h=u.minY,v=u.maxY;c<t&&(t=c),f>n&&(n=f),h<i&&(i=h),v>a&&(a=v)}):(t=0,n=0,i=0,a=0);var l={x:t,y:i,minX:t,minY:i,maxX:n,maxY:a,width:n-t,height:a-i};return l},r.prototype.getCanvasBBox=function(){var t=1/0,n=-1/0,i=1/0,a=-1/0,o=this.getChildren().filter(function(s){return s.get("visible")&&(!s.isGroup()||s.isGroup()&&s.getChildren().length>0)});o.length>0?F(o,function(s){var u=s.getCanvasBBox(),c=u.minX,f=u.maxX,h=u.minY,v=u.maxY;c<t&&(t=c),f>n&&(n=f),h<i&&(i=h),v>a&&(a=v)}):(t=0,n=0,i=0,a=0);var l={x:t,y:i,minX:t,minY:i,maxX:n,maxY:a,width:n-t,height:a-i};return l},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.children=[],t},r.prototype.onAttrChange=function(t,n,i){if(e.prototype.onAttrChange.call(this,t,n,i),t==="matrix"){var a=this.getTotalMatrix();this._applyChildrenMarix(a)}},r.prototype.applyMatrix=function(t){var n=this.getTotalMatrix();e.prototype.applyMatrix.call(this,t);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},r.prototype._applyChildrenMarix=function(t){var n=this.getChildren();F(n,function(i){i.applyMatrix(t)})},r.prototype.addShape=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=t[0],a=t[1];At(i)?a=i:a.type=i;var o=bx[a.type];o||(o=la(a.type),bx[a.type]=o);var l=this.getShapeBase(),s=new l[o](a);return this.add(s),s},r.prototype.addGroup=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=t[0],a=t[1],o;if(Q(i))a?o=new i(a):o=new i({parent:this});else{var l=i||{},s=this.getGroupBase();o=new s(l)}return this.add(o),o},r.prototype.getCanvas=function(){var t;return this.isCanvas()?t=this:t=this.get("canvas"),t},r.prototype.getShape=function(t,n,i){if(!Nl(this))return null;var a=this.getChildren(),o;if(this.isCanvas())o=this._findShape(a,t,n,i);else{var l=[t,n,1];l=this.invertFromMatrix(l),this.isClipped(l[0],l[1])||(o=this._findShape(a,l[0],l[1],i))}return o},r.prototype._findShape=function(t,n,i,a){for(var o=null,l=t.length-1;l>=0;l--){var s=t[l];if(Nl(s)&&(s.isGroup()?o=s.getShape(n,i,a):s.isHit(n,i)&&(o=s)),o)break}return o},r.prototype.add=function(t){var n=this.getCanvas(),i=this.getChildren(),a=this.get("timeline"),o=t.getParent();o&&xL(o,t,!1),t.set("parent",this),n&&Ex(t,n),a&&kx(t,a),i.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},r.prototype._applyElementMatrix=function(t){var n=this.getTotalMatrix();n&&t.applyMatrix(n)},r.prototype.getChildren=function(){return this.get("children")},r.prototype.sort=function(){var t=this.getChildren();F(t,function(n,i){return n[nd]=i,n}),t.sort(wL(function(n,i){return n.get("zIndex")-i.get("zIndex")})),this.onCanvasChange("sort")},r.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),n=t.length-1;n>=0;n--)t[n].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},r.prototype.destroy=function(){this.get("destroyed")||(this.clear(),e.prototype.destroy.call(this))},r.prototype.getFirst=function(){return this.getChildByIndex(0)},r.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},r.prototype.getChildByIndex=function(t){var n=this.getChildren();return n[t]},r.prototype.getCount=function(){var t=this.getChildren();return t.length},r.prototype.contain=function(t){var n=this.getChildren();return n.indexOf(t)>-1},r.prototype.removeChild=function(t,n){n===void 0&&(n=!0),this.contain(t)&&t.remove(n)},r.prototype.findAll=function(t){var n=[],i=this.getChildren();return F(i,function(a){t(a)&&n.push(a),a.isGroup()&&(n=n.concat(a.findAll(t)))}),n},r.prototype.find=function(t){var n=null,i=this.getChildren();return F(i,function(a){if(t(a)?n=a:a.isGroup()&&(n=a.find(t)),n)return!1}),n},r.prototype.findById=function(t){return this.find(function(n){return n.get("id")===t})},r.prototype.findByClassName=function(t){return this.find(function(n){return n.get("className")===t})},r.prototype.findAllByName=function(t){return this.findAll(function(n){return n.get("name")===t})},r}(Fx),So=0,Vl=0,_l=0,Ix=1e3,rc,$l,nc=0,ca=0,ic=0,Gl=typeof performance=="object"&&performance.now?performance:Date,Px=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Lx(){return ca||(Px(SL),ca=Gl.now()+ic)}function SL(){ca=0}function id(){this._call=this._time=this._next=null}id.prototype=Ox.prototype={constructor:id,restart:function(e,r,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?Lx():+t)+(r==null?0:+r),!this._next&&$l!==this&&($l?$l._next=this:rc=this,$l=this),this._call=e,this._time=t,ad()},stop:function(){this._call&&(this._call=null,this._time=1/0,ad())}};function Ox(e,r,t){var n=new id;return n.restart(e,r,t),n}function CL(){Lx(),++So;for(var e=rc,r;e;)(r=ca-e._time)>=0&&e._call.call(null,r),e=e._next;--So}function Dx(){ca=(nc=Gl.now())+ic,So=Vl=0;try{CL()}finally{So=0,AL(),ca=0}}function ML(){var e=Gl.now(),r=e-nc;r>Ix&&(ic-=r,nc=e)}function AL(){for(var e,r=rc,t,n=1/0;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:rc=t);$l=e,ad(n)}function ad(e){if(!So){Vl&&(Vl=clearTimeout(Vl));var r=e-ca;r>24?(e<1/0&&(Vl=setTimeout(Dx,e-Gl.now()-ic)),_l&&(_l=clearInterval(_l))):(_l||(nc=Gl.now(),_l=setInterval(ML,Ix)),So=1,Px(Dx))}}function od(e,r,t){e.prototype=r.prototype=t,t.constructor=e}function Bx(e,r){var t=Object.create(e.prototype);for(var n in r)t[n]=r[n];return t}function Hl(){}var Wl=.7,ac=1/Wl,Co="\\s*([+-]?\\d+)\\s*",Xl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",FL=/^#([0-9a-f]{3,8})$/,bL=new RegExp(`^rgb\\(${Co},${Co},${Co}\\)$`),EL=new RegExp(`^rgb\\(${cn},${cn},${cn}\\)$`),kL=new RegExp(`^rgba\\(${Co},${Co},${Co},${Xl}\\)$`),TL=new RegExp(`^rgba\\(${cn},${cn},${cn},${Xl}\\)$`),IL=new RegExp(`^hsl\\(${Xl},${cn},${cn}\\)$`),PL=new RegExp(`^hsla\\(${Xl},${cn},${cn},${Xl}\\)$`),Rx={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};od(Hl,jl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Nx,formatHex:Nx,formatHex8:LL,formatHsl:OL,formatRgb:zx,toString:zx});function Nx(){return this.rgb().formatHex()}function LL(){return this.rgb().formatHex8()}function OL(){return Gx(this).formatHsl()}function zx(){return this.rgb().formatRgb()}function jl(e){var r,t;return e=(e+"").trim().toLowerCase(),(r=FL.exec(e))?(t=r[1].length,r=parseInt(r[1],16),t===6?Yx(r):t===3?new Ue(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):t===8?oc(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):t===4?oc(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=bL.exec(e))?new Ue(r[1],r[2],r[3],1):(r=EL.exec(e))?new Ue(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=kL.exec(e))?oc(r[1],r[2],r[3],r[4]):(r=TL.exec(e))?oc(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=IL.exec(e))?$x(r[1],r[2]/100,r[3]/100,1):(r=PL.exec(e))?$x(r[1],r[2]/100,r[3]/100,r[4]):Rx.hasOwnProperty(e)?Yx(Rx[e]):e==="transparent"?new Ue(NaN,NaN,NaN,0):null}function Yx(e){return new Ue(e>>16&255,e>>8&255,e&255,1)}function oc(e,r,t,n){return n<=0&&(e=r=t=NaN),new Ue(e,r,t,n)}function DL(e){return e instanceof Hl||(e=jl(e)),e?(e=e.rgb(),new Ue(e.r,e.g,e.b,e.opacity)):new Ue}function ld(e,r,t,n){return arguments.length===1?DL(e):new Ue(e,r,t,n==null?1:n)}function Ue(e,r,t,n){this.r=+e,this.g=+r,this.b=+t,this.opacity=+n}od(Ue,ld,Bx(Hl,{brighter(e){return e=e==null?ac:Math.pow(ac,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Wl:Math.pow(Wl,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ue(fa(this.r),fa(this.g),fa(this.b),lc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Vx,formatHex:Vx,formatHex8:BL,formatRgb:_x,toString:_x}));function Vx(){return`#${ha(this.r)}${ha(this.g)}${ha(this.b)}`}function BL(){return`#${ha(this.r)}${ha(this.g)}${ha(this.b)}${ha((isNaN(this.opacity)?1:this.opacity)*255)}`}function _x(){const e=lc(this.opacity);return`${e===1?"rgb(":"rgba("}${fa(this.r)}, ${fa(this.g)}, ${fa(this.b)}${e===1?")":`, ${e})`}`}function lc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ha(e){return e=fa(e),(e<16?"0":"")+e.toString(16)}function $x(e,r,t,n){return n<=0?e=r=t=NaN:t<=0||t>=1?e=r=NaN:r<=0&&(e=NaN),new Wr(e,r,t,n)}function Gx(e){if(e instanceof Wr)return new Wr(e.h,e.s,e.l,e.opacity);if(e instanceof Hl||(e=jl(e)),!e)return new Wr;if(e instanceof Wr)return e;e=e.rgb();var r=e.r/255,t=e.g/255,n=e.b/255,i=Math.min(r,t,n),a=Math.max(r,t,n),o=NaN,l=a-i,s=(a+i)/2;return l?(r===a?o=(t-n)/l+(t<n)*6:t===a?o=(n-r)/l+2:o=(r-t)/l+4,l/=s<.5?a+i:2-a-i,o*=60):l=s>0&&s<1?0:o,new Wr(o,l,s,e.opacity)}function RL(e,r,t,n){return arguments.length===1?Gx(e):new Wr(e,r,t,n==null?1:n)}function Wr(e,r,t,n){this.h=+e,this.s=+r,this.l=+t,this.opacity=+n}od(Wr,RL,Bx(Hl,{brighter(e){return e=e==null?ac:Math.pow(ac,e),new Wr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Wl:Math.pow(Wl,e),new Wr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*r,i=2*t-n;return new Ue(sd(e>=240?e-240:e+120,i,n),sd(e,i,n),sd(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Wr(Hx(this.h),sc(this.s),sc(this.l),lc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=lc(this.opacity);return`${e===1?"hsl(":"hsla("}${Hx(this.h)}, ${sc(this.s)*100}%, ${sc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Hx(e){return e=(e||0)%360,e<0?e+360:e}function sc(e){return Math.max(0,Math.min(1,e||0))}function sd(e,r,t){return(e<60?r+(t-r)*e/60:e<180?t:e<240?r+(t-r)*(240-e)/60:r)*255}const ud=e=>()=>e;function NL(e,r){return function(t){return e+t*r}}function zL(e,r,t){return e=Math.pow(e,t),r=Math.pow(r,t)-e,t=1/t,function(n){return Math.pow(e+n*r,t)}}function YL(e){return(e=+e)==1?Wx:function(r,t){return t-r?zL(r,t,e):ud(isNaN(r)?t:r)}}function Wx(e,r){var t=r-e;return t?NL(e,t):ud(isNaN(e)?r:e)}const Xx=function e(r){var t=YL(r);function n(i,a){var o=t((i=ld(i)).r,(a=ld(a)).r),l=t(i.g,a.g),s=t(i.b,a.b),u=Wx(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=l(c),i.b=s(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function jx(e,r){r||(r=[]);var t=e?Math.min(r.length,e.length):0,n=r.slice(),i;return function(a){for(i=0;i<t;++i)n[i]=e[i]*(1-a)+r[i]*a;return n}}function Ux(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function VL(e,r){return(Ux(r)?jx:qx)(e,r)}function qx(e,r){var t=r?r.length:0,n=e?Math.min(t,e.length):0,i=new Array(n),a=new Array(t),o;for(o=0;o<n;++o)i[o]=uc(e[o],r[o]);for(;o<t;++o)a[o]=r[o];return function(l){for(o=0;o<n;++o)a[o]=i[o](l);return a}}function _L(e,r){var t=new Date;return e=+e,r=+r,function(n){return t.setTime(e*(1-n)+r*n),t}}function cd(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}function $L(e,r){var t={},n={},i;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(i in r)i in e?t[i]=uc(e[i],r[i]):n[i]=r[i];return function(a){for(i in t)n[i]=t[i](a);return n}}var fd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hd=new RegExp(fd.source,"g");function GL(e){return function(){return e}}function HL(e){return function(r){return e(r)+""}}function WL(e,r){var t=fd.lastIndex=hd.lastIndex=0,n,i,a,o=-1,l=[],s=[];for(e=e+"",r=r+"";(n=fd.exec(e))&&(i=hd.exec(r));)(a=i.index)>t&&(a=r.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,s.push({i:o,x:cd(n,i)})),t=hd.lastIndex;return t<r.length&&(a=r.slice(t),l[o]?l[o]+=a:l[++o]=a),l.length<2?s[0]?HL(s[0].x):GL(r):(r=s.length,function(u){for(var c=0,f;c<r;++c)l[(f=s[c]).i]=f.x(u);return l.join("")})}function uc(e,r){var t=typeof r,n;return r==null||t==="boolean"?ud(r):(t==="number"?cd:t==="string"?(n=jl(r))?(r=n,Xx):WL:r instanceof jl?Xx:r instanceof Date?_L:Ux(r)?jx:Array.isArray(r)?qx:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?$L:cd)(e,r)}function XL(e){return+e}function jL(e){return e*e}function UL(e){return e*(2-e)}function Zx(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function qL(e){return e*e*e}function ZL(e){return--e*e*e+1}function Qx(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var vd=3,QL=function e(r){r=+r;function t(n){return Math.pow(n,r)}return t.exponent=e,t}(vd),KL=function e(r){r=+r;function t(n){return 1-Math.pow(1-n,r)}return t.exponent=e,t}(vd),Kx=function e(r){r=+r;function t(n){return((n*=2)<=1?Math.pow(n,r):2-Math.pow(2-n,r))/2}return t.exponent=e,t}(vd),Jx=Math.PI,t1=Jx/2;function JL(e){return+e==1?1:1-Math.cos(e*t1)}function tO(e){return Math.sin(e*t1)}function e1(e){return(1-Math.cos(Jx*e))/2}function fi(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function eO(e){return fi(1-+e)}function rO(e){return 1-fi(e)}function r1(e){return((e*=2)<=1?fi(1-e):2-fi(e-1))/2}function nO(e){return 1-Math.sqrt(1-e*e)}function iO(e){return Math.sqrt(1- --e*e)}function n1(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var dd=4/11,aO=6/11,oO=8/11,lO=3/4,sO=9/11,uO=10/11,cO=15/16,fO=21/22,hO=63/64,cc=1/dd/dd;function vO(e){return 1-Ul(1-e)}function Ul(e){return(e=+e)<dd?cc*e*e:e<oO?cc*(e-=aO)*e+lO:e<uO?cc*(e-=sO)*e+cO:cc*(e-=fO)*e+hO}function dO(e){return((e*=2)<=1?1-Ul(1-e):Ul(e-1)+1)/2}var pd=1.70158,pO=function e(r){r=+r;function t(n){return(n=+n)*n*(r*(n-1)+n)}return t.overshoot=e,t}(pd),gO=function e(r){r=+r;function t(n){return--n*n*((n+1)*r+n)+1}return t.overshoot=e,t}(pd),i1=function e(r){r=+r;function t(n){return((n*=2)<1?n*n*((r+1)*n-r):(n-=2)*n*((r+1)*n+r)+2)/2}return t.overshoot=e,t}(pd),Mo=2*Math.PI,gd=1,yd=.3,yO=function e(r,t){var n=Math.asin(1/(r=Math.max(1,r)))*(t/=Mo);function i(a){return r*fi(- --a)*Math.sin((n-a)/t)}return i.amplitude=function(a){return e(a,t*Mo)},i.period=function(a){return e(r,a)},i}(gd,yd),a1=function e(r,t){var n=Math.asin(1/(r=Math.max(1,r)))*(t/=Mo);function i(a){return 1-r*fi(a=+a)*Math.sin((a+n)/t)}return i.amplitude=function(a){return e(a,t*Mo)},i.period=function(a){return e(r,a)},i}(gd,yd),mO=function e(r,t){var n=Math.asin(1/(r=Math.max(1,r)))*(t/=Mo);function i(a){return((a=a*2-1)<0?r*fi(-a)*Math.sin((n-a)/t):2-r*fi(a)*Math.sin((n+a)/t))/2}return i.amplitude=function(a){return e(a,t*Mo)},i.period=function(a){return e(r,a)},i}(gd,yd);const xO=Object.freeze(Object.defineProperty({__proto__:null,easeBack:i1,easeBackIn:pO,easeBackInOut:i1,easeBackOut:gO,easeBounce:Ul,easeBounceIn:vO,easeBounceInOut:dO,easeBounceOut:Ul,easeCircle:n1,easeCircleIn:nO,easeCircleInOut:n1,easeCircleOut:iO,easeCubic:Qx,easeCubicIn:qL,easeCubicInOut:Qx,easeCubicOut:ZL,easeElastic:a1,easeElasticIn:yO,easeElasticInOut:mO,easeElasticOut:a1,easeExp:r1,easeExpIn:eO,easeExpInOut:r1,easeExpOut:rO,easeLinear:XL,easePoly:Kx,easePolyIn:QL,easePolyInOut:Kx,easePolyOut:KL,easeQuad:Zx,easeQuadIn:jL,easeQuadInOut:Zx,easeQuadOut:UL,easeSin:e1,easeSinIn:JL,easeSinInOut:e1,easeSinOut:tO},Symbol.toStringTag,{value:"Module"}));var o1={};function wO(e){return o1[e.toLowerCase()]||xO[e]}function l1(e,r){o1[e.toLowerCase()]=r}var SO=function(e){return["fill","stroke","fillStyle","strokeStyle"].includes(e)},CO=function(e){return/^[r,R,L,l]{1}[\s]*\(/.test(e)},s1=[1,0,0,0,1,0,0,0,1];function MO(e,r,t){var n={},i=r.fromAttrs,a=r.toAttrs;if(!e.destroyed){var o;for(var l in a)if(!Gt(i[l],a[l]))if(l==="path"){var s=a[l],u=i[l];s.length>u.length?(s=yo(a[l]),u=yo(i[l]),u=fx(u,s),u=Qv(u,s),r.fromAttrs.path=u,r.toAttrs.path=s):r.pathFormatted||(s=yo(a[l]),u=yo(i[l]),u=Qv(u,s),r.fromAttrs.path=u,r.toAttrs.path=s,r.pathFormatted=!0),n[l]=[];for(var c=0;c<s.length;c++){for(var f=s[c],h=u[c],v=[],d=0;d<f.length;d++)st(f[d])&&h&&st(h[d])?(o=uc(h[d],f[d]),v.push(o(t))):v.push(f[d]);n[l].push(v)}}else if(l==="matrix"){var p=VL(i[l]||s1,a[l]||s1),y=p(t);n[l]=y}else SO(l)&&CO(a[l])?n[l]=a[l]:Q(a[l])||(o=uc(i[l],a[l]),n[l]=o(t));e.attr(n)}}function AO(e,r,t){var n=r.startTime,i=r.delay;if(t<n+i||r._paused)return!1;var a,o=r.duration,l=r.easing,s=wO(l);if(t=t-n-r.delay,r.repeat)a=t%o/o,a=s(a);else if(a=t/o,a<1)a=s(a);else return r.onFrame?e.attr(r.onFrame(1)):e.attr(r.toAttrs),!0;if(r.onFrame){var u=r.onFrame(a);e.attr(u)}else MO(e,r,a);return!1}var FO=function(){function e(r){this.animators=[],this.current=0,this.timer=null,this.canvas=r}return e.prototype.initTimer=function(){var r=this,t=!1,n,i,a;this.timer=Ox(function(o){if(r.current=o,r.animators.length>0){for(var l=r.animators.length-1;l>=0;l--){if(n=r.animators[l],n.destroyed){r.removeAnimator(l);continue}if(!n.isAnimatePaused()){i=n.get("animations");for(var s=i.length-1;s>=0;s--)a=i[s],t=AO(n,a,o),t&&(i.splice(s,1),t=!1,a.callback&&a.callback())}i.length===0&&r.removeAnimator(l)}var u=r.canvas.get("autoDraw");u||r.canvas.draw()}})},e.prototype.addAnimator=function(r){this.animators.push(r)},e.prototype.removeAnimator=function(r){this.animators.splice(r,1)},e.prototype.isAnimating=function(){return!!this.animators.length},e.prototype.stop=function(){this.timer&&this.timer.stop()},e.prototype.stopAllAnimations=function(r){r===void 0&&(r=!0),this.animators.forEach(function(t){t.stopAnimate(r)}),this.animators=[],this.canvas.draw()},e.prototype.getTime=function(){return this.current},e}(),bO=40,u1=0,c1=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function f1(e,r,t){t.name=r,t.target=e,t.currentTarget=e,t.delegateTarget=e,e.emit(r,t)}function EO(e,r,t){if(t.bubbles){var n=void 0,i=!1;if(r==="mouseenter"?(n=t.fromShape,i=!0):r==="mouseleave"&&(i=!0,n=t.toShape),e.isCanvas()&&i)return;if(n&&px(e,n)){t.bubbles=!1;return}t.name=r,t.currentTarget=e,t.delegateTarget=e,e.emit(r,t)}}var kO=function(){function e(r){var t=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(n){var i=n.type;t._triggerEvent(i,n)},this._onDocumentMove=function(n){var i=t.canvas,a=i.get("el");if(a!==n.target&&(t.dragging||t.currentShape)){var o=t._getPointInfo(n);t.dragging&&t._emitEvent("drag",n,o,t.draggingShape)}},this._onDocumentMouseUp=function(n){var i=t.canvas,a=i.get("el");if(a!==n.target&&t.dragging){var o=t._getPointInfo(n);t.draggingShape&&t._emitEvent("drop",n,o,null),t._emitEvent("dragend",n,o,t.draggingShape),t._afterDrag(t.draggingShape,o,n)}},this.canvas=r.canvas}return e.prototype.init=function(){this._bindEvents()},e.prototype._bindEvents=function(){var r=this,t=this.canvas.get("el");F(c1,function(n){t.addEventListener(n,r._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._clearEvents=function(){var r=this,t=this.canvas.get("el");F(c1,function(n){t.removeEventListener(n,r._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._getEventObj=function(r,t,n,i,a,o){var l=new Rl(r,t);return l.fromShape=a,l.toShape=o,l.x=n.x,l.y=n.y,l.clientX=n.clientX,l.clientY=n.clientY,l.propagationPath.push(i),l},e.prototype._getShape=function(r,t){return this.canvas.getShape(r.x,r.y,t)},e.prototype._getPointInfo=function(r){var t=this.canvas,n=t.getClientByEvent(r),i=t.getPointByEvent(r);return{x:i.x,y:i.y,clientX:n.x,clientY:n.y}},e.prototype._triggerEvent=function(r,t){var n=this._getPointInfo(t),i=this._getShape(n,t),a=this["_on"+r],o=!1;if(a)a.call(this,n,i,t);else{var l=this.currentShape;r==="mouseenter"||r==="dragenter"||r==="mouseover"?(this._emitEvent(r,t,n,null,null,i),i&&this._emitEvent(r,t,n,i,null,i),r==="mouseenter"&&this.draggingShape&&this._emitEvent("dragenter",t,n,null)):r==="mouseleave"||r==="dragleave"||r==="mouseout"?(o=!0,l&&this._emitEvent(r,t,n,l,l,null),this._emitEvent(r,t,n,null,l,null),r==="mouseleave"&&this.draggingShape&&this._emitEvent("dragleave",t,n,null)):this._emitEvent(r,t,n,i,null,null)}if(o||(this.currentShape=i),i&&!i.get("destroyed")){var s=this.canvas,u=s.get("el");u.style.cursor=i.attr("cursor")||s.get("cursor")}},e.prototype._onmousedown=function(r,t,n){n.button===u1&&(this.mousedownShape=t,this.mousedownPoint=r,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,r,t,null,null)},e.prototype._emitMouseoverEvents=function(r,t,n,i){var a=this.canvas.get("el");n!==i&&(n&&(this._emitEvent("mouseout",r,t,n,n,i),this._emitEvent("mouseleave",r,t,n,n,i),(!i||i.get("destroyed"))&&(a.style.cursor=this.canvas.get("cursor"))),i&&(this._emitEvent("mouseover",r,t,i,n,i),this._emitEvent("mouseenter",r,t,i,n,i)))},e.prototype._emitDragoverEvents=function(r,t,n,i,a){i?(i!==n&&(n&&this._emitEvent("dragleave",r,t,n,n,i),this._emitEvent("dragenter",r,t,i,n,i)),a||this._emitEvent("dragover",r,t,i)):n&&this._emitEvent("dragleave",r,t,n,n,i),a&&this._emitEvent("dragover",r,t,i)},e.prototype._afterDrag=function(r,t,n){r&&(r.set("capture",!0),this.draggingShape=null),this.dragging=!1;var i=this._getShape(t,n);i!==r&&this._emitMouseoverEvents(n,t,r,i),this.currentShape=i},e.prototype._onmouseup=function(r,t,n){if(n.button===u1){var i=this.draggingShape;this.dragging?(i&&this._emitEvent("drop",n,r,t),this._emitEvent("dragend",n,r,i),this._afterDrag(i,r,n)):(this._emitEvent("mouseup",n,r,t),t===this.mousedownShape&&this._emitEvent("click",n,r,t),this.mousedownShape=null,this.mousedownPoint=null)}},e.prototype._ondragover=function(r,t,n){n.preventDefault();var i=this.currentShape;this._emitDragoverEvents(n,r,i,t,!0)},e.prototype._onmousemove=function(r,t,n){var i=this.canvas,a=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(n,r,a,t,!1),this._emitEvent("drag",n,r,o);else{var l=this.mousedownPoint;if(l){var s=this.mousedownShape,u=n.timeStamp,c=u-this.mousedownTimeStamp,f=l.clientX-r.clientX,h=l.clientY-r.clientY,v=f*f+h*h;c>120||v>bO?s&&s.get("draggable")?(o=this.mousedownShape,o.set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",n,r,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&i.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,r,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,r,a,t),this._emitEvent("mousemove",n,r,t)):(this._emitMouseoverEvents(n,r,a,t),this._emitEvent("mousemove",n,r,t))}else this._emitMouseoverEvents(n,r,a,t),this._emitEvent("mousemove",n,r,t)}},e.prototype._emitEvent=function(r,t,n,i,a,o){var l=this._getEventObj(r,t,n,i,a,o);if(i){l.shape=i,f1(i,r,l);for(var s=i.getParent();s;)s.emitDelegation(r,l),l.propagationStopped||EO(s,r,l),l.propagationPath.push(s),s=s.getParent()}else{var u=this.canvas;f1(u,r,l)}},e.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},e}(),h1="px",v1=xx(),TO=v1&&v1.name==="firefox",fc=function(e){I(r,e);function r(t){var n=e.call(this,t)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.cursor="default",t.supportCSSTransform=!1,t},r.prototype.initContainer=function(){var t=this.get("container");at(t)&&(t=document.getElementById(t),this.set("container",t))},r.prototype.initDom=function(){var t=this.createDom();this.set("el",t);var n=this.get("container");n.appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},r.prototype.initEvents=function(){var t=new kO({canvas:this});t.init(),this.set("eventController",t)},r.prototype.initTimeline=function(){var t=new FO(this);this.set("timeline",t)},r.prototype.setDOMSize=function(t,n){var i=this.get("el");dx&&(i.style.width=t+h1,i.style.height=n+h1)},r.prototype.changeSize=function(t,n){this.setDOMSize(t,n),this.set("width",t),this.set("height",n),this.onCanvasChange("changeSize")},r.prototype.getRenderer=function(){return this.get("renderer")},r.prototype.getCursor=function(){return this.get("cursor")},r.prototype.setCursor=function(t){this.set("cursor",t);var n=this.get("el");dx&&n&&(n.style.cursor=t)},r.prototype.getPointByEvent=function(t){var n=this.get("supportCSSTransform");if(n){if(TO&&!Y(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!Y(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var i=this.getClientByEvent(t),a=i.x,o=i.y;return this.getPointByClient(a,o)},r.prototype.getClientByEvent=function(t){var n=t;return t.touches&&(t.type==="touchend"?n=t.changedTouches[0]:n=t.touches[0]),{x:n.clientX,y:n.clientY}},r.prototype.getPointByClient=function(t,n){var i=this.get("el"),a=i.getBoundingClientRect();return{x:t-a.left,y:n-a.top}},r.prototype.getClientByPoint=function(t,n){var i=this.get("el"),a=i.getBoundingClientRect();return{x:t+a.left,y:n+a.top}},r.prototype.draw=function(){},r.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},r.prototype.clearEvents=function(){var t=this.get("eventController");t.destroy()},r.prototype.isCanvas=function(){return!0},r.prototype.getParent=function(){return null},r.prototype.destroy=function(){var t=this.get("timeline");this.get("destroyed")||(this.clear(),t&&t.stop(),this.clearEvents(),this.removeDom(),e.prototype.destroy.call(this))},r}(Tx),hc=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.isGroup=function(){return!0},r.prototype.isEntityGroup=function(){return!1},r.prototype.clone=function(){for(var t=e.prototype.clone.call(this),n=this.getChildren(),i=0;i<n.length;i++){var a=n[i];t.add(a.clone())}return t},r}(Tx),vc=function(e){I(r,e);function r(t){return e.call(this,t)||this}return r.prototype._isInBBox=function(t,n){var i=this.getBBox();return i.minX<=t&&i.maxX>=t&&i.minY<=n&&i.maxY>=n},r.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t),this.clearCacheBBox()},r.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},r.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},r.prototype.applyMatrix=function(t){e.prototype.applyMatrix.call(this,t),this.set("canvasBBox",null)},r.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),n=this.getTotalMatrix(),i=t.minX,a=t.minY,o=t.maxX,l=t.maxY;if(n){var s=In(n,[t.minX,t.minY]),u=In(n,[t.maxX,t.minY]),c=In(n,[t.minX,t.maxY]),f=In(n,[t.maxX,t.maxY]);i=Math.min(s[0],u[0],c[0],f[0]),o=Math.max(s[0],u[0],c[0],f[0]),a=Math.min(s[1],u[1],c[1],f[1]),l=Math.max(s[1],u[1],c[1],f[1])}var h=this.attrs;if(h.shadowColor){var v=h.shadowBlur,d=v===void 0?0:v,p=h.shadowOffsetX,y=p===void 0?0:p,g=h.shadowOffsetY,m=g===void 0?0:g,x=i-d+y,w=o+d+y,C=a-d+m,M=l+d+m;i=Math.min(i,x),o=Math.max(o,w),a=Math.min(a,C),l=Math.max(l,M)}return{x:i,y:a,minX:i,minY:a,maxX:o,maxY:l,width:o-i,height:l-a}},r.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},r.prototype.isClipShape=function(){return this.get("isClipShape")},r.prototype.isInShape=function(t,n){return!1},r.prototype.isOnlyHitBox=function(){return!1},r.prototype.isHit=function(t,n){var i=this.get("startArrowShape"),a=this.get("endArrowShape"),o=[t,n,1];o=this.invertFromMatrix(o);var l=o[0],s=o[1],u=this._isInBBox(l,s);return this.isOnlyHitBox()?u:!!(u&&!this.isClipped(l,s)&&(this.isInShape(l,s)||i&&i.isHit(l,s)||a&&a.isHit(l,s)))},r}(Fx),d1=new Map;function kr(e,r){d1.set(e,r)}function dc(e){return d1.get(e)}function p1(e){var r=e.attr(),t=r.x,n=r.y,i=r.width,a=r.height;return{x:t,y:n,width:i,height:a}}function g1(e){var r=e.attr(),t=r.x,n=r.y,i=r.r;return{x:t-i,y:n-i,width:i*2,height:i*2}}function Oe(e,r,t,n){var i=e-t,a=r-n;return Math.sqrt(i*i+a*a)}function pc(e,r){return Math.abs(e-r)<.001}function Ao(e,r){var t=Er(e),n=Er(r),i=cr(e),a=cr(r);return{x:t,y:n,width:i-t,height:a-n}}function gc(e){return(e+Math.PI*2)%(Math.PI*2)}const me={box:function(e,r,t,n){return Ao([e,t],[r,n])},length:function(e,r,t,n){return Oe(e,r,t,n)},pointAt:function(e,r,t,n,i){return{x:(1-i)*e+i*t,y:(1-i)*r+i*n}},pointDistance:function(e,r,t,n,i,a){var o=(t-e)*(i-e)+(n-r)*(a-r);if(o<0)return Oe(e,r,i,a);var l=(t-e)*(t-e)+(n-r)*(n-r);return o>l?Oe(t,n,i,a):this.pointToLine(e,r,t,n,i,a)},pointToLine:function(e,r,t,n,i,a){var o=[t-e,n-r];if(sL(o,[0,0]))return Math.sqrt((i-e)*(i-e)+(a-r)*(a-r));var l=[-o[1],o[0]];Cx(l,l);var s=[i-e,a-r];return Math.abs(oL(s,l))},tangentAngle:function(e,r,t,n){return Math.atan2(n-r,t-e)}};var IO=1e-4;function y1(e,r,t,n,i,a){var o,l=1/0,s=[t,n],u=20;a&&a>200&&(u=a/10);for(var c=1/u,f=c/10,h=0;h<=u;h++){var v=h*c,d=[i.apply(null,e.concat([v])),i.apply(null,r.concat([v]))],p=Oe(s[0],s[1],d[0],d[1]);p<l&&(o=v,l=p)}if(o===0)return{x:e[0],y:r[0]};if(o===1){var y=e.length;return{x:e[y-1],y:r[y-1]}}l=1/0;for(var h=0;h<32&&!(f<IO);h++){var g=o-f,m=o+f,d=[i.apply(null,e.concat([g])),i.apply(null,r.concat([g]))],p=Oe(s[0],s[1],d[0],d[1]);if(g>=0&&p<l)o=g,l=p;else{var x=[i.apply(null,e.concat([m])),i.apply(null,r.concat([m]))],w=Oe(s[0],s[1],x[0],x[1]);m<=1&&w<l?(o=m,l=w):f*=.5}}return{x:i.apply(null,e.concat([o])),y:i.apply(null,r.concat([o]))}}function PO(e,r){for(var t=0,n=e.length,i=0;i<n;i++){var a=e[i],o=r[i],l=e[(i+1)%n],s=r[(i+1)%n];t+=Oe(a,o,l,s)}return t/2}function hi(e,r,t,n){var i=1-n;return i*i*e+2*n*i*r+n*n*t}function m1(e,r,t){var n=e+t-2*r;if(pc(n,0))return[.5];var i=(e-r)/n;return i<=1&&i>=0?[i]:[]}function x1(e,r,t,n){return 2*(1-n)*(r-e)+2*n*(t-r)}function w1(e,r,t,n,i,a,o){var l=hi(e,t,i,o),s=hi(r,n,a,o),u=me.pointAt(e,r,t,n,o),c=me.pointAt(t,n,i,a,o);return[[e,r,u.x,u.y,l,s],[l,s,c.x,c.y,i,a]]}function md(e,r,t,n,i,a,o){if(o===0)return(Oe(e,r,t,n)+Oe(t,n,i,a)+Oe(e,r,i,a))/2;var l=w1(e,r,t,n,i,a,.5),s=l[0],u=l[1];return s.push(o-1),u.push(o-1),md.apply(null,s)+md.apply(null,u)}const S1={box:function(e,r,t,n,i,a){var o=m1(e,t,i)[0],l=m1(r,n,a)[0],s=[e,i],u=[r,a];return o!==void 0&&s.push(hi(e,t,i,o)),l!==void 0&&u.push(hi(r,n,a,l)),Ao(s,u)},length:function(e,r,t,n,i,a){return md(e,r,t,n,i,a,3)},nearestPoint:function(e,r,t,n,i,a,o,l){return y1([e,t,i],[r,n,a],o,l,hi)},pointDistance:function(e,r,t,n,i,a,o,l){var s=this.nearestPoint(e,r,t,n,i,a,o,l);return Oe(s.x,s.y,o,l)},interpolationAt:hi,pointAt:function(e,r,t,n,i,a,o){return{x:hi(e,t,i,o),y:hi(r,n,a,o)}},divide:function(e,r,t,n,i,a,o){return w1(e,r,t,n,i,a,o)},tangentAngle:function(e,r,t,n,i,a,o){var l=x1(e,t,i,o),s=x1(r,n,a,o),u=Math.atan2(s,l);return gc(u)}};function vi(e,r,t,n,i){var a=1-i;return a*a*a*e+3*r*i*a*a+3*t*i*i*a+n*i*i*i}function C1(e,r,t,n,i){var a=1-i;return 3*(a*a*(r-e)+2*a*i*(t-r)+i*i*(n-t))}function xd(e,r,t,n){var i=-3*e+9*r-9*t+3*n,a=6*e-12*r+6*t,o=3*r-3*e,l=[],s,u,c;if(pc(i,0))pc(a,0)||(s=-o/a,s>=0&&s<=1&&l.push(s));else{var f=a*a-4*i*o;pc(f,0)?l.push(-a/(2*i)):f>0&&(c=Math.sqrt(f),s=(-a+c)/(2*i),u=(-a-c)/(2*i),s>=0&&s<=1&&l.push(s),u>=0&&u<=1&&l.push(u))}return l}function M1(e,r,t,n,i,a,o,l,s){var u=vi(e,t,i,o,s),c=vi(r,n,a,l,s),f=me.pointAt(e,r,t,n,s),h=me.pointAt(t,n,i,a,s),v=me.pointAt(i,a,o,l,s),d=me.pointAt(f.x,f.y,h.x,h.y,s),p=me.pointAt(h.x,h.y,v.x,v.y,s);return[[e,r,f.x,f.y,d.x,d.y,u,c],[u,c,p.x,p.y,v.x,v.y,o,l]]}function wd(e,r,t,n,i,a,o,l,s){if(s===0)return PO([e,t,i,o],[r,n,a,l]);var u=M1(e,r,t,n,i,a,o,l,.5),c=u[0],f=u[1];return c.push(s-1),f.push(s-1),wd.apply(null,c)+wd.apply(null,f)}const ql={extrema:xd,box:function(e,r,t,n,i,a,o,l){for(var s=[e,o],u=[r,l],c=xd(e,t,i,o),f=xd(r,n,a,l),h=0;h<c.length;h++)s.push(vi(e,t,i,o,c[h]));for(var h=0;h<f.length;h++)u.push(vi(r,n,a,l,f[h]));return Ao(s,u)},length:function(e,r,t,n,i,a,o,l){return wd(e,r,t,n,i,a,o,l,3)},nearestPoint:function(e,r,t,n,i,a,o,l,s,u,c){return y1([e,t,i,o],[r,n,a,l],s,u,vi,c)},pointDistance:function(e,r,t,n,i,a,o,l,s,u,c){var f=this.nearestPoint(e,r,t,n,i,a,o,l,s,u,c);return Oe(f.x,f.y,s,u)},interpolationAt:vi,pointAt:function(e,r,t,n,i,a,o,l,s){return{x:vi(e,t,i,o,s),y:vi(r,n,a,l,s)}},divide:function(e,r,t,n,i,a,o,l,s){return M1(e,r,t,n,i,a,o,l,s)},tangentAngle:function(e,r,t,n,i,a,o,l,s){var u=C1(e,t,i,o,s),c=C1(r,n,a,l,s);return gc(Math.atan2(c,u))}};function A1(e,r){var t=Math.abs(e);return r>0?t:t*-1}const LO={box:function(e,r,t,n){return{x:e-t,y:r-n,width:t*2,height:n*2}},length:function(e,r,t,n){return Math.PI*(3*(t+n)-Math.sqrt((3*t+n)*(t+3*n)))},nearestPoint:function(e,r,t,n,i,a){var o=t,l=n;if(o===0||l===0)return{x:e,y:r};for(var s=i-e,u=a-r,c=Math.abs(s),f=Math.abs(u),h=o*o,v=l*l,d=Math.PI/4,p,y,g=0;g<4;g++){p=o*Math.cos(d),y=l*Math.sin(d);var m=(h-v)*Math.pow(Math.cos(d),3)/o,x=(v-h)*Math.pow(Math.sin(d),3)/l,w=p-m,C=y-x,M=c-m,A=f-x,b=Math.hypot(C,w),T=Math.hypot(A,M),k=b*Math.asin((w*A-C*M)/(b*T)),P=k/Math.sqrt(h+v-p*p-y*y);d+=P,d=Math.min(Math.PI/2,Math.max(0,d))}return{x:e+A1(p,s),y:r+A1(y,u)}},pointDistance:function(e,r,t,n,i,a){var o=this.nearestPoint(e,r,t,n,i,a);return Oe(o.x,o.y,i,a)},pointAt:function(e,r,t,n,i){var a=2*Math.PI*i;return{x:e+t*Math.cos(a),y:r+n*Math.sin(a)}},tangentAngle:function(e,r,t,n,i){var a=2*Math.PI*i,o=Math.atan2(n*Math.cos(a),-t*Math.sin(a));return gc(o)}};function OO(e,r,t,n,i,a,o,l){return-1*t*Math.cos(i)*Math.sin(l)-n*Math.sin(i)*Math.cos(l)}function DO(e,r,t,n,i,a,o,l){return-1*t*Math.sin(i)*Math.sin(l)+n*Math.cos(i)*Math.cos(l)}function BO(e,r,t){return Math.atan(-r/e*Math.tan(t))}function RO(e,r,t){return Math.atan(r/(e*Math.tan(t)))}function F1(e,r,t,n,i,a){return t*Math.cos(i)*Math.cos(a)-n*Math.sin(i)*Math.sin(a)+e}function b1(e,r,t,n,i,a){return t*Math.sin(i)*Math.cos(a)+n*Math.cos(i)*Math.sin(a)+r}function NO(e,r,t,n){var i=Math.atan2(n*e,t*r);return(i+Math.PI*2)%(Math.PI*2)}function E1(e,r,t){return{x:e*Math.cos(t),y:r*Math.sin(t)}}function k1(e,r,t){var n=Math.cos(t),i=Math.sin(t);return[e*n-r*i,e*i+r*n]}const zO={box:function(e,r,t,n,i,a,o){for(var l=BO(t,n,i),s=1/0,u=-1/0,c=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var h=l+f;a<o?a<h&&h<o&&c.push(h):o<h&&h<a&&c.push(h)}for(var f=0;f<c.length;f++){var v=F1(e,r,t,n,i,c[f]);v<s&&(s=v),v>u&&(u=v)}for(var d=RO(t,n,i),p=1/0,y=-1/0,g=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var m=d+f;a<o?a<m&&m<o&&g.push(m):o<m&&m<a&&g.push(m)}for(var f=0;f<g.length;f++){var x=b1(e,r,t,n,i,g[f]);x<p&&(p=x),x>y&&(y=x)}return{x:s,y:p,width:u-s,height:y-p}},length:function(e,r,t,n,i,a,o){},nearestPoint:function(e,r,t,n,i,a,o,l,s){var u=k1(l-e,s-r,-i),c=u[0],f=u[1],h=LO.nearestPoint(0,0,t,n,c,f),v=NO(t,n,h.x,h.y);v<a?h=E1(t,n,a):v>o&&(h=E1(t,n,o));var d=k1(h.x,h.y,i);return{x:d[0]+e,y:d[1]+r}},pointDistance:function(e,r,t,n,i,a,o,l,s){var u=this.nearestPoint(e,r,t,n,l,s);return Oe(u.x,u.y,l,s)},pointAt:function(e,r,t,n,i,a,o,l){var s=(o-a)*l+a;return{x:F1(e,r,t,n,i,s),y:b1(e,r,t,n,i,s)}},tangentAngle:function(e,r,t,n,i,a,o,l){var s=(o-a)*l+a,u=OO(e,r,t,n,i,a,o,s),c=DO(e,r,t,n,i,a,o,s);return gc(Math.atan2(c,u))}};function T1(e){for(var r=0,t=[],n=0;n<e.length-1;n++){var i=e[n],a=e[n+1],o=Oe(i[0],i[1],a[0],a[1]),l={from:i,to:a,length:o};t.push(l),r+=o}return{segments:t,totalLength:r}}function YO(e){if(e.length<2)return 0;for(var r=0,t=0;t<e.length-1;t++){var n=e[t],i=e[t+1];r+=Oe(n[0],n[1],i[0],i[1])}return r}function VO(e,r){if(r>1||r<0||e.length<2)return null;var t=T1(e),n=t.segments,i=t.totalLength;if(i===0)return{x:e[0][0],y:e[0][1]};for(var a=0,o=null,l=0;l<n.length;l++){var s=n[l],u=s.from,c=s.to,f=s.length/i;if(r>=a&&r<=a+f){var h=(r-a)/f;o=me.pointAt(u[0],u[1],c[0],c[1],h);break}a+=f}return o}function _O(e,r){if(r>1||r<0||e.length<2)return 0;for(var t=T1(e),n=t.segments,i=t.totalLength,a=0,o=0,l=0;l<n.length;l++){var s=n[l],u=s.from,c=s.to,f=s.length/i;if(r>=a&&r<=a+f){o=Math.atan2(c[1]-u[1],c[0]-u[0]);break}a+=f}return o}function $O(e,r,t){for(var n=1/0,i=0;i<e.length-1;i++){var a=e[i],o=e[i+1],l=me.pointDistance(a[0],a[1],o[0],o[1],r,t);l<n&&(n=l)}return n}const I1={box:function(e){for(var r=[],t=[],n=0;n<e.length;n++){var i=e[n];r.push(i[0]),t.push(i[1])}return Ao(r,t)},length:function(e){return YO(e)},pointAt:function(e,r){return VO(e,r)},pointDistance:function(e,r,t){return $O(e,r,t)},tangentAngle:function(e,r){return _O(e,r)}};function P1(e,r){return!e||!r?e||r:{minX:Math.min(e.minX,r.minX),minY:Math.min(e.minY,r.minY),maxX:Math.max(e.maxX,r.maxX),maxY:Math.max(e.maxY,r.maxY)}}function Sd(e,r){var t=e.get("startArrowShape"),n=e.get("endArrowShape"),i=null,a=null;return t&&(i=t.getCanvasBBox(),r=P1(r,i)),n&&(a=n.getCanvasBBox(),r=P1(r,a)),r}function GO(e){for(var r=e.attr(),t=r.points,n=[],i=[],a=0;a<t.length;a++){var o=t[a];n.push(o[0]),i.push(o[1])}var l=Ao(n,i),s=l.x,u=l.y,c=l.width,f=l.height,h={minX:s,minY:u,maxX:s+c,maxY:u+f};return h=Sd(e,h),{x:h.minX,y:h.minY,width:h.maxX-h.minX,height:h.maxY-h.minY}}function HO(e){for(var r=e.attr(),t=r.points,n=[],i=[],a=0;a<t.length;a++){var o=t[a];n.push(o[0]),i.push(o[1])}return Ao(n,i)}var Cd=null;function yc(){if(!Cd){var e=document.createElement("canvas");e.width=1,e.height=1,Cd=e.getContext("2d")}return Cd}function mc(e,r,t){var n=1;if(at(e)&&(n=e.split(`
|
|
28
28
|
`).length),n>1){var i=WO(r,t);return r*n+i*(n-1)}return r}function WO(e,r){return r?r-e:e*.14}function XO(e,r){var t=yc(),n=0;if(Y(e)||e==="")return n;if(t.save(),t.font=r,at(e)&&e.includes(`
|
|
29
29
|
`)){var i=e.split(`
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
字段说明:`).concat(a,`
|
|
71
71
|
</div>
|
|
72
72
|
</div>
|
|
73
|
-
`)},x:u,y:c}),this.tooltip.show()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,n=this.context.view,i=n.canvas,a={start:{x:0,y:0},end:{x:i.get("width"),y:i.get("height")}},o=new Wc({parent:i.get("el").parentNode,region:a,visible:!1,containerId:OV,domStyles:S({},Z({},(t={},t[Ln]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[On]={"word-break":"break-all","margin-bottom":"3px"},t)))});o.init(),o.setCapture(!1),this.tooltip=o},r}(Bt);jN("dark",OS(Dz)),J0("canvas",y5),J0("svg",Z5),gn("Polygon",c3),gn("Interval",a3),gn("Schema",f3),gn("Path",Op),gn("Point",s3),gn("Line",o3),gn("Area",K5),gn("Edge",J5),gn("Heatmap",t3),gn("Violin",v3),gs("base",nf),gs("interval",T3),gs("pie",I3),gs("polar",XC),Ke("overlap",H3),Ke("distribute",L3),Ke("fixed-overlap",G3),Ke("hide-overlap",tY),Ke("limit-in-shape",Y3),Ke("limit-in-canvas",z3),Ke("limit-in-plot",yY),Ke("pie-outer",D3),Ke("adjust-color",rY),Ke("interval-adjust-position",oY),Ke("interval-hide-overlap",sY),Ke("point-adjust-position",fY),Ke("pie-spider",N3),Ke("path-adjust-position",dY),dr("fade-in",mY),dr("fade-out",xY),dr("grow-in-x",SY),dr("grow-in-xy",MY),dr("grow-in-y",CY),dr("scale-in-x",bY),dr("scale-in-y",EY),dr("wave-in",TY),dr("zoom-in",IY),dr("zoom-out",PY),dr("position-update",FY),dr("sector-path-update",kY),dr("path-in",AY),To("rect",RY),To("mirror",BY),To("list",OY),To("matrix",DY),To("circle",LY),To("tree",NY),Sa("axis",VY),Sa("legend",_Y),Sa("tooltip",$S),Sa("annotation",YY),Sa("slider",$Y),Sa("scrollbar",WY),et("tooltip",yM),et("sibling-tooltip",qY),et("ellipsis-text",ZY),et("element-active",QY),et("element-single-active",tV),et("element-range-active",JY),et("element-highlight",Jp),et("element-highlight-by-x",rV),et("element-highlight-by-color",eV),et("element-single-highlight",nV),et("element-range-highlight",wM),et("element-sibling-highlight",wM,{effectSiblings:!0,effectByRecord:!0}),et("element-selected",aV),et("element-single-selected",oV),et("element-range-selected",iV),et("element-link-by-color",KY),et("active-region",UY),et("list-active",lV),et("list-selected",uV),et("list-highlight",tg),et("list-unchecked",cV),et("list-checked",fV),et("list-focus",hV),et("list-radio",vV),et("legend-item-highlight",tg,{componentNames:["legend"]}),et("axis-label-highlight",tg,{componentNames:["axis"]}),et("axis-description",DV),et("rect-mask",EM),et("x-rect-mask",IM,{dim:"x"}),et("y-rect-mask",IM,{dim:"y"}),et("circle-mask",dV),et("path-mask",LM),et("smooth-path-mask",pV),et("rect-multi-mask",DM),et("x-rect-multi-mask",BM,{dim:"x"}),et("y-rect-multi-mask",BM,{dim:"y"}),et("circle-multi-mask",gV),et("path-multi-mask",RM),et("smooth-path-multi-mask",yV),et("cursor",mV),et("data-filter",xV),et("brush",Ff),et("brush-x",Ff,{dims:["x"]}),et("brush-y",Ff,{dims:["y"]}),et("sibling-filter",og),et("sibling-x-filter",og,{dims:"x"}),et("sibling-y-filter",og,{dims:"y"}),et("element-filter",wV),et("element-sibling-filter",zM),et("element-sibling-filter-record",zM,{byRecord:!0}),et("view-drag",FV),et("view-move",EV),et("scale-translate",kV),et("scale-zoom",TV),et("reset-button",MV,{name:"reset-button",text:"reset"}),et("mousewheel-scroll",LV);function Rn(e){return e.isInPlot()}ut("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]}),ut("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseout",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),ut("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),ut("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),ut("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),ut("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),ut("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),ut("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),ut("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),ut("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),ut("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),ut("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(e){return!e.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(e){return!e.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),ut("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Rn,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Rn,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Rn,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),ut("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),ut("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Rn,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Rn,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Rn,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),ut("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Rn,action:"path-mask:start"},{trigger:"mousedown",isEnable:Rn,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),ut("brush-x-multi",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"mousedown",isEnable:Rn,action:["x-rect-multi-mask:start","x-rect-multi-mask:show"]},{trigger:"mask:dragstart",action:["x-rect-multi-mask:moveStart"]}],processing:[{trigger:"mousemove",isEnable:function(e){return!Kc(e)},action:["x-rect-multi-mask:resize"]},{trigger:"multi-mask:change",action:"element-range-highlight:highlight"},{trigger:"mask:drag",action:["x-rect-multi-mask:move"]}],end:[{trigger:"mouseup",action:["x-rect-multi-mask:end"]},{trigger:"mask:dragend",action:["x-rect-multi-mask:moveEnd"]}],rollback:[{trigger:"dblclick",action:["x-rect-multi-mask:clear","cursor:crosshair"]},{trigger:"multi-mask:clearAll",action:["element-range-highlight:clear"]},{trigger:"multi-mask:clearSingle",action:["element-range-highlight:highlight"]}]}),ut("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),ut("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:["cursor:pointer","list-radio:show"]},{trigger:"legend-item:mouseleave",action:["cursor:default","list-radio:hide"]}],start:[{trigger:"legend-item:click",isEnable:function(e){return!e.isInShape("legend-item-radio")},action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","data-filter:filter","list-radio:show"]},{trigger:"legend-item-radio:mouseenter",action:["list-radio:showTip"]},{trigger:"legend-item-radio:mouseleave",action:["list-radio:hideTip"]},{trigger:"legend-item-radio:click",action:["list-focus:toggle","data-filter:filter","list-radio:show"]}]}),ut("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),ut("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),ut("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","element-filter:filter"]}]}),ut("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),ut("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]});function $M(e){return e.gEvent.preventDefault(),e.gEvent.originalEvent.deltaY>0}ut("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(e){return $M(e.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(e){return!$M(e.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),ut("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),ut("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var er=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"],Zr;(function(e){e.ERROR="error",e.WARN="warn",e.INFO="log"})(Zr||(Zr={}));var BV="AntV/G2Plot";function RV(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var n=0;return"".concat(BV,": ").concat(e.replace(/%s/g,function(){return"".concat(r[n++])}))}function Nn(e,r,t){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];r||console[e](RV.apply(void 0,rt([t],n,!1)))}function bt(e,r){var t={};return e!==null&&typeof e=="object"&&r.forEach(function(n){var i=e[n];i!==void 0&&(t[n]=i)}),t}function lg(e,r){if(!e)return{};var t=e.filter(function(a){var o=E(a,[r]);return st(o)&&!isNaN(o)}),n=t.every(function(a){return E(a,[r])>=0}),i=t.every(function(a){return E(a,[r])<=0});return n?{min:0}:i?{max:0}:{}}function GM(e,r,t,n,i){if(i===void 0&&(i=[]),!Array.isArray(e))return{nodes:[],links:[]};var a=[],o={},l=-1;return e.forEach(function(s){var u=s[r],c=s[t],f=s[n],h=bt(s,i);o[u]||(o[u]=S({id:++l,name:u},h)),o[c]||(o[c]=S({id:++l,name:c},h)),a.push(S({source:o[u].id,target:o[c].id,value:f},h))}),{nodes:Object.values(o).sort(function(s,u){return s.id-u.id}),links:a}}function zo(e,r){var t=de(e,function(n){var i=n[r];return i===null||typeof i=="number"&&!isNaN(i)});return Nn(Zr.WARN,t.length===e.length,"illegal data existed in chart data."),t}var NV=5,zV={}.toString,HM=function(e,r){return zV.call(e)==="[object "+r+"]"},YV=function(e){return HM(e,"Array")},VV=function(e){return typeof e=="object"&&e!==null},WM=function(e){if(!VV(e)||!HM(e,"Object"))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},XM=function(e,r,t,n){t=t||0,n=n||NV;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var a=r[i];a?WM(a)?(WM(e[i])||(e[i]={}),t<n?XM(e[i],a,t+1,n):e[i]=r[i]):YV(a)?(e[i]=[],e[i]=e[i].concat(a)):e[i]=a:e[i]=a}},D=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var n=0;n<r.length;n+=1)XM(e,r[n]);return e};function sg(e){if(!e)return{width:0,height:0};var r=getComputedStyle(e);return{width:(e.clientWidth||parseInt(r.width,10))-parseInt(r.paddingLeft,10)-parseInt(r.paddingRight,10),height:(e.clientHeight||parseInt(r.height,10))-parseInt(r.paddingTop,10)-parseInt(r.paddingBottom,10)}}function lt(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(t){return e.reduce(function(n,i){return i(n)},t)}}function Ae(e,r){return e.geometries.find(function(t){return t.type===r})}function bf(e){return Pe(e.geometries,function(r,t){return r.concat(t.elements)},[])}function Es(e){return E(e,["views","length"],0)<=0?bf(e):Pe(e.views,function(r,t){return r.concat(Es(t))},bf(e))}function _V(e){return E(e,["views","length"],0)<=0?e.geometries:Pe(e.views,function(r,t){return r.concat(t.geometries)},e.geometries)}function jM(e){if(!e)return e;var r=e.match(/(([A-Z]{0,1}[a-z]*[^A-Z])|([A-Z]{1}))/g);return r.map(function(t){return t.toLowerCase()}).join("-")}function fe(e){if(!ii(e,"Object"))return e;var r=S({},e);return r.formatter&&!r.content&&(r.content=r.formatter),r}var ug;function $V(){return ug||(ug=document.createElement("canvas").getContext("2d")),ug}ho(function(e,r){r===void 0&&(r={});var t=r.fontSize,n=r.fontFamily,i=n===void 0?"sans-serif":n,a=r.fontWeight,o=r.fontStyle,l=r.fontVariant,s=$V();s.font=[o,a,l,"".concat(t,"px"),i].join(" ");var u=s.measureText(at(e)?e:"");return u.width},function(e,r){return r===void 0&&(r={}),rt([e],Hu(r),!0).join("")});function ka(e){return typeof e=="number"&&!isNaN(e)}function GV(e,r,t){var n=Math.min(r,t),i=Math.max(r,t);return e>=n&&e<=i}function Ti(e){if(st(e))return[e,e,e,e];if(G(e)){var r=e.length;if(r===1)return[e[0],e[0],e[0],e[0]];if(r===2)return[e[0],e[1],e[0],e[1]];if(r===3)return[e[0],e[1],e[2],e[1]];if(r===4)return e}return[0,0,0,0]}function Ef(e,r,t){r===void 0&&(r="bottom"),t===void 0&&(t=25);var n=Ti(e),i=[r.startsWith("top")?t:0,r.startsWith("right")?t:0,r.startsWith("bottom")?t:0,r.startsWith("left")?t:0];return[n[0]+i[0],n[1]+i[1],n[2]+i[2],n[3]+i[3]]}function cg(e){var r=e.map(function(n){return Ti(n)}),t=[0,0,0,0];return r.length>0&&(t=t.map(function(n,i){return r.forEach(function(a,o){n+=r[o][i]}),n})),t}function HV(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var n=1,i=e.length;n<i;n+=1){var a=e[n];t.push(["L",a.x,a.y])}r&&t.push(["Z"])}return t}var WV=function(e,r,t,n){var i=[],a,o,l=!!n,s,u;if(l){s=[1/0,1/0],u=[-1/0,-1/0];for(var c=0,f=e.length;c<f;c++){var h=e[c];s=ge([0,0],s,h),u=ye([0,0],u,h)}s=ge([0,0],s,n[0]),u=ye([0,0],u,n[1])}for(var c=0,v=e.length;c<v;c++){var h=e[c];if(t)a=e[c?c-1:v-1],o=e[(c+1)%v];else if(c===0||c===v-1){i.push(h);continue}else a=e[c-1],o=e[c+1];var d=[0,0];d=ua(d,o,a),d=Ye(d,d,r);var p=mo(h,a),y=mo(h,o),g=p+y;g!==0&&(p/=g,y/=g);var m=Ye([0,0],d,-p),x=Ye([0,0],d,y),w=un([0,0],h,m),C=un([0,0],h,x);l&&(w=ye([0,0],w,s),w=ge([0,0],w,u),C=ye([0,0],C,s),C=ge([0,0],C,u)),i.push(w),i.push(C)}return t&&i.push(i.shift()),i};function XV(e,r,t){for(var n=!!r,i=[],a=0,o=e.length;a<o;a+=2)i.push([e[a],e[a+1]]);for(var l=WV(i,.4,n,t),s=i.length,u=[],c,f,h,a=0;a<s-1;a++)c=l[a*2],f=l[a*2+1],h=i[a+1],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]]);return n&&(c=l[s],f=l[s+1],h=i[0],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]])),u}function jV(e,r,t){var n=[],i=e[0],a=null;if(e.length<=2)return HV(e,r);for(var o=0,l=e.length;o<l;o++){var s=e[o];(!a||!(a.x===s.x&&a.y===s.y))&&(n.push(s.x),n.push(s.y),a=s)}var u=t||[[0,0],[1,1]],c=XV(n,r,u);return c.unshift(["M",i.x,i.y]),c}function UM(e){var r={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",display:"flex",justifyContent:"center",alignItems:"center"},t=["stroke","lineWidth","shadowColor","strokeOpacity","shadowBlur","shadowOffsetX","shadowOffsetY","fill"];E(e,"fill")&&(r.color=e.fill);var n=bt(e,t),i=n.shadowColor,a=n.shadowBlur,o=a===void 0?0:a,l=n.shadowOffsetX,s=l===void 0?0:l,u=n.shadowOffsetY,c=u===void 0?0:u;r["text-shadow"]="".concat([i,"".concat(s,"px"),"".concat(c,"px"),"".concat(o,"px")].join(" "));var f=bt(e,t),h=f.stroke,v=f.lineWidth,d=v===void 0?0:v;return r["-webkit-text-stroke"]="".concat(["".concat(d,"px"),h].join(" ")),F(e,function(p,y){["fontSize"].includes(y)&&st(p)?r[jM(y)]="".concat(p,"px"):y&&!t.includes(y)&&(r[jM(y)]="".concat(p))}),r}function qM(e,r){e.style["pointer-events"]="none",F(r,function(t,n){n&&t&&(e.style[n]=t)})}var kf=function(e,r,t){var n=r.statistic,i=r.plotType,a=n.title,o=n.content;[a,o].forEach(function(l,s){if(l){var u="";s===0?u=o?"translate(-50%, -100%)":"translate(-50%, -50%)":u=a?"translate(-50%, 0)":"translate(-50%, -50%)";var c=Q(l.style)?l.style(t):l.style;e.annotation().html(S({position:["50%","50%"],html:function(f,h){var v=h.getCoordinate(),d=0;if(i==="pie"||i==="ring-progress")d=v.getRadius()*v.innerRadius*2;else if(i==="liquid"){var p=E(h.geometries,[0,"elements",0,"shape"]);if(p){var y=p.find(function(w){return w.get("name")==="wrap"}),g=y.getCanvasBBox().width;d=g}}else d||(d=v.getWidth());qM(f,S({width:"".concat(d,"px"),transform:u},UM(c)));var m=h.getData();if(l.customHtml)return l.customHtml(f,h,t,m);var x=l.content;return l.formatter&&(x=l.formatter(t,m)),x?at(x)?x:"".concat(x):"<div></div>"},key:"".concat(s===0?"top":"bottom","-statistic")},bt(l,["offsetX","offsetY","rotate","style","formatter"])))}})},UV=function(e,r,t){var n=r.statistic,i=n.title,a=n.content;[i,a].forEach(function(o){if(o){var l=Q(o.style)?o.style(t):o.style;e.annotation().html(S({position:["50%","100%"],html:function(s,u){var c=u.getCoordinate(),f=u.views[0].getCoordinate(),h=f.getCenter(),v=f.getRadius(),d=Math.max(Math.sin(f.startAngle),Math.sin(f.endAngle))*v,p=h.y+d-c.y.start-parseFloat(E(l,"fontSize",0)),y=c.getRadius()*c.innerRadius*2;qM(s,S({width:"".concat(y,"px"),transform:"translate(-50%, ".concat(p,"px)")},UM(l)));var g=u.getData();if(o.customHtml)return o.customHtml(s,u,t,g);var m=o.content;return o.formatter&&(m=o.formatter(t,g)),m?at(m)?m:"".concat(m):"<div></div>"}},bt(o,["offsetX","offsetY","rotate","style","formatter"])))}})};function ZM(e,r){return r?Pe(r,function(t,n,i){return t.replace(new RegExp("{\\s*".concat(i,"\\s*}"),"g"),n)},e):e}function vt(e,r){return e.views.find(function(t){return t.id===r})}function ks(e){var r=e.parent;return r?r.views:[]}function QM(e){return ks(e).filter(function(r){return r!==e})}function Ts(e,r,t){t===void 0&&(t=e.geometries),typeof r=="boolean"?e.animate(r):e.animate(!0),F(t,function(n){var i;Q(r)?i=r(n.type||n.shapeType,n)||!0:i=r,n.animate(i)})}function Tf(){return typeof window=="object"?window==null?void 0:window.devicePixelRatio:2}function fg(e,r){r===void 0&&(r=e);var t=document.createElement("canvas"),n=Tf();t.width=e*n,t.height=r*n,t.style.width="".concat(e,"px"),t.style.height="".concat(r,"px");var i=t.getContext("2d");return i.scale(n,n),t}function hg(e,r,t,n){n===void 0&&(n=t);var i=r.backgroundColor,a=r.opacity;e.globalAlpha=a,e.fillStyle=i,e.beginPath(),e.fillRect(0,0,t,n),e.closePath()}function KM(e,r,t){var n=e+r;return t?n*2:n}function JM(e,r){var t=r?[[e*.25,e*.25],[e*.75,e*.75]]:[[e*.5,e*.5]];return t}function vg(e,r){var t=r*Math.PI/180,n={a:Math.cos(t)*(1/e),b:Math.sin(t)*(1/e),c:-Math.sin(t)*(1/e),d:Math.cos(t)*(1/e),e:0,f:0};return n}var qV={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function ZV(e,r,t,n){var i=r.size,a=r.fill,o=r.lineWidth,l=r.stroke,s=r.fillOpacity;e.beginPath(),e.globalAlpha=s,e.fillStyle=a,e.strokeStyle=l,e.lineWidth=o,e.arc(t,n,i/2,0,2*Math.PI,!1),e.fill(),o&&e.stroke(),e.closePath()}function QV(e){var r=D({},qV,e),t=r.size,n=r.padding,i=r.isStagger,a=r.rotation,o=KM(t,n,i),l=JM(o,i),s=fg(o,o),u=s.getContext("2d");hg(u,r,o);for(var c=0,f=l;c<f.length;c++){var h=f[c],v=h[0],d=h[1];ZV(u,r,v,d)}var p=u.createPattern(s,"repeat");if(p){var y=Tf(),g=vg(y,a);p.setTransform(g)}return p}var KV={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};function JV(e,r,t){var n=r.stroke,i=r.lineWidth,a=r.strokeOpacity,o=new Path2D(t);e.globalAlpha=a,e.lineCap="square",e.strokeStyle=i?n:"transparent",e.lineWidth=i,e.stroke(o)}function t4(e){var r=D({},KV,e),t=r.spacing,n=r.rotation,i=r.lineWidth,a=t+i||1,o=t+i||1,l=`
|
|
73
|
+
`)},x:u,y:c}),this.tooltip.show()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,n=this.context.view,i=n.canvas,a={start:{x:0,y:0},end:{x:i.get("width"),y:i.get("height")}},o=new Wc({parent:i.get("el").parentNode,region:a,visible:!1,containerId:OV,domStyles:S({},Z({},(t={},t[Ln]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[On]={"word-break":"break-all","margin-bottom":"3px"},t)))});o.init(),o.setCapture(!1),this.tooltip=o},r}(Bt);jN("dark",OS(Dz)),J0("canvas",y5),J0("svg",Z5),gn("Polygon",c3),gn("Interval",a3),gn("Schema",f3),gn("Path",Op),gn("Point",s3),gn("Line",o3),gn("Area",K5),gn("Edge",J5),gn("Heatmap",t3),gn("Violin",v3),gs("base",nf),gs("interval",T3),gs("pie",I3),gs("polar",XC),Ke("overlap",H3),Ke("distribute",L3),Ke("fixed-overlap",G3),Ke("hide-overlap",tY),Ke("limit-in-shape",Y3),Ke("limit-in-canvas",z3),Ke("limit-in-plot",yY),Ke("pie-outer",D3),Ke("adjust-color",rY),Ke("interval-adjust-position",oY),Ke("interval-hide-overlap",sY),Ke("point-adjust-position",fY),Ke("pie-spider",N3),Ke("path-adjust-position",dY),dr("fade-in",mY),dr("fade-out",xY),dr("grow-in-x",SY),dr("grow-in-xy",MY),dr("grow-in-y",CY),dr("scale-in-x",bY),dr("scale-in-y",EY),dr("wave-in",TY),dr("zoom-in",IY),dr("zoom-out",PY),dr("position-update",FY),dr("sector-path-update",kY),dr("path-in",AY),To("rect",RY),To("mirror",BY),To("list",OY),To("matrix",DY),To("circle",LY),To("tree",NY),Sa("axis",VY),Sa("legend",_Y),Sa("tooltip",$S),Sa("annotation",YY),Sa("slider",$Y),Sa("scrollbar",WY),et("tooltip",yM),et("sibling-tooltip",qY),et("ellipsis-text",ZY),et("element-active",QY),et("element-single-active",tV),et("element-range-active",JY),et("element-highlight",Jp),et("element-highlight-by-x",rV),et("element-highlight-by-color",eV),et("element-single-highlight",nV),et("element-range-highlight",wM),et("element-sibling-highlight",wM,{effectSiblings:!0,effectByRecord:!0}),et("element-selected",aV),et("element-single-selected",oV),et("element-range-selected",iV),et("element-link-by-color",KY),et("active-region",UY),et("list-active",lV),et("list-selected",uV),et("list-highlight",tg),et("list-unchecked",cV),et("list-checked",fV),et("list-focus",hV),et("list-radio",vV),et("legend-item-highlight",tg,{componentNames:["legend"]}),et("axis-label-highlight",tg,{componentNames:["axis"]}),et("axis-description",DV),et("rect-mask",EM),et("x-rect-mask",IM,{dim:"x"}),et("y-rect-mask",IM,{dim:"y"}),et("circle-mask",dV),et("path-mask",LM),et("smooth-path-mask",pV),et("rect-multi-mask",DM),et("x-rect-multi-mask",BM,{dim:"x"}),et("y-rect-multi-mask",BM,{dim:"y"}),et("circle-multi-mask",gV),et("path-multi-mask",RM),et("smooth-path-multi-mask",yV),et("cursor",mV),et("data-filter",xV),et("brush",Ff),et("brush-x",Ff,{dims:["x"]}),et("brush-y",Ff,{dims:["y"]}),et("sibling-filter",og),et("sibling-x-filter",og,{dims:"x"}),et("sibling-y-filter",og,{dims:"y"}),et("element-filter",wV),et("element-sibling-filter",zM),et("element-sibling-filter-record",zM,{byRecord:!0}),et("view-drag",FV),et("view-move",EV),et("scale-translate",kV),et("scale-zoom",TV),et("reset-button",MV,{name:"reset-button",text:"reset"}),et("mousewheel-scroll",LV);function Rn(e){return e.isInPlot()}ut("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]}),ut("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseout",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),ut("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),ut("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),ut("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),ut("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),ut("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),ut("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),ut("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),ut("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),ut("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),ut("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(e){return!e.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(e){return!e.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),ut("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Rn,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Rn,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Rn,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),ut("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),ut("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Rn,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Rn,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Rn,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),ut("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Rn,action:"path-mask:start"},{trigger:"mousedown",isEnable:Rn,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),ut("brush-x-multi",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"mousedown",isEnable:Rn,action:["x-rect-multi-mask:start","x-rect-multi-mask:show"]},{trigger:"mask:dragstart",action:["x-rect-multi-mask:moveStart"]}],processing:[{trigger:"mousemove",isEnable:function(e){return!Kc(e)},action:["x-rect-multi-mask:resize"]},{trigger:"multi-mask:change",action:"element-range-highlight:highlight"},{trigger:"mask:drag",action:["x-rect-multi-mask:move"]}],end:[{trigger:"mouseup",action:["x-rect-multi-mask:end"]},{trigger:"mask:dragend",action:["x-rect-multi-mask:moveEnd"]}],rollback:[{trigger:"dblclick",action:["x-rect-multi-mask:clear","cursor:crosshair"]},{trigger:"multi-mask:clearAll",action:["element-range-highlight:clear"]},{trigger:"multi-mask:clearSingle",action:["element-range-highlight:highlight"]}]}),ut("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),ut("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:["cursor:pointer","list-radio:show"]},{trigger:"legend-item:mouseleave",action:["cursor:default","list-radio:hide"]}],start:[{trigger:"legend-item:click",isEnable:function(e){return!e.isInShape("legend-item-radio")},action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","data-filter:filter","list-radio:show"]},{trigger:"legend-item-radio:mouseenter",action:["list-radio:showTip"]},{trigger:"legend-item-radio:mouseleave",action:["list-radio:hideTip"]},{trigger:"legend-item-radio:click",action:["list-focus:toggle","data-filter:filter","list-radio:show"]}]}),ut("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),ut("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),ut("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","element-filter:filter"]}]}),ut("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),ut("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]});function $M(e){return e.gEvent.preventDefault(),e.gEvent.originalEvent.deltaY>0}ut("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(e){return $M(e.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(e){return!$M(e.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),ut("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),ut("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var er=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"],Zr;(function(e){e.ERROR="error",e.WARN="warn",e.INFO="log"})(Zr||(Zr={}));var BV="AntV/G2Plot";function RV(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var n=0;return"".concat(BV,": ").concat(e.replace(/%s/g,function(){return"".concat(r[n++])}))}function Nn(e,r,t){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];r||console[e](RV.apply(void 0,rt([t],n,!1)))}function bt(e,r){var t={};return e!==null&&typeof e=="object"&&r.forEach(function(n){var i=e[n];i!==void 0&&(t[n]=i)}),t}function lg(e,r){if(!e)return{};var t=e.filter(function(a){var o=E(a,[r]);return st(o)&&!isNaN(o)}),n=t.every(function(a){return E(a,[r])>=0}),i=t.every(function(a){return E(a,[r])<=0});return n?{min:0}:i?{max:0}:{}}function GM(e,r,t,n,i){if(i===void 0&&(i=[]),!Array.isArray(e))return{nodes:[],links:[]};var a=[],o={},l=-1;return e.forEach(function(s){var u=s[r],c=s[t],f=s[n],h=bt(s,i);o[u]||(o[u]=S({id:++l,name:u},h)),o[c]||(o[c]=S({id:++l,name:c},h)),a.push(S({source:o[u].id,target:o[c].id,value:f},h))}),{nodes:Object.values(o).sort(function(s,u){return s.id-u.id}),links:a}}function zo(e,r){var t=de(e,function(n){var i=n[r];return i===null||typeof i=="number"&&!isNaN(i)});return Nn(Zr.WARN,t.length===e.length,"illegal data existed in chart data."),t}var NV=5,zV={}.toString,HM=function(e,r){return zV.call(e)==="[object "+r+"]"},YV=function(e){return HM(e,"Array")},VV=function(e){return typeof e=="object"&&e!==null},WM=function(e){if(!VV(e)||!HM(e,"Object"))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},XM=function(e,r,t,n){t=t||0,n=n||NV;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var a=r[i];a?WM(a)?(WM(e[i])||(e[i]={}),t<n?XM(e[i],a,t+1,n):e[i]=r[i]):YV(a)?(e[i]=[],e[i]=e[i].concat(a)):e[i]=a:e[i]=a}},B=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var n=0;n<r.length;n+=1)XM(e,r[n]);return e};function sg(e){if(!e)return{width:0,height:0};var r=getComputedStyle(e);return{width:(e.clientWidth||parseInt(r.width,10))-parseInt(r.paddingLeft,10)-parseInt(r.paddingRight,10),height:(e.clientHeight||parseInt(r.height,10))-parseInt(r.paddingTop,10)-parseInt(r.paddingBottom,10)}}function lt(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(t){return e.reduce(function(n,i){return i(n)},t)}}function Ae(e,r){return e.geometries.find(function(t){return t.type===r})}function bf(e){return Pe(e.geometries,function(r,t){return r.concat(t.elements)},[])}function Es(e){return E(e,["views","length"],0)<=0?bf(e):Pe(e.views,function(r,t){return r.concat(Es(t))},bf(e))}function _V(e){return E(e,["views","length"],0)<=0?e.geometries:Pe(e.views,function(r,t){return r.concat(t.geometries)},e.geometries)}function jM(e){if(!e)return e;var r=e.match(/(([A-Z]{0,1}[a-z]*[^A-Z])|([A-Z]{1}))/g);return r.map(function(t){return t.toLowerCase()}).join("-")}function fe(e){if(!ii(e,"Object"))return e;var r=S({},e);return r.formatter&&!r.content&&(r.content=r.formatter),r}var ug;function $V(){return ug||(ug=document.createElement("canvas").getContext("2d")),ug}ho(function(e,r){r===void 0&&(r={});var t=r.fontSize,n=r.fontFamily,i=n===void 0?"sans-serif":n,a=r.fontWeight,o=r.fontStyle,l=r.fontVariant,s=$V();s.font=[o,a,l,"".concat(t,"px"),i].join(" ");var u=s.measureText(at(e)?e:"");return u.width},function(e,r){return r===void 0&&(r={}),rt([e],Hu(r),!0).join("")});function ka(e){return typeof e=="number"&&!isNaN(e)}function GV(e,r,t){var n=Math.min(r,t),i=Math.max(r,t);return e>=n&&e<=i}function Ti(e){if(st(e))return[e,e,e,e];if(G(e)){var r=e.length;if(r===1)return[e[0],e[0],e[0],e[0]];if(r===2)return[e[0],e[1],e[0],e[1]];if(r===3)return[e[0],e[1],e[2],e[1]];if(r===4)return e}return[0,0,0,0]}function Ef(e,r,t){r===void 0&&(r="bottom"),t===void 0&&(t=25);var n=Ti(e),i=[r.startsWith("top")?t:0,r.startsWith("right")?t:0,r.startsWith("bottom")?t:0,r.startsWith("left")?t:0];return[n[0]+i[0],n[1]+i[1],n[2]+i[2],n[3]+i[3]]}function cg(e){var r=e.map(function(n){return Ti(n)}),t=[0,0,0,0];return r.length>0&&(t=t.map(function(n,i){return r.forEach(function(a,o){n+=r[o][i]}),n})),t}function HV(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var n=1,i=e.length;n<i;n+=1){var a=e[n];t.push(["L",a.x,a.y])}r&&t.push(["Z"])}return t}var WV=function(e,r,t,n){var i=[],a,o,l=!!n,s,u;if(l){s=[1/0,1/0],u=[-1/0,-1/0];for(var c=0,f=e.length;c<f;c++){var h=e[c];s=ge([0,0],s,h),u=ye([0,0],u,h)}s=ge([0,0],s,n[0]),u=ye([0,0],u,n[1])}for(var c=0,v=e.length;c<v;c++){var h=e[c];if(t)a=e[c?c-1:v-1],o=e[(c+1)%v];else if(c===0||c===v-1){i.push(h);continue}else a=e[c-1],o=e[c+1];var d=[0,0];d=ua(d,o,a),d=Ye(d,d,r);var p=mo(h,a),y=mo(h,o),g=p+y;g!==0&&(p/=g,y/=g);var m=Ye([0,0],d,-p),x=Ye([0,0],d,y),w=un([0,0],h,m),C=un([0,0],h,x);l&&(w=ye([0,0],w,s),w=ge([0,0],w,u),C=ye([0,0],C,s),C=ge([0,0],C,u)),i.push(w),i.push(C)}return t&&i.push(i.shift()),i};function XV(e,r,t){for(var n=!!r,i=[],a=0,o=e.length;a<o;a+=2)i.push([e[a],e[a+1]]);for(var l=WV(i,.4,n,t),s=i.length,u=[],c,f,h,a=0;a<s-1;a++)c=l[a*2],f=l[a*2+1],h=i[a+1],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]]);return n&&(c=l[s],f=l[s+1],h=i[0],u.push(["C",c[0],c[1],f[0],f[1],h[0],h[1]])),u}function jV(e,r,t){var n=[],i=e[0],a=null;if(e.length<=2)return HV(e,r);for(var o=0,l=e.length;o<l;o++){var s=e[o];(!a||!(a.x===s.x&&a.y===s.y))&&(n.push(s.x),n.push(s.y),a=s)}var u=t||[[0,0],[1,1]],c=XV(n,r,u);return c.unshift(["M",i.x,i.y]),c}function UM(e){var r={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",display:"flex",justifyContent:"center",alignItems:"center"},t=["stroke","lineWidth","shadowColor","strokeOpacity","shadowBlur","shadowOffsetX","shadowOffsetY","fill"];E(e,"fill")&&(r.color=e.fill);var n=bt(e,t),i=n.shadowColor,a=n.shadowBlur,o=a===void 0?0:a,l=n.shadowOffsetX,s=l===void 0?0:l,u=n.shadowOffsetY,c=u===void 0?0:u;r["text-shadow"]="".concat([i,"".concat(s,"px"),"".concat(c,"px"),"".concat(o,"px")].join(" "));var f=bt(e,t),h=f.stroke,v=f.lineWidth,d=v===void 0?0:v;return r["-webkit-text-stroke"]="".concat(["".concat(d,"px"),h].join(" ")),F(e,function(p,y){["fontSize"].includes(y)&&st(p)?r[jM(y)]="".concat(p,"px"):y&&!t.includes(y)&&(r[jM(y)]="".concat(p))}),r}function qM(e,r){e.style["pointer-events"]="none",F(r,function(t,n){n&&t&&(e.style[n]=t)})}var kf=function(e,r,t){var n=r.statistic,i=r.plotType,a=n.title,o=n.content;[a,o].forEach(function(l,s){if(l){var u="";s===0?u=o?"translate(-50%, -100%)":"translate(-50%, -50%)":u=a?"translate(-50%, 0)":"translate(-50%, -50%)";var c=Q(l.style)?l.style(t):l.style;e.annotation().html(S({position:["50%","50%"],html:function(f,h){var v=h.getCoordinate(),d=0;if(i==="pie"||i==="ring-progress")d=v.getRadius()*v.innerRadius*2;else if(i==="liquid"){var p=E(h.geometries,[0,"elements",0,"shape"]);if(p){var y=p.find(function(w){return w.get("name")==="wrap"}),g=y.getCanvasBBox().width;d=g}}else d||(d=v.getWidth());qM(f,S({width:"".concat(d,"px"),transform:u},UM(c)));var m=h.getData();if(l.customHtml)return l.customHtml(f,h,t,m);var x=l.content;return l.formatter&&(x=l.formatter(t,m)),x?at(x)?x:"".concat(x):"<div></div>"},key:"".concat(s===0?"top":"bottom","-statistic")},bt(l,["offsetX","offsetY","rotate","style","formatter"])))}})},UV=function(e,r,t){var n=r.statistic,i=n.title,a=n.content;[i,a].forEach(function(o){if(o){var l=Q(o.style)?o.style(t):o.style;e.annotation().html(S({position:["50%","100%"],html:function(s,u){var c=u.getCoordinate(),f=u.views[0].getCoordinate(),h=f.getCenter(),v=f.getRadius(),d=Math.max(Math.sin(f.startAngle),Math.sin(f.endAngle))*v,p=h.y+d-c.y.start-parseFloat(E(l,"fontSize",0)),y=c.getRadius()*c.innerRadius*2;qM(s,S({width:"".concat(y,"px"),transform:"translate(-50%, ".concat(p,"px)")},UM(l)));var g=u.getData();if(o.customHtml)return o.customHtml(s,u,t,g);var m=o.content;return o.formatter&&(m=o.formatter(t,g)),m?at(m)?m:"".concat(m):"<div></div>"}},bt(o,["offsetX","offsetY","rotate","style","formatter"])))}})};function ZM(e,r){return r?Pe(r,function(t,n,i){return t.replace(new RegExp("{\\s*".concat(i,"\\s*}"),"g"),n)},e):e}function vt(e,r){return e.views.find(function(t){return t.id===r})}function ks(e){var r=e.parent;return r?r.views:[]}function QM(e){return ks(e).filter(function(r){return r!==e})}function Ts(e,r,t){t===void 0&&(t=e.geometries),typeof r=="boolean"?e.animate(r):e.animate(!0),F(t,function(n){var i;Q(r)?i=r(n.type||n.shapeType,n)||!0:i=r,n.animate(i)})}function Tf(){return typeof window=="object"?window==null?void 0:window.devicePixelRatio:2}function fg(e,r){r===void 0&&(r=e);var t=document.createElement("canvas"),n=Tf();t.width=e*n,t.height=r*n,t.style.width="".concat(e,"px"),t.style.height="".concat(r,"px");var i=t.getContext("2d");return i.scale(n,n),t}function hg(e,r,t,n){n===void 0&&(n=t);var i=r.backgroundColor,a=r.opacity;e.globalAlpha=a,e.fillStyle=i,e.beginPath(),e.fillRect(0,0,t,n),e.closePath()}function KM(e,r,t){var n=e+r;return t?n*2:n}function JM(e,r){var t=r?[[e*.25,e*.25],[e*.75,e*.75]]:[[e*.5,e*.5]];return t}function vg(e,r){var t=r*Math.PI/180,n={a:Math.cos(t)*(1/e),b:Math.sin(t)*(1/e),c:-Math.sin(t)*(1/e),d:Math.cos(t)*(1/e),e:0,f:0};return n}var qV={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function ZV(e,r,t,n){var i=r.size,a=r.fill,o=r.lineWidth,l=r.stroke,s=r.fillOpacity;e.beginPath(),e.globalAlpha=s,e.fillStyle=a,e.strokeStyle=l,e.lineWidth=o,e.arc(t,n,i/2,0,2*Math.PI,!1),e.fill(),o&&e.stroke(),e.closePath()}function QV(e){var r=B({},qV,e),t=r.size,n=r.padding,i=r.isStagger,a=r.rotation,o=KM(t,n,i),l=JM(o,i),s=fg(o,o),u=s.getContext("2d");hg(u,r,o);for(var c=0,f=l;c<f.length;c++){var h=f[c],v=h[0],d=h[1];ZV(u,r,v,d)}var p=u.createPattern(s,"repeat");if(p){var y=Tf(),g=vg(y,a);p.setTransform(g)}return p}var KV={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};function JV(e,r,t){var n=r.stroke,i=r.lineWidth,a=r.strokeOpacity,o=new Path2D(t);e.globalAlpha=a,e.lineCap="square",e.strokeStyle=i?n:"transparent",e.lineWidth=i,e.stroke(o)}function t4(e){var r=B({},KV,e),t=r.spacing,n=r.rotation,i=r.lineWidth,a=t+i||1,o=t+i||1,l=`
|
|
74
74
|
M 0 0 L `.concat(a,` 0
|
|
75
75
|
M 0 `).concat(o," L ").concat(a," ").concat(o,`
|
|
76
|
-
`),s=fg(a,o),u=s.getContext("2d");hg(u,r,a,o),JV(u,r,l);var c=u.createPattern(s,"repeat");if(c){var f=Tf(),h=vg(f,n);c.setTransform(h)}return c}var e4={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function r4(e,r,t,n){var i=r.stroke,a=r.size,o=r.fill,l=r.lineWidth,s=r.fillOpacity;e.globalAlpha=s,e.strokeStyle=i,e.lineWidth=l,e.fillStyle=o,e.strokeRect(t-a/2,n-a/2,a,a),e.fillRect(t-a/2,n-a/2,a,a)}function n4(e){var r=D({},e4,e),t=r.size,n=r.padding,i=r.isStagger,a=r.rotation,o=KM(t,n,i),l=JM(o,i),s=fg(o,o),u=s.getContext("2d");hg(u,r,o);for(var c=0,f=l;c<f.length;c++){var h=f[c],v=h[0],d=h[1];r4(u,r,v,d)}var p=u.createPattern(s,"repeat");if(p){var y=Tf(),g=vg(y,a);p.setTransform(g)}return p}function i4(e){var r=e.type,t=e.cfg,n;switch(r){case"dot":n=QV(t);break;case"line":n=t4(t);break;case"square":n=n4(t);break}return n}function pr(e){var r=this;return function(t){var n,i=t.options,a=t.chart,o=i.pattern;if(!o)return t;var l=function(s){for(var u,c,f,h=[],v=1;v<arguments.length;v++)h[v-1]=arguments[v];var d=a.getTheme().defaultColor,p=d,y=(c=(u=a.geometries)===null||u===void 0?void 0:u[0])===null||c===void 0?void 0:c.getAttribute("color");if(y){var g=y.getFields()[0],m=E(s,g);p=Je.getMappingValue(y,m,((f=y.values)===null||f===void 0?void 0:f[0])||d)}var x=o;typeof o=="function"&&(x=o.call(r,s,p)),x instanceof CanvasPattern||(x=i4(D({},{cfg:{backgroundColor:p}},x)));var w=i[e];return S(S({},typeof w=="function"?w.call.apply(w,rt([r,s],h,!1)):w||{}),{fill:x||p})};return D({},t,{options:(n={},n[e]=l,n)})}}function Yo(e){var r=e.chart,t=e.options,n=t.legend,i=t.colorField,a=t.seriesField;return n===!1?r.legend(!1):(i||a)&&r.legend(i||a,n),e}function le(e){var r=e.chart,t=e.options,n=t.tooltip;return n!==void 0&&r.tooltip(n),e}function Yt(e){var r=e.chart,t=e.options,n=t.interactions;return F(n,function(i){i.enable===!1?r.removeInteraction(i.type):r.interaction(i.type,i.cfg||{})}),e}function It(e){var r=e.chart,t=e.options,n=t.animation;return Ts(r,n),e}function wt(e){var r=e.chart,t=e.options,n=t.theme;return n&&r.theme(n),e}function Ii(e){var r=e.chart,t=e.options,n=t.state;return n&&F(r.geometries,function(i){i.state(n)}),e}function Is(e){var r=e.chart,t=e.options,n=t.slider;return r.option("slider",n),e}function dg(e){var r=e.chart,t=e.options,n=t.scrollbar;return r.option("scrollbar",n),e}function Ut(e,r){return function(t){var n=t.chart,i=t.options,a={};return F(e,function(o,l){a[l]=bt(o,er)}),a=D({},r,i.meta,a),n.scale(a),t}}function _t(e){return function(r){var t=r.chart,n=r.options,i=t.getController("annotation");return F(rt(rt([],n.annotations||[],!0),e||[],!0),function(a){i.annotation(a)}),r}}function Ta(e){var r=e.chart,t=e.options,n=t.yAxis,i=t.limitInPlot,a=i;return At(n)&&Y(i)&&(Object.values(bt(n,["min","max","minLimit","maxLimit"])).some(function(o){return!Y(o)})?a=!0:a=!1),r.limitInPlot=a,e}function tA(e){return e===void 0&&(e="rect"),function(r){var t=r.chart,n=r.options,i=n.coordinate,a=Array.from(i||[]).map(function(o){return o.type==="reflectX"?["reflect","x"]:o.type==="reflectY"?["reflect","y"]:o.type==="transpose"?["transpose"]:null}).filter(function(o){return!!o});return a.length!==0&&t.coordinate({type:e,actions:a}),r}}var a4={locale:"en-US"},If={};function eA(e,r){If[e]=r}function Pf(e){return{get:function(r,t){return ZM(E(If[e],r)||E(If[a4.locale],r)||E(If["en-US"],r)||r,t)}}}var o4={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}},l4={locale:"zh-CN",general:{increase:"增加",decrease:"减少",root:"初始"},statistic:{total:"总计"},conversionTag:{label:"转化率"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"总计"}};function Lr(e,r){if(e===!1)return{fields:!1};var t=E(e,"fields"),n=E(e,"formatter");return n&&!t&&(t=r),{fields:t,formatter:n}}function Lf(e,r){var t=e.type,n=e.xField,i=e.yField,a=e.colorField,o=e.shapeField,l=e.sizeField,s=e.styleField,u=e.rawFields,c=[];if(u=(Q(u)?u(t,r):u)||[],r==="color")c=rt([a||n],u,!0);else if(r==="shape")c=rt([o||n],u,!0);else if(r==="size")c=rt([l||n],u,!0);else{c=rt([n,i,a,o,l,s],u,!0);var f=["x","y","color","shape","size","style"].indexOf(r),h=c[f];c.splice(f,1),c.unshift(h)}var v=oa(c.filter(function(p){return!!p})),d=t==="line"&&[n,i].includes(v.join("*"))?"":v.join("*");return{mappingFields:v,tileMappingField:d}}function Vo(e,r){if(r)return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i={};return e.forEach(function(a,o){i[a]=t[o]}),delete i.undefined,r(i)}}function rr(e){var r=e.chart,t=e.options,n=t.type,i=t.args,a=t.mapping,o=t.xField,l=t.yField,s=t.colorField,u=t.shapeField,c=t.sizeField,f=t.tooltipFields,h=t.label,v=t.state,d=t.customInfo;if(!a)return e;var p=a.color,y=a.shape,g=a.size,m=a.style,x=a.tooltip,w=r[n](i).position("".concat(o,"*").concat(l));if(at(p))s?w.color(s,p):w.color(p);else if(Q(p)){var C=Lf(t,"color"),M=C.mappingFields,A=C.tileMappingField;w.color(A,Vo(M,p))}else s&&w.color(s,p);if(at(y))u?w.shape(u,[y]):w.shape(y);else if(Q(y)){var b=Lf(t,"shape"),M=b.mappingFields,A=b.tileMappingField;w.shape(A,Vo(M,y))}else u&&w.shape(u,y);if(st(g))c?w.size(c,g):w.size(g);else if(Q(g)){var T=Lf(t,"size"),M=T.mappingFields,A=T.tileMappingField;w.size(A,Vo(M,g))}else c&&w.size(c,g);if(Q(m)){var k=Lf(t,"style"),M=k.mappingFields,A=k.tileMappingField;w.style(A,Vo(M,m))}else At(m)&&w.style(m);if(f===!1?w.tooltip(!1):We(f)||w.tooltip(f.join("*"),Vo(f,x)),h===!1)w.label(!1);else if(h){var P=h.callback,O=h.fields,V=kt(h,["callback","fields"]);w.label({fields:O||[l],callback:P,cfg:fe(V)})}return v&&w.state(v),d&&w.customInfo(d),[o,l].filter(function(W){return W!==s}).forEach(function(W){r.legend(W,!1)}),S(S({},e),{ext:{geometry:w}})}function Of(e){var r=e.options,t=r.area,n=r.xField,i=r.yField,a=r.seriesField,o=r.smooth,l=r.tooltip,s=r.useDeferredLabel,u=Lr(l,[n,i,a]),c=u.fields,f=u.formatter;return t?rr(D({},e,{options:{type:"area",colorField:a,tooltipFields:c,mapping:Z({shape:o?"smooth":"area",tooltip:f},t),args:{useDeferredLabel:s}}})):e}function rA(e){var r=e.options,t=r.edge,n=r.xField,i=r.yField,a=r.seriesField,o=r.tooltip,l=r.useDeferredLabel,s=Lr(o,[n,i,a]),u=s.fields,c=s.formatter;return t?rr(D({},e,{options:{type:"edge",colorField:a,tooltipFields:u,mapping:S({tooltip:c},t),args:{useDeferredLabel:l}}})):e}function s4(e){var r=e.chart,t=e.options,n=e.ext,i=t.seriesField,a=t.isGroup,o=t.isStack,l=t.marginRatio,s=t.widthRatio,u=t.groupField,c=t.theme,f=[];if(i&&(a&&f.push({type:"dodge",dodgeBy:u||i,marginRatio:l}),o&&f.push({type:"stack",marginRatio:l})),f.length&&(n!=null&&n.geometry)){var h=n==null?void 0:n.geometry;h.adjust(f)}return Y(s)||r.theme(D({},At(c)?c:ps(c),{columnWidthRatio:s})),e}function Fe(e){var r=e.options,t=r.xField,n=r.yField,i=r.interval,a=r.seriesField,o=r.tooltip,l=r.minColumnWidth,s=r.maxColumnWidth,u=r.columnBackground,c=r.dodgePadding,f=r.intervalPadding,h=r.useDeferredLabel,v=Lr(o,[t,n,a]),d=v.fields,p=v.formatter,y=(i?rr(D({},e,{options:{type:"interval",colorField:a,tooltipFields:d,mapping:S({tooltip:p},i),args:{dodgePadding:c,intervalPadding:f,minColumnWidth:l,maxColumnWidth:s,background:u,useDeferredLabel:h}}})):e).ext;return s4(S(S({},e),{ext:y}))}function _o(e){var r=e.options,t=r.line,n=r.stepType,i=r.xField,a=r.yField,o=r.seriesField,l=r.smooth,s=r.connectNulls,u=r.tooltip,c=r.useDeferredLabel,f=Lr(u,[i,a,o]),h=f.fields,v=f.formatter;return t?rr(D({},e,{options:{type:"line",colorField:o,tooltipFields:h,mapping:Z({shape:n||(l?"smooth":"line"),tooltip:v},t),args:{connectNulls:s,useDeferredLabel:c}}})):e}function gr(e){var r=e.options,t=r.point,n=r.xField,i=r.yField,a=r.seriesField,o=r.sizeField,l=r.shapeField,s=r.tooltip,u=r.useDeferredLabel,c=Lr(s,[n,i,a,o,l]),f=c.fields,h=c.formatter;return t?rr(D({},e,{options:{type:"point",colorField:a,shapeField:l,tooltipFields:f,mapping:S({tooltip:h},t),args:{useDeferredLabel:u}}})):e}function Df(e){var r=e.options,t=r.polygon,n=r.xField,i=r.yField,a=r.seriesField,o=r.tooltip,l=r.useDeferredLabel,s=Lr(o,[n,i,a]),u=s.fields,c=s.formatter;return t?rr(D({},e,{options:{type:"polygon",colorField:a,tooltipFields:u,mapping:S({tooltip:c},t),args:{useDeferredLabel:l}}})):e}function pg(e){var r=e.options,t=r.schema,n=r.xField,i=r.yField,a=r.seriesField,o=r.tooltip,l=r.useDeferredLabel,s=Lr(o,[n,i,a]),u=s.fields,c=s.formatter;return t?rr(D({},e,{options:{type:"schema",colorField:a,tooltipFields:u,mapping:S({tooltip:c},t),args:{useDeferredLabel:l}}})):e}function u4(e){var r=e.options,t=r.violin,n=r.xField,i=r.yField,a=r.seriesField,o=r.sizeField,l=r.tooltip,s=Lr(l,[n,i,a,o]),u=s.fields,c=s.formatter;return t?rr(D({},e,{options:{type:"violin",colorField:a,tooltipFields:u,mapping:S({tooltip:c},t)}})):e}var Ia={},Pi={},nA={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=1,t=function(){return"".concat(r++)};e.default=t})(nA);var Bf={},Rf={},gg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var o=this,l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];clearTimeout(a),a=setTimeout(function(){n.apply(o,s)},i)}};e.default=r})(gg);var mn={};Object.defineProperty(mn,"__esModule",{value:!0}),mn.SizeSensorId=mn.SensorTabIndex=mn.SensorClassName=void 0;var c4="size-sensor-id";mn.SizeSensorId=c4;var f4="size-sensor-object";mn.SensorClassName=f4;var h4="-1";mn.SensorTabIndex=h4,Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.createSensor=void 0;var v4=d4(gg),yg=mn;function d4(e){return e&&e.__esModule?e:{default:e}}var p4=function(r,t){var n=void 0,i=[],a=function(){getComputedStyle(r).position==="static"&&(r.style.position="relative");var f=document.createElement("object");return f.onload=function(){f.contentDocument.defaultView.addEventListener("resize",o),o()},f.style.display="block",f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.height="100%",f.style.width="100%",f.style.overflow="hidden",f.style.pointerEvents="none",f.style.zIndex="-1",f.style.opacity="0",f.setAttribute("class",yg.SensorClassName),f.setAttribute("tabindex",yg.SensorTabIndex),f.type="text/html",r.appendChild(f),f.data="about:blank",f},o=(0,v4.default)(function(){i.forEach(function(c){c(r)})}),l=function(f){n||(n=a()),i.indexOf(f)===-1&&i.push(f)},s=function(){n&&n.parentNode&&(n.contentDocument&&n.contentDocument.defaultView.removeEventListener("resize",o),n.parentNode.removeChild(n),r.removeAttribute(yg.SizeSensorId),n=void 0,i=[],t&&t())},u=function(f){var h=i.indexOf(f);h!==-1&&i.splice(h,1),i.length===0&&n&&s()};return{element:r,bind:l,destroy:s,unbind:u}};Rf.createSensor=p4;var Nf={};Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.createSensor=void 0;var g4=mn,y4=m4(gg);function m4(e){return e&&e.__esModule?e:{default:e}}var x4=function(r,t){var n=void 0,i=[],a=(0,y4.default)(function(){i.forEach(function(c){c(r)})}),o=function(){var f=new ResizeObserver(a);return f.observe(r),a(),f},l=function(f){n||(n=o()),i.indexOf(f)===-1&&i.push(f)},s=function(){n.disconnect(),i=[],n=void 0,r.removeAttribute(g4.SizeSensorId),t&&t()},u=function(f){var h=i.indexOf(f);h!==-1&&i.splice(h,1),i.length===0&&n&&s()};return{element:r,bind:l,destroy:s,unbind:u}};Nf.createSensor=x4,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.createSensor=void 0;var w4=Rf,S4=Nf,C4=typeof ResizeObserver!="undefined"?S4.createSensor:w4.createSensor;Bf.createSensor=C4,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.removeSensor=Pi.getSensor=Pi.Sensors=void 0;var M4=F4(nA),A4=Bf,mg=mn;function F4(e){return e&&e.__esModule?e:{default:e}}var $o={};Pi.Sensors=$o;function iA(e){e&&$o[e]&&delete $o[e]}var b4=function(r){var t=r.getAttribute(mg.SizeSensorId);if(t&&$o[t])return $o[t];var n=(0,M4.default)();r.setAttribute(mg.SizeSensorId,n);var i=(0,A4.createSensor)(r,function(){return iA(n)});return $o[n]=i,i};Pi.getSensor=b4;var E4=function(r){var t=r.element.getAttribute(mg.SizeSensorId);r.destroy(),iA(t)};Pi.removeSensor=E4,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.ver=Ia.clear=aA=Ia.bind=void 0;var xg=Pi,k4=function(r,t){var n=(0,xg.getSensor)(r);return n.bind(t),function(){n.unbind(t)}},aA=Ia.bind=k4,T4=function(r){var t=(0,xg.getSensor)(r);(0,xg.removeSensor)(t)};Ia.clear=T4;var I4="1.0.2";Ia.ver=I4;var oA="data-chart-source-type",lA=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"],ft=function(e){I(r,e);function r(t,n){var i=e.call(this)||this;return i.container=typeof t=="string"?document.getElementById(t):t,i.options=D({},i.getDefaultOptions(),n),i.createG2(),i.bindEvents(),i}return r.getDefaultOptions=function(){return{renderer:"canvas",xAxis:{nice:!0,label:{autoRotate:!1,autoHide:{type:"equidistance",cfg:{minGap:6}}}},yAxis:{nice:!0,label:{autoHide:!0,autoRotate:!1}},animation:!0}},r.prototype.createG2=function(){var t=this.options,n=t.width,i=t.height,a=t.defaultInteractions;this.chart=new uz(S(S(S(S({container:this.container,autoFit:!1},this.getChartSize(n,i)),{localRefresh:!1}),bt(this.options,lA)),{defaultInteractions:a})),this.container.setAttribute(oA,"G2Plot")},r.prototype.getChartSize=function(t,n){var i=sg(this.container);return{width:t||i.width||400,height:n||i.height||400}},r.prototype.bindEvents=function(){var t=this;this.chart&&this.chart.on("*",function(n){n!=null&&n.type&&t.emit(n.type,n)})},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){this.chart.clear(),this.chart.options={data:[],animate:!0},this.chart.views=[],this.execAdaptor(),this.chart.render(),this.bindSizeSensor()},r.prototype.update=function(t){this.updateOption(t),this.render()},r.prototype.updateOption=function(t){this.options=D({},this.options,t)},r.prototype.setState=function(t,n,i){i===void 0&&(i=!0);var a=Es(this.chart);F(a,function(o){n(o.getData())&&o.setState(t,i)})},r.prototype.getStates=function(){var t=Es(this.chart),n=[];return F(t,function(i){var a=i.getData(),o=i.getStates();F(o,function(l){n.push({data:a,state:l,geometry:i.geometry,element:i})})}),n},r.prototype.changeData=function(t){this.update({data:t})},r.prototype.changeSize=function(t,n){this.chart.changeSize(t,n)},r.prototype.addAnnotations=function(t,n){n=n||this.chart;var i=rt([],t,!0),a=n.getController("annotation"),o=a.getComponents().map(function(u){return u.extra});a.clear(!0);for(var l=function(u){var c=o[u],f=i.findIndex(function(h){return h.id&&h.id===c.id});f!==-1&&(c=D({},c,i[f]),i.splice(f,1)),a.annotation(c)},s=0;s<o.length;s++)l(s);i.forEach(function(u){return a.annotation(u)}),n.render(!0)},r.prototype.removeAnnotations=function(t){var n=this.chart.getController("annotation"),i=n.getComponents().map(function(l){return l.extra});n.clear(!0);for(var a=function(l){var s=i[l];t.find(function(u){return u.id&&u.id===s.id})||n.annotation(s)},o=0;o<i.length;o++)a(o);this.chart.render(!0)},r.prototype.destroy=function(){this.unbindSizeSensor(),this.chart.destroy(),this.off(),this.container.removeAttribute(oA)},r.prototype.execAdaptor=function(){var t=this.getSchemaAdaptor(),n=this.options,i=n.padding,a=n.appendPadding;this.chart.padding=i,this.chart.appendPadding=a,t({chart:this.chart,options:this.options})},r.prototype.triggerResize=function(){this.chart.forceFit()},r.prototype.bindSizeSensor=function(){var t=this;if(!this.unbind){var n=this.options.autoFit,i=n===void 0?!0:n;i&&(this.unbind=aA(this.container,function(){var a=sg(t.container),o=a.width,l=a.height;(o!==t.chart.width||l!==t.chart.height)&&t.triggerResize()}))}},r.prototype.unbindSizeSensor=function(){this.unbind&&(this.unbind(),this.unbind=void 0)},r}(Hv);function sA(e,r,t,n){var i=Pe(e,function(a,o){var l=o[t],s=a.has(l)?a.get(l):0,u=o[r];return s=ka(u)?s+u:s,a.set(l,s),a},new Map);return zt(e,function(a){var o,l=a[r],s=a[t],u=ka(l)&&i.get(s)!==0?l/i.get(s):0;return S(S({},a),(o={},o[n]=u,o))})}function P4(e,r,t,n){var i=Pe(e,function(a,o){var l=Pe(t,function(c,f){return"".concat(c).concat(o[f])},""),s=a.has(l)?a.get(l):0,u=o[r];return s=ka(u)?s+u:s,a.set(l,s),a},new Map);return zt(e,function(a){var o,l=a[r],s=Pe(t,function(c,f){return"".concat(c).concat(a[f])},""),u=ka(l)&&i.get(s)!==0?l/i.get(s):0;return S(S({},a),(o={},o[n]=u,o))})}function Ps(e,r,t,n,i){return i?sA(e,r,t,n):e}function L4(e){var r=e.chart,t=e.options,n=t.data,i=t.color,a=t.lineStyle,o=t.lineShape,l=t.point,s=t.area,u=t.seriesField,c=l==null?void 0:l.state,f=s==null?void 0:s.state;r.data(n);var h=D({},e,{options:{shapeField:u,line:{color:i,style:a,shape:o},point:l&&S({color:i,shape:"circle"},l),area:s&&S({color:i},s),label:void 0}}),v=D({},h,{options:{tooltip:!1,state:c}}),d=D({},h,{options:{tooltip:!1,state:f}});return _o(h),gr(v),Of(d),e}function zf(e){var r,t,n=e.options,i=n.xAxis,a=n.yAxis,o=n.xField,l=n.yField,s=n.data;return lt(Ut((r={},r[o]=i,r[l]=a,r),(t={},t[o]={type:"cat"},t[l]=lg(s,l),t)))(e)}function O4(e){var r=e.chart,t=e.options,n=t.reflect;if(n){var i=n;G(i)||(i=[i]);var a=i.map(function(o){return["reflect",o]});r.coordinate({type:"rect",actions:a})}return e}function uA(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(o,!1):r.axis(o,i),e}function cA(e){var r=e.chart,t=e.options,n=t.legend,i=t.seriesField;return n&&i?r.legend(i,n):n===!1&&r.legend(!1),e}function D4(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"line");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:S({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},fe(l))})}return e}function B4(e){var r=e.chart,t=e.options,n=t.isStack;return n&&F(r.geometries,function(i){i.adjust("stack")}),e}function fA(e){return lt(L4,zf,B4,wt,O4,uA,cA,le,D4,Is,dg,Yt,It,_t(),Ta)(e)}function R4(e){var r=e.chart,t=e.options,n=t.data,i=t.areaStyle,a=t.areaShape,o=t.color,l=t.point,s=t.line,u=t.isPercent,c=t.xField,f=t.yField,h=t.tooltip,v=t.seriesField,d=t.startOnZero,p=l==null?void 0:l.state,y=Ps(n,f,c,f,u);r.data(y);var g=u?S({formatter:function(C){return{name:C[v]||C[c],value:(Number(C[f])*100).toFixed(2)+"%"}}},h):h,m=D({},e,{options:{area:{color:o,style:i,shape:a},point:l&&S({color:o},l),tooltip:g,label:void 0,args:{startOnZero:d}}}),x={chart:r,options:D({line:{size:2}},Wu(t,["state"]),{line:s&&S({color:o},s),sizeField:v,state:s==null?void 0:s.state,tooltip:!1,label:void 0,args:{startOnZero:d}})},w=D({},m,{options:{tooltip:!1,state:p}});return Of(m),_o(x),gr(w),e}function N4(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"area");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:S({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},fe(l))})}return e}function z4(e){var r=e.chart,t=e.options,n=t.isStack,i=t.isPercent,a=t.seriesField;return(i||n)&&a&&F(r.geometries,function(o){o.adjust("stack")}),e}function hA(e){return lt(wt,pr("areaStyle"),tA("rect"),R4,zf,z4,uA,cA,le,N4,Is,_t(),Yt,It,Ta)(e)}var Y4=D({},ft.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},isStack:!0,line:{},legend:{position:"top-left",radio:{}}}),vA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return Y4},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options,i=n.isPercent,a=n.xField,o=n.yField,l=this,s=l.chart,u=l.options;zf({chart:s,options:u}),this.chart.changeData(Ps(t,o,a,o,i))},r.prototype.getSchemaAdaptor=function(){return hA},r}(ft),V4=10,_4=5,$4={padding:[8,10],text:"reset",textStyle:{default:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"}},buttonStyle:{default:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},active:{fill:"#e6e6e6"}}},G4=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg=S({name:"button"},$4),t}return r.prototype.getButtonCfg=function(){var t=this.context.view,n=E(t,["interactions","filter-action","cfg","buttonConfig"]);return D(this.buttonCfg,n,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),n=this.context.view.foregroundGroup.addGroup({name:t.name}),i=this.drawText(n);this.drawBackground(n,i.getBBox()),this.buttonGroup=n},r.prototype.drawText=function(t){var n,i=this.getButtonCfg();return t.addShape({type:"text",name:"button-text",attrs:S({text:i.text},(n=i.textStyle)===null||n===void 0?void 0:n.default)})},r.prototype.drawBackground=function(t,n){var i,a=this.getButtonCfg(),o=Ti(a.padding),l=t.addShape({type:"rect",name:"button-rect",attrs:S({x:n.x-o[3],y:n.y-o[0],width:n.width+o[1]+o[3],height:n.height+o[0]+o[2]},(i=a.buttonStyle)===null||i===void 0?void 0:i.default)});return l.toBack(),t.on("mouseenter",function(){var s;l.attr((s=a.buttonStyle)===null||s===void 0?void 0:s.active)}),t.on("mouseleave",function(){var s;l.attr((s=a.buttonStyle)===null||s===void 0?void 0:s.default)}),l},r.prototype.resetPosition=function(){var t=this.context.view,n=t.getCoordinate(),i=n.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),l=Je.transform(null,[["t",i.x-o.width-V4,i.y+o.height+_4]]);a.setMatrix(l)},r.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},r.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},r.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},r}(Bt);et("brush-reset-button",G4,{name:"brush-reset-button"}),ut("filter-action",{});function zn(e){return e.isInPlot()}function Pa(e,r,t){var n=t||{},i=n.mask,a=n.isStartEnable,o=r||"rect";switch(e){case"brush":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||zn,action:["brush:start","".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[null,{maskStyle:i==null?void 0:i.style}]}],processing:[{trigger:"mousemove",isEnable:zn,action:["".concat(o,"-mask:resize")]}],end:[{trigger:"mouseup",isEnable:zn,action:["brush:filter","brush:end","".concat(o,"-mask:end"),"".concat(o,"-mask:hide"),"brush-reset-button:show"]}],rollback:[{trigger:"brush-reset-button:click",action:["brush:reset","brush-reset-button:hide","cursor:crosshair"]}]};case"brush-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:default",isEnable:function(l){return a?!a(l):!1}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(l){return!l.isInShape("mask")},action:["".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[{maskStyle:i==null?void 0:i.style}]},{trigger:"mask:dragstart",action:["".concat(o,"-mask:moveStart")]}],processing:[{trigger:"plot:mousemove",action:["".concat(o,"-mask:resize")]},{trigger:"mask:drag",action:["".concat(o,"-mask:move")]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["".concat(o,"-mask:end")]},{trigger:"mask:dragend",action:["".concat(o,"-mask:moveEnd")]},{trigger:"document:mouseup",isEnable:function(l){return!l.isInPlot()},action:["element-range-highlight:clear","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","".concat(o,"-mask:hide")]}]};case"brush-x":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||zn,action:["brush-x:start","".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[null,{maskStyle:i==null?void 0:i.style}]}],processing:[{trigger:"mousemove",isEnable:zn,action:["".concat(o,"-mask:resize")]}],end:[{trigger:"mouseup",isEnable:zn,action:["brush-x:filter","brush-x:end","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]};case"brush-x-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(l){return!l.isInShape("mask")},action:["".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[{maskStyle:i==null?void 0:i.style}]},{trigger:"mask:dragstart",action:["".concat(o,"-mask:moveStart")]}],processing:[{trigger:"plot:mousemove",action:["".concat(o,"-mask:resize")]},{trigger:"mask:drag",action:["".concat(o,"-mask:move")]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["".concat(o,"-mask:end")]},{trigger:"mask:dragend",action:["".concat(o,"-mask:moveEnd")]},{trigger:"document:mouseup",isEnable:function(l){return!l.isInPlot()},action:["element-range-highlight:clear","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","".concat(o,"-mask:hide")]}]};case"brush-y":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||zn,action:["brush-y:start","".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[null,{maskStyle:i==null?void 0:i.style}]}],processing:[{trigger:"mousemove",isEnable:zn,action:["".concat(o,"-mask:resize")]}],end:[{trigger:"mouseup",isEnable:zn,action:["brush-y:filter","brush-y:end","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["brush-y:reset"]}]};case"brush-y-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(l){return!l.isInShape("mask")},action:["".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[{maskStyle:i==null?void 0:i.style}]},{trigger:"mask:dragstart",action:["".concat(o,"-mask:moveStart")]}],processing:[{trigger:"plot:mousemove",action:["".concat(o,"-mask:resize")]},{trigger:"mask:drag",action:["".concat(o,"-mask:move")]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["".concat(o,"-mask:end")]},{trigger:"mask:dragend",action:["".concat(o,"-mask:moveEnd")]},{trigger:"document:mouseup",isEnable:function(l){return!l.isInPlot()},action:["element-range-highlight:clear","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","".concat(o,"-mask:hide")]}]};default:return{}}}ut("brush",Pa("brush")),ut("brush-highlight",Pa("brush-highlight")),ut("brush-x",Pa("brush-x","x-rect")),ut("brush-y",Pa("brush-y","y-rect")),ut("brush-x-highlight",Pa("brush-x-highlight","x-rect")),ut("brush-y-highlight",Pa("brush-y-highlight","y-rect"));var dA=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function pA(e){var r=e.options,t=r.brush,n=de(r.interactions||[],function(i){return dA.indexOf(i.type)===-1});return t!=null&&t.enabled&&(dA.forEach(function(i){var a=!1;switch(t.type){case"x-rect":a=i===(t.action==="highlight"?"brush-x-highlight":"brush-x");break;case"y-rect":a=i===(t.action==="highlight"?"brush-y-highlight":"brush-y");break;default:a=i===(t.action==="highlight"?"brush-highlight":"brush");break}var o={type:i,enable:a};t&&(o.cfg=Pa(i,t.type,t)),n.push(o)}),(t==null?void 0:t.action)!=="highlight"&&n.push({type:"filter-action",cfg:{buttonConfig:t.button}})),D({},e,{options:{interactions:n}})}var La={hover:"__interval-connected-area-hover__",click:"__interval-connected-area-click__"},wg=function(e,r){return e==="hover"?[{trigger:"interval:mouseenter",action:["element-highlight-by-color:highlight","element-link-by-color:link"],arg:[null,{style:r}]}]:[{trigger:"interval:click",action:["element-highlight-by-color:clear","element-highlight-by-color:highlight","element-link-by-color:clear","element-link-by-color:unlink","element-link-by-color:link"],arg:[null,null,null,null,{style:r}]}]};ut(La.hover,{start:wg(La.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),ut(La.click,{start:wg(La.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});function H4(e){return e===void 0&&(e=!1),function(r){var t=r.chart,n=r.options,i=n.connectedArea,a=function(){t.removeInteraction(La.hover),t.removeInteraction(La.click)};if(!e&&i){var o=i.trigger||"hover";a(),t.interaction(La[o],{start:wg(o,i.style)})}else a();return r}}function gA(e,r){return!st(e)||!st(r)||e===0&&r===0?"-":e===r?"100%":e===0?"∞":"".concat((100*r/e).toFixed(2),"%")}function W4(e,r){return D({size:r?32:80,spacing:r?8:12,offset:r?32:0,arrow:e.arrow!==!1&&{headSize:12,style:{fill:"rgba(0, 0, 0, 0.05)"}},text:e.text!==!1&&{style:{fontSize:12,fill:"rgba(0, 0, 0, 0.85)",textAlign:"center",textBaseline:"middle"},formatter:gA}},e)}function Yf(e,r){return zt(r.getModel().points,function(t){return e.convertPoint(t)})}function X4(e,r,t){var n=e.view,i=e.geometry,a=e.group,o=e.options,l=e.horizontal,s=o.offset,u=o.size,c=o.arrow,f=n.getCoordinate(),h=Yf(f,r)[3],v=Yf(f,t)[0],d=v.y-h.y,p=v.x-h.x;if(typeof c!="boolean"){var y=c.headSize,g=o.spacing,m;l?(p-y)/2<g?(g=Math.max(1,(p-y)/2),m=[[h.x+g,h.y-s],[h.x+g,h.y-s-u],[v.x-g,v.y-s-u/2]]):m=[[h.x+g,h.y-s],[h.x+g,h.y-s-u],[v.x-g-y,v.y-s-u],[v.x-g,v.y-s-u/2],[v.x-g-y,v.y-s]]:(d-y)/2<g?(g=Math.max(1,(d-y)/2),m=[[h.x+s,h.y+g],[h.x+s+u,h.y+g],[v.x+s+u/2,v.y-g]]):m=[[h.x+s,h.y+g],[h.x+s+u,h.y+g],[v.x+s+u,v.y-g-y],[v.x+s+u/2,v.y-g],[v.x+s,v.y-g-y]],a.addShape("polygon",{id:"".concat(n.id,"-conversion-tag-arrow-").concat(i.getElementId(r.getModel().mappingData)),name:"conversion-tag-arrow",origin:{element:r,nextElement:t},attrs:S(S({},c.style||{}),{points:m})})}}function j4(e,r,t){var n,i,a,o=e.view,l=e.geometry,s=e.group,u=e.options,c=e.field,f=e.horizontal,h=u.offset,v=u.size;if(typeof u.text!="boolean"){var d=o.getCoordinate(),p=((n=u.text)===null||n===void 0?void 0:n.formatter)&&((i=u.text)===null||i===void 0?void 0:i.formatter(r.getData()[c],t.getData()[c])),y=Yf(d,r)[f?3:0],g=Yf(d,t)[f?0:3],m=s.addShape("text",{id:"".concat(o.id,"-conversion-tag-text-").concat(l.getElementId(r.getModel().mappingData)),name:"conversion-tag-text",origin:{element:r,nextElement:t},attrs:S(S({},((a=u.text)===null||a===void 0?void 0:a.style)||{}),{text:p,x:f?(y.x+g.x)/2:y.x+h+v/2,y:f?y.y-h-v/2:(y.y+g.y)/2})});if(f){var x=g.x-y.x,w=m.getBBox().width;if(w>x){var C=w/p.length,M=Math.max(1,Math.ceil(x/C)-1),A="".concat(p.slice(0,M),"...");m.attr("text",A)}}}}function U4(e,r,t){X4(e,r,t),j4(e,r,t)}function q4(e,r,t){return r===void 0&&(r=!0),t===void 0&&(t=!1),function(n){var i=n.options,a=n.chart,o=i.conversionTag,l=i.theme;return o&&!t&&(a.theme(D({},At(l)?l:ps(l),{columnWidthRatio:1/3})),a.annotation().shape({render:function(s,u){var c=s.addGroup({id:"".concat(a.id,"-conversion-tag-group"),name:"conversion-tag-group"}),f=Gr(a.geometries,function(d){return d.type==="interval"}),h={view:u,geometry:f,group:c,field:e,horizontal:r,options:W4(o,r)},v=f.elements;F(v,function(d,p){p>0&&U4(h,v[p-1],d)})}})),n}}function Z4(e){var r=e.options,t=r.legend,n=r.seriesField,i=r.isStack;return n?t!==!1&&(t=S({position:i?"right-top":"top-left"},t)):t=!1,e.options.legend=t,e}function Q4(e){var r=e.chart,t=e.options,n=t.data,i=t.columnStyle,a=t.color,o=t.columnWidthRatio,l=t.isPercent,s=t.isGroup,u=t.isStack,c=t.xField,f=t.yField,h=t.seriesField,v=t.groupField,d=t.tooltip,p=t.shape,y=l&&s&&u?P4(n,f,[c,v],f):Ps(n,f,c,f,l),g=[];u&&h&&!s?y.forEach(function(w){var C=g.find(function(M){return M[c]===w[c]&&M[h]===w[h]});C?C[f]+=w[f]||0:g.push(S({},w))}):g=y,r.data(g);var m=l?S({formatter:function(w){var C;return{name:s&&u?"".concat(w[h]," - ").concat(w[v]):(C=w[h])!==null&&C!==void 0?C:w[c],value:(Number(w[f])*100).toFixed(2)+"%"}}},d):d,x=D({},e,{options:{data:g,widthRatio:o,tooltip:m,interval:{shape:p,style:i,color:a}}});return Fe(x),x}function Sg(e){var r,t,n=e.options,i=n.xAxis,a=n.yAxis,o=n.xField,l=n.yField,s=n.data,u=n.isPercent,c=u?{max:1,min:0,minLimit:0,maxLimit:1}:{};return lt(Ut((r={},r[o]=i,r[l]=a,r),(t={},t[o]={type:"cat"},t[l]=S(S({},lg(s,l)),c),t)))(e)}function K4(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(o,!1):r.axis(o,i),e}function J4(e){var r=e.chart,t=e.options,n=t.legend,i=t.seriesField;return n&&i?r.legend(i,n):n===!1&&r.legend(!1),e}function t_(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=t.isRange,o=Ae(r,"interval");if(!n)o.label(!1);else{var l=n.callback,s=kt(n,["callback"]);o.label({fields:[i],callback:l,cfg:S({layout:s!=null&&s.position?void 0:[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]},fe(a?S({content:function(u){var c;return(c=u[i])===null||c===void 0?void 0:c.join("-")}},s):s))})}return e}function e_(e){var r=e.chart,t=e.options,n=t.tooltip,i=t.isGroup,a=t.isStack,o=t.groupField,l=t.data,s=t.xField,u=t.yField,c=t.seriesField;if(n===!1)r.tooltip(!1);else{var f=n;if(i&&a){var h=f.customItems,v=(f==null?void 0:f.formatter)||function(d){return{name:"".concat(d[c]," - ").concat(d[o]),value:d[u]}};f=S(S({},f),{customItems:function(d){var p=[];return F(d,function(y){var g=de(l,function(m){return z0(m,bt(y.data,[s,c]))});g.forEach(function(m){p.push(S(S(S({},y),{value:m[u],data:m,mappingData:{_origin:m}}),v(m)))})}),h?h(p):p}})}r.tooltip(f)}return e}function Vf(e,r){r===void 0&&(r=!1);var t=e.options,n=t.seriesField;return lt(Z4,wt,pr("columnStyle"),Ii,tA("rect"),Q4,Sg,K4,J4,e_,Is,dg,t_,pA,Yt,It,_t(),q4(t.yField,!r,!!n),H4(!t.isStack),Ta)(e)}function r_(e){var r=e.options,t=r.xField,n=r.yField,i=r.xAxis,a=r.yAxis,o={left:"bottom",right:"top",top:"left",bottom:"right"},l=a!==!1?S({position:o[(a==null?void 0:a.position)||"left"]},a):!1,s=i!==!1?S({position:o[(i==null?void 0:i.position)||"bottom"]},i):!1;return S(S({},e),{options:S(S({},r),{xField:n,yField:t,xAxis:l,yAxis:s})})}function n_(e){var r=e.options,t=r.label;return t&&!t.position&&(t.position="left",t.layout||(t.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}])),D({},e,{options:{label:t}})}function i_(e){var r=e.options,t=r.seriesField,n=r.isStack,i=r.legend;return t?i!==!1&&(i=S({position:n?"top-left":"right-top"},i||{})):i=!1,D({},e,{options:{legend:i}})}function a_(e){var r=e.options,t=[{type:"transpose"},{type:"reflectY"}].concat(r.coordinate||[]);return D({},e,{options:{coordinate:t}})}function o_(e){var r=e.chart,t=e.options,n=t.barStyle,i=t.barWidthRatio,a=t.minBarWidth,o=t.maxBarWidth,l=t.barBackground;return Vf({chart:r,options:S(S({},t),{columnStyle:n,columnWidthRatio:i,minColumnWidth:a,maxColumnWidth:o,columnBackground:l})},!0)}function yA(e){return lt(r_,n_,i_,le,a_,o_)(e)}var l_=D({},ft.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),mA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bar",t}return r.getDefaultOptions=function(){return l_},r.prototype.changeData=function(t){var n,i;this.updateOption({data:t});var a=this,o=a.chart,l=a.options,s=l.isPercent,u=l.xField,c=l.yField,f=l.xAxis,h=l.yAxis;n=[c,u],u=n[0],c=n[1],i=[h,f],f=i[0],h=i[1];var v=S(S({},l),{xField:u,yField:c,yAxis:h,xAxis:f});Sg({chart:o,options:v}),o.changeData(Ps(t,u,c,u,s))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return yA},r}(ft),s_=D({},ft.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),xA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="column",t}return r.getDefaultOptions=function(){return s_},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options,i=n.yField,a=n.xField,o=n.isPercent,l=this,s=l.chart,u=l.options;Sg({chart:s,options:u}),this.chart.changeData(Ps(t,i,a,i,o))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Vf},r}(ft),Cg,Li="$$percentage$$",Oi="$$mappingValue$$",Yn="$$conversion$$",Mg="$$totalPercentage$$",Ls="$$x$$",Os="$$y$$",u_={appendPadding:[0,80],minSize:0,maxSize:1,meta:(Cg={},Cg[Oi]={min:0,max:1,nice:!1},Cg),label:{style:{fill:"#fff",fontSize:12}},tooltip:{showTitle:!1,showMarkers:!1,shared:!1},conversionTag:{offsetX:10,offsetY:0,style:{fontSize:12,fill:"rgba(0,0,0,0.45)"}}},wA="CONVERSION_TAG_NAME";function Ag(e,r,t){var n=[],i=t.yField,a=t.maxSize,o=t.minSize,l=E($0(r,i),[i]),s=st(a)?a:1,u=st(o)?o:0;return n=zt(e,function(c,f){var h=(c[i]||0)/l;return c[Li]=h,c[Oi]=(s-u)*h+u,c[Yn]=[E(e,[f-1,i]),c[i]],c}),n}function Fg(e){return function(r){var t=r.chart,n=r.options,i=n.conversionTag,a=n.filteredData,o=a||t.getOptions().data;if(i){var l=i.formatter;o.forEach(function(s,u){if(!(u<=0||Number.isNaN(s[Oi]))){var c=e(s,u,o,{top:!0,name:wA,text:{content:Q(l)?l(s,o):l,offsetX:i.offsetX,offsetY:i.offsetY,position:"end",autoRotate:!1,style:S({textAlign:"start",textBaseline:"middle"},i.style)}});t.annotation().line(c)}})}return r}}function c_(e){var r=e.chart,t=e.options,n=t.data,i=n===void 0?[]:n,a=t.yField,o=t.maxSize,l=t.minSize,s=Ag(i,i,{yField:a,maxSize:o,minSize:l});return r.data(s),e}function f_(e){var r=e.chart,t=e.options,n=t.xField,i=t.yField,a=t.color,o=t.tooltip,l=t.label,s=t.shape,u=s===void 0?"funnel":s,c=t.funnelStyle,f=t.state,h=Lr(o,[n,i]),v=h.fields,d=h.formatter;rr({chart:r,options:{type:"interval",xField:n,yField:Oi,colorField:n,tooltipFields:G(v)&&v.concat([Li,Yn]),mapping:{shape:u,tooltip:d,color:a,style:c},label:l,state:f}});var p=Ae(e.chart,"interval");return p.adjust("symmetric"),e}function h_(e){var r=e.chart,t=e.options,n=t.isTransposed;return r.coordinate({type:"rect",actions:n?[]:[["transpose"],["scale",1,-1]]}),e}function SA(e){var r=e.options,t=e.chart,n=r.maxSize,i=E(t,["geometries","0","dataArray"],[]),a=E(t,["options","data","length"]),o=zt(i,function(s){return E(s,["0","nextPoints","0","x"])*a-.5}),l=function(s,u,c,f){var h=n-(n-s[Oi])/2;return S(S({},f),{start:[o[u-1]||u-.5,h],end:[o[u-1]||u-.5,h+.05]})};return Fg(l)(e),e}function CA(e){return lt(c_,f_,h_,SA)(e)}function v_(e){var r,t=e.chart,n=e.options,i=n.data,a=i===void 0?[]:i,o=n.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function d_(e){var r=e.chart,t=e.options,n=t.data,i=t.xField,a=t.yField,o=t.color,l=t.compareField,s=t.isTransposed,u=t.tooltip,c=t.maxSize,f=t.minSize,h=t.label,v=t.funnelStyle,d=t.state,p=t.showFacetTitle;return r.facet("mirror",{fields:[l],transpose:!s,padding:s?0:[32,0,0,0],showTitle:p,eachView:function(y,g){var m=s?g.rowIndex:g.columnIndex;s||y.coordinate({type:"rect",actions:[["transpose"],["scale",m===0?-1:1,-1]]});var x=Ag(g.data,n,{yField:a,maxSize:c,minSize:f});y.data(x);var w=Lr(u,[i,a,l]),C=w.fields,M=w.formatter,A=s?{offset:m===0?10:-23,position:m===0?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:m===0?"end":"start"}};rr({chart:y,options:{type:"interval",xField:i,yField:Oi,colorField:i,tooltipFields:G(C)&&C.concat([Li,Yn]),mapping:{shape:"funnel",tooltip:M,color:o,style:v},label:h===!1?!1:D({},A,h),state:d}})}}),e}function MA(e){var r=e.chart,t=e.index,n=e.options,i=n.conversionTag,a=n.isTransposed;(st(t)?[r]:r.views).forEach(function(o,l){var s=E(o,["geometries","0","dataArray"],[]),u=E(o,["options","data","length"]),c=zt(s,function(h){return E(h,["0","nextPoints","0","x"])*u-.5}),f=function(h,v,d,p){var y=(t||l)===0?-1:1;return D({},p,{start:[c[v-1]||v-.5,h[Oi]],end:[c[v-1]||v-.5,h[Oi]+.05],text:a?{style:{textAlign:"start"}}:{offsetX:i!==!1?y*i.offsetX:0,style:{textAlign:(t||l)===0?"end":"start"}}})};Fg(f)(D({},{chart:o,options:n}))})}function p_(e){var r=e.chart;return r.once("beforepaint",function(){return MA(e)}),e}function g_(e){return lt(v_,d_,p_)(e)}function y_(e){var r=e.chart,t=e.options,n=t.data,i=n===void 0?[]:n,a=t.yField,o=Pe(i,function(u,c){return u+(c[a]||0)},0),l=$0(i,a)[a],s=zt(i,function(u,c){var f=[],h=[];if(u[Mg]=(u[a]||0)/o,c){var v=i[c-1][Ls],d=i[c-1][Os];f[0]=v[3],h[0]=d[3],f[1]=v[2],h[1]=d[2]}else f[0]=-.5,h[0]=1,f[1]=.5,h[1]=1;return h[2]=h[1]-u[Mg],f[2]=(h[2]+1)/4,h[3]=h[2],f[3]=-f[2],u[Ls]=f,u[Os]=h,u[Li]=(u[a]||0)/l,u[Yn]=[E(i,[c-1,a]),u[a]],u});return r.data(s),e}function m_(e){var r=e.chart,t=e.options,n=t.xField,i=t.yField,a=t.color,o=t.tooltip,l=t.label,s=t.funnelStyle,u=t.state,c=Lr(o,[n,i]),f=c.fields,h=c.formatter;return rr({chart:r,options:{type:"polygon",xField:Ls,yField:Os,colorField:n,tooltipFields:G(f)&&f.concat([Li,Yn]),label:l,state:u,mapping:{tooltip:h,color:a,style:s}}}),e}function x_(e){var r=e.chart,t=e.options,n=t.isTransposed;return r.coordinate({type:"rect",actions:n?[["transpose"],["reflect","x"]]:[]}),e}function w_(e){var r=function(t,n,i,a){return S(S({},a),{start:[t[Ls][1],t[Os][1]],end:[t[Ls][1]+.05,t[Os][1]]})};return Fg(r)(e),e}function S_(e){return lt(y_,m_,x_,w_)(e)}function C_(e){var r,t=e.chart,n=e.options,i=n.data,a=i===void 0?[]:i,o=n.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function M_(e){var r=e.chart,t=e.options,n=t.seriesField,i=t.isTransposed,a=t.showFacetTitle;return r.facet("rect",{fields:[n],padding:[i?0:32,10,0,10],showTitle:a,eachView:function(o,l){CA(D({},e,{chart:o,options:{data:l.data}}))}}),e}function A_(e){return lt(C_,M_)(e)}var F_=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.rendering=!1,t}return r.prototype.change=function(t){var n=this;if(!this.rendering){var i=t.seriesField,a=t.compareField,o=a?MA:SA,l=this.context.view,s=i||a?l.views:[l];zt(s,function(u,c){var f=u.getController("annotation"),h=de(E(f,["option"],[]),function(d){var p=d.name;return p!==wA});f.clear(!0),F(h,function(d){typeof d=="object"&&u.annotation()[d.type](d)});var v=E(u,["filteredData"],u.getOptions().data);o({chart:u,index:c,options:S(S({},t),{filteredData:Ag(v,v,t)})}),u.filterData(v),n.rendering=!0,u.render(!0)})}this.rendering=!1},r}(Bt),AA="funnel-conversion-tag",bg="funnel-afterrender",FA={trigger:"afterrender",action:"".concat(AA,":change")};et(AA,F_),ut(bg,{start:[FA]});function b_(e){var r=e.options,t=r.compareField,n=r.xField,i=r.yField,a=r.locale,o=r.funnelStyle,l=r.data,s=Pf(a),u={label:t?{fields:[n,i,t,Li,Yn],formatter:function(f){return"".concat(f[i])}}:{fields:[n,i,Li,Yn],offset:0,position:"middle",formatter:function(f){return"".concat(f[n]," ").concat(f[i])}},tooltip:{title:n,formatter:function(f){return{name:f[n],value:f[i]}}},conversionTag:{formatter:function(f){return"".concat(s.get(["conversionTag","label"]),": ").concat(gA.apply(void 0,f[Yn]))}}},c;return(t||o)&&(c=function(f){return D({},t&&{lineWidth:1,stroke:"#fff"},Q(o)?o(f):o)}),D({options:u},e,{options:{funnelStyle:c,data:ze(l)}})}function E_(e){var r=e.options,t=r.compareField,n=r.dynamicHeight,i=r.seriesField;return i?A_(e):t?g_(e):n?S_(e):CA(e)}function k_(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return lt(Ut((r={},r[a]=n,r[o]=i,r)))(e)}function T_(e){var r=e.chart;return r.axis(!1),e}function I_(e){var r=e.chart,t=e.options,n=t.legend;return n===!1?r.legend(!1):r.legend(n),e}function P_(e){var r=e.chart,t=e.options,n=t.interactions,i=t.dynamicHeight;return F(n,function(a){a.enable===!1?r.removeInteraction(a.type):r.interaction(a.type,a.cfg||{})}),i?r.removeInteraction(bg):r.interaction(bg,{start:[S(S({},FA),{arg:t})]}),e}function bA(e){return lt(b_,E_,k_,T_,le,P_,I_,It,wt,_t())(e)}var L_=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="funnel",t}return r.getDefaultOptions=function(){return u_},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return bA},r.prototype.setState=function(t,n,i){i===void 0&&(i=!0);var a=Es(this.chart);F(a,function(o){n(o.getData())&&o.setState(t,i)})},r.prototype.getStates=function(){var t=Es(this.chart),n=[];return F(t,function(i){var a=i.getData(),o=i.getStates();F(o,function(l){n.push({data:a,state:l,geometry:i.geometry,element:i})})}),n},r.CONVERSATION_FIELD=Yn,r.PERCENT_FIELD=Li,r.TOTAL_PERCENT_FIELD=Mg,r}(ft),_f,Eg="range",EA="type",Vn="percent",O_="#f0f0f0",kA="indicator-view",TA="range-view",D_={percent:0,range:{ticks:[]},innerRadius:.9,radius:.95,startAngle:-7/6*Math.PI,endAngle:1/6*Math.PI,syncViewPadding:!0,axis:{line:null,label:{offset:-24,style:{textAlign:"center",textBaseline:"middle"}},subTickLine:{length:-8},tickLine:{length:-12},grid:null},indicator:{pointer:{style:{lineWidth:5,lineCap:"round"}},pin:{style:{r:9.75,lineWidth:4.5,fill:"#fff"}}},statistic:{title:!1},meta:(_f={},_f[Eg]={sync:"v"},_f[Vn]={sync:"v",tickCount:5,tickInterval:.2},_f),animation:!1};function B_(e,r){return e.map(function(t,n){var i;return i={},i[Eg]=t-(e[n-1]||0),i[EA]="".concat(n),i[Vn]=r,i})}function IA(e){var r;return[(r={},r[Vn]=Nt(e,0,1),r)]}function PA(e,r){var t=E(r,["ticks"],[]),n=ue(t)?oa(t):[0,Nt(e,0,1),1];return n[0]||n.shift(),B_(n,e)}function R_(e){var r=e.chart,t=e.options,n=t.percent,i=t.range,a=t.radius,o=t.innerRadius,l=t.startAngle,s=t.endAngle,u=t.axis,c=t.indicator,f=t.gaugeStyle,h=t.type,v=t.meter,d=i.color,p=i.width;if(c){var y=IA(n),g=r.createView({id:kA});g.data(y),g.point().position("".concat(Vn,"*1")).shape(c.shape||"gauge-indicator").customInfo({defaultColor:r.getTheme().defaultColor,indicator:c}),g.coordinate("polar",{startAngle:l,endAngle:s,radius:o*a}),g.axis(Vn,u),g.scale(Vn,bt(u,er))}var m=PA(n,t.range),x=r.createView({id:TA});x.data(m);var w=at(d)?[d,O_]:d,C=Fe({chart:x,options:{xField:"1",yField:Eg,seriesField:EA,rawFields:[Vn],isStack:!0,interval:{color:w,style:f,shape:h==="meter"?"meter-gauge":null},args:{zIndexReversed:!0,sortZIndex:!0},minColumnWidth:p,maxColumnWidth:p}}).ext,M=C.geometry;return M.customInfo({meter:v}),x.coordinate("polar",{innerRadius:o,radius:a,startAngle:l,endAngle:s}).transpose(),e}function N_(e){var r;return lt(Ut((r={range:{min:0,max:1,maxLimit:1,minLimit:0}},r[Vn]={},r)))(e)}function LA(e,r){var t=e.chart,n=e.options,i=n.statistic,a=n.percent;if(t.getController("annotation").clear(!0),i){var o=i.content,l=void 0;o&&(l=D({},{content:"".concat((a*100).toFixed(2),"%"),style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},o)),UV(t,{statistic:S(S({},i),{content:l})},{percent:a})}return r&&t.render(!0),e}function z_(e){var r=e.chart,t=e.options,n=t.tooltip;return n?r.tooltip(D({showTitle:!1,showMarkers:!1,containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(i,a){var o=E(a,[0,"data",Vn],0);return"".concat((o*100).toFixed(2),"%")}},n)):r.tooltip(!1),e}function Y_(e){var r=e.chart;return r.legend(!1),e}function OA(e){return lt(wt,It,R_,N_,z_,LA,Yt,_t(),Y_)(e)}Mt("point","gauge-indicator",{draw:function(e,r){var t=e.customInfo,n=t.indicator,i=t.defaultColor,a=n,o=a.pointer,l=a.pin,s=r.addGroup(),u=this.parsePoint({x:0,y:0});return o&&s.addShape("line",{name:"pointer",attrs:S({x1:u.x,y1:u.y,x2:e.x,y2:e.y,stroke:i},o.style)}),l&&s.addShape("circle",{name:"pin",attrs:S({x:u.x,y:u.y,stroke:i},l.style)}),s}}),Mt("interval","meter-gauge",{draw:function(e,r){var t=e.customInfo.meter,n=t===void 0?{}:t,i=n.steps,a=i===void 0?50:i,o=n.stepRatio,l=o===void 0?.5:o;a=a<1?1:a,l=Nt(l,0,1);var s=this.coordinate,u=s.startAngle,c=s.endAngle,f=0;if(l>0&&l<1){var h=c-u;f=h/a/(l/(1-l)+1-1/a)}for(var v=f/(1-l)*l,d=r.addGroup(),p=this.coordinate.getCenter(),y=this.coordinate.getRadius(),g=Je.getAngle(e,this.coordinate),m=g.startAngle,x=g.endAngle,w=m;w<x;){var C=void 0,M=(w-u)%(v+f);M<v?C=w+(v-M):(w+=v+f-M,C=w+v);var A=Je.getSectorPath(p.x,p.y,y,w,Math.min(C,x),y*this.coordinate.innerRadius);d.addShape("path",{name:"meter-gauge",attrs:{path:A,fill:e.color,stroke:e.color,lineWidth:.5}}),w=C+f}return d}});var V_=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="gauge",t}return r.getDefaultOptions=function(){return D_},r.prototype.changeData=function(t){this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t});var n=this.chart.views.find(function(a){return a.id===kA});n&&n.data(IA(t));var i=this.chart.views.find(function(a){return a.id===TA});i&&i.data(PA(t,this.options.range)),LA({chart:this.chart,options:this.options},!0),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return OA},r}(ft);function DA(e,r,t){if(t===1)return[0,r];var n=Math.floor(e/r);return[r*n,r*(n+1)]}function __(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function BA(e,r,t,n,i){var a=ze(e);ZI(a,r);var o=Hr(a,r),l=V0(o),s=l.max-l.min,u=t;if(!t&&n&&(u=n>1?s/(n-1):l.max),!t&&!n){var c=__(o);u=s/c}var f={},h=hr(a,i);We(h)?F(a,function(d){var p=d[r],y=DA(p,u,n),g="".concat(y[0],"-").concat(y[1]);ai(f,g)||(f[g]={range:y,count:0}),f[g].count+=1}):Object.keys(h).forEach(function(d){F(h[d],function(p){var y=p[r],g=DA(y,u,n),m="".concat(g[0],"-").concat(g[1]),x="".concat(m,"-").concat(d);ai(f,x)||(f[x]={range:g,count:0},f[x][i]=d),f[x].count+=1})});var v=[];return F(f,function(d){v.push(d)}),v}var $f="range",Ds="count",$_=D({},ft.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function G_(e){var r=e.chart,t=e.options,n=t.data,i=t.binField,a=t.binNumber,o=t.binWidth,l=t.color,s=t.stackField,u=t.legend,c=t.columnStyle,f=BA(n,i,o,a,s);r.data(f);var h=D({},e,{options:{xField:$f,yField:Ds,seriesField:s,isStack:!0,interval:{color:l,style:c}}});return Fe(h),u&&s?r.legend(s,u):r.legend(!1),e}function H_(e){var r,t=e.options,n=t.xAxis,i=t.yAxis;return lt(Ut((r={},r[$f]=n,r[Ds]=i,r)))(e)}function W_(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis;return n===!1?r.axis($f,!1):r.axis($f,n),i===!1?r.axis(Ds,!1):r.axis(Ds,i),e}function X_(e){var r=e.chart,t=e.options,n=t.label,i=Ae(r,"interval");if(!n)i.label(!1);else{var a=n.callback,o=kt(n,["callback"]);i.label({fields:[Ds],callback:a,cfg:fe(o)})}return e}function RA(e){return lt(wt,pr("columnStyle"),G_,H_,W_,Ii,X_,le,Yt,It)(e)}var j_=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="histogram",t}return r.getDefaultOptions=function(){return $_},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options,i=n.binField,a=n.binNumber,o=n.binWidth,l=n.stackField;this.chart.changeData(BA(t,i,o,a,l))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return RA},r}(ft),U_=D({},ft.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1}),q_=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.active=function(){var t=this.getView(),n=this.context.event;if(n.data){var i=n.data.items,a=t.geometries.filter(function(o){return o.type==="point"});F(a,function(o){F(o.elements,function(l){var s=Y0(i,function(u){return u.data===l.data})!==-1;l.setState("active",s)})})}},r.prototype.reset=function(){var t=this.getView(),n=t.geometries.filter(function(i){return i.type==="point"});F(n,function(i){F(i.elements,function(a){a.setState("active",!1)})})},r.prototype.getView=function(){return this.context.view},r}(Bt);et("marker-active",q_),ut("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var NA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="line",t}return r.getDefaultOptions=function(){return U_},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;zf({chart:i,options:a}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return fA},r}(ft),zA=D({},ft.getDefaultOptions(),{legend:{position:"right",radio:{}},tooltip:{shared:!1,showTitle:!1,showMarkers:!1},label:{layout:{type:"limit-in-plot",cfg:{action:"ellipsis"}}},pieStyle:{stroke:"white",lineWidth:1},statistic:{title:{style:{fontWeight:300,color:"#4B535E",textAlign:"center",fontSize:"20px",lineHeight:1}},content:{style:{fontWeight:"bold",color:"rgba(44,53,66,0.85)",textAlign:"center",fontSize:"32px",lineHeight:1}}},theme:{components:{annotation:{text:{animate:!1}}}}}),Z_=[1,0,0,0,1,0,0,0,1];function kg(e,r){var t=r?rt([],r,!0):rt([],Z_,!0);return Je.transform(t,e)}var Q_=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getActiveElements=function(){var t=Je.getDelegationObject(this.context);if(t){var n=this.context.view,i=t.component,a=t.item,o=i.get("field");if(o){var l=n.geometries[0].elements;return l.filter(function(s){return s.getModel().data[o]===a.value})}}return[]},r.prototype.getActiveElementLabels=function(){var t=this.context.view,n=this.getActiveElements(),i=t.geometries[0].labelsContainer.getChildren();return i.filter(function(a){return n.find(function(o){return Gt(o.getData(),a.get("data"))})})},r.prototype.transfrom=function(t){t===void 0&&(t=7.5);var n=this.getActiveElements(),i=this.getActiveElementLabels();n.forEach(function(a,o){var l=i[o],s=a.geometry.coordinate;if(s.isPolar&&s.isTransposed){var u=Je.getAngle(a.getModel(),s),c=u.startAngle,f=u.endAngle,h=(c+f)/2,v=t,d=v*Math.cos(h),p=v*Math.sin(h);a.shape.setMatrix(kg([["t",d,p]])),l.setMatrix(kg([["t",d,p]]))}})},r.prototype.active=function(){this.transfrom()},r.prototype.reset=function(){this.transfrom(0)},r}(Bt);function K_(e){var r=e.event,t,n=r.target;return n&&(t=n.get("element")),t}var J_=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAnnotations=function(t){var n=t||this.context.view;return n.getController("annotation").option},r.prototype.getInitialAnnotation=function(){return this.initialAnnotation},r.prototype.init=function(){var t=this,n=this.context.view;n.removeInteraction("tooltip"),n.on("afterchangesize",function(){var i=t.getAnnotations(n);t.initialAnnotation=i})},r.prototype.change=function(t){var n=this.context,i=n.view,a=n.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var o=E(a,["data","data"]);if(a.type.match("legend-item")){var l=Je.getDelegationObject(this.context),s=i.getGroupedFields()[0];if(l&&s){var u=l.item;o=i.getData().find(function(v){return v[s]===u.value})}}if(o){var c=E(t,"annotations",[]),f=E(t,"statistic",{});i.getController("annotation").clear(!0),F(c,function(v){typeof v=="object"&&i.annotation()[v.type](v)}),kf(i,{statistic:f,plotType:"pie"},o),i.render(!0)}var h=K_(this.context);h&&h.shape.toFront()},r.prototype.reset=function(){var t=this.context.view,n=t.getController("annotation");n.clear(!0);var i=this.getInitialAnnotation();F(i,function(a){t.annotation()[a.type](a)}),t.render(!0)},r}(Bt),YA="pie-statistic";et(YA,J_),ut("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),et("pie-legend",Q_),ut("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});function t$(e,r){var t=null;return F(e,function(n){typeof n[r]=="number"&&(t+=n[r])}),t}function e$(e,r){var t;switch(e){case"inner":return t="-30%",at(r)&&r.endsWith("%")?parseFloat(r)*.01>0?t:r:r<0?r:t;case"outer":return t=12,at(r)&&r.endsWith("%")?parseFloat(r)*.01<0?t:r:r>0?r:t;default:return r}}function Gf(e,r){return Bv(zo(e,r),function(t){return t[r]===0})}function r$(e){var r=e.chart,t=e.options,n=t.data,i=t.angleField,a=t.colorField,o=t.color,l=t.pieStyle,s=t.shape,u=zo(n,i);if(Gf(u,i)){var c="$$percentage$$";u=u.map(function(h){var v;return S(S({},h),(v={},v[c]=1/u.length,v))}),r.data(u);var f=D({},e,{options:{xField:"1",yField:c,seriesField:a,isStack:!0,interval:{color:o,shape:s,style:l},args:{zIndexReversed:!0,sortZIndex:!0}}});Fe(f)}else{r.data(u);var f=D({},e,{options:{xField:"1",yField:i,seriesField:a,isStack:!0,interval:{color:o,shape:s,style:l},args:{zIndexReversed:!0,sortZIndex:!0}}});Fe(f)}return e}function n$(e){var r,t=e.chart,n=e.options,i=n.meta,a=n.colorField,o=D({},i);return t.scale(o,(r={},r[a]={type:"cat"},r)),e}function i$(e){var r=e.chart,t=e.options,n=t.radius,i=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"theta",cfg:{radius:n,innerRadius:i,startAngle:a,endAngle:o}}),e}function a$(e){var r=e.chart,t=e.options,n=t.label,i=t.colorField,a=t.angleField,o=r.geometries[0];if(!n)o.label(!1);else{var l=n.callback,s=kt(n,["callback"]),u=fe(s);if(u.content){var c=u.content;u.content=function(d,p,y){var g=d[i],m=d[a],x=r.getScaleByField(a),w=x==null?void 0:x.scale(m);return Q(c)?c(S(S({},d),{percent:w}),p,y):at(c)?ZM(c,{value:m,name:g,percentage:st(w)&&!Y(m)?"".concat((w*100).toFixed(2),"%"):null}):c}}var f={inner:"",outer:"pie-outer",spider:"pie-spider"},h=u.type?f[u.type]:"pie-outer",v=u.layout?G(u.layout)?u.layout:[u.layout]:[];u.layout=(h?[{type:h}]:[]).concat(v),o.label({fields:i?[a,i]:[a],callback:l,cfg:S(S({},u),{offset:e$(u.type,u.offset),type:"pie"})})}return e}function VA(e){var r=e.innerRadius,t=e.statistic,n=e.angleField,i=e.colorField,a=e.meta,o=e.locale,l=Pf(o);if(r&&t){var s=D({},zA.statistic,t),u=s.title,c=s.content;return u!==!1&&(u=D({},{formatter:function(f){var h=f?f[i]:Y(u.content)?l.get(["statistic","total"]):u.content,v=E(a,[i,"formatter"])||function(d){return d};return v(h)}},u)),c!==!1&&(c=D({},{formatter:function(f,h){var v=f?f[n]:t$(h,n),d=E(a,[n,"formatter"])||function(p){return p};return f||Y(c.content)?d(v):c.content}},c)),D({},{statistic:{title:u,content:c}},e)}return e}function _A(e){var r=e.chart,t=e.options,n=VA(t),i=n.innerRadius,a=n.statistic;return r.getController("annotation").clear(!0),lt(_t())(e),i&&a&&kf(r,{statistic:a,plotType:"pie"}),e}function o$(e){var r=e.chart,t=e.options,n=t.tooltip,i=t.colorField,a=t.angleField,o=t.data;if(n===!1)r.tooltip(n);else if(r.tooltip(D({},n,{shared:!1})),Gf(o,a)){var l=E(n,"fields"),s=E(n,"formatter");We(E(n,"fields"))&&(l=[i,a],s=s||function(u){return{name:u[i],value:Ol(u[a])}}),r.geometries[0].tooltip(l.join("*"),Vo(l,s))}return e}function l$(e){var r=e.chart,t=e.options,n=VA(t),i=n.interactions,a=n.statistic,o=n.annotations;return F(i,function(l){var s,u;if(l.enable===!1)r.removeInteraction(l.type);else if(l.type==="pie-statistic-active"){var c=[];!((s=l.cfg)===null||s===void 0)&&s.start||(c=[{trigger:"element:mouseenter",action:"".concat(YA,":change"),arg:{statistic:a,annotations:o}}]),F((u=l.cfg)===null||u===void 0?void 0:u.start,function(f){c.push(S(S({},f),{arg:{statistic:a,annotations:o}}))}),r.interaction(l.type,D({},l.cfg,{start:c}))}else r.interaction(l.type,l.cfg||{})}),e}function $A(e){return lt(pr("pieStyle"),r$,n$,wt,i$,Yo,o$,a$,Ii,_A,l$,It)(e)}var GA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="pie",t}return r.getDefaultOptions=function(){return zA},r.prototype.changeData=function(t){this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null));var n=this.options,i=this.options.angleField,a=zo(n.data,i),o=zo(t,i);Gf(a,i)||Gf(o,i)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(o),_A({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return $A},r}(ft),HA=["#FAAD14","#E8EDF3"],s$={percent:.2,color:HA,animation:{}};function Tg(e){var r=Nt(ka(e)?e:0,0,1);return[{current:"".concat(r),type:"current",percent:r},{current:"".concat(r),type:"target",percent:1}]}function WA(e){var r=e.chart,t=e.options,n=t.percent,i=t.progressStyle,a=t.color,o=t.barWidthRatio;r.data(Tg(n));var l=D({},e,{options:{xField:"current",yField:"percent",seriesField:"type",widthRatio:o,interval:{style:i,color:at(a)?[a,HA[1]]:a},args:{zIndexReversed:!0,sortZIndex:!0}}});return Fe(l),r.tooltip(!1),r.axis(!1),r.legend(!1),e}function u$(e){var r=e.chart;return r.coordinate("rect").transpose(),e}function XA(e){return lt(WA,Ut({}),u$,It,wt,_t())(e)}var c$=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="process",t}return r.getDefaultOptions=function(){return s$},r.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(Tg(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return XA},r}(ft);function f$(e){var r=e.chart,t=e.options,n=t.innerRadius,i=t.radius;return r.coordinate("theta",{innerRadius:n,radius:i}),e}function jA(e,r){var t=e.chart,n=e.options,i=n.innerRadius,a=n.statistic,o=n.percent,l=n.meta;if(t.getController("annotation").clear(!0),i&&a){var s=E(l,["percent","formatter"])||function(c){return"".concat((c*100).toFixed(2),"%")},u=a.content;u&&(u=D({},u,{content:Y(u.content)?s(o):u.content})),kf(t,{statistic:S(S({},a),{content:u}),plotType:"ring-progress"},{percent:o})}return r&&t.render(!0),e}function UA(e){return lt(WA,Ut({}),f$,jA,It,wt,_t())(e)}var h$={percent:.2,innerRadius:.8,radius:.98,color:["#FAAD14","#E8EDF3"],statistic:{title:!1,content:{style:{fontSize:"14px",fontWeight:300,fill:"#4D4D4D",textAlign:"center",textBaseline:"middle"}}},animation:{}},v$=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="ring-process",t}return r.getDefaultOptions=function(){return h$},r.prototype.changeData=function(t){this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(Tg(t)),jA({chart:this.chart,options:this.options},!0),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return UA},r}(ft);function Di(e,r){return d$(e)||p$(e,r)||g$()}function d$(e){if(Array.isArray(e))return e}function p$(e,r){var t=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(n=(l=o.next()).done)&&(t.push(l.value),!(r&&t.length===r));n=!0);}catch(s){i=!0,a=s}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return t}function g$(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Ig(e,r,t,n){e=e.filter(function(d,p){var y=r(d,p),g=t(d,p);return y!=null&&isFinite(y)&&g!=null&&isFinite(g)}),n&&e.sort(function(d,p){return r(d)-r(p)});for(var i=e.length,a=new Float64Array(i),o=new Float64Array(i),l=0,s=0,u,c,f,h=0;h<i;)f=e[h],a[h]=u=+r(f,h,e),o[h]=c=+t(f,h,e),++h,l+=(u-l)/h,s+=(c-s)/h;for(var v=0;v<i;++v)a[v]-=l,o[v]-=s;return[a,o,l,s]}function Oa(e,r,t,n){for(var i=0,a=0,o=e.length;a<o;a++){var l=e[a],s=+r(l,a,e),u=+t(l,a,e);s!=null&&isFinite(s)&&u!=null&&isFinite(u)&&n(s,u,i++)}}function Go(e,r,t,n,i){var a=0,o=0;return Oa(e,r,t,function(l,s){var u=s-i(l),c=s-n;a+=u*u,o+=c*c}),1-a/o}function qA(e){return Math.atan2(e[1][1]-e[0][1],e[1][0]-e[0][0])*180/Math.PI}function y$(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}function Bs(e,r,t){for(var n=Math.log(r-e)*Math.LOG10E+1|0,i=1*Math.pow(10,-n/2-1),a=1e4,o=[s(e),s(r)],l=0;u(o)&&l<a;);return o;function s(c){return[c,t(c)]}function u(c){l++;for(var f=c.length,h=!1,v=0;v<f-1;v++){var d=c[v],p=c[v+1],y=y$([d,p]),g=s(y[0]),m=qA([d,y]),x=qA([d,g]),w=Math.abs(m-x);w>i&&(c.splice(v+1,0,g),h=!0)}return h}}function Rs(e,r,t,n){var i=n-e*e,a=Math.abs(i)<1e-24?0:(t-e*r)/i,o=r-a*e;return[o,a]}function m$(){var e=function(a){return a[0]},r=function(a){return a[1]},t;function n(i){var a=0,o=0,l=0,s=0,u=0,c=0,f=t?+t[0]:1/0,h=t?+t[1]:-1/0;Oa(i,e,r,function(x,w){var C=Math.log(w),M=x*w;++a,o+=(w-o)/a,s+=(M-s)/a,c+=(x*M-c)/a,l+=(w*C-l)/a,u+=(M*C-u)/a,t||(x<f&&(f=x),x>h&&(h=x))});var v=Rs(s/o,l/o,u/o,c/o),d=Di(v,2),p=d[0],y=d[1];p=Math.exp(p);var g=function(w){return p*Math.exp(y*w)},m=Bs(f,h,g);return m.a=p,m.b=y,m.predict=g,m.rSquared=Go(i,e,r,o,g),m}return n.domain=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}function ZA(){var e=function(a){return a[0]},r=function(a){return a[1]},t;function n(i){var a=0,o=0,l=0,s=0,u=0,c=t?+t[0]:1/0,f=t?+t[1]:-1/0;Oa(i,e,r,function(m,x){++a,o+=(m-o)/a,l+=(x-l)/a,s+=(m*x-s)/a,u+=(m*m-u)/a,t||(m<c&&(c=m),m>f&&(f=m))});var h=Rs(o,l,s,u),v=Di(h,2),d=v[0],p=v[1],y=function(x){return p*x+d},g=[[c,y(c)],[f,y(f)]];return g.a=p,g.b=d,g.predict=y,g.rSquared=Go(i,e,r,l,y),g}return n.domain=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}function x$(e){e.sort(function(t,n){return t-n});var r=e.length/2;return r%1===0?(e[r-1]+e[r])/2:e[Math.floor(r)]}var QA=2,KA=1e-12;function w$(){var e=function(a){return a[0]},r=function(a){return a[1]},t=.3;function n(i){for(var a=Ig(i,e,r,!0),o=Di(a,4),l=o[0],s=o[1],u=o[2],c=o[3],f=l.length,h=Math.max(2,~~(t*f)),v=new Float64Array(f),d=new Float64Array(f),p=new Float64Array(f).fill(1),y=-1;++y<=QA;){for(var g=[0,h-1],m=0;m<f;++m){for(var x=l[m],w=g[0],C=g[1],M=x-l[w]>l[C]-x?w:C,A=0,b=0,T=0,k=0,P=0,O=1/Math.abs(l[M]-x||1),V=w;V<=C;++V){var W=l[V],q=s[V],L=S$(Math.abs(x-W)*O)*p[V],H=W*L;A+=L,b+=H,T+=q*L,k+=q*H,P+=W*H}var N=Rs(b/A,T/A,k/A,P/A),_=Di(N,2),$=_[0],X=_[1];v[m]=$+X*x,d[m]=Math.abs(s[m]-v[m]),C$(l,m+1,g)}if(y===QA)break;var K=x$(d);if(Math.abs(K)<KA)break;for(var ct=0,nt,ot;ct<f;++ct)nt=d[ct]/(6*K),p[ct]=nt>=1?KA:(ot=1-nt*nt)*ot}return M$(l,v,u,c)}return n.bandwidth=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}function S$(e){return(e=1-e*e*e)*e*e}function C$(e,r,t){var n=e[r],i=t[0],a=t[1]+1;if(!(a>=e.length))for(;r>i&&e[a]-n<=n-e[i];)t[0]=++i,t[1]=a,++a}function M$(e,r,t,n){for(var i=e.length,a=[],o=0,l=0,s=[],u;o<i;++o)u=e[o]+t,s[0]===u?s[1]+=(r[o]-s[1])/++l:(l=0,s[1]+=n,s=[u,r[o]],a.push(s));return s[1]+=n,a}function A$(){var e=function(o){return o[0]},r=function(o){return o[1]},t=Math.E,n;function i(a){var o=0,l=0,s=0,u=0,c=0,f=n?+n[0]:1/0,h=n?+n[1]:-1/0,v=Math.log(t);Oa(a,e,r,function(w,C){var M=Math.log(w)/v;++o,l+=(M-l)/o,s+=(C-s)/o,u+=(M*C-u)/o,c+=(M*M-c)/o,n||(w<f&&(f=w),w>h&&(h=w))});var d=Rs(l,s,u,c),p=Di(d,2),y=p[0],g=p[1],m=function(C){return g*Math.log(C)/v+y},x=Bs(f,h,m);return x.a=g,x.b=y,x.predict=m,x.rSquared=Go(a,e,r,s,m),x}return i.domain=function(a){return arguments.length?(n=a,i):n},i.x=function(a){return arguments.length?(e=a,i):e},i.y=function(a){return arguments.length?(r=a,i):r},i.base=function(a){return arguments.length?(t=a,i):t},i}function JA(){var e=function(a){return a[0]},r=function(a){return a[1]},t;function n(i){var a=Ig(i,e,r),o=Di(a,4),l=o[0],s=o[1],u=o[2],c=o[3],f=l.length,h=0,v=0,d=0,p=0,y=0,g,m,x,w;for(g=0;g<f;)m=l[g],x=s[g++],w=m*m,h+=(w-h)/g,v+=(w*m-v)/g,d+=(w*w-d)/g,p+=(m*x-p)/g,y+=(w*x-y)/g;var C=0,M=0,A=t?+t[0]:1/0,b=t?+t[1]:-1/0;Oa(i,e,r,function(L,H){M++,C+=(H-C)/M,t||(L<A&&(A=L),L>b&&(b=L))});var T=d-h*h,k=h*T-v*v,P=(y*h-p*v)/k,O=(p*T-y*v)/k,V=-P*h,W=function(H){return H=H-u,P*H*H+O*H+V+c},q=Bs(A,b,W);return q.a=P,q.b=O-2*P*u,q.c=V-O*u+P*u*u+c,q.predict=W,q.rSquared=Go(i,e,r,C,W),q}return n.domain=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}function F$(){var e=function(o){return o[0]},r=function(o){return o[1]},t=3,n;function i(a){if(t===1){var o=ZA().x(e).y(r).domain(n)(a);return o.coefficients=[o.b,o.a],delete o.a,delete o.b,o}if(t===2){var l=JA().x(e).y(r).domain(n)(a);return l.coefficients=[l.c,l.b,l.a],delete l.a,delete l.b,delete l.c,l}var s=Ig(a,e,r),u=Di(s,4),c=u[0],f=u[1],h=u[2],v=u[3],d=c.length,p=[],y=[],g=t+1,m=0,x=0,w=n?+n[0]:1/0,C=n?+n[1]:-1/0;Oa(a,e,r,function(W,q){++x,m+=(q-m)/x,n||(W<w&&(w=W),W>C&&(C=W))});var M,A,b,T,k;for(M=0;M<g;++M){for(b=0,T=0;b<d;++b)T+=Math.pow(c[b],M)*f[b];for(p.push(T),k=new Float64Array(g),A=0;A<g;++A){for(b=0,T=0;b<d;++b)T+=Math.pow(c[b],M+A);k[A]=T}y.push(k)}y.push(p);var P=E$(y),O=function(q){q-=h;var L=v+P[0]+P[1]*q+P[2]*q*q;for(M=3;M<g;++M)L+=P[M]*Math.pow(q,M);return L},V=Bs(w,C,O);return V.coefficients=b$(g,P,-h,v),V.predict=O,V.rSquared=Go(a,e,r,m,O),V}return i.domain=function(a){return arguments.length?(n=a,i):n},i.x=function(a){return arguments.length?(e=a,i):e},i.y=function(a){return arguments.length?(r=a,i):r},i.order=function(a){return arguments.length?(t=a,i):t},i}function b$(e,r,t,n){var i=Array(e),a,o,l,s;for(a=0;a<e;++a)i[a]=0;for(a=e-1;a>=0;--a)for(l=r[a],s=1,i[a]+=l,o=1;o<=a;++o)s*=(a+1-o)/o,i[a-o]+=l*Math.pow(t,o)*s;return i[0]+=n,i}function E$(e){var r=e.length-1,t=[],n,i,a,o,l;for(n=0;n<r;++n){for(o=n,i=n+1;i<r;++i)Math.abs(e[n][i])>Math.abs(e[n][o])&&(o=i);for(a=n;a<r+1;++a)l=e[a][n],e[a][n]=e[a][o],e[a][o]=l;for(i=n+1;i<r;++i)for(a=r;a>=n;a--)e[a][i]-=e[a][n]*e[n][i]/e[n][n]}for(i=r-1;i>=0;--i){for(l=0,a=i+1;a<r;++a)l+=e[a][i]*t[a];t[i]=(e[r][i]-l)/e[i][i]}return t}function k$(){var e=function(a){return a[0]},r=function(a){return a[1]},t;function n(i){var a=0,o=0,l=0,s=0,u=0,c=0,f=t?+t[0]:1/0,h=t?+t[1]:-1/0;Oa(i,e,r,function(x,w){var C=Math.log(x),M=Math.log(w);++a,o+=(C-o)/a,l+=(M-l)/a,s+=(C*M-s)/a,u+=(C*C-u)/a,c+=(w-c)/a,t||(x<f&&(f=x),x>h&&(h=x))});var v=Rs(o,l,s,u),d=Di(v,2),p=d[0],y=d[1];p=Math.exp(p);var g=function(w){return p*Math.pow(w,y)},m=Bs(f,h,g);return m.a=p,m.b=y,m.predict=g,m.rSquared=Go(i,e,r,c,g),m}return n.domain=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}var T$={exp:m$,linear:ZA,loess:w$,log:A$,poly:F$,pow:k$,quad:JA};function I$(e,r){var t=10,n={regionStyle:[{position:{start:[e,"max"],end:["max",r]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:["min","max"],end:[e,r]},style:{fill:"#a3dda1",opacity:.4}},{position:{start:["min",r],end:[e,"min"]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:[e,r],end:["max","min"]},style:{fill:"#a3dda1",opacity:.4}}],lineStyle:{stroke:"#9ba29a",lineWidth:1},labelStyle:[{position:["max",r],offsetX:-t,offsetY:-t,style:{textAlign:"right",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:-t,style:{textAlign:"left",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:t,style:{textAlign:"left",textBaseline:"top",fontSize:14,fill:"#ccc"}},{position:["max",r],offsetX:-t,offsetY:t,style:{textAlign:"right",textBaseline:"top",fontSize:14,fill:"#ccc"}}]};return n}var P$=function(e,r){var t=r.view,n=r.options,i=n.xField,a=n.yField,o=t.getScaleByField(i),l=t.getScaleByField(a),s=e.map(function(u){return t.getCoordinate().convert({x:o.scale(u[0]),y:l.scale(u[1])})});return jV(s,!1)},L$=function(e){var r=e.options,t=r.xField,n=r.yField,i=r.data,a=r.regressionLine,o=a.type,l=o===void 0?"linear":o,s=a.algorithm,u=a.equation,c,f=null;if(s)c=G(s)?s:s(i),f=u;else{var h=T$[l]().x(function(v){return v[t]}).y(function(v){return v[n]});c=h(i),f=D$(l,c)}return[P$(c,e),f]},O$=function(e){var r,t=e.meta,n=t===void 0?{}:t,i=e.xField,a=e.yField,o=e.data,l=o[0][i],s=o[0][a],u=l>0,c=s>0;function f(h,v){var d=E(n,[h]);function p(g){return E(d,g)}var y={};return v==="x"?(st(l)&&(st(p("min"))||(y.min=u?0:l*2),st(p("max"))||(y.max=u?l*2:0)),y):(st(s)&&(st(p("min"))||(y.min=c?0:s*2),st(p("max"))||(y.max=c?s*2:0)),y)}return S(S({},n),(r={},r[i]=S(S({},n[i]),f(i,"x")),r[a]=S(S({},n[a]),f(a,"y")),r))};function D$(e,r){var t,n,i,a=function(u,c){return c===void 0&&(c=4),Math.round(u*Math.pow(10,c))/Math.pow(10,c)},o=function(u){return Number.isFinite(u)?a(u):"?"};switch(e){case"linear":return"y = ".concat(o(r.a),"x + ").concat(o(r.b),", R^2 = ").concat(o(r.rSquared));case"exp":return"y = ".concat(o(r.a),"e^(").concat(o(r.b),"x), R^2 = ").concat(o(r.rSquared));case"log":return"y = ".concat(o(r.a),"ln(x) + ").concat(o(r.b),", R^2 = ").concat(o(r.rSquared));case"quad":return"y = ".concat(o(r.a),"x^2 + ").concat(o(r.b),"x + ").concat(o(r.c),", R^2 = ").concat(o(r.rSquared));case"poly":for(var l="y = ".concat(o((t=r.coefficients)===null||t===void 0?void 0:t[0])," + ").concat(o((n=r.coefficients)===null||n===void 0?void 0:n[1]),"x + ").concat(o((i=r.coefficients)===null||i===void 0?void 0:i[2]),"x^2"),s=3;s<r.coefficients.length;++s)l+=" + ".concat(o(r.coefficients[s]),"x^").concat(s);return"".concat(l,", R^2 = ").concat(o(r.rSquared));case"pow":return"y = ".concat(o(r.a),"x^").concat(o(r.b),", R^2 = ").concat(o(r.rSquared))}return null}function tF(e){var r=e.data,t=r===void 0?[]:r,n=e.xField,i=e.yField;if(t.length){for(var a=!0,o=!0,l=t[0],s=void 0,u=1;u<t.length&&(s=t[u],l[n]!==s[n]&&(a=!1),l[i]!==s[i]&&(o=!1),!(!a&&!o));u++)l=s;var c=[];a&&c.push(n),o&&c.push(i);var f=bt(O$(e),c);return D({},e,{meta:f})}return e}function B$(e){var r=e.chart,t=e.options,n=t.data,i=t.type,a=t.color,o=t.shape,l=t.pointStyle,s=t.shapeField,u=t.colorField,c=t.xField,f=t.yField,h=t.sizeField,v=t.size,d=t.tooltip;h&&(v||(v=[2,8]),st(v)&&(v=[v,v])),d&&!d.fields&&(d=S(S({},d),{fields:[c,f,u,h,s]})),r.data(n),gr(D({},e,{options:{seriesField:u,point:{color:a,shape:o,size:v,style:l},tooltip:d}}));var p=Ae(r,"point");return i&&p.adjust(i),e}function Hf(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField,l=tF(t);return lt(Ut((r={},r[a]=n,r[o]=i,r)))(D({},e,{options:l}))}function R$(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return r.axis(a,n),r.axis(o,i),e}function N$(e){var r=e.chart,t=e.options,n=t.legend,i=t.colorField,a=t.shapeField,o=t.sizeField,l=t.shapeLegend,s=t.sizeLegend,u=n!==!1;return i&&r.legend(i,u?n:!1),a&&(l?r.legend(a,l):r.legend(a,l===!1?!1:n)),o&&r.legend(o,s||!1),!u&&!l&&!s&&r.legend(!1),e}function z$(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"point");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:fe(l)})}return e}function Y$(e){var r=e.options,t=r.quadrant,n=[];if(t){var i=t.xBaseline,a=i===void 0?0:i,o=t.yBaseline,l=o===void 0?0:o,s=t.labels,u=t.regionStyle,c=t.lineStyle,f=I$(a,l),h=new Array(4).join(",").split(",");h.forEach(function(v,d){n.push(S(S({type:"region",top:!1},f.regionStyle[d].position),{style:D({},f.regionStyle[d].style,u==null?void 0:u[d])}),S({type:"text",top:!0},D({},f.labelStyle[d],s==null?void 0:s[d])))}),n.push({type:"line",top:!1,start:["min",l],end:["max",l],style:D({},f.lineStyle,c)},{type:"line",top:!1,start:[a,"min"],end:[a,"max"],style:D({},f.lineStyle,c)})}return lt(_t(n))(e)}function V$(e){var r=e.options,t=e.chart,n=r.regressionLine;if(n){var i=n.style,a=n.equationStyle,o=a===void 0?{}:a,l=n.top,s=l===void 0?!1:l,u=n.showEquation,c=u===void 0?!1:u,f={stroke:"#9ba29a",lineWidth:2,opacity:.5},h={x:20,y:20,textAlign:"left",textBaseline:"middle",fontSize:14,fillOpacity:.5};t.annotation().shape({top:s,render:function(v,d){var p=v.addGroup({id:"".concat(t.id,"-regression-line"),name:"regression-line-group"}),y=L$({view:d,options:r}),g=y[0],m=y[1];p.addShape("path",{name:"regression-line",attrs:S(S({path:g},f),i)}),c&&p.addShape("text",{name:"regression-equation",attrs:S(S(S({},h),o),{text:m})})}})}return e}function _$(e){var r=e.chart,t=e.options,n=t.tooltip;return n?r.tooltip(n):n===!1&&r.tooltip(!1),e}function eF(e){return lt(B$,Hf,R$,N$,_$,z$,pA,Is,dg,Yt,Y$,It,wt,V$)(e)}var $$=D({},ft.getDefaultOptions(),{size:4,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!0,crosshairs:{type:"xy"}}});ut("drag-move",{start:[{trigger:"plot:mousedown",action:"scale-translate:start"}],processing:[{trigger:"plot:mousemove",action:"scale-translate:translate",throttle:{wait:100,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseup",action:"scale-translate:end"}]});var rF=function(e){I(r,e);function r(t,n){var i=e.call(this,t,n)||this;return i.type="scatter",i.on(ht.BEFORE_RENDER,function(a){var o,l,s=i,u=s.options,c=s.chart;if(((o=a.data)===null||o===void 0?void 0:o.source)===tr.FILTER){var f=i.chart.filterData(i.chart.getData());Hf({chart:c,options:S(S({},u),{data:f})})}((l=a.data)===null||l===void 0?void 0:l.source)===tr.RESET&&Hf({chart:c,options:u})}),i}return r.getDefaultOptions=function(){return $$},r.prototype.changeData=function(t){this.updateOption(tF(D({},this.options,{data:t})));var n=this,i=n.options,a=n.chart;Hf({chart:a,options:i}),this.chart.changeData(t)},r.prototype.getSchemaAdaptor=function(){return eF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(ft),Ns="$$stock-range$$",Wf="trend",nF="up",iF="down",G$={showMarkers:!1,showCrosshairs:!0,shared:!0,crosshairs:{type:"xy",follow:!0,text:function(e,r,t){var n;if(e==="x"){var i=t[0];n=i?i.title:r}else n=r;return{position:e==="y"?"start":"end",content:n,style:{fill:"#dfdfdf"}}},textBackground:{padding:[2,4],style:{fill:"#666"}}}},H$=D({},ft.getDefaultOptions(),{tooltip:G$,interactions:[{type:"tooltip"}],legend:{position:"top-left"},risingFill:"#ef5350",fallingFill:"#26a69a"});function aF(e,r){return zt(e,function(t){var n=t&&S({},t);if(G(r)&&n){var i=r[0],a=r[1],o=r[2],l=r[3];n[Wf]=n[i]<=n[a]?nF:iF,n[Ns]=[n[i],n[a],n[o],n[l]]}return n})}function W$(e){var r=e.chart,t=e.options,n=t.yField,i=t.data,a=t.risingFill,o=t.fallingFill,l=t.tooltip,s=t.stockStyle;r.data(aF(i,n));var u=l;return u!==!1&&(u=D({},{fields:n},u)),pg(D({},e,{options:{schema:{shape:"candle",color:[a,o],style:s},yField:Ns,seriesField:Wf,rawFields:n,tooltip:u}})),e}function X$(e){var r,t,n=e.chart,i=e.options,a=i.meta,o=i.xAxis,l=i.yAxis,s=i.xField,u=(r={},r[s]={type:"timeCat",tickCount:6},r[Wf]={values:[nF,iF]},r),c=D(u,a,(t={},t[s]=bt(o,er),t[Ns]=bt(l,er),t));return n.scale(c),e}function j$(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(Ns,!1):r.axis(Ns,i),e}function U$(e){var r=e.chart,t=e.options,n=t.tooltip;return n!==!1?r.tooltip(n):r.tooltip(!1),e}function q$(e){var r=e.chart,t=e.options,n=t.legend;return n?r.legend(Wf,n):n===!1&&r.legend(!1),e}function oF(e){lt(wt,W$,X$,j$,U$,q$,Yt,It,_t(),Is)(e)}var Z$=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="stock",t}return r.getDefaultOptions=function(){return H$},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return oF},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options.yField;this.chart.changeData(aF(t,n))},r}(ft);function Da(e){return zt(e||[],function(r,t){return{x:"".concat(t),y:r}})}var zs="x",Ho="y",lF={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return"".concat(E(r,[0,"data","y"],0))},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},Q$={appendPadding:2,tooltip:S({},lF),animation:{}};function K$(e){var r=e.chart,t=e.options,n=t.data,i=t.color,a=t.areaStyle,o=t.point,l=t.line,s=o==null?void 0:o.state,u=Da(n);r.data(u);var c=D({},e,{options:{xField:zs,yField:Ho,area:{color:i,style:a},line:l,point:o}}),f=D({},c,{options:{tooltip:!1}}),h=D({},c,{options:{tooltip:!1,state:s}});return Of(c),_o(f),gr(h),r.axis(!1),r.legend(!1),e}function Wo(e){var r,t,n=e.options,i=n.xAxis,a=n.yAxis,o=n.data,l=Da(o);return lt(Ut((r={},r[zs]=i,r[Ho]=a,r),(t={},t[zs]={type:"cat"},t[Ho]=lg(l,Ho),t)))(e)}function sF(e){return lt(pr("areaStyle"),K$,Wo,le,wt,It,_t())(e)}var J$={appendPadding:2,tooltip:S({},lF),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},tG=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-area",t}return r.getDefaultOptions=function(){return J$},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;Wo({chart:i,options:a}),i.changeData(Da(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return sF},r}(ft);function eG(e){var r=e.chart,t=e.options,n=t.data,i=t.color,a=t.columnStyle,o=t.columnWidthRatio,l=Da(n);r.data(l);var s=D({},e,{options:{xField:zs,yField:Ho,widthRatio:o,interval:{style:a,color:i}}});return Fe(s),r.axis(!1),r.legend(!1),r.interaction("element-active"),e}function uF(e){return lt(wt,pr("columnStyle"),eG,Wo,le,It,_t())(e)}var rG={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return"".concat(E(r,[0,"data","y"],0))},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},nG={appendPadding:2,tooltip:S({},rG),animation:{}},iG=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-column",t}return r.getDefaultOptions=function(){return nG},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;Wo({chart:i,options:a}),i.changeData(Da(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return uF},r}(ft);function aG(e){var r=e.chart,t=e.options,n=t.data,i=t.color,a=t.lineStyle,o=t.point,l=o==null?void 0:o.state,s=Da(n);r.data(s);var u=D({},e,{options:{xField:zs,yField:Ho,line:{color:i,style:a},point:o}}),c=D({},u,{options:{tooltip:!1,state:l}});return _o(u),gr(c),r.axis(!1),r.legend(!1),e}function cF(e){return lt(aG,Wo,wt,le,It,_t())(e)}var oG=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-line",t}return r.getDefaultOptions=function(){return Q$},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;Wo({chart:i,options:a}),i.changeData(Da(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return cF},r}(ft),lG={line:fA,pie:$A,column:Vf,bar:yA,area:hA,gauge:OA,"tiny-line":cF,"tiny-column":uF,"tiny-area":sF,"ring-progress":UA,progress:XA,scatter:eF,histogram:RA,funnel:bA,stock:oF},sG={line:NA,pie:GA,column:xA,bar:mA,area:vA,gauge:V_,"tiny-line":oG,"tiny-column":iG,"tiny-area":tG,"ring-progress":v$,progress:c$,scatter:rF,histogram:j_,funnel:L_,stock:Z$},uG={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function Pg(e,r,t){var n=sG[e];if(!n){console.error("could not find ".concat(e," plot"));return}var i=lG[e];i({chart:r,options:D({},n.getDefaultOptions(),E(uG,e,{}),t)})}function cG(e){var r=e.chart,t=e.options,n=t.views,i=t.legend;return F(n,function(a){var o=a.region,l=a.data,s=a.meta,u=a.axes,c=a.coordinate,f=a.interactions,h=a.annotations,v=a.tooltip,d=a.geometries,p=r.createView({region:o});p.data(l);var y={};u&&F(u,function(g,m){y[m]=bt(g,er)}),y=D({},s,y),p.scale(y),u?F(u,function(g,m){p.axis(m,g)}):p.axis(!1),p.coordinate(c),F(d,function(g){var m=rr({chart:p,options:g}).ext,x=g.adjust;x&&m.geometry.adjust(x)}),F(f,function(g){g.enable===!1?p.removeInteraction(g.type):p.interaction(g.type,g.cfg)}),F(h,function(g){p.annotation()[g.type](S({},g))}),typeof a.animation=="boolean"?p.animate(!1):(p.animate(!0),F(p.geometries,function(g){g.animate(a.animation)})),v&&(p.interaction("tooltip"),p.tooltip(v))}),i?F(i,function(a,o){r.legend(o,a)}):r.legend(!1),r.tooltip(t.tooltip),e}function fG(e){var r=e.chart,t=e.options,n=t.plots,i=t.data,a=i===void 0?[]:i;return F(n,function(o){var l=o.type,s=o.region,u=o.options,c=u===void 0?{}:u,f=o.top,h=c.tooltip;if(f){Pg(l,r,S(S({},c),{data:a}));return}var v=r.createView(S({region:s},bt(c,lA)));h&&v.interaction("tooltip"),Pg(l,v,S({data:a},c))}),e}function hG(e){var r=e.chart,t=e.options;return r.option("slider",t.slider),e}function vG(e){return lt(It,cG,fG,Yt,It,wt,le,hG,_t())(e)}function dG(e,r){var t=e.getModel(),n=t.data,i;return G(n)?i=n[0][r]:i=n[r],i}function pG(e){var r=bf(e);F(r,function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)})}var gG=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAssociationItems=function(t,n){var i,a=this.context.event,o=n||{},l=o.linkField,s=o.dim,u=[];if(!((i=a.data)===null||i===void 0)&&i.data){var c=a.data.data;F(t,function(f){var h,v,d=l;if(s==="x"?d=f.getXScale().field:s==="y"?d=(h=f.getYScales().find(function(y){return y.field===d}))===null||h===void 0?void 0:h.field:d||(d=(v=f.getGroupScales()[0])===null||v===void 0?void 0:v.field),!!d){var p=zt(bf(f),function(y){var g=!1,m=!1,x=G(c)?E(c[0],d):E(c,d);return dG(y,d)===x?g=!0:m=!0,{element:y,view:f,active:g,inactive:m}});u.push.apply(u,p)}})}return u},r.prototype.showTooltip=function(t){var n=QM(this.context.view),i=this.getAssociationItems(n,t);F(i,function(a){if(a.active){var o=a.element.shape.getCanvasBBox();a.view.showTooltip({x:o.minX+o.width/2,y:o.minY+o.height/2})}})},r.prototype.hideTooltip=function(){var t=QM(this.context.view);F(t,function(n){n.hideTooltip()})},r.prototype.active=function(t){var n=ks(this.context.view),i=this.getAssociationItems(n,t);F(i,function(a){var o=a.active,l=a.element;o&&l.setState("active",!0)})},r.prototype.selected=function(t){var n=ks(this.context.view),i=this.getAssociationItems(n,t);F(i,function(a){var o=a.active,l=a.element;o&&l.setState("selected",!0)})},r.prototype.highlight=function(t){var n=ks(this.context.view),i=this.getAssociationItems(n,t);F(i,function(a){var o=a.inactive,l=a.element;o&&l.setState("inactive",!0)})},r.prototype.reset=function(){var t=ks(this.context.view);F(t,function(n){pG(n)})},r}(Bt);et("association",gG),ut("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),ut("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),ut("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),ut("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="mix",t}return r.prototype.getSchemaAdaptor=function(){return vG},r}(ft);var fF;(function(e){e.DEV="DEV",e.BETA="BETA",e.STABLE="STABLE"})(fF||(fF={}));var xn="first-axes-view",wn="second-axes-view",Ba="series-field-key";function hF(e,r,t,n,i){var a=[];r.forEach(function(f){n.forEach(function(h){var v,d=(v={},v[e]=h[e],v[t]=f,v[f]=h[f],v);a.push(d)})});var o=Object.values(hr(a,t)),l=o[0],s=l===void 0?[]:l,u=o[1],c=u===void 0?[]:u;return i?[s.reverse(),c.reverse()]:[s,c]}function _n(e){return e!=="vertical"}function yG(e,r,t){var n=r[0],i=r[1],a=n.autoPadding,o=i.autoPadding,l=e.__axisPosition,s=l.layout,u=l.position;if(_n(s)&&u==="top"&&(n.autoPadding=t.instance(a.top,0,a.bottom,a.left),i.autoPadding=t.instance(o.top,a.left,o.bottom,0)),_n(s)&&u==="bottom"&&(n.autoPadding=t.instance(a.top,a.right/2+5,a.bottom,a.left),i.autoPadding=t.instance(o.top,o.right,o.bottom,a.right/2+5)),!_n(s)&&u==="bottom"){var c=a.left>=o.left?a.left:o.left;n.autoPadding=t.instance(a.top,a.right,a.bottom/2+5,c),i.autoPadding=t.instance(a.bottom/2+5,o.right,o.bottom,c)}if(!_n(s)&&u==="top"){var c=a.left>=o.left?a.left:o.left;n.autoPadding=t.instance(a.top,a.right,0,c),i.autoPadding=t.instance(0,o.right,a.top,c)}}function mG(e){var r=e.chart,t=e.options,n=t.data,i=t.xField,a=t.yField,o=t.color,l=t.barStyle,s=t.widthRatio,u=t.legend,c=t.layout,f=hF(i,a,Ba,n,_n(c));u?r.legend(Ba,u):u===!1&&r.legend(!1);var h,v,d=f[0],p=f[1];_n(c)?(h=r.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:xn}),h.coordinate().transpose().reflect("x"),v=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:wn}),v.coordinate().transpose(),h.data(d),v.data(p)):(h=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:xn}),v=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:wn}),v.coordinate().reflect("y"),h.data(d),v.data(p));var y=D({},e,{chart:h,options:{widthRatio:s,xField:i,yField:a[0],seriesField:Ba,interval:{color:o,style:l}}});Fe(y);var g=D({},e,{chart:v,options:{xField:i,yField:a[1],seriesField:Ba,widthRatio:s,interval:{color:o,style:l}}});return Fe(g),e}function xG(e){var r,t,n,i=e.options,a=e.chart,o=i.xAxis,l=i.yAxis,s=i.xField,u=i.yField,c=vt(a,xn),f=vt(a,wn),h={};return uo((i==null?void 0:i.meta)||{}).map(function(v){E(i==null?void 0:i.meta,[v,"alias"])&&(h[v]=i.meta[v].alias)}),a.scale((r={},r[Ba]={sync:!0,formatter:function(v){return E(h,v,v)}},r)),Ut((t={},t[s]=o,t[u[0]]=l[u[0]],t))(D({},e,{chart:c})),Ut((n={},n[s]=o,n[u[1]]=l[u[1]],n))(D({},e,{chart:f})),e}function wG(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField,l=t.layout,s=vt(r,xn),u=vt(r,wn);return(n==null?void 0:n.position)==="bottom"?u.axis(a,S(S({},n),{label:{formatter:function(){return""}}})):u.axis(a,!1),n===!1?s.axis(a,!1):s.axis(a,S({position:_n(l)?"top":"bottom"},n)),i===!1?(s.axis(o[0],!1),u.axis(o[1],!1)):(s.axis(o[0],i[o[0]]),u.axis(o[1],i[o[1]])),r.__axisPosition={position:s.getOptions().axes[a].position,layout:l},e}function SG(e){var r=e.chart;return Yt(D({},e,{chart:vt(r,xn)})),Yt(D({},e,{chart:vt(r,wn)})),e}function CG(e){var r=e.chart,t=e.options,n=t.yField,i=t.yAxis;return Ta(D({},e,{chart:vt(r,xn),options:{yAxis:i[n[0]]}})),Ta(D({},e,{chart:vt(r,wn),options:{yAxis:i[n[1]]}})),e}function MG(e){var r=e.chart;return wt(D({},e,{chart:vt(r,xn)})),wt(D({},e,{chart:vt(r,wn)})),wt(e),e}function AG(e){var r=e.chart;return It(D({},e,{chart:vt(r,xn)})),It(D({},e,{chart:vt(r,wn)})),e}function FG(e){var r=this,t,n,i=e.chart,a=e.options,o=a.label,l=a.yField,s=a.layout,u=vt(i,xn),c=vt(i,wn),f=Ae(u,"interval"),h=Ae(c,"interval");if(!o)f.label(!1),h.label(!1);else{var v=o.callback,d=kt(o,["callback"]);d.position||(d.position="middle"),d.offset===void 0&&(d.offset=2);var p=S({},d);if(_n(s)){var y=((t=p.style)===null||t===void 0?void 0:t.textAlign)||(d.position==="middle"?"center":"left");d.style=D({},d.style,{textAlign:y});var g={left:"right",right:"left",center:"center"};p.style=D({},p.style,{textAlign:g[y]})}else{var m={top:"bottom",bottom:"top",middle:"middle"};typeof d.position=="string"?d.position=m[d.position]:typeof d.position=="function"&&(d.position=function(){for(var C=[],M=0;M<arguments.length;M++)C[M]=arguments[M];return m[d.position.apply(r,C)]});var x=((n=p.style)===null||n===void 0?void 0:n.textBaseline)||"bottom";p.style=D({},p.style,{textBaseline:x});var w={top:"bottom",bottom:"top",middle:"middle"};d.style=D({},d.style,{textBaseline:w[x]})}f.label({fields:[l[0]],callback:v,cfg:fe(p)}),h.label({fields:[l[1]],callback:v,cfg:fe(d)})}return e}function bG(e){return lt(mG,xG,wG,CG,MG,FG,le,SG,AG)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bidirectional-bar",t}return r.getDefaultOptions=function(){return D({},e.getDefaultOptions.call(this),{syncViewPadding:yG})},r.prototype.changeData=function(t){t===void 0&&(t=[]),this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null)),this.updateOption({data:t});var n=this.options,i=n.xField,a=n.yField,o=n.layout,l=hF(i,a,Ba,t,_n(o)),s=l[0],u=l[1],c=vt(this.chart,xn),f=vt(this.chart,wn);c.data(s),f.data(u),this.chart.render(!0),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return bG},r.SERIES_FIELD_KEY=Ba,r})(ft);var Lg,Xo="$$range$$",EG="low-q1-median-q3-high",kG="$$y_outliers$$",vF="outliers_view",TG=D({},ft.getDefaultOptions(),{meta:(Lg={},Lg[Xo]={min:0,alias:EG},Lg),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}}),dF=function(e,r){var t=e;if(Array.isArray(r)){var n=r[0],i=r[1],a=r[2],o=r[3],l=r[4];t=zt(e,function(s){return s[Xo]=[s[n],s[i],s[a],s[o],s[l]],s})}return t};function IG(e){var r=e.chart,t=e.options,n=t.xField,i=t.yField,a=t.groupField,o=t.color,l=t.tooltip,s=t.boxStyle;r.data(dF(t.data,i));var u=G(i)?Xo:i,c=i?G(i)?i:[i]:[],f=l;f!==!1&&(f=D({},{fields:G(i)?i:[]},f));var h=pg(D({},e,{options:{xField:n,yField:u,seriesField:a,tooltip:f,rawFields:c,label:!1,schema:{shape:"box",color:o,style:s}}})).ext;return a&&h.geometry.adjust("dodge"),e}function PG(e){var r=e.chart,t=e.options,n=t.xField,i=t.data,a=t.outliersField,o=t.outliersStyle,l=t.padding,s=t.label;if(!a)return e;var u=r.createView({padding:l,id:vF}),c=i.reduce(function(f,h){var v=h[a];return v.forEach(function(d){var p;return f.push(S(S({},h),(p={},p[a]=d,p)))}),f},[]);return u.data(c),gr({chart:u,options:{xField:n,yField:a,point:{shape:"circle",style:o},label:s}}),u.axis(!1),e}function LG(e){var r,t,n=e.chart,i=e.options,a=i.meta,o=i.xAxis,l=i.yAxis,s=i.xField,u=i.yField,c=i.outliersField,f=Array.isArray(u)?Xo:u,h={};if(c){var v=kG;h=(r={},r[c]={sync:v,nice:!0},r[f]={sync:v,nice:!0},r)}var d=D(h,a,(t={},t[s]=bt(o,er),t[f]=bt(l,er),t));return n.scale(d),e}function OG(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField,l=Array.isArray(o)?Xo:o;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(Xo,!1):r.axis(l,i),e}function DG(e){var r=e.chart,t=e.options,n=t.legend,i=t.groupField;return i?n?r.legend(i,n):r.legend(i,{position:"bottom"}):r.legend(!1),e}function BG(e){return lt(IG,PG,LG,OG,DG,le,_t(),Yt,It,wt)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="box",t}return r.getDefaultOptions=function(){return TG},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options.yField,i=this.chart.views.find(function(a){return a.id===vF});i&&i.data(t),this.chart.changeData(dF(t,n))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return BG},r})(ft);function pF(e,r,t){return e.length>1?"".concat(r,"_").concat(t):"".concat(r)}function gF(e){var r=e.data,t=e.xField,n=e.measureField,i=e.rangeField,a=e.targetField,o=e.layout,l=[],s=[];r.forEach(function(f,h){var v=[f[i]].flat();v.sort(function(y,g){return y-g}),v.forEach(function(y,g){var m,x=g===0?y:v[g]-v[g-1];l.push((m={rKey:"".concat(i,"_").concat(g)},m[t]=t?f[t]:String(h),m[i]=x,m))});var d=[f[n]].flat();d.forEach(function(y,g){var m;l.push((m={mKey:pF(d,n,g)},m[t]=t?f[t]:String(h),m[n]=y,m))});var p=[f[a]].flat();p.forEach(function(y,g){var m;l.push((m={tKey:pF(p,a,g)},m[t]=t?f[t]:String(h),m[a]=y,m))}),s.push(f[i],f[n],f[a])});var u=Math.min.apply(Math,s.flat(1/0)),c=Math.max.apply(Math,s.flat(1/0));return u=u>0?0:u,o==="vertical"&&l.reverse(),{min:u,max:c,ds:l}}function RG(e){var r=e.chart,t=e.options,n=t.bulletStyle,i=t.targetField,a=t.rangeField,o=t.measureField,l=t.xField,s=t.color,u=t.layout,c=t.size,f=t.label,h=gF(t),v=h.min,d=h.max,p=h.ds;r.data(p);var y=D({},e,{options:{xField:l,yField:a,seriesField:"rKey",isStack:!0,label:E(f,"range"),interval:{color:E(s,"range"),style:E(n,"range"),size:E(c,"range")}}});Fe(y),r.geometries[0].tooltip(!1);var g=D({},e,{options:{xField:l,yField:o,seriesField:"mKey",isStack:!0,label:E(f,"measure"),interval:{color:E(s,"measure"),style:E(n,"measure"),size:E(c,"measure")}}});Fe(g);var m=D({},e,{options:{xField:l,yField:i,seriesField:"tKey",label:E(f,"target"),point:{color:E(s,"target"),style:E(n,"target"),size:Q(E(c,"target"))?function(x){return E(c,"target")(x)/2}:E(c,"target")/2,shape:u==="horizontal"?"line":"hyphen"}}});return gr(m),u==="horizontal"&&r.coordinate().transpose(),S(S({},e),{ext:{data:{min:v,max:d}}})}function yF(e){var r,t,n=e.options,i=e.ext,a=n.xAxis,o=n.yAxis,l=n.targetField,s=n.rangeField,u=n.measureField,c=n.xField,f=i.data;return lt(Ut((r={},r[c]=a,r[u]=o,r),(t={},t[u]={min:f==null?void 0:f.min,max:f==null?void 0:f.max,sync:!0},t[l]={sync:"".concat(u)},t[s]={sync:"".concat(u)},t)))(e)}function NG(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.measureField,l=t.rangeField,s=t.targetField;return r.axis("".concat(l),!1),r.axis("".concat(s),!1),n===!1?r.axis("".concat(a),!1):r.axis("".concat(a),n),i===!1?r.axis("".concat(o),!1):r.axis("".concat(o),i),e}function zG(e){var r=e.chart,t=e.options,n=t.legend;return r.removeInteraction("legend-filter"),r.legend(n),r.legend("rKey",!1),r.legend("mKey",!1),r.legend("tKey",!1),e}function YG(e){var r=e.chart,t=e.options,n=t.label,i=t.measureField,a=t.targetField,o=t.rangeField,l=r.geometries,s=l[0],u=l[1],c=l[2];return E(n,"range")?s.label("".concat(o),S({layout:[{type:"limit-in-plot"}]},fe(n.range))):s.label(!1),E(n,"measure")?u.label("".concat(i),S({layout:[{type:"limit-in-plot"}]},fe(n.measure))):u.label(!1),E(n,"target")?c.label("".concat(a),S({layout:[{type:"limit-in-plot"}]},fe(n.target))):c.label(!1),e}function VG(e){lt(RG,yF,NG,zG,wt,YG,le,Yt,It)(e)}var _G=D({},ft.getDefaultOptions(),{layout:"horizontal",size:{range:30,measure:20,target:20},xAxis:{tickLine:!1,line:null},bulletStyle:{range:{fillOpacity:.5}},label:{measure:{position:"right"}},tooltip:{showMarkers:!1}});(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bullet",t}return r.getDefaultOptions=function(){return _G},r.prototype.changeData=function(t){this.updateOption({data:t});var n=gF(this.options),i=n.min,a=n.max,o=n.ds;yF({options:this.options,ext:{data:{min:i,max:a}},chart:this.chart}),this.chart.changeData(o)},r.prototype.getSchemaAdaptor=function(){return VG},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r})(ft);var $G={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(e){return e.id},source:function(e){return e.source},target:function(e){return e.target},sourceWeight:function(e){return e.value||1},targetWeight:function(e){return e.value||1},sortBy:null};function GG(e,r,t){F(e,function(n,i){n.inEdges=r.filter(function(a){return"".concat(t.target(a))==="".concat(i)}),n.outEdges=r.filter(function(a){return"".concat(t.source(a))==="".concat(i)}),n.edges=n.outEdges.concat(n.inEdges),n.frequency=n.edges.length,n.value=0,n.inEdges.forEach(function(a){n.value+=t.targetWeight(a)}),n.outEdges.forEach(function(a){n.value+=t.sourceWeight(a)})})}function HG(e,r){var t={weight:function(i,a){return a.value-i.value},frequency:function(i,a){return a.frequency-i.frequency},id:function(i,a){return"".concat(r.id(i)).localeCompare("".concat(r.id(a)))}},n=t[r.sortBy];!n&&Q(r.sortBy)&&(n=r.sortBy),n&&e.sort(n)}function WG(e,r){var t=e.length;if(!t)throw new TypeError("Invalid nodes: it's empty!");if(r.weight){var n=r.nodePaddingRatio;if(n<0||n>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var i=n/(2*t),a=r.nodeWidthRatio;if(a<=0||a>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var o=0;e.forEach(function(s){o+=s.value}),e.forEach(function(s){s.weight=s.value/o,s.width=s.weight*(1-n),s.height=a}),e.forEach(function(s,u){for(var c=0,f=u-1;f>=0;f--)c+=e[f].width+2*i;var h=s.minX=i+c,v=s.maxX=s.minX+s.width,d=s.minY=r.y-a/2,p=s.maxY=d+a;s.x=[h,v,v,h],s.y=[d,d,p,p]})}else{var l=1/t;e.forEach(function(s,u){s.x=(u+.5)*l,s.y=r.y})}return e}function XG(e,r,t){if(t.weight){var n={};F(e,function(i,a){n[a]=i.value}),r.forEach(function(i){var a=t.source(i),o=t.target(i),l=e[a],s=e[o];if(l&&s){var u=n[a],c=t.sourceWeight(i),f=l.minX+(l.value-u)/l.value*l.width,h=f+c/l.value*l.width;n[a]-=c;var v=n[o],d=t.targetWeight(i),p=s.minX+(s.value-v)/s.value*s.width,y=p+d/s.value*s.width;n[o]-=d;var g=t.y;i.x=[f,h,p,y],i.y=[g,g,g,g],i.source=l,i.target=s}})}else r.forEach(function(i){var a=e[t.source(i)],o=e[t.target(i)];a&&o&&(i.x=[a.x,o.x],i.y=[a.y,o.y],i.source=a,i.target=o)});return r}function jG(e){return Tt({},$G,e)}function UG(e,r){var t=jG(e),n={},i=r.nodes,a=r.links;i.forEach(function(s){var u=t.id(s);n[u]=s}),GG(n,a,t),HG(i,t);var o=WG(i,t),l=XG(n,a,t);return{nodes:o,links:l}}var mF="x",xF="y",wF="name",SF="source",qG={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(e,r){var t=(e[0]+e[1])/2,n=t>.5?-4:4;return{offsetX:n,content:r}},labelEmit:!0,style:{fill:"#8c8c8c"}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(e){return!E(e,[0,"data","isNode"])},formatter:function(e){var r=e.source,t=e.target,n=e.value;return{name:"".concat(r," -> ").concat(t),value:n}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function ZG(e){var r=e.options,t=r.data,n=r.sourceField,i=r.targetField,a=r.weightField,o=r.nodePaddingRatio,l=r.nodeWidthRatio,s=r.rawFields,u=s===void 0?[]:s,c=GM(t,n,i,a),f=UG({weight:!0,nodePaddingRatio:o,nodeWidthRatio:l},c),h=f.nodes,v=f.links,d=h.map(function(y){return S(S({},bt(y,rt(["id","x","y","name"],u,!0))),{isNode:!0})}),p=v.map(function(y){return S(S({source:y.source.name,target:y.target.name,name:y.source.name||y.target.name},bt(y,rt(["x","y","value"],u,!0))),{isNode:!1})});return S(S({},e),{ext:S(S({},e.ext),{chordData:{nodesData:d,edgesData:p}})})}function QG(e){var r,t=e.chart;return t.scale((r={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},r[wF]={sync:"color"},r[SF]={sync:"color"},r)),e}function KG(e){var r=e.chart;return r.axis(!1),e}function JG(e){var r=e.chart;return r.legend(!1),e}function tH(e){var r=e.chart,t=e.options,n=t.tooltip;return r.tooltip(n),e}function eH(e){var r=e.chart;return r.coordinate("polar").reflect("y"),e}function rH(e){var r=e.chart,t=e.options,n=e.ext.chordData.nodesData,i=t.nodeStyle,a=t.label,o=t.tooltip,l=r.createView();return l.data(n),Df({chart:l,options:{xField:mF,yField:xF,seriesField:wF,polygon:{style:i},label:a,tooltip:o}}),e}function nH(e){var r=e.chart,t=e.options,n=e.ext.chordData.edgesData,i=t.edgeStyle,a=t.tooltip,o=r.createView();o.data(n);var l={xField:mF,yField:xF,seriesField:SF,edge:{style:i,shape:"arc"},tooltip:a};return rA({chart:o,options:l}),e}function iH(e){var r=e.chart,t=e.options,n=t.animation;return Ts(r,n,_V(r)),e}function aH(e){return lt(wt,ZG,eH,QG,KG,JG,tH,nH,rH,Yt,Ii,iH)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="chord",t}return r.getDefaultOptions=function(){return qG},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return aH},r})(ft);var oH=["x","y","r","name","value","path","depth"],lH={colorField:"name",autoFit:!0,pointStyle:{lineWidth:0,stroke:"#fff"},legend:!1,hierarchyConfig:{size:[1,1],padding:0},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1}},CF=4,sH=0,MF=5,AF="drilldown-bread-crumb",uH={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},Ys="hierarchy-data-transform-params",cH=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.name="drill-down",t.historyCache=[],t.breadCrumbGroup=null,t.breadCrumbCfg=uH,t}return r.prototype.click=function(){var t=E(this.context,["event","data","data"]);if(!t)return!1;this.drill(t),this.drawBreadCrumb()},r.prototype.resetPosition=function(){if(this.breadCrumbGroup){var t=this.context.view.getCoordinate(),n=this.breadCrumbGroup,i=n.getBBox(),a=this.getButtonCfg().position,o={x:t.start.x,y:t.end.y-(i.height+MF*2)};t.isPolar&&(o={x:0,y:0}),a==="bottom-left"&&(o={x:t.start.x,y:t.start.y});var l=Je.transform(null,[["t",o.x+sH,o.y+i.height+MF]]);n.setMatrix(l)}},r.prototype.back=function(){ue(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},r.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},r.prototype.drill=function(t){var n=this.context.view,i=E(n,["interactions","drill-down","cfg","transformData"],function(u){return u}),a=i(S({data:t.data},t[Ys]));n.changeData(a);for(var o=[],l=t;l;){var s=l.data;o.unshift({id:"".concat(s.name,"_").concat(l.height,"_").concat(l.depth),name:s.name,children:i(S({data:s},t[Ys]))}),l=l.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(o)},r.prototype.backTo=function(t){if(!(!t||t.length<=0)){var n=this.context.view,i=ne(t).children;n.changeData(i),t.length>1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},r.prototype.getButtonCfg=function(){var t=this.context.view,n=E(t,["interactions","drill-down","cfg","drillDownConfig"]);return D(this.breadCrumbCfg,n==null?void 0:n.breadCrumb,this.cfg)},r.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},r.prototype.drawBreadCrumbGroup=function(){var t=this,n=this.getButtonCfg(),i=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:AF});var a=0;i.forEach(function(o,l){var s=t.breadCrumbGroup.addShape({type:"text",id:o.id,name:"".concat(AF,"_").concat(o.name,"_text"),attrs:S(S({text:l===0&&!Y(n.rootText)?n.rootText:o.name},n.textStyle),{x:a,y:0})}),u=s.getBBox();if(a+=u.width+CF,s.on("click",function(h){var v,d=h.target.get("id");if(d!==((v=ne(i))===null||v===void 0?void 0:v.id)){var p=i.slice(0,i.findIndex(function(y){return y.id===d})+1);t.backTo(p)}}),s.on("mouseenter",function(h){var v,d=h.target.get("id");d!==((v=ne(i))===null||v===void 0?void 0:v.id)?s.attr(n.activeTextStyle):s.attr({cursor:"default"})}),s.on("mouseleave",function(){s.attr(n.textStyle)}),l<i.length-1){var c=t.breadCrumbGroup.addShape({type:"text",name:"".concat(n.name,"_").concat(o.name,"_divider"),attrs:S(S({text:n.dividerText},n.textStyle),{x:a,y:0})}),f=c.getBBox();a+=f.width+CF}})},r.prototype.hideCrumbGroup=function(){this.breadCrumbGroup&&this.breadCrumbGroup.hide()},r.prototype.destroy=function(){this.breadCrumbGroup&&this.breadCrumbGroup.remove(),e.prototype.destroy.call(this)},r}(Bt);function fH(e,r){return e.parent===r.parent?1:2}function hH(e){return e.reduce(vH,0)/e.length}function vH(e,r){return e+r.x}function dH(e){return 1+e.reduce(pH,0)}function pH(e,r){return Math.max(e,r.y)}function gH(e){for(var r;r=e.children;)e=r[0];return e}function yH(e){for(var r;r=e.children;)e=r[r.length-1];return e}function mH(){var e=fH,r=1,t=1,n=!1;function i(a){var o,l=0;a.eachAfter(function(h){var v=h.children;v?(h.x=hH(v),h.y=dH(v)):(h.x=o?l+=e(h,o):0,h.y=0,o=h)});var s=gH(a),u=yH(a),c=s.x-e(s,u)/2,f=u.x+e(u,s)/2;return a.eachAfter(n?function(h){h.x=(h.x-a.x)*r,h.y=(a.y-h.y)*t}:function(h){h.x=(h.x-c)/(f-c)*r,h.y=(1-(a.y?h.y/a.y:1))*t})}return i.separation=function(a){return arguments.length?(e=a,i):e},i.size=function(a){return arguments.length?(n=!1,r=+a[0],t=+a[1],i):n?null:[r,t]},i.nodeSize=function(a){return arguments.length?(n=!0,r=+a[0],t=+a[1],i):n?[r,t]:null},i}function xH(e){var r=0,t=e.children,n=t&&t.length;if(!n)r=1;else for(;--n>=0;)r+=t[n].value;e.value=r}function wH(){return this.eachAfter(xH)}function SH(e,r){let t=-1;for(const n of this)e.call(r,n,++t,this);return this}function CH(e,r){for(var t=this,n=[t],i,a,o=-1;t=n.pop();)if(e.call(r,t,++o,this),i=t.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this}function MH(e,r){for(var t=this,n=[t],i=[],a,o,l,s=-1;t=n.pop();)if(i.push(t),a=t.children)for(o=0,l=a.length;o<l;++o)n.push(a[o]);for(;t=i.pop();)e.call(r,t,++s,this);return this}function AH(e,r){let t=-1;for(const n of this)if(e.call(r,n,++t,this))return n}function FH(e){return this.eachAfter(function(r){for(var t=+e(r.data)||0,n=r.children,i=n&&n.length;--i>=0;)t+=n[i].value;r.value=t})}function bH(e){return this.eachBefore(function(r){r.children&&r.children.sort(e)})}function EH(e){for(var r=this,t=kH(r,e),n=[r];r!==t;)r=r.parent,n.push(r);for(var i=n.length;e!==t;)n.splice(i,0,e),e=e.parent;return n}function kH(e,r){if(e===r)return e;var t=e.ancestors(),n=r.ancestors(),i=null;for(e=t.pop(),r=n.pop();e===r;)i=e,e=t.pop(),r=n.pop();return i}function TH(){for(var e=this,r=[e];e=e.parent;)r.push(e);return r}function IH(){return Array.from(this)}function PH(){var e=[];return this.eachBefore(function(r){r.children||e.push(r)}),e}function LH(){var e=this,r=[];return e.each(function(t){t!==e&&r.push({source:t.parent,target:t})}),r}function*OH(){var e=this,r,t=[e],n,i,a;do for(r=t.reverse(),t=[];e=r.pop();)if(yield e,n=e.children)for(i=0,a=n.length;i<a;++i)t.push(n[i]);while(t.length)}function jo(e,r){e instanceof Map?(e=[void 0,e],r===void 0&&(r=RH)):r===void 0&&(r=BH);for(var t=new Uo(e),n,i=[t],a,o,l,s;n=i.pop();)if((o=r(n.data))&&(s=(o=Array.from(o)).length))for(n.children=o,l=s-1;l>=0;--l)i.push(a=o[l]=new Uo(o[l])),a.parent=n,a.depth=n.depth+1;return t.eachBefore(FF)}function DH(){return jo(this).eachBefore(NH)}function BH(e){return e.children}function RH(e){return Array.isArray(e)?e[1]:null}function NH(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function FF(e){var r=0;do e.height=r;while((e=e.parent)&&e.height<++r)}function Uo(e){this.data=e,this.depth=this.height=0,this.parent=null}Uo.prototype=jo.prototype={constructor:Uo,count:wH,each:SH,eachAfter:MH,eachBefore:CH,find:AH,sum:FH,sort:bH,path:EH,ancestors:TH,descendants:IH,leaves:PH,links:LH,copy:DH,[Symbol.iterator]:OH};function zH(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function YH(e){for(var r=e.length,t,n;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e}function bF(e){for(var r=0,t=(e=YH(Array.from(e))).length,n=[],i,a;r<t;)i=e[r],a&&EF(a,i)?++r:(a=_H(n=VH(n,i)),r=0);return a}function VH(e,r){var t,n;if(Og(r,e))return[r];for(t=0;t<e.length;++t)if(Xf(r,e[t])&&Og(Vs(e[t],r),e))return[e[t],r];for(t=0;t<e.length-1;++t)for(n=t+1;n<e.length;++n)if(Xf(Vs(e[t],e[n]),r)&&Xf(Vs(e[t],r),e[n])&&Xf(Vs(e[n],r),e[t])&&Og(kF(e[t],e[n],r),e))return[e[t],e[n],r];throw new Error}function Xf(e,r){var t=e.r-r.r,n=r.x-e.x,i=r.y-e.y;return t<0||t*t<n*n+i*i}function EF(e,r){var t=e.r-r.r+Math.max(e.r,r.r,1)*1e-9,n=r.x-e.x,i=r.y-e.y;return t>0&&t*t>n*n+i*i}function Og(e,r){for(var t=0;t<r.length;++t)if(!EF(e,r[t]))return!1;return!0}function _H(e){switch(e.length){case 1:return $H(e[0]);case 2:return Vs(e[0],e[1]);case 3:return kF(e[0],e[1],e[2])}}function $H(e){return{x:e.x,y:e.y,r:e.r}}function Vs(e,r){var t=e.x,n=e.y,i=e.r,a=r.x,o=r.y,l=r.r,s=a-t,u=o-n,c=l-i,f=Math.sqrt(s*s+u*u);return{x:(t+a+s/f*c)/2,y:(n+o+u/f*c)/2,r:(f+i+l)/2}}function kF(e,r,t){var n=e.x,i=e.y,a=e.r,o=r.x,l=r.y,s=r.r,u=t.x,c=t.y,f=t.r,h=n-o,v=n-u,d=i-l,p=i-c,y=s-a,g=f-a,m=n*n+i*i-a*a,x=m-o*o-l*l+s*s,w=m-u*u-c*c+f*f,C=v*d-h*p,M=(d*w-p*x)/(C*2)-n,A=(p*y-d*g)/C,b=(v*x-h*w)/(C*2)-i,T=(h*g-v*y)/C,k=A*A+T*T-1,P=2*(a+M*A+b*T),O=M*M+b*b-a*a,V=-(k?(P+Math.sqrt(P*P-4*k*O))/(2*k):O/P);return{x:n+M+A*V,y:i+b+T*V,r:V}}function TF(e,r,t){var n=e.x-r.x,i,a,o=e.y-r.y,l,s,u=n*n+o*o;u?(a=r.r+t.r,a*=a,s=e.r+t.r,s*=s,a>s?(i=(u+s-a)/(2*u),l=Math.sqrt(Math.max(0,s/u-i*i)),t.x=e.x-i*n-l*o,t.y=e.y-i*o+l*n):(i=(u+a-s)/(2*u),l=Math.sqrt(Math.max(0,a/u-i*i)),t.x=r.x+i*n-l*o,t.y=r.y+i*o+l*n)):(t.x=r.x+t.r,t.y=r.y)}function IF(e,r){var t=e.r+r.r-1e-6,n=r.x-e.x,i=r.y-e.y;return t>0&&t*t>n*n+i*i}function PF(e){var r=e._,t=e.next._,n=r.r+t.r,i=(r.x*t.r+t.x*r.r)/n,a=(r.y*t.r+t.y*r.r)/n;return i*i+a*a}function jf(e){this._=e,this.next=null,this.previous=null}function LF(e){if(!(i=(e=zH(e)).length))return 0;var r,t,n,i,a,o,l,s,u,c,f;if(r=e[0],r.x=0,r.y=0,!(i>1))return r.r;if(t=e[1],r.x=-t.r,t.x=r.r,t.y=0,!(i>2))return r.r+t.r;TF(t,r,n=e[2]),r=new jf(r),t=new jf(t),n=new jf(n),r.next=n.previous=t,t.next=r.previous=n,n.next=t.previous=r;t:for(l=3;l<i;++l){TF(r._,t._,n=e[l]),n=new jf(n),s=t.next,u=r.previous,c=t._.r,f=r._.r;do if(c<=f){if(IF(s._,n._)){t=s,r.next=t,t.previous=r,--l;continue t}c+=s._.r,s=s.next}else{if(IF(u._,n._)){r=u,r.next=t,t.previous=r,--l;continue t}f+=u._.r,u=u.previous}while(s!==u.next);for(n.previous=r,n.next=t,r.next=t.previous=t=n,a=PF(r);(n=n.next)!==t;)(o=PF(n))<a&&(r=n,a=o);t=r.next}for(r=[t._],n=t;(n=n.next)!==t;)r.push(n._);for(n=bF(r),l=0;l<i;++l)r=e[l],r.x-=n.x,r.y-=n.y;return n.r}function GH(e){return LF(e),e}function HH(e){return e==null?null:Uf(e)}function Uf(e){if(typeof e!="function")throw new Error;return e}function Ra(){return 0}function qo(e){return function(){return e}}function WH(e){return Math.sqrt(e.value)}function OF(){var e=null,r=1,t=1,n=Ra;function i(a){return a.x=r/2,a.y=t/2,e?a.eachBefore(DF(e)).eachAfter(Dg(n,.5)).eachBefore(BF(1)):a.eachBefore(DF(WH)).eachAfter(Dg(Ra,1)).eachAfter(Dg(n,a.r/Math.min(r,t))).eachBefore(BF(Math.min(r,t)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(e=HH(a),i):e},i.size=function(a){return arguments.length?(r=+a[0],t=+a[1],i):[r,t]},i.padding=function(a){return arguments.length?(n=typeof a=="function"?a:qo(+a),i):n},i}function DF(e){return function(r){r.children||(r.r=Math.max(0,+e(r)||0))}}function Dg(e,r){return function(t){if(n=t.children){var n,i,a=n.length,o=e(t)*r||0,l;if(o)for(i=0;i<a;++i)n[i].r+=o;if(l=LF(n),o)for(i=0;i<a;++i)n[i].r-=o;t.r=l+o}}}function BF(e){return function(r){var t=r.parent;r.r*=e,t&&(r.x=t.x+e*r.x,r.y=t.y+e*r.y)}}function RF(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function _s(e,r,t,n,i){for(var a=e.children,o,l=-1,s=a.length,u=e.value&&(n-r)/e.value;++l<s;)o=a[l],o.y0=t,o.y1=i,o.x0=r,o.x1=r+=o.value*u}function NF(){var e=1,r=1,t=0,n=!1;function i(o){var l=o.height+1;return o.x0=o.y0=t,o.x1=e,o.y1=r/l,o.eachBefore(a(r,l)),n&&o.eachBefore(RF),o}function a(o,l){return function(s){s.children&&_s(s,s.x0,o*(s.depth+1)/l,s.x1,o*(s.depth+2)/l);var u=s.x0,c=s.y0,f=s.x1-t,h=s.y1-t;f<u&&(u=f=(u+f)/2),h<c&&(c=h=(c+h)/2),s.x0=u,s.y0=c,s.x1=f,s.y1=h}}return i.round=function(o){return arguments.length?(n=!!o,i):n},i.size=function(o){return arguments.length?(e=+o[0],r=+o[1],i):[e,r]},i.padding=function(o){return arguments.length?(t=+o,i):t},i}var XH={depth:-1},zF={};function jH(e){return e.id}function UH(e){return e.parentId}function qH(){var e=jH,r=UH;function t(n){var i=Array.from(n),a=i.length,o,l,s,u,c,f,h,v=new Map;for(l=0;l<a;++l)o=i[l],c=i[l]=new Uo(o),(f=e(o,l,n))!=null&&(f+="")&&(h=c.id=f,v.set(h,v.has(h)?zF:c)),(f=r(o,l,n))!=null&&(f+="")&&(c.parent=f);for(l=0;l<a;++l)if(c=i[l],f=c.parent){if(u=v.get(f),!u)throw new Error("missing: "+f);if(u===zF)throw new Error("ambiguous: "+f);u.children?u.children.push(c):u.children=[c],c.parent=u}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(s.parent=XH,s.eachBefore(function(d){d.depth=d.parent.depth+1,--a}).eachBefore(FF),s.parent=null,a>0)throw new Error("cycle");return s}return t.id=function(n){return arguments.length?(e=Uf(n),t):e},t.parentId=function(n){return arguments.length?(r=Uf(n),t):r},t}function ZH(e,r){return e.parent===r.parent?1:2}function Bg(e){var r=e.children;return r?r[0]:e.t}function Rg(e){var r=e.children;return r?r[r.length-1]:e.t}function QH(e,r,t){var n=t/(r.i-e.i);r.c-=n,r.s+=t,e.c+=n,r.z+=t,r.m+=t}function KH(e){for(var r=0,t=0,n=e.children,i=n.length,a;--i>=0;)a=n[i],a.z+=r,a.m+=r,r+=a.s+(t+=a.c)}function JH(e,r,t){return e.a.parent===r.parent?e.a:t}function qf(e,r){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=r}qf.prototype=Object.create(Uo.prototype);function tW(e){for(var r=new qf(e,0),t,n=[r],i,a,o,l;t=n.pop();)if(a=t._.children)for(t.children=new Array(l=a.length),o=l-1;o>=0;--o)n.push(i=t.children[o]=new qf(a[o],o)),i.parent=t;return(r.parent=new qf(null,0)).children=[r],r}function eW(){var e=ZH,r=1,t=1,n=null;function i(u){var c=tW(u);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),n)u.eachBefore(s);else{var f=u,h=u,v=u;u.eachBefore(function(m){m.x<f.x&&(f=m),m.x>h.x&&(h=m),m.depth>v.depth&&(v=m)});var d=f===h?1:e(f,h)/2,p=d-f.x,y=r/(h.x+d+p),g=t/(v.depth||1);u.eachBefore(function(m){m.x=(m.x+p)*y,m.y=m.depth*g})}return u}function a(u){var c=u.children,f=u.parent.children,h=u.i?f[u.i-1]:null;if(c){KH(u);var v=(c[0].z+c[c.length-1].z)/2;h?(u.z=h.z+e(u._,h._),u.m=u.z-v):u.z=v}else h&&(u.z=h.z+e(u._,h._));u.parent.A=l(u,h,u.parent.A||f[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function l(u,c,f){if(c){for(var h=u,v=u,d=c,p=h.parent.children[0],y=h.m,g=v.m,m=d.m,x=p.m,w;d=Rg(d),h=Bg(h),d&&h;)p=Bg(p),v=Rg(v),v.a=u,w=d.z+m-h.z-y+e(d._,h._),w>0&&(QH(JH(d,u,f),u,w),y+=w,g+=w),m+=d.m,y+=h.m,x+=p.m,g+=v.m;d&&!Rg(v)&&(v.t=d,v.m+=m-g),h&&!Bg(p)&&(p.t=h,p.m+=y-x,f=u)}return f}function s(u){u.x*=r,u.y=u.depth*t}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(n=!1,r=+u[0],t=+u[1],i):n?null:[r,t]},i.nodeSize=function(u){return arguments.length?(n=!0,r=+u[0],t=+u[1],i):n?[r,t]:null},i}function Zf(e,r,t,n,i){for(var a=e.children,o,l=-1,s=a.length,u=e.value&&(i-t)/e.value;++l<s;)o=a[l],o.x0=r,o.x1=n,o.y0=t,o.y1=t+=o.value*u}var YF=(1+Math.sqrt(5))/2;function VF(e,r,t,n,i,a){for(var o=[],l=r.children,s,u,c=0,f=0,h=l.length,v,d,p=r.value,y,g,m,x,w,C,M;c<h;){v=i-t,d=a-n;do y=l[f++].value;while(!y&&f<h);for(g=m=y,C=Math.max(d/v,v/d)/(p*e),M=y*y*C,w=Math.max(m/M,M/g);f<h;++f){if(y+=u=l[f].value,u<g&&(g=u),u>m&&(m=u),M=y*y*C,x=Math.max(m/M,M/g),x>w){y-=u;break}w=x}o.push(s={value:y,dice:v<d,children:l.slice(c,f)}),s.dice?_s(s,t,n,i,p?n+=d*y/p:a):Zf(s,t,n,p?t+=v*y/p:i,a),p-=y,c=f}return o}const _F=function e(r){function t(n,i,a,o,l){VF(r,n,i,a,o,l)}return t.ratio=function(n){return e((n=+n)>1?n:1)},t}(YF);function $F(){var e=_F,r=!1,t=1,n=1,i=[0],a=Ra,o=Ra,l=Ra,s=Ra,u=Ra;function c(h){return h.x0=h.y0=0,h.x1=t,h.y1=n,h.eachBefore(f),i=[0],r&&h.eachBefore(RF),h}function f(h){var v=i[h.depth],d=h.x0+v,p=h.y0+v,y=h.x1-v,g=h.y1-v;y<d&&(d=y=(d+y)/2),g<p&&(p=g=(p+g)/2),h.x0=d,h.y0=p,h.x1=y,h.y1=g,h.children&&(v=i[h.depth+1]=a(h)/2,d+=u(h)-v,p+=o(h)-v,y-=l(h)-v,g-=s(h)-v,y<d&&(d=y=(d+y)/2),g<p&&(p=g=(p+g)/2),e(h,d,p,y,g))}return c.round=function(h){return arguments.length?(r=!!h,c):r},c.size=function(h){return arguments.length?(t=+h[0],n=+h[1],c):[t,n]},c.tile=function(h){return arguments.length?(e=Uf(h),c):e},c.padding=function(h){return arguments.length?c.paddingInner(h).paddingOuter(h):c.paddingInner()},c.paddingInner=function(h){return arguments.length?(a=typeof h=="function"?h:qo(+h),c):a},c.paddingOuter=function(h){return arguments.length?c.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):c.paddingTop()},c.paddingTop=function(h){return arguments.length?(o=typeof h=="function"?h:qo(+h),c):o},c.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:qo(+h),c):l},c.paddingBottom=function(h){return arguments.length?(s=typeof h=="function"?h:qo(+h),c):s},c.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:qo(+h),c):u},c}function rW(e,r,t,n,i){var a=e.children,o,l=a.length,s,u=new Array(l+1);for(u[0]=s=o=0;o<l;++o)u[o+1]=s+=a[o].value;c(0,l,e.value,r,t,n,i);function c(f,h,v,d,p,y,g){if(f>=h-1){var m=a[f];m.x0=d,m.y0=p,m.x1=y,m.y1=g;return}for(var x=u[f],w=v/2+x,C=f+1,M=h-1;C<M;){var A=C+M>>>1;u[A]<w?C=A+1:M=A}w-u[C-1]<u[C]-w&&f+1<C&&--C;var b=u[C]-x,T=v-b;if(y-d>g-p){var k=v?(d*T+y*b)/v:y;c(f,C,b,d,p,k,g),c(C,h,T,k,p,y,g)}else{var P=v?(p*T+g*b)/v:g;c(f,C,b,d,p,y,P),c(C,h,T,d,P,y,g)}}}function nW(e,r,t,n,i){(e.depth&1?Zf:_s)(e,r,t,n,i)}const iW=function e(r){function t(n,i,a,o,l){if((s=n._squarify)&&s.ratio===r)for(var s,u,c,f,h=-1,v,d=s.length,p=n.value;++h<d;){for(u=s[h],c=u.children,f=u.value=0,v=c.length;f<v;++f)u.value+=c[f].value;u.dice?_s(u,i,a,o,p?a+=(l-a)*u.value/p:l):Zf(u,i,a,p?i+=(o-i)*u.value/p:o,l),p-=u.value}else n._squarify=s=VF(r,n,i,a,o,l),s.ratio=r}return t.ratio=function(n){return e((n=+n)>1?n:1)},t}(YF),GF=Object.freeze(Object.defineProperty({__proto__:null,cluster:mH,hierarchy:jo,pack:OF,packEnclose:bF,packSiblings:GH,partition:NF,stratify:qH,tree:eW,treemap:$F,treemapBinary:rW,treemapDice:_s,treemapResquarify:iW,treemapSlice:Zf,treemapSliceDice:nW,treemapSquarify:_F},Symbol.toStringTag,{value:"Module"}));var HF="nodeIndex",WF="childNodeCount",Ng="nodeAncestor",zg="Invalid field: it must be a string!";function Yg(e,r){var t=e.field,n=e.fields;if(at(t))return t;if(G(t))return console.warn(zg),t[0];if(console.warn("".concat(zg," will try to get fields instead.")),at(n))return n;if(G(n)&&n.length)return n[0];if(r)return r;throw new TypeError(zg)}function Vg(e){var r=[];if(e&&e.each){var t,n;e.each(function(i){var a,o;i.parent!==t?(t=i.parent,n=0):n+=1;var l=de((((a=i.ancestors)===null||a===void 0?void 0:a.call(i))||[]).map(function(s){return r.find(function(u){return u.name===s.name})||s}),function(s){var u=s.depth;return u>0&&u<i.depth});i[Ng]=l,i[WF]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[HF]=n,r.push(i)})}else e&&e.eachNode&&e.eachNode(function(i){r.push(i)});return r}var aW={field:"value",as:["x","y","r"],sort:function(e,r){return r.value-e.value}};function oW(e,r){r=Tt({},aW,r);var t=r.as;if(!G(t)||t.length!==3)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');var n;try{n=Yg(r)}catch(u){console.warn(u)}var i=function(u){return OF().size(r.size).padding(r.padding)(jo(u).sum(function(c){return c[n]}).sort(r.sort))},a=i(e),o=t[0],l=t[1],s=t[2];return a.each(function(u){u[o]=u.x,u[l]=u.y,u[s]=u.r}),Vg(a)}function XF(e){var r=e.data,t=e.hierarchyConfig,n=e.rawFields,i=n===void 0?[]:n,a=e.enableDrillDown,o=oW(r,S(S({},t),{field:"value",as:["x","y","r"]})),l=[];return o.forEach(function(s){for(var u,c=s.data.name,f=S({},s);f.depth>1;)c="".concat((u=f.parent.data)===null||u===void 0?void 0:u.name," / ").concat(c),f=f.parent;if(a&&s.depth>2)return null;var h=D({},s.data,S(S(S({},bt(s.data,i)),{path:c}),s));h.ext=t,h[Ys]={hierarchyConfig:t,rawFields:i,enableDrillDown:a},l.push(h)}),l}function jF(e,r,t){var n=cg([e,r]),i=n[0],a=n[1],o=n[2],l=n[3],s=t.width,u=t.height,c=s-(l+a),f=u-(i+o),h=Math.min(c,f),v=(c-h)/2,d=(f-h)/2,p=i+d,y=a+v,g=o+d,m=l+v,x=[p,y,g,m],w=h<0?0:h;return{finalPadding:x,finalSize:w}}function lW(e){var r=e.chart,t=Math.min(r.viewBBox.width,r.viewBBox.height);return D({options:{size:function(n){var i=n.r;return i*t}}},e)}function sW(e){var r=e.options,t=e.chart,n=t.viewBBox,i=r.padding,a=r.appendPadding,o=r.drilldown,l=a;if(o!=null&&o.enabled){var s=Ef(t.appendPadding,E(o,["breadCrumb","position"]));l=cg([s,a])}var u=jF(i,l,n).finalPadding;return t.padding=u,t.appendPadding=0,e}function uW(e){var r=e.chart,t=e.options,n=r.padding,i=r.appendPadding,a=t.color,o=t.colorField,l=t.pointStyle,s=t.hierarchyConfig,u=t.sizeField,c=t.rawFields,f=c===void 0?[]:c,h=t.drilldown,v=XF({data:t.data,hierarchyConfig:s,enableDrillDown:h==null?void 0:h.enabled,rawFields:f});r.data(v);var d=r.viewBBox,p=jF(n,i,d).finalSize,y=function(g){var m=g.r;return m*p};return u&&(y=function(g){return g[u]*p}),gr(D({},e,{options:{xField:"x",yField:"y",seriesField:o,sizeField:u,rawFields:rt(rt([],oH,!0),f,!0),point:{color:a,style:l,shape:"circle",size:y}}})),e}function cW(e){return lt(Ut({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(e)}function fW(e){var r=e.chart,t=e.options,n=t.tooltip;if(n===!1)r.tooltip(!1);else{var i=n;E(n,"fields")||(i=D({},{customItems:function(a){return a.map(function(o){var l=E(r.getOptions(),"scales"),s=E(l,["name","formatter"],function(c){return c}),u=E(l,["value","formatter"],function(c){return c});return S(S({},o),{name:s(o.data.name),value:u(o.data.value)})})}},i)),r.tooltip(i)}return e}function hW(e){var r=e.chart;return r.axis(!1),e}function vW(e){var r=e.drilldown,t=e.interactions,n=t===void 0?[]:t;return r!=null&&r.enabled?D({},e,{interactions:rt(rt([],n,!0),[{type:"drill-down",cfg:{drillDownConfig:r,transformData:XF,enableDrillDown:!0}}],!1)}):e}function dW(e){var r=e.chart,t=e.options;return Yt({chart:r,options:vW(t)}),e}function pW(e){return lt(pr("pointStyle"),lW,sW,wt,cW,uW,hW,Yo,fW,dW,It,_t())(e)}function UF(e){var r=E(e,["event","data","data"],{});return G(r.children)&&r.children.length>0}function qF(e){var r=e.view.getCoordinate(),t=r.innerRadius;if(t){var n=e.event,i=n.x,a=n.y,o=r.center,l=o.x,s=o.y,u=r.getRadius()*t,c=Math.sqrt(Math.pow(l-i,2)+Math.pow(s-a,2));return c<u}return!1}et("drill-down-action",cH),ut("drill-down",{showEnable:[{trigger:"element:mouseenter",action:"cursor:pointer",isEnable:UF},{trigger:"element:mouseleave",action:"cursor:default"},{trigger:"element:mouseleave",action:"cursor:pointer",isEnable:qF}],start:[{trigger:"element:click",isEnable:UF,action:["drill-down-action:click"]},{trigger:"afterchangesize",action:["drill-down-action:resetPosition"]},{trigger:"click",isEnable:qF,action:["drill-down-action:back"]}]}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="circle-packing",t}return r.getDefaultOptions=function(){return lH},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return pW},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r}(ft);var yr="left-axes-view",mr="right-axes-view",ZF={nice:!0,label:{autoHide:!0,autoRotate:!1}},gW=S(S({},ZF),{position:"left"}),yW=S(S({},ZF),{position:"right",grid:null}),Zo;(function(e){e.Left="Left",e.Right="Right"})(Zo||(Zo={}));var Na;(function(e){e.Line="line",e.Column="column"})(Na||(Na={}));function _g(e){return E(e,"geometry")===Na.Line}function $g(e){return E(e,"geometry")===Na.Column}function QF(e,r,t){return $g(t)?D({},{geometry:Na.Column,label:t.label&&t.isRange?{content:function(n){var i;return(i=n[r])===null||i===void 0?void 0:i.join("-")}}:void 0},t):S({geometry:Na.Line},t)}function KF(e,r){var t=e[0],n=e[1];if(G(r)){var i=r[0],a=r[1];return[i,a]}var o=E(r,t),l=E(r,n);return[o,l]}function JF(e,r){return r===Zo.Left?e===!1?!1:D({},gW,e):r===Zo.Right?e===!1?!1:D({},yW,e):e}function mW(e){var r=e.options,t=e.chart,n=r.geometryOption,i=n.isStack,a=n.color,o=n.seriesField,l=n.groupField,s=n.isGroup,u=["xField","yField"];if(_g(n)){_o(D({},e,{options:S(S(S({},bt(r,u)),n),{line:{color:n.color,style:n.lineStyle}})})),gr(D({},e,{options:S(S(S({},bt(r,u)),n),{point:n.point&&S({color:a,shape:"circle"},n.point)})}));var c=[];s&&c.push({type:"dodge",dodgeBy:l||o,customOffset:0}),i&&c.push({type:"stack"}),c.length&&F(t.geometries,function(f){f.adjust(c)})}return $g(n)&&Vf(D({},e,{options:S(S(S({},bt(r,u)),n),{widthRatio:n.columnWidthRatio,interval:S(S({},bt(n,["color"])),{style:n.columnStyle})})})),e}function tb(e){var r=e.view,t=e.geometryOption,n=e.yField,i=e.legend,a=E(i,"marker"),o=Ae(r,_g(t)?"line":"interval");if(!t.seriesField){var l=E(r,"options.scales.".concat(n,".alias"))||n,s=o.getAttribute("color"),u=r.getTheme().defaultColor;s&&(u=Je.getMappingValue(s,l,E(s,["values",0],u)));var c=(Q(a)?a:!We(a)&&D({},{style:{stroke:u,fill:u}},a))||(_g(t)?{symbol:function(h,v,d){return[["M",h-d,v],["L",h+d,v]]},style:{lineWidth:2,r:6,stroke:u}}:{symbol:"square",style:{fill:u}});return[{value:n,name:l,marker:c,isGeometry:!0,viewId:r.id}]}var f=o.getGroupAttributes();return Pe(f,function(h,v){var d=Je.getLegendItems(r,o,v,r.getTheme(),a);return h.concat(d)},[])}var eb=function(e,r){var t=r[0],n=r[1],i=e.getOptions().data,a=e.getXScale(),o=ue(i);if(!(!a||!o)){var l=Hr(i,a.field),s=l,u=ue(s),c=Math.floor(t*(u-1)),f=Math.floor(n*(u-1));e.filter(a.field,function(h){var v=s.indexOf(h);return v>-1?GV(v,c,f):!0}),e.getRootView().render(!0)}};function xW(e){var r,t=e.options,n=t.geometryOptions,i=n===void 0?[]:n,a=t.xField,o=t.yField,l=Bv(i,function(s){var u=s.geometry;return u===Na.Line||u===void 0});return D({},{options:{geometryOptions:[],meta:(r={},r[a]={type:"cat",sync:!0,range:l?[0,1]:void 0},r),tooltip:{showMarkers:l,showCrosshairs:l,shared:!0,crosshairs:{type:"x"}},interactions:l?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},e,{options:{yAxis:KF(o,t.yAxis),geometryOptions:[QF(a,o[0],i[0]),QF(a,o[1],i[1])],annotations:KF(o,t.annotations)}})}function wW(e){var r,t,n=e.chart,i=e.options,a=i.geometryOptions,o={line:0,column:1},l=[{type:(r=a[0])===null||r===void 0?void 0:r.geometry,id:yr},{type:(t=a[1])===null||t===void 0?void 0:t.geometry,id:mr}];return l.sort(function(s,u){return-o[s.type]+o[u.type]}).forEach(function(s){return n.createView({id:s.id})}),e}function SW(e){var r=e.chart,t=e.options,n=t.xField,i=t.yField,a=t.geometryOptions,o=t.data,l=t.tooltip,s=[S(S({},a[0]),{id:yr,data:o[0],yField:i[0]}),S(S({},a[1]),{id:mr,data:o[1],yField:i[1]})];return s.forEach(function(u){var c=u.id,f=u.data,h=u.yField,v=$g(u)&&u.isPercent,d=v?sA(f,h,n,h):f,p=vt(r,c).data(d),y=v?S({formatter:function(g){return{name:g[u.seriesField]||h,value:(Number(g[h])*100).toFixed(2)+"%"}}},l):l;mW({chart:p,options:{xField:n,yField:h,tooltip:y,geometryOption:u}})}),e}function CW(e){var r,t=e.chart,n=e.options,i=n.geometryOptions,a=((r=t.getTheme())===null||r===void 0?void 0:r.colors10)||[],o=0;return t.once("beforepaint",function(){F(i,function(l,s){var u=vt(t,s===0?yr:mr);if(!l.color){var c=u.getGroupScales(),f=E(c,[0,"values","length"],1),h=a.slice(o,o+f).concat(s===0?[]:a);u.geometries.forEach(function(v){l.seriesField?v.color(l.seriesField,h):v.color(h[0])}),o+=f}}),t.render(!0)}),e}function MW(e){var r,t,n=e.chart,i=e.options,a=i.xAxis,o=i.yAxis,l=i.xField,s=i.yField;return Ut((r={},r[l]=a,r[s[0]]=o[0],r))(D({},e,{chart:vt(n,yr)})),Ut((t={},t[l]=a,t[s[1]]=o[1],t))(D({},e,{chart:vt(n,mr)})),e}function AW(e){var r=e.chart,t=e.options,n=vt(r,yr),i=vt(r,mr),a=t.xField,o=t.yField,l=t.xAxis,s=t.yAxis;return r.axis(a,!1),r.axis(o[0],!1),r.axis(o[1],!1),n.axis(a,l),n.axis(o[0],JF(s[0],Zo.Left)),i.axis(a,!1),i.axis(o[1],JF(s[1],Zo.Right)),e}function FW(e){var r=e.chart,t=e.options,n=t.tooltip,i=vt(r,yr),a=vt(r,mr);return r.tooltip(n),i.tooltip({shared:!0}),a.tooltip({shared:!0}),e}function bW(e){var r=e.chart;return Yt(D({},e,{chart:vt(r,yr)})),Yt(D({},e,{chart:vt(r,mr)})),e}function EW(e){var r=e.chart,t=e.options,n=t.annotations,i=E(n,[0]),a=E(n,[1]);return _t(i)(D({},e,{chart:vt(r,yr),options:{annotations:i}})),_t(a)(D({},e,{chart:vt(r,mr),options:{annotations:a}})),e}function kW(e){var r=e.chart;return wt(D({},e,{chart:vt(r,yr)})),wt(D({},e,{chart:vt(r,mr)})),wt(e),e}function TW(e){var r=e.chart;return It(D({},e,{chart:vt(r,yr)})),It(D({},e,{chart:vt(r,mr)})),e}function IW(e){var r=e.chart,t=e.options,n=t.yAxis;return Ta(D({},e,{chart:vt(r,yr),options:{yAxis:n[0]}})),Ta(D({},e,{chart:vt(r,mr),options:{yAxis:n[1]}})),e}function PW(e){var r=e.chart,t=e.options,n=t.legend,i=t.geometryOptions,a=t.yField,o=t.data,l=vt(r,yr),s=vt(r,mr);if(n===!1)r.legend(!1);else if(At(n)&&n.custom===!0)r.legend(n);else{var u=E(i,[0,"legend"],n),c=E(i,[1,"legend"],n);r.once("beforepaint",function(){var f=o[0].length?tb({view:l,geometryOption:i[0],yField:a[0],legend:u}):[],h=o[1].length?tb({view:s,geometryOption:i[1],yField:a[1],legend:c}):[];r.legend(D({},n,{custom:!0,items:f.concat(h)}))}),i[0].seriesField&&l.legend(i[0].seriesField,u),i[1].seriesField&&s.legend(i[1].seriesField,c),r.on("legend-item:click",function(f){var h=E(f,"gEvent.delegateObject",{});if(h&&h.item){var v=h.item,d=v.value,p=v.isGeometry,y=v.viewId;if(p){var g=Y0(a,function(w){return w===d});if(g>-1){var m=E(vt(r,y),"geometries");F(m,function(w){w.changeVisible(!h.item.unchecked)})}}else{var x=E(r.getController("legend"),"option.items",[]);F(r.views,function(w){var C=w.getGroupScales();F(C,function(M){M.values&&M.values.indexOf(d)>-1&&w.filter(M.field,function(A){var b=Gr(x,function(T){return T.value===A});return!b.unchecked})}),r.render(!0)})}}})}return e}function LW(e){var r=e.chart,t=e.options,n=t.slider,i=vt(r,yr),a=vt(r,mr);return n&&(i.option("slider",n),i.on("slider:valuechanged",function(o){var l=o.event,s=l.value,u=l.originValue;Gt(s,u)||eb(a,s)}),r.once("afterpaint",function(){if(!fo(n)){var o=n.start,l=n.end;(o||l)&&eb(a,[o,l])}})),e}function OW(e){return lt(xW,wW,kW,SW,MW,AW,IW,FW,bW,EW,TW,CW,PW,LW)(e)}var DW=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="dual-axes",t}return r.prototype.getDefaultOptions=function(){return D({},e.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},r.prototype.getSchemaAdaptor=function(){return OW},r}(ft);function BW(e,r){var t=r.data,n=r.coordinate,i=r.interactions,a=r.annotations,o=r.animation,l=r.tooltip,s=r.axes,u=r.meta,c=r.geometries;t&&e.data(t);var f={};s&&F(s,function(h,v){f[v]=bt(h,er)}),f=D({},u,f),e.scale(f),n&&e.coordinate(n),s===!1?e.axis(!1):F(s,function(h,v){e.axis(v,h)}),F(c,function(h){var v=rr({chart:e,options:h}).ext,d=h.adjust;d&&v.geometry.adjust(d)}),F(i,function(h){h.enable===!1?e.removeInteraction(h.type):e.interaction(h.type,h.cfg)}),F(a,function(h){e.annotation()[h.type](S({},h))}),Ts(e,o),l?(e.interaction("tooltip"),e.tooltip(l)):l===!1&&e.removeInteraction("tooltip")}function RW(e){var r=e.chart,t=e.options,n=t.type,i=t.data,a=t.fields,o=t.eachView,l=Wu(t,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return r.data(i),r.facet(n,S(S({},l),{fields:a,eachView:function(s,u){var c=o(s,u);if(c.geometries)BW(s,c);else{var f=c,h=f.options;h.tooltip&&s.interaction("tooltip"),Pg(f.type,s,h)}}})),e}function NW(e){var r=e.chart,t=e.options,n=t.axes,i=t.meta,a=t.tooltip,o=t.coordinate,l=t.theme,s=t.legend,u=t.interactions,c=t.annotations,f={};return n&&F(n,function(h,v){f[v]=bt(h,er)}),f=D({},i,f),r.scale(f),r.coordinate(o),n?F(n,function(h,v){r.axis(v,h)}):r.axis(!1),a?(r.interaction("tooltip"),r.tooltip(a)):a===!1&&r.removeInteraction("tooltip"),r.legend(s),l&&r.theme(l),F(u,function(h){h.enable===!1?r.removeInteraction(h.type):r.interaction(h.type,h.cfg)}),F(c,function(h){r.annotation()[h.type](S({},h))}),e}function zW(e){return lt(wt,RW,NW)(e)}var YW={title:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},rowTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},columnTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}}};(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return YW},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return zW},r})(ft);function VW(e){var r=e.chart,t=e.options,n=t.data,i=t.type,a=t.xField,o=t.yField,l=t.colorField,s=t.sizeField,u=t.sizeRatio,c=t.shape,f=t.color,h=t.tooltip,v=t.heatmapStyle,d=t.meta;r.data(n);var p="polygon";i==="density"&&(p="heatmap");var y=Lr(h,[a,o,l]),g=y.fields,m=y.formatter,x=1;return(u||u===0)&&(!c&&!s?console.warn("sizeRatio is not in effect: Must define shape or sizeField first"):u<0||u>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):x=u),rr(D({},e,{options:{type:p,colorField:l,tooltipFields:g,shapeField:s||"",label:void 0,mapping:{tooltip:m,shape:c&&(s?function(w){var C=n.map(function(T){return T[s]}),M=(d==null?void 0:d[s])||{},A=M.min,b=M.max;return A=st(A)?A:Math.min.apply(Math,C),b=st(b)?b:Math.max.apply(Math,C),[c,(E(w,s)-A)/(b-A),x]}:function(){return[c,1,x]}),color:f||l&&r.getTheme().sequenceColors.join("-"),style:v}}})),e}function _W(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return lt(Ut((r={},r[a]=n,r[o]=i,r)))(e)}function $W(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(o,!1):r.axis(o,i),e}function GW(e){var r=e.chart,t=e.options,n=t.legend,i=t.colorField,a=t.sizeField,o=t.sizeLegend,l=n!==!1;return i&&r.legend(i,l?n:!1),a&&r.legend(a,o===void 0?n:o),!l&&!o&&r.legend(!1),e}function HW(e){var r=e.chart,t=e.options,n=t.label,i=t.colorField,a=t.type,o=Ae(r,a==="density"?"heatmap":"polygon");if(!n)o.label(!1);else if(i){var l=n.callback,s=kt(n,["callback"]);o.label({fields:[i],callback:l,cfg:fe(s)})}return e}function WW(e){var r,t,n=e.chart,i=e.options,a=i.coordinate,o=i.reflect,l=D({actions:[]},a!=null?a:{type:"rect"});return o&&((t=(r=l.actions)===null||r===void 0?void 0:r.push)===null||t===void 0||t.call(r,["reflect",o])),n.coordinate(l),e}function XW(e){return lt(wt,pr("heatmapStyle"),_W,WW,VW,$W,GW,le,HW,_t(),Yt,It,Ii)(e)}var jW=D({},ft.getDefaultOptions(),{type:"polygon",legend:!1,coordinate:{type:"rect"},xAxis:{tickLine:null,line:null,grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}},yAxis:{grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}}});Mt("polygon","circle",{draw:function(e,r){var t,n,i=e.x,a=e.y,o=this.parsePoints(e.points),l=Math.abs(o[2].x-o[1].x),s=Math.abs(o[1].y-o[0].y),u=Math.min(l,s)/2,c=Number(e.shape[1]),f=Number(e.shape[2]),h=Math.sqrt(f),v=u*h*Math.sqrt(c),d=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((n=e.defaultStyle)===null||n===void 0?void 0:n.fill),p=r.addShape("circle",{attrs:S(S(S({x:i,y:a,r:v},e.defaultStyle),e.style),{fill:d})});return p}}),Mt("polygon","square",{draw:function(e,r){var t,n,i=e.x,a=e.y,o=this.parsePoints(e.points),l=Math.abs(o[2].x-o[1].x),s=Math.abs(o[1].y-o[0].y),u=Math.min(l,s),c=Number(e.shape[1]),f=Number(e.shape[2]),h=Math.sqrt(f),v=u*h*Math.sqrt(c),d=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((n=e.defaultStyle)===null||n===void 0?void 0:n.fill),p=r.addShape("rect",{attrs:S(S(S({x:i-v/2,y:a-v/2,width:v,height:v},e.defaultStyle),e.style),{fill:d})});return p}}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t}return r.getDefaultOptions=function(){return jW},r.prototype.getSchemaAdaptor=function(){return XW},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(ft);var UW="liquid";function rb(e){return[{percent:e,type:UW}]}function qW(e){var r=e.chart,t=e.options,n=t.percent,i=t.liquidStyle,a=t.radius,o=t.outline,l=t.wave,s=t.shape,u=t.shapeStyle,c=t.animation;r.scale({percent:{min:0,max:1}}),r.data(rb(n));var f=t.color||r.getTheme().defaultColor,h=D({},e,{options:{xField:"type",yField:"percent",widthRatio:a,interval:{color:f,style:i,shape:"liquid-fill-gauge"}}}),v=Fe(h).ext,d=v.geometry,p=r.getTheme().background,y={percent:n,radius:a,outline:o,wave:l,shape:s,shapeStyle:u,background:p,animation:c};return d.customInfo(y),r.legend(!1),r.axis(!1),r.tooltip(!1),e}function nb(e,r){var t=e.chart,n=e.options,i=n.statistic,a=n.percent,o=n.meta;t.getController("annotation").clear(!0);var l=E(o,["percent","formatter"])||function(u){return"".concat((u*100).toFixed(2),"%")},s=i.content;return s&&(s=D({},s,{content:Y(s.content)?l(a):s.content})),kf(t,{statistic:S(S({},i),{content:s}),plotType:"liquid"},{percent:a}),r&&t.render(!0),e}function ZW(e){return lt(wt,pr("liquidStyle"),qW,nb,Ut({}),It,Yt)(e)}var QW={radius:.9,statistic:{title:!1,content:{style:{opacity:.75,fontSize:"30px",lineHeight:"30px",textAlign:"center"}}},outline:{border:2,distance:0},wave:{count:3,length:192},shape:"circle"},ib=5e3;function ab(e,r,t){return e+(r-e)*t}function KW(e){var r=S({opacity:1},e.style);return e.color&&!r.fill&&(r.fill=e.color),r}function JW(e){var r={fill:"#fff",fillOpacity:0,lineWidth:4},t=Tt({},r,e.style);return e.color&&!t.stroke&&(t.stroke=e.color),st(e.opacity)&&(t.opacity=t.strokeOpacity=e.opacity),t}function t6(e,r,t,n){return r===0?[[e+1/2*t/Math.PI/2,n/2],[e+1/2*t/Math.PI,n],[e+t/4,n]]:r===1?[[e+1/2*t/Math.PI/2*(Math.PI-2),n],[e+1/2*t/Math.PI/2*(Math.PI-1),n/2],[e+t/4,0]]:r===2?[[e+1/2*t/Math.PI/2,-n/2],[e+1/2*t/Math.PI,-n],[e+t/4,-n]]:[[e+1/2*t/Math.PI/2*(Math.PI-2),-n],[e+1/2*t/Math.PI/2*(Math.PI-1),-n/2],[e+t/4,0]]}function e6(e,r,t,n,i,a,o){for(var l=Math.ceil(2*e/t*4)*4,s=[],u=n;u<-Math.PI*2;)u+=Math.PI*2;for(;u>0;)u-=Math.PI*2;u=u/Math.PI/2*t;var c=a-e+u-e*2;s.push(["M",c,r]);for(var f=0,h=0;h<l;++h){var v=h%4,d=t6(h*t/4,v,t,i);s.push(["C",d[0][0]+c,-d[0][1]+r,d[1][0]+c,-d[1][1]+r,d[2][0]+c,-d[2][1]+r]),h===l-1&&(f=d[2][0])}return s.push(["L",f+c,o+e]),s.push(["L",c,o+e]),s.push(["Z"]),s}function r6(e,r,t,n,i,a,o,l,s,u){for(var c=i.fill,f=i.opacity,h=o.getBBox(),v=h.maxX-h.minX,d=h.maxY-h.minY,p=0;p<n;p++){var y=n<=1?1:p/(n-1),g=a.addShape("path",{name:"waterwave-path",attrs:{path:e6(l,h.minY+d*t,s,0,v/32,e,r),fill:c,opacity:ab(.2,.9,y)*f}});try{if(u===!1)return;var m=kg([["t",s,0]]);g.stopAnimate(),g.animate({matrix:m},{duration:ab(.5*ib,ib,y),repeat:!0})}catch(x){console.warn("off-screen group animate error!")}}}function n6(e,r,t,n){var i=t*2/3,a=Math.max(i,n),o=i/2,l=e,s=o+r-a/2,u=Math.asin(o/((a-o)*.85)),c=Math.sin(u)*o,f=Math.cos(u)*o,h=l-f,v=s+c,d=e,p=s+o/Math.sin(u);return`
|
|
76
|
+
`),s=fg(a,o),u=s.getContext("2d");hg(u,r,a,o),JV(u,r,l);var c=u.createPattern(s,"repeat");if(c){var f=Tf(),h=vg(f,n);c.setTransform(h)}return c}var e4={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function r4(e,r,t,n){var i=r.stroke,a=r.size,o=r.fill,l=r.lineWidth,s=r.fillOpacity;e.globalAlpha=s,e.strokeStyle=i,e.lineWidth=l,e.fillStyle=o,e.strokeRect(t-a/2,n-a/2,a,a),e.fillRect(t-a/2,n-a/2,a,a)}function n4(e){var r=B({},e4,e),t=r.size,n=r.padding,i=r.isStagger,a=r.rotation,o=KM(t,n,i),l=JM(o,i),s=fg(o,o),u=s.getContext("2d");hg(u,r,o);for(var c=0,f=l;c<f.length;c++){var h=f[c],v=h[0],d=h[1];r4(u,r,v,d)}var p=u.createPattern(s,"repeat");if(p){var y=Tf(),g=vg(y,a);p.setTransform(g)}return p}function i4(e){var r=e.type,t=e.cfg,n;switch(r){case"dot":n=QV(t);break;case"line":n=t4(t);break;case"square":n=n4(t);break}return n}function pr(e){var r=this;return function(t){var n,i=t.options,a=t.chart,o=i.pattern;if(!o)return t;var l=function(s){for(var u,c,f,h=[],v=1;v<arguments.length;v++)h[v-1]=arguments[v];var d=a.getTheme().defaultColor,p=d,y=(c=(u=a.geometries)===null||u===void 0?void 0:u[0])===null||c===void 0?void 0:c.getAttribute("color");if(y){var g=y.getFields()[0],m=E(s,g);p=Je.getMappingValue(y,m,((f=y.values)===null||f===void 0?void 0:f[0])||d)}var x=o;typeof o=="function"&&(x=o.call(r,s,p)),x instanceof CanvasPattern||(x=i4(B({},{cfg:{backgroundColor:p}},x)));var w=i[e];return S(S({},typeof w=="function"?w.call.apply(w,rt([r,s],h,!1)):w||{}),{fill:x||p})};return B({},t,{options:(n={},n[e]=l,n)})}}function Yo(e){var r=e.chart,t=e.options,n=t.legend,i=t.colorField,a=t.seriesField;return n===!1?r.legend(!1):(i||a)&&r.legend(i||a,n),e}function le(e){var r=e.chart,t=e.options,n=t.tooltip;return n!==void 0&&r.tooltip(n),e}function Yt(e){var r=e.chart,t=e.options,n=t.interactions;return F(n,function(i){i.enable===!1?r.removeInteraction(i.type):r.interaction(i.type,i.cfg||{})}),e}function It(e){var r=e.chart,t=e.options,n=t.animation;return Ts(r,n),e}function wt(e){var r=e.chart,t=e.options,n=t.theme;return n&&r.theme(n),e}function Ii(e){var r=e.chart,t=e.options,n=t.state;return n&&F(r.geometries,function(i){i.state(n)}),e}function Is(e){var r=e.chart,t=e.options,n=t.slider;return r.option("slider",n),e}function dg(e){var r=e.chart,t=e.options,n=t.scrollbar;return r.option("scrollbar",n),e}function Ut(e,r){return function(t){var n=t.chart,i=t.options,a={};return F(e,function(o,l){a[l]=bt(o,er)}),a=B({},r,i.meta,a),n.scale(a),t}}function _t(e){return function(r){var t=r.chart,n=r.options,i=t.getController("annotation");return F(rt(rt([],n.annotations||[],!0),e||[],!0),function(a){i.annotation(a)}),r}}function Ta(e){var r=e.chart,t=e.options,n=t.yAxis,i=t.limitInPlot,a=i;return At(n)&&Y(i)&&(Object.values(bt(n,["min","max","minLimit","maxLimit"])).some(function(o){return!Y(o)})?a=!0:a=!1),r.limitInPlot=a,e}function tA(e){return e===void 0&&(e="rect"),function(r){var t=r.chart,n=r.options,i=n.coordinate,a=Array.from(i||[]).map(function(o){return o.type==="reflectX"?["reflect","x"]:o.type==="reflectY"?["reflect","y"]:o.type==="transpose"?["transpose"]:null}).filter(function(o){return!!o});return a.length!==0&&t.coordinate({type:e,actions:a}),r}}var a4={locale:"en-US"},If={};function eA(e,r){If[e]=r}function Pf(e){return{get:function(r,t){return ZM(E(If[e],r)||E(If[a4.locale],r)||E(If["en-US"],r)||r,t)}}}var o4={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}},l4={locale:"zh-CN",general:{increase:"增加",decrease:"减少",root:"初始"},statistic:{total:"总计"},conversionTag:{label:"转化率"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"总计"}};function Lr(e,r){if(e===!1)return{fields:!1};var t=E(e,"fields"),n=E(e,"formatter");return n&&!t&&(t=r),{fields:t,formatter:n}}function Lf(e,r){var t=e.type,n=e.xField,i=e.yField,a=e.colorField,o=e.shapeField,l=e.sizeField,s=e.styleField,u=e.rawFields,c=[];if(u=(Q(u)?u(t,r):u)||[],r==="color")c=rt([a||n],u,!0);else if(r==="shape")c=rt([o||n],u,!0);else if(r==="size")c=rt([l||n],u,!0);else{c=rt([n,i,a,o,l,s],u,!0);var f=["x","y","color","shape","size","style"].indexOf(r),h=c[f];c.splice(f,1),c.unshift(h)}var v=oa(c.filter(function(p){return!!p})),d=t==="line"&&[n,i].includes(v.join("*"))?"":v.join("*");return{mappingFields:v,tileMappingField:d}}function Vo(e,r){if(r)return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i={};return e.forEach(function(a,o){i[a]=t[o]}),delete i.undefined,r(i)}}function rr(e){var r=e.chart,t=e.options,n=t.type,i=t.args,a=t.mapping,o=t.xField,l=t.yField,s=t.colorField,u=t.shapeField,c=t.sizeField,f=t.tooltipFields,h=t.label,v=t.state,d=t.customInfo;if(!a)return e;var p=a.color,y=a.shape,g=a.size,m=a.style,x=a.tooltip,w=r[n](i).position("".concat(o,"*").concat(l));if(at(p))s?w.color(s,p):w.color(p);else if(Q(p)){var C=Lf(t,"color"),M=C.mappingFields,A=C.tileMappingField;w.color(A,Vo(M,p))}else s&&w.color(s,p);if(at(y))u?w.shape(u,[y]):w.shape(y);else if(Q(y)){var b=Lf(t,"shape"),M=b.mappingFields,A=b.tileMappingField;w.shape(A,Vo(M,y))}else u&&w.shape(u,y);if(st(g))c?w.size(c,g):w.size(g);else if(Q(g)){var T=Lf(t,"size"),M=T.mappingFields,A=T.tileMappingField;w.size(A,Vo(M,g))}else c&&w.size(c,g);if(Q(m)){var k=Lf(t,"style"),M=k.mappingFields,A=k.tileMappingField;w.style(A,Vo(M,m))}else At(m)&&w.style(m);if(f===!1?w.tooltip(!1):We(f)||w.tooltip(f.join("*"),Vo(f,x)),h===!1)w.label(!1);else if(h){var P=h.callback,O=h.fields,V=kt(h,["callback","fields"]);w.label({fields:O||[l],callback:P,cfg:fe(V)})}return v&&w.state(v),d&&w.customInfo(d),[o,l].filter(function(W){return W!==s}).forEach(function(W){r.legend(W,!1)}),S(S({},e),{ext:{geometry:w}})}function Of(e){var r=e.options,t=r.area,n=r.xField,i=r.yField,a=r.seriesField,o=r.smooth,l=r.tooltip,s=r.useDeferredLabel,u=Lr(l,[n,i,a]),c=u.fields,f=u.formatter;return t?rr(B({},e,{options:{type:"area",colorField:a,tooltipFields:c,mapping:Z({shape:o?"smooth":"area",tooltip:f},t),args:{useDeferredLabel:s}}})):e}function rA(e){var r=e.options,t=r.edge,n=r.xField,i=r.yField,a=r.seriesField,o=r.tooltip,l=r.useDeferredLabel,s=Lr(o,[n,i,a]),u=s.fields,c=s.formatter;return t?rr(B({},e,{options:{type:"edge",colorField:a,tooltipFields:u,mapping:S({tooltip:c},t),args:{useDeferredLabel:l}}})):e}function s4(e){var r=e.chart,t=e.options,n=e.ext,i=t.seriesField,a=t.isGroup,o=t.isStack,l=t.marginRatio,s=t.widthRatio,u=t.groupField,c=t.theme,f=[];if(i&&(a&&f.push({type:"dodge",dodgeBy:u||i,marginRatio:l}),o&&f.push({type:"stack",marginRatio:l})),f.length&&(n!=null&&n.geometry)){var h=n==null?void 0:n.geometry;h.adjust(f)}return Y(s)||r.theme(B({},At(c)?c:ps(c),{columnWidthRatio:s})),e}function Fe(e){var r=e.options,t=r.xField,n=r.yField,i=r.interval,a=r.seriesField,o=r.tooltip,l=r.minColumnWidth,s=r.maxColumnWidth,u=r.columnBackground,c=r.dodgePadding,f=r.intervalPadding,h=r.useDeferredLabel,v=Lr(o,[t,n,a]),d=v.fields,p=v.formatter,y=(i?rr(B({},e,{options:{type:"interval",colorField:a,tooltipFields:d,mapping:S({tooltip:p},i),args:{dodgePadding:c,intervalPadding:f,minColumnWidth:l,maxColumnWidth:s,background:u,useDeferredLabel:h}}})):e).ext;return s4(S(S({},e),{ext:y}))}function _o(e){var r=e.options,t=r.line,n=r.stepType,i=r.xField,a=r.yField,o=r.seriesField,l=r.smooth,s=r.connectNulls,u=r.tooltip,c=r.useDeferredLabel,f=Lr(u,[i,a,o]),h=f.fields,v=f.formatter;return t?rr(B({},e,{options:{type:"line",colorField:o,tooltipFields:h,mapping:Z({shape:n||(l?"smooth":"line"),tooltip:v},t),args:{connectNulls:s,useDeferredLabel:c}}})):e}function gr(e){var r=e.options,t=r.point,n=r.xField,i=r.yField,a=r.seriesField,o=r.sizeField,l=r.shapeField,s=r.tooltip,u=r.useDeferredLabel,c=Lr(s,[n,i,a,o,l]),f=c.fields,h=c.formatter;return t?rr(B({},e,{options:{type:"point",colorField:a,shapeField:l,tooltipFields:f,mapping:S({tooltip:h},t),args:{useDeferredLabel:u}}})):e}function Df(e){var r=e.options,t=r.polygon,n=r.xField,i=r.yField,a=r.seriesField,o=r.tooltip,l=r.useDeferredLabel,s=Lr(o,[n,i,a]),u=s.fields,c=s.formatter;return t?rr(B({},e,{options:{type:"polygon",colorField:a,tooltipFields:u,mapping:S({tooltip:c},t),args:{useDeferredLabel:l}}})):e}function pg(e){var r=e.options,t=r.schema,n=r.xField,i=r.yField,a=r.seriesField,o=r.tooltip,l=r.useDeferredLabel,s=Lr(o,[n,i,a]),u=s.fields,c=s.formatter;return t?rr(B({},e,{options:{type:"schema",colorField:a,tooltipFields:u,mapping:S({tooltip:c},t),args:{useDeferredLabel:l}}})):e}function u4(e){var r=e.options,t=r.violin,n=r.xField,i=r.yField,a=r.seriesField,o=r.sizeField,l=r.tooltip,s=Lr(l,[n,i,a,o]),u=s.fields,c=s.formatter;return t?rr(B({},e,{options:{type:"violin",colorField:a,tooltipFields:u,mapping:S({tooltip:c},t)}})):e}var Ia={},Pi={},nA={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=1,t=function(){return"".concat(r++)};e.default=t})(nA);var Bf={},Rf={},gg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var o=this,l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];clearTimeout(a),a=setTimeout(function(){n.apply(o,s)},i)}};e.default=r})(gg);var mn={};Object.defineProperty(mn,"__esModule",{value:!0}),mn.SizeSensorId=mn.SensorTabIndex=mn.SensorClassName=void 0;var c4="size-sensor-id";mn.SizeSensorId=c4;var f4="size-sensor-object";mn.SensorClassName=f4;var h4="-1";mn.SensorTabIndex=h4,Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.createSensor=void 0;var v4=d4(gg),yg=mn;function d4(e){return e&&e.__esModule?e:{default:e}}var p4=function(r,t){var n=void 0,i=[],a=function(){getComputedStyle(r).position==="static"&&(r.style.position="relative");var f=document.createElement("object");return f.onload=function(){f.contentDocument.defaultView.addEventListener("resize",o),o()},f.style.display="block",f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.height="100%",f.style.width="100%",f.style.overflow="hidden",f.style.pointerEvents="none",f.style.zIndex="-1",f.style.opacity="0",f.setAttribute("class",yg.SensorClassName),f.setAttribute("tabindex",yg.SensorTabIndex),f.type="text/html",r.appendChild(f),f.data="about:blank",f},o=(0,v4.default)(function(){i.forEach(function(c){c(r)})}),l=function(f){n||(n=a()),i.indexOf(f)===-1&&i.push(f)},s=function(){n&&n.parentNode&&(n.contentDocument&&n.contentDocument.defaultView.removeEventListener("resize",o),n.parentNode.removeChild(n),r.removeAttribute(yg.SizeSensorId),n=void 0,i=[],t&&t())},u=function(f){var h=i.indexOf(f);h!==-1&&i.splice(h,1),i.length===0&&n&&s()};return{element:r,bind:l,destroy:s,unbind:u}};Rf.createSensor=p4;var Nf={};Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.createSensor=void 0;var g4=mn,y4=m4(gg);function m4(e){return e&&e.__esModule?e:{default:e}}var x4=function(r,t){var n=void 0,i=[],a=(0,y4.default)(function(){i.forEach(function(c){c(r)})}),o=function(){var f=new ResizeObserver(a);return f.observe(r),a(),f},l=function(f){n||(n=o()),i.indexOf(f)===-1&&i.push(f)},s=function(){n.disconnect(),i=[],n=void 0,r.removeAttribute(g4.SizeSensorId),t&&t()},u=function(f){var h=i.indexOf(f);h!==-1&&i.splice(h,1),i.length===0&&n&&s()};return{element:r,bind:l,destroy:s,unbind:u}};Nf.createSensor=x4,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.createSensor=void 0;var w4=Rf,S4=Nf,C4=typeof ResizeObserver!="undefined"?S4.createSensor:w4.createSensor;Bf.createSensor=C4,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.removeSensor=Pi.getSensor=Pi.Sensors=void 0;var M4=F4(nA),A4=Bf,mg=mn;function F4(e){return e&&e.__esModule?e:{default:e}}var $o={};Pi.Sensors=$o;function iA(e){e&&$o[e]&&delete $o[e]}var b4=function(r){var t=r.getAttribute(mg.SizeSensorId);if(t&&$o[t])return $o[t];var n=(0,M4.default)();r.setAttribute(mg.SizeSensorId,n);var i=(0,A4.createSensor)(r,function(){return iA(n)});return $o[n]=i,i};Pi.getSensor=b4;var E4=function(r){var t=r.element.getAttribute(mg.SizeSensorId);r.destroy(),iA(t)};Pi.removeSensor=E4,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.ver=Ia.clear=aA=Ia.bind=void 0;var xg=Pi,k4=function(r,t){var n=(0,xg.getSensor)(r);return n.bind(t),function(){n.unbind(t)}},aA=Ia.bind=k4,T4=function(r){var t=(0,xg.getSensor)(r);(0,xg.removeSensor)(t)};Ia.clear=T4;var I4="1.0.2";Ia.ver=I4;var oA="data-chart-source-type",lA=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"],ft=function(e){I(r,e);function r(t,n){var i=e.call(this)||this;return i.container=typeof t=="string"?document.getElementById(t):t,i.options=B({},i.getDefaultOptions(),n),i.createG2(),i.bindEvents(),i}return r.getDefaultOptions=function(){return{renderer:"canvas",xAxis:{nice:!0,label:{autoRotate:!1,autoHide:{type:"equidistance",cfg:{minGap:6}}}},yAxis:{nice:!0,label:{autoHide:!0,autoRotate:!1}},animation:!0}},r.prototype.createG2=function(){var t=this.options,n=t.width,i=t.height,a=t.defaultInteractions;this.chart=new uz(S(S(S(S({container:this.container,autoFit:!1},this.getChartSize(n,i)),{localRefresh:!1}),bt(this.options,lA)),{defaultInteractions:a})),this.container.setAttribute(oA,"G2Plot")},r.prototype.getChartSize=function(t,n){var i=sg(this.container);return{width:t||i.width||400,height:n||i.height||400}},r.prototype.bindEvents=function(){var t=this;this.chart&&this.chart.on("*",function(n){n!=null&&n.type&&t.emit(n.type,n)})},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){this.chart.clear(),this.chart.options={data:[],animate:!0},this.chart.views=[],this.execAdaptor(),this.chart.render(),this.bindSizeSensor()},r.prototype.update=function(t){this.updateOption(t),this.render()},r.prototype.updateOption=function(t){this.options=B({},this.options,t)},r.prototype.setState=function(t,n,i){i===void 0&&(i=!0);var a=Es(this.chart);F(a,function(o){n(o.getData())&&o.setState(t,i)})},r.prototype.getStates=function(){var t=Es(this.chart),n=[];return F(t,function(i){var a=i.getData(),o=i.getStates();F(o,function(l){n.push({data:a,state:l,geometry:i.geometry,element:i})})}),n},r.prototype.changeData=function(t){this.update({data:t})},r.prototype.changeSize=function(t,n){this.chart.changeSize(t,n)},r.prototype.addAnnotations=function(t,n){n=n||this.chart;var i=rt([],t,!0),a=n.getController("annotation"),o=a.getComponents().map(function(u){return u.extra});a.clear(!0);for(var l=function(u){var c=o[u],f=i.findIndex(function(h){return h.id&&h.id===c.id});f!==-1&&(c=B({},c,i[f]),i.splice(f,1)),a.annotation(c)},s=0;s<o.length;s++)l(s);i.forEach(function(u){return a.annotation(u)}),n.render(!0)},r.prototype.removeAnnotations=function(t){var n=this.chart.getController("annotation"),i=n.getComponents().map(function(l){return l.extra});n.clear(!0);for(var a=function(l){var s=i[l];t.find(function(u){return u.id&&u.id===s.id})||n.annotation(s)},o=0;o<i.length;o++)a(o);this.chart.render(!0)},r.prototype.destroy=function(){this.unbindSizeSensor(),this.chart.destroy(),this.off(),this.container.removeAttribute(oA)},r.prototype.execAdaptor=function(){var t=this.getSchemaAdaptor(),n=this.options,i=n.padding,a=n.appendPadding;this.chart.padding=i,this.chart.appendPadding=a,t({chart:this.chart,options:this.options})},r.prototype.triggerResize=function(){this.chart.forceFit()},r.prototype.bindSizeSensor=function(){var t=this;if(!this.unbind){var n=this.options.autoFit,i=n===void 0?!0:n;i&&(this.unbind=aA(this.container,function(){var a=sg(t.container),o=a.width,l=a.height;(o!==t.chart.width||l!==t.chart.height)&&t.triggerResize()}))}},r.prototype.unbindSizeSensor=function(){this.unbind&&(this.unbind(),this.unbind=void 0)},r}(Hv);function sA(e,r,t,n){var i=Pe(e,function(a,o){var l=o[t],s=a.has(l)?a.get(l):0,u=o[r];return s=ka(u)?s+u:s,a.set(l,s),a},new Map);return zt(e,function(a){var o,l=a[r],s=a[t],u=ka(l)&&i.get(s)!==0?l/i.get(s):0;return S(S({},a),(o={},o[n]=u,o))})}function P4(e,r,t,n){var i=Pe(e,function(a,o){var l=Pe(t,function(c,f){return"".concat(c).concat(o[f])},""),s=a.has(l)?a.get(l):0,u=o[r];return s=ka(u)?s+u:s,a.set(l,s),a},new Map);return zt(e,function(a){var o,l=a[r],s=Pe(t,function(c,f){return"".concat(c).concat(a[f])},""),u=ka(l)&&i.get(s)!==0?l/i.get(s):0;return S(S({},a),(o={},o[n]=u,o))})}function Ps(e,r,t,n,i){return i?sA(e,r,t,n):e}function L4(e){var r=e.chart,t=e.options,n=t.data,i=t.color,a=t.lineStyle,o=t.lineShape,l=t.point,s=t.area,u=t.seriesField,c=l==null?void 0:l.state,f=s==null?void 0:s.state;r.data(n);var h=B({},e,{options:{shapeField:u,line:{color:i,style:a,shape:o},point:l&&S({color:i,shape:"circle"},l),area:s&&S({color:i},s),label:void 0}}),v=B({},h,{options:{tooltip:!1,state:c}}),d=B({},h,{options:{tooltip:!1,state:f}});return _o(h),gr(v),Of(d),e}function zf(e){var r,t,n=e.options,i=n.xAxis,a=n.yAxis,o=n.xField,l=n.yField,s=n.data;return lt(Ut((r={},r[o]=i,r[l]=a,r),(t={},t[o]={type:"cat"},t[l]=lg(s,l),t)))(e)}function O4(e){var r=e.chart,t=e.options,n=t.reflect;if(n){var i=n;G(i)||(i=[i]);var a=i.map(function(o){return["reflect",o]});r.coordinate({type:"rect",actions:a})}return e}function uA(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(o,!1):r.axis(o,i),e}function cA(e){var r=e.chart,t=e.options,n=t.legend,i=t.seriesField;return n&&i?r.legend(i,n):n===!1&&r.legend(!1),e}function D4(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"line");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:S({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},fe(l))})}return e}function B4(e){var r=e.chart,t=e.options,n=t.isStack;return n&&F(r.geometries,function(i){i.adjust("stack")}),e}function fA(e){return lt(L4,zf,B4,wt,O4,uA,cA,le,D4,Is,dg,Yt,It,_t(),Ta)(e)}function R4(e){var r=e.chart,t=e.options,n=t.data,i=t.areaStyle,a=t.areaShape,o=t.color,l=t.point,s=t.line,u=t.isPercent,c=t.xField,f=t.yField,h=t.tooltip,v=t.seriesField,d=t.startOnZero,p=l==null?void 0:l.state,y=Ps(n,f,c,f,u);r.data(y);var g=u?S({formatter:function(C){return{name:C[v]||C[c],value:(Number(C[f])*100).toFixed(2)+"%"}}},h):h,m=B({},e,{options:{area:{color:o,style:i,shape:a},point:l&&S({color:o},l),tooltip:g,label:void 0,args:{startOnZero:d}}}),x={chart:r,options:B({line:{size:2}},Wu(t,["state"]),{line:s&&S({color:o},s),sizeField:v,state:s==null?void 0:s.state,tooltip:!1,label:void 0,args:{startOnZero:d}})},w=B({},m,{options:{tooltip:!1,state:p}});return Of(m),_o(x),gr(w),e}function N4(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"area");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:S({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},fe(l))})}return e}function z4(e){var r=e.chart,t=e.options,n=t.isStack,i=t.isPercent,a=t.seriesField;return(i||n)&&a&&F(r.geometries,function(o){o.adjust("stack")}),e}function hA(e){return lt(wt,pr("areaStyle"),tA("rect"),R4,zf,z4,uA,cA,le,N4,Is,_t(),Yt,It,Ta)(e)}var Y4=B({},ft.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},isStack:!0,line:{},legend:{position:"top-left",radio:{}}}),vA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return Y4},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options,i=n.isPercent,a=n.xField,o=n.yField,l=this,s=l.chart,u=l.options;zf({chart:s,options:u}),this.chart.changeData(Ps(t,o,a,o,i))},r.prototype.getSchemaAdaptor=function(){return hA},r}(ft),V4=10,_4=5,$4={padding:[8,10],text:"reset",textStyle:{default:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"}},buttonStyle:{default:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},active:{fill:"#e6e6e6"}}},G4=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg=S({name:"button"},$4),t}return r.prototype.getButtonCfg=function(){var t=this.context.view,n=E(t,["interactions","filter-action","cfg","buttonConfig"]);return B(this.buttonCfg,n,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),n=this.context.view.foregroundGroup.addGroup({name:t.name}),i=this.drawText(n);this.drawBackground(n,i.getBBox()),this.buttonGroup=n},r.prototype.drawText=function(t){var n,i=this.getButtonCfg();return t.addShape({type:"text",name:"button-text",attrs:S({text:i.text},(n=i.textStyle)===null||n===void 0?void 0:n.default)})},r.prototype.drawBackground=function(t,n){var i,a=this.getButtonCfg(),o=Ti(a.padding),l=t.addShape({type:"rect",name:"button-rect",attrs:S({x:n.x-o[3],y:n.y-o[0],width:n.width+o[1]+o[3],height:n.height+o[0]+o[2]},(i=a.buttonStyle)===null||i===void 0?void 0:i.default)});return l.toBack(),t.on("mouseenter",function(){var s;l.attr((s=a.buttonStyle)===null||s===void 0?void 0:s.active)}),t.on("mouseleave",function(){var s;l.attr((s=a.buttonStyle)===null||s===void 0?void 0:s.default)}),l},r.prototype.resetPosition=function(){var t=this.context.view,n=t.getCoordinate(),i=n.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),l=Je.transform(null,[["t",i.x-o.width-V4,i.y+o.height+_4]]);a.setMatrix(l)},r.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},r.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},r.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},r}(Bt);et("brush-reset-button",G4,{name:"brush-reset-button"}),ut("filter-action",{});function zn(e){return e.isInPlot()}function Pa(e,r,t){var n=t||{},i=n.mask,a=n.isStartEnable,o=r||"rect";switch(e){case"brush":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||zn,action:["brush:start","".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[null,{maskStyle:i==null?void 0:i.style}]}],processing:[{trigger:"mousemove",isEnable:zn,action:["".concat(o,"-mask:resize")]}],end:[{trigger:"mouseup",isEnable:zn,action:["brush:filter","brush:end","".concat(o,"-mask:end"),"".concat(o,"-mask:hide"),"brush-reset-button:show"]}],rollback:[{trigger:"brush-reset-button:click",action:["brush:reset","brush-reset-button:hide","cursor:crosshair"]}]};case"brush-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:default",isEnable:function(l){return a?!a(l):!1}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(l){return!l.isInShape("mask")},action:["".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[{maskStyle:i==null?void 0:i.style}]},{trigger:"mask:dragstart",action:["".concat(o,"-mask:moveStart")]}],processing:[{trigger:"plot:mousemove",action:["".concat(o,"-mask:resize")]},{trigger:"mask:drag",action:["".concat(o,"-mask:move")]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["".concat(o,"-mask:end")]},{trigger:"mask:dragend",action:["".concat(o,"-mask:moveEnd")]},{trigger:"document:mouseup",isEnable:function(l){return!l.isInPlot()},action:["element-range-highlight:clear","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","".concat(o,"-mask:hide")]}]};case"brush-x":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||zn,action:["brush-x:start","".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[null,{maskStyle:i==null?void 0:i.style}]}],processing:[{trigger:"mousemove",isEnable:zn,action:["".concat(o,"-mask:resize")]}],end:[{trigger:"mouseup",isEnable:zn,action:["brush-x:filter","brush-x:end","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]};case"brush-x-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(l){return!l.isInShape("mask")},action:["".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[{maskStyle:i==null?void 0:i.style}]},{trigger:"mask:dragstart",action:["".concat(o,"-mask:moveStart")]}],processing:[{trigger:"plot:mousemove",action:["".concat(o,"-mask:resize")]},{trigger:"mask:drag",action:["".concat(o,"-mask:move")]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["".concat(o,"-mask:end")]},{trigger:"mask:dragend",action:["".concat(o,"-mask:moveEnd")]},{trigger:"document:mouseup",isEnable:function(l){return!l.isInPlot()},action:["element-range-highlight:clear","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","".concat(o,"-mask:hide")]}]};case"brush-y":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||zn,action:["brush-y:start","".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[null,{maskStyle:i==null?void 0:i.style}]}],processing:[{trigger:"mousemove",isEnable:zn,action:["".concat(o,"-mask:resize")]}],end:[{trigger:"mouseup",isEnable:zn,action:["brush-y:filter","brush-y:end","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["brush-y:reset"]}]};case"brush-y-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(l){return!l.isInShape("mask")},action:["".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[{maskStyle:i==null?void 0:i.style}]},{trigger:"mask:dragstart",action:["".concat(o,"-mask:moveStart")]}],processing:[{trigger:"plot:mousemove",action:["".concat(o,"-mask:resize")]},{trigger:"mask:drag",action:["".concat(o,"-mask:move")]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["".concat(o,"-mask:end")]},{trigger:"mask:dragend",action:["".concat(o,"-mask:moveEnd")]},{trigger:"document:mouseup",isEnable:function(l){return!l.isInPlot()},action:["element-range-highlight:clear","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","".concat(o,"-mask:hide")]}]};default:return{}}}ut("brush",Pa("brush")),ut("brush-highlight",Pa("brush-highlight")),ut("brush-x",Pa("brush-x","x-rect")),ut("brush-y",Pa("brush-y","y-rect")),ut("brush-x-highlight",Pa("brush-x-highlight","x-rect")),ut("brush-y-highlight",Pa("brush-y-highlight","y-rect"));var dA=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function pA(e){var r=e.options,t=r.brush,n=de(r.interactions||[],function(i){return dA.indexOf(i.type)===-1});return t!=null&&t.enabled&&(dA.forEach(function(i){var a=!1;switch(t.type){case"x-rect":a=i===(t.action==="highlight"?"brush-x-highlight":"brush-x");break;case"y-rect":a=i===(t.action==="highlight"?"brush-y-highlight":"brush-y");break;default:a=i===(t.action==="highlight"?"brush-highlight":"brush");break}var o={type:i,enable:a};t&&(o.cfg=Pa(i,t.type,t)),n.push(o)}),(t==null?void 0:t.action)!=="highlight"&&n.push({type:"filter-action",cfg:{buttonConfig:t.button}})),B({},e,{options:{interactions:n}})}var La={hover:"__interval-connected-area-hover__",click:"__interval-connected-area-click__"},wg=function(e,r){return e==="hover"?[{trigger:"interval:mouseenter",action:["element-highlight-by-color:highlight","element-link-by-color:link"],arg:[null,{style:r}]}]:[{trigger:"interval:click",action:["element-highlight-by-color:clear","element-highlight-by-color:highlight","element-link-by-color:clear","element-link-by-color:unlink","element-link-by-color:link"],arg:[null,null,null,null,{style:r}]}]};ut(La.hover,{start:wg(La.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),ut(La.click,{start:wg(La.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});function H4(e){return e===void 0&&(e=!1),function(r){var t=r.chart,n=r.options,i=n.connectedArea,a=function(){t.removeInteraction(La.hover),t.removeInteraction(La.click)};if(!e&&i){var o=i.trigger||"hover";a(),t.interaction(La[o],{start:wg(o,i.style)})}else a();return r}}function gA(e,r){return!st(e)||!st(r)||e===0&&r===0?"-":e===r?"100%":e===0?"∞":"".concat((100*r/e).toFixed(2),"%")}function W4(e,r){return B({size:r?32:80,spacing:r?8:12,offset:r?32:0,arrow:e.arrow!==!1&&{headSize:12,style:{fill:"rgba(0, 0, 0, 0.05)"}},text:e.text!==!1&&{style:{fontSize:12,fill:"rgba(0, 0, 0, 0.85)",textAlign:"center",textBaseline:"middle"},formatter:gA}},e)}function Yf(e,r){return zt(r.getModel().points,function(t){return e.convertPoint(t)})}function X4(e,r,t){var n=e.view,i=e.geometry,a=e.group,o=e.options,l=e.horizontal,s=o.offset,u=o.size,c=o.arrow,f=n.getCoordinate(),h=Yf(f,r)[3],v=Yf(f,t)[0],d=v.y-h.y,p=v.x-h.x;if(typeof c!="boolean"){var y=c.headSize,g=o.spacing,m;l?(p-y)/2<g?(g=Math.max(1,(p-y)/2),m=[[h.x+g,h.y-s],[h.x+g,h.y-s-u],[v.x-g,v.y-s-u/2]]):m=[[h.x+g,h.y-s],[h.x+g,h.y-s-u],[v.x-g-y,v.y-s-u],[v.x-g,v.y-s-u/2],[v.x-g-y,v.y-s]]:(d-y)/2<g?(g=Math.max(1,(d-y)/2),m=[[h.x+s,h.y+g],[h.x+s+u,h.y+g],[v.x+s+u/2,v.y-g]]):m=[[h.x+s,h.y+g],[h.x+s+u,h.y+g],[v.x+s+u,v.y-g-y],[v.x+s+u/2,v.y-g],[v.x+s,v.y-g-y]],a.addShape("polygon",{id:"".concat(n.id,"-conversion-tag-arrow-").concat(i.getElementId(r.getModel().mappingData)),name:"conversion-tag-arrow",origin:{element:r,nextElement:t},attrs:S(S({},c.style||{}),{points:m})})}}function j4(e,r,t){var n,i,a,o=e.view,l=e.geometry,s=e.group,u=e.options,c=e.field,f=e.horizontal,h=u.offset,v=u.size;if(typeof u.text!="boolean"){var d=o.getCoordinate(),p=((n=u.text)===null||n===void 0?void 0:n.formatter)&&((i=u.text)===null||i===void 0?void 0:i.formatter(r.getData()[c],t.getData()[c])),y=Yf(d,r)[f?3:0],g=Yf(d,t)[f?0:3],m=s.addShape("text",{id:"".concat(o.id,"-conversion-tag-text-").concat(l.getElementId(r.getModel().mappingData)),name:"conversion-tag-text",origin:{element:r,nextElement:t},attrs:S(S({},((a=u.text)===null||a===void 0?void 0:a.style)||{}),{text:p,x:f?(y.x+g.x)/2:y.x+h+v/2,y:f?y.y-h-v/2:(y.y+g.y)/2})});if(f){var x=g.x-y.x,w=m.getBBox().width;if(w>x){var C=w/p.length,M=Math.max(1,Math.ceil(x/C)-1),A="".concat(p.slice(0,M),"...");m.attr("text",A)}}}}function U4(e,r,t){X4(e,r,t),j4(e,r,t)}function q4(e,r,t){return r===void 0&&(r=!0),t===void 0&&(t=!1),function(n){var i=n.options,a=n.chart,o=i.conversionTag,l=i.theme;return o&&!t&&(a.theme(B({},At(l)?l:ps(l),{columnWidthRatio:1/3})),a.annotation().shape({render:function(s,u){var c=s.addGroup({id:"".concat(a.id,"-conversion-tag-group"),name:"conversion-tag-group"}),f=Gr(a.geometries,function(d){return d.type==="interval"}),h={view:u,geometry:f,group:c,field:e,horizontal:r,options:W4(o,r)},v=f.elements;F(v,function(d,p){p>0&&U4(h,v[p-1],d)})}})),n}}function Z4(e){var r=e.options,t=r.legend,n=r.seriesField,i=r.isStack;return n?t!==!1&&(t=S({position:i?"right-top":"top-left"},t)):t=!1,e.options.legend=t,e}function Q4(e){var r=e.chart,t=e.options,n=t.data,i=t.columnStyle,a=t.color,o=t.columnWidthRatio,l=t.isPercent,s=t.isGroup,u=t.isStack,c=t.xField,f=t.yField,h=t.seriesField,v=t.groupField,d=t.tooltip,p=t.shape,y=l&&s&&u?P4(n,f,[c,v],f):Ps(n,f,c,f,l),g=[];u&&h&&!s?y.forEach(function(w){var C=g.find(function(M){return M[c]===w[c]&&M[h]===w[h]});C?C[f]+=w[f]||0:g.push(S({},w))}):g=y,r.data(g);var m=l?S({formatter:function(w){var C;return{name:s&&u?"".concat(w[h]," - ").concat(w[v]):(C=w[h])!==null&&C!==void 0?C:w[c],value:(Number(w[f])*100).toFixed(2)+"%"}}},d):d,x=B({},e,{options:{data:g,widthRatio:o,tooltip:m,interval:{shape:p,style:i,color:a}}});return Fe(x),x}function Sg(e){var r,t,n=e.options,i=n.xAxis,a=n.yAxis,o=n.xField,l=n.yField,s=n.data,u=n.isPercent,c=u?{max:1,min:0,minLimit:0,maxLimit:1}:{};return lt(Ut((r={},r[o]=i,r[l]=a,r),(t={},t[o]={type:"cat"},t[l]=S(S({},lg(s,l)),c),t)))(e)}function K4(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(o,!1):r.axis(o,i),e}function J4(e){var r=e.chart,t=e.options,n=t.legend,i=t.seriesField;return n&&i?r.legend(i,n):n===!1&&r.legend(!1),e}function t_(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=t.isRange,o=Ae(r,"interval");if(!n)o.label(!1);else{var l=n.callback,s=kt(n,["callback"]);o.label({fields:[i],callback:l,cfg:S({layout:s!=null&&s.position?void 0:[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]},fe(a?S({content:function(u){var c;return(c=u[i])===null||c===void 0?void 0:c.join("-")}},s):s))})}return e}function e_(e){var r=e.chart,t=e.options,n=t.tooltip,i=t.isGroup,a=t.isStack,o=t.groupField,l=t.data,s=t.xField,u=t.yField,c=t.seriesField;if(n===!1)r.tooltip(!1);else{var f=n;if(i&&a){var h=f.customItems,v=(f==null?void 0:f.formatter)||function(d){return{name:"".concat(d[c]," - ").concat(d[o]),value:d[u]}};f=S(S({},f),{customItems:function(d){var p=[];return F(d,function(y){var g=de(l,function(m){return z0(m,bt(y.data,[s,c]))});g.forEach(function(m){p.push(S(S(S({},y),{value:m[u],data:m,mappingData:{_origin:m}}),v(m)))})}),h?h(p):p}})}r.tooltip(f)}return e}function Vf(e,r){r===void 0&&(r=!1);var t=e.options,n=t.seriesField;return lt(Z4,wt,pr("columnStyle"),Ii,tA("rect"),Q4,Sg,K4,J4,e_,Is,dg,t_,pA,Yt,It,_t(),q4(t.yField,!r,!!n),H4(!t.isStack),Ta)(e)}function r_(e){var r=e.options,t=r.xField,n=r.yField,i=r.xAxis,a=r.yAxis,o={left:"bottom",right:"top",top:"left",bottom:"right"},l=a!==!1?S({position:o[(a==null?void 0:a.position)||"left"]},a):!1,s=i!==!1?S({position:o[(i==null?void 0:i.position)||"bottom"]},i):!1;return S(S({},e),{options:S(S({},r),{xField:n,yField:t,xAxis:l,yAxis:s})})}function n_(e){var r=e.options,t=r.label;return t&&!t.position&&(t.position="left",t.layout||(t.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}])),B({},e,{options:{label:t}})}function i_(e){var r=e.options,t=r.seriesField,n=r.isStack,i=r.legend;return t?i!==!1&&(i=S({position:n?"top-left":"right-top"},i||{})):i=!1,B({},e,{options:{legend:i}})}function a_(e){var r=e.options,t=[{type:"transpose"},{type:"reflectY"}].concat(r.coordinate||[]);return B({},e,{options:{coordinate:t}})}function o_(e){var r=e.chart,t=e.options,n=t.barStyle,i=t.barWidthRatio,a=t.minBarWidth,o=t.maxBarWidth,l=t.barBackground;return Vf({chart:r,options:S(S({},t),{columnStyle:n,columnWidthRatio:i,minColumnWidth:a,maxColumnWidth:o,columnBackground:l})},!0)}function yA(e){return lt(r_,n_,i_,le,a_,o_)(e)}var l_=B({},ft.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),mA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bar",t}return r.getDefaultOptions=function(){return l_},r.prototype.changeData=function(t){var n,i;this.updateOption({data:t});var a=this,o=a.chart,l=a.options,s=l.isPercent,u=l.xField,c=l.yField,f=l.xAxis,h=l.yAxis;n=[c,u],u=n[0],c=n[1],i=[h,f],f=i[0],h=i[1];var v=S(S({},l),{xField:u,yField:c,yAxis:h,xAxis:f});Sg({chart:o,options:v}),o.changeData(Ps(t,u,c,u,s))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return yA},r}(ft),s_=B({},ft.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),xA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="column",t}return r.getDefaultOptions=function(){return s_},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options,i=n.yField,a=n.xField,o=n.isPercent,l=this,s=l.chart,u=l.options;Sg({chart:s,options:u}),this.chart.changeData(Ps(t,i,a,i,o))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Vf},r}(ft),Cg,Li="$$percentage$$",Oi="$$mappingValue$$",Yn="$$conversion$$",Mg="$$totalPercentage$$",Ls="$$x$$",Os="$$y$$",u_={appendPadding:[0,80],minSize:0,maxSize:1,meta:(Cg={},Cg[Oi]={min:0,max:1,nice:!1},Cg),label:{style:{fill:"#fff",fontSize:12}},tooltip:{showTitle:!1,showMarkers:!1,shared:!1},conversionTag:{offsetX:10,offsetY:0,style:{fontSize:12,fill:"rgba(0,0,0,0.45)"}}},wA="CONVERSION_TAG_NAME";function Ag(e,r,t){var n=[],i=t.yField,a=t.maxSize,o=t.minSize,l=E($0(r,i),[i]),s=st(a)?a:1,u=st(o)?o:0;return n=zt(e,function(c,f){var h=(c[i]||0)/l;return c[Li]=h,c[Oi]=(s-u)*h+u,c[Yn]=[E(e,[f-1,i]),c[i]],c}),n}function Fg(e){return function(r){var t=r.chart,n=r.options,i=n.conversionTag,a=n.filteredData,o=a||t.getOptions().data;if(i){var l=i.formatter;o.forEach(function(s,u){if(!(u<=0||Number.isNaN(s[Oi]))){var c=e(s,u,o,{top:!0,name:wA,text:{content:Q(l)?l(s,o):l,offsetX:i.offsetX,offsetY:i.offsetY,position:"end",autoRotate:!1,style:S({textAlign:"start",textBaseline:"middle"},i.style)}});t.annotation().line(c)}})}return r}}function c_(e){var r=e.chart,t=e.options,n=t.data,i=n===void 0?[]:n,a=t.yField,o=t.maxSize,l=t.minSize,s=Ag(i,i,{yField:a,maxSize:o,minSize:l});return r.data(s),e}function f_(e){var r=e.chart,t=e.options,n=t.xField,i=t.yField,a=t.color,o=t.tooltip,l=t.label,s=t.shape,u=s===void 0?"funnel":s,c=t.funnelStyle,f=t.state,h=Lr(o,[n,i]),v=h.fields,d=h.formatter;rr({chart:r,options:{type:"interval",xField:n,yField:Oi,colorField:n,tooltipFields:G(v)&&v.concat([Li,Yn]),mapping:{shape:u,tooltip:d,color:a,style:c},label:l,state:f}});var p=Ae(e.chart,"interval");return p.adjust("symmetric"),e}function h_(e){var r=e.chart,t=e.options,n=t.isTransposed;return r.coordinate({type:"rect",actions:n?[]:[["transpose"],["scale",1,-1]]}),e}function SA(e){var r=e.options,t=e.chart,n=r.maxSize,i=E(t,["geometries","0","dataArray"],[]),a=E(t,["options","data","length"]),o=zt(i,function(s){return E(s,["0","nextPoints","0","x"])*a-.5}),l=function(s,u,c,f){var h=n-(n-s[Oi])/2;return S(S({},f),{start:[o[u-1]||u-.5,h],end:[o[u-1]||u-.5,h+.05]})};return Fg(l)(e),e}function CA(e){return lt(c_,f_,h_,SA)(e)}function v_(e){var r,t=e.chart,n=e.options,i=n.data,a=i===void 0?[]:i,o=n.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function d_(e){var r=e.chart,t=e.options,n=t.data,i=t.xField,a=t.yField,o=t.color,l=t.compareField,s=t.isTransposed,u=t.tooltip,c=t.maxSize,f=t.minSize,h=t.label,v=t.funnelStyle,d=t.state,p=t.showFacetTitle;return r.facet("mirror",{fields:[l],transpose:!s,padding:s?0:[32,0,0,0],showTitle:p,eachView:function(y,g){var m=s?g.rowIndex:g.columnIndex;s||y.coordinate({type:"rect",actions:[["transpose"],["scale",m===0?-1:1,-1]]});var x=Ag(g.data,n,{yField:a,maxSize:c,minSize:f});y.data(x);var w=Lr(u,[i,a,l]),C=w.fields,M=w.formatter,A=s?{offset:m===0?10:-23,position:m===0?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:m===0?"end":"start"}};rr({chart:y,options:{type:"interval",xField:i,yField:Oi,colorField:i,tooltipFields:G(C)&&C.concat([Li,Yn]),mapping:{shape:"funnel",tooltip:M,color:o,style:v},label:h===!1?!1:B({},A,h),state:d}})}}),e}function MA(e){var r=e.chart,t=e.index,n=e.options,i=n.conversionTag,a=n.isTransposed;(st(t)?[r]:r.views).forEach(function(o,l){var s=E(o,["geometries","0","dataArray"],[]),u=E(o,["options","data","length"]),c=zt(s,function(h){return E(h,["0","nextPoints","0","x"])*u-.5}),f=function(h,v,d,p){var y=(t||l)===0?-1:1;return B({},p,{start:[c[v-1]||v-.5,h[Oi]],end:[c[v-1]||v-.5,h[Oi]+.05],text:a?{style:{textAlign:"start"}}:{offsetX:i!==!1?y*i.offsetX:0,style:{textAlign:(t||l)===0?"end":"start"}}})};Fg(f)(B({},{chart:o,options:n}))})}function p_(e){var r=e.chart;return r.once("beforepaint",function(){return MA(e)}),e}function g_(e){return lt(v_,d_,p_)(e)}function y_(e){var r=e.chart,t=e.options,n=t.data,i=n===void 0?[]:n,a=t.yField,o=Pe(i,function(u,c){return u+(c[a]||0)},0),l=$0(i,a)[a],s=zt(i,function(u,c){var f=[],h=[];if(u[Mg]=(u[a]||0)/o,c){var v=i[c-1][Ls],d=i[c-1][Os];f[0]=v[3],h[0]=d[3],f[1]=v[2],h[1]=d[2]}else f[0]=-.5,h[0]=1,f[1]=.5,h[1]=1;return h[2]=h[1]-u[Mg],f[2]=(h[2]+1)/4,h[3]=h[2],f[3]=-f[2],u[Ls]=f,u[Os]=h,u[Li]=(u[a]||0)/l,u[Yn]=[E(i,[c-1,a]),u[a]],u});return r.data(s),e}function m_(e){var r=e.chart,t=e.options,n=t.xField,i=t.yField,a=t.color,o=t.tooltip,l=t.label,s=t.funnelStyle,u=t.state,c=Lr(o,[n,i]),f=c.fields,h=c.formatter;return rr({chart:r,options:{type:"polygon",xField:Ls,yField:Os,colorField:n,tooltipFields:G(f)&&f.concat([Li,Yn]),label:l,state:u,mapping:{tooltip:h,color:a,style:s}}}),e}function x_(e){var r=e.chart,t=e.options,n=t.isTransposed;return r.coordinate({type:"rect",actions:n?[["transpose"],["reflect","x"]]:[]}),e}function w_(e){var r=function(t,n,i,a){return S(S({},a),{start:[t[Ls][1],t[Os][1]],end:[t[Ls][1]+.05,t[Os][1]]})};return Fg(r)(e),e}function S_(e){return lt(y_,m_,x_,w_)(e)}function C_(e){var r,t=e.chart,n=e.options,i=n.data,a=i===void 0?[]:i,o=n.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function M_(e){var r=e.chart,t=e.options,n=t.seriesField,i=t.isTransposed,a=t.showFacetTitle;return r.facet("rect",{fields:[n],padding:[i?0:32,10,0,10],showTitle:a,eachView:function(o,l){CA(B({},e,{chart:o,options:{data:l.data}}))}}),e}function A_(e){return lt(C_,M_)(e)}var F_=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.rendering=!1,t}return r.prototype.change=function(t){var n=this;if(!this.rendering){var i=t.seriesField,a=t.compareField,o=a?MA:SA,l=this.context.view,s=i||a?l.views:[l];zt(s,function(u,c){var f=u.getController("annotation"),h=de(E(f,["option"],[]),function(d){var p=d.name;return p!==wA});f.clear(!0),F(h,function(d){typeof d=="object"&&u.annotation()[d.type](d)});var v=E(u,["filteredData"],u.getOptions().data);o({chart:u,index:c,options:S(S({},t),{filteredData:Ag(v,v,t)})}),u.filterData(v),n.rendering=!0,u.render(!0)})}this.rendering=!1},r}(Bt),AA="funnel-conversion-tag",bg="funnel-afterrender",FA={trigger:"afterrender",action:"".concat(AA,":change")};et(AA,F_),ut(bg,{start:[FA]});function b_(e){var r=e.options,t=r.compareField,n=r.xField,i=r.yField,a=r.locale,o=r.funnelStyle,l=r.data,s=Pf(a),u={label:t?{fields:[n,i,t,Li,Yn],formatter:function(f){return"".concat(f[i])}}:{fields:[n,i,Li,Yn],offset:0,position:"middle",formatter:function(f){return"".concat(f[n]," ").concat(f[i])}},tooltip:{title:n,formatter:function(f){return{name:f[n],value:f[i]}}},conversionTag:{formatter:function(f){return"".concat(s.get(["conversionTag","label"]),": ").concat(gA.apply(void 0,f[Yn]))}}},c;return(t||o)&&(c=function(f){return B({},t&&{lineWidth:1,stroke:"#fff"},Q(o)?o(f):o)}),B({options:u},e,{options:{funnelStyle:c,data:ze(l)}})}function E_(e){var r=e.options,t=r.compareField,n=r.dynamicHeight,i=r.seriesField;return i?A_(e):t?g_(e):n?S_(e):CA(e)}function k_(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return lt(Ut((r={},r[a]=n,r[o]=i,r)))(e)}function T_(e){var r=e.chart;return r.axis(!1),e}function I_(e){var r=e.chart,t=e.options,n=t.legend;return n===!1?r.legend(!1):r.legend(n),e}function P_(e){var r=e.chart,t=e.options,n=t.interactions,i=t.dynamicHeight;return F(n,function(a){a.enable===!1?r.removeInteraction(a.type):r.interaction(a.type,a.cfg||{})}),i?r.removeInteraction(bg):r.interaction(bg,{start:[S(S({},FA),{arg:t})]}),e}function bA(e){return lt(b_,E_,k_,T_,le,P_,I_,It,wt,_t())(e)}var L_=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="funnel",t}return r.getDefaultOptions=function(){return u_},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return bA},r.prototype.setState=function(t,n,i){i===void 0&&(i=!0);var a=Es(this.chart);F(a,function(o){n(o.getData())&&o.setState(t,i)})},r.prototype.getStates=function(){var t=Es(this.chart),n=[];return F(t,function(i){var a=i.getData(),o=i.getStates();F(o,function(l){n.push({data:a,state:l,geometry:i.geometry,element:i})})}),n},r.CONVERSATION_FIELD=Yn,r.PERCENT_FIELD=Li,r.TOTAL_PERCENT_FIELD=Mg,r}(ft),_f,Eg="range",EA="type",Vn="percent",O_="#f0f0f0",kA="indicator-view",TA="range-view",D_={percent:0,range:{ticks:[]},innerRadius:.9,radius:.95,startAngle:-7/6*Math.PI,endAngle:1/6*Math.PI,syncViewPadding:!0,axis:{line:null,label:{offset:-24,style:{textAlign:"center",textBaseline:"middle"}},subTickLine:{length:-8},tickLine:{length:-12},grid:null},indicator:{pointer:{style:{lineWidth:5,lineCap:"round"}},pin:{style:{r:9.75,lineWidth:4.5,fill:"#fff"}}},statistic:{title:!1},meta:(_f={},_f[Eg]={sync:"v"},_f[Vn]={sync:"v",tickCount:5,tickInterval:.2},_f),animation:!1};function B_(e,r){return e.map(function(t,n){var i;return i={},i[Eg]=t-(e[n-1]||0),i[EA]="".concat(n),i[Vn]=r,i})}function IA(e){var r;return[(r={},r[Vn]=Nt(e,0,1),r)]}function PA(e,r){var t=E(r,["ticks"],[]),n=ue(t)?oa(t):[0,Nt(e,0,1),1];return n[0]||n.shift(),B_(n,e)}function R_(e){var r=e.chart,t=e.options,n=t.percent,i=t.range,a=t.radius,o=t.innerRadius,l=t.startAngle,s=t.endAngle,u=t.axis,c=t.indicator,f=t.gaugeStyle,h=t.type,v=t.meter,d=i.color,p=i.width;if(c){var y=IA(n),g=r.createView({id:kA});g.data(y),g.point().position("".concat(Vn,"*1")).shape(c.shape||"gauge-indicator").customInfo({defaultColor:r.getTheme().defaultColor,indicator:c}),g.coordinate("polar",{startAngle:l,endAngle:s,radius:o*a}),g.axis(Vn,u),g.scale(Vn,bt(u,er))}var m=PA(n,t.range),x=r.createView({id:TA});x.data(m);var w=at(d)?[d,O_]:d,C=Fe({chart:x,options:{xField:"1",yField:Eg,seriesField:EA,rawFields:[Vn],isStack:!0,interval:{color:w,style:f,shape:h==="meter"?"meter-gauge":null},args:{zIndexReversed:!0,sortZIndex:!0},minColumnWidth:p,maxColumnWidth:p}}).ext,M=C.geometry;return M.customInfo({meter:v}),x.coordinate("polar",{innerRadius:o,radius:a,startAngle:l,endAngle:s}).transpose(),e}function N_(e){var r;return lt(Ut((r={range:{min:0,max:1,maxLimit:1,minLimit:0}},r[Vn]={},r)))(e)}function LA(e,r){var t=e.chart,n=e.options,i=n.statistic,a=n.percent;if(t.getController("annotation").clear(!0),i){var o=i.content,l=void 0;o&&(l=B({},{content:"".concat((a*100).toFixed(2),"%"),style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},o)),UV(t,{statistic:S(S({},i),{content:l})},{percent:a})}return r&&t.render(!0),e}function z_(e){var r=e.chart,t=e.options,n=t.tooltip;return n?r.tooltip(B({showTitle:!1,showMarkers:!1,containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(i,a){var o=E(a,[0,"data",Vn],0);return"".concat((o*100).toFixed(2),"%")}},n)):r.tooltip(!1),e}function Y_(e){var r=e.chart;return r.legend(!1),e}function OA(e){return lt(wt,It,R_,N_,z_,LA,Yt,_t(),Y_)(e)}Mt("point","gauge-indicator",{draw:function(e,r){var t=e.customInfo,n=t.indicator,i=t.defaultColor,a=n,o=a.pointer,l=a.pin,s=r.addGroup(),u=this.parsePoint({x:0,y:0});return o&&s.addShape("line",{name:"pointer",attrs:S({x1:u.x,y1:u.y,x2:e.x,y2:e.y,stroke:i},o.style)}),l&&s.addShape("circle",{name:"pin",attrs:S({x:u.x,y:u.y,stroke:i},l.style)}),s}}),Mt("interval","meter-gauge",{draw:function(e,r){var t=e.customInfo.meter,n=t===void 0?{}:t,i=n.steps,a=i===void 0?50:i,o=n.stepRatio,l=o===void 0?.5:o;a=a<1?1:a,l=Nt(l,0,1);var s=this.coordinate,u=s.startAngle,c=s.endAngle,f=0;if(l>0&&l<1){var h=c-u;f=h/a/(l/(1-l)+1-1/a)}for(var v=f/(1-l)*l,d=r.addGroup(),p=this.coordinate.getCenter(),y=this.coordinate.getRadius(),g=Je.getAngle(e,this.coordinate),m=g.startAngle,x=g.endAngle,w=m;w<x;){var C=void 0,M=(w-u)%(v+f);M<v?C=w+(v-M):(w+=v+f-M,C=w+v);var A=Je.getSectorPath(p.x,p.y,y,w,Math.min(C,x),y*this.coordinate.innerRadius);d.addShape("path",{name:"meter-gauge",attrs:{path:A,fill:e.color,stroke:e.color,lineWidth:.5}}),w=C+f}return d}});var V_=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="gauge",t}return r.getDefaultOptions=function(){return D_},r.prototype.changeData=function(t){this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t});var n=this.chart.views.find(function(a){return a.id===kA});n&&n.data(IA(t));var i=this.chart.views.find(function(a){return a.id===TA});i&&i.data(PA(t,this.options.range)),LA({chart:this.chart,options:this.options},!0),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return OA},r}(ft);function DA(e,r,t){if(t===1)return[0,r];var n=Math.floor(e/r);return[r*n,r*(n+1)]}function __(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function BA(e,r,t,n,i){var a=ze(e);ZI(a,r);var o=Hr(a,r),l=V0(o),s=l.max-l.min,u=t;if(!t&&n&&(u=n>1?s/(n-1):l.max),!t&&!n){var c=__(o);u=s/c}var f={},h=hr(a,i);We(h)?F(a,function(d){var p=d[r],y=DA(p,u,n),g="".concat(y[0],"-").concat(y[1]);ai(f,g)||(f[g]={range:y,count:0}),f[g].count+=1}):Object.keys(h).forEach(function(d){F(h[d],function(p){var y=p[r],g=DA(y,u,n),m="".concat(g[0],"-").concat(g[1]),x="".concat(m,"-").concat(d);ai(f,x)||(f[x]={range:g,count:0},f[x][i]=d),f[x].count+=1})});var v=[];return F(f,function(d){v.push(d)}),v}var $f="range",Ds="count",$_=B({},ft.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function G_(e){var r=e.chart,t=e.options,n=t.data,i=t.binField,a=t.binNumber,o=t.binWidth,l=t.color,s=t.stackField,u=t.legend,c=t.columnStyle,f=BA(n,i,o,a,s);r.data(f);var h=B({},e,{options:{xField:$f,yField:Ds,seriesField:s,isStack:!0,interval:{color:l,style:c}}});return Fe(h),u&&s?r.legend(s,u):r.legend(!1),e}function H_(e){var r,t=e.options,n=t.xAxis,i=t.yAxis;return lt(Ut((r={},r[$f]=n,r[Ds]=i,r)))(e)}function W_(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis;return n===!1?r.axis($f,!1):r.axis($f,n),i===!1?r.axis(Ds,!1):r.axis(Ds,i),e}function X_(e){var r=e.chart,t=e.options,n=t.label,i=Ae(r,"interval");if(!n)i.label(!1);else{var a=n.callback,o=kt(n,["callback"]);i.label({fields:[Ds],callback:a,cfg:fe(o)})}return e}function RA(e){return lt(wt,pr("columnStyle"),G_,H_,W_,Ii,X_,le,Yt,It)(e)}var j_=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="histogram",t}return r.getDefaultOptions=function(){return $_},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options,i=n.binField,a=n.binNumber,o=n.binWidth,l=n.stackField;this.chart.changeData(BA(t,i,o,a,l))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return RA},r}(ft),U_=B({},ft.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1}),q_=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.active=function(){var t=this.getView(),n=this.context.event;if(n.data){var i=n.data.items,a=t.geometries.filter(function(o){return o.type==="point"});F(a,function(o){F(o.elements,function(l){var s=Y0(i,function(u){return u.data===l.data})!==-1;l.setState("active",s)})})}},r.prototype.reset=function(){var t=this.getView(),n=t.geometries.filter(function(i){return i.type==="point"});F(n,function(i){F(i.elements,function(a){a.setState("active",!1)})})},r.prototype.getView=function(){return this.context.view},r}(Bt);et("marker-active",q_),ut("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var NA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="line",t}return r.getDefaultOptions=function(){return U_},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;zf({chart:i,options:a}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return fA},r}(ft),zA=B({},ft.getDefaultOptions(),{legend:{position:"right",radio:{}},tooltip:{shared:!1,showTitle:!1,showMarkers:!1},label:{layout:{type:"limit-in-plot",cfg:{action:"ellipsis"}}},pieStyle:{stroke:"white",lineWidth:1},statistic:{title:{style:{fontWeight:300,color:"#4B535E",textAlign:"center",fontSize:"20px",lineHeight:1}},content:{style:{fontWeight:"bold",color:"rgba(44,53,66,0.85)",textAlign:"center",fontSize:"32px",lineHeight:1}}},theme:{components:{annotation:{text:{animate:!1}}}}}),Z_=[1,0,0,0,1,0,0,0,1];function kg(e,r){var t=r?rt([],r,!0):rt([],Z_,!0);return Je.transform(t,e)}var Q_=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getActiveElements=function(){var t=Je.getDelegationObject(this.context);if(t){var n=this.context.view,i=t.component,a=t.item,o=i.get("field");if(o){var l=n.geometries[0].elements;return l.filter(function(s){return s.getModel().data[o]===a.value})}}return[]},r.prototype.getActiveElementLabels=function(){var t=this.context.view,n=this.getActiveElements(),i=t.geometries[0].labelsContainer.getChildren();return i.filter(function(a){return n.find(function(o){return Gt(o.getData(),a.get("data"))})})},r.prototype.transfrom=function(t){t===void 0&&(t=7.5);var n=this.getActiveElements(),i=this.getActiveElementLabels();n.forEach(function(a,o){var l=i[o],s=a.geometry.coordinate;if(s.isPolar&&s.isTransposed){var u=Je.getAngle(a.getModel(),s),c=u.startAngle,f=u.endAngle,h=(c+f)/2,v=t,d=v*Math.cos(h),p=v*Math.sin(h);a.shape.setMatrix(kg([["t",d,p]])),l.setMatrix(kg([["t",d,p]]))}})},r.prototype.active=function(){this.transfrom()},r.prototype.reset=function(){this.transfrom(0)},r}(Bt);function K_(e){var r=e.event,t,n=r.target;return n&&(t=n.get("element")),t}var J_=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAnnotations=function(t){var n=t||this.context.view;return n.getController("annotation").option},r.prototype.getInitialAnnotation=function(){return this.initialAnnotation},r.prototype.init=function(){var t=this,n=this.context.view;n.removeInteraction("tooltip"),n.on("afterchangesize",function(){var i=t.getAnnotations(n);t.initialAnnotation=i})},r.prototype.change=function(t){var n=this.context,i=n.view,a=n.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var o=E(a,["data","data"]);if(a.type.match("legend-item")){var l=Je.getDelegationObject(this.context),s=i.getGroupedFields()[0];if(l&&s){var u=l.item;o=i.getData().find(function(v){return v[s]===u.value})}}if(o){var c=E(t,"annotations",[]),f=E(t,"statistic",{});i.getController("annotation").clear(!0),F(c,function(v){typeof v=="object"&&i.annotation()[v.type](v)}),kf(i,{statistic:f,plotType:"pie"},o),i.render(!0)}var h=K_(this.context);h&&h.shape.toFront()},r.prototype.reset=function(){var t=this.context.view,n=t.getController("annotation");n.clear(!0);var i=this.getInitialAnnotation();F(i,function(a){t.annotation()[a.type](a)}),t.render(!0)},r}(Bt),YA="pie-statistic";et(YA,J_),ut("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),et("pie-legend",Q_),ut("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});function t$(e,r){var t=null;return F(e,function(n){typeof n[r]=="number"&&(t+=n[r])}),t}function e$(e,r){var t;switch(e){case"inner":return t="-30%",at(r)&&r.endsWith("%")?parseFloat(r)*.01>0?t:r:r<0?r:t;case"outer":return t=12,at(r)&&r.endsWith("%")?parseFloat(r)*.01<0?t:r:r>0?r:t;default:return r}}function Gf(e,r){return Bv(zo(e,r),function(t){return t[r]===0})}function r$(e){var r=e.chart,t=e.options,n=t.data,i=t.angleField,a=t.colorField,o=t.color,l=t.pieStyle,s=t.shape,u=zo(n,i);if(Gf(u,i)){var c="$$percentage$$";u=u.map(function(h){var v;return S(S({},h),(v={},v[c]=1/u.length,v))}),r.data(u);var f=B({},e,{options:{xField:"1",yField:c,seriesField:a,isStack:!0,interval:{color:o,shape:s,style:l},args:{zIndexReversed:!0,sortZIndex:!0}}});Fe(f)}else{r.data(u);var f=B({},e,{options:{xField:"1",yField:i,seriesField:a,isStack:!0,interval:{color:o,shape:s,style:l},args:{zIndexReversed:!0,sortZIndex:!0}}});Fe(f)}return e}function n$(e){var r,t=e.chart,n=e.options,i=n.meta,a=n.colorField,o=B({},i);return t.scale(o,(r={},r[a]={type:"cat"},r)),e}function i$(e){var r=e.chart,t=e.options,n=t.radius,i=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"theta",cfg:{radius:n,innerRadius:i,startAngle:a,endAngle:o}}),e}function a$(e){var r=e.chart,t=e.options,n=t.label,i=t.colorField,a=t.angleField,o=r.geometries[0];if(!n)o.label(!1);else{var l=n.callback,s=kt(n,["callback"]),u=fe(s);if(u.content){var c=u.content;u.content=function(d,p,y){var g=d[i],m=d[a],x=r.getScaleByField(a),w=x==null?void 0:x.scale(m);return Q(c)?c(S(S({},d),{percent:w}),p,y):at(c)?ZM(c,{value:m,name:g,percentage:st(w)&&!Y(m)?"".concat((w*100).toFixed(2),"%"):null}):c}}var f={inner:"",outer:"pie-outer",spider:"pie-spider"},h=u.type?f[u.type]:"pie-outer",v=u.layout?G(u.layout)?u.layout:[u.layout]:[];u.layout=(h?[{type:h}]:[]).concat(v),o.label({fields:i?[a,i]:[a],callback:l,cfg:S(S({},u),{offset:e$(u.type,u.offset),type:"pie"})})}return e}function VA(e){var r=e.innerRadius,t=e.statistic,n=e.angleField,i=e.colorField,a=e.meta,o=e.locale,l=Pf(o);if(r&&t){var s=B({},zA.statistic,t),u=s.title,c=s.content;return u!==!1&&(u=B({},{formatter:function(f){var h=f?f[i]:Y(u.content)?l.get(["statistic","total"]):u.content,v=E(a,[i,"formatter"])||function(d){return d};return v(h)}},u)),c!==!1&&(c=B({},{formatter:function(f,h){var v=f?f[n]:t$(h,n),d=E(a,[n,"formatter"])||function(p){return p};return f||Y(c.content)?d(v):c.content}},c)),B({},{statistic:{title:u,content:c}},e)}return e}function _A(e){var r=e.chart,t=e.options,n=VA(t),i=n.innerRadius,a=n.statistic;return r.getController("annotation").clear(!0),lt(_t())(e),i&&a&&kf(r,{statistic:a,plotType:"pie"}),e}function o$(e){var r=e.chart,t=e.options,n=t.tooltip,i=t.colorField,a=t.angleField,o=t.data;if(n===!1)r.tooltip(n);else if(r.tooltip(B({},n,{shared:!1})),Gf(o,a)){var l=E(n,"fields"),s=E(n,"formatter");We(E(n,"fields"))&&(l=[i,a],s=s||function(u){return{name:u[i],value:Ol(u[a])}}),r.geometries[0].tooltip(l.join("*"),Vo(l,s))}return e}function l$(e){var r=e.chart,t=e.options,n=VA(t),i=n.interactions,a=n.statistic,o=n.annotations;return F(i,function(l){var s,u;if(l.enable===!1)r.removeInteraction(l.type);else if(l.type==="pie-statistic-active"){var c=[];!((s=l.cfg)===null||s===void 0)&&s.start||(c=[{trigger:"element:mouseenter",action:"".concat(YA,":change"),arg:{statistic:a,annotations:o}}]),F((u=l.cfg)===null||u===void 0?void 0:u.start,function(f){c.push(S(S({},f),{arg:{statistic:a,annotations:o}}))}),r.interaction(l.type,B({},l.cfg,{start:c}))}else r.interaction(l.type,l.cfg||{})}),e}function $A(e){return lt(pr("pieStyle"),r$,n$,wt,i$,Yo,o$,a$,Ii,_A,l$,It)(e)}var GA=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="pie",t}return r.getDefaultOptions=function(){return zA},r.prototype.changeData=function(t){this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null));var n=this.options,i=this.options.angleField,a=zo(n.data,i),o=zo(t,i);Gf(a,i)||Gf(o,i)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(o),_A({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return $A},r}(ft),HA=["#FAAD14","#E8EDF3"],s$={percent:.2,color:HA,animation:{}};function Tg(e){var r=Nt(ka(e)?e:0,0,1);return[{current:"".concat(r),type:"current",percent:r},{current:"".concat(r),type:"target",percent:1}]}function WA(e){var r=e.chart,t=e.options,n=t.percent,i=t.progressStyle,a=t.color,o=t.barWidthRatio;r.data(Tg(n));var l=B({},e,{options:{xField:"current",yField:"percent",seriesField:"type",widthRatio:o,interval:{style:i,color:at(a)?[a,HA[1]]:a},args:{zIndexReversed:!0,sortZIndex:!0}}});return Fe(l),r.tooltip(!1),r.axis(!1),r.legend(!1),e}function u$(e){var r=e.chart;return r.coordinate("rect").transpose(),e}function XA(e){return lt(WA,Ut({}),u$,It,wt,_t())(e)}var c$=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="process",t}return r.getDefaultOptions=function(){return s$},r.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(Tg(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return XA},r}(ft);function f$(e){var r=e.chart,t=e.options,n=t.innerRadius,i=t.radius;return r.coordinate("theta",{innerRadius:n,radius:i}),e}function jA(e,r){var t=e.chart,n=e.options,i=n.innerRadius,a=n.statistic,o=n.percent,l=n.meta;if(t.getController("annotation").clear(!0),i&&a){var s=E(l,["percent","formatter"])||function(c){return"".concat((c*100).toFixed(2),"%")},u=a.content;u&&(u=B({},u,{content:Y(u.content)?s(o):u.content})),kf(t,{statistic:S(S({},a),{content:u}),plotType:"ring-progress"},{percent:o})}return r&&t.render(!0),e}function UA(e){return lt(WA,Ut({}),f$,jA,It,wt,_t())(e)}var h$={percent:.2,innerRadius:.8,radius:.98,color:["#FAAD14","#E8EDF3"],statistic:{title:!1,content:{style:{fontSize:"14px",fontWeight:300,fill:"#4D4D4D",textAlign:"center",textBaseline:"middle"}}},animation:{}},v$=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="ring-process",t}return r.getDefaultOptions=function(){return h$},r.prototype.changeData=function(t){this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(Tg(t)),jA({chart:this.chart,options:this.options},!0),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return UA},r}(ft);function Di(e,r){return d$(e)||p$(e,r)||g$()}function d$(e){if(Array.isArray(e))return e}function p$(e,r){var t=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(n=(l=o.next()).done)&&(t.push(l.value),!(r&&t.length===r));n=!0);}catch(s){i=!0,a=s}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return t}function g$(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Ig(e,r,t,n){e=e.filter(function(d,p){var y=r(d,p),g=t(d,p);return y!=null&&isFinite(y)&&g!=null&&isFinite(g)}),n&&e.sort(function(d,p){return r(d)-r(p)});for(var i=e.length,a=new Float64Array(i),o=new Float64Array(i),l=0,s=0,u,c,f,h=0;h<i;)f=e[h],a[h]=u=+r(f,h,e),o[h]=c=+t(f,h,e),++h,l+=(u-l)/h,s+=(c-s)/h;for(var v=0;v<i;++v)a[v]-=l,o[v]-=s;return[a,o,l,s]}function Oa(e,r,t,n){for(var i=0,a=0,o=e.length;a<o;a++){var l=e[a],s=+r(l,a,e),u=+t(l,a,e);s!=null&&isFinite(s)&&u!=null&&isFinite(u)&&n(s,u,i++)}}function Go(e,r,t,n,i){var a=0,o=0;return Oa(e,r,t,function(l,s){var u=s-i(l),c=s-n;a+=u*u,o+=c*c}),1-a/o}function qA(e){return Math.atan2(e[1][1]-e[0][1],e[1][0]-e[0][0])*180/Math.PI}function y$(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}function Bs(e,r,t){for(var n=Math.log(r-e)*Math.LOG10E+1|0,i=1*Math.pow(10,-n/2-1),a=1e4,o=[s(e),s(r)],l=0;u(o)&&l<a;);return o;function s(c){return[c,t(c)]}function u(c){l++;for(var f=c.length,h=!1,v=0;v<f-1;v++){var d=c[v],p=c[v+1],y=y$([d,p]),g=s(y[0]),m=qA([d,y]),x=qA([d,g]),w=Math.abs(m-x);w>i&&(c.splice(v+1,0,g),h=!0)}return h}}function Rs(e,r,t,n){var i=n-e*e,a=Math.abs(i)<1e-24?0:(t-e*r)/i,o=r-a*e;return[o,a]}function m$(){var e=function(a){return a[0]},r=function(a){return a[1]},t;function n(i){var a=0,o=0,l=0,s=0,u=0,c=0,f=t?+t[0]:1/0,h=t?+t[1]:-1/0;Oa(i,e,r,function(x,w){var C=Math.log(w),M=x*w;++a,o+=(w-o)/a,s+=(M-s)/a,c+=(x*M-c)/a,l+=(w*C-l)/a,u+=(M*C-u)/a,t||(x<f&&(f=x),x>h&&(h=x))});var v=Rs(s/o,l/o,u/o,c/o),d=Di(v,2),p=d[0],y=d[1];p=Math.exp(p);var g=function(w){return p*Math.exp(y*w)},m=Bs(f,h,g);return m.a=p,m.b=y,m.predict=g,m.rSquared=Go(i,e,r,o,g),m}return n.domain=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}function ZA(){var e=function(a){return a[0]},r=function(a){return a[1]},t;function n(i){var a=0,o=0,l=0,s=0,u=0,c=t?+t[0]:1/0,f=t?+t[1]:-1/0;Oa(i,e,r,function(m,x){++a,o+=(m-o)/a,l+=(x-l)/a,s+=(m*x-s)/a,u+=(m*m-u)/a,t||(m<c&&(c=m),m>f&&(f=m))});var h=Rs(o,l,s,u),v=Di(h,2),d=v[0],p=v[1],y=function(x){return p*x+d},g=[[c,y(c)],[f,y(f)]];return g.a=p,g.b=d,g.predict=y,g.rSquared=Go(i,e,r,l,y),g}return n.domain=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}function x$(e){e.sort(function(t,n){return t-n});var r=e.length/2;return r%1===0?(e[r-1]+e[r])/2:e[Math.floor(r)]}var QA=2,KA=1e-12;function w$(){var e=function(a){return a[0]},r=function(a){return a[1]},t=.3;function n(i){for(var a=Ig(i,e,r,!0),o=Di(a,4),l=o[0],s=o[1],u=o[2],c=o[3],f=l.length,h=Math.max(2,~~(t*f)),v=new Float64Array(f),d=new Float64Array(f),p=new Float64Array(f).fill(1),y=-1;++y<=QA;){for(var g=[0,h-1],m=0;m<f;++m){for(var x=l[m],w=g[0],C=g[1],M=x-l[w]>l[C]-x?w:C,A=0,b=0,T=0,k=0,P=0,O=1/Math.abs(l[M]-x||1),V=w;V<=C;++V){var W=l[V],q=s[V],L=S$(Math.abs(x-W)*O)*p[V],H=W*L;A+=L,b+=H,T+=q*L,k+=q*H,P+=W*H}var N=Rs(b/A,T/A,k/A,P/A),_=Di(N,2),$=_[0],X=_[1];v[m]=$+X*x,d[m]=Math.abs(s[m]-v[m]),C$(l,m+1,g)}if(y===QA)break;var K=x$(d);if(Math.abs(K)<KA)break;for(var ct=0,nt,ot;ct<f;++ct)nt=d[ct]/(6*K),p[ct]=nt>=1?KA:(ot=1-nt*nt)*ot}return M$(l,v,u,c)}return n.bandwidth=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}function S$(e){return(e=1-e*e*e)*e*e}function C$(e,r,t){var n=e[r],i=t[0],a=t[1]+1;if(!(a>=e.length))for(;r>i&&e[a]-n<=n-e[i];)t[0]=++i,t[1]=a,++a}function M$(e,r,t,n){for(var i=e.length,a=[],o=0,l=0,s=[],u;o<i;++o)u=e[o]+t,s[0]===u?s[1]+=(r[o]-s[1])/++l:(l=0,s[1]+=n,s=[u,r[o]],a.push(s));return s[1]+=n,a}function A$(){var e=function(o){return o[0]},r=function(o){return o[1]},t=Math.E,n;function i(a){var o=0,l=0,s=0,u=0,c=0,f=n?+n[0]:1/0,h=n?+n[1]:-1/0,v=Math.log(t);Oa(a,e,r,function(w,C){var M=Math.log(w)/v;++o,l+=(M-l)/o,s+=(C-s)/o,u+=(M*C-u)/o,c+=(M*M-c)/o,n||(w<f&&(f=w),w>h&&(h=w))});var d=Rs(l,s,u,c),p=Di(d,2),y=p[0],g=p[1],m=function(C){return g*Math.log(C)/v+y},x=Bs(f,h,m);return x.a=g,x.b=y,x.predict=m,x.rSquared=Go(a,e,r,s,m),x}return i.domain=function(a){return arguments.length?(n=a,i):n},i.x=function(a){return arguments.length?(e=a,i):e},i.y=function(a){return arguments.length?(r=a,i):r},i.base=function(a){return arguments.length?(t=a,i):t},i}function JA(){var e=function(a){return a[0]},r=function(a){return a[1]},t;function n(i){var a=Ig(i,e,r),o=Di(a,4),l=o[0],s=o[1],u=o[2],c=o[3],f=l.length,h=0,v=0,d=0,p=0,y=0,g,m,x,w;for(g=0;g<f;)m=l[g],x=s[g++],w=m*m,h+=(w-h)/g,v+=(w*m-v)/g,d+=(w*w-d)/g,p+=(m*x-p)/g,y+=(w*x-y)/g;var C=0,M=0,A=t?+t[0]:1/0,b=t?+t[1]:-1/0;Oa(i,e,r,function(L,H){M++,C+=(H-C)/M,t||(L<A&&(A=L),L>b&&(b=L))});var T=d-h*h,k=h*T-v*v,P=(y*h-p*v)/k,O=(p*T-y*v)/k,V=-P*h,W=function(H){return H=H-u,P*H*H+O*H+V+c},q=Bs(A,b,W);return q.a=P,q.b=O-2*P*u,q.c=V-O*u+P*u*u+c,q.predict=W,q.rSquared=Go(i,e,r,C,W),q}return n.domain=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}function F$(){var e=function(o){return o[0]},r=function(o){return o[1]},t=3,n;function i(a){if(t===1){var o=ZA().x(e).y(r).domain(n)(a);return o.coefficients=[o.b,o.a],delete o.a,delete o.b,o}if(t===2){var l=JA().x(e).y(r).domain(n)(a);return l.coefficients=[l.c,l.b,l.a],delete l.a,delete l.b,delete l.c,l}var s=Ig(a,e,r),u=Di(s,4),c=u[0],f=u[1],h=u[2],v=u[3],d=c.length,p=[],y=[],g=t+1,m=0,x=0,w=n?+n[0]:1/0,C=n?+n[1]:-1/0;Oa(a,e,r,function(W,q){++x,m+=(q-m)/x,n||(W<w&&(w=W),W>C&&(C=W))});var M,A,b,T,k;for(M=0;M<g;++M){for(b=0,T=0;b<d;++b)T+=Math.pow(c[b],M)*f[b];for(p.push(T),k=new Float64Array(g),A=0;A<g;++A){for(b=0,T=0;b<d;++b)T+=Math.pow(c[b],M+A);k[A]=T}y.push(k)}y.push(p);var P=E$(y),O=function(q){q-=h;var L=v+P[0]+P[1]*q+P[2]*q*q;for(M=3;M<g;++M)L+=P[M]*Math.pow(q,M);return L},V=Bs(w,C,O);return V.coefficients=b$(g,P,-h,v),V.predict=O,V.rSquared=Go(a,e,r,m,O),V}return i.domain=function(a){return arguments.length?(n=a,i):n},i.x=function(a){return arguments.length?(e=a,i):e},i.y=function(a){return arguments.length?(r=a,i):r},i.order=function(a){return arguments.length?(t=a,i):t},i}function b$(e,r,t,n){var i=Array(e),a,o,l,s;for(a=0;a<e;++a)i[a]=0;for(a=e-1;a>=0;--a)for(l=r[a],s=1,i[a]+=l,o=1;o<=a;++o)s*=(a+1-o)/o,i[a-o]+=l*Math.pow(t,o)*s;return i[0]+=n,i}function E$(e){var r=e.length-1,t=[],n,i,a,o,l;for(n=0;n<r;++n){for(o=n,i=n+1;i<r;++i)Math.abs(e[n][i])>Math.abs(e[n][o])&&(o=i);for(a=n;a<r+1;++a)l=e[a][n],e[a][n]=e[a][o],e[a][o]=l;for(i=n+1;i<r;++i)for(a=r;a>=n;a--)e[a][i]-=e[a][n]*e[n][i]/e[n][n]}for(i=r-1;i>=0;--i){for(l=0,a=i+1;a<r;++a)l+=e[a][i]*t[a];t[i]=(e[r][i]-l)/e[i][i]}return t}function k$(){var e=function(a){return a[0]},r=function(a){return a[1]},t;function n(i){var a=0,o=0,l=0,s=0,u=0,c=0,f=t?+t[0]:1/0,h=t?+t[1]:-1/0;Oa(i,e,r,function(x,w){var C=Math.log(x),M=Math.log(w);++a,o+=(C-o)/a,l+=(M-l)/a,s+=(C*M-s)/a,u+=(C*C-u)/a,c+=(w-c)/a,t||(x<f&&(f=x),x>h&&(h=x))});var v=Rs(o,l,s,u),d=Di(v,2),p=d[0],y=d[1];p=Math.exp(p);var g=function(w){return p*Math.pow(w,y)},m=Bs(f,h,g);return m.a=p,m.b=y,m.predict=g,m.rSquared=Go(i,e,r,c,g),m}return n.domain=function(i){return arguments.length?(t=i,n):t},n.x=function(i){return arguments.length?(e=i,n):e},n.y=function(i){return arguments.length?(r=i,n):r},n}var T$={exp:m$,linear:ZA,loess:w$,log:A$,poly:F$,pow:k$,quad:JA};function I$(e,r){var t=10,n={regionStyle:[{position:{start:[e,"max"],end:["max",r]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:["min","max"],end:[e,r]},style:{fill:"#a3dda1",opacity:.4}},{position:{start:["min",r],end:[e,"min"]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:[e,r],end:["max","min"]},style:{fill:"#a3dda1",opacity:.4}}],lineStyle:{stroke:"#9ba29a",lineWidth:1},labelStyle:[{position:["max",r],offsetX:-t,offsetY:-t,style:{textAlign:"right",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:-t,style:{textAlign:"left",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:t,style:{textAlign:"left",textBaseline:"top",fontSize:14,fill:"#ccc"}},{position:["max",r],offsetX:-t,offsetY:t,style:{textAlign:"right",textBaseline:"top",fontSize:14,fill:"#ccc"}}]};return n}var P$=function(e,r){var t=r.view,n=r.options,i=n.xField,a=n.yField,o=t.getScaleByField(i),l=t.getScaleByField(a),s=e.map(function(u){return t.getCoordinate().convert({x:o.scale(u[0]),y:l.scale(u[1])})});return jV(s,!1)},L$=function(e){var r=e.options,t=r.xField,n=r.yField,i=r.data,a=r.regressionLine,o=a.type,l=o===void 0?"linear":o,s=a.algorithm,u=a.equation,c,f=null;if(s)c=G(s)?s:s(i),f=u;else{var h=T$[l]().x(function(v){return v[t]}).y(function(v){return v[n]});c=h(i),f=D$(l,c)}return[P$(c,e),f]},O$=function(e){var r,t=e.meta,n=t===void 0?{}:t,i=e.xField,a=e.yField,o=e.data,l=o[0][i],s=o[0][a],u=l>0,c=s>0;function f(h,v){var d=E(n,[h]);function p(g){return E(d,g)}var y={};return v==="x"?(st(l)&&(st(p("min"))||(y.min=u?0:l*2),st(p("max"))||(y.max=u?l*2:0)),y):(st(s)&&(st(p("min"))||(y.min=c?0:s*2),st(p("max"))||(y.max=c?s*2:0)),y)}return S(S({},n),(r={},r[i]=S(S({},n[i]),f(i,"x")),r[a]=S(S({},n[a]),f(a,"y")),r))};function D$(e,r){var t,n,i,a=function(u,c){return c===void 0&&(c=4),Math.round(u*Math.pow(10,c))/Math.pow(10,c)},o=function(u){return Number.isFinite(u)?a(u):"?"};switch(e){case"linear":return"y = ".concat(o(r.a),"x + ").concat(o(r.b),", R^2 = ").concat(o(r.rSquared));case"exp":return"y = ".concat(o(r.a),"e^(").concat(o(r.b),"x), R^2 = ").concat(o(r.rSquared));case"log":return"y = ".concat(o(r.a),"ln(x) + ").concat(o(r.b),", R^2 = ").concat(o(r.rSquared));case"quad":return"y = ".concat(o(r.a),"x^2 + ").concat(o(r.b),"x + ").concat(o(r.c),", R^2 = ").concat(o(r.rSquared));case"poly":for(var l="y = ".concat(o((t=r.coefficients)===null||t===void 0?void 0:t[0])," + ").concat(o((n=r.coefficients)===null||n===void 0?void 0:n[1]),"x + ").concat(o((i=r.coefficients)===null||i===void 0?void 0:i[2]),"x^2"),s=3;s<r.coefficients.length;++s)l+=" + ".concat(o(r.coefficients[s]),"x^").concat(s);return"".concat(l,", R^2 = ").concat(o(r.rSquared));case"pow":return"y = ".concat(o(r.a),"x^").concat(o(r.b),", R^2 = ").concat(o(r.rSquared))}return null}function tF(e){var r=e.data,t=r===void 0?[]:r,n=e.xField,i=e.yField;if(t.length){for(var a=!0,o=!0,l=t[0],s=void 0,u=1;u<t.length&&(s=t[u],l[n]!==s[n]&&(a=!1),l[i]!==s[i]&&(o=!1),!(!a&&!o));u++)l=s;var c=[];a&&c.push(n),o&&c.push(i);var f=bt(O$(e),c);return B({},e,{meta:f})}return e}function B$(e){var r=e.chart,t=e.options,n=t.data,i=t.type,a=t.color,o=t.shape,l=t.pointStyle,s=t.shapeField,u=t.colorField,c=t.xField,f=t.yField,h=t.sizeField,v=t.size,d=t.tooltip;h&&(v||(v=[2,8]),st(v)&&(v=[v,v])),d&&!d.fields&&(d=S(S({},d),{fields:[c,f,u,h,s]})),r.data(n),gr(B({},e,{options:{seriesField:u,point:{color:a,shape:o,size:v,style:l},tooltip:d}}));var p=Ae(r,"point");return i&&p.adjust(i),e}function Hf(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField,l=tF(t);return lt(Ut((r={},r[a]=n,r[o]=i,r)))(B({},e,{options:l}))}function R$(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return r.axis(a,n),r.axis(o,i),e}function N$(e){var r=e.chart,t=e.options,n=t.legend,i=t.colorField,a=t.shapeField,o=t.sizeField,l=t.shapeLegend,s=t.sizeLegend,u=n!==!1;return i&&r.legend(i,u?n:!1),a&&(l?r.legend(a,l):r.legend(a,l===!1?!1:n)),o&&r.legend(o,s||!1),!u&&!l&&!s&&r.legend(!1),e}function z$(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"point");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:fe(l)})}return e}function Y$(e){var r=e.options,t=r.quadrant,n=[];if(t){var i=t.xBaseline,a=i===void 0?0:i,o=t.yBaseline,l=o===void 0?0:o,s=t.labels,u=t.regionStyle,c=t.lineStyle,f=I$(a,l),h=new Array(4).join(",").split(",");h.forEach(function(v,d){n.push(S(S({type:"region",top:!1},f.regionStyle[d].position),{style:B({},f.regionStyle[d].style,u==null?void 0:u[d])}),S({type:"text",top:!0},B({},f.labelStyle[d],s==null?void 0:s[d])))}),n.push({type:"line",top:!1,start:["min",l],end:["max",l],style:B({},f.lineStyle,c)},{type:"line",top:!1,start:[a,"min"],end:[a,"max"],style:B({},f.lineStyle,c)})}return lt(_t(n))(e)}function V$(e){var r=e.options,t=e.chart,n=r.regressionLine;if(n){var i=n.style,a=n.equationStyle,o=a===void 0?{}:a,l=n.top,s=l===void 0?!1:l,u=n.showEquation,c=u===void 0?!1:u,f={stroke:"#9ba29a",lineWidth:2,opacity:.5},h={x:20,y:20,textAlign:"left",textBaseline:"middle",fontSize:14,fillOpacity:.5};t.annotation().shape({top:s,render:function(v,d){var p=v.addGroup({id:"".concat(t.id,"-regression-line"),name:"regression-line-group"}),y=L$({view:d,options:r}),g=y[0],m=y[1];p.addShape("path",{name:"regression-line",attrs:S(S({path:g},f),i)}),c&&p.addShape("text",{name:"regression-equation",attrs:S(S(S({},h),o),{text:m})})}})}return e}function _$(e){var r=e.chart,t=e.options,n=t.tooltip;return n?r.tooltip(n):n===!1&&r.tooltip(!1),e}function eF(e){return lt(B$,Hf,R$,N$,_$,z$,pA,Is,dg,Yt,Y$,It,wt,V$)(e)}var $$=B({},ft.getDefaultOptions(),{size:4,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!0,crosshairs:{type:"xy"}}});ut("drag-move",{start:[{trigger:"plot:mousedown",action:"scale-translate:start"}],processing:[{trigger:"plot:mousemove",action:"scale-translate:translate",throttle:{wait:100,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseup",action:"scale-translate:end"}]});var rF=function(e){I(r,e);function r(t,n){var i=e.call(this,t,n)||this;return i.type="scatter",i.on(ht.BEFORE_RENDER,function(a){var o,l,s=i,u=s.options,c=s.chart;if(((o=a.data)===null||o===void 0?void 0:o.source)===tr.FILTER){var f=i.chart.filterData(i.chart.getData());Hf({chart:c,options:S(S({},u),{data:f})})}((l=a.data)===null||l===void 0?void 0:l.source)===tr.RESET&&Hf({chart:c,options:u})}),i}return r.getDefaultOptions=function(){return $$},r.prototype.changeData=function(t){this.updateOption(tF(B({},this.options,{data:t})));var n=this,i=n.options,a=n.chart;Hf({chart:a,options:i}),this.chart.changeData(t)},r.prototype.getSchemaAdaptor=function(){return eF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(ft),Ns="$$stock-range$$",Wf="trend",nF="up",iF="down",G$={showMarkers:!1,showCrosshairs:!0,shared:!0,crosshairs:{type:"xy",follow:!0,text:function(e,r,t){var n;if(e==="x"){var i=t[0];n=i?i.title:r}else n=r;return{position:e==="y"?"start":"end",content:n,style:{fill:"#dfdfdf"}}},textBackground:{padding:[2,4],style:{fill:"#666"}}}},H$=B({},ft.getDefaultOptions(),{tooltip:G$,interactions:[{type:"tooltip"}],legend:{position:"top-left"},risingFill:"#ef5350",fallingFill:"#26a69a"});function aF(e,r){return zt(e,function(t){var n=t&&S({},t);if(G(r)&&n){var i=r[0],a=r[1],o=r[2],l=r[3];n[Wf]=n[i]<=n[a]?nF:iF,n[Ns]=[n[i],n[a],n[o],n[l]]}return n})}function W$(e){var r=e.chart,t=e.options,n=t.yField,i=t.data,a=t.risingFill,o=t.fallingFill,l=t.tooltip,s=t.stockStyle;r.data(aF(i,n));var u=l;return u!==!1&&(u=B({},{fields:n},u)),pg(B({},e,{options:{schema:{shape:"candle",color:[a,o],style:s},yField:Ns,seriesField:Wf,rawFields:n,tooltip:u}})),e}function X$(e){var r,t,n=e.chart,i=e.options,a=i.meta,o=i.xAxis,l=i.yAxis,s=i.xField,u=(r={},r[s]={type:"timeCat",tickCount:6},r[Wf]={values:[nF,iF]},r),c=B(u,a,(t={},t[s]=bt(o,er),t[Ns]=bt(l,er),t));return n.scale(c),e}function j$(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(Ns,!1):r.axis(Ns,i),e}function U$(e){var r=e.chart,t=e.options,n=t.tooltip;return n!==!1?r.tooltip(n):r.tooltip(!1),e}function q$(e){var r=e.chart,t=e.options,n=t.legend;return n?r.legend(Wf,n):n===!1&&r.legend(!1),e}function oF(e){lt(wt,W$,X$,j$,U$,q$,Yt,It,_t(),Is)(e)}var Z$=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="stock",t}return r.getDefaultOptions=function(){return H$},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return oF},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options.yField;this.chart.changeData(aF(t,n))},r}(ft);function Da(e){return zt(e||[],function(r,t){return{x:"".concat(t),y:r}})}var zs="x",Ho="y",lF={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return"".concat(E(r,[0,"data","y"],0))},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},Q$={appendPadding:2,tooltip:S({},lF),animation:{}};function K$(e){var r=e.chart,t=e.options,n=t.data,i=t.color,a=t.areaStyle,o=t.point,l=t.line,s=o==null?void 0:o.state,u=Da(n);r.data(u);var c=B({},e,{options:{xField:zs,yField:Ho,area:{color:i,style:a},line:l,point:o}}),f=B({},c,{options:{tooltip:!1}}),h=B({},c,{options:{tooltip:!1,state:s}});return Of(c),_o(f),gr(h),r.axis(!1),r.legend(!1),e}function Wo(e){var r,t,n=e.options,i=n.xAxis,a=n.yAxis,o=n.data,l=Da(o);return lt(Ut((r={},r[zs]=i,r[Ho]=a,r),(t={},t[zs]={type:"cat"},t[Ho]=lg(l,Ho),t)))(e)}function sF(e){return lt(pr("areaStyle"),K$,Wo,le,wt,It,_t())(e)}var J$={appendPadding:2,tooltip:S({},lF),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},tG=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-area",t}return r.getDefaultOptions=function(){return J$},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;Wo({chart:i,options:a}),i.changeData(Da(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return sF},r}(ft);function eG(e){var r=e.chart,t=e.options,n=t.data,i=t.color,a=t.columnStyle,o=t.columnWidthRatio,l=Da(n);r.data(l);var s=B({},e,{options:{xField:zs,yField:Ho,widthRatio:o,interval:{style:a,color:i}}});return Fe(s),r.axis(!1),r.legend(!1),r.interaction("element-active"),e}function uF(e){return lt(wt,pr("columnStyle"),eG,Wo,le,It,_t())(e)}var rG={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return"".concat(E(r,[0,"data","y"],0))},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},nG={appendPadding:2,tooltip:S({},rG),animation:{}},iG=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-column",t}return r.getDefaultOptions=function(){return nG},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;Wo({chart:i,options:a}),i.changeData(Da(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return uF},r}(ft);function aG(e){var r=e.chart,t=e.options,n=t.data,i=t.color,a=t.lineStyle,o=t.point,l=o==null?void 0:o.state,s=Da(n);r.data(s);var u=B({},e,{options:{xField:zs,yField:Ho,line:{color:i,style:a},point:o}}),c=B({},u,{options:{tooltip:!1,state:l}});return _o(u),gr(c),r.axis(!1),r.legend(!1),e}function cF(e){return lt(aG,Wo,wt,le,It,_t())(e)}var oG=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-line",t}return r.getDefaultOptions=function(){return Q$},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;Wo({chart:i,options:a}),i.changeData(Da(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return cF},r}(ft),lG={line:fA,pie:$A,column:Vf,bar:yA,area:hA,gauge:OA,"tiny-line":cF,"tiny-column":uF,"tiny-area":sF,"ring-progress":UA,progress:XA,scatter:eF,histogram:RA,funnel:bA,stock:oF},sG={line:NA,pie:GA,column:xA,bar:mA,area:vA,gauge:V_,"tiny-line":oG,"tiny-column":iG,"tiny-area":tG,"ring-progress":v$,progress:c$,scatter:rF,histogram:j_,funnel:L_,stock:Z$},uG={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function Pg(e,r,t){var n=sG[e];if(!n){console.error("could not find ".concat(e," plot"));return}var i=lG[e];i({chart:r,options:B({},n.getDefaultOptions(),E(uG,e,{}),t)})}function cG(e){var r=e.chart,t=e.options,n=t.views,i=t.legend;return F(n,function(a){var o=a.region,l=a.data,s=a.meta,u=a.axes,c=a.coordinate,f=a.interactions,h=a.annotations,v=a.tooltip,d=a.geometries,p=r.createView({region:o});p.data(l);var y={};u&&F(u,function(g,m){y[m]=bt(g,er)}),y=B({},s,y),p.scale(y),u?F(u,function(g,m){p.axis(m,g)}):p.axis(!1),p.coordinate(c),F(d,function(g){var m=rr({chart:p,options:g}).ext,x=g.adjust;x&&m.geometry.adjust(x)}),F(f,function(g){g.enable===!1?p.removeInteraction(g.type):p.interaction(g.type,g.cfg)}),F(h,function(g){p.annotation()[g.type](S({},g))}),typeof a.animation=="boolean"?p.animate(!1):(p.animate(!0),F(p.geometries,function(g){g.animate(a.animation)})),v&&(p.interaction("tooltip"),p.tooltip(v))}),i?F(i,function(a,o){r.legend(o,a)}):r.legend(!1),r.tooltip(t.tooltip),e}function fG(e){var r=e.chart,t=e.options,n=t.plots,i=t.data,a=i===void 0?[]:i;return F(n,function(o){var l=o.type,s=o.region,u=o.options,c=u===void 0?{}:u,f=o.top,h=c.tooltip;if(f){Pg(l,r,S(S({},c),{data:a}));return}var v=r.createView(S({region:s},bt(c,lA)));h&&v.interaction("tooltip"),Pg(l,v,S({data:a},c))}),e}function hG(e){var r=e.chart,t=e.options;return r.option("slider",t.slider),e}function vG(e){return lt(It,cG,fG,Yt,It,wt,le,hG,_t())(e)}function dG(e,r){var t=e.getModel(),n=t.data,i;return G(n)?i=n[0][r]:i=n[r],i}function pG(e){var r=bf(e);F(r,function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)})}var gG=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAssociationItems=function(t,n){var i,a=this.context.event,o=n||{},l=o.linkField,s=o.dim,u=[];if(!((i=a.data)===null||i===void 0)&&i.data){var c=a.data.data;F(t,function(f){var h,v,d=l;if(s==="x"?d=f.getXScale().field:s==="y"?d=(h=f.getYScales().find(function(y){return y.field===d}))===null||h===void 0?void 0:h.field:d||(d=(v=f.getGroupScales()[0])===null||v===void 0?void 0:v.field),!!d){var p=zt(bf(f),function(y){var g=!1,m=!1,x=G(c)?E(c[0],d):E(c,d);return dG(y,d)===x?g=!0:m=!0,{element:y,view:f,active:g,inactive:m}});u.push.apply(u,p)}})}return u},r.prototype.showTooltip=function(t){var n=QM(this.context.view),i=this.getAssociationItems(n,t);F(i,function(a){if(a.active){var o=a.element.shape.getCanvasBBox();a.view.showTooltip({x:o.minX+o.width/2,y:o.minY+o.height/2})}})},r.prototype.hideTooltip=function(){var t=QM(this.context.view);F(t,function(n){n.hideTooltip()})},r.prototype.active=function(t){var n=ks(this.context.view),i=this.getAssociationItems(n,t);F(i,function(a){var o=a.active,l=a.element;o&&l.setState("active",!0)})},r.prototype.selected=function(t){var n=ks(this.context.view),i=this.getAssociationItems(n,t);F(i,function(a){var o=a.active,l=a.element;o&&l.setState("selected",!0)})},r.prototype.highlight=function(t){var n=ks(this.context.view),i=this.getAssociationItems(n,t);F(i,function(a){var o=a.inactive,l=a.element;o&&l.setState("inactive",!0)})},r.prototype.reset=function(){var t=ks(this.context.view);F(t,function(n){pG(n)})},r}(Bt);et("association",gG),ut("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),ut("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),ut("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),ut("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="mix",t}return r.prototype.getSchemaAdaptor=function(){return vG},r}(ft);var fF;(function(e){e.DEV="DEV",e.BETA="BETA",e.STABLE="STABLE"})(fF||(fF={}));var xn="first-axes-view",wn="second-axes-view",Ba="series-field-key";function hF(e,r,t,n,i){var a=[];r.forEach(function(f){n.forEach(function(h){var v,d=(v={},v[e]=h[e],v[t]=f,v[f]=h[f],v);a.push(d)})});var o=Object.values(hr(a,t)),l=o[0],s=l===void 0?[]:l,u=o[1],c=u===void 0?[]:u;return i?[s.reverse(),c.reverse()]:[s,c]}function _n(e){return e!=="vertical"}function yG(e,r,t){var n=r[0],i=r[1],a=n.autoPadding,o=i.autoPadding,l=e.__axisPosition,s=l.layout,u=l.position;if(_n(s)&&u==="top"&&(n.autoPadding=t.instance(a.top,0,a.bottom,a.left),i.autoPadding=t.instance(o.top,a.left,o.bottom,0)),_n(s)&&u==="bottom"&&(n.autoPadding=t.instance(a.top,a.right/2+5,a.bottom,a.left),i.autoPadding=t.instance(o.top,o.right,o.bottom,a.right/2+5)),!_n(s)&&u==="bottom"){var c=a.left>=o.left?a.left:o.left;n.autoPadding=t.instance(a.top,a.right,a.bottom/2+5,c),i.autoPadding=t.instance(a.bottom/2+5,o.right,o.bottom,c)}if(!_n(s)&&u==="top"){var c=a.left>=o.left?a.left:o.left;n.autoPadding=t.instance(a.top,a.right,0,c),i.autoPadding=t.instance(0,o.right,a.top,c)}}function mG(e){var r=e.chart,t=e.options,n=t.data,i=t.xField,a=t.yField,o=t.color,l=t.barStyle,s=t.widthRatio,u=t.legend,c=t.layout,f=hF(i,a,Ba,n,_n(c));u?r.legend(Ba,u):u===!1&&r.legend(!1);var h,v,d=f[0],p=f[1];_n(c)?(h=r.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:xn}),h.coordinate().transpose().reflect("x"),v=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:wn}),v.coordinate().transpose(),h.data(d),v.data(p)):(h=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:xn}),v=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:wn}),v.coordinate().reflect("y"),h.data(d),v.data(p));var y=B({},e,{chart:h,options:{widthRatio:s,xField:i,yField:a[0],seriesField:Ba,interval:{color:o,style:l}}});Fe(y);var g=B({},e,{chart:v,options:{xField:i,yField:a[1],seriesField:Ba,widthRatio:s,interval:{color:o,style:l}}});return Fe(g),e}function xG(e){var r,t,n,i=e.options,a=e.chart,o=i.xAxis,l=i.yAxis,s=i.xField,u=i.yField,c=vt(a,xn),f=vt(a,wn),h={};return uo((i==null?void 0:i.meta)||{}).map(function(v){E(i==null?void 0:i.meta,[v,"alias"])&&(h[v]=i.meta[v].alias)}),a.scale((r={},r[Ba]={sync:!0,formatter:function(v){return E(h,v,v)}},r)),Ut((t={},t[s]=o,t[u[0]]=l[u[0]],t))(B({},e,{chart:c})),Ut((n={},n[s]=o,n[u[1]]=l[u[1]],n))(B({},e,{chart:f})),e}function wG(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField,l=t.layout,s=vt(r,xn),u=vt(r,wn);return(n==null?void 0:n.position)==="bottom"?u.axis(a,S(S({},n),{label:{formatter:function(){return""}}})):u.axis(a,!1),n===!1?s.axis(a,!1):s.axis(a,S({position:_n(l)?"top":"bottom"},n)),i===!1?(s.axis(o[0],!1),u.axis(o[1],!1)):(s.axis(o[0],i[o[0]]),u.axis(o[1],i[o[1]])),r.__axisPosition={position:s.getOptions().axes[a].position,layout:l},e}function SG(e){var r=e.chart;return Yt(B({},e,{chart:vt(r,xn)})),Yt(B({},e,{chart:vt(r,wn)})),e}function CG(e){var r=e.chart,t=e.options,n=t.yField,i=t.yAxis;return Ta(B({},e,{chart:vt(r,xn),options:{yAxis:i[n[0]]}})),Ta(B({},e,{chart:vt(r,wn),options:{yAxis:i[n[1]]}})),e}function MG(e){var r=e.chart;return wt(B({},e,{chart:vt(r,xn)})),wt(B({},e,{chart:vt(r,wn)})),wt(e),e}function AG(e){var r=e.chart;return It(B({},e,{chart:vt(r,xn)})),It(B({},e,{chart:vt(r,wn)})),e}function FG(e){var r=this,t,n,i=e.chart,a=e.options,o=a.label,l=a.yField,s=a.layout,u=vt(i,xn),c=vt(i,wn),f=Ae(u,"interval"),h=Ae(c,"interval");if(!o)f.label(!1),h.label(!1);else{var v=o.callback,d=kt(o,["callback"]);d.position||(d.position="middle"),d.offset===void 0&&(d.offset=2);var p=S({},d);if(_n(s)){var y=((t=p.style)===null||t===void 0?void 0:t.textAlign)||(d.position==="middle"?"center":"left");d.style=B({},d.style,{textAlign:y});var g={left:"right",right:"left",center:"center"};p.style=B({},p.style,{textAlign:g[y]})}else{var m={top:"bottom",bottom:"top",middle:"middle"};typeof d.position=="string"?d.position=m[d.position]:typeof d.position=="function"&&(d.position=function(){for(var C=[],M=0;M<arguments.length;M++)C[M]=arguments[M];return m[d.position.apply(r,C)]});var x=((n=p.style)===null||n===void 0?void 0:n.textBaseline)||"bottom";p.style=B({},p.style,{textBaseline:x});var w={top:"bottom",bottom:"top",middle:"middle"};d.style=B({},d.style,{textBaseline:w[x]})}f.label({fields:[l[0]],callback:v,cfg:fe(p)}),h.label({fields:[l[1]],callback:v,cfg:fe(d)})}return e}function bG(e){return lt(mG,xG,wG,CG,MG,FG,le,SG,AG)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bidirectional-bar",t}return r.getDefaultOptions=function(){return B({},e.getDefaultOptions.call(this),{syncViewPadding:yG})},r.prototype.changeData=function(t){t===void 0&&(t=[]),this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null)),this.updateOption({data:t});var n=this.options,i=n.xField,a=n.yField,o=n.layout,l=hF(i,a,Ba,t,_n(o)),s=l[0],u=l[1],c=vt(this.chart,xn),f=vt(this.chart,wn);c.data(s),f.data(u),this.chart.render(!0),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return bG},r.SERIES_FIELD_KEY=Ba,r})(ft);var Lg,Xo="$$range$$",EG="low-q1-median-q3-high",kG="$$y_outliers$$",vF="outliers_view",TG=B({},ft.getDefaultOptions(),{meta:(Lg={},Lg[Xo]={min:0,alias:EG},Lg),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}}),dF=function(e,r){var t=e;if(Array.isArray(r)){var n=r[0],i=r[1],a=r[2],o=r[3],l=r[4];t=zt(e,function(s){return s[Xo]=[s[n],s[i],s[a],s[o],s[l]],s})}return t};function IG(e){var r=e.chart,t=e.options,n=t.xField,i=t.yField,a=t.groupField,o=t.color,l=t.tooltip,s=t.boxStyle;r.data(dF(t.data,i));var u=G(i)?Xo:i,c=i?G(i)?i:[i]:[],f=l;f!==!1&&(f=B({},{fields:G(i)?i:[]},f));var h=pg(B({},e,{options:{xField:n,yField:u,seriesField:a,tooltip:f,rawFields:c,label:!1,schema:{shape:"box",color:o,style:s}}})).ext;return a&&h.geometry.adjust("dodge"),e}function PG(e){var r=e.chart,t=e.options,n=t.xField,i=t.data,a=t.outliersField,o=t.outliersStyle,l=t.padding,s=t.label;if(!a)return e;var u=r.createView({padding:l,id:vF}),c=i.reduce(function(f,h){var v=h[a];return v.forEach(function(d){var p;return f.push(S(S({},h),(p={},p[a]=d,p)))}),f},[]);return u.data(c),gr({chart:u,options:{xField:n,yField:a,point:{shape:"circle",style:o},label:s}}),u.axis(!1),e}function LG(e){var r,t,n=e.chart,i=e.options,a=i.meta,o=i.xAxis,l=i.yAxis,s=i.xField,u=i.yField,c=i.outliersField,f=Array.isArray(u)?Xo:u,h={};if(c){var v=kG;h=(r={},r[c]={sync:v,nice:!0},r[f]={sync:v,nice:!0},r)}var d=B(h,a,(t={},t[s]=bt(o,er),t[f]=bt(l,er),t));return n.scale(d),e}function OG(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField,l=Array.isArray(o)?Xo:o;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(Xo,!1):r.axis(l,i),e}function DG(e){var r=e.chart,t=e.options,n=t.legend,i=t.groupField;return i?n?r.legend(i,n):r.legend(i,{position:"bottom"}):r.legend(!1),e}function BG(e){return lt(IG,PG,LG,OG,DG,le,_t(),Yt,It,wt)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="box",t}return r.getDefaultOptions=function(){return TG},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options.yField,i=this.chart.views.find(function(a){return a.id===vF});i&&i.data(t),this.chart.changeData(dF(t,n))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return BG},r})(ft);function pF(e,r,t){return e.length>1?"".concat(r,"_").concat(t):"".concat(r)}function gF(e){var r=e.data,t=e.xField,n=e.measureField,i=e.rangeField,a=e.targetField,o=e.layout,l=[],s=[];r.forEach(function(f,h){var v=[f[i]].flat();v.sort(function(y,g){return y-g}),v.forEach(function(y,g){var m,x=g===0?y:v[g]-v[g-1];l.push((m={rKey:"".concat(i,"_").concat(g)},m[t]=t?f[t]:String(h),m[i]=x,m))});var d=[f[n]].flat();d.forEach(function(y,g){var m;l.push((m={mKey:pF(d,n,g)},m[t]=t?f[t]:String(h),m[n]=y,m))});var p=[f[a]].flat();p.forEach(function(y,g){var m;l.push((m={tKey:pF(p,a,g)},m[t]=t?f[t]:String(h),m[a]=y,m))}),s.push(f[i],f[n],f[a])});var u=Math.min.apply(Math,s.flat(1/0)),c=Math.max.apply(Math,s.flat(1/0));return u=u>0?0:u,o==="vertical"&&l.reverse(),{min:u,max:c,ds:l}}function RG(e){var r=e.chart,t=e.options,n=t.bulletStyle,i=t.targetField,a=t.rangeField,o=t.measureField,l=t.xField,s=t.color,u=t.layout,c=t.size,f=t.label,h=gF(t),v=h.min,d=h.max,p=h.ds;r.data(p);var y=B({},e,{options:{xField:l,yField:a,seriesField:"rKey",isStack:!0,label:E(f,"range"),interval:{color:E(s,"range"),style:E(n,"range"),size:E(c,"range")}}});Fe(y),r.geometries[0].tooltip(!1);var g=B({},e,{options:{xField:l,yField:o,seriesField:"mKey",isStack:!0,label:E(f,"measure"),interval:{color:E(s,"measure"),style:E(n,"measure"),size:E(c,"measure")}}});Fe(g);var m=B({},e,{options:{xField:l,yField:i,seriesField:"tKey",label:E(f,"target"),point:{color:E(s,"target"),style:E(n,"target"),size:Q(E(c,"target"))?function(x){return E(c,"target")(x)/2}:E(c,"target")/2,shape:u==="horizontal"?"line":"hyphen"}}});return gr(m),u==="horizontal"&&r.coordinate().transpose(),S(S({},e),{ext:{data:{min:v,max:d}}})}function yF(e){var r,t,n=e.options,i=e.ext,a=n.xAxis,o=n.yAxis,l=n.targetField,s=n.rangeField,u=n.measureField,c=n.xField,f=i.data;return lt(Ut((r={},r[c]=a,r[u]=o,r),(t={},t[u]={min:f==null?void 0:f.min,max:f==null?void 0:f.max,sync:!0},t[l]={sync:"".concat(u)},t[s]={sync:"".concat(u)},t)))(e)}function NG(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.measureField,l=t.rangeField,s=t.targetField;return r.axis("".concat(l),!1),r.axis("".concat(s),!1),n===!1?r.axis("".concat(a),!1):r.axis("".concat(a),n),i===!1?r.axis("".concat(o),!1):r.axis("".concat(o),i),e}function zG(e){var r=e.chart,t=e.options,n=t.legend;return r.removeInteraction("legend-filter"),r.legend(n),r.legend("rKey",!1),r.legend("mKey",!1),r.legend("tKey",!1),e}function YG(e){var r=e.chart,t=e.options,n=t.label,i=t.measureField,a=t.targetField,o=t.rangeField,l=r.geometries,s=l[0],u=l[1],c=l[2];return E(n,"range")?s.label("".concat(o),S({layout:[{type:"limit-in-plot"}]},fe(n.range))):s.label(!1),E(n,"measure")?u.label("".concat(i),S({layout:[{type:"limit-in-plot"}]},fe(n.measure))):u.label(!1),E(n,"target")?c.label("".concat(a),S({layout:[{type:"limit-in-plot"}]},fe(n.target))):c.label(!1),e}function VG(e){lt(RG,yF,NG,zG,wt,YG,le,Yt,It)(e)}var _G=B({},ft.getDefaultOptions(),{layout:"horizontal",size:{range:30,measure:20,target:20},xAxis:{tickLine:!1,line:null},bulletStyle:{range:{fillOpacity:.5}},label:{measure:{position:"right"}},tooltip:{showMarkers:!1}});(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bullet",t}return r.getDefaultOptions=function(){return _G},r.prototype.changeData=function(t){this.updateOption({data:t});var n=gF(this.options),i=n.min,a=n.max,o=n.ds;yF({options:this.options,ext:{data:{min:i,max:a}},chart:this.chart}),this.chart.changeData(o)},r.prototype.getSchemaAdaptor=function(){return VG},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r})(ft);var $G={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(e){return e.id},source:function(e){return e.source},target:function(e){return e.target},sourceWeight:function(e){return e.value||1},targetWeight:function(e){return e.value||1},sortBy:null};function GG(e,r,t){F(e,function(n,i){n.inEdges=r.filter(function(a){return"".concat(t.target(a))==="".concat(i)}),n.outEdges=r.filter(function(a){return"".concat(t.source(a))==="".concat(i)}),n.edges=n.outEdges.concat(n.inEdges),n.frequency=n.edges.length,n.value=0,n.inEdges.forEach(function(a){n.value+=t.targetWeight(a)}),n.outEdges.forEach(function(a){n.value+=t.sourceWeight(a)})})}function HG(e,r){var t={weight:function(i,a){return a.value-i.value},frequency:function(i,a){return a.frequency-i.frequency},id:function(i,a){return"".concat(r.id(i)).localeCompare("".concat(r.id(a)))}},n=t[r.sortBy];!n&&Q(r.sortBy)&&(n=r.sortBy),n&&e.sort(n)}function WG(e,r){var t=e.length;if(!t)throw new TypeError("Invalid nodes: it's empty!");if(r.weight){var n=r.nodePaddingRatio;if(n<0||n>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var i=n/(2*t),a=r.nodeWidthRatio;if(a<=0||a>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var o=0;e.forEach(function(s){o+=s.value}),e.forEach(function(s){s.weight=s.value/o,s.width=s.weight*(1-n),s.height=a}),e.forEach(function(s,u){for(var c=0,f=u-1;f>=0;f--)c+=e[f].width+2*i;var h=s.minX=i+c,v=s.maxX=s.minX+s.width,d=s.minY=r.y-a/2,p=s.maxY=d+a;s.x=[h,v,v,h],s.y=[d,d,p,p]})}else{var l=1/t;e.forEach(function(s,u){s.x=(u+.5)*l,s.y=r.y})}return e}function XG(e,r,t){if(t.weight){var n={};F(e,function(i,a){n[a]=i.value}),r.forEach(function(i){var a=t.source(i),o=t.target(i),l=e[a],s=e[o];if(l&&s){var u=n[a],c=t.sourceWeight(i),f=l.minX+(l.value-u)/l.value*l.width,h=f+c/l.value*l.width;n[a]-=c;var v=n[o],d=t.targetWeight(i),p=s.minX+(s.value-v)/s.value*s.width,y=p+d/s.value*s.width;n[o]-=d;var g=t.y;i.x=[f,h,p,y],i.y=[g,g,g,g],i.source=l,i.target=s}})}else r.forEach(function(i){var a=e[t.source(i)],o=e[t.target(i)];a&&o&&(i.x=[a.x,o.x],i.y=[a.y,o.y],i.source=a,i.target=o)});return r}function jG(e){return Tt({},$G,e)}function UG(e,r){var t=jG(e),n={},i=r.nodes,a=r.links;i.forEach(function(s){var u=t.id(s);n[u]=s}),GG(n,a,t),HG(i,t);var o=WG(i,t),l=XG(n,a,t);return{nodes:o,links:l}}var mF="x",xF="y",wF="name",SF="source",qG={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(e,r){var t=(e[0]+e[1])/2,n=t>.5?-4:4;return{offsetX:n,content:r}},labelEmit:!0,style:{fill:"#8c8c8c"}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(e){return!E(e,[0,"data","isNode"])},formatter:function(e){var r=e.source,t=e.target,n=e.value;return{name:"".concat(r," -> ").concat(t),value:n}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function ZG(e){var r=e.options,t=r.data,n=r.sourceField,i=r.targetField,a=r.weightField,o=r.nodePaddingRatio,l=r.nodeWidthRatio,s=r.rawFields,u=s===void 0?[]:s,c=GM(t,n,i,a),f=UG({weight:!0,nodePaddingRatio:o,nodeWidthRatio:l},c),h=f.nodes,v=f.links,d=h.map(function(y){return S(S({},bt(y,rt(["id","x","y","name"],u,!0))),{isNode:!0})}),p=v.map(function(y){return S(S({source:y.source.name,target:y.target.name,name:y.source.name||y.target.name},bt(y,rt(["x","y","value"],u,!0))),{isNode:!1})});return S(S({},e),{ext:S(S({},e.ext),{chordData:{nodesData:d,edgesData:p}})})}function QG(e){var r,t=e.chart;return t.scale((r={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},r[wF]={sync:"color"},r[SF]={sync:"color"},r)),e}function KG(e){var r=e.chart;return r.axis(!1),e}function JG(e){var r=e.chart;return r.legend(!1),e}function tH(e){var r=e.chart,t=e.options,n=t.tooltip;return r.tooltip(n),e}function eH(e){var r=e.chart;return r.coordinate("polar").reflect("y"),e}function rH(e){var r=e.chart,t=e.options,n=e.ext.chordData.nodesData,i=t.nodeStyle,a=t.label,o=t.tooltip,l=r.createView();return l.data(n),Df({chart:l,options:{xField:mF,yField:xF,seriesField:wF,polygon:{style:i},label:a,tooltip:o}}),e}function nH(e){var r=e.chart,t=e.options,n=e.ext.chordData.edgesData,i=t.edgeStyle,a=t.tooltip,o=r.createView();o.data(n);var l={xField:mF,yField:xF,seriesField:SF,edge:{style:i,shape:"arc"},tooltip:a};return rA({chart:o,options:l}),e}function iH(e){var r=e.chart,t=e.options,n=t.animation;return Ts(r,n,_V(r)),e}function aH(e){return lt(wt,ZG,eH,QG,KG,JG,tH,nH,rH,Yt,Ii,iH)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="chord",t}return r.getDefaultOptions=function(){return qG},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return aH},r})(ft);var oH=["x","y","r","name","value","path","depth"],lH={colorField:"name",autoFit:!0,pointStyle:{lineWidth:0,stroke:"#fff"},legend:!1,hierarchyConfig:{size:[1,1],padding:0},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1}},CF=4,sH=0,MF=5,AF="drilldown-bread-crumb",uH={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},Ys="hierarchy-data-transform-params",cH=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.name="drill-down",t.historyCache=[],t.breadCrumbGroup=null,t.breadCrumbCfg=uH,t}return r.prototype.click=function(){var t=E(this.context,["event","data","data"]);if(!t)return!1;this.drill(t),this.drawBreadCrumb()},r.prototype.resetPosition=function(){if(this.breadCrumbGroup){var t=this.context.view.getCoordinate(),n=this.breadCrumbGroup,i=n.getBBox(),a=this.getButtonCfg().position,o={x:t.start.x,y:t.end.y-(i.height+MF*2)};t.isPolar&&(o={x:0,y:0}),a==="bottom-left"&&(o={x:t.start.x,y:t.start.y});var l=Je.transform(null,[["t",o.x+sH,o.y+i.height+MF]]);n.setMatrix(l)}},r.prototype.back=function(){ue(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},r.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},r.prototype.drill=function(t){var n=this.context.view,i=E(n,["interactions","drill-down","cfg","transformData"],function(u){return u}),a=i(S({data:t.data},t[Ys]));n.changeData(a);for(var o=[],l=t;l;){var s=l.data;o.unshift({id:"".concat(s.name,"_").concat(l.height,"_").concat(l.depth),name:s.name,children:i(S({data:s},t[Ys]))}),l=l.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(o)},r.prototype.backTo=function(t){if(!(!t||t.length<=0)){var n=this.context.view,i=ne(t).children;n.changeData(i),t.length>1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},r.prototype.getButtonCfg=function(){var t=this.context.view,n=E(t,["interactions","drill-down","cfg","drillDownConfig"]);return B(this.breadCrumbCfg,n==null?void 0:n.breadCrumb,this.cfg)},r.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},r.prototype.drawBreadCrumbGroup=function(){var t=this,n=this.getButtonCfg(),i=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:AF});var a=0;i.forEach(function(o,l){var s=t.breadCrumbGroup.addShape({type:"text",id:o.id,name:"".concat(AF,"_").concat(o.name,"_text"),attrs:S(S({text:l===0&&!Y(n.rootText)?n.rootText:o.name},n.textStyle),{x:a,y:0})}),u=s.getBBox();if(a+=u.width+CF,s.on("click",function(h){var v,d=h.target.get("id");if(d!==((v=ne(i))===null||v===void 0?void 0:v.id)){var p=i.slice(0,i.findIndex(function(y){return y.id===d})+1);t.backTo(p)}}),s.on("mouseenter",function(h){var v,d=h.target.get("id");d!==((v=ne(i))===null||v===void 0?void 0:v.id)?s.attr(n.activeTextStyle):s.attr({cursor:"default"})}),s.on("mouseleave",function(){s.attr(n.textStyle)}),l<i.length-1){var c=t.breadCrumbGroup.addShape({type:"text",name:"".concat(n.name,"_").concat(o.name,"_divider"),attrs:S(S({text:n.dividerText},n.textStyle),{x:a,y:0})}),f=c.getBBox();a+=f.width+CF}})},r.prototype.hideCrumbGroup=function(){this.breadCrumbGroup&&this.breadCrumbGroup.hide()},r.prototype.destroy=function(){this.breadCrumbGroup&&this.breadCrumbGroup.remove(),e.prototype.destroy.call(this)},r}(Bt);function fH(e,r){return e.parent===r.parent?1:2}function hH(e){return e.reduce(vH,0)/e.length}function vH(e,r){return e+r.x}function dH(e){return 1+e.reduce(pH,0)}function pH(e,r){return Math.max(e,r.y)}function gH(e){for(var r;r=e.children;)e=r[0];return e}function yH(e){for(var r;r=e.children;)e=r[r.length-1];return e}function mH(){var e=fH,r=1,t=1,n=!1;function i(a){var o,l=0;a.eachAfter(function(h){var v=h.children;v?(h.x=hH(v),h.y=dH(v)):(h.x=o?l+=e(h,o):0,h.y=0,o=h)});var s=gH(a),u=yH(a),c=s.x-e(s,u)/2,f=u.x+e(u,s)/2;return a.eachAfter(n?function(h){h.x=(h.x-a.x)*r,h.y=(a.y-h.y)*t}:function(h){h.x=(h.x-c)/(f-c)*r,h.y=(1-(a.y?h.y/a.y:1))*t})}return i.separation=function(a){return arguments.length?(e=a,i):e},i.size=function(a){return arguments.length?(n=!1,r=+a[0],t=+a[1],i):n?null:[r,t]},i.nodeSize=function(a){return arguments.length?(n=!0,r=+a[0],t=+a[1],i):n?[r,t]:null},i}function xH(e){var r=0,t=e.children,n=t&&t.length;if(!n)r=1;else for(;--n>=0;)r+=t[n].value;e.value=r}function wH(){return this.eachAfter(xH)}function SH(e,r){let t=-1;for(const n of this)e.call(r,n,++t,this);return this}function CH(e,r){for(var t=this,n=[t],i,a,o=-1;t=n.pop();)if(e.call(r,t,++o,this),i=t.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this}function MH(e,r){for(var t=this,n=[t],i=[],a,o,l,s=-1;t=n.pop();)if(i.push(t),a=t.children)for(o=0,l=a.length;o<l;++o)n.push(a[o]);for(;t=i.pop();)e.call(r,t,++s,this);return this}function AH(e,r){let t=-1;for(const n of this)if(e.call(r,n,++t,this))return n}function FH(e){return this.eachAfter(function(r){for(var t=+e(r.data)||0,n=r.children,i=n&&n.length;--i>=0;)t+=n[i].value;r.value=t})}function bH(e){return this.eachBefore(function(r){r.children&&r.children.sort(e)})}function EH(e){for(var r=this,t=kH(r,e),n=[r];r!==t;)r=r.parent,n.push(r);for(var i=n.length;e!==t;)n.splice(i,0,e),e=e.parent;return n}function kH(e,r){if(e===r)return e;var t=e.ancestors(),n=r.ancestors(),i=null;for(e=t.pop(),r=n.pop();e===r;)i=e,e=t.pop(),r=n.pop();return i}function TH(){for(var e=this,r=[e];e=e.parent;)r.push(e);return r}function IH(){return Array.from(this)}function PH(){var e=[];return this.eachBefore(function(r){r.children||e.push(r)}),e}function LH(){var e=this,r=[];return e.each(function(t){t!==e&&r.push({source:t.parent,target:t})}),r}function*OH(){var e=this,r,t=[e],n,i,a;do for(r=t.reverse(),t=[];e=r.pop();)if(yield e,n=e.children)for(i=0,a=n.length;i<a;++i)t.push(n[i]);while(t.length)}function jo(e,r){e instanceof Map?(e=[void 0,e],r===void 0&&(r=RH)):r===void 0&&(r=BH);for(var t=new Uo(e),n,i=[t],a,o,l,s;n=i.pop();)if((o=r(n.data))&&(s=(o=Array.from(o)).length))for(n.children=o,l=s-1;l>=0;--l)i.push(a=o[l]=new Uo(o[l])),a.parent=n,a.depth=n.depth+1;return t.eachBefore(FF)}function DH(){return jo(this).eachBefore(NH)}function BH(e){return e.children}function RH(e){return Array.isArray(e)?e[1]:null}function NH(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function FF(e){var r=0;do e.height=r;while((e=e.parent)&&e.height<++r)}function Uo(e){this.data=e,this.depth=this.height=0,this.parent=null}Uo.prototype=jo.prototype={constructor:Uo,count:wH,each:SH,eachAfter:MH,eachBefore:CH,find:AH,sum:FH,sort:bH,path:EH,ancestors:TH,descendants:IH,leaves:PH,links:LH,copy:DH,[Symbol.iterator]:OH};function zH(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function YH(e){for(var r=e.length,t,n;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e}function bF(e){for(var r=0,t=(e=YH(Array.from(e))).length,n=[],i,a;r<t;)i=e[r],a&&EF(a,i)?++r:(a=_H(n=VH(n,i)),r=0);return a}function VH(e,r){var t,n;if(Og(r,e))return[r];for(t=0;t<e.length;++t)if(Xf(r,e[t])&&Og(Vs(e[t],r),e))return[e[t],r];for(t=0;t<e.length-1;++t)for(n=t+1;n<e.length;++n)if(Xf(Vs(e[t],e[n]),r)&&Xf(Vs(e[t],r),e[n])&&Xf(Vs(e[n],r),e[t])&&Og(kF(e[t],e[n],r),e))return[e[t],e[n],r];throw new Error}function Xf(e,r){var t=e.r-r.r,n=r.x-e.x,i=r.y-e.y;return t<0||t*t<n*n+i*i}function EF(e,r){var t=e.r-r.r+Math.max(e.r,r.r,1)*1e-9,n=r.x-e.x,i=r.y-e.y;return t>0&&t*t>n*n+i*i}function Og(e,r){for(var t=0;t<r.length;++t)if(!EF(e,r[t]))return!1;return!0}function _H(e){switch(e.length){case 1:return $H(e[0]);case 2:return Vs(e[0],e[1]);case 3:return kF(e[0],e[1],e[2])}}function $H(e){return{x:e.x,y:e.y,r:e.r}}function Vs(e,r){var t=e.x,n=e.y,i=e.r,a=r.x,o=r.y,l=r.r,s=a-t,u=o-n,c=l-i,f=Math.sqrt(s*s+u*u);return{x:(t+a+s/f*c)/2,y:(n+o+u/f*c)/2,r:(f+i+l)/2}}function kF(e,r,t){var n=e.x,i=e.y,a=e.r,o=r.x,l=r.y,s=r.r,u=t.x,c=t.y,f=t.r,h=n-o,v=n-u,d=i-l,p=i-c,y=s-a,g=f-a,m=n*n+i*i-a*a,x=m-o*o-l*l+s*s,w=m-u*u-c*c+f*f,C=v*d-h*p,M=(d*w-p*x)/(C*2)-n,A=(p*y-d*g)/C,b=(v*x-h*w)/(C*2)-i,T=(h*g-v*y)/C,k=A*A+T*T-1,P=2*(a+M*A+b*T),O=M*M+b*b-a*a,V=-(k?(P+Math.sqrt(P*P-4*k*O))/(2*k):O/P);return{x:n+M+A*V,y:i+b+T*V,r:V}}function TF(e,r,t){var n=e.x-r.x,i,a,o=e.y-r.y,l,s,u=n*n+o*o;u?(a=r.r+t.r,a*=a,s=e.r+t.r,s*=s,a>s?(i=(u+s-a)/(2*u),l=Math.sqrt(Math.max(0,s/u-i*i)),t.x=e.x-i*n-l*o,t.y=e.y-i*o+l*n):(i=(u+a-s)/(2*u),l=Math.sqrt(Math.max(0,a/u-i*i)),t.x=r.x+i*n-l*o,t.y=r.y+i*o+l*n)):(t.x=r.x+t.r,t.y=r.y)}function IF(e,r){var t=e.r+r.r-1e-6,n=r.x-e.x,i=r.y-e.y;return t>0&&t*t>n*n+i*i}function PF(e){var r=e._,t=e.next._,n=r.r+t.r,i=(r.x*t.r+t.x*r.r)/n,a=(r.y*t.r+t.y*r.r)/n;return i*i+a*a}function jf(e){this._=e,this.next=null,this.previous=null}function LF(e){if(!(i=(e=zH(e)).length))return 0;var r,t,n,i,a,o,l,s,u,c,f;if(r=e[0],r.x=0,r.y=0,!(i>1))return r.r;if(t=e[1],r.x=-t.r,t.x=r.r,t.y=0,!(i>2))return r.r+t.r;TF(t,r,n=e[2]),r=new jf(r),t=new jf(t),n=new jf(n),r.next=n.previous=t,t.next=r.previous=n,n.next=t.previous=r;t:for(l=3;l<i;++l){TF(r._,t._,n=e[l]),n=new jf(n),s=t.next,u=r.previous,c=t._.r,f=r._.r;do if(c<=f){if(IF(s._,n._)){t=s,r.next=t,t.previous=r,--l;continue t}c+=s._.r,s=s.next}else{if(IF(u._,n._)){r=u,r.next=t,t.previous=r,--l;continue t}f+=u._.r,u=u.previous}while(s!==u.next);for(n.previous=r,n.next=t,r.next=t.previous=t=n,a=PF(r);(n=n.next)!==t;)(o=PF(n))<a&&(r=n,a=o);t=r.next}for(r=[t._],n=t;(n=n.next)!==t;)r.push(n._);for(n=bF(r),l=0;l<i;++l)r=e[l],r.x-=n.x,r.y-=n.y;return n.r}function GH(e){return LF(e),e}function HH(e){return e==null?null:Uf(e)}function Uf(e){if(typeof e!="function")throw new Error;return e}function Ra(){return 0}function qo(e){return function(){return e}}function WH(e){return Math.sqrt(e.value)}function OF(){var e=null,r=1,t=1,n=Ra;function i(a){return a.x=r/2,a.y=t/2,e?a.eachBefore(DF(e)).eachAfter(Dg(n,.5)).eachBefore(BF(1)):a.eachBefore(DF(WH)).eachAfter(Dg(Ra,1)).eachAfter(Dg(n,a.r/Math.min(r,t))).eachBefore(BF(Math.min(r,t)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(e=HH(a),i):e},i.size=function(a){return arguments.length?(r=+a[0],t=+a[1],i):[r,t]},i.padding=function(a){return arguments.length?(n=typeof a=="function"?a:qo(+a),i):n},i}function DF(e){return function(r){r.children||(r.r=Math.max(0,+e(r)||0))}}function Dg(e,r){return function(t){if(n=t.children){var n,i,a=n.length,o=e(t)*r||0,l;if(o)for(i=0;i<a;++i)n[i].r+=o;if(l=LF(n),o)for(i=0;i<a;++i)n[i].r-=o;t.r=l+o}}}function BF(e){return function(r){var t=r.parent;r.r*=e,t&&(r.x=t.x+e*r.x,r.y=t.y+e*r.y)}}function RF(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function _s(e,r,t,n,i){for(var a=e.children,o,l=-1,s=a.length,u=e.value&&(n-r)/e.value;++l<s;)o=a[l],o.y0=t,o.y1=i,o.x0=r,o.x1=r+=o.value*u}function NF(){var e=1,r=1,t=0,n=!1;function i(o){var l=o.height+1;return o.x0=o.y0=t,o.x1=e,o.y1=r/l,o.eachBefore(a(r,l)),n&&o.eachBefore(RF),o}function a(o,l){return function(s){s.children&&_s(s,s.x0,o*(s.depth+1)/l,s.x1,o*(s.depth+2)/l);var u=s.x0,c=s.y0,f=s.x1-t,h=s.y1-t;f<u&&(u=f=(u+f)/2),h<c&&(c=h=(c+h)/2),s.x0=u,s.y0=c,s.x1=f,s.y1=h}}return i.round=function(o){return arguments.length?(n=!!o,i):n},i.size=function(o){return arguments.length?(e=+o[0],r=+o[1],i):[e,r]},i.padding=function(o){return arguments.length?(t=+o,i):t},i}var XH={depth:-1},zF={};function jH(e){return e.id}function UH(e){return e.parentId}function qH(){var e=jH,r=UH;function t(n){var i=Array.from(n),a=i.length,o,l,s,u,c,f,h,v=new Map;for(l=0;l<a;++l)o=i[l],c=i[l]=new Uo(o),(f=e(o,l,n))!=null&&(f+="")&&(h=c.id=f,v.set(h,v.has(h)?zF:c)),(f=r(o,l,n))!=null&&(f+="")&&(c.parent=f);for(l=0;l<a;++l)if(c=i[l],f=c.parent){if(u=v.get(f),!u)throw new Error("missing: "+f);if(u===zF)throw new Error("ambiguous: "+f);u.children?u.children.push(c):u.children=[c],c.parent=u}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(s.parent=XH,s.eachBefore(function(d){d.depth=d.parent.depth+1,--a}).eachBefore(FF),s.parent=null,a>0)throw new Error("cycle");return s}return t.id=function(n){return arguments.length?(e=Uf(n),t):e},t.parentId=function(n){return arguments.length?(r=Uf(n),t):r},t}function ZH(e,r){return e.parent===r.parent?1:2}function Bg(e){var r=e.children;return r?r[0]:e.t}function Rg(e){var r=e.children;return r?r[r.length-1]:e.t}function QH(e,r,t){var n=t/(r.i-e.i);r.c-=n,r.s+=t,e.c+=n,r.z+=t,r.m+=t}function KH(e){for(var r=0,t=0,n=e.children,i=n.length,a;--i>=0;)a=n[i],a.z+=r,a.m+=r,r+=a.s+(t+=a.c)}function JH(e,r,t){return e.a.parent===r.parent?e.a:t}function qf(e,r){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=r}qf.prototype=Object.create(Uo.prototype);function tW(e){for(var r=new qf(e,0),t,n=[r],i,a,o,l;t=n.pop();)if(a=t._.children)for(t.children=new Array(l=a.length),o=l-1;o>=0;--o)n.push(i=t.children[o]=new qf(a[o],o)),i.parent=t;return(r.parent=new qf(null,0)).children=[r],r}function eW(){var e=ZH,r=1,t=1,n=null;function i(u){var c=tW(u);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),n)u.eachBefore(s);else{var f=u,h=u,v=u;u.eachBefore(function(m){m.x<f.x&&(f=m),m.x>h.x&&(h=m),m.depth>v.depth&&(v=m)});var d=f===h?1:e(f,h)/2,p=d-f.x,y=r/(h.x+d+p),g=t/(v.depth||1);u.eachBefore(function(m){m.x=(m.x+p)*y,m.y=m.depth*g})}return u}function a(u){var c=u.children,f=u.parent.children,h=u.i?f[u.i-1]:null;if(c){KH(u);var v=(c[0].z+c[c.length-1].z)/2;h?(u.z=h.z+e(u._,h._),u.m=u.z-v):u.z=v}else h&&(u.z=h.z+e(u._,h._));u.parent.A=l(u,h,u.parent.A||f[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function l(u,c,f){if(c){for(var h=u,v=u,d=c,p=h.parent.children[0],y=h.m,g=v.m,m=d.m,x=p.m,w;d=Rg(d),h=Bg(h),d&&h;)p=Bg(p),v=Rg(v),v.a=u,w=d.z+m-h.z-y+e(d._,h._),w>0&&(QH(JH(d,u,f),u,w),y+=w,g+=w),m+=d.m,y+=h.m,x+=p.m,g+=v.m;d&&!Rg(v)&&(v.t=d,v.m+=m-g),h&&!Bg(p)&&(p.t=h,p.m+=y-x,f=u)}return f}function s(u){u.x*=r,u.y=u.depth*t}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(n=!1,r=+u[0],t=+u[1],i):n?null:[r,t]},i.nodeSize=function(u){return arguments.length?(n=!0,r=+u[0],t=+u[1],i):n?[r,t]:null},i}function Zf(e,r,t,n,i){for(var a=e.children,o,l=-1,s=a.length,u=e.value&&(i-t)/e.value;++l<s;)o=a[l],o.x0=r,o.x1=n,o.y0=t,o.y1=t+=o.value*u}var YF=(1+Math.sqrt(5))/2;function VF(e,r,t,n,i,a){for(var o=[],l=r.children,s,u,c=0,f=0,h=l.length,v,d,p=r.value,y,g,m,x,w,C,M;c<h;){v=i-t,d=a-n;do y=l[f++].value;while(!y&&f<h);for(g=m=y,C=Math.max(d/v,v/d)/(p*e),M=y*y*C,w=Math.max(m/M,M/g);f<h;++f){if(y+=u=l[f].value,u<g&&(g=u),u>m&&(m=u),M=y*y*C,x=Math.max(m/M,M/g),x>w){y-=u;break}w=x}o.push(s={value:y,dice:v<d,children:l.slice(c,f)}),s.dice?_s(s,t,n,i,p?n+=d*y/p:a):Zf(s,t,n,p?t+=v*y/p:i,a),p-=y,c=f}return o}const _F=function e(r){function t(n,i,a,o,l){VF(r,n,i,a,o,l)}return t.ratio=function(n){return e((n=+n)>1?n:1)},t}(YF);function $F(){var e=_F,r=!1,t=1,n=1,i=[0],a=Ra,o=Ra,l=Ra,s=Ra,u=Ra;function c(h){return h.x0=h.y0=0,h.x1=t,h.y1=n,h.eachBefore(f),i=[0],r&&h.eachBefore(RF),h}function f(h){var v=i[h.depth],d=h.x0+v,p=h.y0+v,y=h.x1-v,g=h.y1-v;y<d&&(d=y=(d+y)/2),g<p&&(p=g=(p+g)/2),h.x0=d,h.y0=p,h.x1=y,h.y1=g,h.children&&(v=i[h.depth+1]=a(h)/2,d+=u(h)-v,p+=o(h)-v,y-=l(h)-v,g-=s(h)-v,y<d&&(d=y=(d+y)/2),g<p&&(p=g=(p+g)/2),e(h,d,p,y,g))}return c.round=function(h){return arguments.length?(r=!!h,c):r},c.size=function(h){return arguments.length?(t=+h[0],n=+h[1],c):[t,n]},c.tile=function(h){return arguments.length?(e=Uf(h),c):e},c.padding=function(h){return arguments.length?c.paddingInner(h).paddingOuter(h):c.paddingInner()},c.paddingInner=function(h){return arguments.length?(a=typeof h=="function"?h:qo(+h),c):a},c.paddingOuter=function(h){return arguments.length?c.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):c.paddingTop()},c.paddingTop=function(h){return arguments.length?(o=typeof h=="function"?h:qo(+h),c):o},c.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:qo(+h),c):l},c.paddingBottom=function(h){return arguments.length?(s=typeof h=="function"?h:qo(+h),c):s},c.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:qo(+h),c):u},c}function rW(e,r,t,n,i){var a=e.children,o,l=a.length,s,u=new Array(l+1);for(u[0]=s=o=0;o<l;++o)u[o+1]=s+=a[o].value;c(0,l,e.value,r,t,n,i);function c(f,h,v,d,p,y,g){if(f>=h-1){var m=a[f];m.x0=d,m.y0=p,m.x1=y,m.y1=g;return}for(var x=u[f],w=v/2+x,C=f+1,M=h-1;C<M;){var A=C+M>>>1;u[A]<w?C=A+1:M=A}w-u[C-1]<u[C]-w&&f+1<C&&--C;var b=u[C]-x,T=v-b;if(y-d>g-p){var k=v?(d*T+y*b)/v:y;c(f,C,b,d,p,k,g),c(C,h,T,k,p,y,g)}else{var P=v?(p*T+g*b)/v:g;c(f,C,b,d,p,y,P),c(C,h,T,d,P,y,g)}}}function nW(e,r,t,n,i){(e.depth&1?Zf:_s)(e,r,t,n,i)}const iW=function e(r){function t(n,i,a,o,l){if((s=n._squarify)&&s.ratio===r)for(var s,u,c,f,h=-1,v,d=s.length,p=n.value;++h<d;){for(u=s[h],c=u.children,f=u.value=0,v=c.length;f<v;++f)u.value+=c[f].value;u.dice?_s(u,i,a,o,p?a+=(l-a)*u.value/p:l):Zf(u,i,a,p?i+=(o-i)*u.value/p:o,l),p-=u.value}else n._squarify=s=VF(r,n,i,a,o,l),s.ratio=r}return t.ratio=function(n){return e((n=+n)>1?n:1)},t}(YF),GF=Object.freeze(Object.defineProperty({__proto__:null,cluster:mH,hierarchy:jo,pack:OF,packEnclose:bF,packSiblings:GH,partition:NF,stratify:qH,tree:eW,treemap:$F,treemapBinary:rW,treemapDice:_s,treemapResquarify:iW,treemapSlice:Zf,treemapSliceDice:nW,treemapSquarify:_F},Symbol.toStringTag,{value:"Module"}));var HF="nodeIndex",WF="childNodeCount",Ng="nodeAncestor",zg="Invalid field: it must be a string!";function Yg(e,r){var t=e.field,n=e.fields;if(at(t))return t;if(G(t))return console.warn(zg),t[0];if(console.warn("".concat(zg," will try to get fields instead.")),at(n))return n;if(G(n)&&n.length)return n[0];if(r)return r;throw new TypeError(zg)}function Vg(e){var r=[];if(e&&e.each){var t,n;e.each(function(i){var a,o;i.parent!==t?(t=i.parent,n=0):n+=1;var l=de((((a=i.ancestors)===null||a===void 0?void 0:a.call(i))||[]).map(function(s){return r.find(function(u){return u.name===s.name})||s}),function(s){var u=s.depth;return u>0&&u<i.depth});i[Ng]=l,i[WF]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[HF]=n,r.push(i)})}else e&&e.eachNode&&e.eachNode(function(i){r.push(i)});return r}var aW={field:"value",as:["x","y","r"],sort:function(e,r){return r.value-e.value}};function oW(e,r){r=Tt({},aW,r);var t=r.as;if(!G(t)||t.length!==3)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');var n;try{n=Yg(r)}catch(u){console.warn(u)}var i=function(u){return OF().size(r.size).padding(r.padding)(jo(u).sum(function(c){return c[n]}).sort(r.sort))},a=i(e),o=t[0],l=t[1],s=t[2];return a.each(function(u){u[o]=u.x,u[l]=u.y,u[s]=u.r}),Vg(a)}function XF(e){var r=e.data,t=e.hierarchyConfig,n=e.rawFields,i=n===void 0?[]:n,a=e.enableDrillDown,o=oW(r,S(S({},t),{field:"value",as:["x","y","r"]})),l=[];return o.forEach(function(s){for(var u,c=s.data.name,f=S({},s);f.depth>1;)c="".concat((u=f.parent.data)===null||u===void 0?void 0:u.name," / ").concat(c),f=f.parent;if(a&&s.depth>2)return null;var h=B({},s.data,S(S(S({},bt(s.data,i)),{path:c}),s));h.ext=t,h[Ys]={hierarchyConfig:t,rawFields:i,enableDrillDown:a},l.push(h)}),l}function jF(e,r,t){var n=cg([e,r]),i=n[0],a=n[1],o=n[2],l=n[3],s=t.width,u=t.height,c=s-(l+a),f=u-(i+o),h=Math.min(c,f),v=(c-h)/2,d=(f-h)/2,p=i+d,y=a+v,g=o+d,m=l+v,x=[p,y,g,m],w=h<0?0:h;return{finalPadding:x,finalSize:w}}function lW(e){var r=e.chart,t=Math.min(r.viewBBox.width,r.viewBBox.height);return B({options:{size:function(n){var i=n.r;return i*t}}},e)}function sW(e){var r=e.options,t=e.chart,n=t.viewBBox,i=r.padding,a=r.appendPadding,o=r.drilldown,l=a;if(o!=null&&o.enabled){var s=Ef(t.appendPadding,E(o,["breadCrumb","position"]));l=cg([s,a])}var u=jF(i,l,n).finalPadding;return t.padding=u,t.appendPadding=0,e}function uW(e){var r=e.chart,t=e.options,n=r.padding,i=r.appendPadding,a=t.color,o=t.colorField,l=t.pointStyle,s=t.hierarchyConfig,u=t.sizeField,c=t.rawFields,f=c===void 0?[]:c,h=t.drilldown,v=XF({data:t.data,hierarchyConfig:s,enableDrillDown:h==null?void 0:h.enabled,rawFields:f});r.data(v);var d=r.viewBBox,p=jF(n,i,d).finalSize,y=function(g){var m=g.r;return m*p};return u&&(y=function(g){return g[u]*p}),gr(B({},e,{options:{xField:"x",yField:"y",seriesField:o,sizeField:u,rawFields:rt(rt([],oH,!0),f,!0),point:{color:a,style:l,shape:"circle",size:y}}})),e}function cW(e){return lt(Ut({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(e)}function fW(e){var r=e.chart,t=e.options,n=t.tooltip;if(n===!1)r.tooltip(!1);else{var i=n;E(n,"fields")||(i=B({},{customItems:function(a){return a.map(function(o){var l=E(r.getOptions(),"scales"),s=E(l,["name","formatter"],function(c){return c}),u=E(l,["value","formatter"],function(c){return c});return S(S({},o),{name:s(o.data.name),value:u(o.data.value)})})}},i)),r.tooltip(i)}return e}function hW(e){var r=e.chart;return r.axis(!1),e}function vW(e){var r=e.drilldown,t=e.interactions,n=t===void 0?[]:t;return r!=null&&r.enabled?B({},e,{interactions:rt(rt([],n,!0),[{type:"drill-down",cfg:{drillDownConfig:r,transformData:XF,enableDrillDown:!0}}],!1)}):e}function dW(e){var r=e.chart,t=e.options;return Yt({chart:r,options:vW(t)}),e}function pW(e){return lt(pr("pointStyle"),lW,sW,wt,cW,uW,hW,Yo,fW,dW,It,_t())(e)}function UF(e){var r=E(e,["event","data","data"],{});return G(r.children)&&r.children.length>0}function qF(e){var r=e.view.getCoordinate(),t=r.innerRadius;if(t){var n=e.event,i=n.x,a=n.y,o=r.center,l=o.x,s=o.y,u=r.getRadius()*t,c=Math.sqrt(Math.pow(l-i,2)+Math.pow(s-a,2));return c<u}return!1}et("drill-down-action",cH),ut("drill-down",{showEnable:[{trigger:"element:mouseenter",action:"cursor:pointer",isEnable:UF},{trigger:"element:mouseleave",action:"cursor:default"},{trigger:"element:mouseleave",action:"cursor:pointer",isEnable:qF}],start:[{trigger:"element:click",isEnable:UF,action:["drill-down-action:click"]},{trigger:"afterchangesize",action:["drill-down-action:resetPosition"]},{trigger:"click",isEnable:qF,action:["drill-down-action:back"]}]}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="circle-packing",t}return r.getDefaultOptions=function(){return lH},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return pW},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r}(ft);var yr="left-axes-view",mr="right-axes-view",ZF={nice:!0,label:{autoHide:!0,autoRotate:!1}},gW=S(S({},ZF),{position:"left"}),yW=S(S({},ZF),{position:"right",grid:null}),Zo;(function(e){e.Left="Left",e.Right="Right"})(Zo||(Zo={}));var Na;(function(e){e.Line="line",e.Column="column"})(Na||(Na={}));function _g(e){return E(e,"geometry")===Na.Line}function $g(e){return E(e,"geometry")===Na.Column}function QF(e,r,t){return $g(t)?B({},{geometry:Na.Column,label:t.label&&t.isRange?{content:function(n){var i;return(i=n[r])===null||i===void 0?void 0:i.join("-")}}:void 0},t):S({geometry:Na.Line},t)}function KF(e,r){var t=e[0],n=e[1];if(G(r)){var i=r[0],a=r[1];return[i,a]}var o=E(r,t),l=E(r,n);return[o,l]}function JF(e,r){return r===Zo.Left?e===!1?!1:B({},gW,e):r===Zo.Right?e===!1?!1:B({},yW,e):e}function mW(e){var r=e.options,t=e.chart,n=r.geometryOption,i=n.isStack,a=n.color,o=n.seriesField,l=n.groupField,s=n.isGroup,u=["xField","yField"];if(_g(n)){_o(B({},e,{options:S(S(S({},bt(r,u)),n),{line:{color:n.color,style:n.lineStyle}})})),gr(B({},e,{options:S(S(S({},bt(r,u)),n),{point:n.point&&S({color:a,shape:"circle"},n.point)})}));var c=[];s&&c.push({type:"dodge",dodgeBy:l||o,customOffset:0}),i&&c.push({type:"stack"}),c.length&&F(t.geometries,function(f){f.adjust(c)})}return $g(n)&&Vf(B({},e,{options:S(S(S({},bt(r,u)),n),{widthRatio:n.columnWidthRatio,interval:S(S({},bt(n,["color"])),{style:n.columnStyle})})})),e}function tb(e){var r=e.view,t=e.geometryOption,n=e.yField,i=e.legend,a=E(i,"marker"),o=Ae(r,_g(t)?"line":"interval");if(!t.seriesField){var l=E(r,"options.scales.".concat(n,".alias"))||n,s=o.getAttribute("color"),u=r.getTheme().defaultColor;s&&(u=Je.getMappingValue(s,l,E(s,["values",0],u)));var c=(Q(a)?a:!We(a)&&B({},{style:{stroke:u,fill:u}},a))||(_g(t)?{symbol:function(h,v,d){return[["M",h-d,v],["L",h+d,v]]},style:{lineWidth:2,r:6,stroke:u}}:{symbol:"square",style:{fill:u}});return[{value:n,name:l,marker:c,isGeometry:!0,viewId:r.id}]}var f=o.getGroupAttributes();return Pe(f,function(h,v){var d=Je.getLegendItems(r,o,v,r.getTheme(),a);return h.concat(d)},[])}var eb=function(e,r){var t=r[0],n=r[1],i=e.getOptions().data,a=e.getXScale(),o=ue(i);if(!(!a||!o)){var l=Hr(i,a.field),s=l,u=ue(s),c=Math.floor(t*(u-1)),f=Math.floor(n*(u-1));e.filter(a.field,function(h){var v=s.indexOf(h);return v>-1?GV(v,c,f):!0}),e.getRootView().render(!0)}};function xW(e){var r,t=e.options,n=t.geometryOptions,i=n===void 0?[]:n,a=t.xField,o=t.yField,l=Bv(i,function(s){var u=s.geometry;return u===Na.Line||u===void 0});return B({},{options:{geometryOptions:[],meta:(r={},r[a]={type:"cat",sync:!0,range:l?[0,1]:void 0},r),tooltip:{showMarkers:l,showCrosshairs:l,shared:!0,crosshairs:{type:"x"}},interactions:l?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},e,{options:{yAxis:KF(o,t.yAxis),geometryOptions:[QF(a,o[0],i[0]),QF(a,o[1],i[1])],annotations:KF(o,t.annotations)}})}function wW(e){var r,t,n=e.chart,i=e.options,a=i.geometryOptions,o={line:0,column:1},l=[{type:(r=a[0])===null||r===void 0?void 0:r.geometry,id:yr},{type:(t=a[1])===null||t===void 0?void 0:t.geometry,id:mr}];return l.sort(function(s,u){return-o[s.type]+o[u.type]}).forEach(function(s){return n.createView({id:s.id})}),e}function SW(e){var r=e.chart,t=e.options,n=t.xField,i=t.yField,a=t.geometryOptions,o=t.data,l=t.tooltip,s=[S(S({},a[0]),{id:yr,data:o[0],yField:i[0]}),S(S({},a[1]),{id:mr,data:o[1],yField:i[1]})];return s.forEach(function(u){var c=u.id,f=u.data,h=u.yField,v=$g(u)&&u.isPercent,d=v?sA(f,h,n,h):f,p=vt(r,c).data(d),y=v?S({formatter:function(g){return{name:g[u.seriesField]||h,value:(Number(g[h])*100).toFixed(2)+"%"}}},l):l;mW({chart:p,options:{xField:n,yField:h,tooltip:y,geometryOption:u}})}),e}function CW(e){var r,t=e.chart,n=e.options,i=n.geometryOptions,a=((r=t.getTheme())===null||r===void 0?void 0:r.colors10)||[],o=0;return t.once("beforepaint",function(){F(i,function(l,s){var u=vt(t,s===0?yr:mr);if(!l.color){var c=u.getGroupScales(),f=E(c,[0,"values","length"],1),h=a.slice(o,o+f).concat(s===0?[]:a);u.geometries.forEach(function(v){l.seriesField?v.color(l.seriesField,h):v.color(h[0])}),o+=f}}),t.render(!0)}),e}function MW(e){var r,t,n=e.chart,i=e.options,a=i.xAxis,o=i.yAxis,l=i.xField,s=i.yField;return Ut((r={},r[l]=a,r[s[0]]=o[0],r))(B({},e,{chart:vt(n,yr)})),Ut((t={},t[l]=a,t[s[1]]=o[1],t))(B({},e,{chart:vt(n,mr)})),e}function AW(e){var r=e.chart,t=e.options,n=vt(r,yr),i=vt(r,mr),a=t.xField,o=t.yField,l=t.xAxis,s=t.yAxis;return r.axis(a,!1),r.axis(o[0],!1),r.axis(o[1],!1),n.axis(a,l),n.axis(o[0],JF(s[0],Zo.Left)),i.axis(a,!1),i.axis(o[1],JF(s[1],Zo.Right)),e}function FW(e){var r=e.chart,t=e.options,n=t.tooltip,i=vt(r,yr),a=vt(r,mr);return r.tooltip(n),i.tooltip({shared:!0}),a.tooltip({shared:!0}),e}function bW(e){var r=e.chart;return Yt(B({},e,{chart:vt(r,yr)})),Yt(B({},e,{chart:vt(r,mr)})),e}function EW(e){var r=e.chart,t=e.options,n=t.annotations,i=E(n,[0]),a=E(n,[1]);return _t(i)(B({},e,{chart:vt(r,yr),options:{annotations:i}})),_t(a)(B({},e,{chart:vt(r,mr),options:{annotations:a}})),e}function kW(e){var r=e.chart;return wt(B({},e,{chart:vt(r,yr)})),wt(B({},e,{chart:vt(r,mr)})),wt(e),e}function TW(e){var r=e.chart;return It(B({},e,{chart:vt(r,yr)})),It(B({},e,{chart:vt(r,mr)})),e}function IW(e){var r=e.chart,t=e.options,n=t.yAxis;return Ta(B({},e,{chart:vt(r,yr),options:{yAxis:n[0]}})),Ta(B({},e,{chart:vt(r,mr),options:{yAxis:n[1]}})),e}function PW(e){var r=e.chart,t=e.options,n=t.legend,i=t.geometryOptions,a=t.yField,o=t.data,l=vt(r,yr),s=vt(r,mr);if(n===!1)r.legend(!1);else if(At(n)&&n.custom===!0)r.legend(n);else{var u=E(i,[0,"legend"],n),c=E(i,[1,"legend"],n);r.once("beforepaint",function(){var f=o[0].length?tb({view:l,geometryOption:i[0],yField:a[0],legend:u}):[],h=o[1].length?tb({view:s,geometryOption:i[1],yField:a[1],legend:c}):[];r.legend(B({},n,{custom:!0,items:f.concat(h)}))}),i[0].seriesField&&l.legend(i[0].seriesField,u),i[1].seriesField&&s.legend(i[1].seriesField,c),r.on("legend-item:click",function(f){var h=E(f,"gEvent.delegateObject",{});if(h&&h.item){var v=h.item,d=v.value,p=v.isGeometry,y=v.viewId;if(p){var g=Y0(a,function(w){return w===d});if(g>-1){var m=E(vt(r,y),"geometries");F(m,function(w){w.changeVisible(!h.item.unchecked)})}}else{var x=E(r.getController("legend"),"option.items",[]);F(r.views,function(w){var C=w.getGroupScales();F(C,function(M){M.values&&M.values.indexOf(d)>-1&&w.filter(M.field,function(A){var b=Gr(x,function(T){return T.value===A});return!b.unchecked})}),r.render(!0)})}}})}return e}function LW(e){var r=e.chart,t=e.options,n=t.slider,i=vt(r,yr),a=vt(r,mr);return n&&(i.option("slider",n),i.on("slider:valuechanged",function(o){var l=o.event,s=l.value,u=l.originValue;Gt(s,u)||eb(a,s)}),r.once("afterpaint",function(){if(!fo(n)){var o=n.start,l=n.end;(o||l)&&eb(a,[o,l])}})),e}function OW(e){return lt(xW,wW,kW,SW,MW,AW,IW,FW,bW,EW,TW,CW,PW,LW)(e)}var DW=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="dual-axes",t}return r.prototype.getDefaultOptions=function(){return B({},e.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},r.prototype.getSchemaAdaptor=function(){return OW},r}(ft);function BW(e,r){var t=r.data,n=r.coordinate,i=r.interactions,a=r.annotations,o=r.animation,l=r.tooltip,s=r.axes,u=r.meta,c=r.geometries;t&&e.data(t);var f={};s&&F(s,function(h,v){f[v]=bt(h,er)}),f=B({},u,f),e.scale(f),n&&e.coordinate(n),s===!1?e.axis(!1):F(s,function(h,v){e.axis(v,h)}),F(c,function(h){var v=rr({chart:e,options:h}).ext,d=h.adjust;d&&v.geometry.adjust(d)}),F(i,function(h){h.enable===!1?e.removeInteraction(h.type):e.interaction(h.type,h.cfg)}),F(a,function(h){e.annotation()[h.type](S({},h))}),Ts(e,o),l?(e.interaction("tooltip"),e.tooltip(l)):l===!1&&e.removeInteraction("tooltip")}function RW(e){var r=e.chart,t=e.options,n=t.type,i=t.data,a=t.fields,o=t.eachView,l=Wu(t,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return r.data(i),r.facet(n,S(S({},l),{fields:a,eachView:function(s,u){var c=o(s,u);if(c.geometries)BW(s,c);else{var f=c,h=f.options;h.tooltip&&s.interaction("tooltip"),Pg(f.type,s,h)}}})),e}function NW(e){var r=e.chart,t=e.options,n=t.axes,i=t.meta,a=t.tooltip,o=t.coordinate,l=t.theme,s=t.legend,u=t.interactions,c=t.annotations,f={};return n&&F(n,function(h,v){f[v]=bt(h,er)}),f=B({},i,f),r.scale(f),r.coordinate(o),n?F(n,function(h,v){r.axis(v,h)}):r.axis(!1),a?(r.interaction("tooltip"),r.tooltip(a)):a===!1&&r.removeInteraction("tooltip"),r.legend(s),l&&r.theme(l),F(u,function(h){h.enable===!1?r.removeInteraction(h.type):r.interaction(h.type,h.cfg)}),F(c,function(h){r.annotation()[h.type](S({},h))}),e}function zW(e){return lt(wt,RW,NW)(e)}var YW={title:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},rowTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},columnTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}}};(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return YW},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return zW},r})(ft);function VW(e){var r=e.chart,t=e.options,n=t.data,i=t.type,a=t.xField,o=t.yField,l=t.colorField,s=t.sizeField,u=t.sizeRatio,c=t.shape,f=t.color,h=t.tooltip,v=t.heatmapStyle,d=t.meta;r.data(n);var p="polygon";i==="density"&&(p="heatmap");var y=Lr(h,[a,o,l]),g=y.fields,m=y.formatter,x=1;return(u||u===0)&&(!c&&!s?console.warn("sizeRatio is not in effect: Must define shape or sizeField first"):u<0||u>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):x=u),rr(B({},e,{options:{type:p,colorField:l,tooltipFields:g,shapeField:s||"",label:void 0,mapping:{tooltip:m,shape:c&&(s?function(w){var C=n.map(function(T){return T[s]}),M=(d==null?void 0:d[s])||{},A=M.min,b=M.max;return A=st(A)?A:Math.min.apply(Math,C),b=st(b)?b:Math.max.apply(Math,C),[c,(E(w,s)-A)/(b-A),x]}:function(){return[c,1,x]}),color:f||l&&r.getTheme().sequenceColors.join("-"),style:v}}})),e}function _W(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return lt(Ut((r={},r[a]=n,r[o]=i,r)))(e)}function $W(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?r.axis(o,!1):r.axis(o,i),e}function GW(e){var r=e.chart,t=e.options,n=t.legend,i=t.colorField,a=t.sizeField,o=t.sizeLegend,l=n!==!1;return i&&r.legend(i,l?n:!1),a&&r.legend(a,o===void 0?n:o),!l&&!o&&r.legend(!1),e}function HW(e){var r=e.chart,t=e.options,n=t.label,i=t.colorField,a=t.type,o=Ae(r,a==="density"?"heatmap":"polygon");if(!n)o.label(!1);else if(i){var l=n.callback,s=kt(n,["callback"]);o.label({fields:[i],callback:l,cfg:fe(s)})}return e}function WW(e){var r,t,n=e.chart,i=e.options,a=i.coordinate,o=i.reflect,l=B({actions:[]},a!=null?a:{type:"rect"});return o&&((t=(r=l.actions)===null||r===void 0?void 0:r.push)===null||t===void 0||t.call(r,["reflect",o])),n.coordinate(l),e}function XW(e){return lt(wt,pr("heatmapStyle"),_W,WW,VW,$W,GW,le,HW,_t(),Yt,It,Ii)(e)}var jW=B({},ft.getDefaultOptions(),{type:"polygon",legend:!1,coordinate:{type:"rect"},xAxis:{tickLine:null,line:null,grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}},yAxis:{grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}}});Mt("polygon","circle",{draw:function(e,r){var t,n,i=e.x,a=e.y,o=this.parsePoints(e.points),l=Math.abs(o[2].x-o[1].x),s=Math.abs(o[1].y-o[0].y),u=Math.min(l,s)/2,c=Number(e.shape[1]),f=Number(e.shape[2]),h=Math.sqrt(f),v=u*h*Math.sqrt(c),d=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((n=e.defaultStyle)===null||n===void 0?void 0:n.fill),p=r.addShape("circle",{attrs:S(S(S({x:i,y:a,r:v},e.defaultStyle),e.style),{fill:d})});return p}}),Mt("polygon","square",{draw:function(e,r){var t,n,i=e.x,a=e.y,o=this.parsePoints(e.points),l=Math.abs(o[2].x-o[1].x),s=Math.abs(o[1].y-o[0].y),u=Math.min(l,s),c=Number(e.shape[1]),f=Number(e.shape[2]),h=Math.sqrt(f),v=u*h*Math.sqrt(c),d=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((n=e.defaultStyle)===null||n===void 0?void 0:n.fill),p=r.addShape("rect",{attrs:S(S(S({x:i-v/2,y:a-v/2,width:v,height:v},e.defaultStyle),e.style),{fill:d})});return p}}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t}return r.getDefaultOptions=function(){return jW},r.prototype.getSchemaAdaptor=function(){return XW},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(ft);var UW="liquid";function rb(e){return[{percent:e,type:UW}]}function qW(e){var r=e.chart,t=e.options,n=t.percent,i=t.liquidStyle,a=t.radius,o=t.outline,l=t.wave,s=t.shape,u=t.shapeStyle,c=t.animation;r.scale({percent:{min:0,max:1}}),r.data(rb(n));var f=t.color||r.getTheme().defaultColor,h=B({},e,{options:{xField:"type",yField:"percent",widthRatio:a,interval:{color:f,style:i,shape:"liquid-fill-gauge"}}}),v=Fe(h).ext,d=v.geometry,p=r.getTheme().background,y={percent:n,radius:a,outline:o,wave:l,shape:s,shapeStyle:u,background:p,animation:c};return d.customInfo(y),r.legend(!1),r.axis(!1),r.tooltip(!1),e}function nb(e,r){var t=e.chart,n=e.options,i=n.statistic,a=n.percent,o=n.meta;t.getController("annotation").clear(!0);var l=E(o,["percent","formatter"])||function(u){return"".concat((u*100).toFixed(2),"%")},s=i.content;return s&&(s=B({},s,{content:Y(s.content)?l(a):s.content})),kf(t,{statistic:S(S({},i),{content:s}),plotType:"liquid"},{percent:a}),r&&t.render(!0),e}function ZW(e){return lt(wt,pr("liquidStyle"),qW,nb,Ut({}),It,Yt)(e)}var QW={radius:.9,statistic:{title:!1,content:{style:{opacity:.75,fontSize:"30px",lineHeight:"30px",textAlign:"center"}}},outline:{border:2,distance:0},wave:{count:3,length:192},shape:"circle"},ib=5e3;function ab(e,r,t){return e+(r-e)*t}function KW(e){var r=S({opacity:1},e.style);return e.color&&!r.fill&&(r.fill=e.color),r}function JW(e){var r={fill:"#fff",fillOpacity:0,lineWidth:4},t=Tt({},r,e.style);return e.color&&!t.stroke&&(t.stroke=e.color),st(e.opacity)&&(t.opacity=t.strokeOpacity=e.opacity),t}function t6(e,r,t,n){return r===0?[[e+1/2*t/Math.PI/2,n/2],[e+1/2*t/Math.PI,n],[e+t/4,n]]:r===1?[[e+1/2*t/Math.PI/2*(Math.PI-2),n],[e+1/2*t/Math.PI/2*(Math.PI-1),n/2],[e+t/4,0]]:r===2?[[e+1/2*t/Math.PI/2,-n/2],[e+1/2*t/Math.PI,-n],[e+t/4,-n]]:[[e+1/2*t/Math.PI/2*(Math.PI-2),-n],[e+1/2*t/Math.PI/2*(Math.PI-1),-n/2],[e+t/4,0]]}function e6(e,r,t,n,i,a,o){for(var l=Math.ceil(2*e/t*4)*4,s=[],u=n;u<-Math.PI*2;)u+=Math.PI*2;for(;u>0;)u-=Math.PI*2;u=u/Math.PI/2*t;var c=a-e+u-e*2;s.push(["M",c,r]);for(var f=0,h=0;h<l;++h){var v=h%4,d=t6(h*t/4,v,t,i);s.push(["C",d[0][0]+c,-d[0][1]+r,d[1][0]+c,-d[1][1]+r,d[2][0]+c,-d[2][1]+r]),h===l-1&&(f=d[2][0])}return s.push(["L",f+c,o+e]),s.push(["L",c,o+e]),s.push(["Z"]),s}function r6(e,r,t,n,i,a,o,l,s,u){for(var c=i.fill,f=i.opacity,h=o.getBBox(),v=h.maxX-h.minX,d=h.maxY-h.minY,p=0;p<n;p++){var y=n<=1?1:p/(n-1),g=a.addShape("path",{name:"waterwave-path",attrs:{path:e6(l,h.minY+d*t,s,0,v/32,e,r),fill:c,opacity:ab(.2,.9,y)*f}});try{if(u===!1)return;var m=kg([["t",s,0]]);g.stopAnimate(),g.animate({matrix:m},{duration:ab(.5*ib,ib,y),repeat:!0})}catch(x){console.warn("off-screen group animate error!")}}}function n6(e,r,t,n){var i=t*2/3,a=Math.max(i,n),o=i/2,l=e,s=o+r-a/2,u=Math.asin(o/((a-o)*.85)),c=Math.sin(u)*o,f=Math.cos(u)*o,h=l-f,v=s+c,d=e,p=s+o/Math.sin(u);return`
|
|
77
77
|
M `.concat(h," ").concat(v,`
|
|
78
78
|
A `).concat(o," ").concat(o," 0 1 1 ").concat(h+f*2," ").concat(v,`
|
|
79
79
|
Q `).concat(d," ").concat(p," ").concat(e," ").concat(r+a/2,`
|
|
@@ -101,10 +101,10 @@
|
|
|
101
101
|
L `).concat(e+o," ").concat(r+a,`
|
|
102
102
|
L `).concat(e-o," ").concat(r+a,`
|
|
103
103
|
Z
|
|
104
|
-
`)}var ob={pin:n6,circle:i6,diamond:a6,triangle:o6,rect:l6};Mt("interval","liquid-fill-gauge",{draw:function(e,r){var t=.5,n=.5,i=e.customInfo,a=i,o=a.percent,l=a.radius,s=a.shape,u=a.shapeStyle,c=a.background,f=a.animation,h=i.outline,v=i.wave,d=h.border,p=h.distance,y=v.count,g=v.length,m=Pe(e.points,function(W,q){return Math.min(W,q.x)},1/0),x=this.parsePoint({x:t,y:n}),w=this.parsePoint({x:m,y:n}),C=x.x-w.x,M=Math.min(C,w.y*l),A=KW(e),b=JW(Tt({},e,h)),T=M-d/2,k=typeof s=="function"?s:ob[s]||ob.circle,P=k(x.x,x.y,T*2,T*2);if(u&&r.addShape("path",{name:"shape",attrs:S({path:P},u)}),o>0){var O=r.addGroup({name:"waves"}),V=O.setClip({type:"path",attrs:{path:P}});r6(x.x,x.y,1-e.points[1].y,y,A,O,V,M*2,g,f)}return r.addShape("path",{name:"distance",attrs:{path:P,fill:"transparent",lineWidth:d+p*2,stroke:c==="transparent"?"#fff":c}}),r.addShape("path",{name:"wrap",attrs:Tt(b,{path:P,fill:"transparent",lineWidth:d})}),r}}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="liquid",t}return r.getDefaultOptions=function(){return QW},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(rb(t)),nb({chart:this.chart,options:this.options},!0),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getSchemaAdaptor=function(){return ZW},r}(ft);function s6(e){var r=e.chart,t=e.options,n=t.data,i=t.lineStyle,a=t.color,o=t.point,l=t.area;r.data(n);var s=D({},e,{options:{line:{style:i,color:a},point:o&&S({color:a},o),area:l&&S({color:a},l),label:void 0}}),u=D({},s,{options:{tooltip:!1}}),c=(o==null?void 0:o.state)||t.state,f=D({},s,{options:{tooltip:!1,state:c}});return _o(s),gr(f),Of(u),e}function u6(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return lt(Ut((r={},r[a]=n,r[o]=i,r)))(e)}function c6(e){var r=e.chart,t=e.options,n=t.radius,i=t.startAngle,a=t.endAngle;return r.coordinate("polar",{radius:n,startAngle:i,endAngle:a}),e}function f6(e){var r=e.chart,t=e.options,n=t.xField,i=t.xAxis,a=t.yField,o=t.yAxis;return r.axis(n,i),r.axis(a,o),e}function h6(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"line");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:fe(l)})}return e}function v6(e){return lt(s6,u6,wt,c6,f6,Yo,le,h6,Yt,It,_t())(e)}var d6=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"name",{get:function(){return"radar-tooltip"},enumerable:!1,configurable:!0}),r.prototype.getTooltipItems=function(t){var n=this.getTooltipCfg(),i=n.shared,a=n.title,o=e.prototype.getTooltipItems.call(this,t);if(o.length>0){var l=this.view.geometries[0],s=l.dataArray,u=o[0].name,c=[];return s.forEach(function(f){f.forEach(function(h){var v=Je.getTooltipItems(h,l),d=v[0];if(!i&&d&&d.name===u){var p=Y(a)?u:a;c.push(S(S({},d),{name:d.title,title:p}))}else if(i&&d){var p=Y(a)?d.name||u:a;c.push(S(S({},d),{name:d.title,title:p}))}})}),c}return[]},r}($S);Sa("radar-tooltip",d6);var p6=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.init=function(){var t=this.context.view;t.removeInteraction("tooltip")},r.prototype.show=function(){var t=this.context.event,n=this.getTooltipController();n.showTooltip({x:t.x,y:t.y})},r.prototype.hide=function(){var t=this.getTooltipController();t.hideTooltip()},r.prototype.getTooltipController=function(){var t=this.context.view;return t.getController("radar-tooltip")},r}(Bt);et("radar-tooltip",p6),ut("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radar",t}return r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return D({},e.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},r.prototype.getSchemaAdaptor=function(){return v6},r}(ft);function g6(e,r,t){var n=t.map(function(o){return o[r]}).filter(function(o){return o!==void 0}),i=n.length>0?Math.max.apply(Math,n):0,a=Math.abs(e)%360;return a?i*360/a:i}function y6(e,r,t){var n=[];return e.forEach(function(i){var a=n.find(function(o){return o[r]===i[r]});a?a[t]+=i[t]||null:n.push(S({},i))}),n}function m6(e){var r=e.chart,t=e.options,n=t.barStyle,i=t.color,a=t.tooltip,o=t.colorField,l=t.type,s=t.xField,u=t.yField,c=t.data,f=t.shape,h=zo(c,u);r.data(h);var v=D({},e,{options:{tooltip:a,seriesField:o,interval:{style:n,color:i,shape:f||(l==="line"?"line":"intervel")},minColumnWidth:t.minBarWidth,maxColumnWidth:t.maxBarWidth,columnBackground:t.barBackground}});return Fe(v),l==="line"&&gr({chart:r,options:{xField:s,yField:u,seriesField:o,point:{shape:"circle",color:i}}}),e}function lb(e){var r,t=e.options,n=t.yField,i=t.xField,a=t.data,o=t.isStack,l=t.isGroup,s=t.colorField,u=t.maxAngle,c=o&&!l&&s?y6(a,i,n):a,f=zo(c,n);return lt(Ut((r={},r[n]={min:0,max:g6(u,n,f)},r)))(e)}function x6(e){var r=e.chart,t=e.options,n=t.radius,i=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:n,innerRadius:i,startAngle:a,endAngle:o}}).transpose(),e}function w6(e){var r=e.chart,t=e.options,n=t.xField,i=t.xAxis;return r.axis(n,i),e}function S6(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"interval");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:S(S({},fe(l)),{type:"polar"})})}return e}function C6(e){return lt(pr("barStyle"),m6,lb,w6,x6,Yt,It,wt,le,Yo,_t(),S6)(e)}var M6=D({},ft.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240});(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radial-bar",t}return r.getDefaultOptions=function(){return M6},r.prototype.changeData=function(t){this.updateOption({data:t}),lb({chart:this.chart,options:this.options}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return C6},r})(ft);function A6(e){var r=e.chart,t=e.options,n=t.data,i=t.sectorStyle,a=t.shape,o=t.color;return r.data(n),lt(Fe)(D({},e,{options:{marginRatio:1,interval:{style:i,color:o,shape:a}}})),e}function F6(e){var r=e.chart,t=e.options,n=t.label,i=t.xField,a=Ae(r,"interval");if(n===!1)a.label(!1);else if(At(n)){var o=n.callback,l=n.fields,s=kt(n,["callback","fields"]),u=s.offset,c=s.layout;(u===void 0||u>=0)&&(c=c?G(c)?c:[c]:[],s.layout=de(c,function(f){return f.type!=="limit-in-shape"}),s.layout.length||delete s.layout),a.label({fields:l||[i],callback:o,cfg:fe(s)})}else Nn(Zr.WARN,n===null,"the label option must be an Object."),a.label({fields:[i]});return e}function b6(e){var r=e.chart,t=e.options,n=t.legend,i=t.seriesField;return n===!1?r.legend(!1):i&&r.legend(i,n),e}function E6(e){var r=e.chart,t=e.options,n=t.radius,i=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:n,innerRadius:i,startAngle:a,endAngle:o}}),e}function k6(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return lt(Ut((r={},r[a]=n,r[o]=i,r)))(e)}function T6(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n?r.axis(a,n):r.axis(a,!1),i?r.axis(o,i):r.axis(o,!1),e}function I6(e){lt(pr("sectorStyle"),A6,k6,F6,E6,T6,b6,le,Yt,It,wt,_t(),Ii)(e)}var P6=D({},ft.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right",radio:{}},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="rose",t}return r.getDefaultOptions=function(){return P6},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return I6},r})(ft);var sb="x",ub="y",cb="name",Qf="nodes",Kf="edges";function L6(e,r,t){var n=[];return e.forEach(function(i){var a=i[r],o=i[t];n.includes(a)||n.push(a),n.includes(o)||n.push(o)}),n}function O6(e,r,t,n){var i={};return r.forEach(function(a){i[a]={},r.forEach(function(o){i[a][o]=0})}),e.forEach(function(a){i[a[t]][a[n]]=1}),i}function D6(e,r,t){if(!G(e))return[];var n=[],i=L6(e,r,t),a=O6(e,i,r,t),o={};i.forEach(function(s){o[s]=0});function l(s){o[s]=1,i.forEach(function(u){if(a[s][u]!=0)if(o[u]==1)n.push("".concat(s,"_").concat(u));else{if(o[u]==-1)return;l(u)}}),o[s]=-1}return i.forEach(function(s){o[s]!=-1&&l(s)}),n.length!==0&&console.warn("sankey data contains circle, ".concat(n.length," records removed."),n),e.filter(function(s){return n.findIndex(function(u){return u==="".concat(s[r],"_").concat(s[t])})<0})}function B6(e){return e.target.depth}function R6(e){return e.depth}function N6(e,r){return r-1-e.height}function Gg(e,r){return e.sourceLinks.length?e.depth:r-1}function z6(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?tP(e.sourceLinks,B6)-1:0}function Jf(e){return function(){return e}}function Hg(e,r){for(var t=0,n=0;n<e.length;n++)t+=r(e[n]);return t}function Wg(e,r){for(var t=-1/0,n=0;n<e.length;n++)t=Math.max(r(e[n]),t);return t}function Y6(e,r){for(var t=1/0,n=0;n<e.length;n++)t=Math.min(r(e[n]),t);return t}function fb(e,r){return th(e.source,r.source)||e.index-r.index}function hb(e,r){return th(e.target,r.target)||e.index-r.index}function th(e,r){return e.y0-r.y0}function Xg(e){return e.value}function V6(e){return e.index}function _6(e){return e.nodes}function $6(e){return e.links}function vb(e,r){var t=e.get(r);if(!t)throw new Error("missing: "+r);return t}function db(e){for(var r=e.nodes,t=0,n=r;t<n.length;t++){for(var i=n[t],a=i.y0,o=a,l=0,s=i.sourceLinks;l<s.length;l++){var u=s[l];u.y0=a+u.width/2,a+=u.width}for(var c=0,f=i.targetLinks;c<f.length;c++){var u=f[c];u.y1=o+u.width/2,o+=u.width}}}function G6(){var e=0,r=0,t=1,n=1,i=24,a=8,o,l=V6,s=Gg,u,c,f,h=_6,v=$6,d=6;function p(L){var H={nodes:h(L),links:v(L)};return y(H),g(H),m(H),x(H),M(H),db(H),H}p.update=function(L){return db(L),L},p.nodeId=function(L){return arguments.length?(l=typeof L=="function"?L:Jf(L),p):l},p.nodeAlign=function(L){return arguments.length?(s=typeof L=="function"?L:Jf(L),p):s},p.nodeDepth=function(L){return arguments.length?(u=L,p):u},p.nodeSort=function(L){return arguments.length?(c=L,p):c},p.nodeWidth=function(L){return arguments.length?(i=+L,p):i},p.nodePadding=function(L){return arguments.length?(a=o=+L,p):a},p.nodes=function(L){return arguments.length?(h=typeof L=="function"?L:Jf(L),p):h},p.links=function(L){return arguments.length?(v=typeof L=="function"?L:Jf(L),p):v},p.linkSort=function(L){return arguments.length?(f=L,p):f},p.size=function(L){return arguments.length?(e=r=0,t=+L[0],n=+L[1],p):[t-e,n-r]},p.extent=function(L){return arguments.length?(e=+L[0][0],t=+L[1][0],r=+L[0][1],n=+L[1][1],p):[[e,r],[t,n]]},p.iterations=function(L){return arguments.length?(d=+L,p):d};function y(L){var H=L.nodes,N=L.links;H.forEach(function(ot,xt){ot.index=xt,ot.sourceLinks=[],ot.targetLinks=[]});var _=new Map(H.map(function(ot){return[l(ot),ot]}));if(N.forEach(function(ot,xt){ot.index=xt;var Dt=ot.source,Xt=ot.target;typeof Dt!="object"&&(Dt=ot.source=vb(_,Dt)),typeof Xt!="object"&&(Xt=ot.target=vb(_,Xt)),Dt.sourceLinks.push(ot),Xt.targetLinks.push(ot)}),f!=null)for(var $=0,X=H;$<X.length;$++){var K=X[$],ct=K.sourceLinks,nt=K.targetLinks;ct.sort(f),nt.sort(f)}}function g(L){for(var H=L.nodes,N=0,_=H;N<_.length;N++){var $=_[N];$.value=$.fixedValue===void 0?Math.max(Hg($.sourceLinks,Xg),Hg($.targetLinks,Xg)):$.fixedValue}}function m(L){for(var H=L.nodes,N=H.length,_=new Set(H),$=new Set,X=0;_.size;){if(_.forEach(function(ot){ot.depth=X;for(var xt=0,Dt=ot.sourceLinks;xt<Dt.length;xt++){var Xt=Dt[xt].target;$.add(Xt)}}),++X>N)throw new Error("circular link");_=$,$=new Set}if(u)for(var K=Math.max(Wg(H,function(ot){return ot.depth})+1,0),ct=void 0,nt=0;nt<H.length;nt++)ct=H[nt],ct.depth=u.call(null,ct,K)}function x(L){for(var H=L.nodes,N=H.length,_=new Set(H),$=new Set,X=0;_.size;){if(_.forEach(function(K){K.height=X;for(var ct=0,nt=K.targetLinks;ct<nt.length;ct++){var ot=nt[ct].source;$.add(ot)}}),++X>N)throw new Error("circular link");_=$,$=new Set}}function w(L){for(var H=L.nodes,N=Math.max(Wg(H,function(Xt){return Xt.depth})+1,0),_=(t-e-i)/(N-1),$=new Array(N).fill(0).map(function(){return[]}),X=0,K=H;X<K.length;X++){var ct=K[X],nt=Math.max(0,Math.min(N-1,Math.floor(s.call(null,ct,N))));ct.layer=nt,ct.x0=e+nt*_,ct.x1=ct.x0+i,$[nt]?$[nt].push(ct):$[nt]=[ct]}if(c)for(var ot=0,xt=$;ot<xt.length;ot++){var Dt=xt[ot];Dt.sort(c)}return $}function C(L){for(var H=Y6(L,function(Te){return(n-r-(Te.length-1)*o)/Hg(Te,Xg)}),N=0,_=L;N<_.length;N++){for(var $=_[N],X=r,K=0,ct=$;K<ct.length;K++){var nt=ct[K];nt.y0=X,nt.y1=X+nt.value*H,X=nt.y1+o;for(var ot=0,xt=nt.sourceLinks;ot<xt.length;ot++){var Dt=xt[ot];Dt.width=Dt.value*H}}X=(n-X+o)/($.length+1);for(var Xt=0;Xt<$.length;++Xt){var nt=$[Xt];nt.y0+=X*(Xt+1),nt.y1+=X*(Xt+1)}V($)}}function M(L){var H=w(L);o=Math.min(a,(n-r)/(Wg(H,function(X){return X.length})-1)),C(H);for(var N=0;N<d;++N){var _=Math.pow(.99,N),$=Math.max(1-_,(N+1)/d);b(H,_,$),A(H,_,$)}}function A(L,H,N){for(var _=1,$=L.length;_<$;++_){for(var X=L[_],K=0,ct=X;K<ct.length;K++){for(var nt=ct[K],ot=0,xt=0,Dt=0,Xt=nt.targetLinks;Dt<Xt.length;Dt++){var Te=Xt[Dt],ti=Te.source,ei=Te.value,ri=ei*(nt.layer-ti.layer);ot+=W(ti,nt)*ri,xt+=ri}if(xt>0){var io=(ot/xt-nt.y0)*H;nt.y0+=io,nt.y1+=io,O(nt)}}c===void 0&&X.sort(th),X.length&&T(X,N)}}function b(L,H,N){for(var _=L.length,$=_-2;$>=0;--$){for(var X=L[$],K=0,ct=X;K<ct.length;K++){for(var nt=ct[K],ot=0,xt=0,Dt=0,Xt=nt.sourceLinks;Dt<Xt.length;Dt++){var Te=Xt[Dt],ti=Te.target,ei=Te.value,ri=ei*(ti.layer-nt.layer);ot+=q(nt,ti)*ri,xt+=ri}if(xt>0){var io=(ot/xt-nt.y0)*H;nt.y0+=io,nt.y1+=io,O(nt)}}c===void 0&&X.sort(th),X.length&&T(X,N)}}function T(L,H){var N=L.length>>1,_=L[N];P(L,_.y0-o,N-1,H),k(L,_.y1+o,N+1,H),P(L,n,L.length-1,H),k(L,r,0,H)}function k(L,H,N,_){for(;N<L.length;++N){var $=L[N],X=(H-$.y0)*_;X>1e-6&&($.y0+=X,$.y1+=X),H=$.y1+o}}function P(L,H,N,_){for(;N>=0;--N){var $=L[N],X=($.y1-H)*_;X>1e-6&&($.y0-=X,$.y1-=X),H=$.y0-o}}function O(L){var H=L.sourceLinks,N=L.targetLinks;if(f===void 0){for(var _=0,$=N;_<$.length;_++){var X=$[_].source.sourceLinks;X.sort(hb)}for(var K=0,ct=H;K<ct.length;K++){var nt=ct[K].target.targetLinks;nt.sort(fb)}}}function V(L){if(f===void 0)for(var H=0,N=L;H<N.length;H++){var _=N[H],$=_.sourceLinks,X=_.targetLinks;$.sort(hb),X.sort(fb)}}function W(L,H){for(var N=L.y0-(L.sourceLinks.length-1)*o/2,_=0,$=L.sourceLinks;_<$.length;_++){var X=$[_],K=X.target,ct=X.width;if(K===H)break;N+=ct+o}for(var nt=0,ot=H.targetLinks;nt<ot.length;nt++){var xt=ot[nt],K=xt.source,ct=xt.width;if(K===L)break;N-=ct}return N}function q(L,H){for(var N=H.y0-(H.targetLinks.length-1)*o/2,_=0,$=H.targetLinks;_<$.length;_++){var X=$[_],K=X.source,ct=X.width;if(K===L)break;N+=ct+o}for(var nt=0,ot=L.sourceLinks;nt<ot.length;nt++){var xt=ot[nt],K=xt.target,ct=xt.width;if(K===H)break;N-=ct}return N}return p}var H6={left:R6,right:N6,center:z6,justify:Gg},W6={nodeId:function(e){return e.index},nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodeSort:void 0};function X6(e){var r=at(e)?H6[e]:Q(e)?e:null;return r||Gg}function j6(e){return Tt({},W6,e)}function U6(e,r){var t=j6(e),n=t.nodeId,i=t.nodeSort,a=t.nodeAlign,o=t.nodeWidth,l=t.nodePadding,s=t.nodeDepth,u=G6().nodeSort(i).nodeWidth(o).nodePadding(l).nodeDepth(s).nodeAlign(X6(a)).extent([[0,0],[1,1]]).nodeId(n),c=u(r),f=c.nodes.map(function(v){var d=v.x0,p=v.x1,y=v.y0,g=v.y1;return v.x=[d,p,p,d],v.y=[y,y,g,g],v}).filter(function(v){return v.name!==null}),h=c.links.map(function(v){var d=v.source,p=v.target,y=d.x1,g=p.x0;v.x=[y,y,g,g];var m=v.width/2;return v.y=[v.y0+m,v.y0-m,v.y1+m,v.y1-m],v}).filter(function(v){var d=v.source,p=v.target;return d.name!==null&&p.name!==null});return{nodes:f,links:h}}function q6(e){return e==="node-link"}function Z6(e,r,t){return ka(e)?e/t:r}function Q6(e,r,t){return ka(e)?e/t:r}function pb(e,r,t){var n=e.dataType,i=e.data,a=e.sourceField,o=e.targetField,l=e.weightField,s=e.nodeAlign,u=e.nodeSort,c=e.nodePadding,f=e.nodePaddingRatio,h=e.nodeWidth,v=e.nodeWidthRatio,d=e.nodeDepth,p=e.rawFields,y=p===void 0?[]:p,g;q6(n)?g=i:g=GM(D6(i,a,o),a,o,l,y);var m=U6({nodeAlign:s,nodePadding:Q6(c,f,t),nodeWidth:Z6(h,v,r),nodeSort:u,nodeDepth:d},g),x=m.nodes,w=m.links;return{nodes:x.map(function(C){return S(S({},bt(C,rt(["x","y","name"],y,!0))),{isNode:!0})}),edges:w.map(function(C){return S(S({source:C.source.name,target:C.target.name,name:C.source.name||C.target.name},bt(C,rt(["x","y","value"],y,!0))),{isNode:!1})})}}function K6(e){var r=e.options,t=r.rawFields,n=t===void 0?[]:t;return D({},{options:{tooltip:{fields:oa(rt(["name","source","target","value","isNode"],n,!0))},label:{fields:oa(rt(["x","name"],n,!0))}}},e)}function J6(e){var r=e.chart,t=e.options,n=t.color,i=t.nodeStyle,a=t.edgeStyle,o=t.label,l=t.tooltip,s=t.nodeState,u=t.edgeState,c=t.rawFields,f=c===void 0?[]:c;r.legend(!1),r.tooltip(l),r.axis(!1),r.coordinate().reflect("y");var h=pb(t,r.width,r.height),v=h.nodes,d=h.edges,p=r.createView({id:Kf});p.data(d),rA({chart:p,options:{xField:sb,yField:ub,seriesField:cb,rawFields:rt(["source","target"],f,!0),edge:{color:n,style:a,shape:"arc"},tooltip:l,state:u}});var y=r.createView({id:Qf});return y.data(v),Df({chart:y,options:{xField:sb,yField:ub,seriesField:cb,polygon:{color:n,style:i},label:o,tooltip:l,state:s}}),r.interaction("element-active"),r.scale({x:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},y:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},name:{sync:"color",type:"cat"}}),e}function t8(e){var r=e.chart,t=e.options,n=t.animation,i=rt(rt([],r.views[0].geometries,!0),r.views[1].geometries,!0);return Ts(r,n,i),e}function e8(e){var r=e.chart,t=e.options,n=t.nodeDraggable,i="sankey-node-draggable";return n?r.interaction(i):r.removeInteraction(i),e}function r8(e){var r=e.chart,t=e.options,n=t.interactions,i=n===void 0?[]:n,a=[].concat(i,t.nodeInteractions||[]),o=[].concat(i,t.edgeInteractions||[]),l=vt(r,Qf),s=vt(r,Kf);return a.forEach(function(u){(u==null?void 0:u.enable)===!1?l.removeInteraction(u.type):l.interaction(u.type,u.cfg||{})}),o.forEach(function(u){(u==null?void 0:u.enable)===!1?s.removeInteraction(u.type):s.interaction(u.type,u.cfg||{})}),e}function n8(e){return lt(K6,J6,r8,e8,t8,wt)(e)}var i8=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isDragging=!1,t}return r.prototype.isNodeElement=function(){var t=E(this.context,"event.target");if(t){var n=t.get("element");return n&&n.getModel().data.isNode}return!1},r.prototype.getNodeView=function(){return vt(this.context.view,Qf)},r.prototype.getEdgeView=function(){return vt(this.context.view,Kf)},r.prototype.getCurrentDatumIdx=function(t){return this.getNodeView().geometries[0].elements.indexOf(t)},r.prototype.start=function(){if(this.isNodeElement()){this.prevPoint={x:E(this.context,"event.x"),y:E(this.context,"event.y")};var t=this.context.event.target.get("element"),n=this.getCurrentDatumIdx(t);if(n===-1)return;this.currentElementIdx=n,this.context.isDragging=!0,this.isDragging=!0,this.prevNodeAnimateCfg=this.getNodeView().getOptions().animate,this.prevEdgeAnimateCfg=this.getEdgeView().getOptions().animate,this.getNodeView().animate(!1),this.getEdgeView().animate(!1)}},r.prototype.translate=function(){if(this.isDragging){var t=this.context.view,n={x:E(this.context,"event.x"),y:E(this.context,"event.y")},i=n.x-this.prevPoint.x,a=n.y-this.prevPoint.y,o=this.getNodeView(),l=o.geometries[0].elements[this.currentElementIdx];if(l&&l.getModel()){var s=l.getModel().data,u=o.getOptions().data,c=o.getCoordinate(),f={x:i/c.getWidth(),y:a/c.getHeight()},h=S(S({},s),{x:s.x.map(function(g){return g+=f.x}),y:s.y.map(function(g){return g+=f.y})}),v=rt([],u,!0);v[this.currentElementIdx]=h,o.data(v);var d=s.name,p=this.getEdgeView(),y=p.getOptions().data;y.forEach(function(g){g.source===d&&(g.x[0]+=f.x,g.x[1]+=f.x,g.y[0]+=f.y,g.y[1]+=f.y),g.target===d&&(g.x[2]+=f.x,g.x[3]+=f.x,g.y[2]+=f.y,g.y[3]+=f.y)}),p.data(y),this.prevPoint=n,t.render(!0)}}},r.prototype.end=function(){this.isDragging=!1,this.context.isDragging=!1,this.prevPoint=null,this.currentElementIdx=null,this.getNodeView().animate(this.prevNodeAnimateCfg),this.getEdgeView().animate(this.prevEdgeAnimateCfg)},r}(Bt);et("sankey-node-drag",i8),ut("sankey-node-draggable",{showEnable:[{trigger:"polygon:mouseenter",action:"cursor:pointer"},{trigger:"polygon:mouseleave",action:"cursor:default"}],start:[{trigger:"polygon:mousedown",action:"sankey-node-drag:start"}],processing:[{trigger:"plot:mousemove",action:"sankey-node-drag:translate"},{isEnable:function(e){return e.isDragging},trigger:"plot:mousemove",action:"cursor:move"}],end:[{trigger:"plot:mouseup",action:"sankey-node-drag:end"}]}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sankey",t}return r.getDefaultOptions=function(){return{appendPadding:8,syncViewPadding:!0,nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.3,lineWidth:0},edgeState:{active:{style:{opacity:.8,lineWidth:0}}},label:{formatter:function(t){var n=t.name;return n},callback:function(t){var n=t[1]===1;return{style:{fill:"#545454",textAlign:n?"end":"start"},offsetX:n?-8:8}},layout:[{type:"hide-overlap"}]},tooltip:{showTitle:!1,showMarkers:!1,shared:!1,showContent:function(t){return!E(t,[0,"data","isNode"])},formatter:function(t){var n=t.source,i=t.target,a=t.value;return{name:n+" -> "+i,value:a}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},r.prototype.changeData=function(t){this.updateOption({data:t});var n=pb(this.options,this.chart.width,this.chart.height),i=n.nodes,a=n.edges,o=vt(this.chart,Qf),l=vt(this.chart,Kf);o.changeData(i),l.changeData(a)},r.prototype.getSchemaAdaptor=function(){return n8},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(ft);var jg="ancestor-node",gb="value",$s="path",a8=[$s,HF,Ng,WF,"name","depth","height"],o8=D({},ft.getDefaultOptions(),{innerRadius:0,radius:.85,hierarchyConfig:{field:"value"},tooltip:{shared:!0,showMarkers:!1,offset:20,showTitle:!1},legend:!1,sunburstStyle:{lineWidth:.5,stroke:"#FFF"},drilldown:{enabled:!0}}),l8={field:"value",size:[1,1],round:!1,padding:0,sort:function(e,r){return r.value-e.value},as:["x","y"],ignoreParentValue:!0};function s8(e,r){r=Tt({},l8,r);var t=r.as;if(!G(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var n;try{n=Yg(r)}catch(s){console.warn(s)}var i=function(s){return NF().size(r.size).round(r.round).padding(r.padding)(jo(s).sum(function(u){return ue(u.children)?r.ignoreParentValue?0:u[n]-Pe(u.children,function(c,f){return c+f[n]},0):u[n]}).sort(r.sort))},a=i(e),o=t[0],l=t[1];return a.each(function(s){var u,c;s[o]=[s.x0,s.x1,s.x1,s.x0],s[l]=[s.y1,s.y1,s.y0,s.y0],s.name=s.name||((u=s.data)===null||u===void 0?void 0:u.name)||((c=s.data)===null||c===void 0?void 0:c.label),s.data.name=s.name,["x0","x1","y0","y1"].forEach(function(f){t.indexOf(f)===-1&&delete s[f]})}),Vg(a)}var u8={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(e,r){return r.value-e.value},ratio:.5*(1+Math.sqrt(5))};function c8(e,r){return e==="treemapSquarify"?GF[e].ratio(r):GF[e]}function yb(e,r){r=Tt({},u8,r);var t=r.as;if(!G(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var n;try{n=Yg(r)}catch(u){console.warn(u)}var i=c8(r.tile,r.ratio),a=function(u){return $F().tile(i).size(r.size).round(r.round).padding(r.padding).paddingInner(r.paddingInner).paddingOuter(r.paddingOuter).paddingTop(r.paddingTop).paddingRight(r.paddingRight).paddingBottom(r.paddingBottom).paddingLeft(r.paddingLeft)(jo(u).sum(function(c){return r.ignoreParentValue&&c.children?0:c[n]}).sort(r.sort))},o=a(e),l=t[0],s=t[1];return o.each(function(u){u[l]=[u.x0,u.x1,u.x1,u.x0],u[s]=[u.y1,u.y1,u.y0,u.y0],["x0","x1","y0","y1"].forEach(function(c){t.indexOf(c)===-1&&delete u[c]})}),Vg(o)}function mb(e){var r=e.data,t=e.colorField,n=e.rawFields,i=e.hierarchyConfig,a=i===void 0?{}:i,o=a.activeDepth,l={partition:s8,treemap:yb},s=e.seriesField,u=e.type||"partition",c=l[u](r,S(S({field:s||"value"},Wu(a,["activeDepth"])),{type:"hierarchy.".concat(u),as:["x","y"]})),f=[];return c.forEach(function(h){var v,d,p,y,g,m;if(h.depth===0||o>0&&h.depth>o)return null;for(var x=h.data.name,w=S({},h);w.depth>1;)x="".concat((d=w.parent.data)===null||d===void 0?void 0:d.name," / ").concat(x),w=w.parent;var C=S(S(S({},bt(h.data,rt(rt([],n||[],!0),[a.field],!1))),(v={},v[$s]=x,v[jg]=w.data.name,v)),h);s&&(C[s]=h.data[s]||((y=(p=h.parent)===null||p===void 0?void 0:p.data)===null||y===void 0?void 0:y[s])),t&&(C[t]=h.data[t]||((m=(g=h.parent)===null||g===void 0?void 0:g.data)===null||m===void 0?void 0:m[t])),C.ext=a,C[Ys]={hierarchyConfig:a,colorField:t,rawFields:n},f.push(C)}),f}function f8(e){var r=e.chart,t=e.options,n=t.color,i=t.colorField,a=i===void 0?jg:i,o=t.sunburstStyle,l=t.rawFields,s=l===void 0?[]:l,u=t.shape,c=mb(t);r.data(c);var f;return o&&(f=function(h){return D({},{fillOpacity:Math.pow(.85,h.depth)},Q(o)?o(h):o)}),Df(D({},e,{options:{xField:"x",yField:"y",seriesField:a,rawFields:oa(rt(rt([],a8,!0),s,!0)),polygon:{color:n,style:f,shape:u}}})),e}function h8(e){var r=e.chart;return r.axis(!1),e}function v8(e){var r=e.chart,t=e.options,n=t.label,i=Ae(r,"polygon");if(!n)i.label(!1);else{var a=n.fields,o=a===void 0?["name"]:a,l=n.callback,s=kt(n,["fields","callback"]);i.label({fields:o,callback:l,cfg:fe(s)})}return e}function d8(e){var r=e.chart,t=e.options,n=t.innerRadius,i=t.radius,a=t.reflect,o=r.coordinate({type:"polar",cfg:{innerRadius:n,radius:i}});return a&&o.reflect(a),e}function p8(e){var r,t=e.options,n=t.hierarchyConfig,i=t.meta;return lt(Ut({},(r={},r[gb]=E(i,E(n,["field"],"value")),r)))(e)}function g8(e){var r=e.chart,t=e.options,n=t.tooltip;if(n===!1)r.tooltip(!1);else{var i=n;E(n,"fields")||(i=D({},{customItems:function(a){return a.map(function(o){var l=E(r.getOptions(),"scales"),s=E(l,[$s,"formatter"],function(c){return c}),u=E(l,[gb,"formatter"],function(c){return c});return S(S({},o),{name:s(o.data[$s]),value:u(o.data.value)})})}},i)),r.tooltip(i)}return e}function y8(e){var r=e.drilldown,t=e.interactions,n=t===void 0?[]:t;return r!=null&&r.enabled?D({},e,{interactions:rt(rt([],n,!0),[{type:"drill-down",cfg:{drillDownConfig:r,transformData:mb}}],!1)}):e}function m8(e){var r=e.chart,t=e.options,n=t.drilldown;return Yt({chart:r,options:y8(t)}),n!=null&&n.enabled&&(r.appendPadding=Ef(r.appendPadding,E(n,["breadCrumb","position"]))),e}function x8(e){return lt(wt,pr("sunburstStyle"),f8,h8,p8,Yo,d8,g8,v8,m8,It,_t())(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sunburst",t}return r.getDefaultOptions=function(){return o8},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return x8},r.SUNBURST_ANCESTOR_FIELD=jg,r.SUNBURST_PATH_FIELD=$s,r.NODE_ANCESTORS_FIELD=Ng,r})(ft);function xb(e,r){if(G(e))return e.find(function(t){return t.type===r})}function wb(e,r){var t=xb(e,r);return t&&t.enable!==!1}function Ug(e){var r=e.interactions,t=e.drilldown;return E(t,"enabled")||wb(r,"treemap-drill-down")}function w8(e){var r=e.interactions["drill-down"];if(r){var t=r.context.actions.find(function(n){return n.name==="drill-down-action"});t.reset()}}function qg(e){var r=e.data,t=e.colorField,n=e.enableDrillDown,i=e.hierarchyConfig,a=yb(r,S(S({},i),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),o=[];return a.forEach(function(l){if(l.depth===0||n&&l.depth!==1||!n&&l.children)return null;var s=l.ancestors().map(function(h){return{data:h.data,height:h.height,value:h.value}}),u=n&&G(r.path)?s.concat(r.path.slice(1)):s,c=Object.assign({},l.data,S({x:l.x,y:l.y,depth:l.depth,value:l.value,path:u},l));if(!l.data[t]&&l.parent){var f=l.ancestors().find(function(h){return h.data[t]});c[t]=f==null?void 0:f.data[t]}else c[t]=l.data[t];c[Ys]={hierarchyConfig:i,colorField:t,enableDrillDown:n},o.push(c)}),o}function S8(e){var r=e.options,t=r.colorField;return D({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(n){return{name:n.name,value:n.value}}}}},e)}function C8(e){var r=e.chart,t=e.options,n=t.color,i=t.colorField,a=t.rectStyle,o=t.hierarchyConfig,l=t.rawFields,s=qg({data:t.data,colorField:t.colorField,enableDrillDown:Ug(t),hierarchyConfig:o});return r.data(s),Df(D({},e,{options:{xField:"x",yField:"y",seriesField:i,rawFields:l,polygon:{color:n,style:a}}})),r.coordinate().reflect("y"),e}function M8(e){var r=e.chart;return r.axis(!1),e}function A8(e){var r=e.drilldown,t=e.interactions,n=t===void 0?[]:t,i=Ug(e);return i?D({},e,{interactions:rt(rt([],n,!0),[{type:"drill-down",cfg:{drillDownConfig:r,transformData:qg}}],!1)}):e}function F8(e){var r=e.chart,t=e.options,n=t.interactions,i=t.drilldown;Yt({chart:r,options:A8(t)});var a=xb(n,"view-zoom");a&&(a.enable!==!1?r.getCanvas().on("mousewheel",function(l){l.preventDefault()}):r.getCanvas().off("mousewheel"));var o=Ug(t);return o&&(r.appendPadding=Ef(r.appendPadding,E(i,["breadCrumb","position"]))),e}function b8(e){return lt(S8,wt,pr("rectStyle"),C8,M8,Yo,le,F8,It,_t())(e)}var E8={colorField:"name",rectStyle:{lineWidth:1,stroke:"#fff"},hierarchyConfig:{tile:"treemapSquarify"},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1,breadCrumb:{position:"bottom-left",rootText:"初始",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}};(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="treemap",t}return r.getDefaultOptions=function(){return E8},r.prototype.changeData=function(t){var n=this.options,i=n.colorField,a=n.interactions,o=n.hierarchyConfig;this.updateOption({data:t});var l=qg({data:t,colorField:i,enableDrillDown:wb(a,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(l),w8(this.chart)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return b8},r})(ft);var $n="id",Zg="path",k8={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(e){return{name:e.id,value:e.size}}},legend:{position:"top-left"},label:{style:{textAlign:"center",fill:"#fff"}},interactions:[{type:"legend-filter",enable:!1}],state:{active:{style:{stroke:"#000"}},selected:{style:{stroke:"#000",lineWidth:2}},inactive:{style:{fillOpacity:.3,strokeOpacity:.3}}},defaultInteractions:["tooltip","venn-legend-active"]};function eh(e){if(e){var r=e.geometries[0].elements;r.forEach(function(t){t.shape.toFront()})}}var T8=Zc("element-active"),I8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){eh(this.context.view)},r.prototype.active=function(){e.prototype.active.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(T8),P8=Zc("element-highlight"),L8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){eh(this.context.view)},r.prototype.highlight=function(){e.prototype.highlight.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.clear=function(){e.prototype.clear.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(P8),O8=Zc("element-selected"),D8=Zc("element-single-selected"),B8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){eh(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(O8),R8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){eh(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(D8);et("venn-element-active",I8),et("venn-element-highlight",L8),et("venn-element-selected",B8),et("venn-element-single-selected",R8),ut("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),ut("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),ut("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),ut("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),ut("venn-legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","venn-element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","venn-element-active:reset"]}]}),ut("venn-legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","venn-element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","venn-element-highlight:reset"]}]});var N8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelPoint=function(t,n,i){var a=t.data,o=a.x,l=a.y,s=t.customLabelInfo,u=s.offsetX,c=s.offsetY;return{content:t.content[i],x:o+u,y:l+c}},r}(nf);gs("venn",N8);var z8=Array.isArray;const Y8=z8;var Gs=`
|
|
105
|
-
\v\f\r \u2028\u2029`,V8=new RegExp("([a-z])["+Gs+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Gs+"]*,?["+Gs+"]*)+)","ig"),_8=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Gs+"]*,?["+Gs+"]*","ig");function $8(e){if(!e)return null;if(Y8(e))return e;var r={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},t=[];return String(e).replace(V8,function(n,i,a){var o=[],l=i.toLowerCase();if(a.replace(_8,function(s,u){u&&o.push(+u)}),l==="m"&&o.length>2&&(t.push([i].concat(o.splice(0,2))),l="l",i=i==="m"?"l":"L"),l==="o"&&o.length===1&&t.push([i,o[0]]),l==="r")t.push([i].concat(o));else for(;o.length>=r[l]&&(t.push([i].concat(o.splice(0,r[l]))),!!r[l]););return""}),t}function G8(e){return
|
|
104
|
+
`)}var ob={pin:n6,circle:i6,diamond:a6,triangle:o6,rect:l6};Mt("interval","liquid-fill-gauge",{draw:function(e,r){var t=.5,n=.5,i=e.customInfo,a=i,o=a.percent,l=a.radius,s=a.shape,u=a.shapeStyle,c=a.background,f=a.animation,h=i.outline,v=i.wave,d=h.border,p=h.distance,y=v.count,g=v.length,m=Pe(e.points,function(W,q){return Math.min(W,q.x)},1/0),x=this.parsePoint({x:t,y:n}),w=this.parsePoint({x:m,y:n}),C=x.x-w.x,M=Math.min(C,w.y*l),A=KW(e),b=JW(Tt({},e,h)),T=M-d/2,k=typeof s=="function"?s:ob[s]||ob.circle,P=k(x.x,x.y,T*2,T*2);if(u&&r.addShape("path",{name:"shape",attrs:S({path:P},u)}),o>0){var O=r.addGroup({name:"waves"}),V=O.setClip({type:"path",attrs:{path:P}});r6(x.x,x.y,1-e.points[1].y,y,A,O,V,M*2,g,f)}return r.addShape("path",{name:"distance",attrs:{path:P,fill:"transparent",lineWidth:d+p*2,stroke:c==="transparent"?"#fff":c}}),r.addShape("path",{name:"wrap",attrs:Tt(b,{path:P,fill:"transparent",lineWidth:d})}),r}}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="liquid",t}return r.getDefaultOptions=function(){return QW},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.chart.emit(ht.BEFORE_CHANGE_DATA,Vt.fromData(this.chart,ht.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(rb(t)),nb({chart:this.chart,options:this.options},!0),this.chart.emit(ht.AFTER_CHANGE_DATA,Vt.fromData(this.chart,ht.AFTER_CHANGE_DATA,null))},r.prototype.getSchemaAdaptor=function(){return ZW},r}(ft);function s6(e){var r=e.chart,t=e.options,n=t.data,i=t.lineStyle,a=t.color,o=t.point,l=t.area;r.data(n);var s=B({},e,{options:{line:{style:i,color:a},point:o&&S({color:a},o),area:l&&S({color:a},l),label:void 0}}),u=B({},s,{options:{tooltip:!1}}),c=(o==null?void 0:o.state)||t.state,f=B({},s,{options:{tooltip:!1,state:c}});return _o(s),gr(f),Of(u),e}function u6(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return lt(Ut((r={},r[a]=n,r[o]=i,r)))(e)}function c6(e){var r=e.chart,t=e.options,n=t.radius,i=t.startAngle,a=t.endAngle;return r.coordinate("polar",{radius:n,startAngle:i,endAngle:a}),e}function f6(e){var r=e.chart,t=e.options,n=t.xField,i=t.xAxis,a=t.yField,o=t.yAxis;return r.axis(n,i),r.axis(a,o),e}function h6(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"line");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:fe(l)})}return e}function v6(e){return lt(s6,u6,wt,c6,f6,Yo,le,h6,Yt,It,_t())(e)}var d6=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"name",{get:function(){return"radar-tooltip"},enumerable:!1,configurable:!0}),r.prototype.getTooltipItems=function(t){var n=this.getTooltipCfg(),i=n.shared,a=n.title,o=e.prototype.getTooltipItems.call(this,t);if(o.length>0){var l=this.view.geometries[0],s=l.dataArray,u=o[0].name,c=[];return s.forEach(function(f){f.forEach(function(h){var v=Je.getTooltipItems(h,l),d=v[0];if(!i&&d&&d.name===u){var p=Y(a)?u:a;c.push(S(S({},d),{name:d.title,title:p}))}else if(i&&d){var p=Y(a)?d.name||u:a;c.push(S(S({},d),{name:d.title,title:p}))}})}),c}return[]},r}($S);Sa("radar-tooltip",d6);var p6=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.init=function(){var t=this.context.view;t.removeInteraction("tooltip")},r.prototype.show=function(){var t=this.context.event,n=this.getTooltipController();n.showTooltip({x:t.x,y:t.y})},r.prototype.hide=function(){var t=this.getTooltipController();t.hideTooltip()},r.prototype.getTooltipController=function(){var t=this.context.view;return t.getController("radar-tooltip")},r}(Bt);et("radar-tooltip",p6),ut("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radar",t}return r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return B({},e.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},r.prototype.getSchemaAdaptor=function(){return v6},r}(ft);function g6(e,r,t){var n=t.map(function(o){return o[r]}).filter(function(o){return o!==void 0}),i=n.length>0?Math.max.apply(Math,n):0,a=Math.abs(e)%360;return a?i*360/a:i}function y6(e,r,t){var n=[];return e.forEach(function(i){var a=n.find(function(o){return o[r]===i[r]});a?a[t]+=i[t]||null:n.push(S({},i))}),n}function m6(e){var r=e.chart,t=e.options,n=t.barStyle,i=t.color,a=t.tooltip,o=t.colorField,l=t.type,s=t.xField,u=t.yField,c=t.data,f=t.shape,h=zo(c,u);r.data(h);var v=B({},e,{options:{tooltip:a,seriesField:o,interval:{style:n,color:i,shape:f||(l==="line"?"line":"intervel")},minColumnWidth:t.minBarWidth,maxColumnWidth:t.maxBarWidth,columnBackground:t.barBackground}});return Fe(v),l==="line"&&gr({chart:r,options:{xField:s,yField:u,seriesField:o,point:{shape:"circle",color:i}}}),e}function lb(e){var r,t=e.options,n=t.yField,i=t.xField,a=t.data,o=t.isStack,l=t.isGroup,s=t.colorField,u=t.maxAngle,c=o&&!l&&s?y6(a,i,n):a,f=zo(c,n);return lt(Ut((r={},r[n]={min:0,max:g6(u,n,f)},r)))(e)}function x6(e){var r=e.chart,t=e.options,n=t.radius,i=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:n,innerRadius:i,startAngle:a,endAngle:o}}).transpose(),e}function w6(e){var r=e.chart,t=e.options,n=t.xField,i=t.xAxis;return r.axis(n,i),e}function S6(e){var r=e.chart,t=e.options,n=t.label,i=t.yField,a=Ae(r,"interval");if(!n)a.label(!1);else{var o=n.callback,l=kt(n,["callback"]);a.label({fields:[i],callback:o,cfg:S(S({},fe(l)),{type:"polar"})})}return e}function C6(e){return lt(pr("barStyle"),m6,lb,w6,x6,Yt,It,wt,le,Yo,_t(),S6)(e)}var M6=B({},ft.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240});(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radial-bar",t}return r.getDefaultOptions=function(){return M6},r.prototype.changeData=function(t){this.updateOption({data:t}),lb({chart:this.chart,options:this.options}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return C6},r})(ft);function A6(e){var r=e.chart,t=e.options,n=t.data,i=t.sectorStyle,a=t.shape,o=t.color;return r.data(n),lt(Fe)(B({},e,{options:{marginRatio:1,interval:{style:i,color:o,shape:a}}})),e}function F6(e){var r=e.chart,t=e.options,n=t.label,i=t.xField,a=Ae(r,"interval");if(n===!1)a.label(!1);else if(At(n)){var o=n.callback,l=n.fields,s=kt(n,["callback","fields"]),u=s.offset,c=s.layout;(u===void 0||u>=0)&&(c=c?G(c)?c:[c]:[],s.layout=de(c,function(f){return f.type!=="limit-in-shape"}),s.layout.length||delete s.layout),a.label({fields:l||[i],callback:o,cfg:fe(s)})}else Nn(Zr.WARN,n===null,"the label option must be an Object."),a.label({fields:[i]});return e}function b6(e){var r=e.chart,t=e.options,n=t.legend,i=t.seriesField;return n===!1?r.legend(!1):i&&r.legend(i,n),e}function E6(e){var r=e.chart,t=e.options,n=t.radius,i=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:n,innerRadius:i,startAngle:a,endAngle:o}}),e}function k6(e){var r,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return lt(Ut((r={},r[a]=n,r[o]=i,r)))(e)}function T6(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n?r.axis(a,n):r.axis(a,!1),i?r.axis(o,i):r.axis(o,!1),e}function I6(e){lt(pr("sectorStyle"),A6,k6,F6,E6,T6,b6,le,Yt,It,wt,_t(),Ii)(e)}var P6=B({},ft.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right",radio:{}},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="rose",t}return r.getDefaultOptions=function(){return P6},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return I6},r})(ft);var sb="x",ub="y",cb="name",Qf="nodes",Kf="edges";function L6(e,r,t){var n=[];return e.forEach(function(i){var a=i[r],o=i[t];n.includes(a)||n.push(a),n.includes(o)||n.push(o)}),n}function O6(e,r,t,n){var i={};return r.forEach(function(a){i[a]={},r.forEach(function(o){i[a][o]=0})}),e.forEach(function(a){i[a[t]][a[n]]=1}),i}function D6(e,r,t){if(!G(e))return[];var n=[],i=L6(e,r,t),a=O6(e,i,r,t),o={};i.forEach(function(s){o[s]=0});function l(s){o[s]=1,i.forEach(function(u){if(a[s][u]!=0)if(o[u]==1)n.push("".concat(s,"_").concat(u));else{if(o[u]==-1)return;l(u)}}),o[s]=-1}return i.forEach(function(s){o[s]!=-1&&l(s)}),n.length!==0&&console.warn("sankey data contains circle, ".concat(n.length," records removed."),n),e.filter(function(s){return n.findIndex(function(u){return u==="".concat(s[r],"_").concat(s[t])})<0})}function B6(e){return e.target.depth}function R6(e){return e.depth}function N6(e,r){return r-1-e.height}function Gg(e,r){return e.sourceLinks.length?e.depth:r-1}function z6(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?tP(e.sourceLinks,B6)-1:0}function Jf(e){return function(){return e}}function Hg(e,r){for(var t=0,n=0;n<e.length;n++)t+=r(e[n]);return t}function Wg(e,r){for(var t=-1/0,n=0;n<e.length;n++)t=Math.max(r(e[n]),t);return t}function Y6(e,r){for(var t=1/0,n=0;n<e.length;n++)t=Math.min(r(e[n]),t);return t}function fb(e,r){return th(e.source,r.source)||e.index-r.index}function hb(e,r){return th(e.target,r.target)||e.index-r.index}function th(e,r){return e.y0-r.y0}function Xg(e){return e.value}function V6(e){return e.index}function _6(e){return e.nodes}function $6(e){return e.links}function vb(e,r){var t=e.get(r);if(!t)throw new Error("missing: "+r);return t}function db(e){for(var r=e.nodes,t=0,n=r;t<n.length;t++){for(var i=n[t],a=i.y0,o=a,l=0,s=i.sourceLinks;l<s.length;l++){var u=s[l];u.y0=a+u.width/2,a+=u.width}for(var c=0,f=i.targetLinks;c<f.length;c++){var u=f[c];u.y1=o+u.width/2,o+=u.width}}}function G6(){var e=0,r=0,t=1,n=1,i=24,a=8,o,l=V6,s=Gg,u,c,f,h=_6,v=$6,d=6;function p(L){var H={nodes:h(L),links:v(L)};return y(H),g(H),m(H),x(H),M(H),db(H),H}p.update=function(L){return db(L),L},p.nodeId=function(L){return arguments.length?(l=typeof L=="function"?L:Jf(L),p):l},p.nodeAlign=function(L){return arguments.length?(s=typeof L=="function"?L:Jf(L),p):s},p.nodeDepth=function(L){return arguments.length?(u=L,p):u},p.nodeSort=function(L){return arguments.length?(c=L,p):c},p.nodeWidth=function(L){return arguments.length?(i=+L,p):i},p.nodePadding=function(L){return arguments.length?(a=o=+L,p):a},p.nodes=function(L){return arguments.length?(h=typeof L=="function"?L:Jf(L),p):h},p.links=function(L){return arguments.length?(v=typeof L=="function"?L:Jf(L),p):v},p.linkSort=function(L){return arguments.length?(f=L,p):f},p.size=function(L){return arguments.length?(e=r=0,t=+L[0],n=+L[1],p):[t-e,n-r]},p.extent=function(L){return arguments.length?(e=+L[0][0],t=+L[1][0],r=+L[0][1],n=+L[1][1],p):[[e,r],[t,n]]},p.iterations=function(L){return arguments.length?(d=+L,p):d};function y(L){var H=L.nodes,N=L.links;H.forEach(function(ot,xt){ot.index=xt,ot.sourceLinks=[],ot.targetLinks=[]});var _=new Map(H.map(function(ot){return[l(ot),ot]}));if(N.forEach(function(ot,xt){ot.index=xt;var Dt=ot.source,Xt=ot.target;typeof Dt!="object"&&(Dt=ot.source=vb(_,Dt)),typeof Xt!="object"&&(Xt=ot.target=vb(_,Xt)),Dt.sourceLinks.push(ot),Xt.targetLinks.push(ot)}),f!=null)for(var $=0,X=H;$<X.length;$++){var K=X[$],ct=K.sourceLinks,nt=K.targetLinks;ct.sort(f),nt.sort(f)}}function g(L){for(var H=L.nodes,N=0,_=H;N<_.length;N++){var $=_[N];$.value=$.fixedValue===void 0?Math.max(Hg($.sourceLinks,Xg),Hg($.targetLinks,Xg)):$.fixedValue}}function m(L){for(var H=L.nodes,N=H.length,_=new Set(H),$=new Set,X=0;_.size;){if(_.forEach(function(ot){ot.depth=X;for(var xt=0,Dt=ot.sourceLinks;xt<Dt.length;xt++){var Xt=Dt[xt].target;$.add(Xt)}}),++X>N)throw new Error("circular link");_=$,$=new Set}if(u)for(var K=Math.max(Wg(H,function(ot){return ot.depth})+1,0),ct=void 0,nt=0;nt<H.length;nt++)ct=H[nt],ct.depth=u.call(null,ct,K)}function x(L){for(var H=L.nodes,N=H.length,_=new Set(H),$=new Set,X=0;_.size;){if(_.forEach(function(K){K.height=X;for(var ct=0,nt=K.targetLinks;ct<nt.length;ct++){var ot=nt[ct].source;$.add(ot)}}),++X>N)throw new Error("circular link");_=$,$=new Set}}function w(L){for(var H=L.nodes,N=Math.max(Wg(H,function(Xt){return Xt.depth})+1,0),_=(t-e-i)/(N-1),$=new Array(N).fill(0).map(function(){return[]}),X=0,K=H;X<K.length;X++){var ct=K[X],nt=Math.max(0,Math.min(N-1,Math.floor(s.call(null,ct,N))));ct.layer=nt,ct.x0=e+nt*_,ct.x1=ct.x0+i,$[nt]?$[nt].push(ct):$[nt]=[ct]}if(c)for(var ot=0,xt=$;ot<xt.length;ot++){var Dt=xt[ot];Dt.sort(c)}return $}function C(L){for(var H=Y6(L,function(Te){return(n-r-(Te.length-1)*o)/Hg(Te,Xg)}),N=0,_=L;N<_.length;N++){for(var $=_[N],X=r,K=0,ct=$;K<ct.length;K++){var nt=ct[K];nt.y0=X,nt.y1=X+nt.value*H,X=nt.y1+o;for(var ot=0,xt=nt.sourceLinks;ot<xt.length;ot++){var Dt=xt[ot];Dt.width=Dt.value*H}}X=(n-X+o)/($.length+1);for(var Xt=0;Xt<$.length;++Xt){var nt=$[Xt];nt.y0+=X*(Xt+1),nt.y1+=X*(Xt+1)}V($)}}function M(L){var H=w(L);o=Math.min(a,(n-r)/(Wg(H,function(X){return X.length})-1)),C(H);for(var N=0;N<d;++N){var _=Math.pow(.99,N),$=Math.max(1-_,(N+1)/d);b(H,_,$),A(H,_,$)}}function A(L,H,N){for(var _=1,$=L.length;_<$;++_){for(var X=L[_],K=0,ct=X;K<ct.length;K++){for(var nt=ct[K],ot=0,xt=0,Dt=0,Xt=nt.targetLinks;Dt<Xt.length;Dt++){var Te=Xt[Dt],ti=Te.source,ei=Te.value,ri=ei*(nt.layer-ti.layer);ot+=W(ti,nt)*ri,xt+=ri}if(xt>0){var io=(ot/xt-nt.y0)*H;nt.y0+=io,nt.y1+=io,O(nt)}}c===void 0&&X.sort(th),X.length&&T(X,N)}}function b(L,H,N){for(var _=L.length,$=_-2;$>=0;--$){for(var X=L[$],K=0,ct=X;K<ct.length;K++){for(var nt=ct[K],ot=0,xt=0,Dt=0,Xt=nt.sourceLinks;Dt<Xt.length;Dt++){var Te=Xt[Dt],ti=Te.target,ei=Te.value,ri=ei*(ti.layer-nt.layer);ot+=q(nt,ti)*ri,xt+=ri}if(xt>0){var io=(ot/xt-nt.y0)*H;nt.y0+=io,nt.y1+=io,O(nt)}}c===void 0&&X.sort(th),X.length&&T(X,N)}}function T(L,H){var N=L.length>>1,_=L[N];P(L,_.y0-o,N-1,H),k(L,_.y1+o,N+1,H),P(L,n,L.length-1,H),k(L,r,0,H)}function k(L,H,N,_){for(;N<L.length;++N){var $=L[N],X=(H-$.y0)*_;X>1e-6&&($.y0+=X,$.y1+=X),H=$.y1+o}}function P(L,H,N,_){for(;N>=0;--N){var $=L[N],X=($.y1-H)*_;X>1e-6&&($.y0-=X,$.y1-=X),H=$.y0-o}}function O(L){var H=L.sourceLinks,N=L.targetLinks;if(f===void 0){for(var _=0,$=N;_<$.length;_++){var X=$[_].source.sourceLinks;X.sort(hb)}for(var K=0,ct=H;K<ct.length;K++){var nt=ct[K].target.targetLinks;nt.sort(fb)}}}function V(L){if(f===void 0)for(var H=0,N=L;H<N.length;H++){var _=N[H],$=_.sourceLinks,X=_.targetLinks;$.sort(hb),X.sort(fb)}}function W(L,H){for(var N=L.y0-(L.sourceLinks.length-1)*o/2,_=0,$=L.sourceLinks;_<$.length;_++){var X=$[_],K=X.target,ct=X.width;if(K===H)break;N+=ct+o}for(var nt=0,ot=H.targetLinks;nt<ot.length;nt++){var xt=ot[nt],K=xt.source,ct=xt.width;if(K===L)break;N-=ct}return N}function q(L,H){for(var N=H.y0-(H.targetLinks.length-1)*o/2,_=0,$=H.targetLinks;_<$.length;_++){var X=$[_],K=X.source,ct=X.width;if(K===L)break;N+=ct+o}for(var nt=0,ot=L.sourceLinks;nt<ot.length;nt++){var xt=ot[nt],K=xt.target,ct=xt.width;if(K===H)break;N-=ct}return N}return p}var H6={left:R6,right:N6,center:z6,justify:Gg},W6={nodeId:function(e){return e.index},nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodeSort:void 0};function X6(e){var r=at(e)?H6[e]:Q(e)?e:null;return r||Gg}function j6(e){return Tt({},W6,e)}function U6(e,r){var t=j6(e),n=t.nodeId,i=t.nodeSort,a=t.nodeAlign,o=t.nodeWidth,l=t.nodePadding,s=t.nodeDepth,u=G6().nodeSort(i).nodeWidth(o).nodePadding(l).nodeDepth(s).nodeAlign(X6(a)).extent([[0,0],[1,1]]).nodeId(n),c=u(r),f=c.nodes.map(function(v){var d=v.x0,p=v.x1,y=v.y0,g=v.y1;return v.x=[d,p,p,d],v.y=[y,y,g,g],v}).filter(function(v){return v.name!==null}),h=c.links.map(function(v){var d=v.source,p=v.target,y=d.x1,g=p.x0;v.x=[y,y,g,g];var m=v.width/2;return v.y=[v.y0+m,v.y0-m,v.y1+m,v.y1-m],v}).filter(function(v){var d=v.source,p=v.target;return d.name!==null&&p.name!==null});return{nodes:f,links:h}}function q6(e){return e==="node-link"}function Z6(e,r,t){return ka(e)?e/t:r}function Q6(e,r,t){return ka(e)?e/t:r}function pb(e,r,t){var n=e.dataType,i=e.data,a=e.sourceField,o=e.targetField,l=e.weightField,s=e.nodeAlign,u=e.nodeSort,c=e.nodePadding,f=e.nodePaddingRatio,h=e.nodeWidth,v=e.nodeWidthRatio,d=e.nodeDepth,p=e.rawFields,y=p===void 0?[]:p,g;q6(n)?g=i:g=GM(D6(i,a,o),a,o,l,y);var m=U6({nodeAlign:s,nodePadding:Q6(c,f,t),nodeWidth:Z6(h,v,r),nodeSort:u,nodeDepth:d},g),x=m.nodes,w=m.links;return{nodes:x.map(function(C){return S(S({},bt(C,rt(["x","y","name"],y,!0))),{isNode:!0})}),edges:w.map(function(C){return S(S({source:C.source.name,target:C.target.name,name:C.source.name||C.target.name},bt(C,rt(["x","y","value"],y,!0))),{isNode:!1})})}}function K6(e){var r=e.options,t=r.rawFields,n=t===void 0?[]:t;return B({},{options:{tooltip:{fields:oa(rt(["name","source","target","value","isNode"],n,!0))},label:{fields:oa(rt(["x","name"],n,!0))}}},e)}function J6(e){var r=e.chart,t=e.options,n=t.color,i=t.nodeStyle,a=t.edgeStyle,o=t.label,l=t.tooltip,s=t.nodeState,u=t.edgeState,c=t.rawFields,f=c===void 0?[]:c;r.legend(!1),r.tooltip(l),r.axis(!1),r.coordinate().reflect("y");var h=pb(t,r.width,r.height),v=h.nodes,d=h.edges,p=r.createView({id:Kf});p.data(d),rA({chart:p,options:{xField:sb,yField:ub,seriesField:cb,rawFields:rt(["source","target"],f,!0),edge:{color:n,style:a,shape:"arc"},tooltip:l,state:u}});var y=r.createView({id:Qf});return y.data(v),Df({chart:y,options:{xField:sb,yField:ub,seriesField:cb,polygon:{color:n,style:i},label:o,tooltip:l,state:s}}),r.interaction("element-active"),r.scale({x:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},y:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},name:{sync:"color",type:"cat"}}),e}function t8(e){var r=e.chart,t=e.options,n=t.animation,i=rt(rt([],r.views[0].geometries,!0),r.views[1].geometries,!0);return Ts(r,n,i),e}function e8(e){var r=e.chart,t=e.options,n=t.nodeDraggable,i="sankey-node-draggable";return n?r.interaction(i):r.removeInteraction(i),e}function r8(e){var r=e.chart,t=e.options,n=t.interactions,i=n===void 0?[]:n,a=[].concat(i,t.nodeInteractions||[]),o=[].concat(i,t.edgeInteractions||[]),l=vt(r,Qf),s=vt(r,Kf);return a.forEach(function(u){(u==null?void 0:u.enable)===!1?l.removeInteraction(u.type):l.interaction(u.type,u.cfg||{})}),o.forEach(function(u){(u==null?void 0:u.enable)===!1?s.removeInteraction(u.type):s.interaction(u.type,u.cfg||{})}),e}function n8(e){return lt(K6,J6,r8,e8,t8,wt)(e)}var i8=function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isDragging=!1,t}return r.prototype.isNodeElement=function(){var t=E(this.context,"event.target");if(t){var n=t.get("element");return n&&n.getModel().data.isNode}return!1},r.prototype.getNodeView=function(){return vt(this.context.view,Qf)},r.prototype.getEdgeView=function(){return vt(this.context.view,Kf)},r.prototype.getCurrentDatumIdx=function(t){return this.getNodeView().geometries[0].elements.indexOf(t)},r.prototype.start=function(){if(this.isNodeElement()){this.prevPoint={x:E(this.context,"event.x"),y:E(this.context,"event.y")};var t=this.context.event.target.get("element"),n=this.getCurrentDatumIdx(t);if(n===-1)return;this.currentElementIdx=n,this.context.isDragging=!0,this.isDragging=!0,this.prevNodeAnimateCfg=this.getNodeView().getOptions().animate,this.prevEdgeAnimateCfg=this.getEdgeView().getOptions().animate,this.getNodeView().animate(!1),this.getEdgeView().animate(!1)}},r.prototype.translate=function(){if(this.isDragging){var t=this.context.view,n={x:E(this.context,"event.x"),y:E(this.context,"event.y")},i=n.x-this.prevPoint.x,a=n.y-this.prevPoint.y,o=this.getNodeView(),l=o.geometries[0].elements[this.currentElementIdx];if(l&&l.getModel()){var s=l.getModel().data,u=o.getOptions().data,c=o.getCoordinate(),f={x:i/c.getWidth(),y:a/c.getHeight()},h=S(S({},s),{x:s.x.map(function(g){return g+=f.x}),y:s.y.map(function(g){return g+=f.y})}),v=rt([],u,!0);v[this.currentElementIdx]=h,o.data(v);var d=s.name,p=this.getEdgeView(),y=p.getOptions().data;y.forEach(function(g){g.source===d&&(g.x[0]+=f.x,g.x[1]+=f.x,g.y[0]+=f.y,g.y[1]+=f.y),g.target===d&&(g.x[2]+=f.x,g.x[3]+=f.x,g.y[2]+=f.y,g.y[3]+=f.y)}),p.data(y),this.prevPoint=n,t.render(!0)}}},r.prototype.end=function(){this.isDragging=!1,this.context.isDragging=!1,this.prevPoint=null,this.currentElementIdx=null,this.getNodeView().animate(this.prevNodeAnimateCfg),this.getEdgeView().animate(this.prevEdgeAnimateCfg)},r}(Bt);et("sankey-node-drag",i8),ut("sankey-node-draggable",{showEnable:[{trigger:"polygon:mouseenter",action:"cursor:pointer"},{trigger:"polygon:mouseleave",action:"cursor:default"}],start:[{trigger:"polygon:mousedown",action:"sankey-node-drag:start"}],processing:[{trigger:"plot:mousemove",action:"sankey-node-drag:translate"},{isEnable:function(e){return e.isDragging},trigger:"plot:mousemove",action:"cursor:move"}],end:[{trigger:"plot:mouseup",action:"sankey-node-drag:end"}]}),function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sankey",t}return r.getDefaultOptions=function(){return{appendPadding:8,syncViewPadding:!0,nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.3,lineWidth:0},edgeState:{active:{style:{opacity:.8,lineWidth:0}}},label:{formatter:function(t){var n=t.name;return n},callback:function(t){var n=t[1]===1;return{style:{fill:"#545454",textAlign:n?"end":"start"},offsetX:n?-8:8}},layout:[{type:"hide-overlap"}]},tooltip:{showTitle:!1,showMarkers:!1,shared:!1,showContent:function(t){return!E(t,[0,"data","isNode"])},formatter:function(t){var n=t.source,i=t.target,a=t.value;return{name:n+" -> "+i,value:a}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},r.prototype.changeData=function(t){this.updateOption({data:t});var n=pb(this.options,this.chart.width,this.chart.height),i=n.nodes,a=n.edges,o=vt(this.chart,Qf),l=vt(this.chart,Kf);o.changeData(i),l.changeData(a)},r.prototype.getSchemaAdaptor=function(){return n8},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(ft);var jg="ancestor-node",gb="value",$s="path",a8=[$s,HF,Ng,WF,"name","depth","height"],o8=B({},ft.getDefaultOptions(),{innerRadius:0,radius:.85,hierarchyConfig:{field:"value"},tooltip:{shared:!0,showMarkers:!1,offset:20,showTitle:!1},legend:!1,sunburstStyle:{lineWidth:.5,stroke:"#FFF"},drilldown:{enabled:!0}}),l8={field:"value",size:[1,1],round:!1,padding:0,sort:function(e,r){return r.value-e.value},as:["x","y"],ignoreParentValue:!0};function s8(e,r){r=Tt({},l8,r);var t=r.as;if(!G(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var n;try{n=Yg(r)}catch(s){console.warn(s)}var i=function(s){return NF().size(r.size).round(r.round).padding(r.padding)(jo(s).sum(function(u){return ue(u.children)?r.ignoreParentValue?0:u[n]-Pe(u.children,function(c,f){return c+f[n]},0):u[n]}).sort(r.sort))},a=i(e),o=t[0],l=t[1];return a.each(function(s){var u,c;s[o]=[s.x0,s.x1,s.x1,s.x0],s[l]=[s.y1,s.y1,s.y0,s.y0],s.name=s.name||((u=s.data)===null||u===void 0?void 0:u.name)||((c=s.data)===null||c===void 0?void 0:c.label),s.data.name=s.name,["x0","x1","y0","y1"].forEach(function(f){t.indexOf(f)===-1&&delete s[f]})}),Vg(a)}var u8={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(e,r){return r.value-e.value},ratio:.5*(1+Math.sqrt(5))};function c8(e,r){return e==="treemapSquarify"?GF[e].ratio(r):GF[e]}function yb(e,r){r=Tt({},u8,r);var t=r.as;if(!G(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var n;try{n=Yg(r)}catch(u){console.warn(u)}var i=c8(r.tile,r.ratio),a=function(u){return $F().tile(i).size(r.size).round(r.round).padding(r.padding).paddingInner(r.paddingInner).paddingOuter(r.paddingOuter).paddingTop(r.paddingTop).paddingRight(r.paddingRight).paddingBottom(r.paddingBottom).paddingLeft(r.paddingLeft)(jo(u).sum(function(c){return r.ignoreParentValue&&c.children?0:c[n]}).sort(r.sort))},o=a(e),l=t[0],s=t[1];return o.each(function(u){u[l]=[u.x0,u.x1,u.x1,u.x0],u[s]=[u.y1,u.y1,u.y0,u.y0],["x0","x1","y0","y1"].forEach(function(c){t.indexOf(c)===-1&&delete u[c]})}),Vg(o)}function mb(e){var r=e.data,t=e.colorField,n=e.rawFields,i=e.hierarchyConfig,a=i===void 0?{}:i,o=a.activeDepth,l={partition:s8,treemap:yb},s=e.seriesField,u=e.type||"partition",c=l[u](r,S(S({field:s||"value"},Wu(a,["activeDepth"])),{type:"hierarchy.".concat(u),as:["x","y"]})),f=[];return c.forEach(function(h){var v,d,p,y,g,m;if(h.depth===0||o>0&&h.depth>o)return null;for(var x=h.data.name,w=S({},h);w.depth>1;)x="".concat((d=w.parent.data)===null||d===void 0?void 0:d.name," / ").concat(x),w=w.parent;var C=S(S(S({},bt(h.data,rt(rt([],n||[],!0),[a.field],!1))),(v={},v[$s]=x,v[jg]=w.data.name,v)),h);s&&(C[s]=h.data[s]||((y=(p=h.parent)===null||p===void 0?void 0:p.data)===null||y===void 0?void 0:y[s])),t&&(C[t]=h.data[t]||((m=(g=h.parent)===null||g===void 0?void 0:g.data)===null||m===void 0?void 0:m[t])),C.ext=a,C[Ys]={hierarchyConfig:a,colorField:t,rawFields:n},f.push(C)}),f}function f8(e){var r=e.chart,t=e.options,n=t.color,i=t.colorField,a=i===void 0?jg:i,o=t.sunburstStyle,l=t.rawFields,s=l===void 0?[]:l,u=t.shape,c=mb(t);r.data(c);var f;return o&&(f=function(h){return B({},{fillOpacity:Math.pow(.85,h.depth)},Q(o)?o(h):o)}),Df(B({},e,{options:{xField:"x",yField:"y",seriesField:a,rawFields:oa(rt(rt([],a8,!0),s,!0)),polygon:{color:n,style:f,shape:u}}})),e}function h8(e){var r=e.chart;return r.axis(!1),e}function v8(e){var r=e.chart,t=e.options,n=t.label,i=Ae(r,"polygon");if(!n)i.label(!1);else{var a=n.fields,o=a===void 0?["name"]:a,l=n.callback,s=kt(n,["fields","callback"]);i.label({fields:o,callback:l,cfg:fe(s)})}return e}function d8(e){var r=e.chart,t=e.options,n=t.innerRadius,i=t.radius,a=t.reflect,o=r.coordinate({type:"polar",cfg:{innerRadius:n,radius:i}});return a&&o.reflect(a),e}function p8(e){var r,t=e.options,n=t.hierarchyConfig,i=t.meta;return lt(Ut({},(r={},r[gb]=E(i,E(n,["field"],"value")),r)))(e)}function g8(e){var r=e.chart,t=e.options,n=t.tooltip;if(n===!1)r.tooltip(!1);else{var i=n;E(n,"fields")||(i=B({},{customItems:function(a){return a.map(function(o){var l=E(r.getOptions(),"scales"),s=E(l,[$s,"formatter"],function(c){return c}),u=E(l,[gb,"formatter"],function(c){return c});return S(S({},o),{name:s(o.data[$s]),value:u(o.data.value)})})}},i)),r.tooltip(i)}return e}function y8(e){var r=e.drilldown,t=e.interactions,n=t===void 0?[]:t;return r!=null&&r.enabled?B({},e,{interactions:rt(rt([],n,!0),[{type:"drill-down",cfg:{drillDownConfig:r,transformData:mb}}],!1)}):e}function m8(e){var r=e.chart,t=e.options,n=t.drilldown;return Yt({chart:r,options:y8(t)}),n!=null&&n.enabled&&(r.appendPadding=Ef(r.appendPadding,E(n,["breadCrumb","position"]))),e}function x8(e){return lt(wt,pr("sunburstStyle"),f8,h8,p8,Yo,d8,g8,v8,m8,It,_t())(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sunburst",t}return r.getDefaultOptions=function(){return o8},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return x8},r.SUNBURST_ANCESTOR_FIELD=jg,r.SUNBURST_PATH_FIELD=$s,r.NODE_ANCESTORS_FIELD=Ng,r})(ft);function xb(e,r){if(G(e))return e.find(function(t){return t.type===r})}function wb(e,r){var t=xb(e,r);return t&&t.enable!==!1}function Ug(e){var r=e.interactions,t=e.drilldown;return E(t,"enabled")||wb(r,"treemap-drill-down")}function w8(e){var r=e.interactions["drill-down"];if(r){var t=r.context.actions.find(function(n){return n.name==="drill-down-action"});t.reset()}}function qg(e){var r=e.data,t=e.colorField,n=e.enableDrillDown,i=e.hierarchyConfig,a=yb(r,S(S({},i),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),o=[];return a.forEach(function(l){if(l.depth===0||n&&l.depth!==1||!n&&l.children)return null;var s=l.ancestors().map(function(h){return{data:h.data,height:h.height,value:h.value}}),u=n&&G(r.path)?s.concat(r.path.slice(1)):s,c=Object.assign({},l.data,S({x:l.x,y:l.y,depth:l.depth,value:l.value,path:u},l));if(!l.data[t]&&l.parent){var f=l.ancestors().find(function(h){return h.data[t]});c[t]=f==null?void 0:f.data[t]}else c[t]=l.data[t];c[Ys]={hierarchyConfig:i,colorField:t,enableDrillDown:n},o.push(c)}),o}function S8(e){var r=e.options,t=r.colorField;return B({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(n){return{name:n.name,value:n.value}}}}},e)}function C8(e){var r=e.chart,t=e.options,n=t.color,i=t.colorField,a=t.rectStyle,o=t.hierarchyConfig,l=t.rawFields,s=qg({data:t.data,colorField:t.colorField,enableDrillDown:Ug(t),hierarchyConfig:o});return r.data(s),Df(B({},e,{options:{xField:"x",yField:"y",seriesField:i,rawFields:l,polygon:{color:n,style:a}}})),r.coordinate().reflect("y"),e}function M8(e){var r=e.chart;return r.axis(!1),e}function A8(e){var r=e.drilldown,t=e.interactions,n=t===void 0?[]:t,i=Ug(e);return i?B({},e,{interactions:rt(rt([],n,!0),[{type:"drill-down",cfg:{drillDownConfig:r,transformData:qg}}],!1)}):e}function F8(e){var r=e.chart,t=e.options,n=t.interactions,i=t.drilldown;Yt({chart:r,options:A8(t)});var a=xb(n,"view-zoom");a&&(a.enable!==!1?r.getCanvas().on("mousewheel",function(l){l.preventDefault()}):r.getCanvas().off("mousewheel"));var o=Ug(t);return o&&(r.appendPadding=Ef(r.appendPadding,E(i,["breadCrumb","position"]))),e}function b8(e){return lt(S8,wt,pr("rectStyle"),C8,M8,Yo,le,F8,It,_t())(e)}var E8={colorField:"name",rectStyle:{lineWidth:1,stroke:"#fff"},hierarchyConfig:{tile:"treemapSquarify"},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1,breadCrumb:{position:"bottom-left",rootText:"初始",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}};(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="treemap",t}return r.getDefaultOptions=function(){return E8},r.prototype.changeData=function(t){var n=this.options,i=n.colorField,a=n.interactions,o=n.hierarchyConfig;this.updateOption({data:t});var l=qg({data:t,colorField:i,enableDrillDown:wb(a,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(l),w8(this.chart)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return b8},r})(ft);var $n="id",Zg="path",k8={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(e){return{name:e.id,value:e.size}}},legend:{position:"top-left"},label:{style:{textAlign:"center",fill:"#fff"}},interactions:[{type:"legend-filter",enable:!1}],state:{active:{style:{stroke:"#000"}},selected:{style:{stroke:"#000",lineWidth:2}},inactive:{style:{fillOpacity:.3,strokeOpacity:.3}}},defaultInteractions:["tooltip","venn-legend-active"]};function eh(e){if(e){var r=e.geometries[0].elements;r.forEach(function(t){t.shape.toFront()})}}var T8=Zc("element-active"),I8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){eh(this.context.view)},r.prototype.active=function(){e.prototype.active.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(T8),P8=Zc("element-highlight"),L8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){eh(this.context.view)},r.prototype.highlight=function(){e.prototype.highlight.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.clear=function(){e.prototype.clear.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(P8),O8=Zc("element-selected"),D8=Zc("element-single-selected"),B8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){eh(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(O8),R8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){eh(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(D8);et("venn-element-active",I8),et("venn-element-highlight",L8),et("venn-element-selected",B8),et("venn-element-single-selected",R8),ut("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),ut("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),ut("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),ut("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),ut("venn-legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","venn-element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","venn-element-active:reset"]}]}),ut("venn-legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","venn-element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","venn-element-highlight:reset"]}]});var N8=function(e){I(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelPoint=function(t,n,i){var a=t.data,o=a.x,l=a.y,s=t.customLabelInfo,u=s.offsetX,c=s.offsetY;return{content:t.content[i],x:o+u,y:l+c}},r}(nf);gs("venn",N8);var z8=Array.isArray;const Y8=z8;var Gs=`
|
|
105
|
+
\v\f\r \u2028\u2029`,V8=new RegExp("([a-z])["+Gs+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Gs+"]*,?["+Gs+"]*)+)","ig"),_8=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Gs+"]*,?["+Gs+"]*","ig");function $8(e){if(!e)return null;if(Y8(e))return e;var r={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},t=[];return String(e).replace(V8,function(n,i,a){var o=[],l=i.toLowerCase();if(a.replace(_8,function(s,u){u&&o.push(+u)}),l==="m"&&o.length>2&&(t.push([i].concat(o.splice(0,2))),l="l",i=i==="m"?"l":"L"),l==="o"&&o.length===1&&t.push([i,o[0]]),l==="r")t.push([i].concat(o));else for(;o.length>=r[l]&&(t.push([i].concat(o.splice(0,r[l]))),!!r[l]););return""}),t}function G8(e){return B({},e.defaultStyle,{fill:e.color},e.style)}Mt("schema","venn",{draw:function(e,r){var t=e.data,n=$8(t[Zg]),i=G8(e),a=r.addGroup({name:"venn-shape"});a.addShape("path",{attrs:S(S({},i),{path:n}),name:"venn-path"});var o=e.customInfo,l=o.offsetX,s=o.offsetY,u=Je.transform(null,[["t",l,s]]);return a.setMatrix(u),a},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{lineWidth:0,stroke:r,fill:r,r:4}}}});var H8=function(e){return function(r,t){var n=[];return n[0]=e(r[0],t[0]),n[1]=e(r[1],t[1]),n[2]=e(r[2],t[2]),n}},Sb={normal:function(e){return e},multiply:function(e,r){return e*r/255},screen:function(e,r){return 255*(1-(1-e/255)*(1-r/255))},overlay:function(e,r){return r<128?2*e*r/255:255*(1-2*(1-e/255)*(1-r/255))},darken:function(e,r){return e>r?r:e},lighten:function(e,r){return e>r?e:r},dodge:function(e,r){return e===255?255:(e=255*(r/255)/(1-e/255),e>255?255:e)},burn:function(e,r){return r===255?255:e===0?0:255*(1-Math.min(1,(1-r/255)/(e/255)))}},W8=function(e){if(!Sb[e])throw new Error("unknown blend mode "+e);return Sb[e]};function X8(e,r,t){t===void 0&&(t="normal");var n=H8(W8(t))(rh(e),rh(r)),i=rh(e),a=i[0],o=i[1],l=i[2],s=i[3],u=rh(r),c=u[0],f=u[1],h=u[2],v=u[3],d=Number((s+v*(1-s)).toFixed(2)),p=Math.round((s*(1-v)*(a/255)+s*v*(n[0]/255)+(1-s)*v*(c/255))/d*255),y=Math.round((s*(1-v)*(o/255)+s*v*(n[1]/255)+(1-s)*v*(f/255))/d*255),g=Math.round((s*(1-v)*(l/255)+s*v*(n[2]/255)+(1-s)*v*(h/255))/d*255);return"rgba(".concat(p,", ").concat(y,", ").concat(g,", ").concat(d,")")}function rh(e){var r=e.replace("/s+/g",""),t;return typeof r=="string"&&!r.startsWith("rgba")&&!r.startsWith("#")?t=di.rgb2arr(di.toRGB(r)).concat([1]):(r.startsWith("rgba")&&(t=r.replace("rgba(","").replace(")","").split(",")),r.startsWith("#")&&(t=di.rgb2arr(r).concat([1])),t.map(function(n,i){return i===3?Number(n):n|0}))}function j8(e,r,t,n){n=n||{};var i=n.maxIterations||100,a=n.tolerance||1e-10,o=e(r),l=e(t),s=t-r;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return r;if(l===0)return t;for(var u=0;u<i;++u){s/=2;var c=r+s,f=e(c);if(f*o>=0&&(r=c),Math.abs(s)<a||f===0)return c}return r+s}function Qg(e){for(var r=new Array(e),t=0;t<e;++t)r[t]=0;return r}function Cb(e,r){return Qg(e).map(function(){return Qg(r)})}function Qo(e,r){for(var t=0,n=0;n<e.length;++n)t+=e[n]*r[n];return t}function Kg(e){return Math.sqrt(Qo(e,e))}function Jg(e,r,t){for(var n=0;n<r.length;++n)e[n]=r[n]*t}function Gn(e,r,t,n,i){for(var a=0;a<e.length;++a)e[a]=r*t[a]+n*i[a]}function Mb(e,r,t){t=t||{};var n=t.maxIterations||r.length*200,i=t.nonZeroDelta||1.05,a=t.zeroDelta||.001,o=t.minErrorDelta||1e-6,l=t.minErrorDelta||1e-5,s=t.rho!==void 0?t.rho:1,u=t.chi!==void 0?t.chi:2,c=t.psi!==void 0?t.psi:-.5,f=t.sigma!==void 0?t.sigma:.5,h,v=r.length,d=new Array(v+1);d[0]=r,d[0].fx=e(r),d[0].id=0;for(var p=0;p<v;++p){var y=r.slice();y[p]=y[p]?y[p]*i:a,d[p+1]=y,d[p+1].fx=e(y),d[p+1].id=p+1}function g(O){for(var V=0;V<O.length;V++)d[v][V]=O[V];d[v].fx=O.fx}for(var m=function(O,V){return O.fx-V.fx},x=r.slice(),w=r.slice(),C=r.slice(),M=r.slice(),A=0;A<n;++A){if(d.sort(m),t.history){var b=d.map(function(O){var V=O.slice();return V.fx=O.fx,V.id=O.id,V});b.sort(function(O,V){return O.id-V.id}),t.history.push({x:d[0].slice(),fx:d[0].fx,simplex:b})}for(h=0,p=0;p<v;++p)h=Math.max(h,Math.abs(d[0][p]-d[1][p]));if(Math.abs(d[0].fx-d[v].fx)<o&&h<l)break;for(p=0;p<v;++p){x[p]=0;for(var T=0;T<v;++T)x[p]+=d[T][p];x[p]/=v}var k=d[v];if(Gn(w,1+s,x,-s,k),w.fx=e(w),w.fx<d[0].fx)Gn(M,1+u,x,-u,k),M.fx=e(M),M.fx<w.fx?g(M):g(w);else if(w.fx>=d[v-1].fx){var P=!1;if(w.fx>k.fx?(Gn(C,1+c,x,-c,k),C.fx=e(C),C.fx<k.fx?g(C):P=!0):(Gn(C,1-c*s,x,c*s,k),C.fx=e(C),C.fx<w.fx?g(C):P=!0),P){if(f>=1)break;for(p=1;p<d.length;++p)Gn(d[p],1-f,d[0],f,d[p]),d[p].fx=e(d[p])}}else g(w)}return d.sort(m),{fx:d[0].fx,x:d[0]}}function U8(e,r,t,n,i,a,o){var l=t.fx,s=Qo(t.fxprime,r),u=l,c=l,f=s,h=0;i=i||1,a=a||1e-6,o=o||.1;function v(p,y,g){for(var m=0;m<16;++m)if(i=(p+y)/2,Gn(n.x,1,t.x,i,r),u=n.fx=e(n.x,n.fxprime),f=Qo(n.fxprime,r),u>l+a*i*s||u>=g)y=i;else{if(Math.abs(f)<=-o*s)return i;f*(y-p)>=0&&(y=p),p=i,g=u}return 0}for(var d=0;d<10;++d){if(Gn(n.x,1,t.x,i,r),u=n.fx=e(n.x,n.fxprime),f=Qo(n.fxprime,r),u>l+a*i*s||d&&u>=c)return v(h,i,c);if(Math.abs(f)<=-o*s)return i;if(f>=0)return v(i,h,u);c=u,h=i,i*=2}return i}function q8(e,r,t){var n={x:r.slice(),fx:0,fxprime:r.slice()},i={x:r.slice(),fx:0,fxprime:r.slice()},a=r.slice(),o,l,s=1,u;t=t||{},u=t.maxIterations||r.length*20,n.fx=e(n.x,n.fxprime),o=n.fxprime.slice(),Jg(o,n.fxprime,-1);for(var c=0;c<u;++c){if(s=U8(e,o,n,i,s),t.history&&t.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:s}),!s)Jg(o,n.fxprime,-1);else{Gn(a,1,i.fxprime,-1,n.fxprime);var f=Qo(n.fxprime,n.fxprime),h=Math.max(0,Qo(a,i.fxprime)/f);Gn(o,h,o,-1,i.fxprime),l=n,n=i,i=l}if(Kg(n.fxprime)<=1e-5)break}return t.history&&t.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:s}),n}var Ab=1e-10;function ty(e,r){var t=Q8(e),n=t.filter(function(A){return Z8(A,e)}),i=0,a=0,o,l=[];if(n.length>1){var s=Eb(n);for(o=0;o<n.length;++o){var u=n[o];u.angle=Math.atan2(u.x-s.x,u.y-s.y)}n.sort(function(A,b){return b.angle-A.angle});var c=n[n.length-1];for(o=0;o<n.length;++o){var f=n[o];a+=(c.x+f.x)*(f.y-c.y);for(var h={x:(f.x+c.x)/2,y:(f.y+c.y)/2},v=null,d=0;d<f.parentIndex.length;++d)if(c.parentIndex.indexOf(f.parentIndex[d])>-1){var p=e[f.parentIndex[d]],y=Math.atan2(f.x-p.x,f.y-p.y),g=Math.atan2(c.x-p.x,c.y-p.y),m=g-y;m<0&&(m+=2*Math.PI);var x=g-m/2,w=Qr(h,{x:p.x+p.radius*Math.sin(x),y:p.y+p.radius*Math.cos(x)});w>p.radius*2&&(w=p.radius*2),(v===null||v.width>w)&&(v={circle:p,width:w,p1:f,p2:c})}v!==null&&(l.push(v),i+=ey(v.circle.radius,v.width),c=f)}}else{var C=e[0];for(o=1;o<e.length;++o)e[o].radius<C.radius&&(C=e[o]);var M=!1;for(o=0;o<e.length;++o)if(Qr(e[o],C)>Math.abs(C.radius-e[o].radius)){M=!0;break}M?i=a=0:(i=C.radius*C.radius*Math.PI,l.push({circle:C,p1:{x:C.x,y:C.y+C.radius},p2:{x:C.x-Ab,y:C.y+C.radius},width:C.radius*2}))}return a/=2,r&&(r.area=i+a,r.arcArea=i,r.polygonArea=a,r.arcs=l,r.innerPoints=n,r.intersectionPoints=t),i+a}function Z8(e,r){for(var t=0;t<r.length;++t)if(Qr(e,r[t])>r[t].radius+Ab)return!1;return!0}function Q8(e){for(var r=[],t=0;t<e.length;++t)for(var n=t+1;n<e.length;++n)for(var i=bb(e[t],e[n]),a=0;a<i.length;++a){var o=i[a];o.parentIndex=[t,n],r.push(o)}return r}function ey(e,r){return e*e*Math.acos(1-r/e)-(e-r)*Math.sqrt(r*(2*e-r))}function Qr(e,r){return Math.sqrt((e.x-r.x)*(e.x-r.x)+(e.y-r.y)*(e.y-r.y))}function Fb(e,r,t){if(t>=e+r)return 0;if(t<=Math.abs(e-r))return Math.PI*Math.min(e,r)*Math.min(e,r);var n=e-(t*t-r*r+e*e)/(2*t),i=r-(t*t-e*e+r*r)/(2*t);return ey(e,n)+ey(r,i)}function bb(e,r){var t=Qr(e,r),n=e.radius,i=r.radius;if(t>=n+i||t<=Math.abs(n-i))return[];var a=(n*n-i*i+t*t)/(2*t),o=Math.sqrt(n*n-a*a),l=e.x+a*(r.x-e.x)/t,s=e.y+a*(r.y-e.y)/t,u=-(r.y-e.y)*(o/t),c=-(r.x-e.x)*(o/t);return[{x:l+u,y:s-c},{x:l-u,y:s+c}]}function Eb(e){for(var r={x:0,y:0},t=0;t<e.length;++t)r.x+=e[t].x,r.y+=e[t].y;return r.x/=e.length,r.y/=e.length,r}function ry(e,r,t){var n=r[0].radius-Qr(r[0],e),i,a;for(i=1;i<r.length;++i)a=r[i].radius-Qr(r[i],e),a<=n&&(n=a);for(i=0;i<t.length;++i)a=Qr(t[i],e)-t[i].radius,a<=n&&(n=a);return n}function kb(e,r){var t=[],n;for(n=0;n<e.length;++n){var i=e[n];t.push({x:i.x,y:i.y}),t.push({x:i.x+i.radius/2,y:i.y}),t.push({x:i.x-i.radius/2,y:i.y}),t.push({x:i.x,y:i.y+i.radius/2}),t.push({x:i.x,y:i.y-i.radius/2})}var a=t[0],o=ry(t[0],e,r);for(n=1;n<t.length;++n){var l=ry(t[n],e,r);l>=o&&(a=t[n],o=l)}var s=Mb(function(h){return-1*ry({x:h[0],y:h[1]},e,r)},[a.x,a.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:s[0],y:s[1]},c=!0;for(n=0;n<e.length;++n)if(Qr(u,e[n])>e[n].radius){c=!1;break}for(n=0;n<r.length;++n)if(Qr(u,r[n])<r[n].radius){c=!1;break}if(!c)if(e.length==1)u={x:e[0].x,y:e[0].y};else{var f={};ty(e,f),f.arcs.length===0?u={x:0,y:-1e3,disjoint:!0}:f.arcs.length==1?u={x:f.arcs[0].circle.x,y:f.arcs[0].circle.y}:r.length?u=kb(e,[]):u=Eb(f.arcs.map(function(h){return h.p1}))}return u}function K8(e){var r={},t=[];for(var n in e)t.push(n),r[n]=[];for(var i=0;i<t.length;i++)for(var a=e[t[i]],o=i+1;o<t.length;++o){var l=e[t[o]],s=Qr(a,l);s+l.radius<=a.radius+1e-10?r[t[o]].push(t[i]):s+a.radius<=l.radius+1e-10&&r[t[i]].push(t[o])}return r}function J8(e,r){for(var t={},n=K8(e),i=0;i<r.length;++i){for(var a=r[i].sets,o={},l={},s=0;s<a.length;++s){o[a[s]]=!0;for(var u=n[a[s]],c=0;c<u.length;++c)l[u[c]]=!0}var f=[],h=[];for(var v in e)v in o?f.push(e[v]):v in l||h.push(e[v]);var d=kb(f,h);t[a]=d,d.disjoint&&r[i].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return t}function tX(e,r,t){var n=[],i=e-t,a=r;return n.push("M",i,a),n.push("A",t,t,0,1,0,i+2*t,a),n.push("A",t,t,0,1,0,i,a),n.join(" ")}function eX(e){var r={};ty(e,r);var t=r.arcs;if(t.length===0)return"M 0 0";if(t.length==1){var n=t[0].circle;return tX(n.x,n.y,n.radius)}else{for(var i=[`
|
|
106
106
|
M`,t[0].p2.x,t[0].p2.y],a=0;a<t.length;++a){var o=t[a],l=o.circle.radius,s=o.width>l;i.push(`
|
|
107
|
-
A`,l,l,0,s?1:0,1,o.p1.x,o.p1.y)}return i.join(" ")}}function rX(e,r){r=r||{},r.maxIterations=r.maxIterations||500;var t=r.initialLayout||oX,n=r.lossFunction||iy;e=nX(e);var i=t(e,r),a=[],o=[],l;for(l in i)i.hasOwnProperty(l)&&(a.push(i[l].x),a.push(i[l].y),o.push(l));for(var s=Mb(function(f){for(var h={},v=0;v<o.length;++v){var d=o[v];h[d]={x:f[2*v],y:f[2*v+1],radius:i[d].radius}}return n(h,e)},a,r),u=s.x,c=0;c<o.length;++c)l=o[c],i[l].x=u[2*c],i[l].y=u[2*c+1];return i}var Tb=1e-10;function ny(e,r,t){return Math.min(e,r)*Math.min(e,r)*Math.PI<=t+Tb?Math.abs(e-r):j8(function(n){return Fb(e,r,n)-t},0,e+r)}function nX(e){e=e.slice();var r=[],t={},n,i,a,o;for(n=0;n<e.length;++n){var l=e[n];l.sets.length==1?r.push(l.sets[0]):l.sets.length==2&&(a=l.sets[0],o=l.sets[1],t[[a,o]]=!0,t[[o,a]]=!0)}for(r.sort(function(s,u){return s>u?1:-1}),n=0;n<r.length;++n)for(a=r[n],i=n+1;i<r.length;++i)o=r[i],[a,o]in t||e.push({sets:[a,o],size:0});return e}function iX(e,r,t){var n=Cb(r.length,r.length),i=Cb(r.length,r.length);return e.filter(function(a){return a.sets.length==2}).map(function(a){var o=t[a.sets[0]],l=t[a.sets[1]],s=Math.sqrt(r[o].size/Math.PI),u=Math.sqrt(r[l].size/Math.PI),c=ny(s,u,a.size);n[o][l]=n[l][o]=c;var f=0;a.size+1e-10>=Math.min(r[o].size,r[l].size)?f=1:a.size<=1e-10&&(f=-1),i[o][l]=i[l][o]=f}),{distances:n,constraints:i}}function aX(e,r,t,n){var i=0,a;for(a=0;a<r.length;++a)r[a]=0;for(a=0;a<t.length;++a)for(var o=e[2*a],l=e[2*a+1],s=a+1;s<t.length;++s){var u=e[2*s],c=e[2*s+1],f=t[a][s],h=n[a][s],v=(u-o)*(u-o)+(c-l)*(c-l),d=Math.sqrt(v),p=v-f*f;h>0&&d<=f||h<0&&d>=f||(i+=2*p*p,r[2*a]+=4*p*(o-u),r[2*a+1]+=4*p*(l-c),r[2*s]+=4*p*(u-o),r[2*s+1]+=4*p*(c-l))}return i}function oX(e,r){var t=sX(e,r),n=r.lossFunction||iy;if(e.length>=8){var i=lX(e,r),a=n(i,e),o=n(t,e);a+1e-8<o&&(t=i)}return t}function lX(e,r){r=r||{};var t=r.restarts||10,n=[],i={},a;for(a=0;a<e.length;++a){var o=e[a];o.sets.length==1&&(i[o.sets[0]]=n.length,n.push(o))}var l=iX(e,n,i),s=l.distances,u=l.constraints,c=Kg(s.map(Kg))/s.length;s=s.map(function(m){return m.map(function(x){return x/c})});var f=function(m,x){return aX(m,x,s,u)},h,v;for(a=0;a<t;++a){var d=Qg(s.length*2).map(Math.random);v=q8(f,d,r),(!h||v.fx<h.fx)&&(h=v)}var p=h.x,y={};for(a=0;a<n.length;++a){var g=n[a];y[g.sets[0]]={x:p[2*a]*c,y:p[2*a+1]*c,radius:Math.sqrt(g.size/Math.PI)}}if(r.history)for(a=0;a<r.history.length;++a)Jg(r.history[a].x,c);return y}function sX(e,r){for(var t=r&&r.lossFunction?r.lossFunction:iy,n={},i={},a,o=0;o<e.length;++o){var l=e[o];l.sets.length==1&&(a=l.sets[0],n[a]={x:1e10,y:1e10,rowid:Object.keys(n).length,size:l.size,radius:Math.sqrt(l.size/Math.PI)},i[a]=[])}e=e.filter(function(L){return L.sets.length==2});for(var o=0;o<e.length;++o){var s=e[o],u=s.hasOwnProperty("weight")?s.weight:1,c=s.sets[0],f=s.sets[1];s.size+Tb>=Math.min(n[c].size,n[f].size)&&(u=0),i[c].push({set:f,size:s.size,weight:u}),i[f].push({set:c,size:s.size,weight:u})}var h=[];for(a in i)if(i.hasOwnProperty(a)){for(var v=0,o=0;o<i[a].length;++o)v+=i[a][o].size*i[a][o].weight;h.push({set:a,size:v})}function d(L,H){return H.size-L.size}h.sort(d);var p={};function y(L){return L.set in p}function g(L,H){n[H].x=L.x,n[H].y=L.y,p[H]=!0}g({x:0,y:0},h[0].set);for(var o=1;o<h.length;++o){var m=h[o].set,x=i[m].filter(y);if(a=n[m],x.sort(d),x.length===0)throw"ERROR: missing pairwise overlap information";for(var w=[],C=0;C<x.length;++C){var M=n[x[C].set],A=ny(a.radius,M.radius,x[C].size);w.push({x:M.x+A,y:M.y}),w.push({x:M.x-A,y:M.y}),w.push({y:M.y+A,x:M.x}),w.push({y:M.y-A,x:M.x});for(var b=C+1;b<x.length;++b)for(var T=n[x[b].set],k=ny(a.radius,T.radius,x[b].size),P=bb({x:M.x,y:M.y,radius:A},{x:T.x,y:T.y,radius:k}),O=0;O<P.length;++O)w.push(P[O])}for(var V=1e50,W=w[0],C=0;C<w.length;++C){n[m].x=w[C].x,n[m].y=w[C].y;var q=t(n,e);q<V&&(V=q,W=w[C])}g(W,m)}return n}function iy(e,r){var t=0;function n(c){return c.map(function(f){return e[f]})}for(var i=0;i<r.length;++i){var a=r[i],o=void 0;if(a.sets.length!=1){if(a.sets.length==2){var l=e[a.sets[0]],s=e[a.sets[1]];o=Fb(l.radius,s.radius,Qr(l,s))}else o=ty(n(a.sets));var u=a.hasOwnProperty("weight")?a.weight:1;t+=u*(o-a.size)*(o-a.size)}}return t}function uX(e){var r=function(t){var n=Math.max.apply(null,e.map(function(a){return a[t]+a.radius})),i=Math.min.apply(null,e.map(function(a){return a[t]-a.radius}));return{max:n,min:i}};return{xRange:r("x"),yRange:r("y")}}function cX(e,r,t,n){var i=[],a=[];for(var o in e)e.hasOwnProperty(o)&&(a.push(o),i.push(e[o]));r-=2*n,t-=2*n;var l=uX(i),s=l.xRange,u=l.yRange;if(s.max==s.min||u.max==u.min)return console.log("not scaling solution: zero size detected"),e;for(var c=r/(s.max-s.min),f=t/(u.max-u.min),h=Math.min(f,c),v=(r-(s.max-s.min)*h)/2,d=(t-(u.max-u.min)*h)/2,p={},y=0;y<i.length;++y){var g=i[y];p[a[y]]={radius:h*g.radius,x:n+v+(g.x-s.min)*h,y:n+d+(g.y-u.min)*h}}return p}var fX=ho(function(e,r,t,n){var i=new Map,a=e.length;return r.forEach(function(o,l){if(o[n].length===1)i.set(o[$n],e[(l+a)%a]);else{var s=o[n].map(function(u){return i.get(u)});i.set(o[$n],s.slice(1).reduce(function(u,c){return X8(u,c,t)},s[0]))}}),i},function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return JSON.stringify(e)});function hX(e,r,t,n){n===void 0&&(n=0);var i=e.data,a=e.setsField,o=e.sizeField;if(i.length===0)return Nn(Zr.WARN,!1,"warn: %s","数据不能为空"),[];var l=i.map(function(f){var h;return S(S({},f),(h={sets:f[a]||[],size:f[o]},h[Zg]="",h[$n]="",h))});l.sort(function(f,h){return f.sets.length-h.sets.length});var s=rX(l),u=cX(s,r,t,n),c=J8(u,l);return l.forEach(function(f){var h=f.sets,v=h.join(",");f[$n]=v;var d=h.map(function(g){return u[g]}),p=eX(d);/[zZ]$/.test(p)||(p+=" Z"),f[Zg]=p;var y=c[v]||{x:0,y:0};Tt(f,y)}),l}function vX(e,r){for(var t=0;t<r.length;t++)if(!e.includes(r[t]))return!1;return!0}var dX=40;function Ib(e,r,t){var n=e.chart,i=e.options,a=i.blendMode,o=i.setsField,l=n.getTheme(),s=l.colors10,u=l.colors20,c=t;G(c)||(c=r.filter(function(h){return h[o].length===1}).length<=10?s:u);var f=fX(c,r,a,o);return function(h){return f.get(h)||c[0]}}function pX(e,r){var t=e.options,n=t.color;if(typeof n!="function"){var i=typeof n=="string"?[n]:n,a=Ib(e,r,i);return function(o){return a(o[$n])}}return n}function gX(e){var r=e.chart,t=e.options,n=t.legend,i=t.appendPadding,a=t.padding,o=Ti(i);return n!==!1&&(o=Ef(i,E(n,"position"),dX)),r.appendPadding=cg([o,a]),e}function yX(e){var r=e.options,t=r.data;t||(Nn(Zr.WARN,!1,"warn: %s","数据不能为空"),t=[]);var n=t.filter(function(a){return a.sets.length===1}).map(function(a){return a.sets[0]}),i=t.filter(function(a){var o=a.sets;return vX(n,o)});return Gt(i,t)||Nn(Zr.WARN,!1,"warn: %s","交集中不能出现不存在的集合, 请输入合法数据"),Z({},e,{options:{data:i}})}function mX(e){var r=e.chart,t=e.options,n=t.pointStyle,i=t.setsField,a=t.sizeField,o=Ti(r.appendPadding),l=o[0],s=o[1],u=o[2],c=o[3],f={offsetX:c,offsetY:l},h=r.viewBBox,v=h.width,d=h.height,p=hX(t,Math.max(v-(s+c),0),Math.max(d-(l+u),0),0);r.data(p);var y=pg(D({},e,{options:{xField:"x",yField:"y",sizeField:a,seriesField:$n,rawFields:[i,a],schema:{shape:"venn",style:n}}})).ext,g=y.geometry;g.customInfo(f);var m=pX(e,p);return typeof m=="function"&&g.color($n,function(x){var w=p.find(function(M){return M[$n]===x}),C=Ib(e,p)(x);return m(w,C)}),e}function xX(e){var r=e.chart,t=e.options,n=t.label,i=Ti(r.appendPadding),a=i[0],o=i[3],l={offsetX:o,offsetY:a},s=Ae(r,"schema");if(!n)s.label(!1);else{var u=n.callback,c=kt(n,["callback"]);s.label({fields:["id"],callback:u,cfg:Z({},fe(c),{type:"venn",customLabelInfo:l})})}return e}function wX(e){var r=e.chart,t=e.options,n=t.legend,i=t.sizeField;return r.legend($n,n),r.legend(i,!1),e}function SX(e){var r=e.chart;return r.axis(!1),e}function CX(e){var r=e.options,t=e.chart,n=r.interactions;if(n){var i={"legend-active":"venn-legend-active","legend-highlight":"venn-legend-highlight"};Yt(D({},e,{options:{interactions:n.map(function(a){return S(S({},a),{type:i[a.type]||a.type})})}}))}return t.removeInteraction("legend-active"),t.removeInteraction("legend-highlight"),e}function MX(e){return lt(gX,wt,yX,mX,xX,Ut({}),wX,SX,le,CX,It)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="venn",t}return r.getDefaultOptions=function(){return k8},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return MX},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r})(ft);var Or="x",za="violinY",AX="violinSize",Pb="minMax",Lb="quantile",Ob="median",ay="violin_view",FX="min_max_view",bX="quantile_view",EX="median_view",kX=D({},ft.getDefaultOptions(),{syncViewPadding:!0,kde:{type:"triangular",sampleSize:32,width:3},violinStyle:{lineWidth:1,fillOpacity:.3,strokeOpacity:.75},xAxis:{grid:{line:null},tickLine:{alignTick:!1}},yAxis:{grid:{line:{style:{lineWidth:.5,lineDash:[4,4]}}}},legend:{position:"top-left"},tooltip:{showMarkers:!1}}),Db={exports:{}},Bb={exports:{}};(function(e){var r=e.exports;e.exports.isNumber=function(t){return typeof t=="number"},e.exports.findMin=function(t){if(t.length===0)return 1/0;for(var n=t[0],i=1;i<t.length;i++)n=Math.min(n,t[i]);return n},e.exports.findMax=function(t){if(t.length===0)return-1/0;for(var n=t[0],i=1;i<t.length;i++)n=Math.max(n,t[i]);return n},e.exports.findMinMulti=function(t){for(var n=r.findMin(t[0]),i=1;i<t.length;i++)n=Math.min(n,r.findMin(t[i]));return n},e.exports.findMaxMulti=function(t){for(var n=r.findMax(t[0]),i=1;i<t.length;i++)n=Math.max(n,r.findMax(t[i]));return n},e.exports.inside=function(t,n,i){return t<=i&&i<=n}})(Bb);var TX=Bb.exports;(function(e){var r=50,t=2,n=Math.log(2),i=e.exports,a=TX;function o(s){return 1-Math.abs(s)}e.exports.getUnifiedMinMax=function(s,u){return i.getUnifiedMinMaxMulti([s],u)},e.exports.getUnifiedMinMaxMulti=function(s,u){u=u||{};var c=!1,f=!1,h=a.isNumber(u.width)?u.width:t,v=a.isNumber(u.size)?u.size:r,d=a.isNumber(u.min)?u.min:(c=!0,a.findMinMulti(s)),p=a.isNumber(u.max)?u.max:(f=!0,a.findMaxMulti(s)),y=p-d,g=y/(v-1);return c&&(d=d-2*h*g),f&&(p=p+2*h*g),{min:d,max:p}},e.exports.create=function(s,u){if(u=u||{},!s||s.length===0)return[];var c=a.isNumber(u.size)?u.size:r,f=a.isNumber(u.width)?u.width:t,h=i.getUnifiedMinMax(s,{size:c,width:f,min:u.min,max:u.max}),v=h.min,d=h.max,p=d-v,y=p/(c-1);if(p===0)return[{x:v,y:1}];for(var g=[],m=0;m<c;m++)g.push({x:v+m*y,y:0});var x=function(P){return Math.floor((P-v)/y)},w=l(o,f),C=w[f],M=w[f-1]-w[f-2],A=0;s.forEach(function(P){var O=x(P);if(!(O+f<0||O-f>=g.length)){var V=Math.max(O-f,0),W=O,q=Math.min(O+f,g.length-1),L=V-(O-f),H=O+f-q,N=w[-f-1+L]||0,_=w[-f-1+H]||0,$=C/(C-N-_);L>0&&(A+=$*(L-1)*M);var X=Math.max(0,O-f+1);a.inside(0,g.length-1,X)&&(g[X].y+=$*1*M),a.inside(0,g.length-1,W+1)&&(g[W+1].y-=$*2*M),a.inside(0,g.length-1,q+1)&&(g[q+1].y+=$*1*M)}});var b=A,T=0,k=0;return g.forEach(function(P){T+=P.y,b+=T,P.y=b,k+=b}),k>0&&g.forEach(function(P){P.y/=k}),g};function l(s,u){for(var c={},f=0,h=-u;h<=u;h++)f+=s(h/u),c[h]=f;return c}e.exports.getExpectedValueFromPdf=function(s){if(!(!s||s.length===0)){var u=0;return s.forEach(function(c){u+=c.x*c.y}),u}},e.exports.getXWithLeftTailArea=function(s,u){if(!(!s||s.length===0)){for(var c=0,f=0,h=0;h<s.length&&(f=h,c+=s[h].y,!(c>=u));h++);return s[f].x}},e.exports.getPerplexity=function(s){if(!(!s||s.length===0)){var u=0;return s.forEach(function(c){var f=Math.log(c.y);isFinite(f)&&(u+=c.y*f)}),u=-u/n,Math.pow(2,u)}}})(Db);var IX=Db.exports;const PX=Iv(IX);function Rb(e,r){var t=e.length*r;if(e.length===0)throw new Error("quantile requires at least one data point.");if(r<0||r>1)throw new Error("quantiles must be between 0 and 1");return r===1?e[e.length-1]:r===0?e[0]:t%1!==0?e[Math.ceil(t)-1]:e.length%2===0?(e[t-1]+e[t])/2:e[t]}function Hs(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}function nh(e,r,t,n){for(t=t||0,n=n||e.length-1;n>t;){if(n-t>600){var i=n-t+1,a=r-t+1,o=Math.log(i),l=.5*Math.exp(2*o/3),s=.5*Math.sqrt(o*l*(i-l)/i);a-i/2<0&&(s*=-1);var u=Math.max(t,Math.floor(r-a*l/i+s)),c=Math.min(n,Math.floor(r+(i-a)*l/i+s));nh(e,r,u,c)}var f=e[r],h=t,v=n;for(Hs(e,t,r),e[n]>f&&Hs(e,t,n);h<v;){for(Hs(e,h,v),h++,v--;e[h]<f;)h++;for(;e[v]>f;)v--}e[t]===f?Hs(e,t,v):(v++,Hs(e,v,n)),v<=r&&(t=v+1),r<=v&&(n=v-1)}}function Ws(e,r){var t=e.slice();if(Array.isArray(r)){LX(t,r);for(var n=[],i=0;i<r.length;i++)n[i]=Rb(t,r[i]);return n}else{var a=zb(t.length,r);return Nb(t,a,0,t.length-1),Rb(t,r)}}function Nb(e,r,t,n){r%1===0?nh(e,r,t,n):(r=Math.floor(r),nh(e,r,t,n),nh(e,r+1,r+1,n))}function LX(e,r){for(var t=[0],n=0;n<r.length;n++)t.push(zb(e.length,r[n]));t.push(e.length-1),t.sort(OX);for(var i=[0,t.length-1];i.length;){var a=Math.ceil(i.pop()),o=Math.floor(i.pop());if(!(a-o<=1)){var l=Math.floor((o+a)/2);Nb(e,t[l],Math.floor(t[o]),Math.ceil(t[a])),i.push(o,l,l,a)}}}function OX(e,r){return e-r}function zb(e,r){var t=e*r;return r===1?e-1:r===0?0:t%1!==0?Math.ceil(t)-1:e%2===0?t-.5:t}var Yb=function(e){return{low:Er(e),high:cr(e),q1:Ws(e,.25),q3:Ws(e,.75),median:Ws(e,[.5]),minMax:[Er(e),cr(e)],quantile:[Ws(e,.25),Ws(e,.75)]}},Vb=function(e,r){var t=PX.create(e,r);return{violinSize:t.map(function(n){return n.y}),violinY:t.map(function(n){return n.x})}},_b=function(e){var r=e.xField,t=e.yField,n=e.seriesField,i=e.data,a=e.kde,o={min:a.min,max:a.max,size:a.sampleSize,width:a.width};if(!n){var l=hr(i,r);return Object.keys(l).map(function(c){var f=l[c],h=f.map(function(v){return v[t]});return S(S({x:c},Vb(h,o)),Yb(h))})}var s=[],u=hr(i,n);return Object.keys(u).forEach(function(c){var f=hr(u[c],r);return Object.keys(f).forEach(function(h){var v,d=f[h],p=d.map(function(y){return y[t]});s.push(S(S((v={x:h},v[n]=c,v),Vb(p,o)),Yb(p)))})}),s},ih=["low","high","q1","q3","median"],ah=[{type:"dodge",marginRatio:1/32}];function DX(e){var r=e.chart,t=e.options;return r.data(_b(t)),e}function BX(e){var r=e.chart,t=e.options,n=t.seriesField,i=t.color,a=t.shape,o=a===void 0?"violin":a,l=t.violinStyle,s=t.tooltip,u=t.state,c=r.createView({id:ay});return u4({chart:c,options:{xField:Or,yField:za,seriesField:n||Or,sizeField:AX,tooltip:S({fields:ih},s),violin:{style:l,color:i,shape:o},state:u}}),c.geometries[0].adjust(ah),e}function RX(e){var r=e.chart,t=e.options,n=t.seriesField,i=t.color,a=t.tooltip,o=t.box;if(o===!1)return e;var l=r.createView({id:FX});Fe({chart:l,options:{xField:Or,yField:Pb,seriesField:n||Or,tooltip:S({fields:ih},a),state:typeof o=="object"?o.state:{},interval:{color:i,size:1,style:{lineWidth:0}}}}),l.geometries[0].adjust(ah);var s=r.createView({id:bX});Fe({chart:s,options:{xField:Or,yField:Lb,seriesField:n||Or,tooltip:S({fields:ih},a),state:typeof o=="object"?o.state:{},interval:{color:i,size:8,style:{fillOpacity:1}}}}),s.geometries[0].adjust(ah);var u=r.createView({id:EX});return gr({chart:u,options:{xField:Or,yField:Ob,seriesField:n||Or,tooltip:S({fields:ih},a),state:typeof o=="object"?o.state:{},point:{color:i,size:1,style:{fill:"white",lineWidth:0}}}}),u.geometries[0].adjust(ah),s.axis(!1),l.axis(!1),u.axis(!1),u.legend(!1),l.legend(!1),s.legend(!1),e}function NX(e){var r,t=e.chart,n=e.options,i=n.meta,a=n.xAxis,o=n.yAxis,l={},s=D(l,i,(r={},r[Or]=S(S({sync:!0},bt(a,er)),{type:"cat"}),r[za]=S({sync:!0},bt(o,er)),r[Pb]=S({sync:za},bt(o,er)),r[Lb]=S({sync:za},bt(o,er)),r[Ob]=S({sync:za},bt(o,er)),r));return t.scale(s),e}function zX(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=vt(r,ay);return n===!1?a.axis(Or,!1):a.axis(Or,n),i===!1?a.axis(za,!1):a.axis(za,i),r.axis(!1),e}function YX(e){var r=e.chart,t=e.options,n=t.legend,i=t.seriesField,a=t.shape;if(n===!1)r.legend(!1);else{var o=i||Or,l=Wu(n,["selected"]);(!a||!a.startsWith("hollow"))&&(E(l,["marker","style","lineWidth"])||ie(l,["marker","style","lineWidth"],0)),r.legend(o,l),E(n,"selected")&&F(r.views,function(s){return s.legend(o,n)})}return e}function VX(e){var r=e.chart,t=vt(r,ay);return _t()(S(S({},e),{chart:t})),e}function _X(e){var r=e.chart,t=e.options,n=t.animation;return F(r.views,function(i){Ts(i,n)}),e}function $X(e){return lt(wt,DX,BX,RX,NX,le,zX,YX,Yt,VX,_X)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="violin",t}return r.getDefaultOptions=function(){return kX},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(_b(this.options))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return $X},r})(ft);var Dr="$$yField$$",oh="$$diffField$$",oy="$$absoluteField$$",ly="$$isTotal$$",GX={label:{},leaderLine:{style:{lineWidth:1,stroke:"#8c8c8c",lineDash:[4,2]}},total:{style:{fill:"rgba(0, 0, 0, 0.25)"}},interactions:[{type:"element-active"}],risingFill:"#f4664a",fallingFill:"#30bf78",waterfallStyle:{fill:"rgba(0, 0, 0, 0.25)"},yAxis:{grid:{line:{style:{lineDash:[4,2]}}}}};function HX(e){for(var r=[],t=0;t<e.length;t++){var n=e[t];if(n){var i=t===0?"M":"L";r.push([i,n.x,n.y])}}var a=e[0];return r.push(["L",a.x,a.y]),r.push(["z"]),r}function WX(e){return D({},e.defaultStyle,e.style,{fill:e.color})}Mt("interval","waterfall",{draw:function(e,r){var t=e.customInfo,n=e.points,i=e.nextPoints,a=r.addGroup(),o=this.parsePath(HX(n)),l=WX(e);a.addShape("path",{attrs:S(S({},l),{path:o})});var s=E(t,"leaderLine");if(s&&i){var u=[["M",n[2].x,n[2].y],["L",i[0].x,i[0].y]];n[2].y===i[1].y&&(u[1]=["L",i[1].x,i[1].y]),u=this.parsePath(u),a.addShape("path",{attrs:S({path:u},s.style||{})})}return a}});function XX(e,r,t,n,i){var a,o=[];if(Pe(e,function(s,u){var c;Nn(Zr.WARN,st(u[t]),"".concat(u[t]," is not a valid number"));var f=sa(u[t])?null:u[t];return o.push(S(S({},u),(c={},c[n]=[s,s+f],c))),s+f},0),o.length&&i){var l=E(o,[[e.length-1],n,[1]]);o.push((a={},a[r]=i.label,a[t]=l,a[n]=[0,l],a))}return o}function $b(e,r,t,n){var i=XX(e,r,t,Dr,n);return i.map(function(a,o){var l;return At(a)?S(S({},a),(l={},l[oy]=a[Dr][1],l[oh]=a[Dr][1]-a[Dr][0],l[ly]=o===e.length,l)):a})}function jX(e){var r=e.options,t=r.locale,n=r.total,i=Pf(t).get(["waterfall","total"]);return n&&typeof n.label!="string"&&i&&(e.options.total.label=i),e}function UX(e){var r=e.chart,t=e.options,n=t.data,i=t.xField,a=t.yField,o=t.total,l=t.leaderLine,s=t.columnWidthRatio,u=t.waterfallStyle,c=t.risingFill,f=t.fallingFill,h=t.color,v=t.shape,d=t.customInfo;r.data($b(n,i,a,o));var p=h||function(x){return E(x,[ly])?E(o,["style","fill"],""):E(x,[Dr,1])-E(x,[Dr,0])>0?c:f},y=D({},e,{options:{xField:i,yField:Dr,seriesField:i,rawFields:[a,oh,ly,Dr],widthRatio:s,interval:{style:u,shape:v||"waterfall",color:p}}}),g=Fe(y).ext,m=g.geometry;return m.customInfo(S(S({},d),{leaderLine:l})),e}function qX(e){var r,t,n=e.options,i=n.xAxis,a=n.yAxis,o=n.xField,l=n.yField,s=n.meta,u=D({},{alias:l},E(s,l));return lt(Ut((r={},r[o]=i,r[l]=a,r[Dr]=a,r),D({},s,(t={},t[Dr]=u,t[oh]=u,t[oy]=u,t))))(e)}function ZX(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?(r.axis(o,!1),r.axis(Dr,!1)):(r.axis(o,i),r.axis(Dr,i)),e}function QX(e){var r=e.chart,t=e.options,n=t.legend,i=t.total,a=t.risingFill,o=t.fallingFill,l=t.locale,s=Pf(l);if(n===!1)r.legend(!1);else{var u=[{name:s.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:a}}},{name:s.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:o}}}];i&&u.push({name:i.label||"",value:"total",marker:{symbol:"square",style:D({},{r:5},E(i,"style"))}}),r.legend(D({},{custom:!0,position:"top",items:u},n)),r.removeInteraction("legend-filter")}return e}function KX(e){var r=e.chart,t=e.options,n=t.label,i=t.labelMode,a=t.xField,o=Ae(r,"interval");if(!n)o.label(!1);else{var l=n.callback,s=kt(n,["callback"]);o.label({fields:i==="absolute"?[oy,a]:[oh,a],callback:l,cfg:fe(s)})}return e}function JX(e){var r=e.chart,t=e.options,n=t.tooltip,i=t.xField,a=t.yField;if(n!==!1){r.tooltip(S({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},n));var o=r.geometries[0];n!=null&&n.formatter?o.tooltip("".concat(i,"*").concat(a),n.formatter):o.tooltip(a)}else r.tooltip(!1);return e}function t9(e){return lt(jX,wt,UX,qX,ZX,QX,JX,KX,Ii,Yt,It,_t())(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="waterfall",t}return r.getDefaultOptions=function(){return GX},r.prototype.changeData=function(t){var n=this.options,i=n.xField,a=n.yField,o=n.total;this.updateOption({data:t}),this.chart.changeData($b(t,i,a,o))},r.prototype.getSchemaAdaptor=function(){return t9},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r})(ft);var sy="color",e9=D({},ft.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",sy],formatter:function(e){return{name:e.text,value:e.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}}),r9={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function n9(e,r){return r=Tt({},r9,r),i9(e,r)}function i9(e,r){var t=y9();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(s){Y(r[s])||t[s](r[s])}),t.words(e),r.imageMask&&t.createMask(r.imageMask);var n=t.start(),i=n._tags;i.forEach(function(s){s.x+=r.size[0]/2,s.y+=r.size[1]/2});var a=r.size,o=a[0],l=a[1];return i.push({text:"",value:0,x:0,y:0,opacity:0}),i.push({text:"",value:0,x:o,y:l,opacity:0}),i}var uy=Math.PI/180,Xs=64,lh=2048;function a9(e){return e.text}function o9(){return"serif"}function Gb(){return"normal"}function l9(e){return e.value}function s9(){return~~(Math.random()*2)*90}function u9(){return 1}function c9(e,r,t,n){if(!r.sprite){var i=e.context,a=e.ratio;i.clearRect(0,0,(Xs<<5)/a,lh/a);var o=0,l=0,s=0,u=t.length;for(--n;++n<u;){r=t[n],i.save(),i.font=r.style+" "+r.weight+" "+~~((r.size+1)/a)+"px "+r.font;var c=i.measureText(r.text+"m").width*a,f=r.size<<1;if(r.rotate){var h=Math.sin(r.rotate*uy),v=Math.cos(r.rotate*uy),d=c*v,p=c*h,y=f*v,g=f*h;c=Math.max(Math.abs(d+g),Math.abs(d-g))+31>>5<<5,f=~~Math.max(Math.abs(p+y),Math.abs(p-y))}else c=c+31>>5<<5;if(f>s&&(s=f),o+c>=Xs<<5&&(o=0,l+=s,s=0),l+f>=lh)break;i.translate((o+(c>>1))/a,(l+(f>>1))/a),r.rotate&&i.rotate(r.rotate*uy),i.fillText(r.text,0,0),r.padding&&(i.lineWidth=2*r.padding,i.strokeText(r.text,0,0)),i.restore(),r.width=c,r.height=f,r.xoff=o,r.yoff=l,r.x1=c>>1,r.y1=f>>1,r.x0=-r.x1,r.y0=-r.y1,r.hasText=!0,o+=c}for(var m=i.getImageData(0,0,(Xs<<5)/a,lh/a).data,x=[];--n>=0;)if(r=t[n],!!r.hasText){for(var c=r.width,w=c>>5,f=r.y1-r.y0,C=0;C<f*w;C++)x[C]=0;if(o=r.xoff,o==null)return;l=r.yoff;for(var M=0,A=-1,b=0;b<f;b++){for(var C=0;C<c;C++){var T=w*b+(C>>5),k=m[(l+b)*(Xs<<5)+(o+C)<<2]?1<<31-C%32:0;x[T]|=k,M|=k}M?A=b:(r.y0++,f--,b--,l++)}r.y1=r.y0+A,r.sprite=x.slice(0,(r.y1-r.y0)*w)}}}function f9(e,r,t){t>>=5;for(var n=e.sprite,i=e.width>>5,a=e.x-(i<<4),o=a&127,l=32-o,s=e.y1-e.y0,u=(e.y+e.y0)*t+(a>>5),c,f=0;f<s;f++){c=0;for(var h=0;h<=i;h++)if((c<<l|(h<i?(c=n[f*i+h])>>>o:0))&r[u+h])return!0;u+=t}return!1}function h9(e,r){var t=e[0],n=e[1];r.x+r.x0<t.x&&(t.x=r.x+r.x0),r.y+r.y0<t.y&&(t.y=r.y+r.y0),r.x+r.x1>n.x&&(n.x=r.x+r.x1),r.y+r.y1>n.y&&(n.y=r.y+r.y1)}function v9(e,r){return e.x+e.x1>r[0].x&&e.x+e.x0<r[1].x&&e.y+e.y1>r[0].y&&e.y+e.y0<r[1].y}function Hb(e){var r=e[0]/e[1];return function(t){return[r*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function d9(e){var r=4,t=r*e[0]/e[1],n=0,i=0;return function(a){var o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:n+=t;break;case 1:i+=r;break;case 2:n-=t;break;default:i-=r;break}return[n,i]}}function Wb(e){for(var r=[],t=-1;++t<e;)r[t]=0;return r}function p9(){return document.createElement("canvas")}function Sn(e){return Q(e)?e:function(){return e}}var g9={archimedean:Hb,rectangular:d9};function y9(){var e=[256,256],r=o9,t=l9,n=Gb,i=s9,a=u9,o=Hb,l=Math.random,s=[],u=1/0,c=a9,f=Gb,h=p9,v={};v.start=function(){var y=e[0],g=e[1],m=d(h()),x=v.board?v.board:Wb((e[0]>>5)*e[1]),w=s.length,C=[],M=s.map(function(k,P,O){return k.text=c.call(this,k,P,O),k.font=r.call(this,k,P,O),k.style=f.call(this,k,P,O),k.weight=n.call(this,k,P,O),k.rotate=i.call(this,k,P,O),k.size=~~t.call(this,k,P,O),k.padding=a.call(this,k,P,O),k}).sort(function(k,P){return P.size-k.size}),A=-1,b=v.board?[{x:0,y:0},{x:y,y:g}]:null;T();function T(){for(var k=Date.now();Date.now()-k<u&&++A<w;){var P=M[A];P.x=y*(l()+.5)>>1,P.y=g*(l()+.5)>>1,c9(m,P,M,A),P.hasText&&p(x,P,b)&&(C.push(P),b?v.hasImage||h9(b,P):b=[{x:P.x+P.x0,y:P.y+P.y0},{x:P.x+P.x1,y:P.y+P.y1}],P.x-=e[0]>>1,P.y-=e[1]>>1)}v._tags=C,v._bounds=b}return v};function d(y){y.width=y.height=1;var g=Math.sqrt(y.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,1,1).data.length>>2);y.width=(Xs<<5)/g,y.height=lh/g;var m=y.getContext("2d",{willReadFrequently:!0});return m.fillStyle=m.strokeStyle="red",m.textAlign="center",{context:m,ratio:g}}function p(y,g,m){for(var x=g.x,w=g.y,C=Math.sqrt(e[0]*e[0]+e[1]*e[1]),M=o(e),A=l()<.5?1:-1,b,T=-A,k,P;(b=M(T+=A))&&(k=~~b[0],P=~~b[1],!(Math.min(Math.abs(k),Math.abs(P))>=C));)if(g.x=x+k,g.y=w+P,!(g.x+g.x0<0||g.y+g.y0<0||g.x+g.x1>e[0]||g.y+g.y1>e[1])&&(!m||!f9(g,y,e[0]))&&(!m||v9(g,m))){for(var O=g.sprite,V=g.width>>5,W=e[0]>>5,q=g.x-(V<<4),L=q&127,H=32-L,N=g.y1-g.y0,_=void 0,$=(g.y+g.y0)*W+(q>>5),X=0;X<N;X++){_=0;for(var K=0;K<=V;K++)y[$+K]|=_<<H|(K<V?(_=O[X*V+K])>>>L:0);$+=W}return delete g.sprite,!0}return!1}return v.createMask=function(y){var g=document.createElement("canvas"),m=e[0],x=e[1];if(!(!m||!x)){var w=m>>5,C=Wb((m>>5)*x);g.width=m,g.height=x;var M=g.getContext("2d");M.drawImage(y,0,0,y.width,y.height,0,0,m,x);for(var A=M.getImageData(0,0,m,x).data,b=0;b<x;b++)for(var T=0;T<m;T++){var k=w*b+(T>>5),P=b*m+T<<2,O=A[P]>=250&&A[P+1]>=250&&A[P+2]>=250,V=O?1<<31-T%32:0;C[k]|=V}v.board=C,v.hasImage=!0}},v.timeInterval=function(y){u=y==null?1/0:y},v.words=function(y){s=y},v.size=function(y){e=[+y[0],+y[1]]},v.font=function(y){r=Sn(y)},v.fontWeight=function(y){n=Sn(y)},v.rotate=function(y){i=Sn(y)},v.spiral=function(y){o=g9[y]||y},v.fontSize=function(y){t=Sn(y)},v.padding=function(y){a=Sn(y)},v.random=function(y){l=Sn(y)},v}function Xb(e){var r=e.options,t=e.chart,n=t,i=n.width,a=n.height,o=n.padding,l=n.appendPadding,s=n.ele,u=r.data,c=r.imageMask,f=r.wordField,h=r.weightField,v=r.colorField,d=r.wordStyle,p=r.timeInterval,y=r.random,g=r.spiral,m=r.autoFit,x=m===void 0?!0:m,w=r.placementStrategy;if(!u||!u.length)return[];var C=d.fontFamily,M=d.fontWeight,A=d.padding,b=d.fontSize,T=C9(u,h),k=[F9(T),b9(T)],P=u.map(function(W){return{text:W[f],value:W[h],color:W[v],datum:W}}),O={imageMask:c,font:C,fontSize:S9(b,k),fontWeight:M,size:m9({width:i,height:a,padding:o,appendPadding:l,autoFit:x,container:s}),padding:A,timeInterval:p,random:y,spiral:g,rotate:M9(r)};if(Q(w)){var V=P.map(function(W,q,L){return S(S(S({},W),{hasText:!!W.text,font:Sn(O.font)(W,q,L),weight:Sn(O.fontWeight)(W,q,L),rotate:Sn(O.rotate)(W,q,L),size:Sn(O.fontSize)(W,q,L),style:"normal"}),w.call(t,W,q,L))});return V.push({text:"",value:0,x:0,y:0,opacity:0}),V.push({text:"",value:0,x:O.size[0],y:O.size[1],opacity:0}),V}return n9(P,O)}function m9(e){var r=e.width,t=e.height,n=e.container,i=e.autoFit,a=e.padding,o=e.appendPadding;if(i){var l=sg(n);r=l.width,t=l.height}r=r||400,t=t||400;var s=x9({padding:a,appendPadding:o}),u=s[0],c=s[1],f=s[2],h=s[3],v=[r-(h+c),t-(u+f)];return v}function x9(e){var r=Ti(e.padding),t=Ti(e.appendPadding),n=r[0]+t[0],i=r[1]+t[1],a=r[2]+t[2],o=r[3]+t[3];return[n,i,a,o]}function w9(e){return new Promise(function(r,t){if(e instanceof HTMLImageElement){r(e);return}if(at(e)){var n=new Image;n.crossOrigin="anonymous",n.src=e,n.onload=function(){r(n)},n.onerror=function(){Nn(Zr.ERROR,!1,"image %s load failed !!!",e),t()};return}Nn(Zr.WARN,e===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}function S9(e,r){if(Q(e))return e;if(G(e)){var t=e[0],n=e[1];if(!r)return function(){return(n+t)/2};var i=r[0],a=r[1];return a===i?function(){return(n+t)/2}:function(l){var s=l.value;return(n-t)/(a-i)*(s-i)+t}}return function(){return e}}function C9(e,r){return e.map(function(t){return t[r]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}function M9(e){var r=A9(e),t=r.rotation,n=r.rotationSteps;if(!G(t))return t;var i=t[0],a=t[1],o=n===1?0:(a-i)/(n-1);return function(){return a===i?a:Math.floor(Math.random()*n)*o}}function A9(e){var r=e.wordStyle.rotationSteps;return r<1&&(Nn(Zr.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),r=1),{rotation:e.wordStyle.rotation,rotationSteps:r}}function F9(e){return Math.min.apply(Math,e)}function b9(e){return Math.max.apply(Math,e)}function E9(e){var r=e.chart,t=e.options,n=t.colorField,i=t.color,a=Xb(e);r.data(a);var o=D({},e,{options:{xField:"x",yField:"y",seriesField:n&&sy,rawFields:Q(i)&&rt(rt([],E(t,"rawFields",[]),!0),["datum"],!1),point:{color:i,shape:"word-cloud"}}}),l=gr(o).ext;return l.geometry.label(!1),r.coordinate().reflect("y"),r.axis(!1),e}function k9(e){return lt(Ut({x:{nice:!1},y:{nice:!1}}))(e)}function T9(e){var r=e.chart,t=e.options,n=t.legend,i=t.colorField;return n===!1?r.legend(!1):i&&r.legend(sy,n),e}function I9(e){lt(E9,k9,le,T9,Yt,It,wt,Ii)(e)}Mt("point","word-cloud",{draw:function(e,r){var t=e.x,n=e.y,i=r.addShape("text",{attrs:S(S({},P9(e)),{x:t,y:n})}),a=e.data.rotate;return typeof a=="number"&&Je.rotate(i,a*Math.PI/180),i}});function P9(e){return{fontSize:e.data.size,text:e.data.text,textAlign:"center",fontFamily:e.data.font,fontWeight:e.data.weight,fill:e.color||e.defaultStyle.stroke,textBaseline:"alphabetic"}}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="word-cloud",t}return r.getDefaultOptions=function(){return e9},r.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(Xb({chart:this.chart,options:this.options}))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){var t=this;return new Promise(function(n){var i=t.options.imageMask;if(!i){e.prototype.render.call(t),n();return}var a=function(o){t.options=S(S({},t.options),{imageMask:o||null}),e.prototype.render.call(t),n()};w9(i).then(a).catch(a)})},r.prototype.getSchemaAdaptor=function(){return I9},r.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){e.prototype.triggerResize.call(t)}))},r})(ft),function(e){I(r,e);function r(t,n,i,a){var o=e.call(this,t,D({},a,n))||this;return o.type="g2-plot",o.defaultOptions=a,o.adaptor=i,o}return r.prototype.getDefaultOptions=function(){return this.defaultOptions},r.prototype.getSchemaAdaptor=function(){return this.adaptor},r}(ft),eA("en-US",o4),eA("zh-CN",l4);var jb={exports:{}},xr={},Ub={exports:{}},qb={};/**
|
|
107
|
+
A`,l,l,0,s?1:0,1,o.p1.x,o.p1.y)}return i.join(" ")}}function rX(e,r){r=r||{},r.maxIterations=r.maxIterations||500;var t=r.initialLayout||oX,n=r.lossFunction||iy;e=nX(e);var i=t(e,r),a=[],o=[],l;for(l in i)i.hasOwnProperty(l)&&(a.push(i[l].x),a.push(i[l].y),o.push(l));for(var s=Mb(function(f){for(var h={},v=0;v<o.length;++v){var d=o[v];h[d]={x:f[2*v],y:f[2*v+1],radius:i[d].radius}}return n(h,e)},a,r),u=s.x,c=0;c<o.length;++c)l=o[c],i[l].x=u[2*c],i[l].y=u[2*c+1];return i}var Tb=1e-10;function ny(e,r,t){return Math.min(e,r)*Math.min(e,r)*Math.PI<=t+Tb?Math.abs(e-r):j8(function(n){return Fb(e,r,n)-t},0,e+r)}function nX(e){e=e.slice();var r=[],t={},n,i,a,o;for(n=0;n<e.length;++n){var l=e[n];l.sets.length==1?r.push(l.sets[0]):l.sets.length==2&&(a=l.sets[0],o=l.sets[1],t[[a,o]]=!0,t[[o,a]]=!0)}for(r.sort(function(s,u){return s>u?1:-1}),n=0;n<r.length;++n)for(a=r[n],i=n+1;i<r.length;++i)o=r[i],[a,o]in t||e.push({sets:[a,o],size:0});return e}function iX(e,r,t){var n=Cb(r.length,r.length),i=Cb(r.length,r.length);return e.filter(function(a){return a.sets.length==2}).map(function(a){var o=t[a.sets[0]],l=t[a.sets[1]],s=Math.sqrt(r[o].size/Math.PI),u=Math.sqrt(r[l].size/Math.PI),c=ny(s,u,a.size);n[o][l]=n[l][o]=c;var f=0;a.size+1e-10>=Math.min(r[o].size,r[l].size)?f=1:a.size<=1e-10&&(f=-1),i[o][l]=i[l][o]=f}),{distances:n,constraints:i}}function aX(e,r,t,n){var i=0,a;for(a=0;a<r.length;++a)r[a]=0;for(a=0;a<t.length;++a)for(var o=e[2*a],l=e[2*a+1],s=a+1;s<t.length;++s){var u=e[2*s],c=e[2*s+1],f=t[a][s],h=n[a][s],v=(u-o)*(u-o)+(c-l)*(c-l),d=Math.sqrt(v),p=v-f*f;h>0&&d<=f||h<0&&d>=f||(i+=2*p*p,r[2*a]+=4*p*(o-u),r[2*a+1]+=4*p*(l-c),r[2*s]+=4*p*(u-o),r[2*s+1]+=4*p*(c-l))}return i}function oX(e,r){var t=sX(e,r),n=r.lossFunction||iy;if(e.length>=8){var i=lX(e,r),a=n(i,e),o=n(t,e);a+1e-8<o&&(t=i)}return t}function lX(e,r){r=r||{};var t=r.restarts||10,n=[],i={},a;for(a=0;a<e.length;++a){var o=e[a];o.sets.length==1&&(i[o.sets[0]]=n.length,n.push(o))}var l=iX(e,n,i),s=l.distances,u=l.constraints,c=Kg(s.map(Kg))/s.length;s=s.map(function(m){return m.map(function(x){return x/c})});var f=function(m,x){return aX(m,x,s,u)},h,v;for(a=0;a<t;++a){var d=Qg(s.length*2).map(Math.random);v=q8(f,d,r),(!h||v.fx<h.fx)&&(h=v)}var p=h.x,y={};for(a=0;a<n.length;++a){var g=n[a];y[g.sets[0]]={x:p[2*a]*c,y:p[2*a+1]*c,radius:Math.sqrt(g.size/Math.PI)}}if(r.history)for(a=0;a<r.history.length;++a)Jg(r.history[a].x,c);return y}function sX(e,r){for(var t=r&&r.lossFunction?r.lossFunction:iy,n={},i={},a,o=0;o<e.length;++o){var l=e[o];l.sets.length==1&&(a=l.sets[0],n[a]={x:1e10,y:1e10,rowid:Object.keys(n).length,size:l.size,radius:Math.sqrt(l.size/Math.PI)},i[a]=[])}e=e.filter(function(L){return L.sets.length==2});for(var o=0;o<e.length;++o){var s=e[o],u=s.hasOwnProperty("weight")?s.weight:1,c=s.sets[0],f=s.sets[1];s.size+Tb>=Math.min(n[c].size,n[f].size)&&(u=0),i[c].push({set:f,size:s.size,weight:u}),i[f].push({set:c,size:s.size,weight:u})}var h=[];for(a in i)if(i.hasOwnProperty(a)){for(var v=0,o=0;o<i[a].length;++o)v+=i[a][o].size*i[a][o].weight;h.push({set:a,size:v})}function d(L,H){return H.size-L.size}h.sort(d);var p={};function y(L){return L.set in p}function g(L,H){n[H].x=L.x,n[H].y=L.y,p[H]=!0}g({x:0,y:0},h[0].set);for(var o=1;o<h.length;++o){var m=h[o].set,x=i[m].filter(y);if(a=n[m],x.sort(d),x.length===0)throw"ERROR: missing pairwise overlap information";for(var w=[],C=0;C<x.length;++C){var M=n[x[C].set],A=ny(a.radius,M.radius,x[C].size);w.push({x:M.x+A,y:M.y}),w.push({x:M.x-A,y:M.y}),w.push({y:M.y+A,x:M.x}),w.push({y:M.y-A,x:M.x});for(var b=C+1;b<x.length;++b)for(var T=n[x[b].set],k=ny(a.radius,T.radius,x[b].size),P=bb({x:M.x,y:M.y,radius:A},{x:T.x,y:T.y,radius:k}),O=0;O<P.length;++O)w.push(P[O])}for(var V=1e50,W=w[0],C=0;C<w.length;++C){n[m].x=w[C].x,n[m].y=w[C].y;var q=t(n,e);q<V&&(V=q,W=w[C])}g(W,m)}return n}function iy(e,r){var t=0;function n(c){return c.map(function(f){return e[f]})}for(var i=0;i<r.length;++i){var a=r[i],o=void 0;if(a.sets.length!=1){if(a.sets.length==2){var l=e[a.sets[0]],s=e[a.sets[1]];o=Fb(l.radius,s.radius,Qr(l,s))}else o=ty(n(a.sets));var u=a.hasOwnProperty("weight")?a.weight:1;t+=u*(o-a.size)*(o-a.size)}}return t}function uX(e){var r=function(t){var n=Math.max.apply(null,e.map(function(a){return a[t]+a.radius})),i=Math.min.apply(null,e.map(function(a){return a[t]-a.radius}));return{max:n,min:i}};return{xRange:r("x"),yRange:r("y")}}function cX(e,r,t,n){var i=[],a=[];for(var o in e)e.hasOwnProperty(o)&&(a.push(o),i.push(e[o]));r-=2*n,t-=2*n;var l=uX(i),s=l.xRange,u=l.yRange;if(s.max==s.min||u.max==u.min)return console.log("not scaling solution: zero size detected"),e;for(var c=r/(s.max-s.min),f=t/(u.max-u.min),h=Math.min(f,c),v=(r-(s.max-s.min)*h)/2,d=(t-(u.max-u.min)*h)/2,p={},y=0;y<i.length;++y){var g=i[y];p[a[y]]={radius:h*g.radius,x:n+v+(g.x-s.min)*h,y:n+d+(g.y-u.min)*h}}return p}var fX=ho(function(e,r,t,n){var i=new Map,a=e.length;return r.forEach(function(o,l){if(o[n].length===1)i.set(o[$n],e[(l+a)%a]);else{var s=o[n].map(function(u){return i.get(u)});i.set(o[$n],s.slice(1).reduce(function(u,c){return X8(u,c,t)},s[0]))}}),i},function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return JSON.stringify(e)});function hX(e,r,t,n){n===void 0&&(n=0);var i=e.data,a=e.setsField,o=e.sizeField;if(i.length===0)return Nn(Zr.WARN,!1,"warn: %s","数据不能为空"),[];var l=i.map(function(f){var h;return S(S({},f),(h={sets:f[a]||[],size:f[o]},h[Zg]="",h[$n]="",h))});l.sort(function(f,h){return f.sets.length-h.sets.length});var s=rX(l),u=cX(s,r,t,n),c=J8(u,l);return l.forEach(function(f){var h=f.sets,v=h.join(",");f[$n]=v;var d=h.map(function(g){return u[g]}),p=eX(d);/[zZ]$/.test(p)||(p+=" Z"),f[Zg]=p;var y=c[v]||{x:0,y:0};Tt(f,y)}),l}function vX(e,r){for(var t=0;t<r.length;t++)if(!e.includes(r[t]))return!1;return!0}var dX=40;function Ib(e,r,t){var n=e.chart,i=e.options,a=i.blendMode,o=i.setsField,l=n.getTheme(),s=l.colors10,u=l.colors20,c=t;G(c)||(c=r.filter(function(h){return h[o].length===1}).length<=10?s:u);var f=fX(c,r,a,o);return function(h){return f.get(h)||c[0]}}function pX(e,r){var t=e.options,n=t.color;if(typeof n!="function"){var i=typeof n=="string"?[n]:n,a=Ib(e,r,i);return function(o){return a(o[$n])}}return n}function gX(e){var r=e.chart,t=e.options,n=t.legend,i=t.appendPadding,a=t.padding,o=Ti(i);return n!==!1&&(o=Ef(i,E(n,"position"),dX)),r.appendPadding=cg([o,a]),e}function yX(e){var r=e.options,t=r.data;t||(Nn(Zr.WARN,!1,"warn: %s","数据不能为空"),t=[]);var n=t.filter(function(a){return a.sets.length===1}).map(function(a){return a.sets[0]}),i=t.filter(function(a){var o=a.sets;return vX(n,o)});return Gt(i,t)||Nn(Zr.WARN,!1,"warn: %s","交集中不能出现不存在的集合, 请输入合法数据"),Z({},e,{options:{data:i}})}function mX(e){var r=e.chart,t=e.options,n=t.pointStyle,i=t.setsField,a=t.sizeField,o=Ti(r.appendPadding),l=o[0],s=o[1],u=o[2],c=o[3],f={offsetX:c,offsetY:l},h=r.viewBBox,v=h.width,d=h.height,p=hX(t,Math.max(v-(s+c),0),Math.max(d-(l+u),0),0);r.data(p);var y=pg(B({},e,{options:{xField:"x",yField:"y",sizeField:a,seriesField:$n,rawFields:[i,a],schema:{shape:"venn",style:n}}})).ext,g=y.geometry;g.customInfo(f);var m=pX(e,p);return typeof m=="function"&&g.color($n,function(x){var w=p.find(function(M){return M[$n]===x}),C=Ib(e,p)(x);return m(w,C)}),e}function xX(e){var r=e.chart,t=e.options,n=t.label,i=Ti(r.appendPadding),a=i[0],o=i[3],l={offsetX:o,offsetY:a},s=Ae(r,"schema");if(!n)s.label(!1);else{var u=n.callback,c=kt(n,["callback"]);s.label({fields:["id"],callback:u,cfg:Z({},fe(c),{type:"venn",customLabelInfo:l})})}return e}function wX(e){var r=e.chart,t=e.options,n=t.legend,i=t.sizeField;return r.legend($n,n),r.legend(i,!1),e}function SX(e){var r=e.chart;return r.axis(!1),e}function CX(e){var r=e.options,t=e.chart,n=r.interactions;if(n){var i={"legend-active":"venn-legend-active","legend-highlight":"venn-legend-highlight"};Yt(B({},e,{options:{interactions:n.map(function(a){return S(S({},a),{type:i[a.type]||a.type})})}}))}return t.removeInteraction("legend-active"),t.removeInteraction("legend-highlight"),e}function MX(e){return lt(gX,wt,yX,mX,xX,Ut({}),wX,SX,le,CX,It)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="venn",t}return r.getDefaultOptions=function(){return k8},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return MX},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r})(ft);var Or="x",za="violinY",AX="violinSize",Pb="minMax",Lb="quantile",Ob="median",ay="violin_view",FX="min_max_view",bX="quantile_view",EX="median_view",kX=B({},ft.getDefaultOptions(),{syncViewPadding:!0,kde:{type:"triangular",sampleSize:32,width:3},violinStyle:{lineWidth:1,fillOpacity:.3,strokeOpacity:.75},xAxis:{grid:{line:null},tickLine:{alignTick:!1}},yAxis:{grid:{line:{style:{lineWidth:.5,lineDash:[4,4]}}}},legend:{position:"top-left"},tooltip:{showMarkers:!1}}),Db={exports:{}},Bb={exports:{}};(function(e){var r=e.exports;e.exports.isNumber=function(t){return typeof t=="number"},e.exports.findMin=function(t){if(t.length===0)return 1/0;for(var n=t[0],i=1;i<t.length;i++)n=Math.min(n,t[i]);return n},e.exports.findMax=function(t){if(t.length===0)return-1/0;for(var n=t[0],i=1;i<t.length;i++)n=Math.max(n,t[i]);return n},e.exports.findMinMulti=function(t){for(var n=r.findMin(t[0]),i=1;i<t.length;i++)n=Math.min(n,r.findMin(t[i]));return n},e.exports.findMaxMulti=function(t){for(var n=r.findMax(t[0]),i=1;i<t.length;i++)n=Math.max(n,r.findMax(t[i]));return n},e.exports.inside=function(t,n,i){return t<=i&&i<=n}})(Bb);var TX=Bb.exports;(function(e){var r=50,t=2,n=Math.log(2),i=e.exports,a=TX;function o(s){return 1-Math.abs(s)}e.exports.getUnifiedMinMax=function(s,u){return i.getUnifiedMinMaxMulti([s],u)},e.exports.getUnifiedMinMaxMulti=function(s,u){u=u||{};var c=!1,f=!1,h=a.isNumber(u.width)?u.width:t,v=a.isNumber(u.size)?u.size:r,d=a.isNumber(u.min)?u.min:(c=!0,a.findMinMulti(s)),p=a.isNumber(u.max)?u.max:(f=!0,a.findMaxMulti(s)),y=p-d,g=y/(v-1);return c&&(d=d-2*h*g),f&&(p=p+2*h*g),{min:d,max:p}},e.exports.create=function(s,u){if(u=u||{},!s||s.length===0)return[];var c=a.isNumber(u.size)?u.size:r,f=a.isNumber(u.width)?u.width:t,h=i.getUnifiedMinMax(s,{size:c,width:f,min:u.min,max:u.max}),v=h.min,d=h.max,p=d-v,y=p/(c-1);if(p===0)return[{x:v,y:1}];for(var g=[],m=0;m<c;m++)g.push({x:v+m*y,y:0});var x=function(P){return Math.floor((P-v)/y)},w=l(o,f),C=w[f],M=w[f-1]-w[f-2],A=0;s.forEach(function(P){var O=x(P);if(!(O+f<0||O-f>=g.length)){var V=Math.max(O-f,0),W=O,q=Math.min(O+f,g.length-1),L=V-(O-f),H=O+f-q,N=w[-f-1+L]||0,_=w[-f-1+H]||0,$=C/(C-N-_);L>0&&(A+=$*(L-1)*M);var X=Math.max(0,O-f+1);a.inside(0,g.length-1,X)&&(g[X].y+=$*1*M),a.inside(0,g.length-1,W+1)&&(g[W+1].y-=$*2*M),a.inside(0,g.length-1,q+1)&&(g[q+1].y+=$*1*M)}});var b=A,T=0,k=0;return g.forEach(function(P){T+=P.y,b+=T,P.y=b,k+=b}),k>0&&g.forEach(function(P){P.y/=k}),g};function l(s,u){for(var c={},f=0,h=-u;h<=u;h++)f+=s(h/u),c[h]=f;return c}e.exports.getExpectedValueFromPdf=function(s){if(!(!s||s.length===0)){var u=0;return s.forEach(function(c){u+=c.x*c.y}),u}},e.exports.getXWithLeftTailArea=function(s,u){if(!(!s||s.length===0)){for(var c=0,f=0,h=0;h<s.length&&(f=h,c+=s[h].y,!(c>=u));h++);return s[f].x}},e.exports.getPerplexity=function(s){if(!(!s||s.length===0)){var u=0;return s.forEach(function(c){var f=Math.log(c.y);isFinite(f)&&(u+=c.y*f)}),u=-u/n,Math.pow(2,u)}}})(Db);var IX=Db.exports;const PX=Iv(IX);function Rb(e,r){var t=e.length*r;if(e.length===0)throw new Error("quantile requires at least one data point.");if(r<0||r>1)throw new Error("quantiles must be between 0 and 1");return r===1?e[e.length-1]:r===0?e[0]:t%1!==0?e[Math.ceil(t)-1]:e.length%2===0?(e[t-1]+e[t])/2:e[t]}function Hs(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}function nh(e,r,t,n){for(t=t||0,n=n||e.length-1;n>t;){if(n-t>600){var i=n-t+1,a=r-t+1,o=Math.log(i),l=.5*Math.exp(2*o/3),s=.5*Math.sqrt(o*l*(i-l)/i);a-i/2<0&&(s*=-1);var u=Math.max(t,Math.floor(r-a*l/i+s)),c=Math.min(n,Math.floor(r+(i-a)*l/i+s));nh(e,r,u,c)}var f=e[r],h=t,v=n;for(Hs(e,t,r),e[n]>f&&Hs(e,t,n);h<v;){for(Hs(e,h,v),h++,v--;e[h]<f;)h++;for(;e[v]>f;)v--}e[t]===f?Hs(e,t,v):(v++,Hs(e,v,n)),v<=r&&(t=v+1),r<=v&&(n=v-1)}}function Ws(e,r){var t=e.slice();if(Array.isArray(r)){LX(t,r);for(var n=[],i=0;i<r.length;i++)n[i]=Rb(t,r[i]);return n}else{var a=zb(t.length,r);return Nb(t,a,0,t.length-1),Rb(t,r)}}function Nb(e,r,t,n){r%1===0?nh(e,r,t,n):(r=Math.floor(r),nh(e,r,t,n),nh(e,r+1,r+1,n))}function LX(e,r){for(var t=[0],n=0;n<r.length;n++)t.push(zb(e.length,r[n]));t.push(e.length-1),t.sort(OX);for(var i=[0,t.length-1];i.length;){var a=Math.ceil(i.pop()),o=Math.floor(i.pop());if(!(a-o<=1)){var l=Math.floor((o+a)/2);Nb(e,t[l],Math.floor(t[o]),Math.ceil(t[a])),i.push(o,l,l,a)}}}function OX(e,r){return e-r}function zb(e,r){var t=e*r;return r===1?e-1:r===0?0:t%1!==0?Math.ceil(t)-1:e%2===0?t-.5:t}var Yb=function(e){return{low:Er(e),high:cr(e),q1:Ws(e,.25),q3:Ws(e,.75),median:Ws(e,[.5]),minMax:[Er(e),cr(e)],quantile:[Ws(e,.25),Ws(e,.75)]}},Vb=function(e,r){var t=PX.create(e,r);return{violinSize:t.map(function(n){return n.y}),violinY:t.map(function(n){return n.x})}},_b=function(e){var r=e.xField,t=e.yField,n=e.seriesField,i=e.data,a=e.kde,o={min:a.min,max:a.max,size:a.sampleSize,width:a.width};if(!n){var l=hr(i,r);return Object.keys(l).map(function(c){var f=l[c],h=f.map(function(v){return v[t]});return S(S({x:c},Vb(h,o)),Yb(h))})}var s=[],u=hr(i,n);return Object.keys(u).forEach(function(c){var f=hr(u[c],r);return Object.keys(f).forEach(function(h){var v,d=f[h],p=d.map(function(y){return y[t]});s.push(S(S((v={x:h},v[n]=c,v),Vb(p,o)),Yb(p)))})}),s},ih=["low","high","q1","q3","median"],ah=[{type:"dodge",marginRatio:1/32}];function DX(e){var r=e.chart,t=e.options;return r.data(_b(t)),e}function BX(e){var r=e.chart,t=e.options,n=t.seriesField,i=t.color,a=t.shape,o=a===void 0?"violin":a,l=t.violinStyle,s=t.tooltip,u=t.state,c=r.createView({id:ay});return u4({chart:c,options:{xField:Or,yField:za,seriesField:n||Or,sizeField:AX,tooltip:S({fields:ih},s),violin:{style:l,color:i,shape:o},state:u}}),c.geometries[0].adjust(ah),e}function RX(e){var r=e.chart,t=e.options,n=t.seriesField,i=t.color,a=t.tooltip,o=t.box;if(o===!1)return e;var l=r.createView({id:FX});Fe({chart:l,options:{xField:Or,yField:Pb,seriesField:n||Or,tooltip:S({fields:ih},a),state:typeof o=="object"?o.state:{},interval:{color:i,size:1,style:{lineWidth:0}}}}),l.geometries[0].adjust(ah);var s=r.createView({id:bX});Fe({chart:s,options:{xField:Or,yField:Lb,seriesField:n||Or,tooltip:S({fields:ih},a),state:typeof o=="object"?o.state:{},interval:{color:i,size:8,style:{fillOpacity:1}}}}),s.geometries[0].adjust(ah);var u=r.createView({id:EX});return gr({chart:u,options:{xField:Or,yField:Ob,seriesField:n||Or,tooltip:S({fields:ih},a),state:typeof o=="object"?o.state:{},point:{color:i,size:1,style:{fill:"white",lineWidth:0}}}}),u.geometries[0].adjust(ah),s.axis(!1),l.axis(!1),u.axis(!1),u.legend(!1),l.legend(!1),s.legend(!1),e}function NX(e){var r,t=e.chart,n=e.options,i=n.meta,a=n.xAxis,o=n.yAxis,l={},s=B(l,i,(r={},r[Or]=S(S({sync:!0},bt(a,er)),{type:"cat"}),r[za]=S({sync:!0},bt(o,er)),r[Pb]=S({sync:za},bt(o,er)),r[Lb]=S({sync:za},bt(o,er)),r[Ob]=S({sync:za},bt(o,er)),r));return t.scale(s),e}function zX(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=vt(r,ay);return n===!1?a.axis(Or,!1):a.axis(Or,n),i===!1?a.axis(za,!1):a.axis(za,i),r.axis(!1),e}function YX(e){var r=e.chart,t=e.options,n=t.legend,i=t.seriesField,a=t.shape;if(n===!1)r.legend(!1);else{var o=i||Or,l=Wu(n,["selected"]);(!a||!a.startsWith("hollow"))&&(E(l,["marker","style","lineWidth"])||ie(l,["marker","style","lineWidth"],0)),r.legend(o,l),E(n,"selected")&&F(r.views,function(s){return s.legend(o,n)})}return e}function VX(e){var r=e.chart,t=vt(r,ay);return _t()(S(S({},e),{chart:t})),e}function _X(e){var r=e.chart,t=e.options,n=t.animation;return F(r.views,function(i){Ts(i,n)}),e}function $X(e){return lt(wt,DX,BX,RX,NX,le,zX,YX,Yt,VX,_X)(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="violin",t}return r.getDefaultOptions=function(){return kX},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(_b(this.options))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return $X},r})(ft);var Dr="$$yField$$",oh="$$diffField$$",oy="$$absoluteField$$",ly="$$isTotal$$",GX={label:{},leaderLine:{style:{lineWidth:1,stroke:"#8c8c8c",lineDash:[4,2]}},total:{style:{fill:"rgba(0, 0, 0, 0.25)"}},interactions:[{type:"element-active"}],risingFill:"#f4664a",fallingFill:"#30bf78",waterfallStyle:{fill:"rgba(0, 0, 0, 0.25)"},yAxis:{grid:{line:{style:{lineDash:[4,2]}}}}};function HX(e){for(var r=[],t=0;t<e.length;t++){var n=e[t];if(n){var i=t===0?"M":"L";r.push([i,n.x,n.y])}}var a=e[0];return r.push(["L",a.x,a.y]),r.push(["z"]),r}function WX(e){return B({},e.defaultStyle,e.style,{fill:e.color})}Mt("interval","waterfall",{draw:function(e,r){var t=e.customInfo,n=e.points,i=e.nextPoints,a=r.addGroup(),o=this.parsePath(HX(n)),l=WX(e);a.addShape("path",{attrs:S(S({},l),{path:o})});var s=E(t,"leaderLine");if(s&&i){var u=[["M",n[2].x,n[2].y],["L",i[0].x,i[0].y]];n[2].y===i[1].y&&(u[1]=["L",i[1].x,i[1].y]),u=this.parsePath(u),a.addShape("path",{attrs:S({path:u},s.style||{})})}return a}});function XX(e,r,t,n,i){var a,o=[];if(Pe(e,function(s,u){var c;Nn(Zr.WARN,st(u[t]),"".concat(u[t]," is not a valid number"));var f=sa(u[t])?null:u[t];return o.push(S(S({},u),(c={},c[n]=[s,s+f],c))),s+f},0),o.length&&i){var l=E(o,[[e.length-1],n,[1]]);o.push((a={},a[r]=i.label,a[t]=l,a[n]=[0,l],a))}return o}function $b(e,r,t,n){var i=XX(e,r,t,Dr,n);return i.map(function(a,o){var l;return At(a)?S(S({},a),(l={},l[oy]=a[Dr][1],l[oh]=a[Dr][1]-a[Dr][0],l[ly]=o===e.length,l)):a})}function jX(e){var r=e.options,t=r.locale,n=r.total,i=Pf(t).get(["waterfall","total"]);return n&&typeof n.label!="string"&&i&&(e.options.total.label=i),e}function UX(e){var r=e.chart,t=e.options,n=t.data,i=t.xField,a=t.yField,o=t.total,l=t.leaderLine,s=t.columnWidthRatio,u=t.waterfallStyle,c=t.risingFill,f=t.fallingFill,h=t.color,v=t.shape,d=t.customInfo;r.data($b(n,i,a,o));var p=h||function(x){return E(x,[ly])?E(o,["style","fill"],""):E(x,[Dr,1])-E(x,[Dr,0])>0?c:f},y=B({},e,{options:{xField:i,yField:Dr,seriesField:i,rawFields:[a,oh,ly,Dr],widthRatio:s,interval:{style:u,shape:v||"waterfall",color:p}}}),g=Fe(y).ext,m=g.geometry;return m.customInfo(S(S({},d),{leaderLine:l})),e}function qX(e){var r,t,n=e.options,i=n.xAxis,a=n.yAxis,o=n.xField,l=n.yField,s=n.meta,u=B({},{alias:l},E(s,l));return lt(Ut((r={},r[o]=i,r[l]=a,r[Dr]=a,r),B({},s,(t={},t[Dr]=u,t[oh]=u,t[oy]=u,t))))(e)}function ZX(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?r.axis(a,!1):r.axis(a,n),i===!1?(r.axis(o,!1),r.axis(Dr,!1)):(r.axis(o,i),r.axis(Dr,i)),e}function QX(e){var r=e.chart,t=e.options,n=t.legend,i=t.total,a=t.risingFill,o=t.fallingFill,l=t.locale,s=Pf(l);if(n===!1)r.legend(!1);else{var u=[{name:s.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:a}}},{name:s.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:o}}}];i&&u.push({name:i.label||"",value:"total",marker:{symbol:"square",style:B({},{r:5},E(i,"style"))}}),r.legend(B({},{custom:!0,position:"top",items:u},n)),r.removeInteraction("legend-filter")}return e}function KX(e){var r=e.chart,t=e.options,n=t.label,i=t.labelMode,a=t.xField,o=Ae(r,"interval");if(!n)o.label(!1);else{var l=n.callback,s=kt(n,["callback"]);o.label({fields:i==="absolute"?[oy,a]:[oh,a],callback:l,cfg:fe(s)})}return e}function JX(e){var r=e.chart,t=e.options,n=t.tooltip,i=t.xField,a=t.yField;if(n!==!1){r.tooltip(S({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},n));var o=r.geometries[0];n!=null&&n.formatter?o.tooltip("".concat(i,"*").concat(a),n.formatter):o.tooltip(a)}else r.tooltip(!1);return e}function t9(e){return lt(jX,wt,UX,qX,ZX,QX,JX,KX,Ii,Yt,It,_t())(e)}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="waterfall",t}return r.getDefaultOptions=function(){return GX},r.prototype.changeData=function(t){var n=this.options,i=n.xField,a=n.yField,o=n.total;this.updateOption({data:t}),this.chart.changeData($b(t,i,a,o))},r.prototype.getSchemaAdaptor=function(){return t9},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r})(ft);var sy="color",e9=B({},ft.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",sy],formatter:function(e){return{name:e.text,value:e.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}}),r9={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function n9(e,r){return r=Tt({},r9,r),i9(e,r)}function i9(e,r){var t=y9();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(s){Y(r[s])||t[s](r[s])}),t.words(e),r.imageMask&&t.createMask(r.imageMask);var n=t.start(),i=n._tags;i.forEach(function(s){s.x+=r.size[0]/2,s.y+=r.size[1]/2});var a=r.size,o=a[0],l=a[1];return i.push({text:"",value:0,x:0,y:0,opacity:0}),i.push({text:"",value:0,x:o,y:l,opacity:0}),i}var uy=Math.PI/180,Xs=64,lh=2048;function a9(e){return e.text}function o9(){return"serif"}function Gb(){return"normal"}function l9(e){return e.value}function s9(){return~~(Math.random()*2)*90}function u9(){return 1}function c9(e,r,t,n){if(!r.sprite){var i=e.context,a=e.ratio;i.clearRect(0,0,(Xs<<5)/a,lh/a);var o=0,l=0,s=0,u=t.length;for(--n;++n<u;){r=t[n],i.save(),i.font=r.style+" "+r.weight+" "+~~((r.size+1)/a)+"px "+r.font;var c=i.measureText(r.text+"m").width*a,f=r.size<<1;if(r.rotate){var h=Math.sin(r.rotate*uy),v=Math.cos(r.rotate*uy),d=c*v,p=c*h,y=f*v,g=f*h;c=Math.max(Math.abs(d+g),Math.abs(d-g))+31>>5<<5,f=~~Math.max(Math.abs(p+y),Math.abs(p-y))}else c=c+31>>5<<5;if(f>s&&(s=f),o+c>=Xs<<5&&(o=0,l+=s,s=0),l+f>=lh)break;i.translate((o+(c>>1))/a,(l+(f>>1))/a),r.rotate&&i.rotate(r.rotate*uy),i.fillText(r.text,0,0),r.padding&&(i.lineWidth=2*r.padding,i.strokeText(r.text,0,0)),i.restore(),r.width=c,r.height=f,r.xoff=o,r.yoff=l,r.x1=c>>1,r.y1=f>>1,r.x0=-r.x1,r.y0=-r.y1,r.hasText=!0,o+=c}for(var m=i.getImageData(0,0,(Xs<<5)/a,lh/a).data,x=[];--n>=0;)if(r=t[n],!!r.hasText){for(var c=r.width,w=c>>5,f=r.y1-r.y0,C=0;C<f*w;C++)x[C]=0;if(o=r.xoff,o==null)return;l=r.yoff;for(var M=0,A=-1,b=0;b<f;b++){for(var C=0;C<c;C++){var T=w*b+(C>>5),k=m[(l+b)*(Xs<<5)+(o+C)<<2]?1<<31-C%32:0;x[T]|=k,M|=k}M?A=b:(r.y0++,f--,b--,l++)}r.y1=r.y0+A,r.sprite=x.slice(0,(r.y1-r.y0)*w)}}}function f9(e,r,t){t>>=5;for(var n=e.sprite,i=e.width>>5,a=e.x-(i<<4),o=a&127,l=32-o,s=e.y1-e.y0,u=(e.y+e.y0)*t+(a>>5),c,f=0;f<s;f++){c=0;for(var h=0;h<=i;h++)if((c<<l|(h<i?(c=n[f*i+h])>>>o:0))&r[u+h])return!0;u+=t}return!1}function h9(e,r){var t=e[0],n=e[1];r.x+r.x0<t.x&&(t.x=r.x+r.x0),r.y+r.y0<t.y&&(t.y=r.y+r.y0),r.x+r.x1>n.x&&(n.x=r.x+r.x1),r.y+r.y1>n.y&&(n.y=r.y+r.y1)}function v9(e,r){return e.x+e.x1>r[0].x&&e.x+e.x0<r[1].x&&e.y+e.y1>r[0].y&&e.y+e.y0<r[1].y}function Hb(e){var r=e[0]/e[1];return function(t){return[r*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function d9(e){var r=4,t=r*e[0]/e[1],n=0,i=0;return function(a){var o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:n+=t;break;case 1:i+=r;break;case 2:n-=t;break;default:i-=r;break}return[n,i]}}function Wb(e){for(var r=[],t=-1;++t<e;)r[t]=0;return r}function p9(){return document.createElement("canvas")}function Sn(e){return Q(e)?e:function(){return e}}var g9={archimedean:Hb,rectangular:d9};function y9(){var e=[256,256],r=o9,t=l9,n=Gb,i=s9,a=u9,o=Hb,l=Math.random,s=[],u=1/0,c=a9,f=Gb,h=p9,v={};v.start=function(){var y=e[0],g=e[1],m=d(h()),x=v.board?v.board:Wb((e[0]>>5)*e[1]),w=s.length,C=[],M=s.map(function(k,P,O){return k.text=c.call(this,k,P,O),k.font=r.call(this,k,P,O),k.style=f.call(this,k,P,O),k.weight=n.call(this,k,P,O),k.rotate=i.call(this,k,P,O),k.size=~~t.call(this,k,P,O),k.padding=a.call(this,k,P,O),k}).sort(function(k,P){return P.size-k.size}),A=-1,b=v.board?[{x:0,y:0},{x:y,y:g}]:null;T();function T(){for(var k=Date.now();Date.now()-k<u&&++A<w;){var P=M[A];P.x=y*(l()+.5)>>1,P.y=g*(l()+.5)>>1,c9(m,P,M,A),P.hasText&&p(x,P,b)&&(C.push(P),b?v.hasImage||h9(b,P):b=[{x:P.x+P.x0,y:P.y+P.y0},{x:P.x+P.x1,y:P.y+P.y1}],P.x-=e[0]>>1,P.y-=e[1]>>1)}v._tags=C,v._bounds=b}return v};function d(y){y.width=y.height=1;var g=Math.sqrt(y.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,1,1).data.length>>2);y.width=(Xs<<5)/g,y.height=lh/g;var m=y.getContext("2d",{willReadFrequently:!0});return m.fillStyle=m.strokeStyle="red",m.textAlign="center",{context:m,ratio:g}}function p(y,g,m){for(var x=g.x,w=g.y,C=Math.sqrt(e[0]*e[0]+e[1]*e[1]),M=o(e),A=l()<.5?1:-1,b,T=-A,k,P;(b=M(T+=A))&&(k=~~b[0],P=~~b[1],!(Math.min(Math.abs(k),Math.abs(P))>=C));)if(g.x=x+k,g.y=w+P,!(g.x+g.x0<0||g.y+g.y0<0||g.x+g.x1>e[0]||g.y+g.y1>e[1])&&(!m||!f9(g,y,e[0]))&&(!m||v9(g,m))){for(var O=g.sprite,V=g.width>>5,W=e[0]>>5,q=g.x-(V<<4),L=q&127,H=32-L,N=g.y1-g.y0,_=void 0,$=(g.y+g.y0)*W+(q>>5),X=0;X<N;X++){_=0;for(var K=0;K<=V;K++)y[$+K]|=_<<H|(K<V?(_=O[X*V+K])>>>L:0);$+=W}return delete g.sprite,!0}return!1}return v.createMask=function(y){var g=document.createElement("canvas"),m=e[0],x=e[1];if(!(!m||!x)){var w=m>>5,C=Wb((m>>5)*x);g.width=m,g.height=x;var M=g.getContext("2d");M.drawImage(y,0,0,y.width,y.height,0,0,m,x);for(var A=M.getImageData(0,0,m,x).data,b=0;b<x;b++)for(var T=0;T<m;T++){var k=w*b+(T>>5),P=b*m+T<<2,O=A[P]>=250&&A[P+1]>=250&&A[P+2]>=250,V=O?1<<31-T%32:0;C[k]|=V}v.board=C,v.hasImage=!0}},v.timeInterval=function(y){u=y==null?1/0:y},v.words=function(y){s=y},v.size=function(y){e=[+y[0],+y[1]]},v.font=function(y){r=Sn(y)},v.fontWeight=function(y){n=Sn(y)},v.rotate=function(y){i=Sn(y)},v.spiral=function(y){o=g9[y]||y},v.fontSize=function(y){t=Sn(y)},v.padding=function(y){a=Sn(y)},v.random=function(y){l=Sn(y)},v}function Xb(e){var r=e.options,t=e.chart,n=t,i=n.width,a=n.height,o=n.padding,l=n.appendPadding,s=n.ele,u=r.data,c=r.imageMask,f=r.wordField,h=r.weightField,v=r.colorField,d=r.wordStyle,p=r.timeInterval,y=r.random,g=r.spiral,m=r.autoFit,x=m===void 0?!0:m,w=r.placementStrategy;if(!u||!u.length)return[];var C=d.fontFamily,M=d.fontWeight,A=d.padding,b=d.fontSize,T=C9(u,h),k=[F9(T),b9(T)],P=u.map(function(W){return{text:W[f],value:W[h],color:W[v],datum:W}}),O={imageMask:c,font:C,fontSize:S9(b,k),fontWeight:M,size:m9({width:i,height:a,padding:o,appendPadding:l,autoFit:x,container:s}),padding:A,timeInterval:p,random:y,spiral:g,rotate:M9(r)};if(Q(w)){var V=P.map(function(W,q,L){return S(S(S({},W),{hasText:!!W.text,font:Sn(O.font)(W,q,L),weight:Sn(O.fontWeight)(W,q,L),rotate:Sn(O.rotate)(W,q,L),size:Sn(O.fontSize)(W,q,L),style:"normal"}),w.call(t,W,q,L))});return V.push({text:"",value:0,x:0,y:0,opacity:0}),V.push({text:"",value:0,x:O.size[0],y:O.size[1],opacity:0}),V}return n9(P,O)}function m9(e){var r=e.width,t=e.height,n=e.container,i=e.autoFit,a=e.padding,o=e.appendPadding;if(i){var l=sg(n);r=l.width,t=l.height}r=r||400,t=t||400;var s=x9({padding:a,appendPadding:o}),u=s[0],c=s[1],f=s[2],h=s[3],v=[r-(h+c),t-(u+f)];return v}function x9(e){var r=Ti(e.padding),t=Ti(e.appendPadding),n=r[0]+t[0],i=r[1]+t[1],a=r[2]+t[2],o=r[3]+t[3];return[n,i,a,o]}function w9(e){return new Promise(function(r,t){if(e instanceof HTMLImageElement){r(e);return}if(at(e)){var n=new Image;n.crossOrigin="anonymous",n.src=e,n.onload=function(){r(n)},n.onerror=function(){Nn(Zr.ERROR,!1,"image %s load failed !!!",e),t()};return}Nn(Zr.WARN,e===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}function S9(e,r){if(Q(e))return e;if(G(e)){var t=e[0],n=e[1];if(!r)return function(){return(n+t)/2};var i=r[0],a=r[1];return a===i?function(){return(n+t)/2}:function(l){var s=l.value;return(n-t)/(a-i)*(s-i)+t}}return function(){return e}}function C9(e,r){return e.map(function(t){return t[r]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}function M9(e){var r=A9(e),t=r.rotation,n=r.rotationSteps;if(!G(t))return t;var i=t[0],a=t[1],o=n===1?0:(a-i)/(n-1);return function(){return a===i?a:Math.floor(Math.random()*n)*o}}function A9(e){var r=e.wordStyle.rotationSteps;return r<1&&(Nn(Zr.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),r=1),{rotation:e.wordStyle.rotation,rotationSteps:r}}function F9(e){return Math.min.apply(Math,e)}function b9(e){return Math.max.apply(Math,e)}function E9(e){var r=e.chart,t=e.options,n=t.colorField,i=t.color,a=Xb(e);r.data(a);var o=B({},e,{options:{xField:"x",yField:"y",seriesField:n&&sy,rawFields:Q(i)&&rt(rt([],E(t,"rawFields",[]),!0),["datum"],!1),point:{color:i,shape:"word-cloud"}}}),l=gr(o).ext;return l.geometry.label(!1),r.coordinate().reflect("y"),r.axis(!1),e}function k9(e){return lt(Ut({x:{nice:!1},y:{nice:!1}}))(e)}function T9(e){var r=e.chart,t=e.options,n=t.legend,i=t.colorField;return n===!1?r.legend(!1):i&&r.legend(sy,n),e}function I9(e){lt(E9,k9,le,T9,Yt,It,wt,Ii)(e)}Mt("point","word-cloud",{draw:function(e,r){var t=e.x,n=e.y,i=r.addShape("text",{attrs:S(S({},P9(e)),{x:t,y:n})}),a=e.data.rotate;return typeof a=="number"&&Je.rotate(i,a*Math.PI/180),i}});function P9(e){return{fontSize:e.data.size,text:e.data.text,textAlign:"center",fontFamily:e.data.font,fontWeight:e.data.weight,fill:e.color||e.defaultStyle.stroke,textBaseline:"alphabetic"}}(function(e){I(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="word-cloud",t}return r.getDefaultOptions=function(){return e9},r.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(Xb({chart:this.chart,options:this.options}))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){var t=this;return new Promise(function(n){var i=t.options.imageMask;if(!i){e.prototype.render.call(t),n();return}var a=function(o){t.options=S(S({},t.options),{imageMask:o||null}),e.prototype.render.call(t),n()};w9(i).then(a).catch(a)})},r.prototype.getSchemaAdaptor=function(){return I9},r.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){e.prototype.triggerResize.call(t)}))},r})(ft),function(e){I(r,e);function r(t,n,i,a){var o=e.call(this,t,B({},a,n))||this;return o.type="g2-plot",o.defaultOptions=a,o.adaptor=i,o}return r.prototype.getDefaultOptions=function(){return this.defaultOptions},r.prototype.getSchemaAdaptor=function(){return this.adaptor},r}(ft),eA("en-US",o4),eA("zh-CN",l4);var jb={exports:{}},xr={},Ub={exports:{}},qb={};/**
|
|
108
108
|
* @license React
|
|
109
109
|
* scheduler.production.min.js
|
|
110
110
|
*
|
|
@@ -120,14 +120,14 @@ A`,l,l,0,s?1:0,1,o.p1.x,o.p1.y)}return i.join(" ")}}function rX(e,r){r=r||{},r.m
|
|
|
120
120
|
*
|
|
121
121
|
* This source code is licensed under the MIT license found in the
|
|
122
122
|
* LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/var Zb=
|
|
123
|
+
*/var Zb=D,wr=L9;function U(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)r+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qb=new Set,js={};function Ya(e,r){Ko(e,r),Ko(e+"Capture",r)}function Ko(e,r){for(js[e]=r,e=0;e<r.length;e++)Qb.add(r[e])}var Hn=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),cy=Object.prototype.hasOwnProperty,O9=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Kb={},Jb={};function D9(e){return cy.call(Jb,e)?!0:cy.call(Kb,e)?!1:O9.test(e)?Jb[e]=!0:(Kb[e]=!0,!1)}function B9(e,r,t,n){if(t!==null&&t.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return n?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R9(e,r,t,n){if(r===null||typeof r=="undefined"||B9(e,r,t,n))return!0;if(n)return!1;if(t!==null)switch(t.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function _e(e,r,t,n,i,a,o){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=e,this.type=r,this.sanitizeURL=a,this.removeEmptyString=o}var be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){be[e]=new _e(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];be[r]=new _e(r,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){be[e]=new _e(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){be[e]=new _e(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){be[e]=new _e(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){be[e]=new _e(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){be[e]=new _e(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){be[e]=new _e(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){be[e]=new _e(e,5,!1,e.toLowerCase(),null,!1,!1)});var fy=/[\-:]([a-z])/g;function hy(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(fy,hy);be[r]=new _e(r,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(fy,hy);be[r]=new _e(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(fy,hy);be[r]=new _e(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){be[e]=new _e(e,1,!1,e.toLowerCase(),null,!1,!1)}),be.xlinkHref=new _e("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){be[e]=new _e(e,1,!1,e.toLowerCase(),null,!0,!0)});function vy(e,r,t,n){var i=be.hasOwnProperty(r)?be[r]:null;(i!==null?i.type!==0:n||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(R9(r,t,i,n)&&(t=null),n||i===null?D9(r)&&(t===null?e.removeAttribute(r):e.setAttribute(r,""+t)):i.mustUseProperty?e[i.propertyName]=t===null?i.type===3?!1:"":t:(r=i.attributeName,n=i.attributeNamespace,t===null?e.removeAttribute(r):(i=i.type,t=i===3||i===4&&t===!0?"":""+t,n?e.setAttributeNS(n,r,t):e.setAttribute(r,t))))}var Wn=Zb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sh=Symbol.for("react.element"),Jo=Symbol.for("react.portal"),tl=Symbol.for("react.fragment"),dy=Symbol.for("react.strict_mode"),py=Symbol.for("react.profiler"),tE=Symbol.for("react.provider"),eE=Symbol.for("react.context"),gy=Symbol.for("react.forward_ref"),yy=Symbol.for("react.suspense"),my=Symbol.for("react.suspense_list"),xy=Symbol.for("react.memo"),Bi=Symbol.for("react.lazy"),rE=Symbol.for("react.offscreen"),nE=Symbol.iterator;function Us(e){return e===null||typeof e!="object"?null:(e=nE&&e[nE]||e["@@iterator"],typeof e=="function"?e:null)}var Kt=Object.assign,wy;function qs(e){if(wy===void 0)try{throw Error()}catch(t){var r=t.stack.trim().match(/\n( *(at )?)/);wy=r&&r[1]||""}return`
|
|
124
124
|
`+wy+e}var Sy=!1;function Cy(e,r){if(!e||Sy)return"";Sy=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(u){var n=u}Reflect.construct(e,[],r)}else{try{r.call()}catch(u){n=u}e.call(r.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
125
125
|
`),a=n.stack.split(`
|
|
126
126
|
`),o=i.length-1,l=a.length-1;1<=o&&0<=l&&i[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==a[l]){var s=`
|
|
127
127
|
`+i[o].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=o&&0<=l);break}}}finally{Sy=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?qs(e):""}function N9(e){switch(e.tag){case 5:return qs(e.type);case 16:return qs("Lazy");case 13:return qs("Suspense");case 19:return qs("SuspenseList");case 0:case 2:case 15:return e=Cy(e.type,!1),e;case 11:return e=Cy(e.type.render,!1),e;case 1:return e=Cy(e.type,!0),e;default:return""}}function My(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case tl:return"Fragment";case Jo:return"Portal";case py:return"Profiler";case dy:return"StrictMode";case yy:return"Suspense";case my:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case eE:return(e.displayName||"Context")+".Consumer";case tE:return(e._context.displayName||"Context")+".Provider";case gy:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xy:return r=e.displayName||null,r!==null?r:My(e.type)||"Memo";case Bi:r=e._payload,e=e._init;try{return My(e(r))}catch(t){}}return null}function z9(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return My(r);case 8:return r===dy?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Ri(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function iE(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Y9(e){var r=iE(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),n=""+e[r];if(!e.hasOwnProperty(r)&&typeof t!="undefined"&&typeof t.get=="function"&&typeof t.set=="function"){var i=t.get,a=t.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,r,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function uh(e){e._valueTracker||(e._valueTracker=Y9(e))}function aE(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var t=r.getValue(),n="";return e&&(n=iE(e)?e.checked?"true":"false":e.value),e=n,e!==t?(r.setValue(e),!0):!1}function ch(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(r){return e.body}}function Ay(e,r){var t=r.checked;return Kt({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t!=null?t:e._wrapperState.initialChecked})}function oE(e,r){var t=r.defaultValue==null?"":r.defaultValue,n=r.checked!=null?r.checked:r.defaultChecked;t=Ri(r.value!=null?r.value:t),e._wrapperState={initialChecked:n,initialValue:t,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function lE(e,r){r=r.checked,r!=null&&vy(e,"checked",r,!1)}function Fy(e,r){lE(e,r);var t=Ri(r.value),n=r.type;if(t!=null)n==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?by(e,r.type,t):r.hasOwnProperty("defaultValue")&&by(e,r.type,Ri(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function sE(e,r,t){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var n=r.type;if(!(n!=="submit"&&n!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,t||r===e.value||(e.value=r),e.defaultValue=r}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function by(e,r,t){(r!=="number"||ch(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var Zs=Array.isArray;function el(e,r,t,n){if(e=e.options,r){r={};for(var i=0;i<t.length;i++)r["$"+t[i]]=!0;for(t=0;t<e.length;t++)i=r.hasOwnProperty("$"+e[t].value),e[t].selected!==i&&(e[t].selected=i),i&&n&&(e[t].defaultSelected=!0)}else{for(t=""+Ri(t),r=null,i=0;i<e.length;i++){if(e[i].value===t){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}r!==null||e[i].disabled||(r=e[i])}r!==null&&(r.selected=!0)}}function Ey(e,r){if(r.dangerouslySetInnerHTML!=null)throw Error(U(91));return Kt({},r,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function uE(e,r){var t=r.value;if(t==null){if(t=r.children,r=r.defaultValue,t!=null){if(r!=null)throw Error(U(92));if(Zs(t)){if(1<t.length)throw Error(U(93));t=t[0]}r=t}r==null&&(r=""),t=r}e._wrapperState={initialValue:Ri(t)}}function cE(e,r){var t=Ri(r.value),n=Ri(r.defaultValue);t!=null&&(t=""+t,t!==e.value&&(e.value=t),r.defaultValue==null&&e.defaultValue!==t&&(e.defaultValue=t)),n!=null&&(e.defaultValue=""+n)}function fE(e){var r=e.textContent;r===e._wrapperState.initialValue&&r!==""&&r!==null&&(e.value=r)}function hE(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ky(e,r){return e==null||e==="http://www.w3.org/1999/xhtml"?hE(r):e==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var fh,vE=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(r,t,n,i){MSApp.execUnsafeLocalFunction(function(){return e(r,t,n,i)})}:e}(function(e,r){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=r;else{for(fh=fh||document.createElement("div"),fh.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=fh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function Qs(e,r){if(r){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=r;return}}e.textContent=r}var Ks={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},V9=["Webkit","ms","Moz","O"];Object.keys(Ks).forEach(function(e){V9.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),Ks[r]=Ks[e]})});function dE(e,r,t){return r==null||typeof r=="boolean"||r===""?"":t||typeof r!="number"||r===0||Ks.hasOwnProperty(e)&&Ks[e]?(""+r).trim():r+"px"}function pE(e,r){e=e.style;for(var t in r)if(r.hasOwnProperty(t)){var n=t.indexOf("--")===0,i=dE(t,r[t],n);t==="float"&&(t="cssFloat"),n?e.setProperty(t,i):e[t]=i}}var _9=Kt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ty(e,r){if(r){if(_9[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(U(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(U(61))}if(r.style!=null&&typeof r.style!="object")throw Error(U(62))}}function Iy(e,r){if(e.indexOf("-")===-1)return typeof r.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Py=null;function Ly(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Oy=null,rl=null,nl=null;function gE(e){if(e=wu(e)){if(typeof Oy!="function")throw Error(U(280));var r=e.stateNode;r&&(r=Dh(r),Oy(e.stateNode,e.type,r))}}function yE(e){rl?nl?nl.push(e):nl=[e]:rl=e}function mE(){if(rl){var e=rl,r=nl;if(nl=rl=null,gE(e),r)for(e=0;e<r.length;e++)gE(r[e])}}function xE(e,r){return e(r)}function wE(){}var Dy=!1;function SE(e,r,t){if(Dy)return e(r,t);Dy=!0;try{return xE(e,r,t)}finally{Dy=!1,(rl!==null||nl!==null)&&(wE(),mE())}}function Js(e,r){var t=e.stateNode;if(t===null)return null;var n=Dh(t);if(n===null)return null;t=n[r];t:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break t;default:e=!1}if(e)return null;if(t&&typeof t!="function")throw Error(U(231,r,typeof t));return t}var By=!1;if(Hn)try{var tu={};Object.defineProperty(tu,"passive",{get:function(){By=!0}}),window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch(e){By=!1}function $9(e,r,t,n,i,a,o,l,s){var u=Array.prototype.slice.call(arguments,3);try{r.apply(t,u)}catch(c){this.onError(c)}}var eu=!1,hh=null,vh=!1,Ry=null,G9={onError:function(e){eu=!0,hh=e}};function H9(e,r,t,n,i,a,o,l,s){eu=!1,hh=null,$9.apply(G9,arguments)}function W9(e,r,t,n,i,a,o,l,s){if(H9.apply(this,arguments),eu){if(eu){var u=hh;eu=!1,hh=null}else throw Error(U(198));vh||(vh=!0,Ry=u)}}function Va(e){var r=e,t=e;if(e.alternate)for(;r.return;)r=r.return;else{e=r;do r=e,r.flags&4098&&(t=r.return),e=r.return;while(e)}return r.tag===3?t:null}function CE(e){if(e.tag===13){var r=e.memoizedState;if(r===null&&(e=e.alternate,e!==null&&(r=e.memoizedState)),r!==null)return r.dehydrated}return null}function ME(e){if(Va(e)!==e)throw Error(U(188))}function X9(e){var r=e.alternate;if(!r){if(r=Va(e),r===null)throw Error(U(188));return r!==e?null:e}for(var t=e,n=r;;){var i=t.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){t=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===t)return ME(i),e;if(a===n)return ME(i),r;a=a.sibling}throw Error(U(188))}if(t.return!==n.return)t=i,n=a;else{for(var o=!1,l=i.child;l;){if(l===t){o=!0,t=i,n=a;break}if(l===n){o=!0,n=i,t=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===t){o=!0,t=a,n=i;break}if(l===n){o=!0,n=a,t=i;break}l=l.sibling}if(!o)throw Error(U(189))}}if(t.alternate!==n)throw Error(U(190))}if(t.tag!==3)throw Error(U(188));return t.stateNode.current===t?e:r}function AE(e){return e=X9(e),e!==null?FE(e):null}function FE(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var r=FE(e);if(r!==null)return r;e=e.sibling}return null}var bE=wr.unstable_scheduleCallback,EE=wr.unstable_cancelCallback,j9=wr.unstable_shouldYield,U9=wr.unstable_requestPaint,oe=wr.unstable_now,q9=wr.unstable_getCurrentPriorityLevel,Ny=wr.unstable_ImmediatePriority,kE=wr.unstable_UserBlockingPriority,dh=wr.unstable_NormalPriority,Z9=wr.unstable_LowPriority,TE=wr.unstable_IdlePriority,ph=null,Cn=null;function Q9(e){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(ph,e,void 0,(e.current.flags&128)===128)}catch(r){}}var Kr=Math.clz32?Math.clz32:tj,K9=Math.log,J9=Math.LN2;function tj(e){return e>>>=0,e===0?32:31-(K9(e)/J9|0)|0}var gh=64,yh=4194304;function ru(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mh(e,r){var t=e.pendingLanes;if(t===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=t&268435455;if(o!==0){var l=o&~i;l!==0?n=ru(l):(a&=o,a!==0&&(n=ru(a)))}else o=t&~i,o!==0?n=ru(o):a!==0&&(n=ru(a));if(n===0)return 0;if(r!==0&&r!==n&&!(r&i)&&(i=n&-n,a=r&-r,i>=a||i===16&&(a&4194240)!==0))return r;if(n&4&&(n|=t&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=n;0<r;)t=31-Kr(r),i=1<<t,n|=e[t],r&=~i;return n}function ej(e,r){switch(e){case 1:case 2:case 4:return r+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rj(e,r){for(var t=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Kr(a),l=1<<o,s=i[o];s===-1?(!(l&t)||l&n)&&(i[o]=ej(l,r)):s<=r&&(e.expiredLanes|=l),a&=~l}}function zy(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function IE(){var e=gh;return gh<<=1,!(gh&4194240)&&(gh=64),e}function Yy(e){for(var r=[],t=0;31>t;t++)r.push(e);return r}function nu(e,r,t){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-Kr(r),e[r]=t}function nj(e,r){var t=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<t;){var i=31-Kr(t),a=1<<i;r[i]=0,n[i]=-1,e[i]=-1,t&=~a}}function Vy(e,r){var t=e.entangledLanes|=r;for(e=e.entanglements;t;){var n=31-Kr(t),i=1<<n;i&r|e[n]&r&&(e[n]|=r),t&=~i}}var Rt=0;function PE(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var LE,_y,OE,DE,BE,$y=!1,xh=[],Ni=null,zi=null,Yi=null,iu=new Map,au=new Map,Vi=[],ij="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function RE(e,r){switch(e){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":zi=null;break;case"mouseover":case"mouseout":Yi=null;break;case"pointerover":case"pointerout":iu.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":au.delete(r.pointerId)}}function ou(e,r,t,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:r,domEventName:t,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},r!==null&&(r=wu(r),r!==null&&_y(r)),e):(e.eventSystemFlags|=n,r=e.targetContainers,i!==null&&r.indexOf(i)===-1&&r.push(i),e)}function aj(e,r,t,n,i){switch(r){case"focusin":return Ni=ou(Ni,e,r,t,n,i),!0;case"dragenter":return zi=ou(zi,e,r,t,n,i),!0;case"mouseover":return Yi=ou(Yi,e,r,t,n,i),!0;case"pointerover":var a=i.pointerId;return iu.set(a,ou(iu.get(a)||null,e,r,t,n,i)),!0;case"gotpointercapture":return a=i.pointerId,au.set(a,ou(au.get(a)||null,e,r,t,n,i)),!0}return!1}function NE(e){var r=_a(e.target);if(r!==null){var t=Va(r);if(t!==null){if(r=t.tag,r===13){if(r=CE(t),r!==null){e.blockedOn=r,BE(e.priority,function(){OE(t)});return}}else if(r===3&&t.stateNode.current.memoizedState.isDehydrated){e.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wh(e){if(e.blockedOn!==null)return!1;for(var r=e.targetContainers;0<r.length;){var t=Hy(e.domEventName,e.eventSystemFlags,r[0],e.nativeEvent);if(t===null){t=e.nativeEvent;var n=new t.constructor(t.type,t);Py=n,t.target.dispatchEvent(n),Py=null}else return r=wu(t),r!==null&&_y(r),e.blockedOn=t,!1;r.shift()}return!0}function zE(e,r,t){wh(e)&&t.delete(r)}function oj(){$y=!1,Ni!==null&&wh(Ni)&&(Ni=null),zi!==null&&wh(zi)&&(zi=null),Yi!==null&&wh(Yi)&&(Yi=null),iu.forEach(zE),au.forEach(zE)}function lu(e,r){e.blockedOn===r&&(e.blockedOn=null,$y||($y=!0,wr.unstable_scheduleCallback(wr.unstable_NormalPriority,oj)))}function su(e){function r(i){return lu(i,e)}if(0<xh.length){lu(xh[0],e);for(var t=1;t<xh.length;t++){var n=xh[t];n.blockedOn===e&&(n.blockedOn=null)}}for(Ni!==null&&lu(Ni,e),zi!==null&&lu(zi,e),Yi!==null&&lu(Yi,e),iu.forEach(r),au.forEach(r),t=0;t<Vi.length;t++)n=Vi[t],n.blockedOn===e&&(n.blockedOn=null);for(;0<Vi.length&&(t=Vi[0],t.blockedOn===null);)NE(t),t.blockedOn===null&&Vi.shift()}var il=Wn.ReactCurrentBatchConfig,Sh=!0;function lj(e,r,t,n){var i=Rt,a=il.transition;il.transition=null;try{Rt=1,Gy(e,r,t,n)}finally{Rt=i,il.transition=a}}function sj(e,r,t,n){var i=Rt,a=il.transition;il.transition=null;try{Rt=4,Gy(e,r,t,n)}finally{Rt=i,il.transition=a}}function Gy(e,r,t,n){if(Sh){var i=Hy(e,r,t,n);if(i===null)lm(e,r,n,Ch,t),RE(e,n);else if(aj(i,e,r,t,n))n.stopPropagation();else if(RE(e,n),r&4&&-1<ij.indexOf(e)){for(;i!==null;){var a=wu(i);if(a!==null&&LE(a),a=Hy(e,r,t,n),a===null&&lm(e,r,n,Ch,t),a===i)break;i=a}i!==null&&n.stopPropagation()}else lm(e,r,n,null,t)}}var Ch=null;function Hy(e,r,t,n){if(Ch=null,e=Ly(n),e=_a(e),e!==null)if(r=Va(e),r===null)e=null;else if(t=r.tag,t===13){if(e=CE(r),e!==null)return e;e=null}else if(t===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;e=null}else r!==e&&(e=null);return Ch=e,null}function YE(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(q9()){case Ny:return 1;case kE:return 4;case dh:case Z9:return 16;case TE:return 536870912;default:return 16}default:return 16}}var _i=null,Wy=null,Mh=null;function VE(){if(Mh)return Mh;var e,r=Wy,t=r.length,n,i="value"in _i?_i.value:_i.textContent,a=i.length;for(e=0;e<t&&r[e]===i[e];e++);var o=t-e;for(n=1;n<=o&&r[t-n]===i[a-n];n++);return Mh=i.slice(e,1<n?1-n:void 0)}function Ah(e){var r=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&r===13&&(e=13)):e=r,e===10&&(e=13),32<=e||e===13?e:0}function Fh(){return!0}function _E(){return!1}function Sr(e){function r(t,n,i,a,o){this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(t=e[l],this[l]=t?t(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Fh:_E,this.isPropagationStopped=_E,this}return Kt(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=Fh)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=Fh)},persist:function(){},isPersistent:Fh}),r}var al={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xy=Sr(al),uu=Kt({},al,{view:0,detail:0}),uj=Sr(uu),jy,Uy,cu,bh=Kt({},uu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zy,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cu&&(cu&&e.type==="mousemove"?(jy=e.screenX-cu.screenX,Uy=e.screenY-cu.screenY):Uy=jy=0,cu=e),jy)},movementY:function(e){return"movementY"in e?e.movementY:Uy}}),$E=Sr(bh),cj=Kt({},bh,{dataTransfer:0}),fj=Sr(cj),hj=Kt({},uu,{relatedTarget:0}),qy=Sr(hj),vj=Kt({},al,{animationName:0,elapsedTime:0,pseudoElement:0}),dj=Sr(vj),pj=Kt({},al,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gj=Sr(pj),yj=Kt({},al,{data:0}),GE=Sr(yj),mj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xj={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sj(e){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(e):(e=wj[e])?!!r[e]:!1}function Zy(){return Sj}var Cj=Kt({},uu,{key:function(e){if(e.key){var r=mj[e.key]||e.key;if(r!=="Unidentified")return r}return e.type==="keypress"?(e=Ah(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zy,charCode:function(e){return e.type==="keypress"?Ah(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ah(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mj=Sr(Cj),Aj=Kt({},bh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),HE=Sr(Aj),Fj=Kt({},uu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zy}),bj=Sr(Fj),Ej=Kt({},al,{propertyName:0,elapsedTime:0,pseudoElement:0}),kj=Sr(Ej),Tj=Kt({},bh,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ij=Sr(Tj),Pj=[9,13,27,32],Qy=Hn&&"CompositionEvent"in window,fu=null;Hn&&"documentMode"in document&&(fu=document.documentMode);var Lj=Hn&&"TextEvent"in window&&!fu,WE=Hn&&(!Qy||fu&&8<fu&&11>=fu),XE=" ",jE=!1;function UE(e,r){switch(e){case"keyup":return Pj.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qE(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ol=!1;function Oj(e,r){switch(e){case"compositionend":return qE(r);case"keypress":return r.which!==32?null:(jE=!0,XE);case"textInput":return e=r.data,e===XE&&jE?null:e;default:return null}}function Dj(e,r){if(ol)return e==="compositionend"||!Qy&&UE(e,r)?(e=VE(),Mh=Wy=_i=null,ol=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return WE&&r.locale!=="ko"?null:r.data;default:return null}}var Bj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ZE(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r==="input"?!!Bj[e.type]:r==="textarea"}function QE(e,r,t,n){yE(n),r=Ph(r,"onChange"),0<r.length&&(t=new Xy("onChange","change",null,t,n),e.push({event:t,listeners:r}))}var hu=null,vu=null;function Rj(e){pk(e,0)}function Eh(e){var r=fl(e);if(aE(r))return e}function Nj(e,r){if(e==="change")return r}var KE=!1;if(Hn){var Ky;if(Hn){var Jy="oninput"in document;if(!Jy){var JE=document.createElement("div");JE.setAttribute("oninput","return;"),Jy=typeof JE.oninput=="function"}Ky=Jy}else Ky=!1;KE=Ky&&(!document.documentMode||9<document.documentMode)}function tk(){hu&&(hu.detachEvent("onpropertychange",ek),vu=hu=null)}function ek(e){if(e.propertyName==="value"&&Eh(vu)){var r=[];QE(r,vu,e,Ly(e)),SE(Rj,r)}}function zj(e,r,t){e==="focusin"?(tk(),hu=r,vu=t,hu.attachEvent("onpropertychange",ek)):e==="focusout"&&tk()}function Yj(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Eh(vu)}function Vj(e,r){if(e==="click")return Eh(r)}function _j(e,r){if(e==="input"||e==="change")return Eh(r)}function $j(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var Jr=typeof Object.is=="function"?Object.is:$j;function du(e,r){if(Jr(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(n=0;n<t.length;n++){var i=t[n];if(!cy.call(r,i)||!Jr(e[i],r[i]))return!1}return!0}function rk(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nk(e,r){var t=rk(e);e=0;for(var n;t;){if(t.nodeType===3){if(n=e+t.textContent.length,e<=r&&n>=r)return{node:t,offset:r-e};e=n}t:{for(;t;){if(t.nextSibling){t=t.nextSibling;break t}t=t.parentNode}t=void 0}t=rk(t)}}function ik(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?ik(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function ak(){for(var e=window,r=ch();r instanceof e.HTMLIFrameElement;){try{var t=typeof r.contentWindow.location.href=="string"}catch(n){t=!1}if(t)e=r.contentWindow;else break;r=ch(e.document)}return r}function tm(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function Gj(e){var r=ak(),t=e.focusedElem,n=e.selectionRange;if(r!==t&&t&&t.ownerDocument&&ik(t.ownerDocument.documentElement,t)){if(n!==null&&tm(t)){if(r=n.start,e=n.end,e===void 0&&(e=r),"selectionStart"in t)t.selectionStart=r,t.selectionEnd=Math.min(e,t.value.length);else if(e=(r=t.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var i=t.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=nk(t,a);var o=nk(t,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(r=r.createRange(),r.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(r),e.extend(o.node,o.offset)):(r.setEnd(o.node,o.offset),e.addRange(r)))}}for(r=[],e=t;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<r.length;t++)e=r[t],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Hj=Hn&&"documentMode"in document&&11>=document.documentMode,ll=null,em=null,pu=null,rm=!1;function ok(e,r,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;rm||ll==null||ll!==ch(n)||(n=ll,"selectionStart"in n&&tm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),pu&&du(pu,n)||(pu=n,n=Ph(em,"onSelect"),0<n.length&&(r=new Xy("onSelect","select",null,r,t),e.push({event:r,listeners:n}),r.target=ll)))}function kh(e,r){var t={};return t[e.toLowerCase()]=r.toLowerCase(),t["Webkit"+e]="webkit"+r,t["Moz"+e]="moz"+r,t}var sl={animationend:kh("Animation","AnimationEnd"),animationiteration:kh("Animation","AnimationIteration"),animationstart:kh("Animation","AnimationStart"),transitionend:kh("Transition","TransitionEnd")},nm={},lk={};Hn&&(lk=document.createElement("div").style,"AnimationEvent"in window||(delete sl.animationend.animation,delete sl.animationiteration.animation,delete sl.animationstart.animation),"TransitionEvent"in window||delete sl.transitionend.transition);function Th(e){if(nm[e])return nm[e];if(!sl[e])return e;var r=sl[e],t;for(t in r)if(r.hasOwnProperty(t)&&t in lk)return nm[e]=r[t];return e}var sk=Th("animationend"),uk=Th("animationiteration"),ck=Th("animationstart"),fk=Th("transitionend"),hk=new Map,vk="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function $i(e,r){hk.set(e,r),Ya(r,[e])}for(var im=0;im<vk.length;im++){var am=vk[im],Wj=am.toLowerCase(),Xj=am[0].toUpperCase()+am.slice(1);$i(Wj,"on"+Xj)}$i(sk,"onAnimationEnd"),$i(uk,"onAnimationIteration"),$i(ck,"onAnimationStart"),$i("dblclick","onDoubleClick"),$i("focusin","onFocus"),$i("focusout","onBlur"),$i(fk,"onTransitionEnd"),Ko("onMouseEnter",["mouseout","mouseover"]),Ko("onMouseLeave",["mouseout","mouseover"]),Ko("onPointerEnter",["pointerout","pointerover"]),Ko("onPointerLeave",["pointerout","pointerover"]),Ya("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ya("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ya("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ya("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jj=new Set("cancel close invalid load scroll toggle".split(" ").concat(gu));function dk(e,r,t){var n=e.type||"unknown-event";e.currentTarget=t,W9(n,r,void 0,e),e.currentTarget=null}function pk(e,r){r=(r&4)!==0;for(var t=0;t<e.length;t++){var n=e[t],i=n.event;n=n.listeners;t:{var a=void 0;if(r)for(var o=n.length-1;0<=o;o--){var l=n[o],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==a&&i.isPropagationStopped())break t;dk(i,l,u),a=s}else for(o=0;o<n.length;o++){if(l=n[o],s=l.instance,u=l.currentTarget,l=l.listener,s!==a&&i.isPropagationStopped())break t;dk(i,l,u),a=s}}}if(vh)throw e=Ry,vh=!1,Ry=null,e}function Ht(e,r){var t=r[vm];t===void 0&&(t=r[vm]=new Set);var n=e+"__bubble";t.has(n)||(gk(r,e,2,!1),t.add(n))}function om(e,r,t){var n=0;r&&(n|=4),gk(t,e,n,r)}var Ih="_reactListening"+Math.random().toString(36).slice(2);function yu(e){if(!e[Ih]){e[Ih]=!0,Qb.forEach(function(t){t!=="selectionchange"&&(jj.has(t)||om(t,!1,e),om(t,!0,e))});var r=e.nodeType===9?e:e.ownerDocument;r===null||r[Ih]||(r[Ih]=!0,om("selectionchange",!1,r))}}function gk(e,r,t,n){switch(YE(r)){case 1:var i=lj;break;case 4:i=sj;break;default:i=Gy}t=i.bind(null,r,t,e),i=void 0,!By||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(r,t,{capture:!0,passive:i}):e.addEventListener(r,t,!0):i!==void 0?e.addEventListener(r,t,{passive:i}):e.addEventListener(r,t,!1)}function lm(e,r,t,n,i){var a=n;if(!(r&1)&&!(r&2)&&n!==null)t:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var s=o.tag;if((s===3||s===4)&&(s=o.stateNode.containerInfo,s===i||s.nodeType===8&&s.parentNode===i))return;o=o.return}for(;l!==null;){if(o=_a(l),o===null)return;if(s=o.tag,s===5||s===6){n=a=o;continue t}l=l.parentNode}}n=n.return}SE(function(){var u=a,c=Ly(t),f=[];t:{var h=hk.get(e);if(h!==void 0){var v=Xy,d=e;switch(e){case"keypress":if(Ah(t)===0)break t;case"keydown":case"keyup":v=Mj;break;case"focusin":d="focus",v=qy;break;case"focusout":d="blur",v=qy;break;case"beforeblur":case"afterblur":v=qy;break;case"click":if(t.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=$E;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=fj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=bj;break;case sk:case uk:case ck:v=dj;break;case fk:v=kj;break;case"scroll":v=uj;break;case"wheel":v=Ij;break;case"copy":case"cut":case"paste":v=gj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=HE}var p=(r&4)!==0,y=!p&&e==="scroll",g=p?h!==null?h+"Capture":null:h;p=[];for(var m=u,x;m!==null;){x=m;var w=x.stateNode;if(x.tag===5&&w!==null&&(x=w,g!==null&&(w=Js(m,g),w!=null&&p.push(mu(m,w,x)))),y)break;m=m.return}0<p.length&&(h=new v(h,d,null,t,c),f.push({event:h,listeners:p}))}}if(!(r&7)){t:{if(h=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",h&&t!==Py&&(d=t.relatedTarget||t.fromElement)&&(_a(d)||d[Xn]))break t;if((v||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,v?(d=t.relatedTarget||t.toElement,v=u,d=d?_a(d):null,d!==null&&(y=Va(d),d!==y||d.tag!==5&&d.tag!==6)&&(d=null)):(v=null,d=u),v!==d)){if(p=$E,w="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(p=HE,w="onPointerLeave",g="onPointerEnter",m="pointer"),y=v==null?h:fl(v),x=d==null?h:fl(d),h=new p(w,m+"leave",v,t,c),h.target=y,h.relatedTarget=x,w=null,_a(c)===u&&(p=new p(g,m+"enter",d,t,c),p.target=x,p.relatedTarget=y,w=p),y=w,v&&d)e:{for(p=v,g=d,m=0,x=p;x;x=ul(x))m++;for(x=0,w=g;w;w=ul(w))x++;for(;0<m-x;)p=ul(p),m--;for(;0<x-m;)g=ul(g),x--;for(;m--;){if(p===g||g!==null&&p===g.alternate)break e;p=ul(p),g=ul(g)}p=null}else p=null;v!==null&&yk(f,h,v,p,!1),d!==null&&y!==null&&yk(f,y,d,p,!0)}}t:{if(h=u?fl(u):window,v=h.nodeName&&h.nodeName.toLowerCase(),v==="select"||v==="input"&&h.type==="file")var C=Nj;else if(ZE(h))if(KE)C=_j;else{C=Yj;var M=zj}else(v=h.nodeName)&&v.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=Vj);if(C&&(C=C(e,u))){QE(f,C,t,c);break t}M&&M(e,h,u),e==="focusout"&&(M=h._wrapperState)&&M.controlled&&h.type==="number"&&by(h,"number",h.value)}switch(M=u?fl(u):window,e){case"focusin":(ZE(M)||M.contentEditable==="true")&&(ll=M,em=u,pu=null);break;case"focusout":pu=em=ll=null;break;case"mousedown":rm=!0;break;case"contextmenu":case"mouseup":case"dragend":rm=!1,ok(f,t,c);break;case"selectionchange":if(Hj)break;case"keydown":case"keyup":ok(f,t,c)}var A;if(Qy)t:{switch(e){case"compositionstart":var b="onCompositionStart";break t;case"compositionend":b="onCompositionEnd";break t;case"compositionupdate":b="onCompositionUpdate";break t}b=void 0}else ol?UE(e,t)&&(b="onCompositionEnd"):e==="keydown"&&t.keyCode===229&&(b="onCompositionStart");b&&(WE&&t.locale!=="ko"&&(ol||b!=="onCompositionStart"?b==="onCompositionEnd"&&ol&&(A=VE()):(_i=c,Wy="value"in _i?_i.value:_i.textContent,ol=!0)),M=Ph(u,b),0<M.length&&(b=new GE(b,e,null,t,c),f.push({event:b,listeners:M}),A?b.data=A:(A=qE(t),A!==null&&(b.data=A)))),(A=Lj?Oj(e,t):Dj(e,t))&&(u=Ph(u,"onBeforeInput"),0<u.length&&(c=new GE("onBeforeInput","beforeinput",null,t,c),f.push({event:c,listeners:u}),c.data=A))}pk(f,r)})}function mu(e,r,t){return{instance:e,listener:r,currentTarget:t}}function Ph(e,r){for(var t=r+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Js(e,t),a!=null&&n.unshift(mu(e,a,i)),a=Js(e,r),a!=null&&n.push(mu(e,a,i))),e=e.return}return n}function ul(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function yk(e,r,t,n,i){for(var a=r._reactName,o=[];t!==null&&t!==n;){var l=t,s=l.alternate,u=l.stateNode;if(s!==null&&s===n)break;l.tag===5&&u!==null&&(l=u,i?(s=Js(t,a),s!=null&&o.unshift(mu(t,s,l))):i||(s=Js(t,a),s!=null&&o.push(mu(t,s,l)))),t=t.return}o.length!==0&&e.push({event:r,listeners:o})}var Uj=/\r\n?/g,qj=/\u0000|\uFFFD/g;function mk(e){return(typeof e=="string"?e:""+e).replace(Uj,`
|
|
128
128
|
`).replace(qj,"")}function Lh(e,r,t){if(r=mk(r),mk(e)!==r&&t)throw Error(U(425))}function Oh(){}var sm=null,um=null;function cm(e,r){return e==="textarea"||e==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var fm=typeof setTimeout=="function"?setTimeout:void 0,Zj=typeof clearTimeout=="function"?clearTimeout:void 0,xk=typeof Promise=="function"?Promise:void 0,Qj=typeof queueMicrotask=="function"?queueMicrotask:typeof xk!="undefined"?function(e){return xk.resolve(null).then(e).catch(Kj)}:fm;function Kj(e){setTimeout(function(){throw e})}function hm(e,r){var t=r,n=0;do{var i=t.nextSibling;if(e.removeChild(t),i&&i.nodeType===8)if(t=i.data,t==="/$"){if(n===0){e.removeChild(i),su(r);return}n--}else t!=="$"&&t!=="$?"&&t!=="$!"||n++;t=i}while(t);su(r)}function Gi(e){for(;e!=null;e=e.nextSibling){var r=e.nodeType;if(r===1||r===3)break;if(r===8){if(r=e.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return e}function wk(e){e=e.previousSibling;for(var r=0;e;){if(e.nodeType===8){var t=e.data;if(t==="$"||t==="$!"||t==="$?"){if(r===0)return e;r--}else t==="/$"&&r++}e=e.previousSibling}return null}var cl=Math.random().toString(36).slice(2),Mn="__reactFiber$"+cl,xu="__reactProps$"+cl,Xn="__reactContainer$"+cl,vm="__reactEvents$"+cl,Jj="__reactListeners$"+cl,tU="__reactHandles$"+cl;function _a(e){var r=e[Mn];if(r)return r;for(var t=e.parentNode;t;){if(r=t[Xn]||t[Mn]){if(t=r.alternate,r.child!==null||t!==null&&t.child!==null)for(e=wk(e);e!==null;){if(t=e[Mn])return t;e=wk(e)}return r}e=t,t=e.parentNode}return null}function wu(e){return e=e[Mn]||e[Xn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Dh(e){return e[xu]||null}var dm=[],hl=-1;function Hi(e){return{current:e}}function Wt(e){0>hl||(e.current=dm[hl],dm[hl]=null,hl--)}function $t(e,r){hl++,dm[hl]=e.current,e.current=r}var Wi={},De=Hi(Wi),nr=Hi(!1),$a=Wi;function vl(e,r){var t=e.type.contextTypes;if(!t)return Wi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===r)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in t)i[a]=r[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=i),i}function ir(e){return e=e.childContextTypes,e!=null}function Bh(){Wt(nr),Wt(De)}function Sk(e,r,t){if(De.current!==Wi)throw Error(U(168));$t(De,r),$t(nr,t)}function Ck(e,r,t){var n=e.stateNode;if(r=r.childContextTypes,typeof n.getChildContext!="function")return t;n=n.getChildContext();for(var i in n)if(!(i in r))throw Error(U(108,z9(e)||"Unknown",i));return Kt({},t,n)}function Rh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wi,$a=De.current,$t(De,e),$t(nr,nr.current),!0}function Mk(e,r,t){var n=e.stateNode;if(!n)throw Error(U(169));t?(e=Ck(e,r,$a),n.__reactInternalMemoizedMergedChildContext=e,Wt(nr),Wt(De),$t(De,e)):Wt(nr),$t(nr,t)}var jn=null,Nh=!1,pm=!1;function Ak(e){jn===null?jn=[e]:jn.push(e)}function eU(e){Nh=!0,Ak(e)}function Xi(){if(!pm&&jn!==null){pm=!0;var e=0,r=Rt;try{var t=jn;for(Rt=1;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}jn=null,Nh=!1}catch(i){throw jn!==null&&(jn=jn.slice(e+1)),bE(Ny,Xi),i}finally{Rt=r,pm=!1}}return null}var dl=[],pl=0,zh=null,Yh=0,Br=[],Rr=0,Ga=null,Un=1,qn="";function Ha(e,r){dl[pl++]=Yh,dl[pl++]=zh,zh=e,Yh=r}function Fk(e,r,t){Br[Rr++]=Un,Br[Rr++]=qn,Br[Rr++]=Ga,Ga=e;var n=Un;e=qn;var i=32-Kr(n)-1;n&=~(1<<i),t+=1;var a=32-Kr(r)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Un=1<<32-Kr(r)+i|t<<i|n,qn=a+e}else Un=1<<a|t<<i|n,qn=e}function gm(e){e.return!==null&&(Ha(e,1),Fk(e,1,0))}function ym(e){for(;e===zh;)zh=dl[--pl],dl[pl]=null,Yh=dl[--pl],dl[pl]=null;for(;e===Ga;)Ga=Br[--Rr],Br[Rr]=null,qn=Br[--Rr],Br[Rr]=null,Un=Br[--Rr],Br[Rr]=null}var Cr=null,Mr=null,qt=!1,tn=null;function bk(e,r){var t=Vr(5,null,null,0);t.elementType="DELETED",t.stateNode=r,t.return=e,r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)}function Ek(e,r){switch(e.tag){case 5:var t=e.type;return r=r.nodeType!==1||t.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(e.stateNode=r,Cr=e,Mr=Gi(r.firstChild),!0):!1;case 6:return r=e.pendingProps===""||r.nodeType!==3?null:r,r!==null?(e.stateNode=r,Cr=e,Mr=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(t=Ga!==null?{id:Un,overflow:qn}:null,e.memoizedState={dehydrated:r,treeContext:t,retryLane:1073741824},t=Vr(18,null,null,0),t.stateNode=r,t.return=e,e.child=t,Cr=e,Mr=null,!0):!1;default:return!1}}function mm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xm(e){if(qt){var r=Mr;if(r){var t=r;if(!Ek(e,r)){if(mm(e))throw Error(U(418));r=Gi(t.nextSibling);var n=Cr;r&&Ek(e,r)?bk(n,t):(e.flags=e.flags&-4097|2,qt=!1,Cr=e)}}else{if(mm(e))throw Error(U(418));e.flags=e.flags&-4097|2,qt=!1,Cr=e}}}function kk(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Cr=e}function Vh(e){if(e!==Cr)return!1;if(!qt)return kk(e),qt=!0,!1;var r;if((r=e.tag!==3)&&!(r=e.tag!==5)&&(r=e.type,r=r!=="head"&&r!=="body"&&!cm(e.type,e.memoizedProps)),r&&(r=Mr)){if(mm(e))throw Tk(),Error(U(418));for(;r;)bk(e,r),r=Gi(r.nextSibling)}if(kk(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));t:{for(e=e.nextSibling,r=0;e;){if(e.nodeType===8){var t=e.data;if(t==="/$"){if(r===0){Mr=Gi(e.nextSibling);break t}r--}else t!=="$"&&t!=="$!"&&t!=="$?"||r++}e=e.nextSibling}Mr=null}}else Mr=Cr?Gi(e.stateNode.nextSibling):null;return!0}function Tk(){for(var e=Mr;e;)e=Gi(e.nextSibling)}function gl(){Mr=Cr=null,qt=!1}function wm(e){tn===null?tn=[e]:tn.push(e)}var rU=Wn.ReactCurrentBatchConfig;function en(e,r){if(e&&e.defaultProps){r=Kt({},r),e=e.defaultProps;for(var t in e)r[t]===void 0&&(r[t]=e[t]);return r}return r}var _h=Hi(null),$h=null,yl=null,Sm=null;function Cm(){Sm=yl=$h=null}function Mm(e){var r=_h.current;Wt(_h),e._currentValue=r}function Am(e,r,t){for(;e!==null;){var n=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,n!==null&&(n.childLanes|=r)):n!==null&&(n.childLanes&r)!==r&&(n.childLanes|=r),e===t)break;e=e.return}}function ml(e,r){$h=e,Sm=yl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&r&&(ar=!0),e.firstContext=null)}function Nr(e){var r=e._currentValue;if(Sm!==e)if(e={context:e,memoizedValue:r,next:null},yl===null){if($h===null)throw Error(U(308));yl=e,$h.dependencies={lanes:0,firstContext:e}}else yl=yl.next=e;return r}var Wa=null;function Fm(e){Wa===null?Wa=[e]:Wa.push(e)}function Ik(e,r,t,n){var i=r.interleaved;return i===null?(t.next=t,Fm(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zn(e,n)}function Zn(e,r){e.lanes|=r;var t=e.alternate;for(t!==null&&(t.lanes|=r),t=e,e=e.return;e!==null;)e.childLanes|=r,t=e.alternate,t!==null&&(t.childLanes|=r),t=e,e=e.return;return t.tag===3?t.stateNode:null}var ji=!1;function bm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pk(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qn(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Ui(e,r,t){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Pt&2){var i=n.pending;return i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r,Zn(e,t)}return i=n.interleaved,i===null?(r.next=r,Fm(n)):(r.next=i.next,i.next=r),n.interleaved=r,Zn(e,t)}function Gh(e,r,t){if(r=r.updateQueue,r!==null&&(r=r.shared,(t&4194240)!==0)){var n=r.lanes;n&=e.pendingLanes,t|=n,r.lanes=t,Vy(e,t)}}function Lk(e,r){var t=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,t===n)){var i=null,a=null;if(t=t.firstBaseUpdate,t!==null){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};a===null?i=a=o:a=a.next=o,t=t.next}while(t!==null);a===null?i=a=r:a=a.next=r}else i=a=r;t={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=r:e.next=r,t.lastBaseUpdate=r}function Hh(e,r,t,n){var i=e.updateQueue;ji=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var s=l,u=s.next;s.next=null,o===null?a=u:o.next=u,o=s;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(a!==null){var f=i.baseState;o=0,c=u=s=null,l=a;do{var h=l.lane,v=l.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:v,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});t:{var d=e,p=l;switch(h=r,v=t,p.tag){case 1:if(d=p.payload,typeof d=="function"){f=d.call(v,f,h);break t}f=d;break t;case 3:d.flags=d.flags&-65537|128;case 0:if(d=p.payload,h=typeof d=="function"?d.call(v,f,h):d,h==null)break t;f=Kt({},f,h);break t;case 2:ji=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else v={eventTime:v,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=v,s=f):c=c.next=v,o|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(s=f),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,r=i.shared.interleaved,r!==null){i=r;do o|=i.lane,i=i.next;while(i!==r)}else a===null&&(i.shared.lanes=0);Ua|=o,e.lanes=o,e.memoizedState=f}}function Ok(e,r,t){if(e=r.effects,r.effects=null,e!==null)for(r=0;r<e.length;r++){var n=e[r],i=n.callback;if(i!==null){if(n.callback=null,n=t,typeof i!="function")throw Error(U(191,i));i.call(n)}}}var Dk=new Zb.Component().refs;function Em(e,r,t,n){r=e.memoizedState,t=t(n,r),t=t==null?r:Kt({},r,t),e.memoizedState=t,e.lanes===0&&(e.updateQueue.baseState=t)}var Wh={isMounted:function(e){return(e=e._reactInternals)?Va(e)===e:!1},enqueueSetState:function(e,r,t){e=e._reactInternals;var n=Ge(),i=Ki(e),a=Qn(n,i);a.payload=r,t!=null&&(a.callback=t),r=Ui(e,a,i),r!==null&&(an(r,e,i,n),Gh(r,e,i))},enqueueReplaceState:function(e,r,t){e=e._reactInternals;var n=Ge(),i=Ki(e),a=Qn(n,i);a.tag=1,a.payload=r,t!=null&&(a.callback=t),r=Ui(e,a,i),r!==null&&(an(r,e,i,n),Gh(r,e,i))},enqueueForceUpdate:function(e,r){e=e._reactInternals;var t=Ge(),n=Ki(e),i=Qn(t,n);i.tag=2,r!=null&&(i.callback=r),r=Ui(e,i,n),r!==null&&(an(r,e,n,t),Gh(r,e,n))}};function Bk(e,r,t,n,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):r.prototype&&r.prototype.isPureReactComponent?!du(t,n)||!du(i,a):!0}function Rk(e,r,t){var n=!1,i=Wi,a=r.contextType;return typeof a=="object"&&a!==null?a=Nr(a):(i=ir(r)?$a:De.current,n=r.contextTypes,a=(n=n!=null)?vl(e,i):Wi),r=new r(t,a),e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Wh,e.stateNode=r,r._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),r}function Nk(e,r,t,n){e=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(t,n),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(t,n),r.state!==e&&Wh.enqueueReplaceState(r,r.state,null)}function km(e,r,t,n){var i=e.stateNode;i.props=t,i.state=e.memoizedState,i.refs=Dk,bm(e);var a=r.contextType;typeof a=="object"&&a!==null?i.context=Nr(a):(a=ir(r)?$a:De.current,i.context=vl(e,a)),i.state=e.memoizedState,a=r.getDerivedStateFromProps,typeof a=="function"&&(Em(e,r,a,t),i.state=e.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(r=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),r!==i.state&&Wh.enqueueReplaceState(i,i.state,null),Hh(e,t,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Su(e,r,t){if(e=t.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(t._owner){if(t=t._owner,t){if(t.tag!==1)throw Error(U(309));var n=t.stateNode}if(!n)throw Error(U(147,e));var i=n,a=""+e;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===a?r.ref:(r=function(o){var l=i.refs;l===Dk&&(l=i.refs={}),o===null?delete l[a]:l[a]=o},r._stringRef=a,r)}if(typeof e!="string")throw Error(U(284));if(!t._owner)throw Error(U(290,e))}return e}function Xh(e,r){throw e=Object.prototype.toString.call(r),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e))}function zk(e){var r=e._init;return r(e._payload)}function Yk(e){function r(g,m){if(e){var x=g.deletions;x===null?(g.deletions=[m],g.flags|=16):x.push(m)}}function t(g,m){if(!e)return null;for(;m!==null;)r(g,m),m=m.sibling;return null}function n(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function i(g,m){return g=ta(g,m),g.index=0,g.sibling=null,g}function a(g,m,x){return g.index=x,e?(x=g.alternate,x!==null?(x=x.index,x<m?(g.flags|=2,m):x):(g.flags|=2,m)):(g.flags|=1048576,m)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,m,x,w){return m===null||m.tag!==6?(m=f0(x,g.mode,w),m.return=g,m):(m=i(m,x),m.return=g,m)}function s(g,m,x,w){var C=x.type;return C===tl?c(g,m,x.props.children,w,x.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Bi&&zk(C)===m.type)?(w=i(m,x.props),w.ref=Su(g,m,x),w.return=g,w):(w=fv(x.type,x.key,x.props,null,g.mode,w),w.ref=Su(g,m,x),w.return=g,w)}function u(g,m,x,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==x.containerInfo||m.stateNode.implementation!==x.implementation?(m=h0(x,g.mode,w),m.return=g,m):(m=i(m,x.children||[]),m.return=g,m)}function c(g,m,x,w,C){return m===null||m.tag!==7?(m=Ka(x,g.mode,w,C),m.return=g,m):(m=i(m,x),m.return=g,m)}function f(g,m,x){if(typeof m=="string"&&m!==""||typeof m=="number")return m=f0(""+m,g.mode,x),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case sh:return x=fv(m.type,m.key,m.props,null,g.mode,x),x.ref=Su(g,null,m),x.return=g,x;case Jo:return m=h0(m,g.mode,x),m.return=g,m;case Bi:var w=m._init;return f(g,w(m._payload),x)}if(Zs(m)||Us(m))return m=Ka(m,g.mode,x,null),m.return=g,m;Xh(g,m)}return null}function h(g,m,x,w){var C=m!==null?m.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:l(g,m,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case sh:return x.key===C?s(g,m,x,w):null;case Jo:return x.key===C?u(g,m,x,w):null;case Bi:return C=x._init,h(g,m,C(x._payload),w)}if(Zs(x)||Us(x))return C!==null?null:c(g,m,x,w,null);Xh(g,x)}return null}function v(g,m,x,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return g=g.get(x)||null,l(m,g,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case sh:return g=g.get(w.key===null?x:w.key)||null,s(m,g,w,C);case Jo:return g=g.get(w.key===null?x:w.key)||null,u(m,g,w,C);case Bi:var M=w._init;return v(g,m,x,M(w._payload),C)}if(Zs(w)||Us(w))return g=g.get(x)||null,c(m,g,w,C,null);Xh(m,w)}return null}function d(g,m,x,w){for(var C=null,M=null,A=m,b=m=0,T=null;A!==null&&b<x.length;b++){A.index>b?(T=A,A=null):T=A.sibling;var k=h(g,A,x[b],w);if(k===null){A===null&&(A=T);break}e&&A&&k.alternate===null&&r(g,A),m=a(k,m,b),M===null?C=k:M.sibling=k,M=k,A=T}if(b===x.length)return t(g,A),qt&&Ha(g,b),C;if(A===null){for(;b<x.length;b++)A=f(g,x[b],w),A!==null&&(m=a(A,m,b),M===null?C=A:M.sibling=A,M=A);return qt&&Ha(g,b),C}for(A=n(g,A);b<x.length;b++)T=v(A,g,b,x[b],w),T!==null&&(e&&T.alternate!==null&&A.delete(T.key===null?b:T.key),m=a(T,m,b),M===null?C=T:M.sibling=T,M=T);return e&&A.forEach(function(P){return r(g,P)}),qt&&Ha(g,b),C}function p(g,m,x,w){var C=Us(x);if(typeof C!="function")throw Error(U(150));if(x=C.call(x),x==null)throw Error(U(151));for(var M=C=null,A=m,b=m=0,T=null,k=x.next();A!==null&&!k.done;b++,k=x.next()){A.index>b?(T=A,A=null):T=A.sibling;var P=h(g,A,k.value,w);if(P===null){A===null&&(A=T);break}e&&A&&P.alternate===null&&r(g,A),m=a(P,m,b),M===null?C=P:M.sibling=P,M=P,A=T}if(k.done)return t(g,A),qt&&Ha(g,b),C;if(A===null){for(;!k.done;b++,k=x.next())k=f(g,k.value,w),k!==null&&(m=a(k,m,b),M===null?C=k:M.sibling=k,M=k);return qt&&Ha(g,b),C}for(A=n(g,A);!k.done;b++,k=x.next())k=v(A,g,b,k.value,w),k!==null&&(e&&k.alternate!==null&&A.delete(k.key===null?b:k.key),m=a(k,m,b),M===null?C=k:M.sibling=k,M=k);return e&&A.forEach(function(O){return r(g,O)}),qt&&Ha(g,b),C}function y(g,m,x,w){if(typeof x=="object"&&x!==null&&x.type===tl&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case sh:t:{for(var C=x.key,M=m;M!==null;){if(M.key===C){if(C=x.type,C===tl){if(M.tag===7){t(g,M.sibling),m=i(M,x.props.children),m.return=g,g=m;break t}}else if(M.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Bi&&zk(C)===M.type){t(g,M.sibling),m=i(M,x.props),m.ref=Su(g,M,x),m.return=g,g=m;break t}t(g,M);break}else r(g,M);M=M.sibling}x.type===tl?(m=Ka(x.props.children,g.mode,w,x.key),m.return=g,g=m):(w=fv(x.type,x.key,x.props,null,g.mode,w),w.ref=Su(g,m,x),w.return=g,g=w)}return o(g);case Jo:t:{for(M=x.key;m!==null;){if(m.key===M)if(m.tag===4&&m.stateNode.containerInfo===x.containerInfo&&m.stateNode.implementation===x.implementation){t(g,m.sibling),m=i(m,x.children||[]),m.return=g,g=m;break t}else{t(g,m);break}else r(g,m);m=m.sibling}m=h0(x,g.mode,w),m.return=g,g=m}return o(g);case Bi:return M=x._init,y(g,m,M(x._payload),w)}if(Zs(x))return d(g,m,x,w);if(Us(x))return p(g,m,x,w);Xh(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,m!==null&&m.tag===6?(t(g,m.sibling),m=i(m,x),m.return=g,g=m):(t(g,m),m=f0(x,g.mode,w),m.return=g,g=m),o(g)):t(g,m)}return y}var xl=Yk(!0),Vk=Yk(!1),Cu={},An=Hi(Cu),Mu=Hi(Cu),Au=Hi(Cu);function Xa(e){if(e===Cu)throw Error(U(174));return e}function Tm(e,r){switch($t(Au,r),$t(Mu,e),$t(An,Cu),e=r.nodeType,e){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:ky(null,"");break;default:e=e===8?r.parentNode:r,r=e.namespaceURI||null,e=e.tagName,r=ky(r,e)}Wt(An),$t(An,r)}function wl(){Wt(An),Wt(Mu),Wt(Au)}function _k(e){Xa(Au.current);var r=Xa(An.current),t=ky(r,e.type);r!==t&&($t(Mu,e),$t(An,t))}function Im(e){Mu.current===e&&(Wt(An),Wt(Mu))}var Jt=Hi(0);function jh(e){for(var r=e;r!==null;){if(r.tag===13){var t=r.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if(r.flags&128)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Pm=[];function Lm(){for(var e=0;e<Pm.length;e++)Pm[e]._workInProgressVersionPrimary=null;Pm.length=0}var Uh=Wn.ReactCurrentDispatcher,Om=Wn.ReactCurrentBatchConfig,ja=0,te=null,he=null,we=null,qh=!1,Fu=!1,bu=0,nU=0;function Be(){throw Error(U(321))}function Dm(e,r){if(r===null)return!1;for(var t=0;t<r.length&&t<e.length;t++)if(!Jr(e[t],r[t]))return!1;return!0}function Bm(e,r,t,n,i,a){if(ja=a,te=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Uh.current=e===null||e.memoizedState===null?lU:sU,e=t(n,i),Fu){a=0;do{if(Fu=!1,bu=0,25<=a)throw Error(U(301));a+=1,we=he=null,r.updateQueue=null,Uh.current=uU,e=t(n,i)}while(Fu)}if(Uh.current=Kh,r=he!==null&&he.next!==null,ja=0,we=he=te=null,qh=!1,r)throw Error(U(300));return e}function Rm(){var e=bu!==0;return bu=0,e}function Fn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return we===null?te.memoizedState=we=e:we=we.next=e,we}function zr(){if(he===null){var e=te.alternate;e=e!==null?e.memoizedState:null}else e=he.next;var r=we===null?te.memoizedState:we.next;if(r!==null)we=r,he=e;else{if(e===null)throw Error(U(310));he=e,e={memoizedState:he.memoizedState,baseState:he.baseState,baseQueue:he.baseQueue,queue:he.queue,next:null},we===null?te.memoizedState=we=e:we=we.next=e}return we}function Eu(e,r){return typeof r=="function"?r(e):r}function Nm(e){var r=zr(),t=r.queue;if(t===null)throw Error(U(311));t.lastRenderedReducer=e;var n=he,i=n.baseQueue,a=t.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,t.pending=null}if(i!==null){a=i.next,n=n.baseState;var l=o=null,s=null,u=a;do{var c=u.lane;if((ja&c)===c)s!==null&&(s=s.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};s===null?(l=s=f,o=n):s=s.next=f,te.lanes|=c,Ua|=c}u=u.next}while(u!==null&&u!==a);s===null?o=n:s.next=l,Jr(n,r.memoizedState)||(ar=!0),r.memoizedState=n,r.baseState=o,r.baseQueue=s,t.lastRenderedState=n}if(e=t.interleaved,e!==null){i=e;do a=i.lane,te.lanes|=a,Ua|=a,i=i.next;while(i!==e)}else i===null&&(t.lanes=0);return[r.memoizedState,t.dispatch]}function zm(e){var r=zr(),t=r.queue;if(t===null)throw Error(U(311));t.lastRenderedReducer=e;var n=t.dispatch,i=t.pending,a=r.memoizedState;if(i!==null){t.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Jr(a,r.memoizedState)||(ar=!0),r.memoizedState=a,r.baseQueue===null&&(r.baseState=a),t.lastRenderedState=a}return[a,n]}function $k(){}function Gk(e,r){var t=te,n=zr(),i=r(),a=!Jr(n.memoizedState,i);if(a&&(n.memoizedState=i,ar=!0),n=n.queue,Ym(Xk.bind(null,t,n,e),[e]),n.getSnapshot!==r||a||we!==null&&we.memoizedState.tag&1){if(t.flags|=2048,ku(9,Wk.bind(null,t,n,i,r),void 0,null),Se===null)throw Error(U(349));ja&30||Hk(t,r,i)}return i}function Hk(e,r,t){e.flags|=16384,e={getSnapshot:r,value:t},r=te.updateQueue,r===null?(r={lastEffect:null,stores:null},te.updateQueue=r,r.stores=[e]):(t=r.stores,t===null?r.stores=[e]:t.push(e))}function Wk(e,r,t,n){r.value=t,r.getSnapshot=n,jk(r)&&Uk(e)}function Xk(e,r,t){return t(function(){jk(r)&&Uk(e)})}function jk(e){var r=e.getSnapshot;e=e.value;try{var t=r();return!Jr(e,t)}catch(n){return!0}}function Uk(e){var r=Zn(e,1);r!==null&&an(r,e,1,-1)}function qk(e){var r=Fn();return typeof e=="function"&&(e=e()),r.memoizedState=r.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Eu,lastRenderedState:e},r.queue=e,e=e.dispatch=oU.bind(null,te,e),[r.memoizedState,e]}function ku(e,r,t,n){return e={tag:e,create:r,destroy:t,deps:n,next:null},r=te.updateQueue,r===null?(r={lastEffect:null,stores:null},te.updateQueue=r,r.lastEffect=e.next=e):(t=r.lastEffect,t===null?r.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,r.lastEffect=e)),e}function Zk(){return zr().memoizedState}function Zh(e,r,t,n){var i=Fn();te.flags|=e,i.memoizedState=ku(1|r,t,void 0,n===void 0?null:n)}function Qh(e,r,t,n){var i=zr();n=n===void 0?null:n;var a=void 0;if(he!==null){var o=he.memoizedState;if(a=o.destroy,n!==null&&Dm(n,o.deps)){i.memoizedState=ku(r,t,a,n);return}}te.flags|=e,i.memoizedState=ku(1|r,t,a,n)}function Qk(e,r){return Zh(8390656,8,e,r)}function Ym(e,r){return Qh(2048,8,e,r)}function Kk(e,r){return Qh(4,2,e,r)}function Jk(e,r){return Qh(4,4,e,r)}function t2(e,r){if(typeof r=="function")return e=e(),r(e),function(){r(null)};if(r!=null)return e=e(),r.current=e,function(){r.current=null}}function e2(e,r,t){return t=t!=null?t.concat([e]):null,Qh(4,4,t2.bind(null,r,e),t)}function Vm(){}function r2(e,r){var t=zr();r=r===void 0?null:r;var n=t.memoizedState;return n!==null&&r!==null&&Dm(r,n[1])?n[0]:(t.memoizedState=[e,r],e)}function n2(e,r){var t=zr();r=r===void 0?null:r;var n=t.memoizedState;return n!==null&&r!==null&&Dm(r,n[1])?n[0]:(e=e(),t.memoizedState=[e,r],e)}function i2(e,r,t){return ja&21?(Jr(t,r)||(t=IE(),te.lanes|=t,Ua|=t,e.baseState=!0),r):(e.baseState&&(e.baseState=!1,ar=!0),e.memoizedState=t)}function iU(e,r){var t=Rt;Rt=t!==0&&4>t?t:4,e(!0);var n=Om.transition;Om.transition={};try{e(!1),r()}finally{Rt=t,Om.transition=n}}function a2(){return zr().memoizedState}function aU(e,r,t){var n=Ki(e);if(t={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null},o2(e))l2(r,t);else if(t=Ik(e,r,t,n),t!==null){var i=Ge();an(t,e,n,i),s2(t,r,n)}}function oU(e,r,t){var n=Ki(e),i={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null};if(o2(e))l2(r,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=r.lastRenderedReducer,a!==null))try{var o=r.lastRenderedState,l=a(o,t);if(i.hasEagerState=!0,i.eagerState=l,Jr(l,o)){var s=r.interleaved;s===null?(i.next=i,Fm(r)):(i.next=s.next,s.next=i),r.interleaved=i;return}}catch(u){}finally{}t=Ik(e,r,i,n),t!==null&&(i=Ge(),an(t,e,n,i),s2(t,r,n))}}function o2(e){var r=e.alternate;return e===te||r!==null&&r===te}function l2(e,r){Fu=qh=!0;var t=e.pending;t===null?r.next=r:(r.next=t.next,t.next=r),e.pending=r}function s2(e,r,t){if(t&4194240){var n=r.lanes;n&=e.pendingLanes,t|=n,r.lanes=t,Vy(e,t)}}var Kh={readContext:Nr,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useInsertionEffect:Be,useLayoutEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useMutableSource:Be,useSyncExternalStore:Be,useId:Be,unstable_isNewReconciler:!1},lU={readContext:Nr,useCallback:function(e,r){return Fn().memoizedState=[e,r===void 0?null:r],e},useContext:Nr,useEffect:Qk,useImperativeHandle:function(e,r,t){return t=t!=null?t.concat([e]):null,Zh(4194308,4,t2.bind(null,r,e),t)},useLayoutEffect:function(e,r){return Zh(4194308,4,e,r)},useInsertionEffect:function(e,r){return Zh(4,2,e,r)},useMemo:function(e,r){var t=Fn();return r=r===void 0?null:r,e=e(),t.memoizedState=[e,r],e},useReducer:function(e,r,t){var n=Fn();return r=t!==void 0?t(r):r,n.memoizedState=n.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},n.queue=e,e=e.dispatch=aU.bind(null,te,e),[n.memoizedState,e]},useRef:function(e){var r=Fn();return e={current:e},r.memoizedState=e},useState:qk,useDebugValue:Vm,useDeferredValue:function(e){return Fn().memoizedState=e},useTransition:function(){var e=qk(!1),r=e[0];return e=iU.bind(null,e[1]),Fn().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,t){var n=te,i=Fn();if(qt){if(t===void 0)throw Error(U(407));t=t()}else{if(t=r(),Se===null)throw Error(U(349));ja&30||Hk(n,r,t)}i.memoizedState=t;var a={value:t,getSnapshot:r};return i.queue=a,Qk(Xk.bind(null,n,a,e),[e]),n.flags|=2048,ku(9,Wk.bind(null,n,a,t,r),void 0,null),t},useId:function(){var e=Fn(),r=Se.identifierPrefix;if(qt){var t=qn,n=Un;t=(n&~(1<<32-Kr(n)-1)).toString(32)+t,r=":"+r+"R"+t,t=bu++,0<t&&(r+="H"+t.toString(32)),r+=":"}else t=nU++,r=":"+r+"r"+t.toString(32)+":";return e.memoizedState=r},unstable_isNewReconciler:!1},sU={readContext:Nr,useCallback:r2,useContext:Nr,useEffect:Ym,useImperativeHandle:e2,useInsertionEffect:Kk,useLayoutEffect:Jk,useMemo:n2,useReducer:Nm,useRef:Zk,useState:function(){return Nm(Eu)},useDebugValue:Vm,useDeferredValue:function(e){var r=zr();return i2(r,he.memoizedState,e)},useTransition:function(){var e=Nm(Eu)[0],r=zr().memoizedState;return[e,r]},useMutableSource:$k,useSyncExternalStore:Gk,useId:a2,unstable_isNewReconciler:!1},uU={readContext:Nr,useCallback:r2,useContext:Nr,useEffect:Ym,useImperativeHandle:e2,useInsertionEffect:Kk,useLayoutEffect:Jk,useMemo:n2,useReducer:zm,useRef:Zk,useState:function(){return zm(Eu)},useDebugValue:Vm,useDeferredValue:function(e){var r=zr();return he===null?r.memoizedState=e:i2(r,he.memoizedState,e)},useTransition:function(){var e=zm(Eu)[0],r=zr().memoizedState;return[e,r]},useMutableSource:$k,useSyncExternalStore:Gk,useId:a2,unstable_isNewReconciler:!1};function Sl(e,r){try{var t="",n=r;do t+=N9(n),n=n.return;while(n);var i=t}catch(a){i=`
|
|
129
129
|
Error generating stack: `+a.message+`
|
|
130
|
-
`+a.stack}return{value:e,source:r,stack:i,digest:null}}function _m(e,r,t){return{value:e,source:null,stack:t!=null?t:null,digest:r!=null?r:null}}function $m(e,r){try{console.error(r.value)}catch(t){setTimeout(function(){throw t})}}var cU=typeof WeakMap=="function"?WeakMap:Map;function u2(e,r,t){t=Qn(-1,t),t.tag=3,t.payload={element:null};var n=r.value;return t.callback=function(){av||(av=!0,n0=n),$m(e,r)},t}function c2(e,r,t){t=Qn(-1,t),t.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=r.value;t.payload=function(){return n(i)},t.callback=function(){$m(e,r)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(t.callback=function(){$m(e,r),typeof n!="function"&&(Zi===null?Zi=new Set([this]):Zi.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})}),t}function f2(e,r,t){var n=e.pingCache;if(n===null){n=e.pingCache=new cU;var i=new Set;n.set(r,i)}else i=n.get(r),i===void 0&&(i=new Set,n.set(r,i));i.has(t)||(i.add(t),e=AU.bind(null,e,r,t),r.then(e,e))}function h2(e){do{var r;if((r=e.tag===13)&&(r=e.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return e;e=e.return}while(e!==null);return null}function v2(e,r,t,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===r?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(r=Qn(-1,1),r.tag=2,Ui(t,r,1))),t.lanes|=1),e)}var fU=Wn.ReactCurrentOwner,ar=!1;function $e(e,r,t,n){r.child=e===null?Vk(r,null,t,n):xl(r,e.child,t,n)}function d2(e,r,t,n,i){t=t.render;var a=r.ref;return ml(r,i),n=Bm(e,r,t,n,a,i),t=Rm(),e!==null&&!ar?(r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~i,Kn(e,r,i)):(qt&&t&&gm(r),r.flags|=1,$e(e,r,n,i),r.child)}function p2(e,r,t,n,i){if(e===null){var a=t.type;return typeof a=="function"&&!c0(a)&&a.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(r.tag=15,r.type=a,g2(e,r,a,n,i)):(e=fv(t.type,null,n,r,r.mode,i),e.ref=r.ref,e.return=r,r.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(t=t.compare,t=t!==null?t:du,t(o,n)&&e.ref===r.ref)return Kn(e,r,i)}return r.flags|=1,e=ta(a,n),e.ref=r.ref,e.return=r,r.child=e}function g2(e,r,t,n,i){if(e!==null){var a=e.memoizedProps;if(du(a,n)&&e.ref===r.ref)if(ar=!1,r.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(ar=!0);else return r.lanes=e.lanes,Kn(e,r,i)}return Gm(e,r,t,n,i)}function y2(e,r,t){var n=r.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(r.mode&1))r.memoizedState={baseLanes:0,cachePool:null,transitions:null},$t(Ml,Ar),Ar|=t;else{if(!(t&1073741824))return e=a!==null?a.baseLanes|t:t,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:e,cachePool:null,transitions:null},r.updateQueue=null,$t(Ml,Ar),Ar|=e,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:t,$t(Ml,Ar),Ar|=n}else a!==null?(n=a.baseLanes|t,r.memoizedState=null):n=t,$t(Ml,Ar),Ar|=n;return $e(e,r,i,t),r.child}function m2(e,r){var t=r.ref;(e===null&&t!==null||e!==null&&e.ref!==t)&&(r.flags|=512,r.flags|=2097152)}function Gm(e,r,t,n,i){var a=ir(t)?$a:De.current;return a=vl(r,a),ml(r,i),t=Bm(e,r,t,n,a,i),n=Rm(),e!==null&&!ar?(r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~i,Kn(e,r,i)):(qt&&n&&gm(r),r.flags|=1,$e(e,r,t,i),r.child)}function x2(e,r,t,n,i){if(ir(t)){var a=!0;Rh(r)}else a=!1;if(ml(r,i),r.stateNode===null)tv(e,r),Rk(r,t,n),km(r,t,n,i),n=!0;else if(e===null){var o=r.stateNode,l=r.memoizedProps;o.props=l;var s=o.context,u=t.contextType;typeof u=="object"&&u!==null?u=Nr(u):(u=ir(t)?$a:De.current,u=vl(r,u));var c=t.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||s!==u)&&Nk(r,o,n,u),ji=!1;var h=r.memoizedState;o.state=h,Hh(r,n,o,i),s=r.memoizedState,l!==n||h!==s||nr.current||ji?(typeof c=="function"&&(Em(r,t,c,n),s=r.memoizedState),(l=ji||Bk(r,t,l,n,h,s,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(r.flags|=4194308)):(typeof o.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=n,r.memoizedState=s),o.props=n,o.state=s,o.context=u,n=l):(typeof o.componentDidMount=="function"&&(r.flags|=4194308),n=!1)}else{o=r.stateNode,Pk(e,r),l=r.memoizedProps,u=r.type===r.elementType?l:en(r.type,l),o.props=u,f=r.pendingProps,h=o.context,s=t.contextType,typeof s=="object"&&s!==null?s=Nr(s):(s=ir(t)?$a:De.current,s=vl(r,s));var v=t.getDerivedStateFromProps;(c=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||h!==s)&&Nk(r,o,n,s),ji=!1,h=r.memoizedState,o.state=h,Hh(r,n,o,i);var d=r.memoizedState;l!==f||h!==d||nr.current||ji?(typeof v=="function"&&(Em(r,t,v,n),d=r.memoizedState),(u=ji||Bk(r,t,u,n,h,d,s)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,d,s),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,d,s)),typeof o.componentDidUpdate=="function"&&(r.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(r.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(r.flags|=1024),r.memoizedProps=n,r.memoizedState=d),o.props=n,o.state=d,o.context=s,n=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(r.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(r.flags|=1024),n=!1)}return Hm(e,r,t,n,a,i)}function Hm(e,r,t,n,i,a){m2(e,r);var o=(r.flags&128)!==0;if(!n&&!o)return i&&Mk(r,t,!1),Kn(e,r,a);n=r.stateNode,fU.current=r;var l=o&&typeof t.getDerivedStateFromError!="function"?null:n.render();return r.flags|=1,e!==null&&o?(r.child=xl(r,e.child,null,a),r.child=xl(r,null,l,a)):$e(e,r,l,a),r.memoizedState=n.state,i&&Mk(r,t,!0),r.child}function w2(e){var r=e.stateNode;r.pendingContext?Sk(e,r.pendingContext,r.pendingContext!==r.context):r.context&&Sk(e,r.context,!1),Tm(e,r.containerInfo)}function S2(e,r,t,n,i){return gl(),wm(i),r.flags|=256,$e(e,r,t,n),r.child}var Wm={dehydrated:null,treeContext:null,retryLane:0};function Xm(e){return{baseLanes:e,cachePool:null,transitions:null}}function C2(e,r,t){var n=r.pendingProps,i=Jt.current,a=!1,o=(r.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(a=!0,r.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),$t(Jt,i&1),e===null)return xm(r),e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(r.mode&1?e.data==="$!"?r.lanes=8:r.lanes=1073741824:r.lanes=1,null):(o=n.children,e=n.fallback,a?(n=r.mode,a=r.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=hv(o,n,0,null),e=Ka(e,n,t,null),a.return=r,e.return=r,a.sibling=e,r.child=a,r.child.memoizedState=Xm(t),r.memoizedState=Wm,e):jm(r,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return hU(e,r,o,n,l,i,t);if(a){a=n.fallback,o=r.mode,i=e.child,l=i.sibling;var s={mode:"hidden",children:n.children};return!(o&1)&&r.child!==i?(n=r.child,n.childLanes=0,n.pendingProps=s,r.deletions=null):(n=ta(i,s),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?a=ta(l,a):(a=Ka(a,o,t,null),a.flags|=2),a.return=r,n.return=r,n.sibling=a,r.child=n,n=a,a=r.child,o=e.child.memoizedState,o=o===null?Xm(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~t,r.memoizedState=Wm,n}return a=e.child,e=a.sibling,n=ta(a,{mode:"visible",children:n.children}),!(r.mode&1)&&(n.lanes=t),n.return=r,n.sibling=null,e!==null&&(t=r.deletions,t===null?(r.deletions=[e],r.flags|=16):t.push(e)),r.child=n,r.memoizedState=null,n}function jm(e,r){return r=hv({mode:"visible",children:r},e.mode,0,null),r.return=e,e.child=r}function Jh(e,r,t,n){return n!==null&&wm(n),xl(r,e.child,null,t),e=jm(r,r.pendingProps.children),e.flags|=2,r.memoizedState=null,e}function hU(e,r,t,n,i,a,o){if(t)return r.flags&256?(r.flags&=-257,n=_m(Error(U(422))),Jh(e,r,o,n)):r.memoizedState!==null?(r.child=e.child,r.flags|=128,null):(a=n.fallback,i=r.mode,n=hv({mode:"visible",children:n.children},i,0,null),a=Ka(a,i,o,null),a.flags|=2,n.return=r,a.return=r,n.sibling=a,r.child=n,r.mode&1&&xl(r,e.child,null,o),r.child.memoizedState=Xm(o),r.memoizedState=Wm,a);if(!(r.mode&1))return Jh(e,r,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(U(419)),n=_m(a,n,void 0),Jh(e,r,o,n)}if(l=(o&e.childLanes)!==0,ar||l){if(n=Se,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Zn(e,i),an(n,e,i,-1))}return u0(),n=_m(Error(U(421))),Jh(e,r,o,n)}return i.data==="$?"?(r.flags|=128,r.child=e.child,r=FU.bind(null,e),i._reactRetry=r,null):(e=a.treeContext,Mr=Gi(i.nextSibling),Cr=r,qt=!0,tn=null,e!==null&&(Br[Rr++]=Un,Br[Rr++]=qn,Br[Rr++]=Ga,Un=e.id,qn=e.overflow,Ga=r),r=jm(r,n.children),r.flags|=4096,r)}function M2(e,r,t){e.lanes|=r;var n=e.alternate;n!==null&&(n.lanes|=r),Am(e.return,r,t)}function Um(e,r,t,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:n,tail:t,tailMode:i}:(a.isBackwards=r,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=t,a.tailMode=i)}function A2(e,r,t){var n=r.pendingProps,i=n.revealOrder,a=n.tail;if($e(e,r,n.children,t),n=Jt.current,n&2)n=n&1|2,r.flags|=128;else{if(e!==null&&e.flags&128)t:for(e=r.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&M2(e,t,r);else if(e.tag===19)M2(e,t,r);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break t;for(;e.sibling===null;){if(e.return===null||e.return===r)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if($t(Jt,n),!(r.mode&1))r.memoizedState=null;else switch(i){case"forwards":for(t=r.child,i=null;t!==null;)e=t.alternate,e!==null&&jh(e)===null&&(i=t),t=t.sibling;t=i,t===null?(i=r.child,r.child=null):(i=t.sibling,t.sibling=null),Um(r,!1,i,t,a);break;case"backwards":for(t=null,i=r.child,r.child=null;i!==null;){if(e=i.alternate,e!==null&&jh(e)===null){r.child=i;break}e=i.sibling,i.sibling=t,t=i,i=e}Um(r,!0,t,null,a);break;case"together":Um(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function tv(e,r){!(r.mode&1)&&e!==null&&(e.alternate=null,r.alternate=null,r.flags|=2)}function Kn(e,r,t){if(e!==null&&(r.dependencies=e.dependencies),Ua|=r.lanes,!(t&r.childLanes))return null;if(e!==null&&r.child!==e.child)throw Error(U(153));if(r.child!==null){for(e=r.child,t=ta(e,e.pendingProps),r.child=t,t.return=r;e.sibling!==null;)e=e.sibling,t=t.sibling=ta(e,e.pendingProps),t.return=r;t.sibling=null}return r.child}function vU(e,r,t){switch(r.tag){case 3:w2(r),gl();break;case 5:_k(r);break;case 1:ir(r.type)&&Rh(r);break;case 4:Tm(r,r.stateNode.containerInfo);break;case 10:var n=r.type._context,i=r.memoizedProps.value;$t(_h,n._currentValue),n._currentValue=i;break;case 13:if(n=r.memoizedState,n!==null)return n.dehydrated!==null?($t(Jt,Jt.current&1),r.flags|=128,null):t&r.child.childLanes?C2(e,r,t):($t(Jt,Jt.current&1),e=Kn(e,r,t),e!==null?e.sibling:null);$t(Jt,Jt.current&1);break;case 19:if(n=(t&r.childLanes)!==0,e.flags&128){if(n)return A2(e,r,t);r.flags|=128}if(i=r.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),$t(Jt,Jt.current),n)break;return null;case 22:case 23:return r.lanes=0,y2(e,r,t)}return Kn(e,r,t)}var F2,qm,b2,E2;F2=function(e,r){for(var t=r.child;t!==null;){if(t.tag===5||t.tag===6)e.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break;for(;t.sibling===null;){if(t.return===null||t.return===r)return;t=t.return}t.sibling.return=t.return,t=t.sibling}},qm=function(){},b2=function(e,r,t,n){var i=e.memoizedProps;if(i!==n){e=r.stateNode,Xa(An.current);var a=null;switch(t){case"input":i=Ay(e,i),n=Ay(e,n),a=[];break;case"select":i=Kt({},i,{value:void 0}),n=Kt({},n,{value:void 0}),a=[];break;case"textarea":i=Ey(e,i),n=Ey(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Oh)}Ty(t,n);var o;t=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(js.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var s=n[u];if(l=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&s!==l&&(s!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(t||(t={}),t[o]="");for(o in s)s.hasOwnProperty(o)&&l[o]!==s[o]&&(t||(t={}),t[o]=s[o])}else t||(a||(a=[]),a.push(u,t)),t=s;else u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,l=l?l.__html:void 0,s!=null&&l!==s&&(a=a||[]).push(u,s)):u==="children"?typeof s!="string"&&typeof s!="number"||(a=a||[]).push(u,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(js.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&Ht("scroll",e),a||l===s||(a=[])):(a=a||[]).push(u,s))}t&&(a=a||[]).push("style",t);var u=a;(r.updateQueue=u)&&(r.flags|=4)}},E2=function(e,r,t,n){t!==n&&(r.flags|=4)};function Tu(e,r){if(!qt)switch(e.tailMode){case"hidden":r=e.tail;for(var t=null;r!==null;)r.alternate!==null&&(t=r),r=r.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?r||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Re(e){var r=e.alternate!==null&&e.alternate.child===e.child,t=0,n=0;if(r)for(var i=e.child;i!==null;)t|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)t|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=t,r}function dU(e,r,t){var n=r.pendingProps;switch(ym(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(r),null;case 1:return ir(r.type)&&Bh(),Re(r),null;case 3:return n=r.stateNode,wl(),Wt(nr),Wt(De),Lm(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Vh(r)?r.flags|=4:e===null||e.memoizedState.isDehydrated&&!(r.flags&256)||(r.flags|=1024,tn!==null&&(o0(tn),tn=null))),qm(e,r),Re(r),null;case 5:Im(r);var i=Xa(Au.current);if(t=r.type,e!==null&&r.stateNode!=null)b2(e,r,t,n,i),e.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!n){if(r.stateNode===null)throw Error(U(166));return Re(r),null}if(e=Xa(An.current),Vh(r)){n=r.stateNode,t=r.type;var a=r.memoizedProps;switch(n[Mn]=r,n[xu]=a,e=(r.mode&1)!==0,t){case"dialog":Ht("cancel",n),Ht("close",n);break;case"iframe":case"object":case"embed":Ht("load",n);break;case"video":case"audio":for(i=0;i<gu.length;i++)Ht(gu[i],n);break;case"source":Ht("error",n);break;case"img":case"image":case"link":Ht("error",n),Ht("load",n);break;case"details":Ht("toggle",n);break;case"input":oE(n,a),Ht("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Ht("invalid",n);break;case"textarea":uE(n,a),Ht("invalid",n)}Ty(t,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?n.textContent!==l&&(a.suppressHydrationWarning!==!0&&Lh(n.textContent,l,e),i=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Lh(n.textContent,l,e),i=["children",""+l]):js.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Ht("scroll",n)}switch(t){case"input":uh(n),sE(n,a,!0);break;case"textarea":uh(n),fE(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Oh)}n=i,r.updateQueue=n,n!==null&&(r.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hE(t)),e==="http://www.w3.org/1999/xhtml"?t==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(t,{is:n.is}):(e=o.createElement(t),t==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,t),e[Mn]=r,e[xu]=n,F2(e,r,!1,!1),r.stateNode=e;t:{switch(o=Iy(t,n),t){case"dialog":Ht("cancel",e),Ht("close",e),i=n;break;case"iframe":case"object":case"embed":Ht("load",e),i=n;break;case"video":case"audio":for(i=0;i<gu.length;i++)Ht(gu[i],e);i=n;break;case"source":Ht("error",e),i=n;break;case"img":case"image":case"link":Ht("error",e),Ht("load",e),i=n;break;case"details":Ht("toggle",e),i=n;break;case"input":oE(e,n),i=Ay(e,n),Ht("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=Kt({},n,{value:void 0}),Ht("invalid",e);break;case"textarea":uE(e,n),i=Ey(e,n),Ht("invalid",e);break;default:i=n}Ty(t,i),l=i;for(a in l)if(l.hasOwnProperty(a)){var s=l[a];a==="style"?pE(e,s):a==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&vE(e,s)):a==="children"?typeof s=="string"?(t!=="textarea"||s!=="")&&Qs(e,s):typeof s=="number"&&Qs(e,""+s):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(js.hasOwnProperty(a)?s!=null&&a==="onScroll"&&Ht("scroll",e):s!=null&&vy(e,a,s,o))}switch(t){case"input":uh(e),sE(e,n,!1);break;case"textarea":uh(e),fE(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Ri(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?el(e,!!n.multiple,a,!1):n.defaultValue!=null&&el(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Oh)}switch(t){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}}n&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Re(r),null;case 6:if(e&&r.stateNode!=null)E2(e,r,e.memoizedProps,n);else{if(typeof n!="string"&&r.stateNode===null)throw Error(U(166));if(t=Xa(Au.current),Xa(An.current),Vh(r)){if(n=r.stateNode,t=r.memoizedProps,n[Mn]=r,(a=n.nodeValue!==t)&&(e=Cr,e!==null))switch(e.tag){case 3:Lh(n.nodeValue,t,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Lh(n.nodeValue,t,(e.mode&1)!==0)}a&&(r.flags|=4)}else n=(t.nodeType===9?t:t.ownerDocument).createTextNode(n),n[Mn]=r,r.stateNode=n}return Re(r),null;case 13:if(Wt(Jt),n=r.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(qt&&Mr!==null&&r.mode&1&&!(r.flags&128))Tk(),gl(),r.flags|=98560,a=!1;else if(a=Vh(r),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=r.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[Mn]=r}else gl(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;Re(r),a=!1}else tn!==null&&(o0(tn),tn=null),a=!0;if(!a)return r.flags&65536?r:null}return r.flags&128?(r.lanes=t,r):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(r.child.flags|=8192,r.mode&1&&(e===null||Jt.current&1?ve===0&&(ve=3):u0())),r.updateQueue!==null&&(r.flags|=4),Re(r),null);case 4:return wl(),qm(e,r),e===null&&yu(r.stateNode.containerInfo),Re(r),null;case 10:return Mm(r.type._context),Re(r),null;case 17:return ir(r.type)&&Bh(),Re(r),null;case 19:if(Wt(Jt),a=r.memoizedState,a===null)return Re(r),null;if(n=(r.flags&128)!==0,o=a.rendering,o===null)if(n)Tu(a,!1);else{if(ve!==0||e!==null&&e.flags&128)for(e=r.child;e!==null;){if(o=jh(e),o!==null){for(r.flags|=128,Tu(a,!1),n=o.updateQueue,n!==null&&(r.updateQueue=n,r.flags|=4),r.subtreeFlags=0,n=t,t=r.child;t!==null;)a=t,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t=t.sibling;return $t(Jt,Jt.current&1|2),r.child}e=e.sibling}a.tail!==null&&oe()>Al&&(r.flags|=128,n=!0,Tu(a,!1),r.lanes=4194304)}else{if(!n)if(e=jh(o),e!==null){if(r.flags|=128,n=!0,t=e.updateQueue,t!==null&&(r.updateQueue=t,r.flags|=4),Tu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!qt)return Re(r),null}else 2*oe()-a.renderingStartTime>Al&&t!==1073741824&&(r.flags|=128,n=!0,Tu(a,!1),r.lanes=4194304);a.isBackwards?(o.sibling=r.child,r.child=o):(t=a.last,t!==null?t.sibling=o:r.child=o,a.last=o)}return a.tail!==null?(r=a.tail,a.rendering=r,a.tail=r.sibling,a.renderingStartTime=oe(),r.sibling=null,t=Jt.current,$t(Jt,n?t&1|2:t&1),r):(Re(r),null);case 22:case 23:return s0(),n=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(r.flags|=8192),n&&r.mode&1?Ar&1073741824&&(Re(r),r.subtreeFlags&6&&(r.flags|=8192)):Re(r),null;case 24:return null;case 25:return null}throw Error(U(156,r.tag))}function pU(e,r){switch(ym(r),r.tag){case 1:return ir(r.type)&&Bh(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return wl(),Wt(nr),Wt(De),Lm(),e=r.flags,e&65536&&!(e&128)?(r.flags=e&-65537|128,r):null;case 5:return Im(r),null;case 13:if(Wt(Jt),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(U(340));gl()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Wt(Jt),null;case 4:return wl(),null;case 10:return Mm(r.type._context),null;case 22:case 23:return s0(),null;case 24:return null;default:return null}}var ev=!1,Ne=!1,gU=typeof WeakSet=="function"?WeakSet:Set,it=null;function Cl(e,r){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){re(e,r,n)}else t.current=null}function Zm(e,r,t){try{t()}catch(n){re(e,r,n)}}var k2=!1;function yU(e,r){if(sm=Sh,e=ak(),tm(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else t:{t=(t=e.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{t.nodeType,a.nodeType}catch(w){t=null;break t}var o=0,l=-1,s=-1,u=0,c=0,f=e,h=null;e:for(;;){for(var v;f!==t||i!==0&&f.nodeType!==3||(l=o+i),f!==a||n!==0&&f.nodeType!==3||(s=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(v=f.firstChild)!==null;)h=f,f=v;for(;;){if(f===e)break e;if(h===t&&++u===i&&(l=o),h===a&&++c===n&&(s=o),(v=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=v}t=l===-1||s===-1?null:{start:l,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(um={focusedElem:e,selectionRange:t},Sh=!1,it=r;it!==null;)if(r=it,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,it=e;else for(;it!==null;){r=it;try{var d=r.alternate;if(r.flags&1024)switch(r.tag){case 0:case 11:case 15:break;case 1:if(d!==null){var p=d.memoizedProps,y=d.memoizedState,g=r.stateNode,m=g.getSnapshotBeforeUpdate(r.elementType===r.type?p:en(r.type,p),y);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var x=r.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(w){re(r,r.return,w)}if(e=r.sibling,e!==null){e.return=r.return,it=e;break}it=r.return}return d=k2,k2=!1,d}function Iu(e,r,t){var n=r.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Zm(r,t,a)}i=i.next}while(i!==n)}}function rv(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var t=r=r.next;do{if((t.tag&e)===e){var n=t.create;t.destroy=n()}t=t.next}while(t!==r)}}function Qm(e){var r=e.ref;if(r!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof r=="function"?r(e):r.current=e}}function T2(e){var r=e.alternate;r!==null&&(e.alternate=null,T2(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[Mn],delete r[xu],delete r[vm],delete r[Jj],delete r[tU])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function I2(e){return e.tag===5||e.tag===3||e.tag===4}function P2(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||I2(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Km(e,r,t){var n=e.tag;if(n===5||n===6)e=e.stateNode,r?t.nodeType===8?t.parentNode.insertBefore(e,r):t.insertBefore(e,r):(t.nodeType===8?(r=t.parentNode,r.insertBefore(e,t)):(r=t,r.appendChild(e)),t=t._reactRootContainer,t!=null||r.onclick!==null||(r.onclick=Oh));else if(n!==4&&(e=e.child,e!==null))for(Km(e,r,t),e=e.sibling;e!==null;)Km(e,r,t),e=e.sibling}function Jm(e,r,t){var n=e.tag;if(n===5||n===6)e=e.stateNode,r?t.insertBefore(e,r):t.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Jm(e,r,t),e=e.sibling;e!==null;)Jm(e,r,t),e=e.sibling}var Ee=null,rn=!1;function qi(e,r,t){for(t=t.child;t!==null;)L2(e,r,t),t=t.sibling}function L2(e,r,t){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(ph,t)}catch(l){}switch(t.tag){case 5:Ne||Cl(t,r);case 6:var n=Ee,i=rn;Ee=null,qi(e,r,t),Ee=n,rn=i,Ee!==null&&(rn?(e=Ee,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):Ee.removeChild(t.stateNode));break;case 18:Ee!==null&&(rn?(e=Ee,t=t.stateNode,e.nodeType===8?hm(e.parentNode,t):e.nodeType===1&&hm(e,t),su(e)):hm(Ee,t.stateNode));break;case 4:n=Ee,i=rn,Ee=t.stateNode.containerInfo,rn=!0,qi(e,r,t),Ee=n,rn=i;break;case 0:case 11:case 14:case 15:if(!Ne&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Zm(t,r,o),i=i.next}while(i!==n)}qi(e,r,t);break;case 1:if(!Ne&&(Cl(t,r),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(l){re(t,r,l)}qi(e,r,t);break;case 21:qi(e,r,t);break;case 22:t.mode&1?(Ne=(n=Ne)||t.memoizedState!==null,qi(e,r,t),Ne=n):qi(e,r,t);break;default:qi(e,r,t)}}function O2(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new gU),r.forEach(function(n){var i=bU.bind(null,e,n);t.has(n)||(t.add(n),n.then(i,i))})}}function nn(e,r){var t=r.deletions;if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];try{var a=e,o=r,l=o;t:for(;l!==null;){switch(l.tag){case 5:Ee=l.stateNode,rn=!1;break t;case 3:Ee=l.stateNode.containerInfo,rn=!0;break t;case 4:Ee=l.stateNode.containerInfo,rn=!0;break t}l=l.return}if(Ee===null)throw Error(U(160));L2(a,o,i),Ee=null,rn=!1;var s=i.alternate;s!==null&&(s.return=null),i.return=null}catch(u){re(i,r,u)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)D2(r,e),r=r.sibling}function D2(e,r){var t=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(nn(r,e),bn(e),n&4){try{Iu(3,e,e.return),rv(3,e)}catch(p){re(e,e.return,p)}try{Iu(5,e,e.return)}catch(p){re(e,e.return,p)}}break;case 1:nn(r,e),bn(e),n&512&&t!==null&&Cl(t,t.return);break;case 5:if(nn(r,e),bn(e),n&512&&t!==null&&Cl(t,t.return),e.flags&32){var i=e.stateNode;try{Qs(i,"")}catch(p){re(e,e.return,p)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=t!==null?t.memoizedProps:a,l=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&lE(i,a),Iy(l,o);var u=Iy(l,a);for(o=0;o<s.length;o+=2){var c=s[o],f=s[o+1];c==="style"?pE(i,f):c==="dangerouslySetInnerHTML"?vE(i,f):c==="children"?Qs(i,f):vy(i,c,f,u)}switch(l){case"input":Fy(i,a);break;case"textarea":cE(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var v=a.value;v!=null?el(i,!!a.multiple,v,!1):h!==!!a.multiple&&(a.defaultValue!=null?el(i,!!a.multiple,a.defaultValue,!0):el(i,!!a.multiple,a.multiple?[]:"",!1))}i[xu]=a}catch(p){re(e,e.return,p)}}break;case 6:if(nn(r,e),bn(e),n&4){if(e.stateNode===null)throw Error(U(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(p){re(e,e.return,p)}}break;case 3:if(nn(r,e),bn(e),n&4&&t!==null&&t.memoizedState.isDehydrated)try{su(r.containerInfo)}catch(p){re(e,e.return,p)}break;case 4:nn(r,e),bn(e);break;case 13:nn(r,e),bn(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(r0=oe())),n&4&&O2(e);break;case 22:if(c=t!==null&&t.memoizedState!==null,e.mode&1?(Ne=(u=Ne)||c,nn(r,e),Ne=u):nn(r,e),bn(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(it=e,c=e.child;c!==null;){for(f=it=c;it!==null;){switch(h=it,v=h.child,h.tag){case 0:case 11:case 14:case 15:Iu(4,h,h.return);break;case 1:Cl(h,h.return);var d=h.stateNode;if(typeof d.componentWillUnmount=="function"){n=h,t=h.return;try{r=n,d.props=r.memoizedProps,d.state=r.memoizedState,d.componentWillUnmount()}catch(p){re(n,t,p)}}break;case 5:Cl(h,h.return);break;case 22:if(h.memoizedState!==null){N2(f);continue}}v!==null?(v.return=h,it=v):N2(f)}c=c.sibling}t:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=f.stateNode,s=f.memoizedProps.style,o=s!=null&&s.hasOwnProperty("display")?s.display:null,l.style.display=dE("display",o))}catch(p){re(e,e.return,p)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(p){re(e,e.return,p)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break t;for(;f.sibling===null;){if(f.return===null||f.return===e)break t;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:nn(r,e),bn(e),n&4&&O2(e);break;case 21:break;default:nn(r,e),bn(e)}}function bn(e){var r=e.flags;if(r&2){try{t:{for(var t=e.return;t!==null;){if(I2(t)){var n=t;break t}t=t.return}throw Error(U(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Qs(i,""),n.flags&=-33);var a=P2(e);Jm(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,l=P2(e);Km(e,l,o);break;default:throw Error(U(161))}}catch(s){re(e,e.return,s)}e.flags&=-3}r&4096&&(e.flags&=-4097)}function mU(e,r,t){it=e,B2(e)}function B2(e,r,t){for(var n=(e.mode&1)!==0;it!==null;){var i=it,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||ev;if(!o){var l=i.alternate,s=l!==null&&l.memoizedState!==null||Ne;l=ev;var u=Ne;if(ev=o,(Ne=s)&&!u)for(it=i;it!==null;)o=it,s=o.child,o.tag===22&&o.memoizedState!==null?z2(i):s!==null?(s.return=o,it=s):z2(i);for(;a!==null;)it=a,B2(a),a=a.sibling;it=i,ev=l,Ne=u}R2(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,it=a):R2(e)}}function R2(e){for(;it!==null;){var r=it;if(r.flags&8772){var t=r.alternate;try{if(r.flags&8772)switch(r.tag){case 0:case 11:case 15:Ne||rv(5,r);break;case 1:var n=r.stateNode;if(r.flags&4&&!Ne)if(t===null)n.componentDidMount();else{var i=r.elementType===r.type?t.memoizedProps:en(r.type,t.memoizedProps);n.componentDidUpdate(i,t.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=r.updateQueue;a!==null&&Ok(r,a,n);break;case 3:var o=r.updateQueue;if(o!==null){if(t=null,r.child!==null)switch(r.child.tag){case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}Ok(r,o,t)}break;case 5:var l=r.stateNode;if(t===null&&r.flags&4){t=l;var s=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&t.focus();break;case"img":s.src&&(t.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var u=r.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&su(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Ne||r.flags&512&&Qm(r)}catch(h){re(r,r.return,h)}}if(r===e){it=null;break}if(t=r.sibling,t!==null){t.return=r.return,it=t;break}it=r.return}}function N2(e){for(;it!==null;){var r=it;if(r===e){it=null;break}var t=r.sibling;if(t!==null){t.return=r.return,it=t;break}it=r.return}}function z2(e){for(;it!==null;){var r=it;try{switch(r.tag){case 0:case 11:case 15:var t=r.return;try{rv(4,r)}catch(s){re(r,t,s)}break;case 1:var n=r.stateNode;if(typeof n.componentDidMount=="function"){var i=r.return;try{n.componentDidMount()}catch(s){re(r,i,s)}}var a=r.return;try{Qm(r)}catch(s){re(r,a,s)}break;case 5:var o=r.return;try{Qm(r)}catch(s){re(r,o,s)}}}catch(s){re(r,r.return,s)}if(r===e){it=null;break}var l=r.sibling;if(l!==null){l.return=r.return,it=l;break}it=r.return}}var xU=Math.ceil,nv=Wn.ReactCurrentDispatcher,t0=Wn.ReactCurrentOwner,Yr=Wn.ReactCurrentBatchConfig,Pt=0,Se=null,se=null,ke=0,Ar=0,Ml=Hi(0),ve=0,Pu=null,Ua=0,iv=0,e0=0,Lu=null,or=null,r0=0,Al=1/0,Jn=null,av=!1,n0=null,Zi=null,ov=!1,Qi=null,lv=0,Ou=0,i0=null,sv=-1,uv=0;function Ge(){return Pt&6?oe():sv!==-1?sv:sv=oe()}function Ki(e){return e.mode&1?Pt&2&&ke!==0?ke&-ke:rU.transition!==null?(uv===0&&(uv=IE()),uv):(e=Rt,e!==0||(e=window.event,e=e===void 0?16:YE(e.type)),e):1}function an(e,r,t,n){if(50<Ou)throw Ou=0,i0=null,Error(U(185));nu(e,t,n),(!(Pt&2)||e!==Se)&&(e===Se&&(!(Pt&2)&&(iv|=t),ve===4&&Ji(e,ke)),lr(e,n),t===1&&Pt===0&&!(r.mode&1)&&(Al=oe()+500,Nh&&Xi()))}function lr(e,r){var t=e.callbackNode;rj(e,r);var n=mh(e,e===Se?ke:0);if(n===0)t!==null&&EE(t),e.callbackNode=null,e.callbackPriority=0;else if(r=n&-n,e.callbackPriority!==r){if(t!=null&&EE(t),r===1)e.tag===0?eU(V2.bind(null,e)):Ak(V2.bind(null,e)),Qj(function(){!(Pt&6)&&Xi()}),t=null;else{switch(PE(n)){case 1:t=Ny;break;case 4:t=kE;break;case 16:t=dh;break;case 536870912:t=TE;break;default:t=dh}t=U2(t,Y2.bind(null,e))}e.callbackPriority=r,e.callbackNode=t}}function Y2(e,r){if(sv=-1,uv=0,Pt&6)throw Error(U(327));var t=e.callbackNode;if(Fl()&&e.callbackNode!==t)return null;var n=mh(e,e===Se?ke:0);if(n===0)return null;if(n&30||n&e.expiredLanes||r)r=cv(e,n);else{r=n;var i=Pt;Pt|=2;var a=$2();(Se!==e||ke!==r)&&(Jn=null,Al=oe()+500,Za(e,r));do try{CU();break}catch(l){_2(e,l)}while(!0);Cm(),nv.current=a,Pt=i,se!==null?r=0:(Se=null,ke=0,r=ve)}if(r!==0){if(r===2&&(i=zy(e),i!==0&&(n=i,r=a0(e,i))),r===1)throw t=Pu,Za(e,0),Ji(e,n),lr(e,oe()),t;if(r===6)Ji(e,n);else{if(i=e.current.alternate,!(n&30)&&!wU(i)&&(r=cv(e,n),r===2&&(a=zy(e),a!==0&&(n=a,r=a0(e,a))),r===1))throw t=Pu,Za(e,0),Ji(e,n),lr(e,oe()),t;switch(e.finishedWork=i,e.finishedLanes=n,r){case 0:case 1:throw Error(U(345));case 2:Qa(e,or,Jn);break;case 3:if(Ji(e,n),(n&130023424)===n&&(r=r0+500-oe(),10<r)){if(mh(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Ge(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=fm(Qa.bind(null,e,or,Jn),r);break}Qa(e,or,Jn);break;case 4:if(Ji(e,n),(n&4194240)===n)break;for(r=e.eventTimes,i=-1;0<n;){var o=31-Kr(n);a=1<<o,o=r[o],o>i&&(i=o),n&=~a}if(n=i,n=oe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xU(n/1960))-n,10<n){e.timeoutHandle=fm(Qa.bind(null,e,or,Jn),n);break}Qa(e,or,Jn);break;case 5:Qa(e,or,Jn);break;default:throw Error(U(329))}}}return lr(e,oe()),e.callbackNode===t?Y2.bind(null,e):null}function a0(e,r){var t=Lu;return e.current.memoizedState.isDehydrated&&(Za(e,r).flags|=256),e=cv(e,r),e!==2&&(r=or,or=t,r!==null&&o0(r)),e}function o0(e){or===null?or=e:or.push.apply(or,e)}function wU(e){for(var r=e;;){if(r.flags&16384){var t=r.updateQueue;if(t!==null&&(t=t.stores,t!==null))for(var n=0;n<t.length;n++){var i=t[n],a=i.getSnapshot;i=i.value;try{if(!Jr(a(),i))return!1}catch(o){return!1}}}if(t=r.child,r.subtreeFlags&16384&&t!==null)t.return=r,r=t;else{if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ji(e,r){for(r&=~e0,r&=~iv,e.suspendedLanes|=r,e.pingedLanes&=~r,e=e.expirationTimes;0<r;){var t=31-Kr(r),n=1<<t;e[t]=-1,r&=~n}}function V2(e){if(Pt&6)throw Error(U(327));Fl();var r=mh(e,0);if(!(r&1))return lr(e,oe()),null;var t=cv(e,r);if(e.tag!==0&&t===2){var n=zy(e);n!==0&&(r=n,t=a0(e,n))}if(t===1)throw t=Pu,Za(e,0),Ji(e,r),lr(e,oe()),t;if(t===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=r,Qa(e,or,Jn),lr(e,oe()),null}function l0(e,r){var t=Pt;Pt|=1;try{return e(r)}finally{Pt=t,Pt===0&&(Al=oe()+500,Nh&&Xi())}}function qa(e){Qi!==null&&Qi.tag===0&&!(Pt&6)&&Fl();var r=Pt;Pt|=1;var t=Yr.transition,n=Rt;try{if(Yr.transition=null,Rt=1,e)return e()}finally{Rt=n,Yr.transition=t,Pt=r,!(Pt&6)&&Xi()}}function s0(){Ar=Ml.current,Wt(Ml)}function Za(e,r){e.finishedWork=null,e.finishedLanes=0;var t=e.timeoutHandle;if(t!==-1&&(e.timeoutHandle=-1,Zj(t)),se!==null)for(t=se.return;t!==null;){var n=t;switch(ym(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Bh();break;case 3:wl(),Wt(nr),Wt(De),Lm();break;case 5:Im(n);break;case 4:wl();break;case 13:Wt(Jt);break;case 19:Wt(Jt);break;case 10:Mm(n.type._context);break;case 22:case 23:s0()}t=t.return}if(Se=e,se=e=ta(e.current,null),ke=Ar=r,ve=0,Pu=null,e0=iv=Ua=0,or=Lu=null,Wa!==null){for(r=0;r<Wa.length;r++)if(t=Wa[r],n=t.interleaved,n!==null){t.interleaved=null;var i=n.next,a=t.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}t.pending=n}Wa=null}return e}function _2(e,r){do{var t=se;try{if(Cm(),Uh.current=Kh,qh){for(var n=te.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}qh=!1}if(ja=0,we=he=te=null,Fu=!1,bu=0,t0.current=null,t===null||t.return===null){ve=1,Pu=r,se=null;break}t:{var a=e,o=t.return,l=t,s=r;if(r=ke,l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var u=s,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var v=h2(o);if(v!==null){v.flags&=-257,v2(v,o,l,a,r),v.mode&1&&f2(a,u,r),r=v,s=u;var d=r.updateQueue;if(d===null){var p=new Set;p.add(s),r.updateQueue=p}else d.add(s);break t}else{if(!(r&1)){f2(a,u,r),u0();break t}s=Error(U(426))}}else if(qt&&l.mode&1){var y=h2(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),v2(y,o,l,a,r),wm(Sl(s,l));break t}}a=s=Sl(s,l),ve!==4&&(ve=2),Lu===null?Lu=[a]:Lu.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,r&=-r,a.lanes|=r;var g=u2(a,s,r);Lk(a,g);break t;case 1:l=s;var m=a.type,x=a.stateNode;if(!(a.flags&128)&&(typeof m.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Zi===null||!Zi.has(x)))){a.flags|=65536,r&=-r,a.lanes|=r;var w=c2(a,l,r);Lk(a,w);break t}}a=a.return}while(a!==null)}H2(t)}catch(C){r=C,se===t&&t!==null&&(se=t=t.return);continue}break}while(!0)}function $2(){var e=nv.current;return nv.current=Kh,e===null?Kh:e}function u0(){(ve===0||ve===3||ve===2)&&(ve=4),Se===null||!(Ua&268435455)&&!(iv&268435455)||Ji(Se,ke)}function cv(e,r){var t=Pt;Pt|=2;var n=$2();(Se!==e||ke!==r)&&(Jn=null,Za(e,r));do try{SU();break}catch(i){_2(e,i)}while(!0);if(Cm(),Pt=t,nv.current=n,se!==null)throw Error(U(261));return Se=null,ke=0,ve}function SU(){for(;se!==null;)G2(se)}function CU(){for(;se!==null&&!j9();)G2(se)}function G2(e){var r=j2(e.alternate,e,Ar);e.memoizedProps=e.pendingProps,r===null?H2(e):se=r,t0.current=null}function H2(e){var r=e;do{var t=r.alternate;if(e=r.return,r.flags&32768){if(t=pU(t,r),t!==null){t.flags&=32767,se=t;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ve=6,se=null;return}}else if(t=dU(t,r,Ar),t!==null){se=t;return}if(r=r.sibling,r!==null){se=r;return}se=r=e}while(r!==null);ve===0&&(ve=5)}function Qa(e,r,t){var n=Rt,i=Yr.transition;try{Yr.transition=null,Rt=1,MU(e,r,t,n)}finally{Yr.transition=i,Rt=n}return null}function MU(e,r,t,n){do Fl();while(Qi!==null);if(Pt&6)throw Error(U(327));t=e.finishedWork;var i=e.finishedLanes;if(t===null)return null;if(e.finishedWork=null,e.finishedLanes=0,t===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var a=t.lanes|t.childLanes;if(nj(e,a),e===Se&&(se=Se=null,ke=0),!(t.subtreeFlags&2064)&&!(t.flags&2064)||ov||(ov=!0,U2(dh,function(){return Fl(),null})),a=(t.flags&15990)!==0,t.subtreeFlags&15990||a){a=Yr.transition,Yr.transition=null;var o=Rt;Rt=1;var l=Pt;Pt|=4,t0.current=null,yU(e,t),D2(t,e),Gj(um),Sh=!!sm,um=sm=null,e.current=t,mU(t),U9(),Pt=l,Rt=o,Yr.transition=a}else e.current=t;if(ov&&(ov=!1,Qi=e,lv=i),a=e.pendingLanes,a===0&&(Zi=null),Q9(t.stateNode),lr(e,oe()),r!==null)for(n=e.onRecoverableError,t=0;t<r.length;t++)i=r[t],n(i.value,{componentStack:i.stack,digest:i.digest});if(av)throw av=!1,e=n0,n0=null,e;return lv&1&&e.tag!==0&&Fl(),a=e.pendingLanes,a&1?e===i0?Ou++:(Ou=0,i0=e):Ou=0,Xi(),null}function Fl(){if(Qi!==null){var e=PE(lv),r=Yr.transition,t=Rt;try{if(Yr.transition=null,Rt=16>e?16:e,Qi===null)var n=!1;else{if(e=Qi,Qi=null,lv=0,Pt&6)throw Error(U(331));var i=Pt;for(Pt|=4,it=e.current;it!==null;){var a=it,o=a.child;if(it.flags&16){var l=a.deletions;if(l!==null){for(var s=0;s<l.length;s++){var u=l[s];for(it=u;it!==null;){var c=it;switch(c.tag){case 0:case 11:case 15:Iu(8,c,a)}var f=c.child;if(f!==null)f.return=c,it=f;else for(;it!==null;){c=it;var h=c.sibling,v=c.return;if(T2(c),c===u){it=null;break}if(h!==null){h.return=v,it=h;break}it=v}}}var d=a.alternate;if(d!==null){var p=d.child;if(p!==null){d.child=null;do{var y=p.sibling;p.sibling=null,p=y}while(p!==null)}}it=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,it=o;else t:for(;it!==null;){if(a=it,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Iu(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,it=g;break t}it=a.return}}var m=e.current;for(it=m;it!==null;){o=it;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,it=x;else t:for(o=m;it!==null;){if(l=it,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:rv(9,l)}}catch(C){re(l,l.return,C)}if(l===o){it=null;break t}var w=l.sibling;if(w!==null){w.return=l.return,it=w;break t}it=l.return}}if(Pt=i,Xi(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(ph,e)}catch(C){}n=!0}return n}finally{Rt=t,Yr.transition=r}}return!1}function W2(e,r,t){r=Sl(t,r),r=u2(e,r,1),e=Ui(e,r,1),r=Ge(),e!==null&&(nu(e,1,r),lr(e,r))}function re(e,r,t){if(e.tag===3)W2(e,e,t);else for(;r!==null;){if(r.tag===3){W2(r,e,t);break}else if(r.tag===1){var n=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Zi===null||!Zi.has(n))){e=Sl(t,e),e=c2(r,e,1),r=Ui(r,e,1),e=Ge(),r!==null&&(nu(r,1,e),lr(r,e));break}}r=r.return}}function AU(e,r,t){var n=e.pingCache;n!==null&&n.delete(r),r=Ge(),e.pingedLanes|=e.suspendedLanes&t,Se===e&&(ke&t)===t&&(ve===4||ve===3&&(ke&130023424)===ke&&500>oe()-r0?Za(e,0):e0|=t),lr(e,r)}function X2(e,r){r===0&&(e.mode&1?(r=yh,yh<<=1,!(yh&130023424)&&(yh=4194304)):r=1);var t=Ge();e=Zn(e,r),e!==null&&(nu(e,r,t),lr(e,t))}function FU(e){var r=e.memoizedState,t=0;r!==null&&(t=r.retryLane),X2(e,t)}function bU(e,r){var t=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(t=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(U(314))}n!==null&&n.delete(r),X2(e,t)}var j2;j2=function(e,r,t){if(e!==null)if(e.memoizedProps!==r.pendingProps||nr.current)ar=!0;else{if(!(e.lanes&t)&&!(r.flags&128))return ar=!1,vU(e,r,t);ar=!!(e.flags&131072)}else ar=!1,qt&&r.flags&1048576&&Fk(r,Yh,r.index);switch(r.lanes=0,r.tag){case 2:var n=r.type;tv(e,r),e=r.pendingProps;var i=vl(r,De.current);ml(r,t),i=Bm(null,r,n,e,i,t);var a=Rm();return r.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,ir(n)?(a=!0,Rh(r)):a=!1,r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,bm(r),i.updater=Wh,r.stateNode=i,i._reactInternals=r,km(r,n,e,t),r=Hm(null,r,n,!0,a,t)):(r.tag=0,qt&&a&&gm(r),$e(null,r,i,t),r=r.child),r;case 16:n=r.elementType;t:{switch(tv(e,r),e=r.pendingProps,i=n._init,n=i(n._payload),r.type=n,i=r.tag=kU(n),e=en(n,e),i){case 0:r=Gm(null,r,n,e,t);break t;case 1:r=x2(null,r,n,e,t);break t;case 11:r=d2(null,r,n,e,t);break t;case 14:r=p2(null,r,n,en(n.type,e),t);break t}throw Error(U(306,n,""))}return r;case 0:return n=r.type,i=r.pendingProps,i=r.elementType===n?i:en(n,i),Gm(e,r,n,i,t);case 1:return n=r.type,i=r.pendingProps,i=r.elementType===n?i:en(n,i),x2(e,r,n,i,t);case 3:t:{if(w2(r),e===null)throw Error(U(387));n=r.pendingProps,a=r.memoizedState,i=a.element,Pk(e,r),Hh(r,n,null,t);var o=r.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},r.updateQueue.baseState=a,r.memoizedState=a,r.flags&256){i=Sl(Error(U(423)),r),r=S2(e,r,n,t,i);break t}else if(n!==i){i=Sl(Error(U(424)),r),r=S2(e,r,n,t,i);break t}else for(Mr=Gi(r.stateNode.containerInfo.firstChild),Cr=r,qt=!0,tn=null,t=Vk(r,null,n,t),r.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(gl(),n===i){r=Kn(e,r,t);break t}$e(e,r,n,t)}r=r.child}return r;case 5:return _k(r),e===null&&xm(r),n=r.type,i=r.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,cm(n,i)?o=null:a!==null&&cm(n,a)&&(r.flags|=32),m2(e,r),$e(e,r,o,t),r.child;case 6:return e===null&&xm(r),null;case 13:return C2(e,r,t);case 4:return Tm(r,r.stateNode.containerInfo),n=r.pendingProps,e===null?r.child=xl(r,null,n,t):$e(e,r,n,t),r.child;case 11:return n=r.type,i=r.pendingProps,i=r.elementType===n?i:en(n,i),d2(e,r,n,i,t);case 7:return $e(e,r,r.pendingProps,t),r.child;case 8:return $e(e,r,r.pendingProps.children,t),r.child;case 12:return $e(e,r,r.pendingProps.children,t),r.child;case 10:t:{if(n=r.type._context,i=r.pendingProps,a=r.memoizedProps,o=i.value,$t(_h,n._currentValue),n._currentValue=o,a!==null)if(Jr(a.value,o)){if(a.children===i.children&&!nr.current){r=Kn(e,r,t);break t}}else for(a=r.child,a!==null&&(a.return=r);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var s=l.firstContext;s!==null;){if(s.context===n){if(a.tag===1){s=Qn(-1,t&-t),s.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}a.lanes|=t,s=a.alternate,s!==null&&(s.lanes|=t),Am(a.return,t,r),l.lanes|=t;break}s=s.next}}else if(a.tag===10)o=a.type===r.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(U(341));o.lanes|=t,l=o.alternate,l!==null&&(l.lanes|=t),Am(o,t,r),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===r){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}$e(e,r,i.children,t),r=r.child}return r;case 9:return i=r.type,n=r.pendingProps.children,ml(r,t),i=Nr(i),n=n(i),r.flags|=1,$e(e,r,n,t),r.child;case 14:return n=r.type,i=en(n,r.pendingProps),i=en(n.type,i),p2(e,r,n,i,t);case 15:return g2(e,r,r.type,r.pendingProps,t);case 17:return n=r.type,i=r.pendingProps,i=r.elementType===n?i:en(n,i),tv(e,r),r.tag=1,ir(n)?(e=!0,Rh(r)):e=!1,ml(r,t),Rk(r,n,i),km(r,n,i,t),Hm(null,r,n,!0,e,t);case 19:return A2(e,r,t);case 22:return y2(e,r,t)}throw Error(U(156,r.tag))};function U2(e,r){return bE(e,r)}function EU(e,r,t,n){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vr(e,r,t,n){return new EU(e,r,t,n)}function c0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kU(e){if(typeof e=="function")return c0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gy)return 11;if(e===xy)return 14}return 2}function ta(e,r){var t=e.alternate;return t===null?(t=Vr(e.tag,r,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=r,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,r=e.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function fv(e,r,t,n,i,a){var o=2;if(n=e,typeof e=="function")c0(e)&&(o=1);else if(typeof e=="string")o=5;else t:switch(e){case tl:return Ka(t.children,i,a,r);case dy:o=8,i|=8;break;case py:return e=Vr(12,t,r,i|2),e.elementType=py,e.lanes=a,e;case yy:return e=Vr(13,t,r,i),e.elementType=yy,e.lanes=a,e;case my:return e=Vr(19,t,r,i),e.elementType=my,e.lanes=a,e;case rE:return hv(t,i,a,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tE:o=10;break t;case eE:o=9;break t;case gy:o=11;break t;case xy:o=14;break t;case Bi:o=16,n=null;break t}throw Error(U(130,e==null?e:typeof e,""))}return r=Vr(o,t,r,i),r.elementType=e,r.type=n,r.lanes=a,r}function Ka(e,r,t,n){return e=Vr(7,e,n,r),e.lanes=t,e}function hv(e,r,t,n){return e=Vr(22,e,n,r),e.elementType=rE,e.lanes=t,e.stateNode={isHidden:!1},e}function f0(e,r,t){return e=Vr(6,e,null,r),e.lanes=t,e}function h0(e,r,t){return r=Vr(4,e.children!==null?e.children:[],e.key,r),r.lanes=t,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function TU(e,r,t,n,i){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yy(0),this.expirationTimes=Yy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yy(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function v0(e,r,t,n,i,a,o,l,s){return e=new TU(e,r,t,l,s),r===1?(r=1,a===!0&&(r|=8)):r=0,a=Vr(3,null,null,r),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},bm(a),e}function IU(e,r,t){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Jo,key:n==null?null:""+n,children:e,containerInfo:r,implementation:t}}function q2(e){if(!e)return Wi;e=e._reactInternals;t:{if(Va(e)!==e||e.tag!==1)throw Error(U(170));var r=e;do{switch(r.tag){case 3:r=r.stateNode.context;break t;case 1:if(ir(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break t}}r=r.return}while(r!==null);throw Error(U(171))}if(e.tag===1){var t=e.type;if(ir(t))return Ck(e,t,r)}return r}function Z2(e,r,t,n,i,a,o,l,s){return e=v0(t,n,!0,e,i,a,o,l,s),e.context=q2(null),t=e.current,n=Ge(),i=Ki(t),a=Qn(n,i),a.callback=r!=null?r:null,Ui(t,a,i),e.current.lanes=i,nu(e,i,n),lr(e,n),e}function vv(e,r,t,n){var i=r.current,a=Ge(),o=Ki(i);return t=q2(t),r.context===null?r.context=t:r.pendingContext=t,r=Qn(a,o),r.payload={element:e},n=n===void 0?null:n,n!==null&&(r.callback=n),e=Ui(i,r,o),e!==null&&(an(e,i,o,a),Gh(e,i,o)),o}function dv(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Q2(e,r){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var t=e.retryLane;e.retryLane=t!==0&&t<r?t:r}}function d0(e,r){Q2(e,r),(e=e.alternate)&&Q2(e,r)}function PU(){return null}var K2=typeof reportError=="function"?reportError:function(e){console.error(e)};function p0(e){this._internalRoot=e}pv.prototype.render=p0.prototype.render=function(e){var r=this._internalRoot;if(r===null)throw Error(U(409));vv(e,r,null,null)},pv.prototype.unmount=p0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var r=e.containerInfo;qa(function(){vv(null,e,null,null)}),r[Xn]=null}};function pv(e){this._internalRoot=e}pv.prototype.unstable_scheduleHydration=function(e){if(e){var r=DE();e={blockedOn:null,target:e,priority:r};for(var t=0;t<Vi.length&&r!==0&&r<Vi[t].priority;t++);Vi.splice(t,0,e),t===0&&NE(e)}};function g0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function J2(){}function LU(e,r,t,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=dv(o);a.call(u)}}var o=Z2(r,n,e,0,null,!1,!1,"",J2);return e._reactRootContainer=o,e[Xn]=o.current,yu(e.nodeType===8?e.parentNode:e),qa(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var l=n;n=function(){var u=dv(s);l.call(u)}}var s=v0(e,0,!1,null,null,!1,!1,"",J2);return e._reactRootContainer=s,e[Xn]=s.current,yu(e.nodeType===8?e.parentNode:e),qa(function(){vv(r,s,t,n)}),s}function yv(e,r,t,n,i){var a=t._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var l=i;i=function(){var s=dv(o);l.call(s)}}vv(r,o,e,i)}else o=LU(t,r,e,i,n);return dv(o)}LE=function(e){switch(e.tag){case 3:var r=e.stateNode;if(r.current.memoizedState.isDehydrated){var t=ru(r.pendingLanes);t!==0&&(Vy(r,t|1),lr(r,oe()),!(Pt&6)&&(Al=oe()+500,Xi()))}break;case 13:qa(function(){var n=Zn(e,1);if(n!==null){var i=Ge();an(n,e,1,i)}}),d0(e,1)}},_y=function(e){if(e.tag===13){var r=Zn(e,134217728);if(r!==null){var t=Ge();an(r,e,134217728,t)}d0(e,134217728)}},OE=function(e){if(e.tag===13){var r=Ki(e),t=Zn(e,r);if(t!==null){var n=Ge();an(t,e,r,n)}d0(e,r)}},DE=function(){return Rt},BE=function(e,r){var t=Rt;try{return Rt=e,r()}finally{Rt=t}},Oy=function(e,r,t){switch(r){case"input":if(Fy(e,t),r=t.name,t.type==="radio"&&r!=null){for(t=e;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<t.length;r++){var n=t[r];if(n!==e&&n.form===e.form){var i=Dh(n);if(!i)throw Error(U(90));aE(n),Fy(n,i)}}}break;case"textarea":cE(e,t);break;case"select":r=t.value,r!=null&&el(e,!!t.multiple,r,!1)}},xE=l0,wE=qa;var OU={usingClientEntryPoint:!1,Events:[wu,fl,Dh,yE,mE,l0]},Du={findFiberByHostInstance:_a,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},DU={bundleType:Du.bundleType,version:Du.version,rendererPackageName:Du.rendererPackageName,rendererConfig:Du.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=AE(e),e===null?null:e.stateNode},findFiberByHostInstance:Du.findFiberByHostInstance||PU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var mv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mv.isDisabled&&mv.supportsFiber)try{ph=mv.inject(DU),Cn=mv}catch(e){}}xr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OU,xr.createPortal=function(e,r){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g0(r))throw Error(U(200));return IU(e,r,null,t)},xr.createRoot=function(e,r){if(!g0(e))throw Error(U(299));var t=!1,n="",i=K2;return r!=null&&(r.unstable_strictMode===!0&&(t=!0),r.identifierPrefix!==void 0&&(n=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),r=v0(e,1,!1,null,null,t,!1,n,i),e[Xn]=r.current,yu(e.nodeType===8?e.parentNode:e),new p0(r)},xr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var r=e._reactInternals;if(r===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=AE(r),e=e===null?null:e.stateNode,e},xr.flushSync=function(e){return qa(e)},xr.hydrate=function(e,r,t){if(!gv(r))throw Error(U(200));return yv(null,e,r,!0,t)},xr.hydrateRoot=function(e,r,t){if(!g0(e))throw Error(U(405));var n=t!=null&&t.hydratedSources||null,i=!1,a="",o=K2;if(t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),r=Z2(r,null,e,1,t!=null?t:null,i,!1,a,o),e[Xn]=r.current,yu(e),n)for(e=0;e<n.length;e++)t=n[e],i=t._getVersion,i=i(t._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[t,i]:r.mutableSourceEagerHydrationData.push(t,i);return new pv(r)},xr.render=function(e,r,t){if(!gv(r))throw Error(U(200));return yv(null,e,r,!1,t)},xr.unmountComponentAtNode=function(e){if(!gv(e))throw Error(U(40));return e._reactRootContainer?(qa(function(){yv(null,null,e,!1,function(){e._reactRootContainer=null,e[Xn]=null})}),!0):!1},xr.unstable_batchedUpdates=l0,xr.unstable_renderSubtreeIntoContainer=function(e,r,t,n){if(!gv(t))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return yv(e,r,t,!1,n)},xr.version="18.2.0-next-9e3b772b8-20220608";function tT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tT)}catch(e){console.error(e)}}tT(),jb.exports=xr;var eT=jb.exports;const BU=cT({__proto__:null,default:Iv(eT)},[eT]);var y0=function(){return y0=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},y0.apply(this,arguments)},Bu=y0({},BU),RU=Bu.version,NU=Bu.render;Bu.unmountComponentAtNode;var m0;try{var zU=Number((RU||"").split(".")[0]);zU>=18&&(m0=Bu.createRoot)}catch(e){}function rT(e){var r=Bu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;r&&typeof r=="object"&&(r.usingClientEntryPoint=e)}var nT="__rc_react_root__";function YU(e,r){rT(!0);var t=r[nT]||m0(r);rT(!1),t.render(e),r[nT]=t}function VU(e,r){NU(e,r)}function _U(e,r){if(m0){YU(e,r);return}VU(e,r)}var x0=new Map,$U=function(e,r,t){var n=document.createElement("div");return r==="tooltip"&&(n.setAttribute("data-uuid",t),x0.has(t)?n=x0.get(t):x0.set(t,n),n.className="g2-tooltip"),_U(e,n),n};const GU=$U;var xv=function(e,r){var t={}.toString;return t.call(e)==="[object ".concat(r,"]")},HU=function(e){if(!e)return e;var r={};for(var t in e)r[t]=e[t];return r},wv=function(e){if(!e||typeof e!="object")return e;var r;return Array.isArray(e)?r=e.map(function(t){return wv(t)}):(r={},Object.keys(e).forEach(function(t){return r[t]=wv(e[t])})),r},Ru=function(e,r){for(var t=e,n=0;n<r.length;n+=1)if(t!=null&&t[r[n]])t=t[r[n]];else{t=void 0;break}return t},WU=function(e,r,t){if(!e)return e;var n=e;return r.forEach(function(i,a){a<r.length-1?n=n[i]:n[i]=t}),e},XU=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var r=Math.random()*16|0,t=e=="x"?r:r&3|8;return t.toString(16)})},Ja=function(e,r){e&&(Q(e)?e(r):e.current=r)},w0=function(){return w0=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},w0.apply(this,arguments)},iT=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t};function to(e,r){var t=B.useRef(),n=B.useRef(),i=B.useRef(null),a=r.onReady,o=r.onEvent,l=function(f,h){var v;return f===void 0&&(f="image/png"),(v=t.current)===null||v===void 0?void 0:v.chart.canvas.cfg.el.toDataURL(f,h)},s=function(f,h,v){var d;f===void 0&&(f="download"),h===void 0&&(h="image/png");var p=f;f.indexOf(".")===-1&&(p="".concat(f,".").concat(h.split("/")[1]));var y=(d=t.current)===null||d===void 0?void 0:d.chart.canvas.cfg.el.toDataURL(h,v),g=document.createElement("a");return g.href=y,g.download=p,document.body.appendChild(g),g.click(),document.body.removeChild(g),g=null,p},u=function(f,h,v,d){var p=Ru(f,h);WU(f,h,function(){for(var y=[],g=0;g<arguments.length;g++)y[g]=arguments[g];var m=xv(p,"Function")?p.apply(void 0,y):p;return xv(m,"String")||xv(m,"Number")||xv(m,"HTMLDivElement")?m:GU(m,v,d)})},c=function(){var f=XU();Ru(r,["statistic","content","customHtml"])&&u(r,["statistic","content","customHtml"]),Ru(r,["statistic","title","customHtml"])&&u(r,["statistic","title","customHtml"]),typeof r.tooltip=="object"&&(Ru(r,["tooltip","container"])&&u(r,["tooltip","container"],"tooltip",f),Ru(r,["tooltip","customContent"])&&u(r,["tooltip","customContent"],"tooltip",f))};return B.useEffect(function(){if(t.current&&!Gt(n.current,r)){var f=!1;if(n.current){var h=n.current;h.data,h.value,h.percent;var v=iT(h,["data","value","percent"]);r.data,r.value,r.percent;var d=iT(r,["data","value","percent"]);f=Gt(v,d)}if(n.current=wv(r),f&&E(r,"chartType")!=="Mix"){var p="data",y=["percent"],g=Object.keys(r);y.forEach(function(m){g.includes(m)&&(p=m)}),t.current.changeData((r==null?void 0:r[p])||[]),t.current.render()}else c(),t.current.update(r)}},[r]),B.useEffect(function(){if(!i.current)return function(){return null};n.current||(n.current=wv(r)),c();var f=new e(i.current,w0({},r));f.toDataURL=function(v,d){return l(v,d)},f.downloadImage=function(v,d,p){return s(v,d,p)},f.render(),t.current=HU(f),a&&a(f);var h=function(v){o&&o(f,v)};return f.on("*",h),function(){t.current&&(t.current.destroy(),t.current.off("*",h),t.current=void 0)}},[]),{chart:t,container:i}}var jU=function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(r,t)};return function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(r,t);function n(){this.constructor=r}r.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),UU=function(e){jU(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={hasError:!1},t.renderError=function(n){var i=t.props.errorTemplate;switch(n){default:return typeof i=="function"?i(n):i||B.createElement("h5",null,"组件出错了,请核查后重试: ",n.message)}},t}return r.getDerivedStateFromError=function(t){return{hasError:!0,error:t}},r.getDerivedStateFromProps=function(t,n){return n.children!==t.children?{children:t.children,hasError:!1,error:void 0}:null},r.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):B.createElement(B.Fragment,null,this.props.children)},r}(B.Component);const eo=UU;/*! *****************************************************************************
|
|
130
|
+
`+a.stack}return{value:e,source:r,stack:i,digest:null}}function _m(e,r,t){return{value:e,source:null,stack:t!=null?t:null,digest:r!=null?r:null}}function $m(e,r){try{console.error(r.value)}catch(t){setTimeout(function(){throw t})}}var cU=typeof WeakMap=="function"?WeakMap:Map;function u2(e,r,t){t=Qn(-1,t),t.tag=3,t.payload={element:null};var n=r.value;return t.callback=function(){av||(av=!0,n0=n),$m(e,r)},t}function c2(e,r,t){t=Qn(-1,t),t.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=r.value;t.payload=function(){return n(i)},t.callback=function(){$m(e,r)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(t.callback=function(){$m(e,r),typeof n!="function"&&(Zi===null?Zi=new Set([this]):Zi.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})}),t}function f2(e,r,t){var n=e.pingCache;if(n===null){n=e.pingCache=new cU;var i=new Set;n.set(r,i)}else i=n.get(r),i===void 0&&(i=new Set,n.set(r,i));i.has(t)||(i.add(t),e=AU.bind(null,e,r,t),r.then(e,e))}function h2(e){do{var r;if((r=e.tag===13)&&(r=e.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return e;e=e.return}while(e!==null);return null}function v2(e,r,t,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===r?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(r=Qn(-1,1),r.tag=2,Ui(t,r,1))),t.lanes|=1),e)}var fU=Wn.ReactCurrentOwner,ar=!1;function $e(e,r,t,n){r.child=e===null?Vk(r,null,t,n):xl(r,e.child,t,n)}function d2(e,r,t,n,i){t=t.render;var a=r.ref;return ml(r,i),n=Bm(e,r,t,n,a,i),t=Rm(),e!==null&&!ar?(r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~i,Kn(e,r,i)):(qt&&t&&gm(r),r.flags|=1,$e(e,r,n,i),r.child)}function p2(e,r,t,n,i){if(e===null){var a=t.type;return typeof a=="function"&&!c0(a)&&a.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(r.tag=15,r.type=a,g2(e,r,a,n,i)):(e=fv(t.type,null,n,r,r.mode,i),e.ref=r.ref,e.return=r,r.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(t=t.compare,t=t!==null?t:du,t(o,n)&&e.ref===r.ref)return Kn(e,r,i)}return r.flags|=1,e=ta(a,n),e.ref=r.ref,e.return=r,r.child=e}function g2(e,r,t,n,i){if(e!==null){var a=e.memoizedProps;if(du(a,n)&&e.ref===r.ref)if(ar=!1,r.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(ar=!0);else return r.lanes=e.lanes,Kn(e,r,i)}return Gm(e,r,t,n,i)}function y2(e,r,t){var n=r.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(r.mode&1))r.memoizedState={baseLanes:0,cachePool:null,transitions:null},$t(Ml,Ar),Ar|=t;else{if(!(t&1073741824))return e=a!==null?a.baseLanes|t:t,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:e,cachePool:null,transitions:null},r.updateQueue=null,$t(Ml,Ar),Ar|=e,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:t,$t(Ml,Ar),Ar|=n}else a!==null?(n=a.baseLanes|t,r.memoizedState=null):n=t,$t(Ml,Ar),Ar|=n;return $e(e,r,i,t),r.child}function m2(e,r){var t=r.ref;(e===null&&t!==null||e!==null&&e.ref!==t)&&(r.flags|=512,r.flags|=2097152)}function Gm(e,r,t,n,i){var a=ir(t)?$a:De.current;return a=vl(r,a),ml(r,i),t=Bm(e,r,t,n,a,i),n=Rm(),e!==null&&!ar?(r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~i,Kn(e,r,i)):(qt&&n&&gm(r),r.flags|=1,$e(e,r,t,i),r.child)}function x2(e,r,t,n,i){if(ir(t)){var a=!0;Rh(r)}else a=!1;if(ml(r,i),r.stateNode===null)tv(e,r),Rk(r,t,n),km(r,t,n,i),n=!0;else if(e===null){var o=r.stateNode,l=r.memoizedProps;o.props=l;var s=o.context,u=t.contextType;typeof u=="object"&&u!==null?u=Nr(u):(u=ir(t)?$a:De.current,u=vl(r,u));var c=t.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||s!==u)&&Nk(r,o,n,u),ji=!1;var h=r.memoizedState;o.state=h,Hh(r,n,o,i),s=r.memoizedState,l!==n||h!==s||nr.current||ji?(typeof c=="function"&&(Em(r,t,c,n),s=r.memoizedState),(l=ji||Bk(r,t,l,n,h,s,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(r.flags|=4194308)):(typeof o.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=n,r.memoizedState=s),o.props=n,o.state=s,o.context=u,n=l):(typeof o.componentDidMount=="function"&&(r.flags|=4194308),n=!1)}else{o=r.stateNode,Pk(e,r),l=r.memoizedProps,u=r.type===r.elementType?l:en(r.type,l),o.props=u,f=r.pendingProps,h=o.context,s=t.contextType,typeof s=="object"&&s!==null?s=Nr(s):(s=ir(t)?$a:De.current,s=vl(r,s));var v=t.getDerivedStateFromProps;(c=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||h!==s)&&Nk(r,o,n,s),ji=!1,h=r.memoizedState,o.state=h,Hh(r,n,o,i);var d=r.memoizedState;l!==f||h!==d||nr.current||ji?(typeof v=="function"&&(Em(r,t,v,n),d=r.memoizedState),(u=ji||Bk(r,t,u,n,h,d,s)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,d,s),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,d,s)),typeof o.componentDidUpdate=="function"&&(r.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(r.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(r.flags|=1024),r.memoizedProps=n,r.memoizedState=d),o.props=n,o.state=d,o.context=s,n=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(r.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(r.flags|=1024),n=!1)}return Hm(e,r,t,n,a,i)}function Hm(e,r,t,n,i,a){m2(e,r);var o=(r.flags&128)!==0;if(!n&&!o)return i&&Mk(r,t,!1),Kn(e,r,a);n=r.stateNode,fU.current=r;var l=o&&typeof t.getDerivedStateFromError!="function"?null:n.render();return r.flags|=1,e!==null&&o?(r.child=xl(r,e.child,null,a),r.child=xl(r,null,l,a)):$e(e,r,l,a),r.memoizedState=n.state,i&&Mk(r,t,!0),r.child}function w2(e){var r=e.stateNode;r.pendingContext?Sk(e,r.pendingContext,r.pendingContext!==r.context):r.context&&Sk(e,r.context,!1),Tm(e,r.containerInfo)}function S2(e,r,t,n,i){return gl(),wm(i),r.flags|=256,$e(e,r,t,n),r.child}var Wm={dehydrated:null,treeContext:null,retryLane:0};function Xm(e){return{baseLanes:e,cachePool:null,transitions:null}}function C2(e,r,t){var n=r.pendingProps,i=Jt.current,a=!1,o=(r.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(a=!0,r.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),$t(Jt,i&1),e===null)return xm(r),e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(r.mode&1?e.data==="$!"?r.lanes=8:r.lanes=1073741824:r.lanes=1,null):(o=n.children,e=n.fallback,a?(n=r.mode,a=r.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=hv(o,n,0,null),e=Ka(e,n,t,null),a.return=r,e.return=r,a.sibling=e,r.child=a,r.child.memoizedState=Xm(t),r.memoizedState=Wm,e):jm(r,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return hU(e,r,o,n,l,i,t);if(a){a=n.fallback,o=r.mode,i=e.child,l=i.sibling;var s={mode:"hidden",children:n.children};return!(o&1)&&r.child!==i?(n=r.child,n.childLanes=0,n.pendingProps=s,r.deletions=null):(n=ta(i,s),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?a=ta(l,a):(a=Ka(a,o,t,null),a.flags|=2),a.return=r,n.return=r,n.sibling=a,r.child=n,n=a,a=r.child,o=e.child.memoizedState,o=o===null?Xm(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~t,r.memoizedState=Wm,n}return a=e.child,e=a.sibling,n=ta(a,{mode:"visible",children:n.children}),!(r.mode&1)&&(n.lanes=t),n.return=r,n.sibling=null,e!==null&&(t=r.deletions,t===null?(r.deletions=[e],r.flags|=16):t.push(e)),r.child=n,r.memoizedState=null,n}function jm(e,r){return r=hv({mode:"visible",children:r},e.mode,0,null),r.return=e,e.child=r}function Jh(e,r,t,n){return n!==null&&wm(n),xl(r,e.child,null,t),e=jm(r,r.pendingProps.children),e.flags|=2,r.memoizedState=null,e}function hU(e,r,t,n,i,a,o){if(t)return r.flags&256?(r.flags&=-257,n=_m(Error(U(422))),Jh(e,r,o,n)):r.memoizedState!==null?(r.child=e.child,r.flags|=128,null):(a=n.fallback,i=r.mode,n=hv({mode:"visible",children:n.children},i,0,null),a=Ka(a,i,o,null),a.flags|=2,n.return=r,a.return=r,n.sibling=a,r.child=n,r.mode&1&&xl(r,e.child,null,o),r.child.memoizedState=Xm(o),r.memoizedState=Wm,a);if(!(r.mode&1))return Jh(e,r,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(U(419)),n=_m(a,n,void 0),Jh(e,r,o,n)}if(l=(o&e.childLanes)!==0,ar||l){if(n=Se,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Zn(e,i),an(n,e,i,-1))}return u0(),n=_m(Error(U(421))),Jh(e,r,o,n)}return i.data==="$?"?(r.flags|=128,r.child=e.child,r=FU.bind(null,e),i._reactRetry=r,null):(e=a.treeContext,Mr=Gi(i.nextSibling),Cr=r,qt=!0,tn=null,e!==null&&(Br[Rr++]=Un,Br[Rr++]=qn,Br[Rr++]=Ga,Un=e.id,qn=e.overflow,Ga=r),r=jm(r,n.children),r.flags|=4096,r)}function M2(e,r,t){e.lanes|=r;var n=e.alternate;n!==null&&(n.lanes|=r),Am(e.return,r,t)}function Um(e,r,t,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:n,tail:t,tailMode:i}:(a.isBackwards=r,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=t,a.tailMode=i)}function A2(e,r,t){var n=r.pendingProps,i=n.revealOrder,a=n.tail;if($e(e,r,n.children,t),n=Jt.current,n&2)n=n&1|2,r.flags|=128;else{if(e!==null&&e.flags&128)t:for(e=r.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&M2(e,t,r);else if(e.tag===19)M2(e,t,r);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break t;for(;e.sibling===null;){if(e.return===null||e.return===r)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if($t(Jt,n),!(r.mode&1))r.memoizedState=null;else switch(i){case"forwards":for(t=r.child,i=null;t!==null;)e=t.alternate,e!==null&&jh(e)===null&&(i=t),t=t.sibling;t=i,t===null?(i=r.child,r.child=null):(i=t.sibling,t.sibling=null),Um(r,!1,i,t,a);break;case"backwards":for(t=null,i=r.child,r.child=null;i!==null;){if(e=i.alternate,e!==null&&jh(e)===null){r.child=i;break}e=i.sibling,i.sibling=t,t=i,i=e}Um(r,!0,t,null,a);break;case"together":Um(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function tv(e,r){!(r.mode&1)&&e!==null&&(e.alternate=null,r.alternate=null,r.flags|=2)}function Kn(e,r,t){if(e!==null&&(r.dependencies=e.dependencies),Ua|=r.lanes,!(t&r.childLanes))return null;if(e!==null&&r.child!==e.child)throw Error(U(153));if(r.child!==null){for(e=r.child,t=ta(e,e.pendingProps),r.child=t,t.return=r;e.sibling!==null;)e=e.sibling,t=t.sibling=ta(e,e.pendingProps),t.return=r;t.sibling=null}return r.child}function vU(e,r,t){switch(r.tag){case 3:w2(r),gl();break;case 5:_k(r);break;case 1:ir(r.type)&&Rh(r);break;case 4:Tm(r,r.stateNode.containerInfo);break;case 10:var n=r.type._context,i=r.memoizedProps.value;$t(_h,n._currentValue),n._currentValue=i;break;case 13:if(n=r.memoizedState,n!==null)return n.dehydrated!==null?($t(Jt,Jt.current&1),r.flags|=128,null):t&r.child.childLanes?C2(e,r,t):($t(Jt,Jt.current&1),e=Kn(e,r,t),e!==null?e.sibling:null);$t(Jt,Jt.current&1);break;case 19:if(n=(t&r.childLanes)!==0,e.flags&128){if(n)return A2(e,r,t);r.flags|=128}if(i=r.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),$t(Jt,Jt.current),n)break;return null;case 22:case 23:return r.lanes=0,y2(e,r,t)}return Kn(e,r,t)}var F2,qm,b2,E2;F2=function(e,r){for(var t=r.child;t!==null;){if(t.tag===5||t.tag===6)e.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break;for(;t.sibling===null;){if(t.return===null||t.return===r)return;t=t.return}t.sibling.return=t.return,t=t.sibling}},qm=function(){},b2=function(e,r,t,n){var i=e.memoizedProps;if(i!==n){e=r.stateNode,Xa(An.current);var a=null;switch(t){case"input":i=Ay(e,i),n=Ay(e,n),a=[];break;case"select":i=Kt({},i,{value:void 0}),n=Kt({},n,{value:void 0}),a=[];break;case"textarea":i=Ey(e,i),n=Ey(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Oh)}Ty(t,n);var o;t=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(js.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var s=n[u];if(l=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&s!==l&&(s!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(t||(t={}),t[o]="");for(o in s)s.hasOwnProperty(o)&&l[o]!==s[o]&&(t||(t={}),t[o]=s[o])}else t||(a||(a=[]),a.push(u,t)),t=s;else u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,l=l?l.__html:void 0,s!=null&&l!==s&&(a=a||[]).push(u,s)):u==="children"?typeof s!="string"&&typeof s!="number"||(a=a||[]).push(u,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(js.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&Ht("scroll",e),a||l===s||(a=[])):(a=a||[]).push(u,s))}t&&(a=a||[]).push("style",t);var u=a;(r.updateQueue=u)&&(r.flags|=4)}},E2=function(e,r,t,n){t!==n&&(r.flags|=4)};function Tu(e,r){if(!qt)switch(e.tailMode){case"hidden":r=e.tail;for(var t=null;r!==null;)r.alternate!==null&&(t=r),r=r.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?r||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Re(e){var r=e.alternate!==null&&e.alternate.child===e.child,t=0,n=0;if(r)for(var i=e.child;i!==null;)t|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)t|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=t,r}function dU(e,r,t){var n=r.pendingProps;switch(ym(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(r),null;case 1:return ir(r.type)&&Bh(),Re(r),null;case 3:return n=r.stateNode,wl(),Wt(nr),Wt(De),Lm(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Vh(r)?r.flags|=4:e===null||e.memoizedState.isDehydrated&&!(r.flags&256)||(r.flags|=1024,tn!==null&&(o0(tn),tn=null))),qm(e,r),Re(r),null;case 5:Im(r);var i=Xa(Au.current);if(t=r.type,e!==null&&r.stateNode!=null)b2(e,r,t,n,i),e.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!n){if(r.stateNode===null)throw Error(U(166));return Re(r),null}if(e=Xa(An.current),Vh(r)){n=r.stateNode,t=r.type;var a=r.memoizedProps;switch(n[Mn]=r,n[xu]=a,e=(r.mode&1)!==0,t){case"dialog":Ht("cancel",n),Ht("close",n);break;case"iframe":case"object":case"embed":Ht("load",n);break;case"video":case"audio":for(i=0;i<gu.length;i++)Ht(gu[i],n);break;case"source":Ht("error",n);break;case"img":case"image":case"link":Ht("error",n),Ht("load",n);break;case"details":Ht("toggle",n);break;case"input":oE(n,a),Ht("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Ht("invalid",n);break;case"textarea":uE(n,a),Ht("invalid",n)}Ty(t,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?n.textContent!==l&&(a.suppressHydrationWarning!==!0&&Lh(n.textContent,l,e),i=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Lh(n.textContent,l,e),i=["children",""+l]):js.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Ht("scroll",n)}switch(t){case"input":uh(n),sE(n,a,!0);break;case"textarea":uh(n),fE(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Oh)}n=i,r.updateQueue=n,n!==null&&(r.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hE(t)),e==="http://www.w3.org/1999/xhtml"?t==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(t,{is:n.is}):(e=o.createElement(t),t==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,t),e[Mn]=r,e[xu]=n,F2(e,r,!1,!1),r.stateNode=e;t:{switch(o=Iy(t,n),t){case"dialog":Ht("cancel",e),Ht("close",e),i=n;break;case"iframe":case"object":case"embed":Ht("load",e),i=n;break;case"video":case"audio":for(i=0;i<gu.length;i++)Ht(gu[i],e);i=n;break;case"source":Ht("error",e),i=n;break;case"img":case"image":case"link":Ht("error",e),Ht("load",e),i=n;break;case"details":Ht("toggle",e),i=n;break;case"input":oE(e,n),i=Ay(e,n),Ht("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=Kt({},n,{value:void 0}),Ht("invalid",e);break;case"textarea":uE(e,n),i=Ey(e,n),Ht("invalid",e);break;default:i=n}Ty(t,i),l=i;for(a in l)if(l.hasOwnProperty(a)){var s=l[a];a==="style"?pE(e,s):a==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&vE(e,s)):a==="children"?typeof s=="string"?(t!=="textarea"||s!=="")&&Qs(e,s):typeof s=="number"&&Qs(e,""+s):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(js.hasOwnProperty(a)?s!=null&&a==="onScroll"&&Ht("scroll",e):s!=null&&vy(e,a,s,o))}switch(t){case"input":uh(e),sE(e,n,!1);break;case"textarea":uh(e),fE(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Ri(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?el(e,!!n.multiple,a,!1):n.defaultValue!=null&&el(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Oh)}switch(t){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}}n&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Re(r),null;case 6:if(e&&r.stateNode!=null)E2(e,r,e.memoizedProps,n);else{if(typeof n!="string"&&r.stateNode===null)throw Error(U(166));if(t=Xa(Au.current),Xa(An.current),Vh(r)){if(n=r.stateNode,t=r.memoizedProps,n[Mn]=r,(a=n.nodeValue!==t)&&(e=Cr,e!==null))switch(e.tag){case 3:Lh(n.nodeValue,t,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Lh(n.nodeValue,t,(e.mode&1)!==0)}a&&(r.flags|=4)}else n=(t.nodeType===9?t:t.ownerDocument).createTextNode(n),n[Mn]=r,r.stateNode=n}return Re(r),null;case 13:if(Wt(Jt),n=r.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(qt&&Mr!==null&&r.mode&1&&!(r.flags&128))Tk(),gl(),r.flags|=98560,a=!1;else if(a=Vh(r),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=r.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[Mn]=r}else gl(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;Re(r),a=!1}else tn!==null&&(o0(tn),tn=null),a=!0;if(!a)return r.flags&65536?r:null}return r.flags&128?(r.lanes=t,r):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(r.child.flags|=8192,r.mode&1&&(e===null||Jt.current&1?ve===0&&(ve=3):u0())),r.updateQueue!==null&&(r.flags|=4),Re(r),null);case 4:return wl(),qm(e,r),e===null&&yu(r.stateNode.containerInfo),Re(r),null;case 10:return Mm(r.type._context),Re(r),null;case 17:return ir(r.type)&&Bh(),Re(r),null;case 19:if(Wt(Jt),a=r.memoizedState,a===null)return Re(r),null;if(n=(r.flags&128)!==0,o=a.rendering,o===null)if(n)Tu(a,!1);else{if(ve!==0||e!==null&&e.flags&128)for(e=r.child;e!==null;){if(o=jh(e),o!==null){for(r.flags|=128,Tu(a,!1),n=o.updateQueue,n!==null&&(r.updateQueue=n,r.flags|=4),r.subtreeFlags=0,n=t,t=r.child;t!==null;)a=t,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t=t.sibling;return $t(Jt,Jt.current&1|2),r.child}e=e.sibling}a.tail!==null&&oe()>Al&&(r.flags|=128,n=!0,Tu(a,!1),r.lanes=4194304)}else{if(!n)if(e=jh(o),e!==null){if(r.flags|=128,n=!0,t=e.updateQueue,t!==null&&(r.updateQueue=t,r.flags|=4),Tu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!qt)return Re(r),null}else 2*oe()-a.renderingStartTime>Al&&t!==1073741824&&(r.flags|=128,n=!0,Tu(a,!1),r.lanes=4194304);a.isBackwards?(o.sibling=r.child,r.child=o):(t=a.last,t!==null?t.sibling=o:r.child=o,a.last=o)}return a.tail!==null?(r=a.tail,a.rendering=r,a.tail=r.sibling,a.renderingStartTime=oe(),r.sibling=null,t=Jt.current,$t(Jt,n?t&1|2:t&1),r):(Re(r),null);case 22:case 23:return s0(),n=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(r.flags|=8192),n&&r.mode&1?Ar&1073741824&&(Re(r),r.subtreeFlags&6&&(r.flags|=8192)):Re(r),null;case 24:return null;case 25:return null}throw Error(U(156,r.tag))}function pU(e,r){switch(ym(r),r.tag){case 1:return ir(r.type)&&Bh(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return wl(),Wt(nr),Wt(De),Lm(),e=r.flags,e&65536&&!(e&128)?(r.flags=e&-65537|128,r):null;case 5:return Im(r),null;case 13:if(Wt(Jt),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(U(340));gl()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Wt(Jt),null;case 4:return wl(),null;case 10:return Mm(r.type._context),null;case 22:case 23:return s0(),null;case 24:return null;default:return null}}var ev=!1,Ne=!1,gU=typeof WeakSet=="function"?WeakSet:Set,it=null;function Cl(e,r){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){re(e,r,n)}else t.current=null}function Zm(e,r,t){try{t()}catch(n){re(e,r,n)}}var k2=!1;function yU(e,r){if(sm=Sh,e=ak(),tm(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else t:{t=(t=e.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{t.nodeType,a.nodeType}catch(w){t=null;break t}var o=0,l=-1,s=-1,u=0,c=0,f=e,h=null;e:for(;;){for(var v;f!==t||i!==0&&f.nodeType!==3||(l=o+i),f!==a||n!==0&&f.nodeType!==3||(s=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(v=f.firstChild)!==null;)h=f,f=v;for(;;){if(f===e)break e;if(h===t&&++u===i&&(l=o),h===a&&++c===n&&(s=o),(v=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=v}t=l===-1||s===-1?null:{start:l,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(um={focusedElem:e,selectionRange:t},Sh=!1,it=r;it!==null;)if(r=it,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,it=e;else for(;it!==null;){r=it;try{var d=r.alternate;if(r.flags&1024)switch(r.tag){case 0:case 11:case 15:break;case 1:if(d!==null){var p=d.memoizedProps,y=d.memoizedState,g=r.stateNode,m=g.getSnapshotBeforeUpdate(r.elementType===r.type?p:en(r.type,p),y);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var x=r.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(w){re(r,r.return,w)}if(e=r.sibling,e!==null){e.return=r.return,it=e;break}it=r.return}return d=k2,k2=!1,d}function Iu(e,r,t){var n=r.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Zm(r,t,a)}i=i.next}while(i!==n)}}function rv(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var t=r=r.next;do{if((t.tag&e)===e){var n=t.create;t.destroy=n()}t=t.next}while(t!==r)}}function Qm(e){var r=e.ref;if(r!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof r=="function"?r(e):r.current=e}}function T2(e){var r=e.alternate;r!==null&&(e.alternate=null,T2(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[Mn],delete r[xu],delete r[vm],delete r[Jj],delete r[tU])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function I2(e){return e.tag===5||e.tag===3||e.tag===4}function P2(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||I2(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Km(e,r,t){var n=e.tag;if(n===5||n===6)e=e.stateNode,r?t.nodeType===8?t.parentNode.insertBefore(e,r):t.insertBefore(e,r):(t.nodeType===8?(r=t.parentNode,r.insertBefore(e,t)):(r=t,r.appendChild(e)),t=t._reactRootContainer,t!=null||r.onclick!==null||(r.onclick=Oh));else if(n!==4&&(e=e.child,e!==null))for(Km(e,r,t),e=e.sibling;e!==null;)Km(e,r,t),e=e.sibling}function Jm(e,r,t){var n=e.tag;if(n===5||n===6)e=e.stateNode,r?t.insertBefore(e,r):t.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Jm(e,r,t),e=e.sibling;e!==null;)Jm(e,r,t),e=e.sibling}var Ee=null,rn=!1;function qi(e,r,t){for(t=t.child;t!==null;)L2(e,r,t),t=t.sibling}function L2(e,r,t){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(ph,t)}catch(l){}switch(t.tag){case 5:Ne||Cl(t,r);case 6:var n=Ee,i=rn;Ee=null,qi(e,r,t),Ee=n,rn=i,Ee!==null&&(rn?(e=Ee,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):Ee.removeChild(t.stateNode));break;case 18:Ee!==null&&(rn?(e=Ee,t=t.stateNode,e.nodeType===8?hm(e.parentNode,t):e.nodeType===1&&hm(e,t),su(e)):hm(Ee,t.stateNode));break;case 4:n=Ee,i=rn,Ee=t.stateNode.containerInfo,rn=!0,qi(e,r,t),Ee=n,rn=i;break;case 0:case 11:case 14:case 15:if(!Ne&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Zm(t,r,o),i=i.next}while(i!==n)}qi(e,r,t);break;case 1:if(!Ne&&(Cl(t,r),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(l){re(t,r,l)}qi(e,r,t);break;case 21:qi(e,r,t);break;case 22:t.mode&1?(Ne=(n=Ne)||t.memoizedState!==null,qi(e,r,t),Ne=n):qi(e,r,t);break;default:qi(e,r,t)}}function O2(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new gU),r.forEach(function(n){var i=bU.bind(null,e,n);t.has(n)||(t.add(n),n.then(i,i))})}}function nn(e,r){var t=r.deletions;if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];try{var a=e,o=r,l=o;t:for(;l!==null;){switch(l.tag){case 5:Ee=l.stateNode,rn=!1;break t;case 3:Ee=l.stateNode.containerInfo,rn=!0;break t;case 4:Ee=l.stateNode.containerInfo,rn=!0;break t}l=l.return}if(Ee===null)throw Error(U(160));L2(a,o,i),Ee=null,rn=!1;var s=i.alternate;s!==null&&(s.return=null),i.return=null}catch(u){re(i,r,u)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)D2(r,e),r=r.sibling}function D2(e,r){var t=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(nn(r,e),bn(e),n&4){try{Iu(3,e,e.return),rv(3,e)}catch(p){re(e,e.return,p)}try{Iu(5,e,e.return)}catch(p){re(e,e.return,p)}}break;case 1:nn(r,e),bn(e),n&512&&t!==null&&Cl(t,t.return);break;case 5:if(nn(r,e),bn(e),n&512&&t!==null&&Cl(t,t.return),e.flags&32){var i=e.stateNode;try{Qs(i,"")}catch(p){re(e,e.return,p)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=t!==null?t.memoizedProps:a,l=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&lE(i,a),Iy(l,o);var u=Iy(l,a);for(o=0;o<s.length;o+=2){var c=s[o],f=s[o+1];c==="style"?pE(i,f):c==="dangerouslySetInnerHTML"?vE(i,f):c==="children"?Qs(i,f):vy(i,c,f,u)}switch(l){case"input":Fy(i,a);break;case"textarea":cE(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var v=a.value;v!=null?el(i,!!a.multiple,v,!1):h!==!!a.multiple&&(a.defaultValue!=null?el(i,!!a.multiple,a.defaultValue,!0):el(i,!!a.multiple,a.multiple?[]:"",!1))}i[xu]=a}catch(p){re(e,e.return,p)}}break;case 6:if(nn(r,e),bn(e),n&4){if(e.stateNode===null)throw Error(U(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(p){re(e,e.return,p)}}break;case 3:if(nn(r,e),bn(e),n&4&&t!==null&&t.memoizedState.isDehydrated)try{su(r.containerInfo)}catch(p){re(e,e.return,p)}break;case 4:nn(r,e),bn(e);break;case 13:nn(r,e),bn(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(r0=oe())),n&4&&O2(e);break;case 22:if(c=t!==null&&t.memoizedState!==null,e.mode&1?(Ne=(u=Ne)||c,nn(r,e),Ne=u):nn(r,e),bn(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(it=e,c=e.child;c!==null;){for(f=it=c;it!==null;){switch(h=it,v=h.child,h.tag){case 0:case 11:case 14:case 15:Iu(4,h,h.return);break;case 1:Cl(h,h.return);var d=h.stateNode;if(typeof d.componentWillUnmount=="function"){n=h,t=h.return;try{r=n,d.props=r.memoizedProps,d.state=r.memoizedState,d.componentWillUnmount()}catch(p){re(n,t,p)}}break;case 5:Cl(h,h.return);break;case 22:if(h.memoizedState!==null){N2(f);continue}}v!==null?(v.return=h,it=v):N2(f)}c=c.sibling}t:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=f.stateNode,s=f.memoizedProps.style,o=s!=null&&s.hasOwnProperty("display")?s.display:null,l.style.display=dE("display",o))}catch(p){re(e,e.return,p)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(p){re(e,e.return,p)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break t;for(;f.sibling===null;){if(f.return===null||f.return===e)break t;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:nn(r,e),bn(e),n&4&&O2(e);break;case 21:break;default:nn(r,e),bn(e)}}function bn(e){var r=e.flags;if(r&2){try{t:{for(var t=e.return;t!==null;){if(I2(t)){var n=t;break t}t=t.return}throw Error(U(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Qs(i,""),n.flags&=-33);var a=P2(e);Jm(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,l=P2(e);Km(e,l,o);break;default:throw Error(U(161))}}catch(s){re(e,e.return,s)}e.flags&=-3}r&4096&&(e.flags&=-4097)}function mU(e,r,t){it=e,B2(e)}function B2(e,r,t){for(var n=(e.mode&1)!==0;it!==null;){var i=it,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||ev;if(!o){var l=i.alternate,s=l!==null&&l.memoizedState!==null||Ne;l=ev;var u=Ne;if(ev=o,(Ne=s)&&!u)for(it=i;it!==null;)o=it,s=o.child,o.tag===22&&o.memoizedState!==null?z2(i):s!==null?(s.return=o,it=s):z2(i);for(;a!==null;)it=a,B2(a),a=a.sibling;it=i,ev=l,Ne=u}R2(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,it=a):R2(e)}}function R2(e){for(;it!==null;){var r=it;if(r.flags&8772){var t=r.alternate;try{if(r.flags&8772)switch(r.tag){case 0:case 11:case 15:Ne||rv(5,r);break;case 1:var n=r.stateNode;if(r.flags&4&&!Ne)if(t===null)n.componentDidMount();else{var i=r.elementType===r.type?t.memoizedProps:en(r.type,t.memoizedProps);n.componentDidUpdate(i,t.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=r.updateQueue;a!==null&&Ok(r,a,n);break;case 3:var o=r.updateQueue;if(o!==null){if(t=null,r.child!==null)switch(r.child.tag){case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}Ok(r,o,t)}break;case 5:var l=r.stateNode;if(t===null&&r.flags&4){t=l;var s=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&t.focus();break;case"img":s.src&&(t.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var u=r.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&su(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Ne||r.flags&512&&Qm(r)}catch(h){re(r,r.return,h)}}if(r===e){it=null;break}if(t=r.sibling,t!==null){t.return=r.return,it=t;break}it=r.return}}function N2(e){for(;it!==null;){var r=it;if(r===e){it=null;break}var t=r.sibling;if(t!==null){t.return=r.return,it=t;break}it=r.return}}function z2(e){for(;it!==null;){var r=it;try{switch(r.tag){case 0:case 11:case 15:var t=r.return;try{rv(4,r)}catch(s){re(r,t,s)}break;case 1:var n=r.stateNode;if(typeof n.componentDidMount=="function"){var i=r.return;try{n.componentDidMount()}catch(s){re(r,i,s)}}var a=r.return;try{Qm(r)}catch(s){re(r,a,s)}break;case 5:var o=r.return;try{Qm(r)}catch(s){re(r,o,s)}}}catch(s){re(r,r.return,s)}if(r===e){it=null;break}var l=r.sibling;if(l!==null){l.return=r.return,it=l;break}it=r.return}}var xU=Math.ceil,nv=Wn.ReactCurrentDispatcher,t0=Wn.ReactCurrentOwner,Yr=Wn.ReactCurrentBatchConfig,Pt=0,Se=null,se=null,ke=0,Ar=0,Ml=Hi(0),ve=0,Pu=null,Ua=0,iv=0,e0=0,Lu=null,or=null,r0=0,Al=1/0,Jn=null,av=!1,n0=null,Zi=null,ov=!1,Qi=null,lv=0,Ou=0,i0=null,sv=-1,uv=0;function Ge(){return Pt&6?oe():sv!==-1?sv:sv=oe()}function Ki(e){return e.mode&1?Pt&2&&ke!==0?ke&-ke:rU.transition!==null?(uv===0&&(uv=IE()),uv):(e=Rt,e!==0||(e=window.event,e=e===void 0?16:YE(e.type)),e):1}function an(e,r,t,n){if(50<Ou)throw Ou=0,i0=null,Error(U(185));nu(e,t,n),(!(Pt&2)||e!==Se)&&(e===Se&&(!(Pt&2)&&(iv|=t),ve===4&&Ji(e,ke)),lr(e,n),t===1&&Pt===0&&!(r.mode&1)&&(Al=oe()+500,Nh&&Xi()))}function lr(e,r){var t=e.callbackNode;rj(e,r);var n=mh(e,e===Se?ke:0);if(n===0)t!==null&&EE(t),e.callbackNode=null,e.callbackPriority=0;else if(r=n&-n,e.callbackPriority!==r){if(t!=null&&EE(t),r===1)e.tag===0?eU(V2.bind(null,e)):Ak(V2.bind(null,e)),Qj(function(){!(Pt&6)&&Xi()}),t=null;else{switch(PE(n)){case 1:t=Ny;break;case 4:t=kE;break;case 16:t=dh;break;case 536870912:t=TE;break;default:t=dh}t=U2(t,Y2.bind(null,e))}e.callbackPriority=r,e.callbackNode=t}}function Y2(e,r){if(sv=-1,uv=0,Pt&6)throw Error(U(327));var t=e.callbackNode;if(Fl()&&e.callbackNode!==t)return null;var n=mh(e,e===Se?ke:0);if(n===0)return null;if(n&30||n&e.expiredLanes||r)r=cv(e,n);else{r=n;var i=Pt;Pt|=2;var a=$2();(Se!==e||ke!==r)&&(Jn=null,Al=oe()+500,Za(e,r));do try{CU();break}catch(l){_2(e,l)}while(!0);Cm(),nv.current=a,Pt=i,se!==null?r=0:(Se=null,ke=0,r=ve)}if(r!==0){if(r===2&&(i=zy(e),i!==0&&(n=i,r=a0(e,i))),r===1)throw t=Pu,Za(e,0),Ji(e,n),lr(e,oe()),t;if(r===6)Ji(e,n);else{if(i=e.current.alternate,!(n&30)&&!wU(i)&&(r=cv(e,n),r===2&&(a=zy(e),a!==0&&(n=a,r=a0(e,a))),r===1))throw t=Pu,Za(e,0),Ji(e,n),lr(e,oe()),t;switch(e.finishedWork=i,e.finishedLanes=n,r){case 0:case 1:throw Error(U(345));case 2:Qa(e,or,Jn);break;case 3:if(Ji(e,n),(n&130023424)===n&&(r=r0+500-oe(),10<r)){if(mh(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Ge(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=fm(Qa.bind(null,e,or,Jn),r);break}Qa(e,or,Jn);break;case 4:if(Ji(e,n),(n&4194240)===n)break;for(r=e.eventTimes,i=-1;0<n;){var o=31-Kr(n);a=1<<o,o=r[o],o>i&&(i=o),n&=~a}if(n=i,n=oe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xU(n/1960))-n,10<n){e.timeoutHandle=fm(Qa.bind(null,e,or,Jn),n);break}Qa(e,or,Jn);break;case 5:Qa(e,or,Jn);break;default:throw Error(U(329))}}}return lr(e,oe()),e.callbackNode===t?Y2.bind(null,e):null}function a0(e,r){var t=Lu;return e.current.memoizedState.isDehydrated&&(Za(e,r).flags|=256),e=cv(e,r),e!==2&&(r=or,or=t,r!==null&&o0(r)),e}function o0(e){or===null?or=e:or.push.apply(or,e)}function wU(e){for(var r=e;;){if(r.flags&16384){var t=r.updateQueue;if(t!==null&&(t=t.stores,t!==null))for(var n=0;n<t.length;n++){var i=t[n],a=i.getSnapshot;i=i.value;try{if(!Jr(a(),i))return!1}catch(o){return!1}}}if(t=r.child,r.subtreeFlags&16384&&t!==null)t.return=r,r=t;else{if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ji(e,r){for(r&=~e0,r&=~iv,e.suspendedLanes|=r,e.pingedLanes&=~r,e=e.expirationTimes;0<r;){var t=31-Kr(r),n=1<<t;e[t]=-1,r&=~n}}function V2(e){if(Pt&6)throw Error(U(327));Fl();var r=mh(e,0);if(!(r&1))return lr(e,oe()),null;var t=cv(e,r);if(e.tag!==0&&t===2){var n=zy(e);n!==0&&(r=n,t=a0(e,n))}if(t===1)throw t=Pu,Za(e,0),Ji(e,r),lr(e,oe()),t;if(t===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=r,Qa(e,or,Jn),lr(e,oe()),null}function l0(e,r){var t=Pt;Pt|=1;try{return e(r)}finally{Pt=t,Pt===0&&(Al=oe()+500,Nh&&Xi())}}function qa(e){Qi!==null&&Qi.tag===0&&!(Pt&6)&&Fl();var r=Pt;Pt|=1;var t=Yr.transition,n=Rt;try{if(Yr.transition=null,Rt=1,e)return e()}finally{Rt=n,Yr.transition=t,Pt=r,!(Pt&6)&&Xi()}}function s0(){Ar=Ml.current,Wt(Ml)}function Za(e,r){e.finishedWork=null,e.finishedLanes=0;var t=e.timeoutHandle;if(t!==-1&&(e.timeoutHandle=-1,Zj(t)),se!==null)for(t=se.return;t!==null;){var n=t;switch(ym(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Bh();break;case 3:wl(),Wt(nr),Wt(De),Lm();break;case 5:Im(n);break;case 4:wl();break;case 13:Wt(Jt);break;case 19:Wt(Jt);break;case 10:Mm(n.type._context);break;case 22:case 23:s0()}t=t.return}if(Se=e,se=e=ta(e.current,null),ke=Ar=r,ve=0,Pu=null,e0=iv=Ua=0,or=Lu=null,Wa!==null){for(r=0;r<Wa.length;r++)if(t=Wa[r],n=t.interleaved,n!==null){t.interleaved=null;var i=n.next,a=t.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}t.pending=n}Wa=null}return e}function _2(e,r){do{var t=se;try{if(Cm(),Uh.current=Kh,qh){for(var n=te.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}qh=!1}if(ja=0,we=he=te=null,Fu=!1,bu=0,t0.current=null,t===null||t.return===null){ve=1,Pu=r,se=null;break}t:{var a=e,o=t.return,l=t,s=r;if(r=ke,l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var u=s,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var v=h2(o);if(v!==null){v.flags&=-257,v2(v,o,l,a,r),v.mode&1&&f2(a,u,r),r=v,s=u;var d=r.updateQueue;if(d===null){var p=new Set;p.add(s),r.updateQueue=p}else d.add(s);break t}else{if(!(r&1)){f2(a,u,r),u0();break t}s=Error(U(426))}}else if(qt&&l.mode&1){var y=h2(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),v2(y,o,l,a,r),wm(Sl(s,l));break t}}a=s=Sl(s,l),ve!==4&&(ve=2),Lu===null?Lu=[a]:Lu.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,r&=-r,a.lanes|=r;var g=u2(a,s,r);Lk(a,g);break t;case 1:l=s;var m=a.type,x=a.stateNode;if(!(a.flags&128)&&(typeof m.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Zi===null||!Zi.has(x)))){a.flags|=65536,r&=-r,a.lanes|=r;var w=c2(a,l,r);Lk(a,w);break t}}a=a.return}while(a!==null)}H2(t)}catch(C){r=C,se===t&&t!==null&&(se=t=t.return);continue}break}while(!0)}function $2(){var e=nv.current;return nv.current=Kh,e===null?Kh:e}function u0(){(ve===0||ve===3||ve===2)&&(ve=4),Se===null||!(Ua&268435455)&&!(iv&268435455)||Ji(Se,ke)}function cv(e,r){var t=Pt;Pt|=2;var n=$2();(Se!==e||ke!==r)&&(Jn=null,Za(e,r));do try{SU();break}catch(i){_2(e,i)}while(!0);if(Cm(),Pt=t,nv.current=n,se!==null)throw Error(U(261));return Se=null,ke=0,ve}function SU(){for(;se!==null;)G2(se)}function CU(){for(;se!==null&&!j9();)G2(se)}function G2(e){var r=j2(e.alternate,e,Ar);e.memoizedProps=e.pendingProps,r===null?H2(e):se=r,t0.current=null}function H2(e){var r=e;do{var t=r.alternate;if(e=r.return,r.flags&32768){if(t=pU(t,r),t!==null){t.flags&=32767,se=t;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ve=6,se=null;return}}else if(t=dU(t,r,Ar),t!==null){se=t;return}if(r=r.sibling,r!==null){se=r;return}se=r=e}while(r!==null);ve===0&&(ve=5)}function Qa(e,r,t){var n=Rt,i=Yr.transition;try{Yr.transition=null,Rt=1,MU(e,r,t,n)}finally{Yr.transition=i,Rt=n}return null}function MU(e,r,t,n){do Fl();while(Qi!==null);if(Pt&6)throw Error(U(327));t=e.finishedWork;var i=e.finishedLanes;if(t===null)return null;if(e.finishedWork=null,e.finishedLanes=0,t===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var a=t.lanes|t.childLanes;if(nj(e,a),e===Se&&(se=Se=null,ke=0),!(t.subtreeFlags&2064)&&!(t.flags&2064)||ov||(ov=!0,U2(dh,function(){return Fl(),null})),a=(t.flags&15990)!==0,t.subtreeFlags&15990||a){a=Yr.transition,Yr.transition=null;var o=Rt;Rt=1;var l=Pt;Pt|=4,t0.current=null,yU(e,t),D2(t,e),Gj(um),Sh=!!sm,um=sm=null,e.current=t,mU(t),U9(),Pt=l,Rt=o,Yr.transition=a}else e.current=t;if(ov&&(ov=!1,Qi=e,lv=i),a=e.pendingLanes,a===0&&(Zi=null),Q9(t.stateNode),lr(e,oe()),r!==null)for(n=e.onRecoverableError,t=0;t<r.length;t++)i=r[t],n(i.value,{componentStack:i.stack,digest:i.digest});if(av)throw av=!1,e=n0,n0=null,e;return lv&1&&e.tag!==0&&Fl(),a=e.pendingLanes,a&1?e===i0?Ou++:(Ou=0,i0=e):Ou=0,Xi(),null}function Fl(){if(Qi!==null){var e=PE(lv),r=Yr.transition,t=Rt;try{if(Yr.transition=null,Rt=16>e?16:e,Qi===null)var n=!1;else{if(e=Qi,Qi=null,lv=0,Pt&6)throw Error(U(331));var i=Pt;for(Pt|=4,it=e.current;it!==null;){var a=it,o=a.child;if(it.flags&16){var l=a.deletions;if(l!==null){for(var s=0;s<l.length;s++){var u=l[s];for(it=u;it!==null;){var c=it;switch(c.tag){case 0:case 11:case 15:Iu(8,c,a)}var f=c.child;if(f!==null)f.return=c,it=f;else for(;it!==null;){c=it;var h=c.sibling,v=c.return;if(T2(c),c===u){it=null;break}if(h!==null){h.return=v,it=h;break}it=v}}}var d=a.alternate;if(d!==null){var p=d.child;if(p!==null){d.child=null;do{var y=p.sibling;p.sibling=null,p=y}while(p!==null)}}it=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,it=o;else t:for(;it!==null;){if(a=it,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Iu(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,it=g;break t}it=a.return}}var m=e.current;for(it=m;it!==null;){o=it;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,it=x;else t:for(o=m;it!==null;){if(l=it,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:rv(9,l)}}catch(C){re(l,l.return,C)}if(l===o){it=null;break t}var w=l.sibling;if(w!==null){w.return=l.return,it=w;break t}it=l.return}}if(Pt=i,Xi(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(ph,e)}catch(C){}n=!0}return n}finally{Rt=t,Yr.transition=r}}return!1}function W2(e,r,t){r=Sl(t,r),r=u2(e,r,1),e=Ui(e,r,1),r=Ge(),e!==null&&(nu(e,1,r),lr(e,r))}function re(e,r,t){if(e.tag===3)W2(e,e,t);else for(;r!==null;){if(r.tag===3){W2(r,e,t);break}else if(r.tag===1){var n=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Zi===null||!Zi.has(n))){e=Sl(t,e),e=c2(r,e,1),r=Ui(r,e,1),e=Ge(),r!==null&&(nu(r,1,e),lr(r,e));break}}r=r.return}}function AU(e,r,t){var n=e.pingCache;n!==null&&n.delete(r),r=Ge(),e.pingedLanes|=e.suspendedLanes&t,Se===e&&(ke&t)===t&&(ve===4||ve===3&&(ke&130023424)===ke&&500>oe()-r0?Za(e,0):e0|=t),lr(e,r)}function X2(e,r){r===0&&(e.mode&1?(r=yh,yh<<=1,!(yh&130023424)&&(yh=4194304)):r=1);var t=Ge();e=Zn(e,r),e!==null&&(nu(e,r,t),lr(e,t))}function FU(e){var r=e.memoizedState,t=0;r!==null&&(t=r.retryLane),X2(e,t)}function bU(e,r){var t=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(t=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(U(314))}n!==null&&n.delete(r),X2(e,t)}var j2;j2=function(e,r,t){if(e!==null)if(e.memoizedProps!==r.pendingProps||nr.current)ar=!0;else{if(!(e.lanes&t)&&!(r.flags&128))return ar=!1,vU(e,r,t);ar=!!(e.flags&131072)}else ar=!1,qt&&r.flags&1048576&&Fk(r,Yh,r.index);switch(r.lanes=0,r.tag){case 2:var n=r.type;tv(e,r),e=r.pendingProps;var i=vl(r,De.current);ml(r,t),i=Bm(null,r,n,e,i,t);var a=Rm();return r.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,ir(n)?(a=!0,Rh(r)):a=!1,r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,bm(r),i.updater=Wh,r.stateNode=i,i._reactInternals=r,km(r,n,e,t),r=Hm(null,r,n,!0,a,t)):(r.tag=0,qt&&a&&gm(r),$e(null,r,i,t),r=r.child),r;case 16:n=r.elementType;t:{switch(tv(e,r),e=r.pendingProps,i=n._init,n=i(n._payload),r.type=n,i=r.tag=kU(n),e=en(n,e),i){case 0:r=Gm(null,r,n,e,t);break t;case 1:r=x2(null,r,n,e,t);break t;case 11:r=d2(null,r,n,e,t);break t;case 14:r=p2(null,r,n,en(n.type,e),t);break t}throw Error(U(306,n,""))}return r;case 0:return n=r.type,i=r.pendingProps,i=r.elementType===n?i:en(n,i),Gm(e,r,n,i,t);case 1:return n=r.type,i=r.pendingProps,i=r.elementType===n?i:en(n,i),x2(e,r,n,i,t);case 3:t:{if(w2(r),e===null)throw Error(U(387));n=r.pendingProps,a=r.memoizedState,i=a.element,Pk(e,r),Hh(r,n,null,t);var o=r.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},r.updateQueue.baseState=a,r.memoizedState=a,r.flags&256){i=Sl(Error(U(423)),r),r=S2(e,r,n,t,i);break t}else if(n!==i){i=Sl(Error(U(424)),r),r=S2(e,r,n,t,i);break t}else for(Mr=Gi(r.stateNode.containerInfo.firstChild),Cr=r,qt=!0,tn=null,t=Vk(r,null,n,t),r.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(gl(),n===i){r=Kn(e,r,t);break t}$e(e,r,n,t)}r=r.child}return r;case 5:return _k(r),e===null&&xm(r),n=r.type,i=r.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,cm(n,i)?o=null:a!==null&&cm(n,a)&&(r.flags|=32),m2(e,r),$e(e,r,o,t),r.child;case 6:return e===null&&xm(r),null;case 13:return C2(e,r,t);case 4:return Tm(r,r.stateNode.containerInfo),n=r.pendingProps,e===null?r.child=xl(r,null,n,t):$e(e,r,n,t),r.child;case 11:return n=r.type,i=r.pendingProps,i=r.elementType===n?i:en(n,i),d2(e,r,n,i,t);case 7:return $e(e,r,r.pendingProps,t),r.child;case 8:return $e(e,r,r.pendingProps.children,t),r.child;case 12:return $e(e,r,r.pendingProps.children,t),r.child;case 10:t:{if(n=r.type._context,i=r.pendingProps,a=r.memoizedProps,o=i.value,$t(_h,n._currentValue),n._currentValue=o,a!==null)if(Jr(a.value,o)){if(a.children===i.children&&!nr.current){r=Kn(e,r,t);break t}}else for(a=r.child,a!==null&&(a.return=r);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var s=l.firstContext;s!==null;){if(s.context===n){if(a.tag===1){s=Qn(-1,t&-t),s.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}a.lanes|=t,s=a.alternate,s!==null&&(s.lanes|=t),Am(a.return,t,r),l.lanes|=t;break}s=s.next}}else if(a.tag===10)o=a.type===r.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(U(341));o.lanes|=t,l=o.alternate,l!==null&&(l.lanes|=t),Am(o,t,r),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===r){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}$e(e,r,i.children,t),r=r.child}return r;case 9:return i=r.type,n=r.pendingProps.children,ml(r,t),i=Nr(i),n=n(i),r.flags|=1,$e(e,r,n,t),r.child;case 14:return n=r.type,i=en(n,r.pendingProps),i=en(n.type,i),p2(e,r,n,i,t);case 15:return g2(e,r,r.type,r.pendingProps,t);case 17:return n=r.type,i=r.pendingProps,i=r.elementType===n?i:en(n,i),tv(e,r),r.tag=1,ir(n)?(e=!0,Rh(r)):e=!1,ml(r,t),Rk(r,n,i),km(r,n,i,t),Hm(null,r,n,!0,e,t);case 19:return A2(e,r,t);case 22:return y2(e,r,t)}throw Error(U(156,r.tag))};function U2(e,r){return bE(e,r)}function EU(e,r,t,n){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vr(e,r,t,n){return new EU(e,r,t,n)}function c0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kU(e){if(typeof e=="function")return c0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gy)return 11;if(e===xy)return 14}return 2}function ta(e,r){var t=e.alternate;return t===null?(t=Vr(e.tag,r,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=r,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,r=e.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function fv(e,r,t,n,i,a){var o=2;if(n=e,typeof e=="function")c0(e)&&(o=1);else if(typeof e=="string")o=5;else t:switch(e){case tl:return Ka(t.children,i,a,r);case dy:o=8,i|=8;break;case py:return e=Vr(12,t,r,i|2),e.elementType=py,e.lanes=a,e;case yy:return e=Vr(13,t,r,i),e.elementType=yy,e.lanes=a,e;case my:return e=Vr(19,t,r,i),e.elementType=my,e.lanes=a,e;case rE:return hv(t,i,a,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tE:o=10;break t;case eE:o=9;break t;case gy:o=11;break t;case xy:o=14;break t;case Bi:o=16,n=null;break t}throw Error(U(130,e==null?e:typeof e,""))}return r=Vr(o,t,r,i),r.elementType=e,r.type=n,r.lanes=a,r}function Ka(e,r,t,n){return e=Vr(7,e,n,r),e.lanes=t,e}function hv(e,r,t,n){return e=Vr(22,e,n,r),e.elementType=rE,e.lanes=t,e.stateNode={isHidden:!1},e}function f0(e,r,t){return e=Vr(6,e,null,r),e.lanes=t,e}function h0(e,r,t){return r=Vr(4,e.children!==null?e.children:[],e.key,r),r.lanes=t,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function TU(e,r,t,n,i){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yy(0),this.expirationTimes=Yy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yy(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function v0(e,r,t,n,i,a,o,l,s){return e=new TU(e,r,t,l,s),r===1?(r=1,a===!0&&(r|=8)):r=0,a=Vr(3,null,null,r),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},bm(a),e}function IU(e,r,t){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Jo,key:n==null?null:""+n,children:e,containerInfo:r,implementation:t}}function q2(e){if(!e)return Wi;e=e._reactInternals;t:{if(Va(e)!==e||e.tag!==1)throw Error(U(170));var r=e;do{switch(r.tag){case 3:r=r.stateNode.context;break t;case 1:if(ir(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break t}}r=r.return}while(r!==null);throw Error(U(171))}if(e.tag===1){var t=e.type;if(ir(t))return Ck(e,t,r)}return r}function Z2(e,r,t,n,i,a,o,l,s){return e=v0(t,n,!0,e,i,a,o,l,s),e.context=q2(null),t=e.current,n=Ge(),i=Ki(t),a=Qn(n,i),a.callback=r!=null?r:null,Ui(t,a,i),e.current.lanes=i,nu(e,i,n),lr(e,n),e}function vv(e,r,t,n){var i=r.current,a=Ge(),o=Ki(i);return t=q2(t),r.context===null?r.context=t:r.pendingContext=t,r=Qn(a,o),r.payload={element:e},n=n===void 0?null:n,n!==null&&(r.callback=n),e=Ui(i,r,o),e!==null&&(an(e,i,o,a),Gh(e,i,o)),o}function dv(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Q2(e,r){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var t=e.retryLane;e.retryLane=t!==0&&t<r?t:r}}function d0(e,r){Q2(e,r),(e=e.alternate)&&Q2(e,r)}function PU(){return null}var K2=typeof reportError=="function"?reportError:function(e){console.error(e)};function p0(e){this._internalRoot=e}pv.prototype.render=p0.prototype.render=function(e){var r=this._internalRoot;if(r===null)throw Error(U(409));vv(e,r,null,null)},pv.prototype.unmount=p0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var r=e.containerInfo;qa(function(){vv(null,e,null,null)}),r[Xn]=null}};function pv(e){this._internalRoot=e}pv.prototype.unstable_scheduleHydration=function(e){if(e){var r=DE();e={blockedOn:null,target:e,priority:r};for(var t=0;t<Vi.length&&r!==0&&r<Vi[t].priority;t++);Vi.splice(t,0,e),t===0&&NE(e)}};function g0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function J2(){}function LU(e,r,t,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=dv(o);a.call(u)}}var o=Z2(r,n,e,0,null,!1,!1,"",J2);return e._reactRootContainer=o,e[Xn]=o.current,yu(e.nodeType===8?e.parentNode:e),qa(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var l=n;n=function(){var u=dv(s);l.call(u)}}var s=v0(e,0,!1,null,null,!1,!1,"",J2);return e._reactRootContainer=s,e[Xn]=s.current,yu(e.nodeType===8?e.parentNode:e),qa(function(){vv(r,s,t,n)}),s}function yv(e,r,t,n,i){var a=t._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var l=i;i=function(){var s=dv(o);l.call(s)}}vv(r,o,e,i)}else o=LU(t,r,e,i,n);return dv(o)}LE=function(e){switch(e.tag){case 3:var r=e.stateNode;if(r.current.memoizedState.isDehydrated){var t=ru(r.pendingLanes);t!==0&&(Vy(r,t|1),lr(r,oe()),!(Pt&6)&&(Al=oe()+500,Xi()))}break;case 13:qa(function(){var n=Zn(e,1);if(n!==null){var i=Ge();an(n,e,1,i)}}),d0(e,1)}},_y=function(e){if(e.tag===13){var r=Zn(e,134217728);if(r!==null){var t=Ge();an(r,e,134217728,t)}d0(e,134217728)}},OE=function(e){if(e.tag===13){var r=Ki(e),t=Zn(e,r);if(t!==null){var n=Ge();an(t,e,r,n)}d0(e,r)}},DE=function(){return Rt},BE=function(e,r){var t=Rt;try{return Rt=e,r()}finally{Rt=t}},Oy=function(e,r,t){switch(r){case"input":if(Fy(e,t),r=t.name,t.type==="radio"&&r!=null){for(t=e;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<t.length;r++){var n=t[r];if(n!==e&&n.form===e.form){var i=Dh(n);if(!i)throw Error(U(90));aE(n),Fy(n,i)}}}break;case"textarea":cE(e,t);break;case"select":r=t.value,r!=null&&el(e,!!t.multiple,r,!1)}},xE=l0,wE=qa;var OU={usingClientEntryPoint:!1,Events:[wu,fl,Dh,yE,mE,l0]},Du={findFiberByHostInstance:_a,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},DU={bundleType:Du.bundleType,version:Du.version,rendererPackageName:Du.rendererPackageName,rendererConfig:Du.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=AE(e),e===null?null:e.stateNode},findFiberByHostInstance:Du.findFiberByHostInstance||PU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var mv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mv.isDisabled&&mv.supportsFiber)try{ph=mv.inject(DU),Cn=mv}catch(e){}}xr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OU,xr.createPortal=function(e,r){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g0(r))throw Error(U(200));return IU(e,r,null,t)},xr.createRoot=function(e,r){if(!g0(e))throw Error(U(299));var t=!1,n="",i=K2;return r!=null&&(r.unstable_strictMode===!0&&(t=!0),r.identifierPrefix!==void 0&&(n=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),r=v0(e,1,!1,null,null,t,!1,n,i),e[Xn]=r.current,yu(e.nodeType===8?e.parentNode:e),new p0(r)},xr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var r=e._reactInternals;if(r===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=AE(r),e=e===null?null:e.stateNode,e},xr.flushSync=function(e){return qa(e)},xr.hydrate=function(e,r,t){if(!gv(r))throw Error(U(200));return yv(null,e,r,!0,t)},xr.hydrateRoot=function(e,r,t){if(!g0(e))throw Error(U(405));var n=t!=null&&t.hydratedSources||null,i=!1,a="",o=K2;if(t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),r=Z2(r,null,e,1,t!=null?t:null,i,!1,a,o),e[Xn]=r.current,yu(e),n)for(e=0;e<n.length;e++)t=n[e],i=t._getVersion,i=i(t._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[t,i]:r.mutableSourceEagerHydrationData.push(t,i);return new pv(r)},xr.render=function(e,r,t){if(!gv(r))throw Error(U(200));return yv(null,e,r,!1,t)},xr.unmountComponentAtNode=function(e){if(!gv(e))throw Error(U(40));return e._reactRootContainer?(qa(function(){yv(null,null,e,!1,function(){e._reactRootContainer=null,e[Xn]=null})}),!0):!1},xr.unstable_batchedUpdates=l0,xr.unstable_renderSubtreeIntoContainer=function(e,r,t,n){if(!gv(t))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return yv(e,r,t,!1,n)},xr.version="18.2.0-next-9e3b772b8-20220608";function tT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tT)}catch(e){console.error(e)}}tT(),jb.exports=xr;var eT=jb.exports;const BU=cT({__proto__:null,default:Iv(eT)},[eT]);var y0=function(){return y0=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},y0.apply(this,arguments)},Bu=y0({},BU),RU=Bu.version,NU=Bu.render;Bu.unmountComponentAtNode;var m0;try{var zU=Number((RU||"").split(".")[0]);zU>=18&&(m0=Bu.createRoot)}catch(e){}function rT(e){var r=Bu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;r&&typeof r=="object"&&(r.usingClientEntryPoint=e)}var nT="__rc_react_root__";function YU(e,r){rT(!0);var t=r[nT]||m0(r);rT(!1),t.render(e),r[nT]=t}function VU(e,r){NU(e,r)}function _U(e,r){if(m0){YU(e,r);return}VU(e,r)}var x0=new Map,$U=function(e,r,t){var n=document.createElement("div");return r==="tooltip"&&(n.setAttribute("data-uuid",t),x0.has(t)?n=x0.get(t):x0.set(t,n),n.className="g2-tooltip"),_U(e,n),n};const GU=$U;var xv=function(e,r){var t={}.toString;return t.call(e)==="[object ".concat(r,"]")},HU=function(e){if(!e)return e;var r={};for(var t in e)r[t]=e[t];return r},wv=function(e){if(!e||typeof e!="object")return e;var r;return Array.isArray(e)?r=e.map(function(t){return wv(t)}):(r={},Object.keys(e).forEach(function(t){return r[t]=wv(e[t])})),r},Ru=function(e,r){for(var t=e,n=0;n<r.length;n+=1)if(t!=null&&t[r[n]])t=t[r[n]];else{t=void 0;break}return t},WU=function(e,r,t){if(!e)return e;var n=e;return r.forEach(function(i,a){a<r.length-1?n=n[i]:n[i]=t}),e},XU=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var r=Math.random()*16|0,t=e=="x"?r:r&3|8;return t.toString(16)})},Ja=function(e,r){e&&(Q(e)?e(r):e.current=r)},w0=function(){return w0=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},w0.apply(this,arguments)},iT=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t};function to(e,r){var t=D.useRef(),n=D.useRef(),i=D.useRef(null),a=r.onReady,o=r.onEvent,l=function(f,h){var v;return f===void 0&&(f="image/png"),(v=t.current)===null||v===void 0?void 0:v.chart.canvas.cfg.el.toDataURL(f,h)},s=function(f,h,v){var d;f===void 0&&(f="download"),h===void 0&&(h="image/png");var p=f;f.indexOf(".")===-1&&(p="".concat(f,".").concat(h.split("/")[1]));var y=(d=t.current)===null||d===void 0?void 0:d.chart.canvas.cfg.el.toDataURL(h,v),g=document.createElement("a");return g.href=y,g.download=p,document.body.appendChild(g),g.click(),document.body.removeChild(g),g=null,p},u=function(f,h,v,d){var p=Ru(f,h);WU(f,h,function(){for(var y=[],g=0;g<arguments.length;g++)y[g]=arguments[g];var m=xv(p,"Function")?p.apply(void 0,y):p;return xv(m,"String")||xv(m,"Number")||xv(m,"HTMLDivElement")?m:GU(m,v,d)})},c=function(){var f=XU();Ru(r,["statistic","content","customHtml"])&&u(r,["statistic","content","customHtml"]),Ru(r,["statistic","title","customHtml"])&&u(r,["statistic","title","customHtml"]),typeof r.tooltip=="object"&&(Ru(r,["tooltip","container"])&&u(r,["tooltip","container"],"tooltip",f),Ru(r,["tooltip","customContent"])&&u(r,["tooltip","customContent"],"tooltip",f))};return D.useEffect(function(){if(t.current&&!Gt(n.current,r)){var f=!1;if(n.current){var h=n.current;h.data,h.value,h.percent;var v=iT(h,["data","value","percent"]);r.data,r.value,r.percent;var d=iT(r,["data","value","percent"]);f=Gt(v,d)}if(n.current=wv(r),f&&E(r,"chartType")!=="Mix"){var p="data",y=["percent"],g=Object.keys(r);y.forEach(function(m){g.includes(m)&&(p=m)}),t.current.changeData((r==null?void 0:r[p])||[]),t.current.render()}else c(),t.current.update(r)}},[r]),D.useEffect(function(){if(!i.current)return function(){return null};n.current||(n.current=wv(r)),c();var f=new e(i.current,w0({},r));f.toDataURL=function(v,d){return l(v,d)},f.downloadImage=function(v,d,p){return s(v,d,p)},f.render(),t.current=HU(f),a&&a(f);var h=function(v){o&&o(f,v)};return f.on("*",h),function(){t.current&&(t.current.destroy(),t.current.off("*",h),t.current=void 0)}},[]),{chart:t,container:i}}var jU=function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(r,t)};return function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(r,t);function n(){this.constructor=r}r.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),UU=function(e){jU(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={hasError:!1},t.renderError=function(n){var i=t.props.errorTemplate;switch(n){default:return typeof i=="function"?i(n):i||D.createElement("h5",null,"组件出错了,请核查后重试: ",n.message)}},t}return r.getDerivedStateFromError=function(t){return{hasError:!0,error:t}},r.getDerivedStateFromProps=function(t,n){return n.children!==t.children?{children:t.children,hasError:!1,error:void 0}:null},r.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):D.createElement(D.Fragment,null,this.props.children)},r}(D.Component);const eo=UU;/*! *****************************************************************************
|
|
131
131
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
132
132
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
133
133
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -140,4 +140,4 @@ Error generating stack: `+a.message+`
|
|
|
140
140
|
|
|
141
141
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
142
142
|
and limitations under the License.
|
|
143
|
-
***************************************************************************** */var ea=function(){return ea=Object.assign||function(r){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},ea.apply(this,arguments)};function qU(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t}var ZU=function(){return Math.random().toString(36).substring(6)},aT=function(e){var r=e.animate,t=e.backgroundColor,n=e.backgroundOpacity,i=e.baseUrl,a=e.children,o=e.foregroundColor,l=e.foregroundOpacity,s=e.gradientRatio,u=e.uniqueKey,c=e.interval,f=e.rtl,h=e.speed,v=e.style,d=e.title,p=qU(e,["animate","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","uniqueKey","interval","rtl","speed","style","title"]),y=u||ZU(),g=y+"-diff",m=y+"-animated-diff",x=y+"-aria",w=f?{transform:"scaleX(-1)"}:null,C="0; "+c+"; 1",M=h+"s";return B.createElement("svg",ea({"aria-labelledby":x,role:"img",style:ea(ea({},v),w)},p),d?B.createElement("title",{id:x},d):null,B.createElement("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+i+"#"+g+")",style:{fill:"url("+i+"#"+m+")"}}),B.createElement("defs",{role:"presentation"},B.createElement("clipPath",{id:g},a),B.createElement("linearGradient",{id:m},B.createElement("stop",{offset:"0%",stopColor:t,stopOpacity:n},r&&B.createElement("animate",{attributeName:"offset",values:-s+"; "+-s+"; 1",keyTimes:C,dur:M,repeatCount:"indefinite"})),B.createElement("stop",{offset:"50%",stopColor:o,stopOpacity:l},r&&B.createElement("animate",{attributeName:"offset",values:-s/2+"; "+-s/2+"; "+(1+s/2),keyTimes:C,dur:M,repeatCount:"indefinite"})),B.createElement("stop",{offset:"100%",stopColor:t,stopOpacity:n},r&&B.createElement("animate",{attributeName:"offset",values:"0; 0; "+(1+s),keyTimes:C,dur:M,repeatCount:"indefinite"})))))};aT.defaultProps={animate:!0,backgroundColor:"#f5f6f7",backgroundOpacity:1,baseUrl:"",foregroundColor:"#eee",foregroundOpacity:1,gradientRatio:2,id:null,interval:.25,rtl:!1,speed:1.2,style:{},title:"Loading..."};var oT=function(e){return e.children?B.createElement(aT,ea({},e)):B.createElement(QU,ea({},e))},QU=function(e){return B.createElement(oT,ea({viewBox:"0 0 476 124"},e),B.createElement("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),B.createElement("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),B.createElement("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),B.createElement("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),B.createElement("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),B.createElement("circle",{cx:"20",cy:"20",r:"20"}))};const KU=oT;var JU=function(e){var r=e.loadingTemplate,t=e.theme,n=t===void 0?"light":t,i=function(){return r||B.createElement(KU,{viewBox:"0 0 400 180",width:200,height:90,speed:1,backgroundColor:n==="dark"?"#262626":"#D9D9D9"},B.createElement("rect",{x:"20",y:"5",rx:"0",ry:"0",width:"1",height:"170"}),B.createElement("rect",{x:"20",y:"175",rx:"0",ry:"0",width:"360",height:"1"}),B.createElement("rect",{x:"40",y:"75",rx:"0",ry:"0",width:"35",height:"100"}),B.createElement("rect",{x:"80",y:"125",rx:"0",ry:"0",width:"35",height:"50"}),B.createElement("rect",{x:"120",y:"105",rx:"0",ry:"0",width:"35",height:"70"}),B.createElement("rect",{x:"160",y:"35",rx:"0",ry:"0",width:"35",height:"140"}),B.createElement("rect",{x:"200",y:"55",rx:"0",ry:"0",width:"35",height:"120"}),B.createElement("rect",{x:"240",y:"15",rx:"0",ry:"0",width:"35",height:"160"}),B.createElement("rect",{x:"280",y:"135",rx:"0",ry:"0",width:"35",height:"40"}),B.createElement("rect",{x:"320",y:"85",rx:"0",ry:"0",width:"35",height:"90"}))};return B.createElement("div",{className:"charts-loading-container",style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:n==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},i())};const ro=JU;var t7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},e7=B.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=t7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(vA,u),f=c.chart,h=c.container;return B.useEffect(function(){Ja(t,f.current)},[f.current]),B.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),B.createElement(eo,{errorTemplate:s},o&&B.createElement(ro,{loadingTemplate:l,theme:e.theme}),B.createElement("div",{className:a,style:i,ref:h}))});const r7=e7;var n7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},i7=B.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=n7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(mA,u),f=c.chart,h=c.container;return B.useEffect(function(){Ja(t,f.current)},[f.current]),B.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),B.createElement(eo,{errorTemplate:s},o&&B.createElement(ro,{loadingTemplate:l,theme:e.theme}),B.createElement("div",{className:a,style:i,ref:h}))});const a7=i7;var o7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},l7=B.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=o7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(xA,u),f=c.chart,h=c.container;return B.useEffect(function(){Ja(t,f.current)},[f.current]),B.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),B.createElement(eo,{errorTemplate:s},o&&B.createElement(ro,{loadingTemplate:l,theme:e.theme}),B.createElement("div",{className:a,style:i,ref:h}))});const s7=l7;var u7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},c7=B.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=u7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(NA,u),f=c.chart,h=c.container;return B.useEffect(function(){Ja(t,f.current)},[f.current]),B.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),B.createElement(eo,{errorTemplate:s},o&&B.createElement(ro,{loadingTemplate:l,theme:e.theme}),B.createElement("div",{className:a,style:i,ref:h}))});const f7=c7;var h7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},v7=B.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=h7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(GA,u),f=c.chart,h=c.container;return B.useEffect(function(){Ja(t,f.current)},[f.current]),B.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),B.createElement(eo,{errorTemplate:s},o&&B.createElement(ro,{loadingTemplate:l,theme:e.theme}),B.createElement("div",{className:a,style:i,ref:h}))});const d7=v7;var p7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},g7=B.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=p7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(rF,u),f=c.chart,h=c.container;return B.useEffect(function(){Ja(t,f.current)},[f.current]),B.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),B.createElement(eo,{errorTemplate:s},o&&B.createElement(ro,{loadingTemplate:l,theme:e.theme}),B.createElement("div",{className:a,style:i,ref:h}))});const y7=g7;var m7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},x7=B.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=m7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(DW,u),f=c.chart,h=c.container;return B.useEffect(function(){Ja(t,f.current)},[f.current]),B.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),B.createElement(eo,{errorTemplate:s},o&&B.createElement(ro,{loadingTemplate:l,theme:e.theme}),B.createElement("div",{className:a,style:i,ref:h}))});const w7=x7,{booleanField:Sv}=R0,S7={isStack:e=>Sv(J({name:"isStack",title:"isStack"},e)),smooth:e=>Sv(J({name:"smooth",title:"smooth"},e)),isPercent:e=>Sv(J({name:"isPercent",title:"isPercent"},e)),isGroup:e=>Sv(J({name:"isGroup",title:"isGroup"},e))};class no extends Lv{constructor({name:t,title:n,component:i,config:a}){super({name:t,title:n,component:i,config:["xField","yField","seriesField",...a||[]]});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{xField:a,yField:o,seriesField:l}=this.infer(t,{measures:n,dimensions:i});return{general:{xField:a==null?void 0:a.value,yField:o==null?void 0:o.value,seriesField:l==null?void 0:l.value}}});this.addConfigs(S7)}getProps({data:t,general:n,advanced:i,fieldProps:a}){const o={},l=s=>s.replace(/\./g,"_");return Object.entries(a).forEach(([s,u])=>{s.includes(".")&&(s=l(s)),o[s]={formatter:u.transformer,alias:u.label}}),n=Object.entries(n).reduce((s,[u,c])=>(s[u]=c,u.includes("Field")&&(Array.isArray(c)?s[u]=c.map(f=>f!=null&&f.includes(".")?l(f):f):typeof c=="string"&&c.includes(".")&&(s[u]=l(c))),s),{}),J(J({data:t.map(s=>{const u={};return Object.entries(s).forEach(([c,f])=>{c.includes(".")&&(c=l(c)),u[c]=f}),u}),meta:o,animation:!1},n),i)}getReference(){return{title:this.title,link:`https://ant-design-charts.antgroup.com/api/plots/${this.name}`}}}class C7 extends no{constructor(){super({name:"bar",title:"Bar Chart",component:a7,config:["isGroup","isStack","isPercent"]});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{xField:a,yField:o,seriesField:l}=this.infer(t,{measures:n,dimensions:i});return{general:{xField:o==null?void 0:o.value,yField:a==null?void 0:a.value,seriesField:l==null?void 0:l.value}}})}}class M7 extends no{constructor(){super({name:"pie",title:"Pie Chart",component:d7});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{xField:a,yField:o}=this.infer(t,{measures:n,dimensions:i});return{general:{colorField:a==null?void 0:a.value,angleField:o==null?void 0:o.value}}});this.config=[{property:"field",name:"angleField",title:"angleField",required:!0},{property:"field",name:"colorField",title:"colorField",required:!0}]}}class A7 extends no{constructor(){super({name:"dualAxes",title:"Dual Axes Chart",component:w7});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{xField:a,yFields:o}=this.infer(t,{measures:n,dimensions:i});return{general:{xField:a==null?void 0:a.value,yField:(o==null?void 0:o.map(l=>l.value).slice(0,2))||[]}}});this.config=["xField",{yField:{title:'{{t("yField")}}',type:"array","x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"Select","x-reactions":"{{ useChartFields }}","x-component-props":{style:{minWidth:"200px"}},required:!0},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add")}}',"x-component":"ArrayItems.Addition"}}}}]}render({data:t,general:n,advanced:i,fieldProps:a}){const o=this.getProps({data:t,general:n,advanced:i,fieldProps:a}),{data:l}=o;return()=>B.createElement(this.component,yt(J({},o),{data:[l,l]}))}}const F7=[new no({name:"line",title:"Line Chart",component:f7,config:["smooth","isStack"]}),new no({name:"area",title:"Area Chart",component:r7,config:["smooth",{property:"isStack",defaultValue:!0},"isPercent"]}),new no({name:"column",title:"Column Chart",component:s7,config:["isGroup","isStack","isPercent"]}),new C7,new M7,new A7,new no({name:"scatter",title:"Scatter Chart",component:y7})];class Cv extends z.Plugin{constructor(){super(...arguments);Fr(this,"charts",new xT)}load(){return br(this,null,function*(){this.charts.setGroup("Built-in",[...F7,...GI]),this.app.addComponents({ChartV2BlockInitializer:VI,ChartV2BlockDesigner:NI,ChartV2Block:RI}),this.app.schemaInitializerManager.add(YI),this.app.schemaInitializerManager.add(pI),this.app.schemaInitializerManager.add(AI);const t=this.app.schemaInitializerManager.get("BlockInitializers");t==null||t.add("dataBlocks.chartV2",{title:Et("Charts"),Component:"ChartV2BlockInitializer"})})}}dt.Chart=Lv,dt.ChartConfigContext=Tn,dt.default=Cv,Object.defineProperties(dt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
143
|
+
***************************************************************************** */var ea=function(){return ea=Object.assign||function(r){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},ea.apply(this,arguments)};function qU(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t}var ZU=function(){return Math.random().toString(36).substring(6)},aT=function(e){var r=e.animate,t=e.backgroundColor,n=e.backgroundOpacity,i=e.baseUrl,a=e.children,o=e.foregroundColor,l=e.foregroundOpacity,s=e.gradientRatio,u=e.uniqueKey,c=e.interval,f=e.rtl,h=e.speed,v=e.style,d=e.title,p=qU(e,["animate","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","uniqueKey","interval","rtl","speed","style","title"]),y=u||ZU(),g=y+"-diff",m=y+"-animated-diff",x=y+"-aria",w=f?{transform:"scaleX(-1)"}:null,C="0; "+c+"; 1",M=h+"s";return D.createElement("svg",ea({"aria-labelledby":x,role:"img",style:ea(ea({},v),w)},p),d?D.createElement("title",{id:x},d):null,D.createElement("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+i+"#"+g+")",style:{fill:"url("+i+"#"+m+")"}}),D.createElement("defs",{role:"presentation"},D.createElement("clipPath",{id:g},a),D.createElement("linearGradient",{id:m},D.createElement("stop",{offset:"0%",stopColor:t,stopOpacity:n},r&&D.createElement("animate",{attributeName:"offset",values:-s+"; "+-s+"; 1",keyTimes:C,dur:M,repeatCount:"indefinite"})),D.createElement("stop",{offset:"50%",stopColor:o,stopOpacity:l},r&&D.createElement("animate",{attributeName:"offset",values:-s/2+"; "+-s/2+"; "+(1+s/2),keyTimes:C,dur:M,repeatCount:"indefinite"})),D.createElement("stop",{offset:"100%",stopColor:t,stopOpacity:n},r&&D.createElement("animate",{attributeName:"offset",values:"0; 0; "+(1+s),keyTimes:C,dur:M,repeatCount:"indefinite"})))))};aT.defaultProps={animate:!0,backgroundColor:"#f5f6f7",backgroundOpacity:1,baseUrl:"",foregroundColor:"#eee",foregroundOpacity:1,gradientRatio:2,id:null,interval:.25,rtl:!1,speed:1.2,style:{},title:"Loading..."};var oT=function(e){return e.children?D.createElement(aT,ea({},e)):D.createElement(QU,ea({},e))},QU=function(e){return D.createElement(oT,ea({viewBox:"0 0 476 124"},e),D.createElement("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),D.createElement("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),D.createElement("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),D.createElement("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),D.createElement("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),D.createElement("circle",{cx:"20",cy:"20",r:"20"}))};const KU=oT;var JU=function(e){var r=e.loadingTemplate,t=e.theme,n=t===void 0?"light":t,i=function(){return r||D.createElement(KU,{viewBox:"0 0 400 180",width:200,height:90,speed:1,backgroundColor:n==="dark"?"#262626":"#D9D9D9"},D.createElement("rect",{x:"20",y:"5",rx:"0",ry:"0",width:"1",height:"170"}),D.createElement("rect",{x:"20",y:"175",rx:"0",ry:"0",width:"360",height:"1"}),D.createElement("rect",{x:"40",y:"75",rx:"0",ry:"0",width:"35",height:"100"}),D.createElement("rect",{x:"80",y:"125",rx:"0",ry:"0",width:"35",height:"50"}),D.createElement("rect",{x:"120",y:"105",rx:"0",ry:"0",width:"35",height:"70"}),D.createElement("rect",{x:"160",y:"35",rx:"0",ry:"0",width:"35",height:"140"}),D.createElement("rect",{x:"200",y:"55",rx:"0",ry:"0",width:"35",height:"120"}),D.createElement("rect",{x:"240",y:"15",rx:"0",ry:"0",width:"35",height:"160"}),D.createElement("rect",{x:"280",y:"135",rx:"0",ry:"0",width:"35",height:"40"}),D.createElement("rect",{x:"320",y:"85",rx:"0",ry:"0",width:"35",height:"90"}))};return D.createElement("div",{className:"charts-loading-container",style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:n==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},i())};const ro=JU;var t7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},e7=D.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=t7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(vA,u),f=c.chart,h=c.container;return D.useEffect(function(){Ja(t,f.current)},[f.current]),D.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),D.createElement(eo,{errorTemplate:s},o&&D.createElement(ro,{loadingTemplate:l,theme:e.theme}),D.createElement("div",{className:a,style:i,ref:h}))});const r7=e7;var n7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},i7=D.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=n7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(mA,u),f=c.chart,h=c.container;return D.useEffect(function(){Ja(t,f.current)},[f.current]),D.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),D.createElement(eo,{errorTemplate:s},o&&D.createElement(ro,{loadingTemplate:l,theme:e.theme}),D.createElement("div",{className:a,style:i,ref:h}))});const a7=i7;var o7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},l7=D.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=o7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(xA,u),f=c.chart,h=c.container;return D.useEffect(function(){Ja(t,f.current)},[f.current]),D.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),D.createElement(eo,{errorTemplate:s},o&&D.createElement(ro,{loadingTemplate:l,theme:e.theme}),D.createElement("div",{className:a,style:i,ref:h}))});const s7=l7;var u7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},c7=D.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=u7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(NA,u),f=c.chart,h=c.container;return D.useEffect(function(){Ja(t,f.current)},[f.current]),D.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),D.createElement(eo,{errorTemplate:s},o&&D.createElement(ro,{loadingTemplate:l,theme:e.theme}),D.createElement("div",{className:a,style:i,ref:h}))});const f7=c7;var h7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},v7=D.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=h7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(GA,u),f=c.chart,h=c.container;return D.useEffect(function(){Ja(t,f.current)},[f.current]),D.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),D.createElement(eo,{errorTemplate:s},o&&D.createElement(ro,{loadingTemplate:l,theme:e.theme}),D.createElement("div",{className:a,style:i,ref:h}))});const d7=v7;var p7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},g7=D.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=p7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(rF,u),f=c.chart,h=c.container;return D.useEffect(function(){Ja(t,f.current)},[f.current]),D.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),D.createElement(eo,{errorTemplate:s},o&&D.createElement(ro,{loadingTemplate:l,theme:e.theme}),D.createElement("div",{className:a,style:i,ref:h}))});const y7=g7;var m7=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},x7=D.forwardRef(function(e,r){var t=e.chartRef,n=e.style,i=n===void 0?{height:"inherit"}:n,a=e.className,o=e.loading,l=e.loadingTemplate,s=e.errorTemplate,u=m7(e,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),c=to(DW,u),f=c.chart,h=c.container;return D.useEffect(function(){Ja(t,f.current)},[f.current]),D.useImperativeHandle(r,function(){return{getChart:function(){return f.current}}}),D.createElement(eo,{errorTemplate:s},o&&D.createElement(ro,{loadingTemplate:l,theme:e.theme}),D.createElement("div",{className:a,style:i,ref:h}))});const w7=x7,{booleanField:Sv}=R0,S7={isStack:e=>Sv(J({name:"isStack",title:"isStack"},e)),smooth:e=>Sv(J({name:"smooth",title:"smooth"},e)),isPercent:e=>Sv(J({name:"isPercent",title:"isPercent"},e)),isGroup:e=>Sv(J({name:"isGroup",title:"isGroup"},e))};class no extends Lv{constructor({name:t,title:n,component:i,config:a}){super({name:t,title:n,component:i,config:["xField","yField","seriesField",...a||[]]});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{xField:a,yField:o,seriesField:l}=this.infer(t,{measures:n,dimensions:i});return{general:{xField:a==null?void 0:a.value,yField:o==null?void 0:o.value,seriesField:l==null?void 0:l.value}}});this.addConfigs(S7)}getProps({data:t,general:n,advanced:i,fieldProps:a}){const o={},l=s=>s.replace(/\./g,"_");return Object.entries(a).forEach(([s,u])=>{s.includes(".")&&(s=l(s)),o[s]={formatter:u.transformer,alias:u.label}}),n=Object.entries(n).reduce((s,[u,c])=>(s[u]=c,u.includes("Field")&&(Array.isArray(c)?s[u]=c.map(f=>f!=null&&f.includes(".")?l(f):f):typeof c=="string"&&c.includes(".")&&(s[u]=l(c))),s),{}),J(J({data:t.map(s=>{const u={};return Object.entries(s).forEach(([c,f])=>{c.includes(".")&&(c=l(c)),u[c]=f}),u}),meta:o,animation:!1},n),i)}getReference(){return{title:this.title,link:`https://ant-design-charts.antgroup.com/api/plots/${this.name}`}}}class C7 extends no{constructor(){super({name:"bar",title:"Bar Chart",component:a7,config:["isGroup","isStack","isPercent"]});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{xField:a,yField:o,seriesField:l}=this.infer(t,{measures:n,dimensions:i});return{general:{xField:o==null?void 0:o.value,yField:a==null?void 0:a.value,seriesField:l==null?void 0:l.value}}})}}class M7 extends no{constructor(){super({name:"pie",title:"Pie Chart",component:d7});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{xField:a,yField:o}=this.infer(t,{measures:n,dimensions:i});return{general:{colorField:a==null?void 0:a.value,angleField:o==null?void 0:o.value}}});this.config=[{property:"field",name:"angleField",title:"angleField",required:!0},{property:"field",name:"colorField",title:"colorField",required:!0}]}}class A7 extends no{constructor(){super({name:"dualAxes",title:"Dual Axes Chart",component:w7});Fr(this,"init",(t,{measures:n,dimensions:i})=>{const{xField:a,yFields:o}=this.infer(t,{measures:n,dimensions:i});return{general:{xField:a==null?void 0:a.value,yField:(o==null?void 0:o.map(l=>l.value).slice(0,2))||[]}}});this.config=["xField",{yField:{title:'{{t("yField")}}',type:"array","x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"Select","x-reactions":"{{ useChartFields }}","x-component-props":{style:{minWidth:"200px"}},required:!0},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add")}}',"x-component":"ArrayItems.Addition"}}}}]}render({data:t,general:n,advanced:i,fieldProps:a}){const o=this.getProps({data:t,general:n,advanced:i,fieldProps:a}),{data:l}=o;return()=>D.createElement(this.component,yt(J({},o),{data:[l,l]}))}}const F7=[new no({name:"line",title:"Line Chart",component:f7,config:["smooth","isStack"]}),new no({name:"area",title:"Area Chart",component:r7,config:["smooth",{property:"isStack",defaultValue:!0},"isPercent"]}),new no({name:"column",title:"Column Chart",component:s7,config:["isGroup","isStack","isPercent"]}),new C7,new M7,new A7,new no({name:"scatter",title:"Scatter Chart",component:y7})];class Cv extends z.Plugin{constructor(){super(...arguments);Fr(this,"charts",new xT)}load(){return br(this,null,function*(){this.charts.setGroup("Built-in",[...F7,...GI]),this.app.addComponents({ChartV2BlockInitializer:VI,ChartV2BlockDesigner:NI,ChartV2Block:RI}),this.app.schemaInitializerManager.add(YI),this.app.schemaInitializerManager.add(pI),this.app.schemaInitializerManager.add(AI);const t=this.app.schemaInitializerManager.get("BlockInitializers");t==null||t.add("dataBlocks.chartV2",{title:Et("Charts"),Component:"ChartV2BlockInitializer"})})}}dt.Chart=Lv,dt.ChartConfigContext=Tn,dt.default=Cv,Object.defineProperties(dt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|